From patchwork Fri Jul 14 21:44:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Dureghello X-Patchwork-Id: 788812 X-Patchwork-Delegate: jason.jin@freescale.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3x8RC52GdMz9s7F for ; Sat, 15 Jul 2017 07:48:33 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 1384EC21D95; Fri, 14 Jul 2017 21:48:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 140D4C21E4A; Fri, 14 Jul 2017 21:44:29 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 97EF9C21E53; Fri, 14 Jul 2017 21:44:27 +0000 (UTC) Received: from sysam.it (sysam.it [5.39.81.93]) by lists.denx.de (Postfix) with ESMTPS id 67F36C21C2A for ; Fri, 14 Jul 2017 21:44:06 +0000 (UTC) Received: (qmail 9764 invoked from network); 14 Jul 2017 21:12:35 -0000 Received: from host160-163-dynamic.56-82-r.retail.telecomitalia.it (HELO localhost.localdomain) (angelo@sysam.it@82.56.163.160) by sysam.it with ESMTPA; 14 Jul 2017 21:12:35 -0000 From: Angelo Dureghello To: u-boot@lists.denx.de Date: Fri, 14 Jul 2017 23:44:03 +0200 Message-Id: <20170714214403.14166-1-angelo@sysam.it> X-Mailer: git-send-email 2.13.2 Cc: Angelo Dureghello , alison.wang@freescale.com Subject: [U-Boot] [PATCH] m68k: mcf5445x: allow CS0 to be undefined X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" On some boards, CONFIG_SYS_CS0_BASE can be undefined, since CS0 is not connected to any signal. Signed-off-by: Angelo Dureghello --- arch/m68k/cpu/mcf5445x/cpu_init.c | 2 ++ arch/m68k/cpu/mcf5445x/start.S | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/arch/m68k/cpu/mcf5445x/cpu_init.c b/arch/m68k/cpu/mcf5445x/cpu_init.c index b4a8eefa94..5d2b116be1 100644 --- a/arch/m68k/cpu/mcf5445x/cpu_init.c +++ b/arch/m68k/cpu/mcf5445x/cpu_init.c @@ -205,6 +205,7 @@ void cpu_init_f(void) /* FlexBus Chipselect */ init_fbcs(); +#ifdef CONFIG_SYS_CS0_BASE /* * now the flash base address is no longer at 0 (Newer ColdFire family * boot at address 0 instead of 0xFFnn_nnnn). The vector table must @@ -212,6 +213,7 @@ void cpu_init_f(void) */ if (CONFIG_SYS_CS0_BASE != 0) setvbr(CONFIG_SYS_CS0_BASE); +#endif icache_enable(); } diff --git a/arch/m68k/cpu/mcf5445x/start.S b/arch/m68k/cpu/mcf5445x/start.S index 0487d84a2f..123bbd80b8 100644 --- a/arch/m68k/cpu/mcf5445x/start.S +++ b/arch/m68k/cpu/mcf5445x/start.S @@ -159,6 +159,7 @@ asm_dram_init: move.l #(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET), %sp clr.l %sp@- +#ifdef CONFIG_SYS_CS0_BASE /* Must disable global address */ move.l #0xFC008000, %a1 move.l #(CONFIG_SYS_CS0_BASE), (%a1) @@ -166,6 +167,7 @@ asm_dram_init: move.l #(CONFIG_SYS_CS0_CTRL), (%a1) move.l #0xFC008004, %a1 move.l #(CONFIG_SYS_CS0_MASK), (%a1) +#endif #endif /* CONFIG_CF_SBF */ #ifdef CONFIG_MCF5441x @@ -507,6 +509,7 @@ asm_nand_init: movec %d0, %ACR2 movec %d0, %ACR3 +#ifdef CONFIG_SYS_CS0_BASE /* Must disable global address */ move.l #0xFC008000, %a1 move.l #(CONFIG_SYS_CS0_BASE), (%a1) @@ -514,6 +517,7 @@ asm_nand_init: move.l #(CONFIG_SYS_CS0_CTRL), (%a1) move.l #0xFC008004, %a1 move.l #(CONFIG_SYS_CS0_MASK), (%a1) +#endif /* NAND port configuration */ move.l #0xEC094048, %a1