]> git.sur5r.net Git - u-boot/blobdiff - board/w7o/vpd.c
mmc: rescan fails on empty slot
[u-boot] / board / w7o / vpd.c
index c24b127d3cf4d8d3fe4ce194319b3af725bee97d..57558e88fa53666a1cc9b0a50767867045365696 100644 (file)
@@ -24,7 +24,7 @@
 #if defined(VXWORKS)
 # include <stdio.h>
 # include <string.h>
-# define CFG_DEF_EEPROM_ADDR 0xa0
+# define CONFIG_SYS_DEF_EEPROM_ADDR 0xa0
 extern char iicReadByte( char, char );
 extern ulong_t crc32( unsigned char *, unsigned long );
 #else
@@ -47,7 +47,7 @@ vpd_reader(unsigned char *buf, unsigned dev_addr, unsigned off, unsigned count)
      * SDRAM SPD in the first 128 bytes,
      * so skew the offset.
      */
-    if (dev_addr == CFG_DEF_EEPROM_ADDR)
+    if (dev_addr == CONFIG_SYS_DEF_EEPROM_ADDR)
        offset += SDRAM_SPD_DATA_SIZE;
 
     /* Try to read the I2C EEPROM */
@@ -125,9 +125,9 @@ static int vpd_is_valid(unsigned dev_addr, unsigned char *buf)
     unsigned short  stored_crc16, calc_crc16 = 0xffff;
 
     /* Check Eyecatcher */
-    if (strncmp(vpd->header.eyecatcher, VPD_EYECATCHER, VPD_EYE_SIZE) != 0) {
+    if (strncmp((char *)(vpd->header.eyecatcher), VPD_EYECATCHER, VPD_EYE_SIZE) != 0) {
        unsigned offset = 0;
-       if (dev_addr == CFG_DEF_EEPROM_ADDR)
+       if (dev_addr == CONFIG_SYS_DEF_EEPROM_ADDR)
            offset += SDRAM_SPD_DATA_SIZE;
        printf("Error: VPD EEPROM 0x%x corrupt @ 0x%x\n", dev_addr, offset);
 
@@ -259,7 +259,7 @@ int vpd_get_data(unsigned char dev_addr, VPD *vpdInfo)
            case VPD_PID_PID:
                if (strlen_ok(packet, MAX_PROD_ID)) {
                    strncpy(vpdInfo->productId,
-                           packet->data, packet->size);
+                           (char *)(packet->data), packet->size);
                }
                break;
            case VPD_PID_REV:
@@ -405,4 +405,3 @@ void vpd_print(VPD *vpdInfo)
        printf(dsfmt, sp, "WE Data Width",  vpdInfo->flashCfg.weDataWidth);
     }
 } /* vpd_print() */
-