1 // SPDX-License-Identifier: GPL-2.0-only
3 * Support for Sharp SL-C6000x PDAs
6 * Copyright (c) 2005 Dirk Opfer
8 * Based on code written by Sharp/Lineo for 2.4 kernels
11 #include <linux/clkdev.h>
12 #include <linux/kernel.h>
13 #include <linux/init.h>
14 #include <linux/platform_device.h>
15 #include <linux/major.h>
17 #include <linux/interrupt.h>
18 #include <linux/delay.h>
20 #include <linux/mmc/host.h>
21 #include <linux/mfd/tc6393xb.h>
22 #include <linux/mfd/tmio.h>
23 #include <linux/mtd/rawnand.h>
24 #include <linux/mtd/partitions.h>
25 #include <linux/mtd/physmap.h>
27 #include <linux/gpio_keys.h>
28 #include <linux/input.h>
29 #include <linux/gpio.h>
30 #include <linux/gpio/machine.h>
31 #include <linux/power/gpio-charger.h>
32 #include <linux/spi/spi.h>
33 #include <linux/spi/pxa2xx_spi.h>
34 #include <linux/input/matrix_keypad.h>
35 #include <linux/platform_data/i2c-pxa.h>
36 #include <linux/usb/gpio_vbus.h>
37 #include <linux/reboot.h>
38 #include <linux/memblock.h>
40 #include <asm/setup.h>
41 #include <asm/mach-types.h>
44 #include <mach/reset.h>
45 #include <linux/platform_data/irda-pxaficp.h>
46 #include <linux/platform_data/mmc-pxamci.h>
49 #include <mach/audio.h>
50 #include <mach/smemc.h>
52 #include <asm/mach/arch.h>
53 #include <mach/tosa.h>
55 #include <asm/hardware/scoop.h>
56 #include <asm/mach/sharpsl_param.h>
61 static unsigned long tosa_pin_config[] = {
62 GPIO78_nCS_2, /* Scoop */
63 GPIO80_nCS_4, /* tg6393xb */
64 GPIO33_nCS_5, /* Scoop */
66 // GPIO76 CARD_VCC_ON1
68 GPIO19_GPIO, /* Reset out */
69 GPIO1_RST | WAKEUP_ON_EDGE_FALL,
71 GPIO0_GPIO | WAKEUP_ON_EDGE_FALL, /* WAKE_UP */
72 GPIO2_GPIO | WAKEUP_ON_EDGE_BOTH, /* AC_IN */
73 GPIO3_GPIO | WAKEUP_ON_EDGE_FALL, /* RECORD */
74 GPIO4_GPIO | WAKEUP_ON_EDGE_FALL, /* SYNC */
75 GPIO20_GPIO, /* EAR_IN */
78 GPIO5_GPIO, /* USB_IN */
79 GPIO32_GPIO, /* Pen IRQ */
81 GPIO7_GPIO, /* Jacket Detect */
82 GPIO14_GPIO, /* BAT0_CRG */
83 GPIO12_GPIO, /* BAT1_CRG */
84 GPIO17_GPIO, /* BAT0_LOW */
85 GPIO84_GPIO, /* BAT1_LOW */
86 GPIO38_GPIO, /* BAT_LOCK */
89 GPIO15_GPIO, /* TC6393XB IRQ */
91 GPIO27_GPIO, /* LCD Sync */
96 GPIO9_GPIO, /* Detect */
97 GPIO10_GPIO, /* nSD_INT */
100 GPIO13_GPIO, /* CD_IRQ */
101 GPIO21_GPIO, /* Main Slot IRQ */
102 GPIO36_GPIO, /* Jacket Slot IRQ */
116 GPIO30_AC97_SDATA_OUT,
118 GPIO29_AC97_SDATA_IN_0,
136 GPIO58_GPIO | MFP_LPM_DRIVE_LOW, /* Column 0 */
137 GPIO59_GPIO | MFP_LPM_DRIVE_LOW, /* Column 1 */
138 GPIO60_GPIO | MFP_LPM_DRIVE_LOW, /* Column 2 */
139 GPIO61_GPIO | MFP_LPM_DRIVE_LOW, /* Column 3 */
140 GPIO62_GPIO | MFP_LPM_DRIVE_LOW, /* Column 4 */
141 GPIO63_GPIO | MFP_LPM_DRIVE_LOW, /* Column 5 */
142 GPIO64_GPIO | MFP_LPM_DRIVE_LOW, /* Column 6 */
143 GPIO65_GPIO | MFP_LPM_DRIVE_LOW, /* Column 7 */
144 GPIO66_GPIO | MFP_LPM_DRIVE_LOW, /* Column 8 */
145 GPIO67_GPIO | MFP_LPM_DRIVE_LOW, /* Column 9 */
146 GPIO68_GPIO | MFP_LPM_DRIVE_LOW, /* Column 10 */
147 GPIO69_GPIO | MFP_LPM_DRIVE_LOW, /* Row 0 */
148 GPIO70_GPIO | MFP_LPM_DRIVE_LOW, /* Row 1 */
149 GPIO71_GPIO | MFP_LPM_DRIVE_LOW, /* Row 2 */
150 GPIO72_GPIO | MFP_LPM_DRIVE_LOW, /* Row 3 */
151 GPIO73_GPIO | MFP_LPM_DRIVE_LOW, /* Row 4 */
152 GPIO74_GPIO | MFP_LPM_DRIVE_LOW, /* Row 5 */
153 GPIO75_GPIO | MFP_LPM_DRIVE_LOW, /* Row 6 */
160 /* IrDA is managed in other way */
168 static struct resource tosa_scoop_resources[] = {
170 .start = TOSA_CF_PHYS,
171 .end = TOSA_CF_PHYS + 0xfff,
172 .flags = IORESOURCE_MEM,
176 static struct scoop_config tosa_scoop_setup = {
177 .io_dir = TOSA_SCOOP_IO_DIR,
178 .gpio_base = TOSA_SCOOP_GPIO_BASE,
181 static struct platform_device tosascoop_device = {
182 .name = "sharp-scoop",
185 .platform_data = &tosa_scoop_setup,
187 .num_resources = ARRAY_SIZE(tosa_scoop_resources),
188 .resource = tosa_scoop_resources,
193 * SCOOP Device Jacket
195 static struct resource tosa_scoop_jc_resources[] = {
197 .start = TOSA_SCOOP_PHYS + 0x40,
198 .end = TOSA_SCOOP_PHYS + 0xfff,
199 .flags = IORESOURCE_MEM,
203 static struct scoop_config tosa_scoop_jc_setup = {
204 .io_dir = TOSA_SCOOP_JC_IO_DIR,
205 .gpio_base = TOSA_SCOOP_JC_GPIO_BASE,
208 static struct platform_device tosascoop_jc_device = {
209 .name = "sharp-scoop",
212 .platform_data = &tosa_scoop_jc_setup,
213 .parent = &tosascoop_device.dev,
215 .num_resources = ARRAY_SIZE(tosa_scoop_jc_resources),
216 .resource = tosa_scoop_jc_resources,
222 static struct scoop_pcmcia_dev tosa_pcmcia_scoop[] = {
224 .dev = &tosascoop_device.dev,
225 .irq = TOSA_IRQ_GPIO_CF_IRQ,
226 .cd_irq = TOSA_IRQ_GPIO_CF_CD,
227 .cd_irq_str = "PCMCIA0 CD",
229 .dev = &tosascoop_jc_device.dev,
230 .irq = TOSA_IRQ_GPIO_JC_CF_IRQ,
235 static struct scoop_pcmcia_config tosa_pcmcia_config = {
236 .devs = &tosa_pcmcia_scoop[0],
241 * USB Device Controller
243 static struct gpio_vbus_mach_info tosa_udc_info = {
244 .gpio_pullup = TOSA_GPIO_USB_PULLUP,
245 .gpio_vbus = TOSA_GPIO_USB_IN,
246 .gpio_vbus_inverted = 1,
249 static struct platform_device tosa_gpio_vbus = {
253 .platform_data = &tosa_udc_info,
260 static int tosa_mci_init(struct device *dev, irq_handler_t tosa_detect_int, void *data)
264 err = gpio_request(TOSA_GPIO_nSD_INT, "SD Int");
266 printk(KERN_ERR "tosa_mci_init: can't request SD_PWR gpio\n");
269 err = gpio_direction_input(TOSA_GPIO_nSD_INT);
271 goto err_gpio_int_dir;
276 gpio_free(TOSA_GPIO_nSD_INT);
281 static void tosa_mci_exit(struct device *dev, void *data)
283 gpio_free(TOSA_GPIO_nSD_INT);
286 static struct pxamci_platform_data tosa_mci_platform_data = {
287 .detect_delay_ms = 250,
288 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
289 .init = tosa_mci_init,
290 .exit = tosa_mci_exit,
293 static struct gpiod_lookup_table tosa_mci_gpio_table = {
294 .dev_id = "pxa2xx-mci.0",
296 GPIO_LOOKUP("gpio-pxa", TOSA_GPIO_nSD_DETECT,
297 "cd", GPIO_ACTIVE_LOW),
298 GPIO_LOOKUP("sharp-scoop.0", TOSA_GPIO_SD_WP - TOSA_SCOOP_GPIO_BASE,
299 "wp", GPIO_ACTIVE_LOW),
300 GPIO_LOOKUP("sharp-scoop.0", TOSA_GPIO_PWR_ON - TOSA_SCOOP_GPIO_BASE,
301 "power", GPIO_ACTIVE_HIGH),
309 static void tosa_irda_transceiver_mode(struct device *dev, int mode)
312 gpio_set_value(TOSA_GPIO_IR_POWERDWN, 0);
313 pxa2xx_transceiver_mode(dev, mode);
314 gpio_direction_output(TOSA_GPIO_IRDA_TX, 0);
316 pxa2xx_transceiver_mode(dev, mode);
317 gpio_set_value(TOSA_GPIO_IR_POWERDWN, 1);
321 static int tosa_irda_startup(struct device *dev)
325 ret = gpio_request(TOSA_GPIO_IRDA_TX, "IrDA TX");
328 ret = gpio_direction_output(TOSA_GPIO_IRDA_TX, 0);
332 ret = gpio_request(TOSA_GPIO_IR_POWERDWN, "IrDA powerdown");
336 ret = gpio_direction_output(TOSA_GPIO_IR_POWERDWN, 0);
340 tosa_irda_transceiver_mode(dev, IR_SIRMODE | IR_OFF);
345 gpio_free(TOSA_GPIO_IR_POWERDWN);
348 gpio_free(TOSA_GPIO_IRDA_TX);
353 static void tosa_irda_shutdown(struct device *dev)
355 tosa_irda_transceiver_mode(dev, IR_SIRMODE | IR_OFF);
356 gpio_free(TOSA_GPIO_IR_POWERDWN);
357 gpio_free(TOSA_GPIO_IRDA_TX);
360 static struct pxaficp_platform_data tosa_ficp_platform_data = {
362 .transceiver_cap = IR_SIRMODE | IR_OFF,
363 .transceiver_mode = tosa_irda_transceiver_mode,
364 .startup = tosa_irda_startup,
365 .shutdown = tosa_irda_shutdown,
371 static char *tosa_ac_supplied_to[] = {
377 static struct gpio_charger_platform_data tosa_power_data = {
379 .type = POWER_SUPPLY_TYPE_MAINS,
380 .gpio = TOSA_GPIO_AC_IN,
381 .gpio_active_low = 1,
382 .supplied_to = tosa_ac_supplied_to,
383 .num_supplicants = ARRAY_SIZE(tosa_ac_supplied_to),
386 static struct resource tosa_power_resource[] = {
389 .start = PXA_GPIO_TO_IRQ(TOSA_GPIO_AC_IN),
390 .end = PXA_GPIO_TO_IRQ(TOSA_GPIO_AC_IN),
391 .flags = IORESOURCE_IRQ |
392 IORESOURCE_IRQ_HIGHEDGE |
393 IORESOURCE_IRQ_LOWEDGE,
397 static struct platform_device tosa_power_device = {
398 .name = "gpio-charger",
400 .dev.platform_data = &tosa_power_data,
401 .resource = tosa_power_resource,
402 .num_resources = ARRAY_SIZE(tosa_power_resource),
408 static const uint32_t tosakbd_keymap[] = {
411 KEY(0, 6, KEY_BACKSPACE),
419 KEY(1, 7, KEY_COMMA),
425 KEY(2, 6, KEY_ENTER),
431 KEY(3, 4, TOSA_KEY_ADDRESSBOOK),
432 KEY(3, 5, TOSA_KEY_CANCEL),
433 KEY(3, 6, TOSA_KEY_CENTER),
434 KEY(3, 7, TOSA_KEY_OK),
435 KEY(3, 8, KEY_LEFTSHIFT),
440 KEY(4, 4, TOSA_KEY_CALENDAR),
441 KEY(4, 5, TOSA_KEY_HOMEPAGE),
442 KEY(4, 6, KEY_LEFTCTRL),
443 KEY(4, 7, TOSA_KEY_LIGHT),
444 KEY(4, 9, KEY_RIGHTSHIFT),
446 KEY(5, 1, KEY_SLASH),
449 KEY(5, 4, TOSA_KEY_MENU),
451 KEY(5, 10, TOSA_KEY_FN),
454 KEY(6, 2, KEY_SPACE),
455 KEY(6, 3, KEY_APOSTROPHE),
456 KEY(6, 4, TOSA_KEY_MAIL),
459 KEY(6, 7, KEY_RIGHT),
462 static struct matrix_keymap_data tosakbd_keymap_data = {
463 .keymap = tosakbd_keymap,
464 .keymap_size = ARRAY_SIZE(tosakbd_keymap),
467 static const int tosakbd_col_gpios[] =
468 { 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68 };
469 static const int tosakbd_row_gpios[] =
470 { 69, 70, 71, 72, 73, 74, 75 };
472 static struct matrix_keypad_platform_data tosakbd_pdata = {
473 .keymap_data = &tosakbd_keymap_data,
474 .row_gpios = tosakbd_row_gpios,
475 .col_gpios = tosakbd_col_gpios,
476 .num_row_gpios = ARRAY_SIZE(tosakbd_row_gpios),
477 .num_col_gpios = ARRAY_SIZE(tosakbd_col_gpios),
478 .col_scan_delay_us = 10,
483 static struct platform_device tosakbd_device = {
484 .name = "matrix-keypad",
487 .platform_data = &tosakbd_pdata,
491 static struct gpio_keys_button tosa_gpio_keys[] = {
493 * Two following keys are directly tied to "ON" button of tosa. Why?
494 * The first one can be used as a wakeup source, the second can't;
495 * also the first one is OR of ac_powered and on_button.
499 .code = KEY_RESERVED,
500 .gpio = TOSA_GPIO_POWERON,
508 .gpio = TOSA_GPIO_ON_KEY,
511 * can't be used as wakeup
518 .code = TOSA_KEY_RECORD,
519 .gpio = TOSA_GPIO_RECORD_BTN,
520 .desc = "Record Button",
526 .code = TOSA_KEY_SYNC,
527 .gpio = TOSA_GPIO_SYNC,
528 .desc = "Sync Button",
534 .code = SW_HEADPHONE_INSERT,
535 .gpio = TOSA_GPIO_EAR_IN,
536 .desc = "HeadPhone insert",
538 .debounce_interval = 300,
542 static struct gpio_keys_platform_data tosa_gpio_keys_platform_data = {
543 .buttons = tosa_gpio_keys,
544 .nbuttons = ARRAY_SIZE(tosa_gpio_keys),
547 static struct platform_device tosa_gpio_keys_device = {
551 .platform_data = &tosa_gpio_keys_platform_data,
558 static struct gpio_led tosa_gpio_leds[] = {
560 .name = "tosa:amber:charge",
561 .default_trigger = "main-battery-charging",
562 .gpio = TOSA_GPIO_CHRG_ERR_LED,
565 .name = "tosa:green:mail",
566 .default_trigger = "nand-disk",
567 .gpio = TOSA_GPIO_NOTE_LED,
570 .name = "tosa:dual:wlan",
571 .default_trigger = "none",
572 .gpio = TOSA_GPIO_WLAN_LED,
575 .name = "tosa:blue:bluetooth",
576 .default_trigger = "tosa-bt",
577 .gpio = TOSA_GPIO_BT_LED,
581 static struct gpio_led_platform_data tosa_gpio_leds_platform_data = {
582 .leds = tosa_gpio_leds,
583 .num_leds = ARRAY_SIZE(tosa_gpio_leds),
586 static struct platform_device tosaled_device = {
590 .platform_data = &tosa_gpio_leds_platform_data,
595 * Toshiba Mobile IO Controller
597 static struct resource tc6393xb_resources[] = {
599 .start = TOSA_LCDC_PHYS,
600 .end = TOSA_LCDC_PHYS + 0x3ffffff,
601 .flags = IORESOURCE_MEM,
605 .start = TOSA_IRQ_GPIO_TC6393XB_INT,
606 .end = TOSA_IRQ_GPIO_TC6393XB_INT,
607 .flags = IORESOURCE_IRQ,
612 static int tosa_tc6393xb_enable(struct platform_device *dev)
616 rc = gpio_request(TOSA_GPIO_TC6393XB_REST_IN, "tc6393xb #pclr");
619 rc = gpio_request(TOSA_GPIO_TC6393XB_SUSPEND, "tc6393xb #suspend");
621 goto err_req_suspend;
622 rc = gpio_request(TOSA_GPIO_TC6393XB_L3V_ON, "tc6393xb l3v");
625 rc = gpio_direction_output(TOSA_GPIO_TC6393XB_L3V_ON, 0);
628 rc = gpio_direction_output(TOSA_GPIO_TC6393XB_SUSPEND, 0);
630 goto err_dir_suspend;
631 rc = gpio_direction_output(TOSA_GPIO_TC6393XB_REST_IN, 0);
637 gpio_set_value(TOSA_GPIO_TC6393XB_SUSPEND, 1);
641 gpio_set_value(TOSA_GPIO_TC6393XB_REST_IN, 1);
642 gpio_set_value(TOSA_GPIO_TC6393XB_L3V_ON, 1);
648 gpio_free(TOSA_GPIO_TC6393XB_L3V_ON);
650 gpio_free(TOSA_GPIO_TC6393XB_SUSPEND);
652 gpio_free(TOSA_GPIO_TC6393XB_REST_IN);
657 static int tosa_tc6393xb_disable(struct platform_device *dev)
659 gpio_free(TOSA_GPIO_TC6393XB_L3V_ON);
660 gpio_free(TOSA_GPIO_TC6393XB_SUSPEND);
661 gpio_free(TOSA_GPIO_TC6393XB_REST_IN);
666 static int tosa_tc6393xb_resume(struct platform_device *dev)
668 gpio_set_value(TOSA_GPIO_TC6393XB_SUSPEND, 1);
670 gpio_set_value(TOSA_GPIO_TC6393XB_L3V_ON, 1);
676 static int tosa_tc6393xb_suspend(struct platform_device *dev)
678 gpio_set_value(TOSA_GPIO_TC6393XB_L3V_ON, 0);
679 gpio_set_value(TOSA_GPIO_TC6393XB_SUSPEND, 0);
683 static uint8_t scan_ff_pattern[] = { 0xff, 0xff };
685 static struct nand_bbt_descr tosa_tc6393xb_nand_bbt = {
689 .pattern = scan_ff_pattern
692 static const char * const probes[] = {
699 static struct tmio_nand_data tosa_tc6393xb_nand_config = {
700 .badblock_pattern = &tosa_tc6393xb_nand_bbt,
701 .part_parsers = probes,
704 static int tosa_tc6393xb_setup(struct platform_device *dev)
708 rc = gpio_request(TOSA_GPIO_CARD_VCC_ON, "CARD_VCC_ON");
712 rc = gpio_direction_output(TOSA_GPIO_CARD_VCC_ON, 1);
719 gpio_free(TOSA_GPIO_CARD_VCC_ON);
724 static void tosa_tc6393xb_teardown(struct platform_device *dev)
726 gpio_free(TOSA_GPIO_CARD_VCC_ON);
729 #ifdef CONFIG_MFD_TC6393XB
730 static struct fb_videomode tosa_tc6393xb_lcd_mode[] = {
734 .pixclock = 0x002cdf00,/* PLL divisor */
735 .left_margin = 0x004c,
736 .right_margin = 0x005b,
737 .upper_margin = 0x0001,
738 .lower_margin = 0x000d,
741 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
742 .vmode = FB_VMODE_NONINTERLACED,
746 .pixclock = 0x00e7f203,/* PLL divisor */
747 .left_margin = 0x0024,
748 .right_margin = 0x002f,
749 .upper_margin = 0x0001,
750 .lower_margin = 0x000d,
753 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
754 .vmode = FB_VMODE_NONINTERLACED,
758 static struct tmio_fb_data tosa_tc6393xb_fb_config = {
759 .lcd_set_power = tc6393xb_lcd_set_power,
760 .lcd_mode = tc6393xb_lcd_mode,
761 .num_modes = ARRAY_SIZE(tosa_tc6393xb_lcd_mode),
762 .modes = &tosa_tc6393xb_lcd_mode[0],
768 static struct tc6393xb_platform_data tosa_tc6393xb_data = {
769 .scr_pll2cr = 0x0cc1,
772 .irq_base = IRQ_BOARD_START,
773 .gpio_base = TOSA_TC6393XB_GPIO_BASE,
774 .setup = tosa_tc6393xb_setup,
775 .teardown = tosa_tc6393xb_teardown,
777 .enable = tosa_tc6393xb_enable,
778 .disable = tosa_tc6393xb_disable,
779 .suspend = tosa_tc6393xb_suspend,
780 .resume = tosa_tc6393xb_resume,
782 .nand_data = &tosa_tc6393xb_nand_config,
783 #ifdef CONFIG_MFD_TC6393XB
784 .fb_data = &tosa_tc6393xb_fb_config,
791 static struct platform_device tc6393xb_device = {
795 .platform_data = &tosa_tc6393xb_data,
797 .num_resources = ARRAY_SIZE(tc6393xb_resources),
798 .resource = tc6393xb_resources,
801 static struct tosa_bt_data tosa_bt_data = {
802 .gpio_pwr = TOSA_GPIO_BT_PWR_EN,
803 .gpio_reset = TOSA_GPIO_BT_RESET,
806 static struct platform_device tosa_bt_device = {
809 .dev.platform_data = &tosa_bt_data,
812 static struct pxa2xx_spi_controller pxa_ssp_master_info = {
816 static struct spi_board_info spi_board_info[] __initdata = {
818 .modalias = "tosa-lcd",
820 .max_speed_hz = 28750,
827 static struct mtd_partition sharpsl_rom_parts[] = {
829 .name ="Boot PROM Filesystem",
830 .offset = 0x00160000,
831 .size = MTDPART_SIZ_FULL,
835 static struct physmap_flash_data sharpsl_rom_data = {
837 .nr_parts = ARRAY_SIZE(sharpsl_rom_parts),
838 .parts = sharpsl_rom_parts,
841 static struct resource sharpsl_rom_resources[] = {
845 .flags = IORESOURCE_MEM,
849 static struct platform_device sharpsl_rom_device = {
850 .name = "physmap-flash",
852 .resource = sharpsl_rom_resources,
853 .num_resources = ARRAY_SIZE(sharpsl_rom_resources),
854 .dev.platform_data = &sharpsl_rom_data,
857 static struct platform_device wm9712_device = {
858 .name = "wm9712-codec",
862 static struct platform_device tosa_audio_device = {
863 .name = "tosa-audio",
867 static struct platform_device *devices[] __initdata = {
869 &tosascoop_jc_device,
873 &tosa_gpio_keys_device,
882 static void tosa_poweroff(void)
884 pxa_restart(REBOOT_GPIO, NULL);
887 static void tosa_restart(enum reboot_mode mode, const char *cmd)
889 uint32_t msc0 = __raw_readl(MSC0);
891 /* Bootloader magic for a reboot */
892 if((msc0 & 0xffff0000) == 0x7ff00000)
893 __raw_writel((msc0 & 0xffff) | 0x7ee00000, MSC0);
898 static void __init tosa_init(void)
900 pxa2xx_mfp_config(ARRAY_AND_SIZE(tosa_pin_config));
902 pxa_set_ffuart_info(NULL);
903 pxa_set_btuart_info(NULL);
904 pxa_set_stuart_info(NULL);
906 gpio_set_wake(MFP_PIN_GPIO1, 1);
907 /* We can't pass to gpio-keys since it will drop the Reset altfunc */
909 init_gpio_reset(TOSA_GPIO_ON_RESET, 0, 0);
911 pm_power_off = tosa_poweroff;
915 /* enable batt_fault */
918 gpiod_add_lookup_table(&tosa_mci_gpio_table);
919 pxa_set_mci_info(&tosa_mci_platform_data);
920 pxa_set_ficp_info(&tosa_ficp_platform_data);
921 pxa_set_i2c_info(NULL);
922 pxa_set_ac97_info(NULL);
923 platform_scoop_config = &tosa_pcmcia_config;
925 pxa2xx_set_spi_info(2, &pxa_ssp_master_info);
926 spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
928 clk_add_alias("CLK_CK3P6MI", tc6393xb_device.name, "GPIO11_CLK", NULL);
930 platform_add_devices(devices, ARRAY_SIZE(devices));
933 static void __init fixup_tosa(struct tag *tags, char **cmdline)
935 sharpsl_save_param();
936 memblock_add(0xa0000000, SZ_64M);
939 MACHINE_START(TOSA, "SHARP Tosa")
941 .map_io = pxa25x_map_io,
942 .nr_irqs = TOSA_NR_IRQS,
943 .init_irq = pxa25x_init_irq,
944 .handle_irq = pxa25x_handle_irq,
945 .init_machine = tosa_init,
946 .init_time = pxa_timer_init,
947 .restart = tosa_restart,