
Dear Jerry Van Baren,
In message 48DC5A97.20305@gmail.com you wrote:
Here is where a modification Kumar's loop (I would loop over /aliases/ethernet[N] instead of the env variables) would cut out 5 copies of the same code and would scale infinitely. Hmmm, we have MAXCONTROLLERS (CONFIG_NUM_ETH?) to tell us how many etherspiggots we have, can we loop on that?
I would also *strongly* prefer eliminating bd->bi_enet[N]addr variables, are they needed at all in a fdt-enabled system? Are there any other places that bd->bi_enet[N]addr is used? If the only use is here, to print out the MAC addresses, we can do Kumar's loop and print the env variables directly instead of converting the env variable to bd->enet[N]addr and then back into ASCII. Bleah.
There are fdt-less systems around, and will be, at least for a looong time.
Best regards,
Wolfgang Denk