| .. | .. |
|---|
| 20 | 20 | #include <linux/mtd/mtd.h> |
|---|
| 21 | 21 | #include <linux/mtd/rawnand.h> |
|---|
| 22 | 22 | #include <linux/mtd/partitions.h> |
|---|
| 23 | +#include <linux/mtd/platnand.h> |
|---|
| 23 | 24 | #include <linux/delay.h> |
|---|
| 24 | 25 | #include <linux/gpio.h> |
|---|
| 25 | 26 | #include <asm/types.h> |
|---|
| .. | .. |
|---|
| 30 | 31 | #include <asm/irq.h> |
|---|
| 31 | 32 | #include <asm/mach/arch.h> |
|---|
| 32 | 33 | #include <asm/mach/flash.h> |
|---|
| 34 | + |
|---|
| 35 | +#include "irqs.h" |
|---|
| 33 | 36 | |
|---|
| 34 | 37 | #define IXDP425_SDA_PIN 7 |
|---|
| 35 | 38 | #define IXDP425_SCL_PIN 6 |
|---|
| .. | .. |
|---|
| 75 | 78 | }; |
|---|
| 76 | 79 | |
|---|
| 77 | 80 | 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) |
|---|
| 79 | 82 | { |
|---|
| 80 | | - struct nand_chip *this = mtd_to_nand(mtd); |
|---|
| 81 | 83 | int offset = (int)nand_get_controller_data(this); |
|---|
| 82 | 84 | |
|---|
| 83 | 85 | if (ctrl & NAND_CTRL_CHANGE) { |
|---|
| .. | .. |
|---|
| 93 | 95 | } |
|---|
| 94 | 96 | |
|---|
| 95 | 97 | if (cmd != NAND_CMD_NONE) |
|---|
| 96 | | - writeb(cmd, this->IO_ADDR_W + offset); |
|---|
| 98 | + writeb(cmd, this->legacy.IO_ADDR_W + offset); |
|---|
| 97 | 99 | } |
|---|
| 98 | 100 | |
|---|
| 99 | 101 | static struct platform_nand_data ixdp425_flash_nand_data = { |
|---|
| .. | .. |
|---|
| 185 | 187 | }; |
|---|
| 186 | 188 | |
|---|
| 187 | 189 | /* 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 | + |
|---|
| 188 | 206 | static struct eth_plat_info ixdp425_plat_eth[] = { |
|---|
| 189 | 207 | { |
|---|
| 190 | 208 | .phy = 0, |
|---|
| .. | .. |
|---|
| 202 | 220 | .name = "ixp4xx_eth", |
|---|
| 203 | 221 | .id = IXP4XX_ETH_NPEB, |
|---|
| 204 | 222 | .dev.platform_data = ixdp425_plat_eth, |
|---|
| 223 | + .num_resources = ARRAY_SIZE(ixp425_npeb_resources), |
|---|
| 224 | + .resource = ixp425_npeb_resources, |
|---|
| 205 | 225 | }, { |
|---|
| 206 | 226 | .name = "ixp4xx_eth", |
|---|
| 207 | 227 | .id = IXP4XX_ETH_NPEC, |
|---|
| 208 | 228 | .dev.platform_data = ixdp425_plat_eth + 1, |
|---|
| 229 | + .num_resources = ARRAY_SIZE(ixp425_npec_resources), |
|---|
| 230 | + .resource = ixp425_npec_resources, |
|---|
| 209 | 231 | } |
|---|
| 210 | 232 | }; |
|---|
| 211 | 233 | |
|---|