diff options
author | Ian Molton <spyro@f2s.com> | 2008-09-26 08:38:59 -0400 |
---|---|---|
committer | Ian Molton <spyro@f2s.com> | 2008-12-14 22:29:34 -0500 |
commit | b1ae1b7b274f67c149bee4731e38a7516c723de4 (patch) | |
tree | 9f31ef6e8fb28359f6dbc8bb7ecac2c75bce2fa1 /arch/arm/mach-pxa/e400.c | |
parent | f4ad9a9624fafec4647e7e45469e0446586f81fb (diff) |
[ARM] pxa: Add multi-io support for e-series
This patchset provides support for the TMIO based IO controller used in the
Toshiba e-series PDAs.
Signed-off-by: Ian Molton <spyro@f2s.com>
Acked-by: Samuel Ortiz <sameo@openedhand.com>
Acked-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa/e400.c')
-rw-r--r-- | arch/arm/mach-pxa/e400.c | 65 |
1 files changed, 62 insertions, 3 deletions
diff --git a/arch/arm/mach-pxa/e400.c b/arch/arm/mach-pxa/e400.c index 544bbaa20621..7716ad0c3b34 100644 --- a/arch/arm/mach-pxa/e400.c +++ b/arch/arm/mach-pxa/e400.c | |||
@@ -12,20 +12,26 @@ | |||
12 | 12 | ||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/clk.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/mfd/t7l66xb.h> | ||
18 | #include <linux/mtd/nand.h> | ||
19 | #include <linux/mtd/partitions.h> | ||
15 | 20 | ||
16 | #include <asm/setup.h> | 21 | #include <asm/setup.h> |
17 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
18 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
19 | 24 | ||
20 | #include <mach/pxa-regs.h> | ||
21 | #include <mach/mfp-pxa25x.h> | 25 | #include <mach/mfp-pxa25x.h> |
26 | #include <mach/pxa-regs.h> | ||
22 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
23 | 28 | #include <mach/eseries-gpio.h> | |
24 | #include <mach/pxafb.h> | 29 | #include <mach/pxafb.h> |
25 | #include <mach/udc.h> | 30 | #include <mach/udc.h> |
26 | 31 | ||
27 | #include "generic.h" | 32 | #include "generic.h" |
28 | #include "eseries.h" | 33 | #include "eseries.h" |
34 | #include "clock.h" | ||
29 | 35 | ||
30 | /* ------------------------ E400 LCD definitions ------------------------ */ | 36 | /* ------------------------ E400 LCD definitions ------------------------ */ |
31 | 37 | ||
@@ -65,7 +71,10 @@ static unsigned long e400_pin_config[] __initdata = { | |||
65 | GPIO42_BTUART_RXD, | 71 | GPIO42_BTUART_RXD, |
66 | GPIO43_BTUART_TXD, | 72 | GPIO43_BTUART_TXD, |
67 | GPIO44_BTUART_CTS, | 73 | GPIO44_BTUART_CTS, |
68 | GPIO45_GPIO, /* Used by TMIO for #SUSPEND */ | 74 | |
75 | /* TMIO controller */ | ||
76 | GPIO19_GPIO, /* t7l66xb #PCLR */ | ||
77 | GPIO45_GPIO, /* t7l66xb #SUSPEND (NOT BTUART!) */ | ||
69 | 78 | ||
70 | /* wakeup */ | 79 | /* wakeup */ |
71 | GPIO0_GPIO | WAKEUP_ON_EDGE_RISE, | 80 | GPIO0_GPIO | WAKEUP_ON_EDGE_RISE, |
@@ -73,10 +82,60 @@ static unsigned long e400_pin_config[] __initdata = { | |||
73 | 82 | ||
74 | /* ---------------------------------------------------------------------- */ | 83 | /* ---------------------------------------------------------------------- */ |
75 | 84 | ||
85 | static struct mtd_partition partition_a = { | ||
86 | .name = "Internal NAND flash", | ||
87 | .offset = 0, | ||
88 | .size = MTDPART_SIZ_FULL, | ||
89 | }; | ||
90 | |||
91 | static uint8_t scan_ff_pattern[] = { 0xff, 0xff }; | ||
92 | |||
93 | static struct nand_bbt_descr e400_t7l66xb_nand_bbt = { | ||
94 | .options = 0, | ||
95 | .offs = 4, | ||
96 | .len = 2, | ||
97 | .pattern = scan_ff_pattern | ||
98 | }; | ||
99 | |||
100 | static struct tmio_nand_data e400_t7l66xb_nand_config = { | ||
101 | .num_partitions = 1, | ||
102 | .partition = &partition_a, | ||
103 | .badblock_pattern = &e400_t7l66xb_nand_bbt, | ||
104 | }; | ||
105 | |||
106 | static struct t7l66xb_platform_data e400_t7l66xb_info = { | ||
107 | .irq_base = IRQ_BOARD_START, | ||
108 | .enable = &eseries_tmio_enable, | ||
109 | .suspend = &eseries_tmio_suspend, | ||
110 | .resume = &eseries_tmio_resume, | ||
111 | |||
112 | .nand_data = &e400_t7l66xb_nand_config, | ||
113 | }; | ||
114 | |||
115 | static struct platform_device e400_t7l66xb_device = { | ||
116 | .name = "t7l66xb", | ||
117 | .id = -1, | ||
118 | .dev = { | ||
119 | .platform_data = &e400_t7l66xb_info, | ||
120 | }, | ||
121 | .num_resources = 2, | ||
122 | .resource = eseries_tmio_resources, | ||
123 | }; | ||
124 | |||
125 | /* ---------------------------------------------------------- */ | ||
126 | |||
127 | static struct platform_device *devices[] __initdata = { | ||
128 | &e400_t7l66xb_device, | ||
129 | }; | ||
130 | |||
76 | static void __init e400_init(void) | 131 | static void __init e400_init(void) |
77 | { | 132 | { |
78 | pxa2xx_mfp_config(ARRAY_AND_SIZE(e400_pin_config)); | 133 | pxa2xx_mfp_config(ARRAY_AND_SIZE(e400_pin_config)); |
134 | /* Fixme - e400 may have a switched clock */ | ||
135 | eseries_register_clks(); | ||
136 | eseries_get_tmio_gpios(); | ||
79 | set_pxa_fb_info(&e400_pxafb_mach_info); | 137 | set_pxa_fb_info(&e400_pxafb_mach_info); |
138 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
80 | pxa_set_udc_info(&e7xx_udc_mach_info); | 139 | pxa_set_udc_info(&e7xx_udc_mach_info); |
81 | } | 140 | } |
82 | 141 | ||