Changeset 32820
- Timestamp:
- 2012-07-24T22:38:36+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/target/linux/ixp4xx/patches-3.3/185-mi424wr_support.patch
r31275 r32820 75 75 --- /dev/null 76 76 +++ b/arch/arm/mach-ixp4xx/mi424wr-setup.c 77 @@ -0,0 +1,3 45@@77 @@ -0,0 +1,380 @@ 78 78 +/* 79 79 + * arch/arm/mach-ixp4xx/mi424wr-setup.c … … 351 351 +}; 352 352 + 353 +static struct eth_plat_info mi424wr_ npeb_data = {353 +static struct eth_plat_info mi424wr_wan_data = { 354 354 + .phy = 17, /* KS8721 */ 355 355 + .rxq = 3, … … 357 357 +}; 358 358 + 359 +static struct eth_plat_info mi424wr_ npec_data = {359 +static struct eth_plat_info mi424wr_lan_data = { 360 360 + .phy = IXP4XX_ETH_PHY_MAX_ADDR, 361 361 + .phy_mask = 0x1e, /* ports 1-4 of the KS8995 switch */ … … 368 368 + .name = "ixp4xx_eth", 369 369 + .id = IXP4XX_ETH_NPEC, 370 + .dev.platform_data = &mi424wr_ npec_data,370 + .dev.platform_data = &mi424wr_lan_data, 371 371 + }, { 372 372 + .name = "ixp4xx_eth", 373 373 + .id = IXP4XX_ETH_NPEB, 374 + .dev.platform_data = &mi424wr_npeb_data, 374 + .dev.platform_data = &mi424wr_wan_data, 375 + } 376 +}; 377 + 378 +static struct eth_plat_info mi424wr_wanD_data = { 379 + .phy = 5, 380 + .rxq = 4, 381 + .txreadyq = 21, 382 +}; 383 + 384 +static struct eth_plat_info mi424wr_lanD_data = { 385 + .phy = IXP4XX_ETH_PHY_MAX_ADDR, 386 + .phy_mask = 0x1e, /* ports 1-4 of the KS8995 switch */ 387 + .rxq = 3, 388 + .txreadyq = 20, 389 +}; 390 + 391 +static struct platform_device mi424wr_npeD_devices[] = { 392 + { 393 + .name = "ixp4xx_eth", 394 + .id = IXP4XX_ETH_NPEB, 395 + .dev.platform_data = &mi424wr_lanD_data, 396 + }, { 397 + .name = "ixp4xx_eth", 398 + .id = IXP4XX_ETH_NPEC, 399 + .dev.platform_data = &mi424wr_wanD_data, 375 400 + } 376 401 +}; … … 382 407 + &mi424wr_latch_leds, 383 408 + &mi424wr_spi_bus, 384 + &mi424wr_npe_devices[0],385 + &mi424wr_npe_devices[1],386 409 +}; 387 410 + … … 406 429 + 407 430 + platform_add_devices(mi424wr_devices, ARRAY_SIZE(mi424wr_devices)); 431 + 432 + /* Need to figure out how to detect revD. 433 + * Look for a revision argument sent by redboot. 434 + */ 435 +#define revD 4 436 + if (system_rev == revD) { 437 + platform_device_register(&mi424wr_npeD_devices[0]); 438 + platform_device_register(&mi424wr_npeD_devices[1]); 439 + } else { 440 + platform_device_register(&mi424wr_npe_devices[0]); 441 + platform_device_register(&mi424wr_npe_devices[1]); 442 + } 408 443 +} 409 444 +
Note: See TracChangeset
for help on using the changeset viewer.