[RFC 2/7] bcm47xx-nvram: add new broadcom nvram driver with dt support

Rafał Miłecki zajec5 at gmail.com
Sun Aug 24 14:45:38 PDT 2014


On 24 August 2014 21:24, Hauke Mehrtens <hauke at hauke-m.de> wrote:
> This was copied from arch/mips/bcm47xx/nvram.c and modified to interact
> with device tree. My plan is to make the MIPS bcm47xx also use this new
> driver some time later.

I don't like this.

First, you change API (_getenv call), without explanation why/if we
really need this. We decided we're very unlikely to ever find devices
with multiple (separated) NVRAMs. So what's the point of having nvram
per device?

Secondly, don't duplicate the code. If you're going to switch bcm47xx
to this new code, handle it smarter. Modify bcm47xx mode, move it to
the "misc" and re-use in bcm53xx.



More information about the linux-arm-kernel mailing list