diff options
Diffstat (limited to 'cpu')
-rw-r--r-- | cpu/arm920t/at91rm9200/ether.c | 2 | ||||
-rw-r--r-- | cpu/mpc5xxx/fec.c | 4 | ||||
-rw-r--r-- | cpu/mpc5xxx/i2c.c | 13 | ||||
-rw-r--r-- | cpu/mpc8220/fec.c | 2 | ||||
-rw-r--r-- | cpu/mpc8220/i2c.c | 14 | ||||
-rw-r--r-- | cpu/mpc824x/drivers/i2c/i2c.c | 4 | ||||
-rw-r--r-- | cpu/mpc8260/i2c.c | 2 | ||||
-rw-r--r-- | cpu/mpc83xx/i2c.c | 4 | ||||
-rw-r--r-- | cpu/mpc85xx/i2c.c | 4 | ||||
-rw-r--r-- | cpu/mpc8xx/config.mk | 2 | ||||
-rw-r--r-- | cpu/mpc8xx/i2c.c | 2 | ||||
-rw-r--r-- | cpu/mpc8xx/spi.c | 4 | ||||
-rw-r--r-- | cpu/mpc8xx/video.c | 6 | ||||
-rw-r--r-- | cpu/ppc4xx/4xx_enet.c | 14 | ||||
-rw-r--r-- | cpu/ppc4xx/i2c.c | 2 | ||||
-rw-r--r-- | cpu/ppc4xx/spd_sdram.c | 2 |
16 files changed, 45 insertions, 36 deletions
diff --git a/cpu/arm920t/at91rm9200/ether.c b/cpu/arm920t/at91rm9200/ether.c index d88517f..ca5b7d1 100644 --- a/cpu/arm920t/at91rm9200/ether.c +++ b/cpu/arm920t/at91rm9200/ether.c @@ -184,7 +184,7 @@ int eth_init (bd_t * bd) /* Init Ehternet buffers */ for (i = 0; i < RBF_FRAMEMAX; i++) { - rbfdt[i].addr = rbf_framebuf[i]; + rbfdt[i].addr = (unsigned long)rbf_framebuf[i]; rbfdt[i].size = 0; } rbfdt[RBF_FRAMEMAX - 1].addr |= RBF_WRAP; diff --git a/cpu/mpc5xxx/fec.c b/cpu/mpc5xxx/fec.c index c3d30a0..eadb7ec 100644 --- a/cpu/mpc5xxx/fec.c +++ b/cpu/mpc5xxx/fec.c @@ -320,7 +320,7 @@ static int mpc5xxx_fec_init(struct eth_device *dev, bd_t * bis) * Set individual address filter for unicast address * and set physical address registers. */ - mpc5xxx_fec_set_hwaddr(fec, dev->enetaddr); + mpc5xxx_fec_set_hwaddr(fec, (char *)dev->enetaddr); /* * Set multicast address filter @@ -785,7 +785,7 @@ static int mpc5xxx_fec_recv(struct eth_device *dev) unsigned long ievent; int frame_length, len = 0; NBUF *frame; - char buff[FEC_MAX_PKT_SIZE]; + uchar buff[FEC_MAX_PKT_SIZE]; #if (DEBUG & 0x1) printf ("mpc5xxx_fec_recv %d Start...\n", fec->rbdIndex); diff --git a/cpu/mpc5xxx/i2c.c b/cpu/mpc5xxx/i2c.c index 845f7c0..044db46 100644 --- a/cpu/mpc5xxx/i2c.c +++ b/cpu/mpc5xxx/i2c.c @@ -55,8 +55,9 @@ static int mpc_get_fdr (int); static int mpc_reg_in(volatile u32 *reg) { - return *reg >> 24; + int ret = *reg >> 24; __asm__ __volatile__ ("eieio"); + return ret; } static void mpc_reg_out(volatile u32 *reg, int val, int mask) @@ -298,7 +299,7 @@ int i2c_probe(uchar chip) int i2c_read(uchar chip, uint addr, int alen, uchar *buf, int len) { - uchar xaddr[4]; + char xaddr[4]; struct mpc5xxx_i2c * regs = (struct mpc5xxx_i2c *)I2C_BASE; int ret = -1; @@ -329,7 +330,7 @@ int i2c_read(uchar chip, uint addr, int alen, uchar *buf, int len) goto Done; } - if (receive_bytes(chip, buf, len)) { + if (receive_bytes(chip, (char *)buf, len)) { printf("i2c_read: receive_bytes failed\n"); goto Done; } @@ -342,7 +343,7 @@ Done: int i2c_write(uchar chip, uint addr, int alen, uchar *buf, int len) { - uchar xaddr[4]; + char xaddr[4]; struct mpc5xxx_i2c *regs = (struct mpc5xxx_i2c *)I2C_BASE; int ret = -1; @@ -367,7 +368,7 @@ int i2c_write(uchar chip, uint addr, int alen, uchar *buf, int len) goto Done; } - if (send_bytes(chip, buf, len)) { + if (send_bytes(chip, (char *)buf, len)) { printf("i2c_write: send_bytes failed\n"); goto Done; } @@ -380,7 +381,7 @@ Done: uchar i2c_reg_read(uchar chip, uchar reg) { - char buf; + uchar buf; i2c_read(chip, reg, 1, &buf, 1); diff --git a/cpu/mpc8220/fec.c b/cpu/mpc8220/fec.c index e974ab3..d5cd22e 100644 --- a/cpu/mpc8220/fec.c +++ b/cpu/mpc8220/fec.c @@ -330,7 +330,7 @@ static int mpc8220_fec_init (struct eth_device *dev, bd_t * bis) * Set individual address filter for unicast address * and set physical address registers. */ - mpc8220_fec_set_hwaddr (fec, dev->enetaddr); + mpc8220_fec_set_hwaddr (fec, (char *)(dev->enetaddr)); /* * Set multicast address filter diff --git a/cpu/mpc8220/i2c.c b/cpu/mpc8220/i2c.c index e9d0771..62f7c0f 100644 --- a/cpu/mpc8220/i2c.c +++ b/cpu/mpc8220/i2c.c @@ -73,8 +73,10 @@ static int mpc_get_fdr (int); static int mpc_reg_in (volatile u32 * reg) { - return *reg >> 24; + int ret; + ret = *reg >> 24; __asm__ __volatile__ ("eieio"); + return ret; } static void mpc_reg_out (volatile u32 * reg, int val, int mask) @@ -324,7 +326,7 @@ int i2c_read (uchar chip, uint addr, int alen, uchar * buf, int len) goto Done; } - if (send_bytes (chip, &xaddr[4 - alen], alen)) { + if (send_bytes (chip, (char *)&xaddr[4 - alen], alen)) { printf ("i2c_read: send_bytes failed\n"); goto Done; } @@ -335,7 +337,7 @@ int i2c_read (uchar chip, uint addr, int alen, uchar * buf, int len) goto Done; } - if (receive_bytes (chip, buf, len)) { + if (receive_bytes (chip, (char *)buf, len)) { printf ("i2c_read: receive_bytes failed\n"); goto Done; } @@ -368,12 +370,12 @@ int i2c_write (uchar chip, uint addr, int alen, uchar * buf, int len) goto Done; } - if (send_bytes (chip, &xaddr[4 - alen], alen)) { + if (send_bytes (chip, (char *)&xaddr[4 - alen], alen)) { printf ("i2c_write: send_bytes failed\n"); goto Done; } - if (send_bytes (chip, buf, len)) { + if (send_bytes (chip, (char *)buf, len)) { printf ("i2c_write: send_bytes failed\n"); goto Done; } @@ -386,7 +388,7 @@ int i2c_write (uchar chip, uint addr, int alen, uchar * buf, int len) uchar i2c_reg_read (uchar chip, uchar reg) { - char buf; + uchar buf; i2c_read (chip, reg, 1, &buf, 1); diff --git a/cpu/mpc824x/drivers/i2c/i2c.c b/cpu/mpc824x/drivers/i2c/i2c.c index 7445a1c..3add687 100644 --- a/cpu/mpc824x/drivers/i2c/i2c.c +++ b/cpu/mpc824x/drivers/i2c/i2c.c @@ -264,12 +264,12 @@ int i2c_probe (uchar chip) * and looking for an <ACK> back. */ udelay (10000); - return i2c_read (chip, 0, 1, (char *) &tmp, 1); + return i2c_read (chip, 0, 1, (uchar *) &tmp, 1); } uchar i2c_reg_read (uchar i2c_addr, uchar reg) { - char buf[1]; + uchar buf[1]; i2c_read (i2c_addr, reg, 1, buf, 1); diff --git a/cpu/mpc8260/i2c.c b/cpu/mpc8260/i2c.c index e0ac684..ea97ab8 100644 --- a/cpu/mpc8260/i2c.c +++ b/cpu/mpc8260/i2c.c @@ -752,7 +752,7 @@ i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len) uchar i2c_reg_read(uchar chip, uchar reg) { - char buf; + uchar buf; i2c_read(chip, reg, 1, &buf, 1); diff --git a/cpu/mpc83xx/i2c.c b/cpu/mpc83xx/i2c.c index 7ccb8a9..4e70f80 100644 --- a/cpu/mpc83xx/i2c.c +++ b/cpu/mpc83xx/i2c.c @@ -233,12 +233,12 @@ int i2c_probe (uchar chip) * and looking for an <ACK> back. */ udelay(10000); - return i2c_read (chip, 0, 1, (char *)&tmp, 1); + return i2c_read (chip, 0, 1, (uchar *)&tmp, 1); } uchar i2c_reg_read (uchar i2c_addr, uchar reg) { - char buf[1]; + uchar buf[1]; i2c_read (i2c_addr, reg, 1, buf, 1); diff --git a/cpu/mpc85xx/i2c.c b/cpu/mpc85xx/i2c.c index 2d08487..32dcf5d 100644 --- a/cpu/mpc85xx/i2c.c +++ b/cpu/mpc85xx/i2c.c @@ -245,12 +245,12 @@ int i2c_probe (uchar chip) * and looking for an <ACK> back. */ udelay(10000); - return i2c_read (chip, 0, 1, (char *)&tmp, 1); + return i2c_read (chip, 0, 1, (uchar *)&tmp, 1); } uchar i2c_reg_read (uchar i2c_addr, uchar reg) { - char buf[1]; + uchar buf[1]; i2c_read (i2c_addr, reg, 1, buf, 1); diff --git a/cpu/mpc8xx/config.mk b/cpu/mpc8xx/config.mk index bfa6625..5fa150e 100644 --- a/cpu/mpc8xx/config.mk +++ b/cpu/mpc8xx/config.mk @@ -21,6 +21,6 @@ # MA 02111-1307 USA # -PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi -fno-strict-aliasing +PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi -fno-strict-aliasing PLATFORM_CPPFLAGS += -DCONFIG_8xx -ffixed-r2 -ffixed-r29 -mstring -mcpu=860 -msoft-float diff --git a/cpu/mpc8xx/i2c.c b/cpu/mpc8xx/i2c.c index baa3552..682db53 100644 --- a/cpu/mpc8xx/i2c.c +++ b/cpu/mpc8xx/i2c.c @@ -724,7 +724,7 @@ int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len) uchar i2c_reg_read(uchar i2c_addr, uchar reg) { - char buf; + uchar buf; i2c_init(CFG_I2C_SPEED, CFG_I2C_SLAVE); diff --git a/cpu/mpc8xx/spi.c b/cpu/mpc8xx/spi.c index 9213d10..e318ed0 100644 --- a/cpu/mpc8xx/spi.c +++ b/cpu/mpc8xx/spi.c @@ -525,11 +525,11 @@ int spi_post_test (int flags) for (i = 0; i < TEST_NUM; i++) { for (l = TEST_MIN_LENGTH; l <= TEST_MAX_LENGTH; l += 8) { - packet_fill (txbuf, l); + packet_fill ((char *)txbuf, l); spi_xfer (l); - if (packet_check (rxbuf, l) < 0) { + if (packet_check ((char *)rxbuf, l) < 0) { goto Done; } } diff --git a/cpu/mpc8xx/video.c b/cpu/mpc8xx/video.c index f2b8814..ee60477 100644 --- a/cpu/mpc8xx/video.c +++ b/cpu/mpc8xx/video.c @@ -447,9 +447,9 @@ static void video_drawchars (int xx, int yy, unsigned char *s, int count) } } -static inline void video_drawstring (int xx, int yy, unsigned char *s) +static inline void video_drawstring (int xx, int yy, char *s) { - video_drawchars (xx, yy, s, strlen (s)); + video_drawchars (xx, yy, (unsigned char *)s, strlen (s)); } /* Relative to console plotting functions */ @@ -474,7 +474,7 @@ static void video_putchar (int xx, int yy, unsigned char c) static inline void video_putstring (int xx, int yy, unsigned char *s) { - video_putchars (xx, yy, s, strlen (s)); + video_putchars (xx, yy, (unsigned char *)s, strlen ((char *)s)); } /************************************************************************/ diff --git a/cpu/ppc4xx/4xx_enet.c b/cpu/ppc4xx/4xx_enet.c index 34f6e97..d3f1de4 100644 --- a/cpu/ppc4xx/4xx_enet.c +++ b/cpu/ppc4xx/4xx_enet.c @@ -139,7 +139,7 @@ static uint32_t mal_ier; #if !defined(CONFIG_NET_MULTI) -struct eth_device *emac0_dev; +struct eth_device *emac0_dev = NULL; #endif @@ -306,8 +306,10 @@ static int ppc_4xx_eth_init (struct eth_device *dev, bd_t * bis) /* before doing anything, figure out if we have a MAC address */ /* if not, bail */ - if (memcmp (dev->enetaddr, "\0\0\0\0\0\0", 6) == 0) + if (memcmp (dev->enetaddr, "\0\0\0\0\0\0", 6) == 0) { + printf("ERROR: ethaddr not set!\n"); return -1; + } #if defined(CONFIG_440GX) /* Need to get the OPB frequency so we can access the PHY */ @@ -1486,12 +1488,16 @@ void eth_halt (void) { int eth_init (bd_t *bis) { ppc_4xx_eth_initialize(bis); - return(ppc_4xx_eth_init(emac0_dev, bis)); + if (emac0_dev) { + return ppc_4xx_eth_init(emac0_dev, bis); + } else { + printf("ERROR: ethaddr not set!\n"); + return -1; + } } int eth_send(volatile void *packet, int length) { - return (ppc_4xx_eth_send(emac0_dev, packet, length)); } diff --git a/cpu/ppc4xx/i2c.c b/cpu/ppc4xx/i2c.c index 3a644a4..be94b57 100644 --- a/cpu/ppc4xx/i2c.c +++ b/cpu/ppc4xx/i2c.c @@ -428,7 +428,7 @@ int i2c_write (uchar chip, uint addr, int alen, uchar * buffer, int len) */ uchar i2c_reg_read(uchar i2c_addr, uchar reg) { - char buf; + uchar buf; i2c_read(i2c_addr, reg, 1, &buf, 1); diff --git a/cpu/ppc4xx/spd_sdram.c b/cpu/ppc4xx/spd_sdram.c index 48102ef..7c9ac25 100644 --- a/cpu/ppc4xx/spd_sdram.c +++ b/cpu/ppc4xx/spd_sdram.c @@ -456,7 +456,7 @@ long int spd_sdram(int(read_spd)(uint addr)) int spd_read(uint addr) { - char data[2]; + uchar data[2]; if (i2c_read(SPD_EEPROM_ADDRESS, addr, 1, data, 1) == 0) return (int)data[0]; |