Fix ColdFire FEC warning messages
authorTsiChung Liew <Tsi-Chung.Liew@freescale.com>
Thu, 21 Aug 2008 23:55:11 +0000 (23:55 +0000)
committerBen Warren <biggerbadderben@gmail.com>
Wed, 27 Aug 2008 05:40:02 +0000 (22:40 -0700)
Types mismatch and implicit declaration of icache_invalid()
warning messages

Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
drivers/net/fsl_mcdmafec.c
drivers/net/mcffec.c

index e34975a12fa517051352be340a3882fd86fce41a..59524a5ede91d6548872f29dce2d47901488c02b 100644 (file)
@@ -94,7 +94,7 @@ struct fec_info_dma fec_info[] = {
         0,                     /* phy name */
         0,                     /* phy name init */
 #ifdef CFG_DMA_USE_INTSRAM
-        DBUF_LENGTH,           /* RX BD */
+        (cbd_t *)DBUF_LENGTH,  /* RX BD */
 #else
         0,                     /* RX BD */
 #endif
@@ -540,15 +540,16 @@ int mcdmafec_initialize(bd_t * bis)
 
                /* setup Receive and Transmit buffer descriptor */
 #ifdef CFG_DMA_USE_INTSRAM
-               fec_info[i].rxbd = (int)fec_info[i].rxbd + tmp;
-               tmp = fec_info[i].rxbd;
+               fec_info[i].rxbd = (cbd_t *)((u32)fec_info[i].rxbd + tmp);
+               tmp = (u32)fec_info[i].rxbd;
                fec_info[i].txbd =
-                   (int)fec_info[i].txbd + tmp + (PKTBUFSRX * sizeof(cbd_t));
-               tmp = fec_info[i].txbd;
+                   (cbd_t *)((u32)fec_info[i].txbd + tmp +
+                   (PKTBUFSRX * sizeof(cbd_t)));
+               tmp = (u32)fec_info[i].txbd;
                fec_info[i].txbuf =
-                   (int)fec_info[i].txbuf + tmp +
-                   (CFG_TX_ETH_BUFFER * sizeof(cbd_t));
-               tmp = fec_info[i].txbuf;
+                   (char *)((u32)fec_info[i].txbuf + tmp +
+                   (CFG_TX_ETH_BUFFER * sizeof(cbd_t)));
+               tmp = (u32)fec_info[i].txbuf;
 #else
                fec_info[i].rxbd =
                    (cbd_t *) memalign(CFG_CACHELINE_SIZE,
index 6e69b466b7f525e6665bdc9728076c5a03551917..7f59fa8dd570093522123366bdaf9f33aee41db0 100644 (file)
@@ -106,6 +106,10 @@ extern int mcffec_miiphy_write(char *devname, unsigned char addr,
                               unsigned char reg, unsigned short value);
 #endif
 
+#ifdef CFG_UNIFY_CACHE
+extern void icache_invalid(void);
+#endif
+
 void setFecDuplexSpeed(volatile fec_t * fecp, bd_t * bd, int dup_spd)
 {
        if ((dup_spd >> 16) == FULL) {