From: Minkyu Kang <mk7.kang@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 5/9] arm:exynos: add common board file for exynos 4
Date: Fri, 07 Feb 2014 16:52:53 +0900 [thread overview]
Message-ID: <52F490D5.70102@samsung.com> (raw)
In-Reply-To: <1390832143-372-6-git-send-email-p.wilczek@samsung.com>
On 27/01/14 23:15, Piotr Wilczek wrote:
> This patch adds common board file for Exynos 4 based boards.
>
> Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> arch/arm/dts/exynos4.dtsi | 139 +++++++++++++++++++++++++++
> board/samsung/common/Makefile | 1 +
> board/samsung/common/board_exynos4.c | 83 +++++++++++++++++
> include/configs/exynos4-dt.h | 170 ++++++++++++++++++++++++++++++++++
> 4 files changed, 393 insertions(+)
> create mode 100644 arch/arm/dts/exynos4.dtsi
> create mode 100644 board/samsung/common/board_exynos4.c
> create mode 100644 include/configs/exynos4-dt.h
>
> diff --git a/arch/arm/dts/exynos4.dtsi b/arch/arm/dts/exynos4.dtsi
> new file mode 100644
> index 0000000..38a6919
> --- /dev/null
> +++ b/arch/arm/dts/exynos4.dtsi
> @@ -0,0 +1,139 @@
> +/*
> + * Samsung's Exynos4 SoC common device tree source
> + *
> + * Copyright (c) 2014 Samsung Electronics Co., Ltd.
> + * http://www.samsung.com
> + *
> + * SPDX-License-Identifier: GPL-2.0+
> + */
> +
> +/include/ "skeleton.dtsi"
> +
> +/ {
> +
> + serial at 13800000 {
> + compatible = "samsung,exynos4210-uart";
> + reg = <0x13800000 0x3c>;
> + id = <0>;
> + };
> +
> + serial at 13810000 {
> + compatible = "samsung,exynos4210-uart";
> + reg = <0x13810000 0x3c>;
> + id = <1>;
> + };
> +
> + serial at 13820000 {
> + compatible = "samsung,exynos4210-uart";
> + reg = <0x13820000 0x3c>;
> + id = <2>;
> + };
> +
> + serial at 13830000 {
> + compatible = "samsung,exynos4210-uart";
> + reg = <0x13830000 0x3c>;
> + id = <3>;
> + };
> +
> + serial at 13840000 {
> + compatible = "samsung,exynos4210-uart";
> + reg = <0x13840000 0x3c>;
> + id = <4>;
> + };
> +
> + i2c at 13860000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + compatible = "samsung,s3c2440-i2c";
> + interrupts = <0 0 0>;
> + };
> +
> + i2c at 13870000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + compatible = "samsung,s3c2440-i2c";
> + interrupts = <1 1 0>;
> + };
> +
> + i2c at 13880000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + compatible = "samsung,s3c2440-i2c";
> + interrupts = <2 2 0>;
> + };
> +
> + i2c at 13890000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + compatible = "samsung,s3c2440-i2c";
> + interrupts = <3 3 0>;
> + };
> +
> + i2c at 138a0000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + compatible = "samsung,s3c2440-i2c";
> + interrupts = <4 4 0>;
> + };
> +
> + i2c at 138b0000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + compatible = "samsung,s3c2440-i2c";
> + interrupts = <5 5 0>;
> + };
> +
> + i2c at 138c0000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + compatible = "samsung,s3c2440-i2c";
> + interrupts = <6 6 0>;
> + };
> +
> + i2c at 138d0000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + compatible = "samsung,s3c2440-i2c";
> + interrupts = <7 7 0>;
> + };
> +
> + sdhci at 12510000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + compatible = "samsung,exynos-mmc";
> + reg = <0x12510000 0x1000>;
> + interrupts = <0 75 0>;
> + };
> +
> + sdhci at 12520000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + compatible = "samsung,exynos-mmc";
> + reg = <0x12520000 0x1000>;
> + interrupts = <0 76 0>;
> + };
> +
> + sdhci at 12530000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + compatible = "samsung,exynos-mmc";
> + reg = <0x12530000 0x1000>;
> + interrupts = <0 77 0>;
> + };
> +
> + sdhci at 12540000 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + compatible = "samsung,exynos-mmc";
> + reg = <0x12540000 0x1000>;
> + interrupts = <0 78 0>;
> + };
> +
> + gpio: gpio {
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> +};
> diff --git a/board/samsung/common/Makefile b/board/samsung/common/Makefile
> index 7d2bb8c..25f1e40 100644
> --- a/board/samsung/common/Makefile
> +++ b/board/samsung/common/Makefile
> @@ -12,4 +12,5 @@ obj-$(CONFIG_MISC_COMMON) += misc.o
>
> ifndef CONFIG_SPL_BUILD
> obj-$(CONFIG_BOARD_COMMON) += board.o
> +obj-$(CONFIG_BOARD_COMMON_EXYNOS4) += board_exynos4.o
> endif
> diff --git a/board/samsung/common/board_exynos4.c b/board/samsung/common/board_exynos4.c
> new file mode 100644
> index 0000000..2d313e6
> --- /dev/null
> +++ b/board/samsung/common/board_exynos4.c
I don't understand why need exynos4 common board file.
There's already exist board.c that is common board file for samsung.
> @@ -0,0 +1,83 @@
> +/*
> + * (C) Copyright 2014 SAMSUNG Electronics
> + * Piotr Wilczek <p.wilczek@samsung.com>
> + *
> + * SPDX-License-Identifier: GPL-2.0+
> + */
> +
> +#include <common.h>
> +#include <fdtdec.h>
> +#include <asm/io.h>
> +#include <asm/arch/board.h>
> +#include <asm/arch/cpu.h>
> +#include <asm/arch/gpio.h>
> +#include <asm/arch/mmc.h>
> +#include <asm/arch/pinmux.h>
> +#include <asm/arch/power.h>
> +#include <power/pmic.h>
> +
> +DECLARE_GLOBAL_DATA_PTR;
> +
> +int dram_init(void)
> +{
> + int i;
> + u32 addr;
> +
> + for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
> + addr = CONFIG_SYS_SDRAM_BASE + (i * SDRAM_BANK_SIZE);
> + gd->ram_size += get_ram_size((long *)addr, SDRAM_BANK_SIZE);
> + }
> + return 0;
> +}
> +
> +void dram_init_banksize(void)
> +{
> + int i;
> + u32 addr, size;
> +
> + for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
> + addr = CONFIG_SYS_SDRAM_BASE + (i * SDRAM_BANK_SIZE);
> + size = get_ram_size((long *)addr, SDRAM_BANK_SIZE);
> +
> + gd->bd->bi_dram[i].start = addr;
> + gd->bd->bi_dram[i].size = size;
> + }
> +}
> +
> +int board_init(void)
> +{
> +#ifdef CONFIG_SYS_SPL_ARGS_ADDR
> + gd->bd->bi_boot_params = CONFIG_SYS_SPL_ARGS_ADDR;
> +#else
> + gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
> +#endif
> +
> + return exynos_init();
> +}
> +
> +#ifdef CONFIG_OF_CONTROL
> +#ifdef CONFIG_GENERIC_MMC
> +int board_mmc_init(bd_t *bis)
> +{
> + int ret;
> +
> + /* mmc initializattion for available channels */
> + ret = exynos_mmc_init(gd->fdt_blob);
> + if (ret)
> + debug("mmc init failed\n");
> +
> + return ret;
> +}
> +#endif
> +#ifdef CONFIG_DISPLAY_BOARDINFO
> +int checkboard(void)
> +{
> + const char *board_name;
> +
> + board_name = fdt_getprop(gd->fdt_blob, 0, "model", NULL);
> + printf("Board: %s\n", board_name ? board_name : "Unknown board");
> +
> + return 0;
> +}
> +#endif
> +#endif
> diff --git a/include/configs/exynos4-dt.h b/include/configs/exynos4-dt.h
> new file mode 100644
> index 0000000..aa941f3
> --- /dev/null
> +++ b/include/configs/exynos4-dt.h
> @@ -0,0 +1,170 @@
> +/*
> + * Copyright (C) 2014 Samsung Electronics
> + *
> + * Configuration settings for the SAMSUNG EXYNOS5 board.
> + *
> + * SPDX-License-Identifier: GPL-2.0+
> + */
> +
> +#ifndef __CONFIG_H
> +#define __CONFIG_H
> +
> +/* High Level Configuration Options */
> +#define CONFIG_SAMSUNG /* in a SAMSUNG core */
> +#define CONFIG_S5P /* S5P Family */
> +#define CONFIG_EXYNOS4 /* which is in a Exynos5 Family */
> +#define CONFIG_TIZEN /* TIZEN lib */
It's a board specific.
> +
> +#include <asm/arch/cpu.h> /* get chip and board defs */
> +
> +#define CONFIG_ARCH_CPU_INIT
> +#define CONFIG_DISPLAY_CPUINFO
> +#define CONFIG_DISPLAY_BOARDINFO
> +#define CONFIG_BOARD_COMMON_EXYNOS4
> +
> +/* Enable fdt support */
> +#define CONFIG_OF_CONTROL
> +#define CONFIG_OF_EMBED
> +
> +#define CONFIG_SYS_CACHELINE_SIZE 32
> +
> +/* input clock of PLL: EXYNOS4 boards have 24MHz input clock */
> +#define CONFIG_SYS_CLK_FREQ 24000000
> +
> +#define CONFIG_SETUP_MEMORY_TAGS
> +#define CONFIG_CMDLINE_TAG
> +#define CONFIG_REVISION_TAG
> +#define CONFIG_INITRD_TAG
> +#define CONFIG_CMDLINE_EDITING
> +
> +#include <asm/sizes.h>
> +/* Size of malloc() pool */
> +#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (80 * SZ_1M))
> +
> +/* select serial console configuration */
> +#define CONFIG_SERIAL2
ditto.
I think you should re-arrange what is common feature (it means soc specific) and what is board specific.
It looks confused to me.
Please fix it.
Thanks,
Minkyu Kang.
next prev parent reply other threads:[~2014-02-07 7:52 UTC|newest]
Thread overview: 97+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-27 14:15 [U-Boot] [PATCH 0/9] Exynos4: add support for device tree Piotr Wilczek
2014-01-27 14:15 ` [U-Boot] [PATCH 1/9] exynos4:pinmux:fdt: decode peripheral id Piotr Wilczek
2014-01-28 8:54 ` Jaehoon Chung
2014-01-28 12:13 ` Piotr Wilczek
2014-01-29 8:03 ` Minkyu Kang
2014-01-27 14:15 ` [U-Boot] [PATCH 2/9] video:mipidsim:fdt: Add DT support for mipi dsim driver Piotr Wilczek
2014-02-07 7:53 ` Minkyu Kang
2014-02-07 8:43 ` Piotr Wilczek
2014-01-27 14:15 ` [U-Boot] [PATCH 3/9] video:exynos_fb:fdt: add additional fdt data Piotr Wilczek
2014-02-07 7:53 ` Minkyu Kang
2014-02-07 8:19 ` Piotr Wilczek
2014-01-27 14:15 ` [U-Boot] [PATCH 4/9] drivers:mmc:sdhci: enable support for DT Piotr Wilczek
2014-01-28 9:42 ` Jaehoon Chung
2014-01-28 12:31 ` Piotr Wilczek
2014-01-27 14:15 ` [U-Boot] [PATCH 5/9] arm:exynos: add common board file for exynos 4 Piotr Wilczek
2014-02-07 7:52 ` Minkyu Kang [this message]
2014-02-07 8:40 ` Piotr Wilczek
2014-02-07 9:47 ` Minkyu Kang
2014-02-10 8:52 ` Piotr Wilczek
2014-02-10 9:09 ` Minkyu Kang
2014-01-27 14:15 ` [U-Boot] [PATCH 6/9] board:origen:fdt: Enable device tree on Origen Piotr Wilczek
2014-01-27 14:15 ` [U-Boot] [PATCH 7/9] board:universal:fdt: Enable device tree on Universal Piotr Wilczek
2014-01-27 14:15 ` [U-Boot] [PATCH 8/9] trats:fdt: Enable device tree on Trats Piotr Wilczek
2014-01-27 14:15 ` [U-Boot] [PATCH 9/9] board:trats2:fdt: Enable device tree on Trats2 Piotr Wilczek
2014-01-28 9:47 ` Jaehoon Chung
2014-01-28 12:41 ` Piotr Wilczek
2014-02-13 14:10 ` [U-Boot] [PATCH V2 00/12] Exynos4: add support for device tree Piotr Wilczek
2014-02-13 14:10 ` [U-Boot] [PATCH V2 01/12] exynos4:pinmux:fdt: decode peripheral id Piotr Wilczek
2014-02-13 14:10 ` [U-Boot] [PATCH V2 02/12] video:mipidsim:fdt: Add DT support for mipi dsim driver Piotr Wilczek
2014-02-13 14:10 ` [U-Boot] [PATCH V2 03/12] video:exynos_fb:fdt: add additional fdt data Piotr Wilczek
2014-02-13 14:10 ` [U-Boot] [PATCH V2 04/12] drivers:mmc:sdhci: enable support for DT Piotr Wilczek
2014-02-13 14:10 ` [U-Boot] [PATCH V2 05/12] board:samsung:common: remove unused max77686 init function Piotr Wilczek
2014-02-14 5:32 ` Rajeshwari Birje
2014-02-14 9:48 ` Piotr Wilczek
2014-02-14 11:40 ` Rajeshwari Birje
2014-02-22 7:37 ` Minkyu Kang
2014-02-24 6:39 ` Piotr Wilczek
2014-02-24 10:05 ` Minkyu Kang
2014-02-13 14:10 ` [U-Boot] [PATCH V2 06/12] board:samsung: move checkboard to common file Piotr Wilczek
2014-02-14 5:35 ` Rajeshwari Birje
2014-02-13 14:10 ` [U-Boot] [PATCH V2 07/12] arm:exynos: add common DTS file for exynos 4 Piotr Wilczek
2014-02-13 14:10 ` [U-Boot] [PATCH V2 08/12] arm:exynos: enble sdhci and misc_init to common board Piotr Wilczek
2014-02-13 14:10 ` [U-Boot] [PATCH V2 09/12] board:origen: Enable device tree on Origen Piotr Wilczek
2014-02-13 14:10 ` [U-Boot] [PATCH V2 10/12] board:universal: Enable device tree on Universal Piotr Wilczek
2014-02-14 8:53 ` Przemyslaw Marczak
2014-02-13 14:10 ` [U-Boot] [PATCH V2 11/12] board:trats: Enable device tree on Trats Piotr Wilczek
2014-02-13 14:10 ` [U-Boot] [PATCH V2 12/12] board:trats2: Enable device tree on Trats2 Piotr Wilczek
2014-02-25 14:33 ` [U-Boot] [PATCH V3 00/12] Exynos4: add support for device tree Piotr Wilczek
2014-02-25 14:33 ` [U-Boot] [PATCH V3 01/12] exynos4:pinmux:fdt: decode peripheral id Piotr Wilczek
2014-02-25 14:33 ` [U-Boot] [PATCH V3 02/12] video:mipidsim:fdt: Add DT support for mipi dsim driver Piotr Wilczek
2014-02-27 14:59 ` Ajay kumar
2014-02-28 7:48 ` Piotr Wilczek
2014-02-25 14:33 ` [U-Boot] [PATCH V3 03/12] video:exynos_fb:fdt: add additional fdt data Piotr Wilczek
2014-02-27 13:50 ` Ajay kumar
2014-02-27 14:10 ` Ajay kumar
2014-02-28 8:54 ` Piotr Wilczek
2014-02-25 14:33 ` [U-Boot] [PATCH V3 04/12] drivers:mmc:sdhci: enable support for DT Piotr Wilczek
2014-02-25 14:33 ` [U-Boot] [PATCH V3 05/12] board:samsung: move checkboard to common file Piotr Wilczek
2014-02-25 14:33 ` [U-Boot] [PATCH V3 06/12] arm:exynos: add common DTS file for exynos 4 Piotr Wilczek
2014-02-25 14:33 ` [U-Boot] [PATCH V3 07/12] board:samsung:common: move max77686 init function Piotr Wilczek
2014-02-25 14:33 ` [U-Boot] [PATCH V3 08/12] arm:exynos: enable sdhci and misc_init to common board Piotr Wilczek
2014-02-25 14:33 ` [U-Boot] [PATCH V3 09/12] board:origen: Enable device tree on Origen Piotr Wilczek
2014-02-26 2:47 ` Minkyu Kang
2014-02-25 14:33 ` [U-Boot] [PATCH V3 10/12] board:universal: Enable device tree on Universal Piotr Wilczek
2014-02-25 14:33 ` [U-Boot] [PATCH V3 11/12] board:trats: Enable device tree on Trats Piotr Wilczek
2014-02-25 14:33 ` [U-Boot] [PATCH V3 12/12] board:trats2: Enable device tree on Trats2 Piotr Wilczek
2014-03-04 13:55 ` [U-Boot] [PATCH V4 00/12] Exynos4: add support for device tree Piotr Wilczek
2014-03-04 13:55 ` [U-Boot] [PATCH V4 01/12] exynos4:pinmux:fdt: decode peripheral id Piotr Wilczek
2014-03-04 13:55 ` [U-Boot] [PATCH V4 02/12] video:mipidsim:fdt: Add DT support for mipi dsim driver Piotr Wilczek
2014-03-05 6:16 ` Ajay kumar
2014-03-05 6:57 ` Piotr Wilczek
2014-03-04 13:55 ` [U-Boot] [PATCH V4 03/12] video:exynos_fb:fdt: add additional fdt data Piotr Wilczek
2014-03-05 6:06 ` Ajay kumar
2014-03-05 7:11 ` Piotr Wilczek
2014-03-04 13:55 ` [U-Boot] [PATCH V4 04/12] drivers:mmc:sdhci: enable support for DT Piotr Wilczek
2014-03-04 13:55 ` [U-Boot] [PATCH V4 05/12] board:samsung: move checkboard to common file Piotr Wilczek
2014-03-04 13:55 ` [U-Boot] [PATCH V4 06/12] arm:exynos: add common DTS file for exynos 4 Piotr Wilczek
2014-03-04 13:55 ` [U-Boot] [PATCH V4 07/12] board:samsung:common: move max77686 init function Piotr Wilczek
2014-03-04 13:55 ` [U-Boot] [PATCH V4 08/12] arm:exynos: enable sdhci and misc_init to common board Piotr Wilczek
2014-03-04 13:55 ` [U-Boot] [PATCH V4 09/12] board:origen: Enable device tree on Origen Piotr Wilczek
2014-03-04 13:55 ` [U-Boot] [PATCH V4 10/12] board:universal: Enable device tree on Universal Piotr Wilczek
2014-03-04 13:55 ` [U-Boot] [PATCH V4 11/12] board:trats: Enable device tree on Trats Piotr Wilczek
2014-03-04 13:55 ` [U-Boot] [PATCH V4 12/12] board:trats2: Enable device tree on Trats2 Piotr Wilczek
2014-03-07 13:59 ` [U-Boot] [PATCH V5 00/12] Exynos4: add support for device tree Piotr Wilczek
2014-03-07 13:59 ` [U-Boot] [PATCH V5 01/12] exynos4:pinmux:fdt: decode peripheral id Piotr Wilczek
2014-03-07 13:59 ` [U-Boot] [PATCH V5 02/12] video:mipidsim:fdt: Add DT support for mipi dsim driver Piotr Wilczek
2014-03-07 13:59 ` [U-Boot] [PATCH V5 03/12] video:exynos_fb:fdt: add additional fdt data Piotr Wilczek
2014-03-07 13:59 ` [U-Boot] [PATCH V5 04/12] drivers:mmc:sdhci: enable support for DT Piotr Wilczek
2014-03-07 13:59 ` [U-Boot] [PATCH V5 05/12] board:samsung: move checkboard to common file Piotr Wilczek
2014-03-07 13:59 ` [U-Boot] [PATCH V5 06/12] arm:exynos: add common DTS file for exynos 4 Piotr Wilczek
2014-03-07 13:59 ` [U-Boot] [PATCH V5 07/12] board:samsung:common: move max77686 init function Piotr Wilczek
2014-03-07 13:59 ` [U-Boot] [PATCH V5 08/12] arm:exynos: enable sdhci and misc_init to common board Piotr Wilczek
2014-03-07 13:59 ` [U-Boot] [PATCH V5 09/12] board:origen: Enable device tree on Origen Piotr Wilczek
2014-03-07 13:59 ` [U-Boot] [PATCH V5 10/12] board:universal: Enable device tree on Universal Piotr Wilczek
2014-03-07 13:59 ` [U-Boot] [PATCH V5 11/12] board:trats: Enable device tree on Trats Piotr Wilczek
2014-03-07 13:59 ` [U-Boot] [PATCH V5 12/12] board:trats2: Enable device tree on Trats2 Piotr Wilczek
2014-03-12 11:59 ` [U-Boot] [PATCH V5 00/12] Exynos4: add support for device tree Minkyu Kang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52F490D5.70102@samsung.com \
--to=mk7.kang@samsung.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox