aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf527/boards/ezkit.c
diff options
context:
space:
mode:
authorMichael Hennerich <michael.hennerich@analog.com>2007-10-29 04:55:18 -0400
committerBryan Wu <bryan.wu@analog.com>2007-10-29 04:55:18 -0400
commit64307f7db3690140a16c6748e65068f8a279877c (patch)
treea196c7c727711026c8cf7abfc7325a4ea47dba23 /arch/blackfin/mach-bf527/boards/ezkit.c
parentab472a0484cdcea1dc050c08563b9c869128e2e3 (diff)
Blackfin arch: add NFC driver support in BF527-EZKIT board
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'arch/blackfin/mach-bf527/boards/ezkit.c')
-rw-r--r--arch/blackfin/mach-bf527/boards/ezkit.c53
1 files changed, 53 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c
index 3e884f3a8182..bf1bedcc8868 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -41,9 +41,11 @@
41#include <linux/irq.h> 41#include <linux/irq.h>
42#include <linux/interrupt.h> 42#include <linux/interrupt.h>
43#include <linux/usb_sl811.h> 43#include <linux/usb_sl811.h>
44#include <asm/cplb.h>
44#include <asm/dma.h> 45#include <asm/dma.h>
45#include <asm/bfin5xx_spi.h> 46#include <asm/bfin5xx_spi.h>
46#include <asm/reboot.h> 47#include <asm/reboot.h>
48#include <asm/nand.h>
47#include <linux/spi/ad7877.h> 49#include <linux/spi/ad7877.h>
48 50
49/* 51/*
@@ -102,6 +104,53 @@ void __exit bfin_isp1761_exit(void)
102arch_initcall(bfin_isp1761_init); 104arch_initcall(bfin_isp1761_init);
103#endif 105#endif
104 106
107#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
108static struct mtd_partition partition_info[] = {
109 {
110 .name = "Linux Kernel",
111 .offset = 0,
112 .size = 4 * SIZE_1M,
113 },
114 {
115 .name = "File System",
116 .offset = 4 * SIZE_1M,
117 .size = (256 - 4) * SIZE_1M,
118 },
119};
120
121static struct bf5xx_nand_platform bf5xx_nand_platform = {
122 .page_size = NFC_PG_SIZE_256,
123 .data_width = NFC_NWIDTH_8,
124 .partitions = partition_info,
125 .nr_partitions = ARRAY_SIZE(partition_info),
126 .rd_dly = 3,
127 .wr_dly = 3,
128};
129
130static struct resource bf5xx_nand_resources[] = {
131 {
132 .start = NFC_CTL,
133 .end = NFC_DATA_RD + 2,
134 .flags = IORESOURCE_MEM,
135 },
136 {
137 .start = CH_NFC,
138 .end = CH_NFC,
139 .flags = IORESOURCE_IRQ,
140 },
141};
142
143static struct platform_device bf5xx_nand_device = {
144 .name = "bf5xx-nand",
145 .id = 0,
146 .num_resources = ARRAY_SIZE(bf5xx_nand_resources),
147 .resource = bf5xx_nand_resources,
148 .dev = {
149 .platform_data = &bf5xx_nand_platform,
150 },
151};
152#endif
153
105#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 154#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
106static struct resource bfin_pcmcia_cf_resources[] = { 155static struct resource bfin_pcmcia_cf_resources[] = {
107 { 156 {
@@ -650,6 +699,10 @@ static struct platform_device bfin_pata_device = {
650#endif 699#endif
651 700
652static struct platform_device *stamp_devices[] __initdata = { 701static struct platform_device *stamp_devices[] __initdata = {
702#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
703 &bf5xx_nand_device,
704#endif
705
653#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 706#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
654 &bfin_pcmcia_cf_device, 707 &bfin_pcmcia_cf_device,
655#endif 708#endif