#if defined (CONFIG_AVALANCHE_LOW_CPMAC) psp_config_add("cpmdio", s3, psp_config_strlen(s3), en_compile); psp_config_add("cpmac", s4, psp_config_strlen(s4), en_compile); #endif #if defined (CONFIG_AVALANCHE_HIGH_CPMAC) psp_config_add("cpmdio", s3, psp_config_strlen(s3), en_compile); psp_config_add("cpmac", s6, psp_config_strlen(s6), en_compile); #endif #if defined (CONFIG_AVALANCHE_CPMAC_AUTO) { char *phy_sel_ptr = prom_getenv("mac_phy_sel"); int phy_sel = SELECT_EXT_PHY_MAC; char *mac_port = prom_getenv("MAC_PORT"); /* Internal: 0, External: 1 */ if(phy_sel_ptr && (0 == strcmp(phy_sel_ptr, "int"))) { phy_sel = SELECT_INT_PHY_MAC; } //if(phy_sel == auto_detect_cpmac_phy()) if(!mac_port || 0 == strcmp(mac_port, "1")) { printk("Using the MAC with external PHY\n"); psp_config_add("cpmdio", s3, psp_config_strlen(s3), en_compile); psp_config_add("cpmac", s6, psp_config_strlen(s6), en_compile); } else { printk("Using the MAC with internal PHY\n"); psp_config_add("cpmdio", s3, psp_config_strlen(s3), en_compile); psp_config_add("cpmac", s4, psp_config_strlen(s4), en_compile); } } #endif