X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=common%2Ffdt_support.c;h=9a6f6b7d8b16c822496c53a62df26d3850081b29;hb=dfdb3d37dd0fa8bdabdf7b5ffb597af470e74621;hp=812acb401c176f81976fceb05e637fec024dc91c;hpb=951c6baaf44c7fd4335b75fb92840d4e42c94927;p=karo-tx-uboot.git diff --git a/common/fdt_support.c b/common/fdt_support.c index 812acb401c..9a6f6b7d8b 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -387,7 +387,11 @@ static void write_cell(u8 *addr, u64 val, int size) } } +#ifdef CONFIG_NR_DRAM_BANKS +#define MEMORY_BANKS_MAX CONFIG_NR_DRAM_BANKS +#else #define MEMORY_BANKS_MAX 4 +#endif int fdt_fixup_memory_banks(void *blob, u64 start[], u64 size[], int banks) { int err, nodeoffset; @@ -454,7 +458,7 @@ void fdt_fixup_ethernet(void *fdt) { int node, i, j; char enet[16], *tmp, *end; - char mac[16] = "ethaddr"; + char mac[16]; const char *path; unsigned char mac_addr[6]; @@ -463,6 +467,7 @@ void fdt_fixup_ethernet(void *fdt) return; i = 0; + strcpy(mac, "ethaddr"); while ((tmp = getenv(mac)) != NULL) { sprintf(enet, "ethernet%d", i); path = fdt_getprop(fdt, node, enet, NULL);