2 * Support for Sharp SL-C6000x PDAs
5 * Copyright (c) 2005 Dirk Opfer
7 * Based on code written by Sharp/Lineo for 2.4 kernels
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.
15 #include <linux/clkdev.h>
16 #include <linux/kernel.h>
17 #include <linux/init.h>
18 #include <linux/platform_device.h>
19 #include <linux/major.h>
21 #include <linux/interrupt.h>
22 #include <linux/delay.h>
24 #include <linux/mmc/host.h>
25 #include <linux/mfd/tc6393xb.h>
26 #include <linux/mfd/tmio.h>
27 #include <linux/mtd/rawnand.h>
28 #include <linux/mtd/partitions.h>
29 #include <linux/mtd/physmap.h>
31 #include <linux/gpio_keys.h>
32 #include <linux/input.h>
33 #include <linux/gpio.h>
34 #include <linux/gpio/machine.h>
35 #include <linux/power/gpio-charger.h>
36 #include <linux/spi/spi.h>
37 #include <linux/spi/pxa2xx_spi.h>
38 #include <linux/input/matrix_keypad.h>
39 #include <linux/platform_data/i2c-pxa.h>
40 #include <linux/usb/gpio_vbus.h>
41 #include <linux/reboot.h>
42 #include <linux/memblock.h>
44 #include <asm/setup.h>
45 #include <asm/mach-types.h>
48 #include <mach/reset.h>
49 #include <linux/platform_data/irda-pxaficp.h>
50 #include <linux/platform_data/mmc-pxamci.h>
53 #include <mach/audio.h>
54 #include <mach/smemc.h>
56 #include <asm/mach/arch.h>
57 #include <mach/tosa.h>
59 #include <asm/hardware/scoop.h>
60 #include <asm/mach/sharpsl_param.h>
65 static unsigned long tosa_pin_config[] = {
66 GPIO78_nCS_2, /* Scoop */
67 GPIO80_nCS_4, /* tg6393xb */
68 GPIO33_nCS_5, /* Scoop */
70 // GPIO76 CARD_VCC_ON1
72 GPIO19_GPIO, /* Reset out */
73 GPIO1_RST | WAKEUP_ON_EDGE_FALL,
75 GPIO0_GPIO | WAKEUP_ON_EDGE_FALL, /* WAKE_UP */
76 GPIO2_GPIO | WAKEUP_ON_EDGE_BOTH, /* AC_IN */
77 GPIO3_GPIO | WAKEUP_ON_EDGE_FALL, /* RECORD */
78 GPIO4_GPIO | WAKEUP_ON_EDGE_FALL, /* SYNC */
79 GPIO20_GPIO, /* EAR_IN */
82 GPIO5_GPIO, /* USB_IN */
83 GPIO32_GPIO, /* Pen IRQ */
85 GPIO7_GPIO, /* Jacket Detect */
86 GPIO14_GPIO, /* BAT0_CRG */
87 GPIO12_GPIO, /* BAT1_CRG */
88 GPIO17_GPIO, /* BAT0_LOW */
89 GPIO84_GPIO, /* BAT1_LOW */
90 GPIO38_GPIO, /* BAT_LOCK */
93 GPIO15_GPIO, /* TC6393XB IRQ */
95 GPIO27_GPIO, /* LCD Sync */
100 GPIO9_GPIO, /* Detect */
101 GPIO10_GPIO, /* nSD_INT */
104 GPIO13_GPIO, /* CD_IRQ */
105 GPIO21_GPIO, /* Main Slot IRQ */
106 GPIO36_GPIO, /* Jacket Slot IRQ */
120 GPIO30_AC97_SDATA_OUT,
122 GPIO29_AC97_SDATA_IN_0,
140 GPIO58_GPIO | MFP_LPM_DRIVE_LOW, /* Column 0 */
141 GPIO59_GPIO | MFP_LPM_DRIVE_LOW, /* Column 1 */
142 GPIO60_GPIO | MFP_LPM_DRIVE_LOW, /* Column 2 */
143 GPIO61_GPIO | MFP_LPM_DRIVE_LOW, /* Column 3 */
144 GPIO62_GPIO | MFP_LPM_DRIVE_LOW, /* Column 4 */
145 GPIO63_GPIO | MFP_LPM_DRIVE_LOW, /* Column 5 */
146 GPIO64_GPIO | MFP_LPM_DRIVE_LOW, /* Column 6 */
147 GPIO65_GPIO | MFP_LPM_DRIVE_LOW, /* Column 7 */
148 GPIO66_GPIO | MFP_LPM_DRIVE_LOW, /* Column 8 */
149 GPIO67_GPIO | MFP_LPM_DRIVE_LOW, /* Column 9 */
150 GPIO68_GPIO | MFP_LPM_DRIVE_LOW, /* Column 10 */
151 GPIO69_GPIO | MFP_LPM_DRIVE_LOW, /* Row 0 */
152 GPIO70_GPIO | MFP_LPM_DRIVE_LOW, /* Row 1 */
153 GPIO71_GPIO | MFP_LPM_DRIVE_LOW, /* Row 2 */
154 GPIO72_GPIO | MFP_LPM_DRIVE_LOW, /* Row 3 */
155 GPIO73_GPIO | MFP_LPM_DRIVE_LOW, /* Row 4 */
156 GPIO74_GPIO | MFP_LPM_DRIVE_LOW, /* Row 5 */
157 GPIO75_GPIO | MFP_LPM_DRIVE_LOW, /* Row 6 */
164 /* IrDA is managed in other way */
172 static struct resource tosa_scoop_resources[] = {
174 .start = TOSA_CF_PHYS,
175 .end = TOSA_CF_PHYS + 0xfff,
176 .flags = IORESOURCE_MEM,
180 static struct scoop_config tosa_scoop_setup = {
181 .io_dir = TOSA_SCOOP_IO_DIR,
182 .gpio_base = TOSA_SCOOP_GPIO_BASE,
185 static struct platform_device tosascoop_device = {
186 .name = "sharp-scoop",
189 .platform_data = &tosa_scoop_setup,
191 .num_resources = ARRAY_SIZE(tosa_scoop_resources),
192 .resource = tosa_scoop_resources,
197 * SCOOP Device Jacket
199 static struct resource tosa_scoop_jc_resources[] = {
201 .start = TOSA_SCOOP_PHYS + 0x40,
202 .end = TOSA_SCOOP_PHYS + 0xfff,
203 .flags = IORESOURCE_MEM,
207 static struct scoop_config tosa_scoop_jc_setup = {
208 .io_dir = TOSA_SCOOP_JC_IO_DIR,
209 .gpio_base = TOSA_SCOOP_JC_GPIO_BASE,
212 static struct platform_device tosascoop_jc_device = {
213 .name = "sharp-scoop",
216 .platform_data = &tosa_scoop_jc_setup,
217 .parent = &tosascoop_device.dev,
219 .num_resources = ARRAY_SIZE(tosa_scoop_jc_resources),
220 .resource = tosa_scoop_jc_resources,
226 static struct scoop_pcmcia_dev tosa_pcmcia_scoop[] = {
228 .dev = &tosascoop_device.dev,
229 .irq = TOSA_IRQ_GPIO_CF_IRQ,
230 .cd_irq = TOSA_IRQ_GPIO_CF_CD,
231 .cd_irq_str = "PCMCIA0 CD",
233 .dev = &tosascoop_jc_device.dev,
234 .irq = TOSA_IRQ_GPIO_JC_CF_IRQ,
239 static struct scoop_pcmcia_config tosa_pcmcia_config = {
240 .devs = &tosa_pcmcia_scoop[0],
245 * USB Device Controller
247 static struct gpio_vbus_mach_info tosa_udc_info = {
248 .gpio_pullup = TOSA_GPIO_USB_PULLUP,
249 .gpio_vbus = TOSA_GPIO_USB_IN,
250 .gpio_vbus_inverted = 1,
253 static struct platform_device tosa_gpio_vbus = {
257 .platform_data = &tosa_udc_info,
264 static int tosa_mci_init(struct device *dev, irq_handler_t tosa_detect_int, void *data)
268 err = gpio_request(TOSA_GPIO_nSD_INT, "SD Int");
270 printk(KERN_ERR "tosa_mci_init: can't request SD_PWR gpio\n");
273 err = gpio_direction_input(TOSA_GPIO_nSD_INT);
275 goto err_gpio_int_dir;
280 gpio_free(TOSA_GPIO_nSD_INT);
285 static void tosa_mci_exit(struct device *dev, void *data)
287 gpio_free(TOSA_GPIO_nSD_INT);
290 static struct pxamci_platform_data tosa_mci_platform_data = {
291 .detect_delay_ms = 250,
292 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
293 .init = tosa_mci_init,
294 .exit = tosa_mci_exit,
297 static struct gpiod_lookup_table tosa_mci_gpio_table = {
298 .dev_id = "pxa2xx-mci.0",
300 GPIO_LOOKUP("gpio-pxa", TOSA_GPIO_nSD_DETECT,
301 "cd", GPIO_ACTIVE_LOW),
302 GPIO_LOOKUP("gpio-pxa", TOSA_GPIO_SD_WP,
303 "wp", GPIO_ACTIVE_LOW),
304 GPIO_LOOKUP("gpio-pxa", TOSA_GPIO_PWR_ON,
305 "power", GPIO_ACTIVE_HIGH),
313 static void tosa_irda_transceiver_mode(struct device *dev, int mode)
316 gpio_set_value(TOSA_GPIO_IR_POWERDWN, 0);
317 pxa2xx_transceiver_mode(dev, mode);
318 gpio_direction_output(TOSA_GPIO_IRDA_TX, 0);
320 pxa2xx_transceiver_mode(dev, mode);
321 gpio_set_value(TOSA_GPIO_IR_POWERDWN, 1);
325 static int tosa_irda_startup(struct device *dev)
329 ret = gpio_request(TOSA_GPIO_IRDA_TX, "IrDA TX");
332 ret = gpio_direction_output(TOSA_GPIO_IRDA_TX, 0);
336 ret = gpio_request(TOSA_GPIO_IR_POWERDWN, "IrDA powerdown");
340 ret = gpio_direction_output(TOSA_GPIO_IR_POWERDWN, 0);
344 tosa_irda_transceiver_mode(dev, IR_SIRMODE | IR_OFF);
349 gpio_free(TOSA_GPIO_IR_POWERDWN);
352 gpio_free(TOSA_GPIO_IRDA_TX);
357 static void tosa_irda_shutdown(struct device *dev)
359 tosa_irda_transceiver_mode(dev, IR_SIRMODE | IR_OFF);
360 gpio_free(TOSA_GPIO_IR_POWERDWN);
361 gpio_free(TOSA_GPIO_IRDA_TX);
364 static struct pxaficp_platform_data tosa_ficp_platform_data = {
366 .transceiver_cap = IR_SIRMODE | IR_OFF,
367 .transceiver_mode = tosa_irda_transceiver_mode,
368 .startup = tosa_irda_startup,
369 .shutdown = tosa_irda_shutdown,
375 static char *tosa_ac_supplied_to[] = {
381 static struct gpio_charger_platform_data tosa_power_data = {
383 .type = POWER_SUPPLY_TYPE_MAINS,
384 .gpio = TOSA_GPIO_AC_IN,
385 .gpio_active_low = 1,
386 .supplied_to = tosa_ac_supplied_to,
387 .num_supplicants = ARRAY_SIZE(tosa_ac_supplied_to),
390 static struct resource tosa_power_resource[] = {
393 .start = PXA_GPIO_TO_IRQ(TOSA_GPIO_AC_IN),
394 .end = PXA_GPIO_TO_IRQ(TOSA_GPIO_AC_IN),
395 .flags = IORESOURCE_IRQ |
396 IORESOURCE_IRQ_HIGHEDGE |
397 IORESOURCE_IRQ_LOWEDGE,
401 static struct platform_device tosa_power_device = {
402 .name = "gpio-charger",
404 .dev.platform_data = &tosa_power_data,
405 .resource = tosa_power_resource,
406 .num_resources = ARRAY_SIZE(tosa_power_resource),
412 static const uint32_t tosakbd_keymap[] = {
415 KEY(0, 6, KEY_BACKSPACE),
423 KEY(1, 7, KEY_COMMA),
429 KEY(2, 6, KEY_ENTER),
435 KEY(3, 4, TOSA_KEY_ADDRESSBOOK),
436 KEY(3, 5, TOSA_KEY_CANCEL),
437 KEY(3, 6, TOSA_KEY_CENTER),
438 KEY(3, 7, TOSA_KEY_OK),
439 KEY(3, 8, KEY_LEFTSHIFT),
444 KEY(4, 4, TOSA_KEY_CALENDAR),
445 KEY(4, 5, TOSA_KEY_HOMEPAGE),
446 KEY(4, 6, KEY_LEFTCTRL),
447 KEY(4, 7, TOSA_KEY_LIGHT),
448 KEY(4, 9, KEY_RIGHTSHIFT),
450 KEY(5, 1, KEY_SLASH),
453 KEY(5, 4, TOSA_KEY_MENU),
455 KEY(5, 10, TOSA_KEY_FN),
458 KEY(6, 2, KEY_SPACE),
459 KEY(6, 3, KEY_APOSTROPHE),
460 KEY(6, 4, TOSA_KEY_MAIL),
463 KEY(6, 7, KEY_RIGHT),
466 static struct matrix_keymap_data tosakbd_keymap_data = {
467 .keymap = tosakbd_keymap,
468 .keymap_size = ARRAY_SIZE(tosakbd_keymap),
471 static const int tosakbd_col_gpios[] =
472 { 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68 };
473 static const int tosakbd_row_gpios[] =
474 { 69, 70, 71, 72, 73, 74, 75 };
476 static struct matrix_keypad_platform_data tosakbd_pdata = {
477 .keymap_data = &tosakbd_keymap_data,
478 .row_gpios = tosakbd_row_gpios,
479 .col_gpios = tosakbd_col_gpios,
480 .num_row_gpios = ARRAY_SIZE(tosakbd_row_gpios),
481 .num_col_gpios = ARRAY_SIZE(tosakbd_col_gpios),
482 .col_scan_delay_us = 10,
487 static struct platform_device tosakbd_device = {
488 .name = "matrix-keypad",
491 .platform_data = &tosakbd_pdata,
495 static struct gpio_keys_button tosa_gpio_keys[] = {
497 * Two following keys are directly tied to "ON" button of tosa. Why?
498 * The first one can be used as a wakeup source, the second can't;
499 * also the first one is OR of ac_powered and on_button.
503 .code = KEY_RESERVED,
504 .gpio = TOSA_GPIO_POWERON,
512 .gpio = TOSA_GPIO_ON_KEY,
515 * can't be used as wakeup
522 .code = TOSA_KEY_RECORD,
523 .gpio = TOSA_GPIO_RECORD_BTN,
524 .desc = "Record Button",
530 .code = TOSA_KEY_SYNC,
531 .gpio = TOSA_GPIO_SYNC,
532 .desc = "Sync Button",
538 .code = SW_HEADPHONE_INSERT,
539 .gpio = TOSA_GPIO_EAR_IN,
540 .desc = "HeadPhone insert",
542 .debounce_interval = 300,
546 static struct gpio_keys_platform_data tosa_gpio_keys_platform_data = {
547 .buttons = tosa_gpio_keys,
548 .nbuttons = ARRAY_SIZE(tosa_gpio_keys),
551 static struct platform_device tosa_gpio_keys_device = {
555 .platform_data = &tosa_gpio_keys_platform_data,
562 static struct gpio_led tosa_gpio_leds[] = {
564 .name = "tosa:amber:charge",
565 .default_trigger = "main-battery-charging",
566 .gpio = TOSA_GPIO_CHRG_ERR_LED,
569 .name = "tosa:green:mail",
570 .default_trigger = "nand-disk",
571 .gpio = TOSA_GPIO_NOTE_LED,
574 .name = "tosa:dual:wlan",
575 .default_trigger = "none",
576 .gpio = TOSA_GPIO_WLAN_LED,
579 .name = "tosa:blue:bluetooth",
580 .default_trigger = "tosa-bt",
581 .gpio = TOSA_GPIO_BT_LED,
585 static struct gpio_led_platform_data tosa_gpio_leds_platform_data = {
586 .leds = tosa_gpio_leds,
587 .num_leds = ARRAY_SIZE(tosa_gpio_leds),
590 static struct platform_device tosaled_device = {
594 .platform_data = &tosa_gpio_leds_platform_data,
599 * Toshiba Mobile IO Controller
601 static struct resource tc6393xb_resources[] = {
603 .start = TOSA_LCDC_PHYS,
604 .end = TOSA_LCDC_PHYS + 0x3ffffff,
605 .flags = IORESOURCE_MEM,
609 .start = TOSA_IRQ_GPIO_TC6393XB_INT,
610 .end = TOSA_IRQ_GPIO_TC6393XB_INT,
611 .flags = IORESOURCE_IRQ,
616 static int tosa_tc6393xb_enable(struct platform_device *dev)
620 rc = gpio_request(TOSA_GPIO_TC6393XB_REST_IN, "tc6393xb #pclr");
623 rc = gpio_request(TOSA_GPIO_TC6393XB_SUSPEND, "tc6393xb #suspend");
625 goto err_req_suspend;
626 rc = gpio_request(TOSA_GPIO_TC6393XB_L3V_ON, "tc6393xb l3v");
629 rc = gpio_direction_output(TOSA_GPIO_TC6393XB_L3V_ON, 0);
632 rc = gpio_direction_output(TOSA_GPIO_TC6393XB_SUSPEND, 0);
634 goto err_dir_suspend;
635 rc = gpio_direction_output(TOSA_GPIO_TC6393XB_REST_IN, 0);
641 gpio_set_value(TOSA_GPIO_TC6393XB_SUSPEND, 1);
645 gpio_set_value(TOSA_GPIO_TC6393XB_REST_IN, 1);
646 gpio_set_value(TOSA_GPIO_TC6393XB_L3V_ON, 1);
652 gpio_free(TOSA_GPIO_TC6393XB_L3V_ON);
654 gpio_free(TOSA_GPIO_TC6393XB_SUSPEND);
656 gpio_free(TOSA_GPIO_TC6393XB_REST_IN);
661 static int tosa_tc6393xb_disable(struct platform_device *dev)
663 gpio_free(TOSA_GPIO_TC6393XB_L3V_ON);
664 gpio_free(TOSA_GPIO_TC6393XB_SUSPEND);
665 gpio_free(TOSA_GPIO_TC6393XB_REST_IN);
670 static int tosa_tc6393xb_resume(struct platform_device *dev)
672 gpio_set_value(TOSA_GPIO_TC6393XB_SUSPEND, 1);
674 gpio_set_value(TOSA_GPIO_TC6393XB_L3V_ON, 1);
680 static int tosa_tc6393xb_suspend(struct platform_device *dev)
682 gpio_set_value(TOSA_GPIO_TC6393XB_L3V_ON, 0);
683 gpio_set_value(TOSA_GPIO_TC6393XB_SUSPEND, 0);
687 static uint8_t scan_ff_pattern[] = { 0xff, 0xff };
689 static struct nand_bbt_descr tosa_tc6393xb_nand_bbt = {
693 .pattern = scan_ff_pattern
696 static const char * const probes[] = {
703 static struct tmio_nand_data tosa_tc6393xb_nand_config = {
704 .badblock_pattern = &tosa_tc6393xb_nand_bbt,
705 .part_parsers = probes,
708 static int tosa_tc6393xb_setup(struct platform_device *dev)
712 rc = gpio_request(TOSA_GPIO_CARD_VCC_ON, "CARD_VCC_ON");
716 rc = gpio_direction_output(TOSA_GPIO_CARD_VCC_ON, 1);
723 gpio_free(TOSA_GPIO_CARD_VCC_ON);
728 static void tosa_tc6393xb_teardown(struct platform_device *dev)
730 gpio_free(TOSA_GPIO_CARD_VCC_ON);
733 #ifdef CONFIG_MFD_TC6393XB
734 static struct fb_videomode tosa_tc6393xb_lcd_mode[] = {
738 .pixclock = 0x002cdf00,/* PLL divisor */
739 .left_margin = 0x004c,
740 .right_margin = 0x005b,
741 .upper_margin = 0x0001,
742 .lower_margin = 0x000d,
745 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
746 .vmode = FB_VMODE_NONINTERLACED,
750 .pixclock = 0x00e7f203,/* PLL divisor */
751 .left_margin = 0x0024,
752 .right_margin = 0x002f,
753 .upper_margin = 0x0001,
754 .lower_margin = 0x000d,
757 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
758 .vmode = FB_VMODE_NONINTERLACED,
762 static struct tmio_fb_data tosa_tc6393xb_fb_config = {
763 .lcd_set_power = tc6393xb_lcd_set_power,
764 .lcd_mode = tc6393xb_lcd_mode,
765 .num_modes = ARRAY_SIZE(tosa_tc6393xb_lcd_mode),
766 .modes = &tosa_tc6393xb_lcd_mode[0],
772 static struct tc6393xb_platform_data tosa_tc6393xb_data = {
773 .scr_pll2cr = 0x0cc1,
776 .irq_base = IRQ_BOARD_START,
777 .gpio_base = TOSA_TC6393XB_GPIO_BASE,
778 .setup = tosa_tc6393xb_setup,
779 .teardown = tosa_tc6393xb_teardown,
781 .enable = tosa_tc6393xb_enable,
782 .disable = tosa_tc6393xb_disable,
783 .suspend = tosa_tc6393xb_suspend,
784 .resume = tosa_tc6393xb_resume,
786 .nand_data = &tosa_tc6393xb_nand_config,
787 #ifdef CONFIG_MFD_TC6393XB
788 .fb_data = &tosa_tc6393xb_fb_config,
795 static struct platform_device tc6393xb_device = {
799 .platform_data = &tosa_tc6393xb_data,
801 .num_resources = ARRAY_SIZE(tc6393xb_resources),
802 .resource = tc6393xb_resources,
805 static struct tosa_bt_data tosa_bt_data = {
806 .gpio_pwr = TOSA_GPIO_BT_PWR_EN,
807 .gpio_reset = TOSA_GPIO_BT_RESET,
810 static struct platform_device tosa_bt_device = {
813 .dev.platform_data = &tosa_bt_data,
816 static struct pxa2xx_spi_controller pxa_ssp_master_info = {
820 static struct spi_board_info spi_board_info[] __initdata = {
822 .modalias = "tosa-lcd",
824 .max_speed_hz = 28750,
831 static struct mtd_partition sharpsl_rom_parts[] = {
833 .name ="Boot PROM Filesystem",
834 .offset = 0x00160000,
835 .size = MTDPART_SIZ_FULL,
839 static struct physmap_flash_data sharpsl_rom_data = {
841 .nr_parts = ARRAY_SIZE(sharpsl_rom_parts),
842 .parts = sharpsl_rom_parts,
845 static struct resource sharpsl_rom_resources[] = {
849 .flags = IORESOURCE_MEM,
853 static struct platform_device sharpsl_rom_device = {
854 .name = "physmap-flash",
856 .resource = sharpsl_rom_resources,
857 .num_resources = ARRAY_SIZE(sharpsl_rom_resources),
858 .dev.platform_data = &sharpsl_rom_data,
861 static struct platform_device wm9712_device = {
862 .name = "wm9712-codec",
866 static struct platform_device tosa_audio_device = {
867 .name = "tosa-audio",
871 static struct platform_device *devices[] __initdata = {
873 &tosascoop_jc_device,
877 &tosa_gpio_keys_device,
886 static void tosa_poweroff(void)
888 pxa_restart(REBOOT_GPIO, NULL);
891 static void tosa_restart(enum reboot_mode mode, const char *cmd)
893 uint32_t msc0 = __raw_readl(MSC0);
895 /* Bootloader magic for a reboot */
896 if((msc0 & 0xffff0000) == 0x7ff00000)
897 __raw_writel((msc0 & 0xffff) | 0x7ee00000, MSC0);
902 static void __init tosa_init(void)
904 pxa2xx_mfp_config(ARRAY_AND_SIZE(tosa_pin_config));
906 pxa_set_ffuart_info(NULL);
907 pxa_set_btuart_info(NULL);
908 pxa_set_stuart_info(NULL);
910 gpio_set_wake(MFP_PIN_GPIO1, 1);
911 /* We can't pass to gpio-keys since it will drop the Reset altfunc */
913 init_gpio_reset(TOSA_GPIO_ON_RESET, 0, 0);
915 pm_power_off = tosa_poweroff;
919 /* enable batt_fault */
922 gpiod_add_lookup_table(&tosa_mci_gpio_table);
923 pxa_set_mci_info(&tosa_mci_platform_data);
924 pxa_set_ficp_info(&tosa_ficp_platform_data);
925 pxa_set_i2c_info(NULL);
926 pxa_set_ac97_info(NULL);
927 platform_scoop_config = &tosa_pcmcia_config;
929 pxa2xx_set_spi_info(2, &pxa_ssp_master_info);
930 spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
932 clk_add_alias("CLK_CK3P6MI", tc6393xb_device.name, "GPIO11_CLK", NULL);
934 platform_add_devices(devices, ARRAY_SIZE(devices));
937 static void __init fixup_tosa(struct tag *tags, char **cmdline)
939 sharpsl_save_param();
940 memblock_add(0xa0000000, SZ_64M);
943 MACHINE_START(TOSA, "SHARP Tosa")
945 .map_io = pxa25x_map_io,
946 .nr_irqs = TOSA_NR_IRQS,
947 .init_irq = pxa25x_init_irq,
948 .handle_irq = pxa25x_handle_irq,
949 .init_machine = tosa_init,
950 .init_time = pxa_timer_init,
951 .restart = tosa_restart,