aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/littleton.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-07-23 21:24:08 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-23 21:24:08 -0400
commit30d38542ec777468bb6a31829076a2dbc5690e35 (patch)
tree698b7a4fdd730befa34c4c9642cdbe72ce7d336a /arch/arm/mach-pxa/littleton.c
parent20b7997e8abdf338dcc27fb4f1333c4973a7f113 (diff)
parent044e5f45e4ad890d03bd1e8bb44c634397cac24d (diff)
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (85 commits) [ARM] pxa: add base support for PXA930 Handheld Platform (aka SAAR) [ARM] pxa: add base support for PXA930 Evaluation Board (aka TavorEVB) [ARM] pxa: add base support for PXA930 (aka Tavor-P) [ARM] Update mach-types [ARM] pxa: make littleton to use the new smc91x platform data [ARM] pxa: make zylonite to use the new smc91x platform data [ARM] pxa: make mainstone to use the new smc91x platform data [ARM] pxa: make lubbock to use new smc91x platform data [NET] smc91x: prepare SMC_USE_PXA_DMA to be specified in platform data [NET] smc91x: prepare for SMC_IO_SHIFT to be a platform configurable variable [NET] smc91x: add SMC91X_NOWAIT flag to platform data [NET] smc91x: favor the use of SMC91X_USE_* instead of SMC_CAN_USE_* [NET] smc91x: remove "irq_flags" from "struct smc91x_platdata" [ARM] 5146/1: pxa2xx: convert all boards to call pxa2xx_transceiver_mode helper Support for LCD on e740 e750 e400 and e800 e-series PDAs E-series UDC support PXA UDC - allow use of inverted GPIO for pullup Add e350 support Fix broken e-series build E-series GPIO / IRQ definitions. ...
Diffstat (limited to 'arch/arm/mach-pxa/littleton.c')
-rw-r--r--arch/arm/mach-pxa/littleton.c70
1 files changed, 66 insertions, 4 deletions
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c
index 530654474bb2..dd759d03a9fd 100644
--- a/arch/arm/mach-pxa/littleton.c
+++ b/arch/arm/mach-pxa/littleton.c
@@ -20,6 +20,7 @@
20#include <linux/delay.h> 20#include <linux/delay.h>
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/clk.h> 22#include <linux/clk.h>
23#include <linux/smc91x.h>
23 24
24#include <asm/types.h> 25#include <asm/types.h>
25#include <asm/setup.h> 26#include <asm/setup.h>
@@ -38,6 +39,7 @@
38#include <asm/arch/pxafb.h> 39#include <asm/arch/pxafb.h>
39#include <asm/arch/ssp.h> 40#include <asm/arch/ssp.h>
40#include <asm/arch/pxa27x_keypad.h> 41#include <asm/arch/pxa27x_keypad.h>
42#include <asm/arch/pxa3xx_nand.h>
41#include <asm/arch/littleton.h> 43#include <asm/arch/littleton.h>
42 44
43#include "generic.h" 45#include "generic.h"
@@ -101,18 +103,26 @@ static struct resource smc91x_resources[] = {
101 [1] = { 103 [1] = {
102 .start = IRQ_GPIO(mfp_to_gpio(MFP_PIN_GPIO90)), 104 .start = IRQ_GPIO(mfp_to_gpio(MFP_PIN_GPIO90)),
103 .end = IRQ_GPIO(mfp_to_gpio(MFP_PIN_GPIO90)), 105 .end = IRQ_GPIO(mfp_to_gpio(MFP_PIN_GPIO90)),
104 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_FALLING, 106 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
105 } 107 }
106}; 108};
107 109
110static struct smc91x_platdata littleton_smc91x_info = {
111 .flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT |
112 SMC91X_NOWAIT | SMC91X_USE_DMA,
113};
114
108static struct platform_device smc91x_device = { 115static struct platform_device smc91x_device = {
109 .name = "smc91x", 116 .name = "smc91x",
110 .id = 0, 117 .id = 0,
111 .num_resources = ARRAY_SIZE(smc91x_resources), 118 .num_resources = ARRAY_SIZE(smc91x_resources),
112 .resource = smc91x_resources, 119 .resource = smc91x_resources,
120 .dev = {
121 .platform_data = &littleton_smc91x_info,
122 },
113}; 123};
114 124
115#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULES) 125#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
116/* use bit 30, 31 as the indicator of command parameter number */ 126/* use bit 30, 31 as the indicator of command parameter number */
117#define CMD0(x) ((0x00000000) | ((x) << 9)) 127#define CMD0(x) ((0x00000000) | ((x) << 9))
118#define CMD1(x, x1) ((0x40000000) | ((x) << 9) | 0x100 | (x1)) 128#define CMD1(x, x1) ((0x40000000) | ((x) << 9) | 0x100 | (x1))
@@ -311,9 +321,9 @@ static void littleton_init_lcd(void)
311} 321}
312#else 322#else
313static inline void littleton_init_lcd(void) {}; 323static inline void littleton_init_lcd(void) {};
314#endif /* CONFIG_FB_PXA || CONFIG_FB_PXA_MODULES */ 324#endif /* CONFIG_FB_PXA || CONFIG_FB_PXA_MODULE */
315 325
316#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULES) 326#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
317static unsigned int littleton_matrix_key_map[] = { 327static unsigned int littleton_matrix_key_map[] = {
318 /* KEY(row, col, key_code) */ 328 /* KEY(row, col, key_code) */
319 KEY(1, 3, KEY_0), KEY(0, 0, KEY_1), KEY(1, 0, KEY_2), KEY(2, 0, KEY_3), 329 KEY(1, 3, KEY_0), KEY(0, 0, KEY_1), KEY(1, 0, KEY_2), KEY(2, 0, KEY_3),
@@ -361,6 +371,57 @@ static void __init littleton_init_keypad(void)
361static inline void littleton_init_keypad(void) {} 371static inline void littleton_init_keypad(void) {}
362#endif 372#endif
363 373
374#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
375static struct mtd_partition littleton_nand_partitions[] = {
376 [0] = {
377 .name = "Bootloader",
378 .offset = 0,
379 .size = 0x060000,
380 .mask_flags = MTD_WRITEABLE, /* force read-only */
381 },
382 [1] = {
383 .name = "Kernel",
384 .offset = 0x060000,
385 .size = 0x200000,
386 .mask_flags = MTD_WRITEABLE, /* force read-only */
387 },
388 [2] = {
389 .name = "Filesystem",
390 .offset = 0x0260000,
391 .size = 0x3000000, /* 48M - rootfs */
392 },
393 [3] = {
394 .name = "MassStorage",
395 .offset = 0x3260000,
396 .size = 0x3d40000,
397 },
398 [4] = {
399 .name = "BBT",
400 .offset = 0x6FA0000,
401 .size = 0x80000,
402 .mask_flags = MTD_WRITEABLE, /* force read-only */
403 },
404 /* NOTE: we reserve some blocks at the end of the NAND flash for
405 * bad block management, and the max number of relocation blocks
406 * differs on different platforms. Please take care with it when
407 * defining the partition table.
408 */
409};
410
411static struct pxa3xx_nand_platform_data littleton_nand_info = {
412 .enable_arbiter = 1,
413 .parts = littleton_nand_partitions,
414 .nr_parts = ARRAY_SIZE(littleton_nand_partitions),
415};
416
417static void __init littleton_init_nand(void)
418{
419 pxa3xx_set_nand_info(&littleton_nand_info);
420}
421#else
422static inline void littleton_init_nand(void) {}
423#endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */
424
364static void __init littleton_init(void) 425static void __init littleton_init(void)
365{ 426{
366 /* initialize MFP configurations */ 427 /* initialize MFP configurations */
@@ -374,6 +435,7 @@ static void __init littleton_init(void)
374 435
375 littleton_init_lcd(); 436 littleton_init_lcd();
376 littleton_init_keypad(); 437 littleton_init_keypad();
438 littleton_init_nand();
377} 439}
378 440
379MACHINE_START(LITTLETON, "Marvell Form Factor Development Platform (aka Littleton)") 441MACHINE_START(LITTLETON, "Marvell Form Factor Development Platform (aka Littleton)")