
Dear Wolfgang Denk,
Regarding the following:
+#define ROUND(A, B) (((A) + (B)) & ~((B) - 1)) +/* + * Size of malloc() pool + */ +#define CFG_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000)
I tried to include the common.h file in my configuration file but this breaks u-boot compilation (it's not safe to include common.h standalone) .I noticed that none of other board configuration files include common.h
If I replace the ROUND(A,B) macro with #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) macro when i try to make u-boot I obtain the following errors:
start.S: Assembler messages: start.S:339: Error: invalid constant (802d) after fixup
It appears to me that the solution for the moment is to use the following fixed macro: define ROUND(A, B) (((A) + (B) -1) & ~((B) - 1))
Regarding the following:
+#ifdef CONFIG_RESET_PHY_R +void reset_phy(void) +{ +#ifdef CONFIG_MACB
- /*
* Initialize ethernet HW addr prior to starting Linux,
* needed for nfsroot
*/
- eth_init(gd->bd);
+#endif
Please do NOT do this. It's a violation of the U-Boot design principles, which clearly say that only such periphereals that are actually being used by U-Boot shall be initialized, and even if they are being used, these shall be deactivated after use.
I removed the reset_phy() function and I do not use anymore CONFIG_RESET_PHY_R. I use setenv ethaddr to configure the MAC address of the Ethernet controller.
Is it ok to resend the patch with the above changes ?
Best regards, Cristian Birsan