15 #include <linux/kernel.h>
31 #include <linux/input.h>
40 #include <asm/setup.h>
44 #include <mach/reset.h>
62 static unsigned long tosa_pin_config[] = {
169 static struct resource tosa_scoop_resources[] = {
183 .name =
"sharp-scoop",
186 .platform_data = &tosa_scoop_setup,
188 .num_resources =
ARRAY_SIZE(tosa_scoop_resources),
189 .resource = tosa_scoop_resources,
196 static struct resource tosa_scoop_jc_resources[] = {
210 .name =
"sharp-scoop",
213 .platform_data = &tosa_scoop_jc_setup,
214 .parent = &tosascoop_device.
dev,
216 .num_resources =
ARRAY_SIZE(tosa_scoop_jc_resources),
217 .resource = tosa_scoop_jc_resources,
225 .dev = &tosascoop_device.
dev,
228 .cd_irq_str =
"PCMCIA0 CD",
230 .dev = &tosascoop_jc_device.
dev,
237 .devs = &tosa_pcmcia_scoop[0],
247 .gpio_vbus_inverted = 1,
254 .platform_data = &tosa_udc_info,
272 goto err_gpio_int_dir;
282 static void tosa_mci_exit(
struct device *dev,
void *data)
288 .detect_delay_ms = 250,
290 .init = tosa_mci_init,
291 .exit = tosa_mci_exit,
300 static void tosa_irda_transceiver_mode(
struct device *dev,
int mode)
312 static int tosa_irda_startup(
struct device *dev)
344 static void tosa_irda_shutdown(
struct device *dev)
354 .transceiver_mode = tosa_irda_transceiver_mode,
355 .startup = tosa_irda_startup,
356 .shutdown = tosa_irda_shutdown,
362 static int tosa_power_init(
struct device *dev)
380 static void tosa_power_exit(
struct device *dev)
385 static int tosa_power_ac_online(
void)
390 static char *tosa_ac_supplied_to[] = {
397 .init = tosa_power_init,
398 .is_ac_online = tosa_power_ac_online,
399 .exit = tosa_power_exit,
400 .supplied_to = tosa_ac_supplied_to,
401 .num_supplicants =
ARRAY_SIZE(tosa_ac_supplied_to),
404 static struct resource tosa_power_resource[] = {
418 .dev.platform_data = &tosa_power_data,
419 .resource = tosa_power_resource,
420 .num_resources =
ARRAY_SIZE(tosa_power_resource),
426 static const uint32_t tosakbd_keymap[] = {
481 .keymap = tosakbd_keymap,
485 static const int tosakbd_col_gpios[] =
486 { 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68 };
487 static const int tosakbd_row_gpios[] =
488 { 69, 70, 71, 72, 73, 74, 75 };
491 .keymap_data = &tosakbd_keymap_data,
492 .row_gpios = tosakbd_row_gpios,
493 .col_gpios = tosakbd_col_gpios,
494 .num_row_gpios =
ARRAY_SIZE(tosakbd_row_gpios),
495 .num_col_gpios =
ARRAY_SIZE(tosakbd_col_gpios),
496 .col_scan_delay_us = 10,
502 .name =
"matrix-keypad",
505 .platform_data = &tosakbd_pdata,
538 .desc =
"Record Button",
546 .desc =
"Sync Button",
554 .desc =
"HeadPhone insert",
556 .debounce_interval = 300,
561 .buttons = tosa_gpio_keys,
569 .platform_data = &tosa_gpio_keys_platform_data,
576 static struct gpio_led tosa_gpio_leds[] = {
578 .name =
"tosa:amber:charge",
579 .default_trigger =
"main-battery-charging",
583 .name =
"tosa:green:mail",
584 .default_trigger =
"nand-disk",
588 .name =
"tosa:dual:wlan",
589 .default_trigger =
"none",
593 .name =
"tosa:blue:bluetooth",
594 .default_trigger =
"tosa-bt",
600 .leds = tosa_gpio_leds,
608 .platform_data = &tosa_gpio_leds_platform_data,
615 static struct resource tc6393xb_resources[] = {
639 goto err_req_suspend;
648 goto err_dir_suspend;
705 .size = 7 * 1024 * 1024,
710 .size = 28 * 1024 * 1024,
719 static uint8_t scan_ff_pattern[] = { 0xff, 0xff };
725 .pattern = scan_ff_pattern
729 .num_partitions =
ARRAY_SIZE(tosa_nand_partition),
730 .partition = tosa_nand_partition,
731 .badblock_pattern = &tosa_tc6393xb_nand_bbt,
759 #ifdef CONFIG_MFD_TC6393XB
764 .pixclock = 0x002cdf00,
765 .left_margin = 0x004c,
766 .right_margin = 0x005b,
767 .upper_margin = 0x0001,
768 .lower_margin = 0x000d,
776 .pixclock = 0x00e7f203,
777 .left_margin = 0x0024,
778 .right_margin = 0x002f,
779 .upper_margin = 0x0001,
780 .lower_margin = 0x000d,
791 .num_modes =
ARRAY_SIZE(tosa_tc6393xb_lcd_mode),
792 .modes = &tosa_tc6393xb_lcd_mode[0],
799 .scr_pll2cr = 0x0cc1,
804 .setup = tosa_tc6393xb_setup,
805 .teardown = tosa_tc6393xb_teardown,
807 .enable = tosa_tc6393xb_enable,
808 .disable = tosa_tc6393xb_disable,
809 .suspend = tosa_tc6393xb_suspend,
810 .resume = tosa_tc6393xb_resume,
812 .nand_data = &tosa_tc6393xb_nand_config,
813 #ifdef CONFIG_MFD_TC6393XB
814 .fb_data = &tosa_tc6393xb_fb_config,
825 .platform_data = &tosa_tc6393xb_data,
827 .num_resources =
ARRAY_SIZE(tc6393xb_resources),
828 .resource = tc6393xb_resources,
839 .dev.platform_data = &tosa_bt_data,
848 .modalias =
"tosa-lcd",
850 .max_speed_hz = 28750,
859 .name =
"Boot PROM Filesystem",
860 .offset = 0x00160000,
868 .parts = sharpsl_rom_parts,
871 static struct resource sharpsl_rom_resources[] = {
880 .name =
"physmap-flash",
882 .resource = sharpsl_rom_resources,
883 .num_resources =
ARRAY_SIZE(sharpsl_rom_resources),
884 .dev.platform_data = &sharpsl_rom_data,
888 .name =
"wm9712-codec",
893 .name =
"tosa-audio",
899 &tosascoop_jc_device,
903 &tosa_gpio_keys_device,
912 static void tosa_poweroff(
void)
917 static void tosa_restart(
char mode,
const char *
cmd)
922 if((msc0 & 0xffff0000) == 0x7ff00000)
928 static void __init tosa_init(
void)
973 mi->
bank[0].start = 0xa0000000;
974 mi->
bank[0].size = (64*1024*1024);
984 .init_machine = tosa_init,
986 .restart = tosa_restart,