mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-19 05:31:32 +00:00
Fix implicit declaration of function 'eth_[gs]etenv_enetaddr'
...and some other compile warnings. Signed-off-by: Wolfgang Denk <wd@denx.de>
This commit is contained in:
parent
97b05d7d52
commit
d2567be915
5 changed files with 15 additions and 5 deletions
|
@ -31,6 +31,7 @@
|
||||||
#include <status_led.h>
|
#include <status_led.h>
|
||||||
#include <sha1.h>
|
#include <sha1.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
|
#include <net.h>
|
||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
|
@ -186,8 +187,7 @@ static void load_ethaddr(void)
|
||||||
{
|
{
|
||||||
int ok_ethaddr, ok_eth1addr;
|
int ok_ethaddr, ok_eth1addr;
|
||||||
int ret;
|
int ret;
|
||||||
char buf[EEPROM_LEN];
|
uchar buf[EEPROM_LEN];
|
||||||
char mac[32];
|
|
||||||
char *use_eeprom;
|
char *use_eeprom;
|
||||||
u16 checksumcrc16 = 0;
|
u16 checksumcrc16 = 0;
|
||||||
|
|
||||||
|
@ -200,14 +200,14 @@ static void load_ethaddr(void)
|
||||||
/* read the MACs from EEprom */
|
/* read the MACs from EEprom */
|
||||||
status_led_set (0, STATUS_LED_ON);
|
status_led_set (0, STATUS_LED_ON);
|
||||||
status_led_set (1, STATUS_LED_ON);
|
status_led_set (1, STATUS_LED_ON);
|
||||||
ret = eeprom_read (CONFIG_SYS_I2C_EEPROM_ADDR, 0, (uchar *)buf, EEPROM_LEN);
|
ret = eeprom_read (CONFIG_SYS_I2C_EEPROM_ADDR, 0, buf, EEPROM_LEN);
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
checksumcrc16 = cyg_crc16 ((uchar *)buf, EEPROM_LEN - 2);
|
checksumcrc16 = cyg_crc16 (buf, EEPROM_LEN - 2);
|
||||||
/* check, if the EEprom is programmed:
|
/* check, if the EEprom is programmed:
|
||||||
* - The Prefix(Byte 0,1,2) is equal to "ATR"
|
* - The Prefix(Byte 0,1,2) is equal to "ATR"
|
||||||
* - The checksum, stored in the last 2 Bytes, is correct
|
* - The checksum, stored in the last 2 Bytes, is correct
|
||||||
*/
|
*/
|
||||||
if ((strncmp (buf,"ATR",3) != 0) ||
|
if ((strncmp ((char *)buf,"ATR",3) != 0) ||
|
||||||
((checksumcrc16 >> 8) != buf[EEPROM_LEN - 2]) ||
|
((checksumcrc16 >> 8) != buf[EEPROM_LEN - 2]) ||
|
||||||
((checksumcrc16 & 0xff) != buf[EEPROM_LEN - 1])) {
|
((checksumcrc16 & 0xff) != buf[EEPROM_LEN - 1])) {
|
||||||
/* EEprom is not programmed */
|
/* EEprom is not programmed */
|
||||||
|
|
|
@ -33,6 +33,10 @@
|
||||||
#include <i2c.h>
|
#include <i2c.h>
|
||||||
#include "../common/sb_common.h"
|
#include "../common/sb_common.h"
|
||||||
#include "../common/ppc440gx_i2c.h"
|
#include "../common/ppc440gx_i2c.h"
|
||||||
|
#if defined(CONFIG_HAS_ETH0) || defined(CONFIG_HAS_ETH1) || \
|
||||||
|
defined(CONFIG_HAS_ETH2) || defined(CONFIG_HAS_ETH3)
|
||||||
|
#include <net.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
void fpga_init (void);
|
void fpga_init (void);
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,10 @@
|
||||||
#include <i2c.h>
|
#include <i2c.h>
|
||||||
#include "../common/ppc440gx_i2c.h"
|
#include "../common/ppc440gx_i2c.h"
|
||||||
#include "../common/sb_common.h"
|
#include "../common/sb_common.h"
|
||||||
|
#if defined(CONFIG_HAS_ETH0) || defined(CONFIG_HAS_ETH1) || \
|
||||||
|
defined(CONFIG_HAS_ETH2) || defined(CONFIG_HAS_ETH3)
|
||||||
|
#include <net.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
void fpga_init (void);
|
void fpga_init (void);
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include <asm/processor.h>
|
#include <asm/processor.h>
|
||||||
#include <spd_sdram.h>
|
#include <spd_sdram.h>
|
||||||
#include <i2c.h>
|
#include <i2c.h>
|
||||||
|
#include <net.h>
|
||||||
|
|
||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <asm/processor.h>
|
#include <asm/processor.h>
|
||||||
#include <image.h>
|
#include <image.h>
|
||||||
|
#include <net.h>
|
||||||
|
|
||||||
#include <lynxkdi.h>
|
#include <lynxkdi.h>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue