From patchwork Tue Nov 4 14:52:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 40161 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9FB4C240A6 for ; Tue, 4 Nov 2014 14:53:16 +0000 (UTC) Received: by mail-lb0-f199.google.com with SMTP id n15sf2260114lbi.10 for ; Tue, 04 Nov 2014 06:53:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=e3gPRpSfBKzJKk8aRehUeAb9QBafOCA9icftsL8ip/k=; b=nJYSxK+rPW99Uu9op9ACv5wbjDYtanxKQ/3lDLMi080omTkI1/8VhXPnaAMjHMtJfT KcmtQusl3pAEkCQ+i7S5eUMG3gOGxMd5aynPRJk6ENSxHvd0/X4esyVVFDv0jA+6XCR1 UBAAVjEgR2jzHU2TH/VFEHxuPcO4aDooWduA2NR5Gf7hOI4npmJZq2Pg8jbc9h+a3AdO CJ2BsfsAWDNatZqkhM13/1yJDkQtZkQdKtF6GkrJVgP0dH2XLXkFZcDRtQNH7U11DyPH y2hFJY3g4Sg90Inq1E724RrO5qytcvKuATyPY/KfOTfzGY8ruZp6eZ2qW+cJ7bFbwofJ e46A== X-Gm-Message-State: ALoCoQl46yJdB8DM1pBte2PGRhtfT5U3jZSJbRXpEegLgR69TaJrGrtdNTVzVKUAfwafbhRPNudS X-Received: by 10.112.32.163 with SMTP id k3mr9095lbi.17.1415112795434; Tue, 04 Nov 2014 06:53:15 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.26.98 with SMTP id k2ls840771lag.15.gmail; Tue, 04 Nov 2014 06:53:15 -0800 (PST) X-Received: by 10.152.43.97 with SMTP id v1mr59967975lal.3.1415112795319; Tue, 04 Nov 2014 06:53:15 -0800 (PST) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id jo3si970422lab.125.2014.11.04.06.53.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Nov 2014 06:53:15 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by mail-la0-f51.google.com with SMTP id q1so1012366lam.38 for ; Tue, 04 Nov 2014 06:53:15 -0800 (PST) X-Received: by 10.152.116.102 with SMTP id jv6mr60101042lab.40.1415112795171; Tue, 04 Nov 2014 06:53:15 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp128879lbc; Tue, 4 Nov 2014 06:53:14 -0800 (PST) X-Received: by 10.194.184.140 with SMTP id eu12mr38734334wjc.47.1415112794391; Tue, 04 Nov 2014 06:53:14 -0800 (PST) Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id r1si12663420wik.85.2014.11.04.06.53.13 for ; Tue, 04 Nov 2014 06:53:14 -0800 (PST) Received-SPF: none (google.com: u-boot-bounces@lists.denx.de does not designate permitted sender hosts) client-ip=85.214.87.163; Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D661B4B825; Tue, 4 Nov 2014 15:53:06 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ey-ISJgWKgaS; Tue, 4 Nov 2014 15:53:06 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 36BA34B8B6; Tue, 4 Nov 2014 15:53:00 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3F4494B79B for ; Tue, 4 Nov 2014 15:52:50 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6UpM1Sx7qt1b for ; Tue, 4 Nov 2014 15:52:50 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by theia.denx.de (Postfix) with ESMTPS id D9C6E4B6DD for ; Tue, 4 Nov 2014 15:52:45 +0100 (CET) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id sA4Eqh3g005003 for ; Tue, 4 Nov 2014 08:52:43 -0600 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id sA4EqhvH011125 for ; Tue, 4 Nov 2014 08:52:43 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Tue, 4 Nov 2014 08:52:42 -0600 Received: from khorivan.itg.ti.com (incasgf5a_e1_2.itg.ti.com [10.167.216.36]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id sA4Eqc26012809; Tue, 4 Nov 2014 08:52:41 -0600 From: Ivan Khoronzhuk To: , Date: Tue, 4 Nov 2014 16:52:34 +0200 Message-ID: <1415112755-3099-2-git-send-email-ivan.khoronzhuk@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1415112755-3099-1-git-send-email-ivan.khoronzhuk@ti.com> References: <1415112755-3099-1-git-send-email-ivan.khoronzhuk@ti.com> MIME-Version: 1.0 Subject: [U-Boot] [U-boot] [Patch 1/2] keystone2: config: restructure handling of default env settings X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Murali Karicheri Currently to customize env for various ks2 boards, individual variables such as NAME_FS etc are defined and included in the common config.h to define CONFIG_EXTRA_ENV_SETTINGS. This doesn't scale well if a variable is not applicable on a specific board. Using this scheme, we have to define variables with empty value and it's ugly. Instead, to allow board specific customization of default env variable, define a common CONFIG_EXTRA_ENV_KS2_SETTINGS for all common variables and define board specific variables in individual board specific config.h using CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS. Use the common and board specific variables to define CONFIG_EXTRA_ENV_SETTINGS. This way more variables can be added in future for individual boards without affecting the other config.h files. Signed-off-by: Murali Karicheri Signed-off-by: Ivan Khoronzhuk Reviewed-by: Tom Rini --- include/configs/k2e_evm.h | 16 ++++++++-------- include/configs/k2hk_evm.h | 16 ++++++++-------- include/configs/k2l_evm.h | 16 ++++++++-------- include/configs/ks2_evm.h | 7 +------ 4 files changed, 25 insertions(+), 30 deletions(-) diff --git a/include/configs/k2e_evm.h b/include/configs/k2e_evm.h index 8c3a0c0..6b87f6c 100644 --- a/include/configs/k2e_evm.h +++ b/include/configs/k2e_evm.h @@ -17,14 +17,14 @@ /* U-Boot general configuration */ #define CONFIG_SYS_PROMPT "K2E EVM # " -#define KS2_ARGS_UBI "args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs "\ - "root=ubi0:rootfs rootflags=sync rw ubi.mtd=2,2048\0" - -#define KS2_FDT_NAME "name_fdt=k2e-evm.dtb\0" -#define KS2_ADDR_MON "addr_mon=0x0c140000\0" -#define KS2_NAME_MON "name_mon=skern-k2e-evm.bin\0" -#define NAME_UBOOT "name_uboot=u-boot-spi-k2e-evm.gph\0" -#define NAME_UBI "name_ubi=k2e-evm-ubifs.ubi\0" +#define CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS \ + "addr_mon=0x0c140000\0" \ + "args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs " \ + "root=ubi0:rootfs rootflags=sync rw ubi.mtd=2,2048\0" \ + "name_fdt=k2e-evm.dtb\0" \ + "name_mon=skern-k2e-evm.bin\0" \ + "name_ubi=k2e-evm-ubifs.ubi\0" \ + "name_uboot=u-boot-spi-k2e-evm.gph\0" #include diff --git a/include/configs/k2hk_evm.h b/include/configs/k2hk_evm.h index ebf4630..33e43eb 100644 --- a/include/configs/k2hk_evm.h +++ b/include/configs/k2hk_evm.h @@ -17,14 +17,14 @@ /* U-Boot general configuration */ #define CONFIG_SYS_PROMPT "K2HK EVM # " -#define KS2_ARGS_UBI "args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs "\ - "root=ubi0:rootfs rootflags=sync rw ubi.mtd=2,2048\0" - -#define KS2_FDT_NAME "name_fdt=k2hk-evm.dtb\0" -#define KS2_ADDR_MON "addr_mon=0x0c5f0000\0" -#define KS2_NAME_MON "name_mon=skern-k2hk-evm.bin\0" -#define NAME_UBOOT "name_uboot=u-boot-spi-k2hk-evm.gph\0" -#define NAME_UBI "name_ubi=k2hk-evm-ubifs.ubi\0" +#define CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS \ + "addr_mon=0x0c5f0000\0" \ + "args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs " \ + "root=ubi0:rootfs rootflags=sync rw ubi.mtd=2,2048\0" \ + "name_fdt=k2hk-evm.dtb\0" \ + "name_mon=skern-k2hk-evm.bin\0" \ + "name_ubi=k2hk-evm-ubifs.ubi\0" \ + "name_uboot=u-boot-spi-k2hk-evm.gph\0" #include diff --git a/include/configs/k2l_evm.h b/include/configs/k2l_evm.h index ec0d543..07326fc 100644 --- a/include/configs/k2l_evm.h +++ b/include/configs/k2l_evm.h @@ -17,14 +17,14 @@ /* U-Boot general configuration */ #define CONFIG_SYS_PROMPT "K2L EVM # " -#define KS2_ARGS_UBI "args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs "\ - "root=ubi0:rootfs rootflags=sync rw ubi.mtd=2,4096\0" - -#define KS2_FDT_NAME "name_fdt=k2l-evm.dtb\0" -#define KS2_ADDR_MON "addr_mon=0x0c140000\0" -#define KS2_NAME_MON "name_mon=skern-k2l-evm.bin\0" -#define NAME_UBOOT "name_uboot=u-boot-spi-k2l-evm.gph\0" -#define NAME_UBI "name_ubi=k2l-evm-ubifs.ubi\0" +#define CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS \ + "addr_mon=0x0c140000\0" \ + "args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs " \ + "root=ubi0:rootfs rootflags=sync rw ubi.mtd=2,4096\0" \ + "name_fdt=k2l-evm.dtb\0" \ + "name_mon=skern-k2l-evm.bin\0" \ + "name_ubi=k2l-evm-ubifs.ubi\0" \ + "name_uboot=u-boot-spi-k2l-evm.gph\0" #include diff --git a/include/configs/ks2_evm.h b/include/configs/ks2_evm.h index f7585ba..19273d9 100644 --- a/include/configs/ks2_evm.h +++ b/include/configs/ks2_evm.h @@ -247,6 +247,7 @@ #define CONFIG_BOOTDELAY 3 #define CONFIG_BOOTFILE "uImage" #define CONFIG_EXTRA_ENV_SETTINGS \ + CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS \ "boot=ubi\0" \ "tftp_root=/\0" \ "nfs_root=/export\0" \ @@ -254,18 +255,13 @@ "mem_reserve=512M\0" \ "addr_fdt=0x87000000\0" \ "addr_kern=0x88000000\0" \ - KS2_ADDR_MON \ "addr_uboot=0x87000000\0" \ "addr_fs=0x82000000\0" \ "addr_ubi=0x82000000\0" \ "addr_secdb_key=0xc000000\0" \ "fdt_high=0xffffffff\0" \ - KS2_FDT_NAME \ "name_fs=arago-console-image.cpio.gz\0" \ "name_kern=uImage\0" \ - KS2_NAME_MON \ - NAME_UBOOT \ - NAME_UBI \ "run_mon=mon_install ${addr_mon}\0" \ "run_kern=bootm ${addr_kern} - ${addr_fdt}\0" \ "init_net=run args_all args_net\0" \ @@ -284,7 +280,6 @@ "burn_uboot_nand=nand erase 0 0x100000; " \ "nand write ${addr_uboot} 0 ${filesize}\0" \ "args_all=setenv bootargs console=ttyS0,115200n8 rootwait=1\0" \ - KS2_ARGS_UBI \ "args_net=setenv bootargs ${bootargs} rootfstype=nfs " \ "root=/dev/nfs rw nfsroot=${serverip}:${nfs_root}," \ "${nfs_options} ip=dhcp\0" \