[U-Boot] [PATCH v2] arm:exynos4:samsung:nuri Support for NURI target.

Minkyu Kang promsoft at gmail.com
Thu Nov 17 05:28:51 CET 2011


Dear Lukasz Majewski,

On 10 November 2011 17:39, Lukasz Majewski <l.majewski at samsung.com> wrote:
> This patch adds support for Samsung's Exynos4 Nuri reference
> board.
>
> New exynos4_nuri board has been added to boards.cfg
>
> Signed-off-by: Lukasz Majewski <l.majewski at samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
> Cc: Minkyu Kang <mk7.kang at samsung.com>
> ---
> Changes for v2:
>        - MAINTAINERS file updated
>        - CONFIG_MACH_TYPE added
>        - hw_revision routine rewritten
>
>  tools/checkpatch.pl -
> total: 0 errors, 0 warnings, 869 lines checked
>
> NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE
>
> ---
>  MAINTAINERS                        |    4 +
>  board/samsung/nuri/Makefile        |   45 ++++
>  board/samsung/nuri/lowlevel_init.S |  395 ++++++++++++++++++++++++++++++++++++
>  board/samsung/nuri/nuri.c          |  202 ++++++++++++++++++
>  boards.cfg                         |    1 +
>  include/configs/exynos4_nuri.h     |  210 +++++++++++++++++++
>  6 files changed, 857 insertions(+), 0 deletions(-)
>  create mode 100644 board/samsung/nuri/Makefile
>  create mode 100644 board/samsung/nuri/lowlevel_init.S
>  create mode 100644 board/samsung/nuri/nuri.c
>  create mode 100644 include/configs/exynos4_nuri.h
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 576fea8..de2bcc0 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -686,6 +686,10 @@ Minkyu Kang <mk7.kang at samsung.com>
>        s5p_goni                ARM ARMV7 (S5PC110 SoC)
>        s5pc210_universal       ARM ARMV7 (S5PC210 SoC)
>
> +Łukasz Majewski <l.majewski at samsung.com>
> +
> +       exynos4_nuri            ARM ARMV7 (S5PC210 SoC)
> +

Please keep this list to alphabetically.

>  Chander Kashyap <k.chander at samsung.com>
>
>        origen                  ARM ARMV7 (S5PC210 SoC)

> diff --git a/board/samsung/nuri/nuri.c b/board/samsung/nuri/nuri.c
> new file mode 100644
> index 0000000..7edd1ed
> --- /dev/null
> +++ b/board/samsung/nuri/nuri.c
> @@ -0,0 +1,202 @@

> +#ifdef CONFIG_GENERIC_MMC
> +int board_mmc_init(bd_t *bis)
> +{
> +       int i, err;
> +
> +       /* MASSMEMORY_EN: GPL[1] -> output LOW */
> +       s5p_gpio_direction_output(&gpio2->l1, 1, 0);
> +       s5p_gpio_set_pull(&gpio2->l1, 1, GPIO_PULL_NONE);
> +
> +       /*
> +        * eMMC GPIO:
> +        * SDR 8-bit at 48MHz at MMC0
> +        * GPK0[0]      SD_0_CLK(2)
> +        * GPK0[1]      SD_0_CMD(2)
> +        * GPK0[2]      SD_0_CDn        -> Not used
> +        * GPK0[3:6]    SD_0_DATA[0:3](2)
> +        * GPK1[3:6]    SD_0_DATA[0:3](3)
> +        *
> +        * DDR 4-bit at 26MHz at MMC4
> +        * GPK0[0]      SD_4_CLK(3)
> +        * GPK0[1]      SD_4_CMD(3)
> +        * GPK0[2]      SD_4_CDn        -> Not used
> +        * GPK0[3:6]    SD_4_DATA[0:3](3)
> +        * GPK1[3:6]    SD_4_DATA[4:7](4)
> +        */
> +       for (i = 0; i < 7; i++) {
> +               if (i == 2)
> +                       continue;
> +               /* GPK0[0:6] special function 2 */
> +               s5p_gpio_cfg_pin(&gpio2->k0, i, GPIO_FUNC(0x2));
> +               /* GPK0[0:6] pull disable */
> +               s5p_gpio_set_pull(&gpio2->k0, i, GPIO_PULL_NONE);
> +               /* GPK0[0:6] drv 4x */
> +               s5p_gpio_set_drv(&gpio2->k0, i, GPIO_DRV_4X);
> +       }
> +
> +       for (i = 3; i < 7; i++) {
> +               /* GPK1[3:6] special function 3 */
> +               s5p_gpio_cfg_pin(&gpio2->k1, i, GPIO_FUNC(0x3));
> +               /* GPK1[3:6] pull disable */
> +               s5p_gpio_set_pull(&gpio2->k1, i, GPIO_PULL_NONE);
> +               /* GPK1[3:6] drv 4x */
> +               s5p_gpio_set_drv(&gpio2->k1, i, GPIO_DRV_4X);
> +       }
> +
> +       /*
> +        * MMC device init
> +        * mmc0  : eMMC (8-bit buswidth)
> +        * mmc2  : SD card (4-bit buswidth)
> +        */
> +       err = s5p_mmc_init(0, 8);
> +
> +       /* T-flash detect */
> +       s5p_gpio_cfg_pin(&gpio2->x3, 3, GPIO_IRQ);
> +       s5p_gpio_set_pull(&gpio2->x3, 3, GPIO_PULL_UP);
> +
> +       /*
> +        * Check the T-flash  detect pin
> +        * GPX3[3] T-flash detect pin
> +        */
> +       if (!s5p_gpio_get_value(&gpio2->x3, 3)) {
> +               /*
> +                * SD card GPIO:
> +                * GPK2[0]      SD_2_CLK(2)
> +                * GPK2[1]      SD_2_CMD(2)
> +                * GPK2[2]      SD_2_CDn        -> Not used
> +                * GPK2[3:6]    SD_2_DATA[0:3](2)
> +                */
> +               for (i = 0; i < 7; i++) {
> +                       if (i == 2)
> +                               continue;
> +                       /* GPK2[0:6] special function 2 */
> +                       s5p_gpio_cfg_pin(&gpio2->k2, i, GPIO_FUNC(0x2));
> +                       /* GPK2[0:6] pull disable */
> +                       s5p_gpio_set_pull(&gpio2->k2, i, GPIO_PULL_NONE);
> +                       /* GPK2[0:6] drv 4x */
> +                       s5p_gpio_set_drv(&gpio2->k2, i, GPIO_DRV_4X);
> +               }
> +               err = s5p_mmc_init(2, 4);
> +       }
> +
> +       return err;
> +

please remove dead space.

> +}
> +#endif

> diff --git a/include/configs/exynos4_nuri.h b/include/configs/exynos4_nuri.h
> new file mode 100644
> index 0000000..35858ec
> --- /dev/null
> +++ b/include/configs/exynos4_nuri.h
> @@ -0,0 +1,210 @@
> +/*
> + * Copyright (C) 2011 Samsung Electronics
> + * Łukasz Majewski <l.majewski at samsung.com>
> + *
> + * Configuation settings for the SAMSUNG Universal (s5pc100) board.
> + *
> + * 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
> + */
> +
> +#ifndef __CONFIG_H
> +#define __CONFIG_H
> +
> +/*
> + * High Level Configuration Options
> + *
> + */
> +#define CONFIG_SAMSUNG                 /* in a SAMSUNG core */
> +#define CONFIG_S5P                     /* which is in a S5P Family */
> +#define CONFIG_S5PC210                 /* which is in a S5PC210 */
> +#define CONFIG_NURI                    /* working with NURI */
> +
> +#define MACH_TYPE_NURI                 3379

Why you redefine the mach_type?

> +#define CONFIG_MACH_TYPE               MACH_TYPE_NURI /* NURI mach type */

Thanks
Minkyu Kang
--
from. prom.
www.promsoft.net


More information about the U-Boot mailing list