002-disable_emac_loopback_mode.patch 702 B

12345678910111213141516171819202122232425
  1. --- a/arch/powerpc/platforms/40x/kilauea.c
  2. +++ b/arch/powerpc/platforms/40x/kilauea.c
  3. @@ -21,6 +21,8 @@
  4. #include <asm/uic.h>
  5. #include <asm/pci-bridge.h>
  6. #include <asm/ppc4xx.h>
  7. +#include <asm/dcr.h>
  8. +#include <asm/dcr-regs.h>
  9. static __initdata struct of_device_id kilauea_of_bus[] = {
  10. { .compatible = "ibm,plb4", },
  11. @@ -46,6 +48,13 @@ static int __init kilauea_probe(void)
  12. ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
  13. + /*
  14. + * 405EX(r) has SDR0_MFR[E0CS/E1CS] set after reset. This selects
  15. + * the internal loopback mode. Clear these bits so that both EMACs
  16. + * don't use loopback mode as deafult.
  17. + */
  18. + mtdcri(SDR0, SDR0_MFR, mfdcri(SDR0, SDR0_MFR) & ~0x0c000000);
  19. +
  20. return 1;
  21. }