c = CS8900_BUS16_0;
 
        CS8900_PPTR = regno;
-       return (unsigned short) CS8900_PDATA;
+       return CS8900_PDATA;
 }
 #endif
 
 static unsigned short get_reg (int regno)
 {
        CS8900_PPTR = regno;
-       return (unsigned short) CS8900_PDATA;
+       return CS8900_PDATA;
 }
 
 
        if (get_reg_init_bus (PP_ChipID) != 0x630e)
                return;
        eth_reset ();
-       if ((get_reg (PP_SelfST) & (PP_SelfSTAT_EEPROM | PP_SelfSTAT_EEPROM_OK)) ==
+       if ((get_reg (PP_SelfSTAT) & (PP_SelfSTAT_EEPROM | PP_SelfSTAT_EEPROM_OK)) ==
                        (PP_SelfSTAT_EEPROM | PP_SelfSTAT_EEPROM_OK)) {
 
                /* Load the MAC from EEPROM */
                        debug ("### Set environment from HW MAC addr = \"%s\"\n", ethaddr);
                        setenv ("ethaddr", ethaddr);
                }
-
        }
 }
 
 
 int eth_init (bd_t * bd)
 {
-
        /* verify chip id */
        if (get_reg_init_bus (PP_ChipID) != 0x630e) {
                printf ("CS8900 Ethernet chip not found?!\n");
 }
 
 /* Get a data block via Ethernet */
-extern int eth_rx (void)
+int eth_rx (void)
 {
        int i;
        unsigned short rxlen;
 }
 
 /* Send a data block via Ethernet. */
-extern int eth_send (volatile void *packet, int length)
+int eth_send (volatile void *packet, int length)
 {
        volatile unsigned short *addr;
        int tmo;
 
 static void cs8900_e2prom_ready(void)
 {
-       while(get_reg(PP_SelfST) & SI_BUSY);
+       while (get_reg(PP_SelfSTAT) & SI_BUSY)
+               ;
 }
 
 /***********************************************************/
 
 
 /* EEPROM Kram */
 #define SI_BUSY 0x0100
-#define PP_SelfST 0x0136       /*  Self State register */
 #define PP_EECMD 0x0040                /*  NVR Interface Command register */
 #define PP_EEData 0x0042       /*  NVR Interface Data Register */
 #define EEPROM_WRITE_EN                0x00F0