From patchwork Wed Apr 9 12:25:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 337834 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 481B6140156 for ; Wed, 9 Apr 2014 22:26:25 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8B1EE4B600; Wed, 9 Apr 2014 14:26:23 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 HIdOZwJlu3in; Wed, 9 Apr 2014 14:26:23 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0B0664B5E4; Wed, 9 Apr 2014 14:26:21 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 732A34B5E4 for ; Wed, 9 Apr 2014 14:26:17 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 kR8J1SLXFEyH for ; Wed, 9 Apr 2014 14:26:15 +0200 (CEST) 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 mail-qa0-f45.google.com (mail-qa0-f45.google.com [209.85.216.45]) by theia.denx.de (Postfix) with ESMTPS id 0E7314B5D6 for ; Wed, 9 Apr 2014 14:26:10 +0200 (CEST) Received: by mail-qa0-f45.google.com with SMTP id cm18so2318955qab.32 for ; Wed, 09 Apr 2014 05:26:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id; bh=JYeBP2rOVW++X1GSGhG6TN1z1g0sAZ47LBV+bOveMCg=; b=ErVtd4++ShibjRpGcQAa9R1mSUFKcPnIn6mMR3MzsjBVGmVwnY7uxWrn8SXhEZB4bb VBSBc67Np7kBACrYb5vGQBc1Nqd7CiI+e6Ge7uyWXAcHX+kWLNXlTfPfPPiUzvww4HhQ /bfEUeQnGiF6ts3vLYO0dKlvi3Ne3KOpsIU2WeFz3hJ6Y4Ch60XA7XSC+g3Uq8v1fZLp 1nFmpwISe2jJiU5H/PZZT4XJU65vbL+rDUb50J+Yh7mof7j35A3mKM/NtayemNDXwJ9x kQzMU2utBfoAb/3YtiLEZvxlx8UAijo28qp8txnwsUFpBlKasePJq5h1Oj3mQswB4ABQ QGtA== X-Received: by 10.224.16.69 with SMTP id n5mr11856127qaa.7.1397046366882; Wed, 09 Apr 2014 05:26:06 -0700 (PDT) Received: from bill-the-cat.ec.rr.com (cpe-098-121-186-226.ec.res.rr.com. [98.121.186.226]) by mx.google.com with ESMTPSA id 65sm900249qgj.20.2014.04.09.05.26.05 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 09 Apr 2014 05:26:05 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Date: Wed, 9 Apr 2014 08:25:57 -0400 Message-Id: <1397046357-12804-1-git-send-email-trini@ti.com> X-Mailer: git-send-email 1.7.9.5 Subject: [U-Boot] [PATCH] am335x: Switch to CONFIG_SKIP_LOWLEVEL_INIT from guarding SPL or NOR_BOOT X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de In the case of SPL or NOR_BOOT (no SPL involved) we need to include certain code in the build. Use !CONFIG_SKIP_LOWLEVEL_INIT rather than CONFIG_SPL_BUILD || CONFIG_NOR_BOOT to make the code clearer, and to make supporting XIP QSPI boot clearer in the code. Signed-off-by: Tom Rini Reviewed-by: Wolfgang Denk --- arch/arm/cpu/armv7/am33xx/board.c | 4 +--- arch/arm/cpu/armv7/am33xx/emif4.c | 2 +- board/silica/pengwyn/Makefile | 2 +- board/ti/am335x/Makefile | 2 +- board/ti/am335x/board.c | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/arch/arm/cpu/armv7/am33xx/board.c b/arch/arm/cpu/armv7/am33xx/board.c index fb44cc8..28c16f8 100644 --- a/arch/arm/cpu/armv7/am33xx/board.c +++ b/arch/arm/cpu/armv7/am33xx/board.c @@ -142,7 +142,7 @@ int arch_misc_init(void) return 0; } -#if defined(CONFIG_SPL_BUILD) || defined(CONFIG_NOR_BOOT) +#ifndef CONFIG_SKIP_LOWLEVEL_INIT /* * This function is the place to do per-board things such as ramp up the * MPU clock frequency. @@ -200,9 +200,7 @@ static void watchdog_disable(void) while (readl(&wdtimer->wdtwwps) != 0x0) ; } -#endif -#if defined(CONFIG_SPL_BUILD) || defined(CONFIG_NOR_BOOT) void s_init(void) { /* diff --git a/arch/arm/cpu/armv7/am33xx/emif4.c b/arch/arm/cpu/armv7/am33xx/emif4.c index 3e39752..2c67c32 100644 --- a/arch/arm/cpu/armv7/am33xx/emif4.c +++ b/arch/arm/cpu/armv7/am33xx/emif4.c @@ -35,7 +35,7 @@ void dram_init_banksize(void) } -#if defined(CONFIG_SPL_BUILD) || defined(CONFIG_NOR_BOOT) +#ifndef CONFIG_SKIP_LOWLEVEL_INIT #ifdef CONFIG_TI81XX static struct dmm_lisa_map_regs *hw_lisa_map_regs = (struct dmm_lisa_map_regs *)DMM_BASE; diff --git a/board/silica/pengwyn/Makefile b/board/silica/pengwyn/Makefile index c8b4f9a..804ac37 100644 --- a/board/silica/pengwyn/Makefile +++ b/board/silica/pengwyn/Makefile @@ -6,7 +6,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_NOR_BOOT),y) +ifeq ($(CONFIG_SKIP_LOWLEVEL_INIT),) obj-y := mux.o endif diff --git a/board/ti/am335x/Makefile b/board/ti/am335x/Makefile index c8b4f9a..804ac37 100644 --- a/board/ti/am335x/Makefile +++ b/board/ti/am335x/Makefile @@ -6,7 +6,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_NOR_BOOT),y) +ifeq ($(CONFIG_SKIP_LOWLEVEL_INIT),) obj-y := mux.o endif diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index 554398f..fe1d000 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -81,7 +81,7 @@ static int read_eeprom(struct am335x_baseboard_id *header) return 0; } -#if defined(CONFIG_SPL_BUILD) || defined(CONFIG_NOR_BOOT) +#ifndef CONFIG_SKIP_LOWLEVEL_INIT static const struct ddr_data ddr2_data = { .datardsratio0 = ((MT47H128M16RT25E_RD_DQS<<30) | (MT47H128M16RT25E_RD_DQS<<20) |