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/kernel.h>
16 #include <linux/init.h>
17 #include <linux/platform_device.h>
18 #include <linux/major.h>
20 #include <linux/interrupt.h>
21 #include <linux/delay.h>
23 #include <linux/mmc/host.h>
24 #include <linux/mfd/tc6393xb.h>
25 #include <linux/mfd/tmio.h>
26 #include <linux/mtd/nand.h>
27 #include <linux/mtd/partitions.h>
28 #include <linux/mtd/physmap.h>
30 #include <linux/gpio_keys.h>
31 #include <linux/input.h>
32 #include <linux/gpio.h>
33 #include <linux/pda_power.h>
34 #include <linux/spi/spi.h>
35 #include <linux/spi/pxa2xx_spi.h>
36 #include <linux/input/matrix_keypad.h>
38 #include <asm/setup.h>
39 #include <asm/mach-types.h>
41 #include <mach/pxa25x.h>
42 #include <mach/reset.h>
43 #include <mach/irda.h>
47 #include <mach/tosa_bt.h>
48 #include <mach/audio.h>
49 #include <mach/smemc.h>
51 #include <asm/mach/arch.h>
52 #include <mach/tosa.h>
54 #include <asm/hardware/scoop.h>
55 #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 pxa2xx_udc_mach_info udc_info __initdata = {
244 .gpio_pullup = TOSA_GPIO_USB_PULLUP,
245 .gpio_vbus = TOSA_GPIO_USB_IN,
246 .gpio_vbus_inverted = 1,
252 static int tosa_mci_init(struct device *dev, irq_handler_t tosa_detect_int, void *data)
256 err = gpio_request(TOSA_GPIO_nSD_INT, "SD Int");
258 printk(KERN_ERR "tosa_mci_init: can't request SD_PWR gpio\n");
261 err = gpio_direction_input(TOSA_GPIO_nSD_INT);
263 goto err_gpio_int_dir;
268 gpio_free(TOSA_GPIO_nSD_INT);
273 static void tosa_mci_exit(struct device *dev, void *data)
275 gpio_free(TOSA_GPIO_nSD_INT);
278 static struct pxamci_platform_data tosa_mci_platform_data = {
279 .detect_delay_ms = 250,
280 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
281 .init = tosa_mci_init,
282 .exit = tosa_mci_exit,
283 .gpio_card_detect = TOSA_GPIO_nSD_DETECT,
284 .gpio_card_ro = TOSA_GPIO_SD_WP,
285 .gpio_power = TOSA_GPIO_PWR_ON,
291 static void tosa_irda_transceiver_mode(struct device *dev, int mode)
294 gpio_set_value(TOSA_GPIO_IR_POWERDWN, 0);
295 pxa2xx_transceiver_mode(dev, mode);
296 gpio_direction_output(TOSA_GPIO_IRDA_TX, 0);
298 pxa2xx_transceiver_mode(dev, mode);
299 gpio_set_value(TOSA_GPIO_IR_POWERDWN, 1);
303 static int tosa_irda_startup(struct device *dev)
307 ret = gpio_request(TOSA_GPIO_IRDA_TX, "IrDA TX");
310 ret = gpio_direction_output(TOSA_GPIO_IRDA_TX, 0);
314 ret = gpio_request(TOSA_GPIO_IR_POWERDWN, "IrDA powerdown");
318 ret = gpio_direction_output(TOSA_GPIO_IR_POWERDWN, 0);
322 tosa_irda_transceiver_mode(dev, IR_SIRMODE | IR_OFF);
327 gpio_free(TOSA_GPIO_IR_POWERDWN);
330 gpio_free(TOSA_GPIO_IRDA_TX);
335 static void tosa_irda_shutdown(struct device *dev)
337 tosa_irda_transceiver_mode(dev, IR_SIRMODE | IR_OFF);
338 gpio_free(TOSA_GPIO_IR_POWERDWN);
339 gpio_free(TOSA_GPIO_IRDA_TX);
342 static struct pxaficp_platform_data tosa_ficp_platform_data = {
344 .transceiver_cap = IR_SIRMODE | IR_OFF,
345 .transceiver_mode = tosa_irda_transceiver_mode,
346 .startup = tosa_irda_startup,
347 .shutdown = tosa_irda_shutdown,
353 static int tosa_power_init(struct device *dev)
355 int ret = gpio_request(TOSA_GPIO_AC_IN, "ac in");
359 ret = gpio_direction_input(TOSA_GPIO_AC_IN);
366 gpio_free(TOSA_GPIO_AC_IN);
371 static void tosa_power_exit(struct device *dev)
373 gpio_free(TOSA_GPIO_AC_IN);
376 static int tosa_power_ac_online(void)
378 return gpio_get_value(TOSA_GPIO_AC_IN) == 0;
381 static char *tosa_ac_supplied_to[] = {
387 static struct pda_power_pdata tosa_power_data = {
388 .init = tosa_power_init,
389 .is_ac_online = tosa_power_ac_online,
390 .exit = tosa_power_exit,
391 .supplied_to = tosa_ac_supplied_to,
392 .num_supplicants = ARRAY_SIZE(tosa_ac_supplied_to),
395 static struct resource tosa_power_resource[] = {
398 .start = gpio_to_irq(TOSA_GPIO_AC_IN),
399 .end = gpio_to_irq(TOSA_GPIO_AC_IN),
400 .flags = IORESOURCE_IRQ |
401 IORESOURCE_IRQ_HIGHEDGE |
402 IORESOURCE_IRQ_LOWEDGE,
406 static struct platform_device tosa_power_device = {
409 .dev.platform_data = &tosa_power_data,
410 .resource = tosa_power_resource,
411 .num_resources = ARRAY_SIZE(tosa_power_resource),
417 static const uint32_t tosakbd_keymap[] = {
420 KEY(0, 7, KEY_BACKSPACE),
428 KEY(1, 8, KEY_COMMA),
434 KEY(2, 7, KEY_ENTER),
440 KEY(3, 5, TOSA_KEY_ADDRESSBOOK),
441 KEY(3, 6, TOSA_KEY_CANCEL),
442 KEY(3, 7, TOSA_KEY_CENTER),
443 KEY(3, 8, TOSA_KEY_OK),
444 KEY(3, 9, KEY_LEFTSHIFT),
449 KEY(4, 5, TOSA_KEY_CALENDAR),
450 KEY(4, 6, TOSA_KEY_HOMEPAGE),
451 KEY(4, 7, KEY_LEFTCTRL),
452 KEY(4, 8, TOSA_KEY_LIGHT),
453 KEY(4, 10, KEY_RIGHTSHIFT),
455 KEY(5, 2, KEY_SLASH),
458 KEY(5, 5, TOSA_KEY_MENU),
460 KEY(5, 11, TOSA_KEY_FN),
463 KEY(6, 3, KEY_SPACE),
464 KEY(6, 4, KEY_APOSTROPHE),
465 KEY(6, 5, TOSA_KEY_MAIL),
468 KEY(6, 8, KEY_RIGHT),
471 static struct matrix_keymap_data tosakbd_keymap_data = {
472 .keymap = tosakbd_keymap,
473 .keymap_size = ARRAY_SIZE(tosakbd_keymap),
476 static const int tosakbd_col_gpios[] =
477 { 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68 };
478 static const int tosakbd_row_gpios[] =
479 { 69, 70, 71, 72, 73, 74, 75 };
481 static struct matrix_keypad_platform_data tosakbd_pdata = {
482 .keymap_data = &tosakbd_keymap_data,
483 .row_gpios = tosakbd_row_gpios,
484 .col_gpios = tosakbd_col_gpios,
485 .num_row_gpios = ARRAY_SIZE(tosakbd_row_gpios),
486 .num_col_gpios = ARRAY_SIZE(tosakbd_col_gpios),
487 .col_scan_delay_us = 10,
492 static struct platform_device tosakbd_device = {
493 .name = "matrix-keypad",
496 .platform_data = &tosakbd_pdata,
500 static struct gpio_keys_button tosa_gpio_keys[] = {
502 * Two following keys are directly tied to "ON" button of tosa. Why?
503 * The first one can be used as a wakeup source, the second can't;
504 * also the first one is OR of ac_powered and on_button.
508 .code = KEY_RESERVED,
509 .gpio = TOSA_GPIO_POWERON,
517 .gpio = TOSA_GPIO_ON_KEY,
520 * can't be used as wakeup
527 .code = TOSA_KEY_RECORD,
528 .gpio = TOSA_GPIO_RECORD_BTN,
529 .desc = "Record Button",
535 .code = TOSA_KEY_SYNC,
536 .gpio = TOSA_GPIO_SYNC,
537 .desc = "Sync Button",
543 .code = SW_HEADPHONE_INSERT,
544 .gpio = TOSA_GPIO_EAR_IN,
545 .desc = "HeadPhone insert",
547 .debounce_interval = 300,
551 static struct gpio_keys_platform_data tosa_gpio_keys_platform_data = {
552 .buttons = tosa_gpio_keys,
553 .nbuttons = ARRAY_SIZE(tosa_gpio_keys),
556 static struct platform_device tosa_gpio_keys_device = {
560 .platform_data = &tosa_gpio_keys_platform_data,
567 static struct gpio_led tosa_gpio_leds[] = {
569 .name = "tosa:amber:charge",
570 .default_trigger = "main-battery-charging",
571 .gpio = TOSA_GPIO_CHRG_ERR_LED,
574 .name = "tosa:green:mail",
575 .default_trigger = "nand-disk",
576 .gpio = TOSA_GPIO_NOTE_LED,
579 .name = "tosa:dual:wlan",
580 .default_trigger = "none",
581 .gpio = TOSA_GPIO_WLAN_LED,
584 .name = "tosa:blue:bluetooth",
585 .default_trigger = "tosa-bt",
586 .gpio = TOSA_GPIO_BT_LED,
590 static struct gpio_led_platform_data tosa_gpio_leds_platform_data = {
591 .leds = tosa_gpio_leds,
592 .num_leds = ARRAY_SIZE(tosa_gpio_leds),
595 static struct platform_device tosaled_device = {
599 .platform_data = &tosa_gpio_leds_platform_data,
604 * Toshiba Mobile IO Controller
606 static struct resource tc6393xb_resources[] = {
608 .start = TOSA_LCDC_PHYS,
609 .end = TOSA_LCDC_PHYS + 0x3ffffff,
610 .flags = IORESOURCE_MEM,
614 .start = TOSA_IRQ_GPIO_TC6393XB_INT,
615 .end = TOSA_IRQ_GPIO_TC6393XB_INT,
616 .flags = IORESOURCE_IRQ,
621 static int tosa_tc6393xb_enable(struct platform_device *dev)
625 rc = gpio_request(TOSA_GPIO_TC6393XB_REST_IN, "tc6393xb #pclr");
628 rc = gpio_request(TOSA_GPIO_TC6393XB_SUSPEND, "tc6393xb #suspend");
630 goto err_req_suspend;
631 rc = gpio_request(TOSA_GPIO_TC6393XB_L3V_ON, "tc6393xb l3v");
634 rc = gpio_direction_output(TOSA_GPIO_TC6393XB_L3V_ON, 0);
637 rc = gpio_direction_output(TOSA_GPIO_TC6393XB_SUSPEND, 0);
639 goto err_dir_suspend;
640 rc = gpio_direction_output(TOSA_GPIO_TC6393XB_REST_IN, 0);
646 gpio_set_value(TOSA_GPIO_TC6393XB_SUSPEND, 1);
650 gpio_set_value(TOSA_GPIO_TC6393XB_REST_IN, 1);
651 gpio_set_value(TOSA_GPIO_TC6393XB_L3V_ON, 1);
657 gpio_free(TOSA_GPIO_TC6393XB_L3V_ON);
659 gpio_free(TOSA_GPIO_TC6393XB_SUSPEND);
661 gpio_free(TOSA_GPIO_TC6393XB_REST_IN);
666 static int tosa_tc6393xb_disable(struct platform_device *dev)
668 gpio_free(TOSA_GPIO_TC6393XB_L3V_ON);
669 gpio_free(TOSA_GPIO_TC6393XB_SUSPEND);
670 gpio_free(TOSA_GPIO_TC6393XB_REST_IN);
675 static int tosa_tc6393xb_resume(struct platform_device *dev)
677 gpio_set_value(TOSA_GPIO_TC6393XB_SUSPEND, 1);
679 gpio_set_value(TOSA_GPIO_TC6393XB_L3V_ON, 1);
685 static int tosa_tc6393xb_suspend(struct platform_device *dev)
687 gpio_set_value(TOSA_GPIO_TC6393XB_L3V_ON, 0);
688 gpio_set_value(TOSA_GPIO_TC6393XB_SUSPEND, 0);
692 static struct mtd_partition tosa_nand_partition[] = {
696 .size = 7 * 1024 * 1024,
700 .offset = MTDPART_OFS_APPEND,
701 .size = 28 * 1024 * 1024,
705 .offset = MTDPART_OFS_APPEND,
706 .size = MTDPART_SIZ_FULL,
710 static uint8_t scan_ff_pattern[] = { 0xff, 0xff };
712 static struct nand_bbt_descr tosa_tc6393xb_nand_bbt = {
716 .pattern = scan_ff_pattern
719 static struct tmio_nand_data tosa_tc6393xb_nand_config = {
720 .num_partitions = ARRAY_SIZE(tosa_nand_partition),
721 .partition = tosa_nand_partition,
722 .badblock_pattern = &tosa_tc6393xb_nand_bbt,
725 static int tosa_tc6393xb_setup(struct platform_device *dev)
729 rc = gpio_request(TOSA_GPIO_CARD_VCC_ON, "CARD_VCC_ON");
733 rc = gpio_direction_output(TOSA_GPIO_CARD_VCC_ON, 1);
740 gpio_free(TOSA_GPIO_CARD_VCC_ON);
745 static void tosa_tc6393xb_teardown(struct platform_device *dev)
747 gpio_free(TOSA_GPIO_CARD_VCC_ON);
750 #ifdef CONFIG_MFD_TC6393XB
751 static struct fb_videomode tosa_tc6393xb_lcd_mode[] = {
755 .pixclock = 0x002cdf00,/* PLL divisor */
756 .left_margin = 0x004c,
757 .right_margin = 0x005b,
758 .upper_margin = 0x0001,
759 .lower_margin = 0x000d,
762 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
763 .vmode = FB_VMODE_NONINTERLACED,
767 .pixclock = 0x00e7f203,/* PLL divisor */
768 .left_margin = 0x0024,
769 .right_margin = 0x002f,
770 .upper_margin = 0x0001,
771 .lower_margin = 0x000d,
774 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
775 .vmode = FB_VMODE_NONINTERLACED,
779 static struct tmio_fb_data tosa_tc6393xb_fb_config = {
780 .lcd_set_power = tc6393xb_lcd_set_power,
781 .lcd_mode = tc6393xb_lcd_mode,
782 .num_modes = ARRAY_SIZE(tosa_tc6393xb_lcd_mode),
783 .modes = &tosa_tc6393xb_lcd_mode[0],
789 static struct tc6393xb_platform_data tosa_tc6393xb_data = {
790 .scr_pll2cr = 0x0cc1,
793 .irq_base = IRQ_BOARD_START,
794 .gpio_base = TOSA_TC6393XB_GPIO_BASE,
795 .setup = tosa_tc6393xb_setup,
796 .teardown = tosa_tc6393xb_teardown,
798 .enable = tosa_tc6393xb_enable,
799 .disable = tosa_tc6393xb_disable,
800 .suspend = tosa_tc6393xb_suspend,
801 .resume = tosa_tc6393xb_resume,
803 .nand_data = &tosa_tc6393xb_nand_config,
804 #ifdef CONFIG_MFD_TC6393XB
805 .fb_data = &tosa_tc6393xb_fb_config,
812 static struct platform_device tc6393xb_device = {
816 .platform_data = &tosa_tc6393xb_data,
818 .num_resources = ARRAY_SIZE(tc6393xb_resources),
819 .resource = tc6393xb_resources,
822 static struct tosa_bt_data tosa_bt_data = {
823 .gpio_pwr = TOSA_GPIO_BT_PWR_EN,
824 .gpio_reset = TOSA_GPIO_BT_RESET,
827 static struct platform_device tosa_bt_device = {
830 .dev.platform_data = &tosa_bt_data,
833 static struct pxa2xx_spi_master pxa_ssp_master_info = {
837 static struct spi_board_info spi_board_info[] __initdata = {
839 .modalias = "tosa-lcd",
841 .max_speed_hz = 28750,
848 static struct mtd_partition sharpsl_rom_parts[] = {
850 .name ="Boot PROM Filesystem",
851 .offset = 0x00160000,
852 .size = MTDPART_SIZ_FULL,
856 static struct physmap_flash_data sharpsl_rom_data = {
858 .nr_parts = ARRAY_SIZE(sharpsl_rom_parts),
859 .parts = sharpsl_rom_parts,
862 static struct resource sharpsl_rom_resources[] = {
866 .flags = IORESOURCE_MEM,
870 static struct platform_device sharpsl_rom_device = {
871 .name = "physmap-flash",
873 .resource = sharpsl_rom_resources,
874 .num_resources = ARRAY_SIZE(sharpsl_rom_resources),
875 .dev.platform_data = &sharpsl_rom_data,
878 static struct platform_device *devices[] __initdata = {
880 &tosascoop_jc_device,
884 &tosa_gpio_keys_device,
890 static void tosa_poweroff(void)
892 arm_machine_restart('g', NULL);
895 static void tosa_restart(char mode, const char *cmd)
897 uint32_t msc0 = __raw_readl(MSC0);
899 /* Bootloader magic for a reboot */
900 if((msc0 & 0xffff0000) == 0x7ff00000)
901 __raw_writel((msc0 & 0xffff) | 0x7ee00000, MSC0);
906 static void __init tosa_init(void)
910 pxa2xx_mfp_config(ARRAY_AND_SIZE(tosa_pin_config));
912 pxa_set_ffuart_info(NULL);
913 pxa_set_btuart_info(NULL);
914 pxa_set_stuart_info(NULL);
916 gpio_set_wake(MFP_PIN_GPIO1, 1);
917 /* We can't pass to gpio-keys since it will drop the Reset altfunc */
919 init_gpio_reset(TOSA_GPIO_ON_RESET, 0, 0);
921 pm_power_off = tosa_poweroff;
922 arm_pm_restart = tosa_restart;
926 /* enable batt_fault */
929 dummy = gpiochip_reserve(TOSA_SCOOP_GPIO_BASE, 12);
930 dummy = gpiochip_reserve(TOSA_SCOOP_JC_GPIO_BASE, 12);
931 dummy = gpiochip_reserve(TOSA_TC6393XB_GPIO_BASE, 16);
933 pxa_set_mci_info(&tosa_mci_platform_data);
934 pxa_set_udc_info(&udc_info);
935 pxa_set_ficp_info(&tosa_ficp_platform_data);
936 pxa_set_i2c_info(NULL);
937 pxa_set_ac97_info(NULL);
938 platform_scoop_config = &tosa_pcmcia_config;
940 pxa2xx_set_spi_info(2, &pxa_ssp_master_info);
941 spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
943 clk_add_alias("CLK_CK3P6MI", tc6393xb_device.name, "GPIO11_CLK", NULL);
945 platform_add_devices(devices, ARRAY_SIZE(devices));
948 static void __init fixup_tosa(struct machine_desc *desc,
949 struct tag *tags, char **cmdline, struct meminfo *mi)
951 sharpsl_save_param();
953 mi->bank[0].start = 0xa0000000;
954 mi->bank[0].size = (64*1024*1024);
957 MACHINE_START(TOSA, "SHARP Tosa")
959 .map_io = pxa25x_map_io,
960 .nr_irqs = TOSA_NR_IRQS,
961 .init_irq = pxa25x_init_irq,
962 .init_machine = tosa_init,