From cdd917a43da6fa7fc8f54a3cc9f420ce5ecf3197 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Thu, 2 Aug 2007 00:48:45 +0200 Subject: Fix build errors and warnings / code cleanup. Signed-off-by: Wolfgang Denk --- board/mpc8641hpcn/mpc8641hpcn.c | 3 ++- board/mpc8641hpcn/sys_eeprom.c | 16 ++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) (limited to 'board/mpc8641hpcn') diff --git a/board/mpc8641hpcn/mpc8641hpcn.c b/board/mpc8641hpcn/mpc8641hpcn.c index 7d7e2af..5e02cc5 100644 --- a/board/mpc8641hpcn/mpc8641hpcn.c +++ b/board/mpc8641hpcn/mpc8641hpcn.c @@ -63,9 +63,10 @@ int checkboard(void) uint devdisr = gur->devdisr; uint io_sel = (gur->pordevsr & MPC86xx_PORDEVSR_IO_SEL) >> 16; +#ifdef DEBUG uint host1_agent = (gur->porbmsr & MPC86xx_PORBMSR_HA) >> 17; uint pex1_agent = (host1_agent == 0) || (host1_agent == 1); - +#endif if ((io_sel == 2 || io_sel == 3 || io_sel == 5 || io_sel == 6 || io_sel == 7 || io_sel == 0xF) && !(devdisr & MPC86xx_DEVDISR_PCIEX1)) { diff --git a/board/mpc8641hpcn/sys_eeprom.c b/board/mpc8641hpcn/sys_eeprom.c index 74e2a3d..7bc663b 100644 --- a/board/mpc8641hpcn/sys_eeprom.c +++ b/board/mpc8641hpcn/sys_eeprom.c @@ -68,7 +68,7 @@ int mac_show(void) mac_data.date[5], mac_data.date[6]); for (i = 0; i < 8; i++) { - sprintf(ethaddr[i], + sprintf((char *)ethaddr[i], "%02x:%02x:%02x:%02x:%02x:%02x", mac_data.mac[i][0], mac_data.mac[i][1], @@ -79,10 +79,10 @@ int mac_show(void) printf("MAC %d %s\n", i, ethaddr[i]); } - setenv("ethaddr", ethaddr[0]); - setenv("eth1addr", ethaddr[1]); - setenv("eth2addr", ethaddr[2]); - setenv("eth3addr", ethaddr[3]); + setenv("ethaddr", (char *)ethaddr[0]); + setenv("eth1addr", (char *)ethaddr[1]); + setenv("eth2addr", (char *)ethaddr[2]); + setenv("eth3addr", (char *)ethaddr[3]); return 0; } @@ -236,7 +236,7 @@ int mac_read_from_eeprom(void) } else { for (i = 0; i < 4; i++) { if (memcmp(&mac_data.mac[i], "\0\0\0\0\0\0", 6)) { - sprintf(ethaddr[i], + sprintf((char *)ethaddr[i], "%02x:%02x:%02x:%02x:%02x:%02x", mac_data.mac[i][0], mac_data.mac[i][1], @@ -244,10 +244,10 @@ int mac_read_from_eeprom(void) mac_data.mac[i][3], mac_data.mac[i][4], mac_data.mac[i][5]); - sprintf(enetvar, + sprintf((char *)enetvar, i ? "eth%daddr" : "ethaddr", i); - setenv(enetvar, ethaddr[i]); + setenv((char *)enetvar, (char *)ethaddr[i]); } } } -- cgit v1.1