hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/arch/arm/mach-ixp4xx/ixdp425-setup.c
....@@ -20,6 +20,7 @@
2020 #include <linux/mtd/mtd.h>
2121 #include <linux/mtd/rawnand.h>
2222 #include <linux/mtd/partitions.h>
23
+#include <linux/mtd/platnand.h>
2324 #include <linux/delay.h>
2425 #include <linux/gpio.h>
2526 #include <asm/types.h>
....@@ -30,6 +31,8 @@
3031 #include <asm/irq.h>
3132 #include <asm/mach/arch.h>
3233 #include <asm/mach/flash.h>
34
+
35
+#include "irqs.h"
3336
3437 #define IXDP425_SDA_PIN 7
3538 #define IXDP425_SCL_PIN 6
....@@ -75,9 +78,8 @@
7578 };
7679
7780 static void
78
-ixdp425_flash_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
81
+ixdp425_flash_nand_cmd_ctrl(struct nand_chip *this, int cmd, unsigned int ctrl)
7982 {
80
- struct nand_chip *this = mtd_to_nand(mtd);
8183 int offset = (int)nand_get_controller_data(this);
8284
8385 if (ctrl & NAND_CTRL_CHANGE) {
....@@ -93,7 +95,7 @@
9395 }
9496
9597 if (cmd != NAND_CMD_NONE)
96
- writeb(cmd, this->IO_ADDR_W + offset);
98
+ writeb(cmd, this->legacy.IO_ADDR_W + offset);
9799 }
98100
99101 static struct platform_nand_data ixdp425_flash_nand_data = {
....@@ -185,6 +187,22 @@
185187 };
186188
187189 /* Built-in 10/100 Ethernet MAC interfaces */
190
+static struct resource ixp425_npeb_resources[] = {
191
+ {
192
+ .start = IXP4XX_EthB_BASE_PHYS,
193
+ .end = IXP4XX_EthB_BASE_PHYS + 0x0fff,
194
+ .flags = IORESOURCE_MEM,
195
+ },
196
+};
197
+
198
+static struct resource ixp425_npec_resources[] = {
199
+ {
200
+ .start = IXP4XX_EthC_BASE_PHYS,
201
+ .end = IXP4XX_EthC_BASE_PHYS + 0x0fff,
202
+ .flags = IORESOURCE_MEM,
203
+ },
204
+};
205
+
188206 static struct eth_plat_info ixdp425_plat_eth[] = {
189207 {
190208 .phy = 0,
....@@ -202,10 +220,14 @@
202220 .name = "ixp4xx_eth",
203221 .id = IXP4XX_ETH_NPEB,
204222 .dev.platform_data = ixdp425_plat_eth,
223
+ .num_resources = ARRAY_SIZE(ixp425_npeb_resources),
224
+ .resource = ixp425_npeb_resources,
205225 }, {
206226 .name = "ixp4xx_eth",
207227 .id = IXP4XX_ETH_NPEC,
208228 .dev.platform_data = ixdp425_plat_eth + 1,
229
+ .num_resources = ARRAY_SIZE(ixp425_npec_resources),
230
+ .resource = ixp425_npec_resources,
209231 }
210232 };
211233