aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1/board-h2.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2006-12-07 16:58:17 -0500
committerTony Lindgren <tony@atomide.com>2007-09-20 21:34:50 -0400
commita524626b113e36fc70cb456449444018e3045d5f (patch)
tree90307a026ae10a96d214d8822d363e2452df7d72 /arch/arm/mach-omap1/board-h2.c
parentc79ed1940ca9a4af5e9c182ac51f28dadd32956d (diff)
ARM: OMAP: Sync board specific files with linux-omap
This patch syncs omap board specific files with linux-omap tree. Patch consists mostly of driver updates done in linux-omap tree for drivers not yet in mainline kernel. Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1/board-h2.c')
-rw-r--r--arch/arm/mach-omap1/board-h2.c79
1 files changed, 79 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index 48c8c9195dc3..d901dcbe8066 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -139,6 +139,66 @@ static struct platform_device h2_nor_device = {
139 .resource = &h2_nor_resource, 139 .resource = &h2_nor_resource,
140}; 140};
141 141
142#if 0 /* REVISIT: Enable when nand_platform_data is applied */
143
144static struct mtd_partition h2_nand_partitions[] = {
145#if 0
146 /* REVISIT: enable these partitions if you make NAND BOOT
147 * work on your H2 (rev C or newer); published versions of
148 * x-load only support P2 and H3.
149 */
150 {
151 .name = "xloader",
152 .offset = 0,
153 .size = 64 * 1024,
154 .mask_flags = MTD_WRITEABLE, /* force read-only */
155 },
156 {
157 .name = "bootloader",
158 .offset = MTDPART_OFS_APPEND,
159 .size = 256 * 1024,
160 .mask_flags = MTD_WRITEABLE, /* force read-only */
161 },
162 {
163 .name = "params",
164 .offset = MTDPART_OFS_APPEND,
165 .size = 192 * 1024,
166 },
167 {
168 .name = "kernel",
169 .offset = MTDPART_OFS_APPEND,
170 .size = 2 * SZ_1M,
171 },
172#endif
173 {
174 .name = "filesystem",
175 .size = MTDPART_SIZ_FULL,
176 .offset = MTDPART_OFS_APPEND,
177 },
178};
179
180/* dip switches control NAND chip access: 8 bit, 16 bit, or neither */
181static struct nand_platform_data h2_nand_data = {
182 .options = NAND_SAMSUNG_LP_OPTIONS,
183 .parts = h2_nand_partitions,
184 .nr_parts = ARRAY_SIZE(h2_nand_partitions),
185};
186
187static struct resource h2_nand_resource = {
188 .flags = IORESOURCE_MEM,
189};
190
191static struct platform_device h2_nand_device = {
192 .name = "omapnand",
193 .id = 0,
194 .dev = {
195 .platform_data = &h2_nand_data,
196 },
197 .num_resources = 1,
198 .resource = &h2_nand_resource,
199};
200#endif
201
142static struct resource h2_smc91x_resources[] = { 202static struct resource h2_smc91x_resources[] = {
143 [0] = { 203 [0] = {
144 .start = OMAP1610_ETHR_START, /* Physical */ 204 .start = OMAP1610_ETHR_START, /* Physical */
@@ -218,11 +278,15 @@ static struct resource h2_irda_resources[] = {
218 .flags = IORESOURCE_IRQ, 278 .flags = IORESOURCE_IRQ,
219 }, 279 },
220}; 280};
281
282static u64 irda_dmamask = 0xffffffff;
283
221static struct platform_device h2_irda_device = { 284static struct platform_device h2_irda_device = {
222 .name = "omapirda", 285 .name = "omapirda",
223 .id = 0, 286 .id = 0,
224 .dev = { 287 .dev = {
225 .platform_data = &h2_irda_data, 288 .platform_data = &h2_irda_data,
289 .dma_mask = &irda_dmamask,
226 }, 290 },
227 .num_resources = ARRAY_SIZE(h2_irda_resources), 291 .num_resources = ARRAY_SIZE(h2_irda_resources),
228 .resource = h2_irda_resources, 292 .resource = h2_irda_resources,
@@ -270,6 +334,7 @@ static struct platform_device h2_mcbsp1_device = {
270 334
271static struct platform_device *h2_devices[] __initdata = { 335static struct platform_device *h2_devices[] __initdata = {
272 &h2_nor_device, 336 &h2_nor_device,
337 //&h2_nand_device,
273 &h2_smc91x_device, 338 &h2_smc91x_device,
274 &h2_irda_device, 339 &h2_irda_device,
275 &h2_kp_device, 340 &h2_kp_device,
@@ -333,6 +398,13 @@ static struct omap_board_config_kernel h2_config[] __initdata = {
333 { OMAP_TAG_LCD, &h2_lcd_config }, 398 { OMAP_TAG_LCD, &h2_lcd_config },
334}; 399};
335 400
401#define H2_NAND_RB_GPIO_PIN 62
402
403static int h2_nand_dev_ready(struct nand_platform_data *data)
404{
405 return omap_get_gpio_datain(H2_NAND_RB_GPIO_PIN);
406}
407
336static void __init h2_init(void) 408static void __init h2_init(void)
337{ 409{
338 /* Here we assume the NOR boot config: NOR on CS3 (possibly swapped 410 /* Here we assume the NOR boot config: NOR on CS3 (possibly swapped
@@ -347,6 +419,13 @@ static void __init h2_init(void)
347 h2_nor_resource.end = h2_nor_resource.start = omap_cs3_phys(); 419 h2_nor_resource.end = h2_nor_resource.start = omap_cs3_phys();
348 h2_nor_resource.end += SZ_32M - 1; 420 h2_nor_resource.end += SZ_32M - 1;
349 421
422#if 0 /* REVISIT: Enable when nand_platform_data is applied */
423 h2_nand_resource.end = h2_nand_resource.start = OMAP_CS2B_PHYS;
424 h2_nand_resource.end += SZ_4K - 1;
425 if (!(omap_request_gpio(H2_NAND_RB_GPIO_PIN)))
426 h2_nand_data.dev_ready = h2_nand_dev_ready;
427#endif
428
350 omap_cfg_reg(L3_1610_FLASH_CS2B_OE); 429 omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
351 omap_cfg_reg(M8_1610_FLASH_CS2B_WE); 430 omap_cfg_reg(M8_1610_FLASH_CS2B_WE);
352 431