[U-Boot] [PATCH v2 3/4] Add In-Circuit sam9g45_oem board

Remy Bohmer linux at bohmer.net
Tue Feb 15 19:45:36 CET 2011


Hi,

2011/2/13 Marcel Janssen <korgull at home.nl>:
> From: Marcel <korgull at home.nl>
>
> sam9g45_oem cleanup phase1
>
> sam9g45_oem cleanup phase2
>
> sam9g45_oem cleanup phase3

Not a very descriptive patch header...
Please fix.

>
> Signed-off-by: Marcel <korgull at home.nl>
> ---
>  board/in-circuit/icnova/Makefile         |   50 ++++++
>  board/in-circuit/icnova/icnova_sam9g45.c |  242 ++++++++++++++++++++++++++++
>  boards.cfg                               |    1 +
>  include/configs/icnova_sam9g45.h         |  253 ++++++++++++++++++++++++++++++
>  4 files changed, 546 insertions(+), 0 deletions(-)
>  create mode 100644 board/in-circuit/icnova/Makefile
>  create mode 100644 board/in-circuit/icnova/icnova_sam9g45.c
>  create mode 100644 include/configs/icnova_sam9g45.h
>
> diff --git a/board/in-circuit/icnova/Makefile b/board/in-circuit/icnova/Makefile
> new file mode 100644
> index 0000000..bf64680
> --- /dev/null
> +++ b/board/in-circuit/icnova/Makefile
> @@ -0,0 +1,50 @@
> +# (C) Copyright 2011 Marcel Janssen, Admesy B.V.
> +# (C) Copyright 2001-2006
> +# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
> +#
> +# Copyright (C) 2005-2006 Atmel Corporation
> +#
> +# (C) 2008 - 2010 Benjamin Tietz, In-Circuit benjamin.tietz at in-circuit.de
> +# (C) 2011        Marcel Janssen, Admesy B.V.
> +#
> +# 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., 59 Temple Place, Suite 330, Boston,
> +# MA 02111-1307 USA
> +
> +include $(TOPDIR)/config.mk
> +include $(TOPDIR)/include/config.mk
> +
> +LIB    := $(obj)lib$(BOARD).o
> +
> +COBJS := icnova_sam9g45.o
> +
> +COBJS-y += $(COBJS)
> +SRCS   := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
> +OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS-y))
> +
> +# $(obj).depend
> +$(LIB): $(OBJS)
> +       $(AR) $(ARFLAGS) $@ $(OBJS)
> +
> +#########################################################################
> +
> +# defines $(obj).depend target
> +include $(SRCTREE)/rules.mk
> +
> +sinclude $(obj).depend
> +
> +#########################################################################
> diff --git a/board/in-circuit/icnova/icnova_sam9g45.c b/board/in-circuit/icnova/icnova_sam9g45.c
> new file mode 100644
> index 0000000..8407b0b
> --- /dev/null
> +++ b/board/in-circuit/icnova/icnova_sam9g45.c
> @@ -0,0 +1,242 @@
> +/*
> + * (C) 2010 Benjamin Tietz, In-Circuit <benjamin.tietz at in-circuit.de>
> + *
> + * (C) Copyright 2007-2008
> + * Stelian Pop <stelian.pop at leadtechdesign.com>
> + * Lead Tech Design <www.leadtechdesign.com>
> + *
> + * 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., 59 Temple Place, Suite 330, Boston,
> + * MA 02111-1307 USA
> + */
> +
> +#include <common.h>
> +#include <exports.h>
> +#include <asm/sizes.h>
> +#include <asm/arch/at91sam9g45.h>
> +#include <asm/arch/at91sam9_matrix.h>
> +#include <asm/arch/at91sam9_smc.h>
> +#include <asm/arch/at91_common.h>
> +#include <asm/arch/at91_pmc.h>
> +#include <asm/arch/at91_rstc.h>
> +#include <asm/arch/clk.h>
> +#include <asm/arch/gpio.h>
> +#include <asm/arch/io.h>
> +#include <asm/arch/hardware.h>
> +#include <usb/atmel_usba_udc.h>
> +#ifdef CONFIG_USBD_DFU
> +#include <usb_dfu.h>
> +#endif
> +
> +#if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB)
> +#include <net.h>
> +#endif
> +#include <netdev.h>
> +
> +#if defined(CONFIG_USB_GADGET_ATMEL_USBA) && !defined(CONFIG_USB_GADGET)
> +#error "Need CONFIG_USB_GADGET when CONFIG_USB_GADGET_ATMEL_USBA enabled"
> +#endif
> +
> +
> +DECLARE_GLOBAL_DATA_PTR;
> +char bootbuf[20];
> +
> +#ifdef CONFIG_USB_GADGET_ATMEL_USBA
> +struct platform_data brd = {
> +       .board = {
> +               .vbus_pin   = AT91_PIN_PC0,
> +               .pullup_pin = 1,
> +       },
> +       .udc_clk = AT91SAM9G45_ID_UDPHS,
> +};
> +#endif
> +
> +#ifdef CONFIG_CMD_NAND
> +static void icnova_nand_hw_init(void)
> +{
> +       unsigned long csa;
> +
> +       /* Enable CS3 */
> +       csa = at91_sys_read(AT91_MATRIX_EBICSA);
> +       at91_sys_write(AT91_MATRIX_EBICSA,
> +                      csa | AT91_MATRIX_EBI_CS3A_SMC_SMARTMEDIA);

Please use register access by structs.
But better: drop this board patch completely from the series if you do
not have that much time left this week.

Kind regards,

Remy


More information about the U-Boot mailing list