[U-Boot] [PATCH v4] add new board nas62x0
Prafulla Wadaskar
prafulla at marvell.com
Wed Mar 21 11:10:23 CET 2012
> -----Original Message-----
> From: u-boot-bounces at lists.denx.de [mailto:u-boot-
> bounces at lists.denx.de] On Behalf Of Luka Perkov
> Sent: 21 March 2012 06:23
> To: u-boot at lists.denx.de
> Cc: dreagle at doukki.net; gmbnomis at gmail.com
> Subject: [U-Boot] [PATCH v4] add new board nas62x0
Please specify the patch header as Kirkwood: add NAS62x0 board support
This reflects on patch subject as patch for Kirkwood.
>
> Add support for new boards RaidSonic ICY BOX NAS6210 and NAS6220.
Add few links about board being supported here for quick reference
>
> Only difference between boards is number of SATA ports.
>
> Signed-off-by: Luka Perkov <uboot at lukaperkov.net>
> Signed-off-by: Gerald Kerma <dreagle at doukki.net>
> ---
>
V1, v2 change log missing ???
> Changes from version v3:
>
> * don't use utf8 for Geralds name
> * don't mix upper/lower case in kwbimage.cfg
> * fix prompt
>
> Found problems that should be looked at (this is not related with
> adding
> support for this board):
>
> * IB62x0_OE_LOW and IB62x0_OE_HIGH issue
> * CONFIG_SKIP_LOWLEVEL_INIT issue
>
> In separate patch I'll resend fix for CONFIG_SKIP_LOWLEVEL_INIT.
>
>
> MAINTAINERS | 4 +
> board/Marvell/ib62x0/Makefile | 51 +++++++++++
This board does not belongs to Marvell it should be added to boards/<vendor>
> board/Marvell/ib62x0/ib62x0.c | 114 ++++++++++++++++++++++++
> board/Marvell/ib62x0/ib62x0.h | 41 +++++++++
> board/Marvell/ib62x0/kwbimage.cfg | 167
Is this exactly copy paste from other available kwbimage.cfg, if yes then you can reuse it, if no then what are the key changes w.r.to referred board?
> +++++++++++++++++++++++++++++++++++
> boards.cfg | 2 +
> include/configs/ib62x0.h | 176
> +++++++++++++++++++++++++++++++++++++
> 7 files changed, 555 insertions(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 46f63a0..11d023e 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -782,6 +782,10 @@ Linus Walleij <linus.walleij at linaro.org>
> integratorap various
> integratorcp various
>
> +Luka Perkov <uboot at lukaperkov.net>
> +
> + ib62x0 ARM926EJS
It's better to add both boards being supported
> +
> Dave Peverley <dpeverley at mpc-data.co.uk>
>
> omap730p2 ARM926EJS
...snip...
> diff --git a/board/Marvell/ib62x0/ib62x0.c
> b/board/Marvell/ib62x0/ib62x0.c
> new file mode 100644
> index 0000000..e6853e7
> --- /dev/null
> +++ b/board/Marvell/ib62x0/ib62x0.c
> @@ -0,0 +1,114 @@
> +/*
> + * Copyright (C) 2011 Gerald Kerma <dreagle at doukki.net>
> + *
> + * Written-by: Gerald Kerma <dreagle at doukki.net>
> + *
> + * See file CREDITS for list of people who contributed to this
> + * project.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
> + * MA 02110-1301 USA
> + */
> +
> +#include <common.h>
> +#include <miiphy.h>
> +#include <asm/arch/cpu.h>
> +#include <asm/arch/kirkwood.h>
> +#include <asm/arch/mpp.h>
> +#include "ib62x0.h"
> +
> +DECLARE_GLOBAL_DATA_PTR;
> +
> +int board_early_init_f(void)
> +{
> + /*
> + * default gpio configuration
> + * There are maximum 64 gpios controlled through 2 sets of
> registers
> + * the below configuration configures mainly initial LED status
> + */
> + kw_config_gpio(IB62x0_OE_VAL_LOW,
> + IB62x0_OE_VAL_HIGH,
> + IB62x0_OE_LOW, IB62x0_OE_HIGH);
> +
> + /* Multi-Purpose Pins Functionality configuration */
> + u32 kwmpp_config[] = {
> + MPP0_NF_IO2,
> + MPP1_NF_IO3,
> + MPP2_NF_IO4,
> + MPP3_NF_IO5,
> + MPP4_NF_IO6,
> + MPP5_NF_IO7,
> + MPP6_SYSRST_OUTn,
> + MPP7_GPO,
> + MPP8_UART0_RTS,
> + MPP9_UART0_CTS,
> + MPP10_UART0_TXD,
> + MPP11_UART0_RXD,
> + MPP12_SD_CLK,
> + MPP13_SD_CMD,
> + MPP14_SD_D0,
> + MPP15_SD_D1,
> + MPP16_SD_D2,
> + MPP17_SD_D3,
> + MPP18_NF_IO0,
> + MPP19_NF_IO1,
> + MPP20_GPIO,
> + MPP21_GPIO,
> + MPP22_GPIO, /* Power LED red */
> + MPP23_GPIO,
> + MPP24_GPIO,
> + MPP25_GPIO, /* Power LED green */
> + MPP26_GPIO,
> + MPP27_GPIO, /* USB transfer LED */
> + MPP28_GPIO, /* Reset button */
> + MPP29_TSMP9, /* USB Copy button */
> + MPP30_GPIO,
> + MPP31_GPIO,
> + MPP32_GPIO,
> + MPP33_GPIO,
> + MPP34_GPIO,
> + MPP35_GPIO,
> + MPP36_GPIO,
> + MPP37_GPIO,
> + MPP38_GPIO,
> + MPP39_GPIO,
> + MPP40_GPIO,
> + MPP41_GPIO,
> + MPP42_GPIO,
> + MPP43_GPIO,
> + MPP44_GPIO,
> + MPP45_GPIO,
> + MPP46_GPIO,
> + MPP47_GPIO,
> + MPP48_GPIO,
> + MPP49_GPIO,
> + 0
> + };
You have configured so many GPIOS, do you need all these, just keep only needed configuration here.
> + kirkwood_mpp_conf(kwmpp_config);
> + return 0;
> +}
> +
> +int board_init(void)
> +{
> + /*
> + * arch number of board
> + */
> + gd->bd->bi_arch_number = MACH_TYPE_NAS6210;
CONFIG_MACH_TYPE,
> +
> + /* adress of boot parameters */
> + gd->bd->bi_boot_params = kw_sdram_bar(0) + 0x100;
> +
> + return 0;
> +}
> diff --git a/board/Marvell/ib62x0/ib62x0.h
> b/board/Marvell/ib62x0/ib62x0.h
> new file mode 100644
> index 0000000..0e1e7c4
> --- /dev/null
> +++ b/board/Marvell/ib62x0/ib62x0.h
> @@ -0,0 +1,41 @@
> +/*
> + * Copyright (C) 2011 Gerald Kerma <dreagle at doukki.net>
> + *
> + * Written-by: Gerald Kerma <dreagle at doukki.net>
> + *
> + * See file CREDITS for list of people who contributed to this
> + * project.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
> + * MA 02110-1301 USA
> + */
> +
> +#ifndef __IB62x0_H
> +#define __IB62x0_H
> +
> +#define IB62x0_OE_LOW (~(0))
> +#define IB62x0_OE_HIGH (~(0))
> +#define IB62x0_OE_VAL_LOW (1 << 29) /* USB_PWEN low */
> +#define IB62x0_OE_VAL_HIGH (1 << 17) /* LED pin high */
> +
> +/* PHY related */
> +#define MV88E1116_LED_FCTRL_REG 10
> +#define MV88E1116_CPRSP_CR3_REG 21
> +#define MV88E1116_MAC_CTRL_REG 21
> +#define MV88E1116_PGADR_REG 22
> +#define MV88E1116_RGMII_TXTM_CTRL (1 << 4)
> +#define MV88E1116_RGMII_RXTM_CTRL (1 << 5)
> +
> +#endif /* __IB62x0_H */
> diff --git a/board/Marvell/ib62x0/kwbimage.cfg
> b/board/Marvell/ib62x0/kwbimage.cfg
> new file mode 100644
> index 0000000..32f3dca
> --- /dev/null
> +++ b/board/Marvell/ib62x0/kwbimage.cfg
> @@ -0,0 +1,167 @@
> +#
> +# Copyright (C) 2011 Gerald Kerma <dreagle at doukki.net>
> +#
> +# Written-by: Gerald Kerma <dreagle at doukki.net>
> +#
> +# See file CREDITS for list of people who contributed to this
> +# project.
> +#
> +# This program is free software; you can redistribute it and/or
> +# modify it under the terms of the GNU General Public License as
> +# published by the Free Software Foundation; either version 2 of
> +# the License, or (at your option) any later version.
> +#
> +# This program is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program; if not, write to the Free Software
> +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
> +# MA 02110-1301 USA
> +#
> +# Refer docs/README.kwimage for more details about how-to configure
> +# and create kirkwood boot image
> +#
> +
What change you have done in this file with reference?
...snip...
> diff --git a/boards.cfg b/boards.cfg
> index 28cc345..a4e8852 100644
> --- a/boards.cfg
> +++ b/boards.cfg
> @@ -147,6 +147,8 @@ netspace_max_v2 arm arm926ejs
> netspace_v2 LaCie
> netspace_v2 arm arm926ejs netspace_v2
> LaCie kirkwood lacie_kw:NETSPACE_V2
> dreamplug arm arm926ejs -
> Marvell kirkwood
> guruplug arm arm926ejs -
> Marvell kirkwood
> +ib_nas6210 arm arm926ejs ib62x0
> Marvell kirkwood ib62x0:BOARD_IS_IB_NAS6210
> +ib_nas6220 arm arm926ejs ib62x0
Even this should change
Regards..
Prafulla . . .
More information about the U-Boot
mailing list