corgi.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694
  1. /*
  2. * Support for Sharp SL-C7xx PDAs
  3. * Models: SL-C700 (Corgi), SL-C750 (Shepherd), SL-C760 (Husky)
  4. *
  5. * Copyright (c) 2004-2005 Richard Purdie
  6. *
  7. * Based on Sharp's 2.4 kernel patches/lubbock.c
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License version 2 as
  11. * published by the Free Software Foundation.
  12. *
  13. */
  14. #include <linux/kernel.h>
  15. #include <linux/init.h>
  16. #include <linux/platform_device.h>
  17. #include <linux/major.h>
  18. #include <linux/fs.h>
  19. #include <linux/interrupt.h>
  20. #include <linux/mmc/host.h>
  21. #include <linux/mtd/physmap.h>
  22. #include <linux/pm.h>
  23. #include <linux/gpio.h>
  24. #include <linux/backlight.h>
  25. #include <linux/io.h>
  26. #include <linux/spi/spi.h>
  27. #include <linux/spi/ads7846.h>
  28. #include <linux/spi/corgi_lcd.h>
  29. #include <linux/mtd/sharpsl.h>
  30. #include <video/w100fb.h>
  31. #include <asm/setup.h>
  32. #include <asm/memory.h>
  33. #include <asm/mach-types.h>
  34. #include <mach/hardware.h>
  35. #include <asm/irq.h>
  36. #include <asm/system.h>
  37. #include <asm/mach/arch.h>
  38. #include <asm/mach/map.h>
  39. #include <asm/mach/irq.h>
  40. #include <mach/pxa25x.h>
  41. #include <plat/i2c.h>
  42. #include <mach/irda.h>
  43. #include <mach/mmc.h>
  44. #include <mach/udc.h>
  45. #include <mach/pxa2xx_spi.h>
  46. #include <mach/corgi.h>
  47. #include <mach/sharpsl.h>
  48. #include <asm/mach/sharpsl_param.h>
  49. #include <asm/hardware/scoop.h>
  50. #include "generic.h"
  51. #include "devices.h"
  52. #include "sharpsl.h"
  53. static unsigned long corgi_pin_config[] __initdata = {
  54. /* Static Memory I/O */
  55. GPIO78_nCS_2, /* w100fb */
  56. GPIO80_nCS_4, /* scoop */
  57. /* SSP1 */
  58. GPIO23_SSP1_SCLK,
  59. GPIO25_SSP1_TXD,
  60. GPIO26_SSP1_RXD,
  61. GPIO24_GPIO, /* CORGI_GPIO_ADS7846_CS - SFRM as chip select */
  62. /* I2S */
  63. GPIO28_I2S_BITCLK_OUT,
  64. GPIO29_I2S_SDATA_IN,
  65. GPIO30_I2S_SDATA_OUT,
  66. GPIO31_I2S_SYNC,
  67. GPIO32_I2S_SYSCLK,
  68. /* Infra-Red */
  69. GPIO47_FICP_TXD,
  70. GPIO46_FICP_RXD,
  71. /* FFUART */
  72. GPIO40_FFUART_DTR,
  73. GPIO41_FFUART_RTS,
  74. GPIO39_FFUART_TXD,
  75. GPIO37_FFUART_DSR,
  76. GPIO34_FFUART_RXD,
  77. GPIO35_FFUART_CTS,
  78. /* PC Card */
  79. GPIO48_nPOE,
  80. GPIO49_nPWE,
  81. GPIO50_nPIOR,
  82. GPIO51_nPIOW,
  83. GPIO52_nPCE_1,
  84. GPIO53_nPCE_2,
  85. GPIO54_nPSKTSEL,
  86. GPIO55_nPREG,
  87. GPIO56_nPWAIT,
  88. GPIO57_nIOIS16,
  89. /* MMC */
  90. GPIO6_MMC_CLK,
  91. GPIO8_MMC_CS0,
  92. /* GPIO */
  93. GPIO9_GPIO, /* CORGI_GPIO_nSD_DETECT */
  94. GPIO7_GPIO, /* CORGI_GPIO_nSD_WP */
  95. GPIO33_GPIO, /* CORGI_GPIO_SD_PWR */
  96. GPIO22_GPIO, /* CORGI_GPIO_IR_ON */
  97. GPIO44_GPIO, /* CORGI_GPIO_HSYNC */
  98. GPIO1_GPIO | WAKEUP_ON_EDGE_RISE,
  99. };
  100. /*
  101. * Corgi SCOOP Device
  102. */
  103. static struct resource corgi_scoop_resources[] = {
  104. [0] = {
  105. .start = 0x10800000,
  106. .end = 0x10800fff,
  107. .flags = IORESOURCE_MEM,
  108. },
  109. };
  110. static struct scoop_config corgi_scoop_setup = {
  111. .io_dir = CORGI_SCOOP_IO_DIR,
  112. .io_out = CORGI_SCOOP_IO_OUT,
  113. .gpio_base = CORGI_SCOOP_GPIO_BASE,
  114. };
  115. struct platform_device corgiscoop_device = {
  116. .name = "sharp-scoop",
  117. .id = -1,
  118. .dev = {
  119. .platform_data = &corgi_scoop_setup,
  120. },
  121. .num_resources = ARRAY_SIZE(corgi_scoop_resources),
  122. .resource = corgi_scoop_resources,
  123. };
  124. static struct scoop_pcmcia_dev corgi_pcmcia_scoop[] = {
  125. {
  126. .dev = &corgiscoop_device.dev,
  127. .irq = CORGI_IRQ_GPIO_CF_IRQ,
  128. .cd_irq = CORGI_IRQ_GPIO_CF_CD,
  129. .cd_irq_str = "PCMCIA0 CD",
  130. },
  131. };
  132. static struct scoop_pcmcia_config corgi_pcmcia_config = {
  133. .devs = &corgi_pcmcia_scoop[0],
  134. .num_devs = 1,
  135. };
  136. EXPORT_SYMBOL(corgiscoop_device);
  137. static struct w100_mem_info corgi_fb_mem = {
  138. .ext_cntl = 0x00040003,
  139. .sdram_mode_reg = 0x00650021,
  140. .ext_timing_cntl = 0x10002a4a,
  141. .io_cntl = 0x7ff87012,
  142. .size = 0x1fffff,
  143. };
  144. static struct w100_gen_regs corgi_fb_regs = {
  145. .lcd_format = 0x00000003,
  146. .lcdd_cntl1 = 0x01CC0000,
  147. .lcdd_cntl2 = 0x0003FFFF,
  148. .genlcd_cntl1 = 0x00FFFF0D,
  149. .genlcd_cntl2 = 0x003F3003,
  150. .genlcd_cntl3 = 0x000102aa,
  151. };
  152. static struct w100_gpio_regs corgi_fb_gpio = {
  153. .init_data1 = 0x000000bf,
  154. .init_data2 = 0x00000000,
  155. .gpio_dir1 = 0x00000000,
  156. .gpio_oe1 = 0x03c0feff,
  157. .gpio_dir2 = 0x00000000,
  158. .gpio_oe2 = 0x00000000,
  159. };
  160. static struct w100_mode corgi_fb_modes[] = {
  161. {
  162. .xres = 480,
  163. .yres = 640,
  164. .left_margin = 0x56,
  165. .right_margin = 0x55,
  166. .upper_margin = 0x03,
  167. .lower_margin = 0x00,
  168. .crtc_ss = 0x82360056,
  169. .crtc_ls = 0xA0280000,
  170. .crtc_gs = 0x80280028,
  171. .crtc_vpos_gs = 0x02830002,
  172. .crtc_rev = 0x00400008,
  173. .crtc_dclk = 0xA0000000,
  174. .crtc_gclk = 0x8015010F,
  175. .crtc_goe = 0x80100110,
  176. .crtc_ps1_active = 0x41060010,
  177. .pll_freq = 75,
  178. .fast_pll_freq = 100,
  179. .sysclk_src = CLK_SRC_PLL,
  180. .sysclk_divider = 0,
  181. .pixclk_src = CLK_SRC_PLL,
  182. .pixclk_divider = 2,
  183. .pixclk_divider_rotated = 6,
  184. },{
  185. .xres = 240,
  186. .yres = 320,
  187. .left_margin = 0x27,
  188. .right_margin = 0x2e,
  189. .upper_margin = 0x01,
  190. .lower_margin = 0x00,
  191. .crtc_ss = 0x81170027,
  192. .crtc_ls = 0xA0140000,
  193. .crtc_gs = 0xC0140014,
  194. .crtc_vpos_gs = 0x00010141,
  195. .crtc_rev = 0x00400008,
  196. .crtc_dclk = 0xA0000000,
  197. .crtc_gclk = 0x8015010F,
  198. .crtc_goe = 0x80100110,
  199. .crtc_ps1_active = 0x41060010,
  200. .pll_freq = 0,
  201. .fast_pll_freq = 0,
  202. .sysclk_src = CLK_SRC_XTAL,
  203. .sysclk_divider = 0,
  204. .pixclk_src = CLK_SRC_XTAL,
  205. .pixclk_divider = 1,
  206. .pixclk_divider_rotated = 1,
  207. },
  208. };
  209. static struct w100fb_mach_info corgi_fb_info = {
  210. .init_mode = INIT_MODE_ROTATED,
  211. .mem = &corgi_fb_mem,
  212. .regs = &corgi_fb_regs,
  213. .modelist = &corgi_fb_modes[0],
  214. .num_modes = 2,
  215. .gpio = &corgi_fb_gpio,
  216. .xtal_freq = 12500000,
  217. .xtal_dbl = 0,
  218. };
  219. static struct resource corgi_fb_resources[] = {
  220. [0] = {
  221. .start = 0x08000000,
  222. .end = 0x08ffffff,
  223. .flags = IORESOURCE_MEM,
  224. },
  225. };
  226. static struct platform_device corgifb_device = {
  227. .name = "w100fb",
  228. .id = -1,
  229. .num_resources = ARRAY_SIZE(corgi_fb_resources),
  230. .resource = corgi_fb_resources,
  231. .dev = {
  232. .platform_data = &corgi_fb_info,
  233. },
  234. };
  235. /*
  236. * Corgi Keyboard Device
  237. */
  238. static struct platform_device corgikbd_device = {
  239. .name = "corgi-keyboard",
  240. .id = -1,
  241. };
  242. /*
  243. * Corgi LEDs
  244. */
  245. static struct gpio_led corgi_gpio_leds[] = {
  246. {
  247. .name = "corgi:amber:charge",
  248. .default_trigger = "sharpsl-charge",
  249. .gpio = CORGI_GPIO_LED_ORANGE,
  250. },
  251. {
  252. .name = "corgi:green:mail",
  253. .default_trigger = "nand-disk",
  254. .gpio = CORGI_GPIO_LED_GREEN,
  255. },
  256. };
  257. static struct gpio_led_platform_data corgi_gpio_leds_info = {
  258. .leds = corgi_gpio_leds,
  259. .num_leds = ARRAY_SIZE(corgi_gpio_leds),
  260. };
  261. static struct platform_device corgiled_device = {
  262. .name = "leds-gpio",
  263. .id = -1,
  264. .dev = {
  265. .platform_data = &corgi_gpio_leds_info,
  266. },
  267. };
  268. /*
  269. * MMC/SD Device
  270. *
  271. * The card detect interrupt isn't debounced so we delay it by 250ms
  272. * to give the card a chance to fully insert/eject.
  273. */
  274. static struct pxamci_platform_data corgi_mci_platform_data;
  275. static int corgi_mci_init(struct device *dev, irq_handler_t corgi_detect_int, void *data)
  276. {
  277. int err;
  278. err = gpio_request(CORGI_GPIO_nSD_DETECT, "nSD_DETECT");
  279. if (err)
  280. goto err_out;
  281. err = gpio_request(CORGI_GPIO_nSD_WP, "nSD_WP");
  282. if (err)
  283. goto err_free_1;
  284. err = gpio_request(CORGI_GPIO_SD_PWR, "SD_PWR");
  285. if (err)
  286. goto err_free_2;
  287. gpio_direction_input(CORGI_GPIO_nSD_DETECT);
  288. gpio_direction_input(CORGI_GPIO_nSD_WP);
  289. gpio_direction_output(CORGI_GPIO_SD_PWR, 0);
  290. corgi_mci_platform_data.detect_delay = msecs_to_jiffies(250);
  291. err = request_irq(CORGI_IRQ_GPIO_nSD_DETECT, corgi_detect_int,
  292. IRQF_DISABLED | IRQF_TRIGGER_RISING |
  293. IRQF_TRIGGER_FALLING,
  294. "MMC card detect", data);
  295. if (err) {
  296. pr_err("%s: MMC/SD: can't request MMC card detect IRQ\n",
  297. __func__);
  298. goto err_free_3;
  299. }
  300. return 0;
  301. err_free_3:
  302. gpio_free(CORGI_GPIO_SD_PWR);
  303. err_free_2:
  304. gpio_free(CORGI_GPIO_nSD_WP);
  305. err_free_1:
  306. gpio_free(CORGI_GPIO_nSD_DETECT);
  307. err_out:
  308. return err;
  309. }
  310. static void corgi_mci_setpower(struct device *dev, unsigned int vdd)
  311. {
  312. struct pxamci_platform_data* p_d = dev->platform_data;
  313. gpio_set_value(CORGI_GPIO_SD_PWR, ((1 << vdd) & p_d->ocr_mask));
  314. }
  315. static int corgi_mci_get_ro(struct device *dev)
  316. {
  317. return gpio_get_value(CORGI_GPIO_nSD_WP);
  318. }
  319. static void corgi_mci_exit(struct device *dev, void *data)
  320. {
  321. free_irq(CORGI_IRQ_GPIO_nSD_DETECT, data);
  322. gpio_free(CORGI_GPIO_SD_PWR);
  323. gpio_free(CORGI_GPIO_nSD_WP);
  324. gpio_free(CORGI_GPIO_nSD_DETECT);
  325. }
  326. static struct pxamci_platform_data corgi_mci_platform_data = {
  327. .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
  328. .init = corgi_mci_init,
  329. .get_ro = corgi_mci_get_ro,
  330. .setpower = corgi_mci_setpower,
  331. .exit = corgi_mci_exit,
  332. };
  333. /*
  334. * Irda
  335. */
  336. static void corgi_irda_transceiver_mode(struct device *dev, int mode)
  337. {
  338. gpio_set_value(CORGI_GPIO_IR_ON, mode & IR_OFF);
  339. pxa2xx_transceiver_mode(dev, mode);
  340. }
  341. static int corgi_irda_startup(struct device *dev)
  342. {
  343. int err;
  344. err = gpio_request(CORGI_GPIO_IR_ON, "IR_ON");
  345. if (err)
  346. return err;
  347. gpio_direction_output(CORGI_GPIO_IR_ON, 1);
  348. return 0;
  349. }
  350. static void corgi_irda_shutdown(struct device *dev)
  351. {
  352. gpio_free(CORGI_GPIO_IR_ON);
  353. }
  354. static struct pxaficp_platform_data corgi_ficp_platform_data = {
  355. .transceiver_cap = IR_SIRMODE | IR_OFF,
  356. .transceiver_mode = corgi_irda_transceiver_mode,
  357. .startup = corgi_irda_startup,
  358. .shutdown = corgi_irda_shutdown,
  359. };
  360. /*
  361. * USB Device Controller
  362. */
  363. static struct pxa2xx_udc_mach_info udc_info __initdata = {
  364. /* no connect GPIO; corgi can't tell connection status */
  365. .gpio_pullup = CORGI_GPIO_USB_PULLUP,
  366. };
  367. #if defined(CONFIG_SPI_PXA2XX) || defined(CONFIG_SPI_PXA2XX_MASTER)
  368. static struct pxa2xx_spi_master corgi_spi_info = {
  369. .num_chipselect = 3,
  370. };
  371. static void corgi_wait_for_hsync(void)
  372. {
  373. while (gpio_get_value(CORGI_GPIO_HSYNC))
  374. cpu_relax();
  375. while (!gpio_get_value(CORGI_GPIO_HSYNC))
  376. cpu_relax();
  377. }
  378. static struct ads7846_platform_data corgi_ads7846_info = {
  379. .model = 7846,
  380. .vref_delay_usecs = 100,
  381. .x_plate_ohms = 419,
  382. .y_plate_ohms = 486,
  383. .gpio_pendown = CORGI_GPIO_TP_INT,
  384. .wait_for_sync = corgi_wait_for_hsync,
  385. };
  386. static struct pxa2xx_spi_chip corgi_ads7846_chip = {
  387. .gpio_cs = CORGI_GPIO_ADS7846_CS,
  388. };
  389. static void corgi_bl_kick_battery(void)
  390. {
  391. void (*kick_batt)(void);
  392. kick_batt = symbol_get(sharpsl_battery_kick);
  393. if (kick_batt) {
  394. kick_batt();
  395. symbol_put(sharpsl_battery_kick);
  396. }
  397. }
  398. static struct corgi_lcd_platform_data corgi_lcdcon_info = {
  399. .init_mode = CORGI_LCD_MODE_VGA,
  400. .max_intensity = 0x2f,
  401. .default_intensity = 0x1f,
  402. .limit_mask = 0x0b,
  403. .gpio_backlight_cont = CORGI_GPIO_BACKLIGHT_CONT,
  404. .gpio_backlight_on = -1,
  405. .kick_battery = corgi_bl_kick_battery,
  406. };
  407. static struct pxa2xx_spi_chip corgi_lcdcon_chip = {
  408. .gpio_cs = CORGI_GPIO_LCDCON_CS,
  409. };
  410. static struct pxa2xx_spi_chip corgi_max1111_chip = {
  411. .gpio_cs = CORGI_GPIO_MAX1111_CS,
  412. };
  413. static struct spi_board_info corgi_spi_devices[] = {
  414. {
  415. .modalias = "ads7846",
  416. .max_speed_hz = 1200000,
  417. .bus_num = 1,
  418. .chip_select = 0,
  419. .platform_data = &corgi_ads7846_info,
  420. .controller_data= &corgi_ads7846_chip,
  421. .irq = gpio_to_irq(CORGI_GPIO_TP_INT),
  422. }, {
  423. .modalias = "corgi-lcd",
  424. .max_speed_hz = 50000,
  425. .bus_num = 1,
  426. .chip_select = 1,
  427. .platform_data = &corgi_lcdcon_info,
  428. .controller_data= &corgi_lcdcon_chip,
  429. }, {
  430. .modalias = "max1111",
  431. .max_speed_hz = 450000,
  432. .bus_num = 1,
  433. .chip_select = 2,
  434. .controller_data= &corgi_max1111_chip,
  435. },
  436. };
  437. static void __init corgi_init_spi(void)
  438. {
  439. pxa2xx_set_spi_info(1, &corgi_spi_info);
  440. spi_register_board_info(ARRAY_AND_SIZE(corgi_spi_devices));
  441. }
  442. #else
  443. static inline void corgi_init_spi(void) {}
  444. #endif
  445. static struct mtd_partition sharpsl_nand_partitions[] = {
  446. {
  447. .name = "System Area",
  448. .offset = 0,
  449. .size = 7 * 1024 * 1024,
  450. },
  451. {
  452. .name = "Root Filesystem",
  453. .offset = 7 * 1024 * 1024,
  454. .size = 25 * 1024 * 1024,
  455. },
  456. {
  457. .name = "Home Filesystem",
  458. .offset = MTDPART_OFS_APPEND,
  459. .size = MTDPART_SIZ_FULL,
  460. },
  461. };
  462. static uint8_t scan_ff_pattern[] = { 0xff, 0xff };
  463. static struct nand_bbt_descr sharpsl_bbt = {
  464. .options = 0,
  465. .offs = 4,
  466. .len = 2,
  467. .pattern = scan_ff_pattern
  468. };
  469. static struct sharpsl_nand_platform_data sharpsl_nand_platform_data = {
  470. .badblock_pattern = &sharpsl_bbt,
  471. .partitions = sharpsl_nand_partitions,
  472. .nr_partitions = ARRAY_SIZE(sharpsl_nand_partitions),
  473. };
  474. static struct resource sharpsl_nand_resources[] = {
  475. {
  476. .start = 0x0C000000,
  477. .end = 0x0C000FFF,
  478. .flags = IORESOURCE_MEM,
  479. },
  480. };
  481. static struct platform_device sharpsl_nand_device = {
  482. .name = "sharpsl-nand",
  483. .id = -1,
  484. .resource = sharpsl_nand_resources,
  485. .num_resources = ARRAY_SIZE(sharpsl_nand_resources),
  486. .dev.platform_data = &sharpsl_nand_platform_data,
  487. };
  488. static struct mtd_partition sharpsl_rom_parts[] = {
  489. {
  490. .name ="Boot PROM Filesystem",
  491. .offset = 0x00120000,
  492. .size = MTDPART_SIZ_FULL,
  493. },
  494. };
  495. static struct physmap_flash_data sharpsl_rom_data = {
  496. .width = 2,
  497. .nr_parts = ARRAY_SIZE(sharpsl_rom_parts),
  498. .parts = sharpsl_rom_parts,
  499. };
  500. static struct resource sharpsl_rom_resources[] = {
  501. {
  502. .start = 0x00000000,
  503. .end = 0x007fffff,
  504. .flags = IORESOURCE_MEM,
  505. },
  506. };
  507. static struct platform_device sharpsl_rom_device = {
  508. .name = "physmap-flash",
  509. .id = -1,
  510. .resource = sharpsl_rom_resources,
  511. .num_resources = ARRAY_SIZE(sharpsl_rom_resources),
  512. .dev.platform_data = &sharpsl_rom_data,
  513. };
  514. static struct platform_device *devices[] __initdata = {
  515. &corgiscoop_device,
  516. &corgifb_device,
  517. &corgikbd_device,
  518. &corgiled_device,
  519. &sharpsl_nand_device,
  520. &sharpsl_rom_device,
  521. };
  522. static void corgi_poweroff(void)
  523. {
  524. if (!machine_is_corgi())
  525. /* Green LED off tells the bootloader to halt */
  526. gpio_set_value(CORGI_GPIO_LED_GREEN, 0);
  527. arm_machine_restart('h', NULL);
  528. }
  529. static void corgi_restart(char mode, const char *cmd)
  530. {
  531. if (!machine_is_corgi())
  532. /* Green LED on tells the bootloader to reboot */
  533. gpio_set_value(CORGI_GPIO_LED_GREEN, 1);
  534. arm_machine_restart('h', cmd);
  535. }
  536. static void __init corgi_init(void)
  537. {
  538. pm_power_off = corgi_poweroff;
  539. arm_pm_restart = corgi_restart;
  540. /* Stop 3.6MHz and drive HIGH to PCMCIA and CS */
  541. PCFR |= PCFR_OPDE;
  542. pxa2xx_mfp_config(ARRAY_AND_SIZE(corgi_pin_config));
  543. corgi_init_spi();
  544. pxa_set_udc_info(&udc_info);
  545. pxa_set_mci_info(&corgi_mci_platform_data);
  546. pxa_set_ficp_info(&corgi_ficp_platform_data);
  547. pxa_set_i2c_info(NULL);
  548. platform_scoop_config = &corgi_pcmcia_config;
  549. if (machine_is_husky())
  550. sharpsl_nand_partitions[1].size = 53 * 1024 * 1024;
  551. platform_add_devices(devices, ARRAY_SIZE(devices));
  552. }
  553. static void __init fixup_corgi(struct machine_desc *desc,
  554. struct tag *tags, char **cmdline, struct meminfo *mi)
  555. {
  556. sharpsl_save_param();
  557. mi->nr_banks=1;
  558. mi->bank[0].start = 0xa0000000;
  559. mi->bank[0].node = 0;
  560. if (machine_is_corgi())
  561. mi->bank[0].size = (32*1024*1024);
  562. else
  563. mi->bank[0].size = (64*1024*1024);
  564. }
  565. #ifdef CONFIG_MACH_CORGI
  566. MACHINE_START(CORGI, "SHARP Corgi")
  567. .phys_io = 0x40000000,
  568. .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
  569. .fixup = fixup_corgi,
  570. .map_io = pxa_map_io,
  571. .init_irq = pxa25x_init_irq,
  572. .init_machine = corgi_init,
  573. .timer = &pxa_timer,
  574. MACHINE_END
  575. #endif
  576. #ifdef CONFIG_MACH_SHEPHERD
  577. MACHINE_START(SHEPHERD, "SHARP Shepherd")
  578. .phys_io = 0x40000000,
  579. .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
  580. .fixup = fixup_corgi,
  581. .map_io = pxa_map_io,
  582. .init_irq = pxa25x_init_irq,
  583. .init_machine = corgi_init,
  584. .timer = &pxa_timer,
  585. MACHINE_END
  586. #endif
  587. #ifdef CONFIG_MACH_HUSKY
  588. MACHINE_START(HUSKY, "SHARP Husky")
  589. .phys_io = 0x40000000,
  590. .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
  591. .fixup = fixup_corgi,
  592. .map_io = pxa_map_io,
  593. .init_irq = pxa25x_init_irq,
  594. .init_machine = corgi_init,
  595. .timer = &pxa_timer,
  596. MACHINE_END
  597. #endif