| .. | .. |
|---|
| 11 | 11 | #include <linux/irq.h> |
|---|
| 12 | 12 | #include <linux/kernel.h> |
|---|
| 13 | 13 | #include <linux/pci.h> |
|---|
| 14 | +#include <linux/platform_data/wan_ixp4xx_hss.h> |
|---|
| 14 | 15 | #include <linux/serial_8250.h> |
|---|
| 15 | 16 | #include <asm/mach-types.h> |
|---|
| 16 | 17 | #include <asm/mach/arch.h> |
|---|
| 17 | 18 | #include <asm/mach/flash.h> |
|---|
| 18 | 19 | #include <asm/mach/pci.h> |
|---|
| 19 | 20 | #include <asm/system_info.h> |
|---|
| 21 | + |
|---|
| 22 | +#include "irqs.h" |
|---|
| 20 | 23 | |
|---|
| 21 | 24 | #define SLOT_ETHA 0x0B /* IDSEL = AD21 */ |
|---|
| 22 | 25 | #define SLOT_ETHB 0x0C /* IDSEL = AD20 */ |
|---|
| .. | .. |
|---|
| 270 | 273 | |
|---|
| 271 | 274 | |
|---|
| 272 | 275 | /* Built-in 10/100 Ethernet MAC interfaces */ |
|---|
| 276 | +static struct resource eth_npeb_resources[] = { |
|---|
| 277 | + { |
|---|
| 278 | + .start = IXP4XX_EthB_BASE_PHYS, |
|---|
| 279 | + .end = IXP4XX_EthB_BASE_PHYS + 0x0fff, |
|---|
| 280 | + .flags = IORESOURCE_MEM, |
|---|
| 281 | + }, |
|---|
| 282 | +}; |
|---|
| 283 | + |
|---|
| 284 | +static struct resource eth_npec_resources[] = { |
|---|
| 285 | + { |
|---|
| 286 | + .start = IXP4XX_EthC_BASE_PHYS, |
|---|
| 287 | + .end = IXP4XX_EthC_BASE_PHYS + 0x0fff, |
|---|
| 288 | + .flags = IORESOURCE_MEM, |
|---|
| 289 | + }, |
|---|
| 290 | +}; |
|---|
| 291 | + |
|---|
| 273 | 292 | static struct eth_plat_info eth_plat[] = { |
|---|
| 274 | 293 | { |
|---|
| 275 | 294 | .phy = 0, |
|---|
| .. | .. |
|---|
| 287 | 306 | .name = "ixp4xx_eth", |
|---|
| 288 | 307 | .id = IXP4XX_ETH_NPEB, |
|---|
| 289 | 308 | .dev.platform_data = eth_plat, |
|---|
| 309 | + .num_resources = ARRAY_SIZE(eth_npeb_resources), |
|---|
| 310 | + .resource = eth_npeb_resources, |
|---|
| 290 | 311 | }, { |
|---|
| 291 | 312 | .name = "ixp4xx_eth", |
|---|
| 292 | 313 | .id = IXP4XX_ETH_NPEC, |
|---|
| 293 | 314 | .dev.platform_data = eth_plat + 1, |
|---|
| 315 | + .num_resources = ARRAY_SIZE(eth_npec_resources), |
|---|
| 316 | + .resource = eth_npec_resources, |
|---|
| 294 | 317 | } |
|---|
| 295 | 318 | }; |
|---|
| 296 | 319 | |
|---|
| .. | .. |
|---|
| 403 | 426 | if (hw_bits & CFG_HW_HAS_HSS1) |
|---|
| 404 | 427 | device_tab[devices++] = &device_hss_tab[1]; /* max index 5 */ |
|---|
| 405 | 428 | |
|---|
| 429 | + hss_plat[0].timer_freq = ixp4xx_timer_freq; |
|---|
| 430 | + hss_plat[1].timer_freq = ixp4xx_timer_freq; |
|---|
| 431 | + |
|---|
| 406 | 432 | gpio_request(GPIO_SCL, "SCL/clock"); |
|---|
| 407 | 433 | gpio_request(GPIO_SDA, "SDA/data"); |
|---|
| 408 | 434 | gpio_request(GPIO_STR, "strobe"); |
|---|