]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
powerpc/8xxx: Add hwconfig APIs to address early parsing used by DDR init
authorKumar Gala <galak@kernel.crashing.org>
Sun, 9 Jan 2011 17:37:00 +0000 (11:37 -0600)
committerKumar Gala <galak@kernel.crashing.org>
Thu, 20 Jan 2011 04:58:23 +0000 (22:58 -0600)
commitdd50af2515ad39fa2f6c09ab621f69fef4f5fceb
tree53efcd705316bc268507d110e26d9712f9fae17f
parentf193e3da9817dc4892bc25967954d98838f84386
powerpc/8xxx: Add hwconfig APIs to address early parsing used by DDR init

There are several users of the hwconfig APIs (8xxx DDR) before we have
the environment properly setup.  This causes issues because of the
numerous ways the environment might be accessed because of the
non-volatile memory it might be stored in.  Additionally the access
might be so early that memory isn't even properly setup for us.

Towards resolving these issues we provide versions of all the hwconfig
APIs that can be passed in a buffer to parse and leave it to the caller
to determine how to allocate and populate the buffer.

We use the _f naming convention for these new APIs even though they are
perfectly useable after relocation and the environment being ready.

We also now warn if the non-f APIs are called before the environment is
ready to allow users to address the issues.

Finally, we convert the 8xxx DDR code to utilize the new APIs to
hopefully address the issue once and for all.  We have the 8xxx DDR code
create a buffer on the stack and populate it via getenv_f().

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Wolfgang Denk <wd@denx.de>
arch/powerpc/cpu/mpc8xxx/ddr/options.c
common/hwconfig.c
include/hwconfig.h