From 3f85ce27858c44ee75d3650a53154ebcec0e24f2 Mon Sep 17 00:00:00 2001 From: wdenk Date: Mon, 23 Feb 2004 16:11:30 +0000 Subject: * CVS add missing files * Cleanup compiler warnings * Fix problem with side effects in macros in include/usb.h * Patch by David Benson, 13 Nov 2003: bug 841358 - fix TFTP download size limit * Fixing bug 850768: improper flush_cache() in load_serial() * Fixing bug 834943: MPC8540 - missing volatile declarations * Patch by Stephen Williams, 09 Feb 2004: Add support for Xilinx SystemACE chip: - New files common/cmd_ace.c and include/systemace.h - Hook systemace support into cmd_fat and the partition manager * Patch by Travis Sawyer, 09 Feb 2004: Add bi_opbfreq & bi_iic_fast to 440GX bd_info as needed for Linux --- cpu/mpc85xx/tsec.c | 24 ++++++++++++------------ cpu/ppc4xx/440gx_enet.c | 8 ++++---- 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'cpu') diff --git a/cpu/mpc85xx/tsec.c b/cpu/mpc85xx/tsec.c index 4a5731e..e9ca340 100644 --- a/cpu/mpc85xx/tsec.c +++ b/cpu/mpc85xx/tsec.c @@ -49,9 +49,9 @@ static int tsec_send(struct eth_device* dev, volatile void *packet, int length); static int tsec_recv(struct eth_device* dev); static int tsec_init(struct eth_device* dev, bd_t * bd); static void tsec_halt(struct eth_device* dev); -static void init_registers(tsec_t *regs); -static void startup_tsec(tsec_t *regs); -static void init_phy(tsec_t *regs); +static void init_registers(volatile tsec_t *regs); +static void startup_tsec(volatile tsec_t *regs); +static void init_phy(volatile tsec_t *regs); /* Initialize device structure. returns 0 on failure, 1 on * success */ @@ -89,12 +89,12 @@ int tsec_initialize(bd_t *bis) * and brings the interface up */ int tsec_init(struct eth_device* dev, bd_t * bd) { - tsec_t *regs; + volatile tsec_t *regs; uint tempval; char tmpbuf[MAC_ADDR_LEN]; int i; - regs = (tsec_t *)(TSEC_BASE_ADDR); + regs = (volatile tsec_t *)(TSEC_BASE_ADDR); /* Make sure the controller is stopped */ tsec_halt(dev); @@ -146,7 +146,7 @@ int tsec_init(struct eth_device* dev, bd_t * bd) /* and then passes those bits on to the variable specified in */ /* value */ /* Before it does the read, it needs to clear the command field */ -uint read_phy_reg(tsec_t *regbase, uint phyid, uint offset) +uint read_phy_reg(volatile tsec_t *regbase, uint phyid, uint offset) { uint value; @@ -173,7 +173,7 @@ uint read_phy_reg(tsec_t *regbase, uint phyid, uint offset) } /* Setup the PHY */ -static void init_phy(tsec_t *regs) +static void init_phy(volatile tsec_t *regs) { uint testval; unsigned int timeout = TSEC_TIMEOUT; @@ -280,7 +280,7 @@ static void init_phy(tsec_t *regs) } -static void init_registers(tsec_t *regs) +static void init_registers(volatile tsec_t *regs) { /* Clear IEVENT */ regs->ievent = IEVENT_INIT_CLEAR; @@ -322,7 +322,7 @@ static void init_registers(tsec_t *regs) } -static void startup_tsec(tsec_t *regs) +static void startup_tsec(volatile tsec_t *regs) { int i; @@ -363,7 +363,7 @@ static int tsec_send(struct eth_device* dev, volatile void *packet, int length) { int i; int result = 0; - tsec_t * regs = (tsec_t *)(TSEC_BASE_ADDR); + volatile tsec_t * regs = (volatile tsec_t *)(TSEC_BASE_ADDR); /* Find an empty buffer descriptor */ for(i=0; rtx.txbd[txIdx].status & TXBD_READY; i++) { @@ -397,7 +397,7 @@ static int tsec_send(struct eth_device* dev, volatile void *packet, int length) static int tsec_recv(struct eth_device* dev) { int length; - tsec_t *regs = (tsec_t *)(TSEC_BASE_ADDR); + volatile tsec_t *regs = (volatile tsec_t *)(TSEC_BASE_ADDR); while(!(rtx.rxbd[rxIdx].status & RXBD_EMPTY)) { @@ -428,7 +428,7 @@ static int tsec_recv(struct eth_device* dev) static void tsec_halt(struct eth_device* dev) { - tsec_t *regs = (tsec_t *)(TSEC_BASE_ADDR); + volatile tsec_t *regs = (volatile tsec_t *)(TSEC_BASE_ADDR); regs->dmactrl &= ~(DMACTRL_GRS | DMACTRL_GTS); regs->dmactrl |= (DMACTRL_GRS | DMACTRL_GTS); diff --git a/cpu/ppc4xx/440gx_enet.c b/cpu/ppc4xx/440gx_enet.c index 4502085..c8259b1 100644 --- a/cpu/ppc4xx/440gx_enet.c +++ b/cpu/ppc4xx/440gx_enet.c @@ -1074,16 +1074,16 @@ int ppc_440x_eth_initialize (bd_t * bis) /* Allocate device structure */ dev = (struct eth_device *) malloc (sizeof (*dev)); if (dev == NULL) { - printf (__FUNCTION__ - ": Cannot allocate eth_device %d\n", eth_num); + printf ("ppc_440x_eth_initialize: " + "Cannot allocate eth_device %d\n", eth_num); return (-1); } /* Allocate our private use data */ hw = (EMAC_440GX_HW_PST) malloc (sizeof (*hw)); if (hw == NULL) { - printf (__FUNCTION__ - ": Cannot allocate private hw data for eth_device %d", + printf ("ppc_440x_eth_initialize: " + "Cannot allocate private hw data for eth_device %d", eth_num); free (dev); return (-1); -- cgit v1.1