X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fnet%2Fvsc7385.c;h=072421062b637eee13ce60a8e4cebff5dfc1e97c;hb=e12546de54fc9be818e8d39967b07fa351d9e5ba;hp=f440ce07e2a2d323b866df55d6e91feeb5319248;hpb=27f33e9f45ef7f9685cbdc65066a1828e85dde4f;p=oweals%2Fu-boot.git diff --git a/drivers/net/vsc7385.c b/drivers/net/vsc7385.c index f440ce07e2..072421062b 100644 --- a/drivers/net/vsc7385.c +++ b/drivers/net/vsc7385.c @@ -13,12 +13,11 @@ */ #include - -#ifdef CONFIG_VSC7385_ENET - #include +#include #include -#include +#include +#include "vsc7385.h" /* * Upload a Vitesse VSC7385 firmware image to the hardware @@ -38,13 +37,13 @@ int vsc7385_upload_firmware(void *firmware, unsigned int size) u8 *fw = firmware; unsigned int i; - u32 *gloreset = (u32 *) (CFG_VSC7385_BASE + 0x1c050); - u32 *icpu_ctrl = (u32 *) (CFG_VSC7385_BASE + 0x1c040); - u32 *icpu_addr = (u32 *) (CFG_VSC7385_BASE + 0x1c044); - u32 *icpu_data = (u32 *) (CFG_VSC7385_BASE + 0x1c048); - u32 *icpu_rom_map = (u32 *) (CFG_VSC7385_BASE + 0x1c070); + u32 *gloreset = (u32 *) (CONFIG_SYS_VSC7385_BASE + 0x1c050); + u32 *icpu_ctrl = (u32 *) (CONFIG_SYS_VSC7385_BASE + 0x1c040); + u32 *icpu_addr = (u32 *) (CONFIG_SYS_VSC7385_BASE + 0x1c044); + u32 *icpu_data = (u32 *) (CONFIG_SYS_VSC7385_BASE + 0x1c048); + u32 *icpu_rom_map = (u32 *) (CONFIG_SYS_VSC7385_BASE + 0x1c070); #ifdef DEBUG - u32 *chipid = (u32 *) (CFG_VSC7385_BASE + 0x1c060); + u32 *chipid = (u32 *) (CONFIG_SYS_VSC7385_BASE + 0x1c060); #endif out_be32(gloreset, 3); @@ -56,7 +55,7 @@ int vsc7385_upload_firmware(void *firmware, unsigned int size) out_be32(icpu_rom_map, 1); udelay(20); - /* Write the firmware to I-RAM */ + /* Write the firmware to I-RAM */ out_be32(icpu_addr, 0); udelay(20); @@ -78,8 +77,8 @@ int vsc7385_upload_firmware(void *firmware, unsigned int size) udelay(20); if (value != fw[i]) { debug("VSC7385: Upload mismatch: address 0x%x, " - "read value 0x%x, image value 0x%x\n", - i, value, fw[i]); + "read value 0x%x, image value 0x%x\n", + i, value, fw[i]); return -EIO; } @@ -97,5 +96,3 @@ int vsc7385_upload_firmware(void *firmware, unsigned int size) return 0; } - -#endif