aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/e400.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/e400.c')
-rw-r--r--arch/arm/mach-pxa/e400.c65
1 files changed, 62 insertions, 3 deletions
diff --git a/arch/arm/mach-pxa/e400.c b/arch/arm/mach-pxa/e400.c
index 544bbaa2062..7716ad0c3b3 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
85static struct mtd_partition partition_a = {
86 .name = "Internal NAND flash",
87 .offset = 0,
88 .size = MTDPART_SIZ_FULL,
89};
90
91static uint8_t scan_ff_pattern[] = { 0xff, 0xff };
92
93static struct nand_bbt_descr e400_t7l66xb_nand_bbt = {
94 .options = 0,
95 .offs = 4,
96 .len = 2,
97 .pattern = scan_ff_pattern
98};
99
100static 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
106static 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
115static 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
127static struct platform_device *devices[] __initdata = {
128 &e400_t7l66xb_device,
129};
130
76static void __init e400_init(void) 131static 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