[U-Boot] [PATCH] Kirkwood: declare mpp config static and const

Luka Perkov uboot at lukaperkov.net
Sun May 27 23:20:29 CEST 2012


Hi Michael,

On Sat, May 26, 2012 at 02:27:01AM +0200, Michael Walle wrote:
> Change the prototype of kirkwood_mpp_conf() from
>   void kirkwood_mpp_conf(u32 *mpp_list)
> to
>   void kirkwood_mpp_conf(const u32 *mpp_list)
> 
> Now we can declare the kwmpp_config static and const where possible.
> 
> Signed-off-by: Michael Walle <michael at walle.cc>
> Cc: Prafulla Wadaskar <prafulla at marvell.com>
> Cc: Simon Guinot <simon.guinot at sequanux.org>
> Cc: Jason Cooper <u-boot at lakedaemon.net>
> Cc: Siddarth Gore <gores at marvell.com>
> Cc: Eric Cooper <ecc at cmu.edu>
> Cc: Stefan Herbrechtsmeier <stefan at code.herbrechtsmeier.net>
> Cc: Valentin Longchamp <valentin.longchamp at keymile.com>
> ---
> 
> This was spotted by Mike in an earlier patch series (Kirkwood: add lschlv2
> and lsxhl board support). Declaring the mpp_config static avoids generating
> the array on the stack.
> This was compile tested on all kirkwood boards and tested on the lschlv2.
> 
> 
>  arch/arm/cpu/arm926ejs/kirkwood/mpp.c           |    2 +-
>  arch/arm/include/asm/arch-kirkwood/mpp.h        |    2 +-
>  board/LaCie/net2big_v2/net2big_v2.c             |    2 +-
>  board/LaCie/netspace_v2/netspace_v2.c           |    2 +-
>  board/Marvell/dreamplug/dreamplug.c             |    2 +-
>  board/Marvell/guruplug/guruplug.c               |    2 +-
>  board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c |    2 +-
>  board/Marvell/openrd/openrd.c                   |    2 +-
>  board/Marvell/rd6281a/rd6281a.c                 |    2 +-
>  board/Marvell/sheevaplug/sheevaplug.c           |    2 +-
>  board/Seagate/dockstar/dockstar.c               |    2 +-
>  board/buffalo/lsxl/lsxl.c                       |    2 +-
>  board/d-link/dns325/dns325.c                    |    2 +-
>  board/keymile/km_arm/km_arm.c                   |    2 +-
>  14 files changed, 14 insertions(+), 14 deletions(-)

NACK. At least in this version. Please double check all the kirkwood
boards (taken from boards.cfg):

pogo_e02                     arm         arm926ejs   -                   cloudengines   kirkwood
dns325                       arm         arm926ejs   -                   d-link         kirkwood
km_kirkwood                  arm         arm926ejs   km_arm              keymile        kirkwood	km_kirkwood:KM_DISABLE_PCI
km_kirkwood_pci              arm         arm926ejs   km_arm              keymile        kirkwood	km_kirkwood:KM_RECONFIG_XLX
mgcoge3un                    arm         arm926ejs   km_arm              keymile        kirkwood
portl2                       arm         arm926ejs   km_arm              keymile        kirkwood
inetspace_v2                 arm         arm926ejs   netspace_v2         LaCie          kirkwood	lacie_kw:INETSPACE_V2
net2big_v2                   arm         arm926ejs   net2big_v2          LaCie          kirkwood	lacie_kw:NET2BIG_V2
netspace_max_v2              arm         arm926ejs   netspace_v2         LaCie          kirkwood	lacie_kw:NETSPACE_MAX_V2
netspace_v2                  arm         arm926ejs   netspace_v2         LaCie          kirkwood	lacie_kw:NETSPACE_V2
dreamplug                    arm         arm926ejs   -                   Marvell        kirkwood
guruplug                     arm         arm926ejs   -                   Marvell        kirkwood
mv88f6281gtw_ge              arm         arm926ejs   -                   Marvell        kirkwood
openrd_base                  arm         arm926ejs   openrd              Marvell        kirkwood        openrd:BOARD_IS_OPENRD_BASE
openrd_client                arm         arm926ejs   openrd              Marvell        kirkwood        openrd:BOARD_IS_OPENRD_CLIENT
openrd_ultimate              arm         arm926ejs   openrd              Marvell        kirkwood        openrd:BOARD_IS_OPENRD_ULTIMATE
rd6281a                      arm         arm926ejs   -                   Marvell        kirkwood
sheevaplug                   arm         arm926ejs   -                   Marvell        kirkwood
ib62x0                       arm         arm926ejs   ib62x0              raidsonic      kirkwood
dockstar                     arm         arm926ejs   -                   Seagate        kirkwood

I have noticed that board ib62x0 is not in this patch. I have tested
this patch with my ib62x0 board and it works. This is the patch I have
added:

diff --git a/board/raidsonic/ib62x0/ib62x0.c b/board/raidsonic/ib62x0/ib62x0.c
index 65f2c2e..f888901 100644
--- a/board/raidsonic/ib62x0/ib62x0.c
+++ b/board/raidsonic/ib62x0/ib62x0.c
@@ -42,7 +42,7 @@ int board_early_init_f(void)
 			IB62x0_OE_LOW, IB62x0_OE_HIGH);
 
 	/* Multi-Purpose Pins Functionality configuration */
-	u32 kwmpp_config[] = {
+	static const kwmpp_config[] = {
 		MPP0_NF_IO2,
 		MPP1_NF_IO3,
 		MPP2_NF_IO4,

Also you should note that this patch should be applied after your
patches for lsxl board.

Regards,
Luka


More information about the U-Boot mailing list