From 6c7a14084ae5f7dde3819e4ab43fd78ea82805fe Mon Sep 17 00:00:00 2001 From: wdenk Date: Sun, 11 Jul 2004 19:17:20 +0000 Subject: Patch by Mark Jonas, 01 Jul 2004: Added support for Total5100 and Total5200 (Rev.1 and Rev.2) MGT5100 and MPC5200 based Freescale platforms. --- cpu/mpc5xxx/fec.c | 8 ++++++++ cpu/mpc5xxx/ide.c | 6 ++++++ cpu/mpc5xxx/start.S | 3 +++ 3 files changed, 17 insertions(+) (limited to 'cpu/mpc5xxx') diff --git a/cpu/mpc5xxx/fec.c b/cpu/mpc5xxx/fec.c index e3e8065..81b932c 100644 --- a/cpu/mpc5xxx/fec.c +++ b/cpu/mpc5xxx/fec.c @@ -397,7 +397,13 @@ static int mpc5xxx_fec_init_phy(struct eth_device *dev, bd_t * bis) */ if (fec->xcv_type == SEVENWIRE) { /* 10MBit with 7-wire operation */ +#if defined(CONFIG_TOTAL5200) + /* 7-wire and USB2 on Ethernet */ + *(vu_long *)MPC5XXX_GPS_PORT_CONFIG |= 0x00030000; +#else /* !CONFIG_TOTAL5200 */ + /* 7-wire only */ *(vu_long *)MPC5XXX_GPS_PORT_CONFIG |= 0x00020000; +#endif /* CONFIG_TOTAL5200 */ } else { /* 100MBit with MD operation */ *(vu_long *)MPC5XXX_GPS_PORT_CONFIG |= 0x00050000; @@ -870,6 +876,8 @@ int mpc5xxx_fec_initialize(bd_t * bis) # else fec->xcv_type = MII10; # endif +#elif defined(CONFIG_TOTAL5200) + fec->xcv_type = SEVENWIRE; #else #error fec->xcv_type not initialized. #endif diff --git a/cpu/mpc5xxx/ide.c b/cpu/mpc5xxx/ide.c index 1969172..1af794c 100644 --- a/cpu/mpc5xxx/ide.c +++ b/cpu/mpc5xxx/ide.c @@ -41,7 +41,13 @@ int ide_preinit (void) struct mpc5xxx_sdma *psdma = (struct mpc5xxx_sdma *) MPC5XXX_SDMA; reg = *(vu_long *) MPC5XXX_GPS_PORT_CONFIG; +#if defined(CONFIG_TOTAL5200) + /* ATA cs0/1 on i2c2 clk/io */ + reg = (reg & ~0x03000000ul) | 0x02000000ul; +#else + /* ATA cs0/1 on Local Plus cs4/5 */ reg = (reg & ~0x03000000ul) | 0x01000000ul; +#endif /* CONFIG_TOTAL5200 */ *(vu_long *) MPC5XXX_GPS_PORT_CONFIG = reg; /* All sample codes do that... */ diff --git a/cpu/mpc5xxx/start.S b/cpu/mpc5xxx/start.S index 99cad9c..a2ac999 100644 --- a/cpu/mpc5xxx/start.S +++ b/cpu/mpc5xxx/start.S @@ -110,6 +110,9 @@ boot_warm: #if defined(CFG_RAMBOOT) #error CFG_LOWBOOT is incompatible with CFG_RAMBOOT #endif /* CFG_RAMBOOT */ +#if defined(CFG_LOWBOOT) +#error CFG_LOWBOOT is incompatible with MGT5100 +#endif /* CFG_LOWBOOT */ lis r4, CFG_DEFAULT_MBAR@h lis r3, START_REG(CFG_BOOTCS_START)@h ori r3, r3, START_REG(CFG_BOOTCS_START)@l -- cgit v1.1