From patchwork Fri Mar 2 09:32:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Leroy X-Patchwork-Id: 880392 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=c-s.fr Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zt3yL4328z9s3P for ; Fri, 2 Mar 2018 20:33:30 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 415AEC2209C; Fri, 2 Mar 2018 09:32:49 +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 5B7D0C2205E; Fri, 2 Mar 2018 09:32:28 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 5697DC21C51; Fri, 2 Mar 2018 09:32:26 +0000 (UTC) Received: from pegase1.c-s.fr (pegase1.c-s.fr [93.17.236.30]) by lists.denx.de (Postfix) with ESMTPS id EA551C21C50 for ; Fri, 2 Mar 2018 09:32:25 +0000 (UTC) Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 3zt3wp4c1wz9ttBc; Fri, 2 Mar 2018 10:32:10 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id pdcYTO5M3E70; Fri, 2 Mar 2018 10:32:10 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 3zt3wp406Xz9ttBQ; Fri, 2 Mar 2018 10:32:10 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 7024F8B842; Fri, 2 Mar 2018 10:32:25 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id 84UeC7EJ0Q-t; Fri, 2 Mar 2018 10:32:25 +0100 (CET) Received: from po15720vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.5]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 38E1B8B840; Fri, 2 Mar 2018 10:32:25 +0100 (CET) Received: by po15720vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 31A326C4AD; Fri, 2 Mar 2018 10:32:25 +0100 (CET) Message-Id: <10aff1afc661d1a12fc49bdefdc075c8e81bc3a8.1519976944.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy To: Tom Rini Date: Fri, 2 Mar 2018 10:32:25 +0100 (CET) Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH v2 01/10] powerpc: mpc8xx: initialisation of global data 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" Global data pointer has to be initialised Global data area has to be zeroised Signed-off-by: Christophe Leroy --- arch/powerpc/cpu/mpc8xx/cpu_init.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/powerpc/cpu/mpc8xx/cpu_init.c b/arch/powerpc/cpu/mpc8xx/cpu_init.c index dc601a12976..3c9c4b19753 100644 --- a/arch/powerpc/cpu/mpc8xx/cpu_init.c +++ b/arch/powerpc/cpu/mpc8xx/cpu_init.c @@ -12,6 +12,8 @@ #include #include +DECLARE_GLOBAL_DATA_PTR; + /* * Breath some life into the CPU... * @@ -24,6 +26,10 @@ void cpu_init_f(immap_t __iomem *immr) memctl8xx_t __iomem *memctl = &immr->im_memctl; ulong reg; + gd = (gd_t *)(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_GBL_DATA_OFFSET); + /* Clear initial global data */ + memset((void *)gd, 0, sizeof(*gd)); + /* SYPCR - contains watchdog control (11-9) */ out_be32(&immr->im_siu_conf.sc_sypcr, CONFIG_SYS_SYPCR); From patchwork Fri Mar 2 09:32:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Leroy X-Patchwork-Id: 880395 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=c-s.fr Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zt40v3bV5z9s4V for ; Fri, 2 Mar 2018 20:35:43 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id CDC87C21F99; Fri, 2 Mar 2018 09:33:10 +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 36455C220BE; Fri, 2 Mar 2018 09:32:40 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id F0726C21ECC; Fri, 2 Mar 2018 09:32:32 +0000 (UTC) Received: from pegase1.c-s.fr (pegase1.c-s.fr [93.17.236.30]) by lists.denx.de (Postfix) with ESMTPS id A38A8C22075 for ; Fri, 2 Mar 2018 09:32:28 +0000 (UTC) Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 3zt3ws2Y6Fz9ttKk; Fri, 2 Mar 2018 10:32:13 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id CRVrGeUldp6I; Fri, 2 Mar 2018 10:32:13 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 3zt3ws21P0z9ttBQ; Fri, 2 Mar 2018 10:32:13 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 947568B845; Fri, 2 Mar 2018 10:32:27 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id u-HNtAB_YhhC; Fri, 2 Mar 2018 10:32:27 +0100 (CET) Received: from po15720vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.5]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 41A7D8B844; Fri, 2 Mar 2018 10:32:27 +0100 (CET) Received: by po15720vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 381D66C4AD; Fri, 2 Mar 2018 10:32:27 +0100 (CET) Message-Id: <15d7c5972966aff8575752b641783dd51437b604.1519976944.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy To: Tom Rini Date: Fri, 2 Mar 2018 10:32:27 +0100 (CET) Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH v2 02/10] board: MCR3000: replace mtd->priv by mtd_to_nand() 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" Since commit 17cb4b8f327eb ("mtd: nand: Add+use mtd_to/from_nand and nand_get/set_controller_data"), mtd_to_nand() has to be used instead of mtd->priv Signed-off-by: Christophe Leroy --- board/cssi/MCR3000/nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/cssi/MCR3000/nand.c b/board/cssi/MCR3000/nand.c index 8e5b0d0618f..4c6fc865f23 100644 --- a/board/cssi/MCR3000/nand.c +++ b/board/cssi/MCR3000/nand.c @@ -17,7 +17,7 @@ static void nand_hwcontrol(struct mtd_info *mtdinfo, int cmd, unsigned int ctrl) { - struct nand_chip *this = mtdinfo->priv; + struct nand_chip *this = mtd_to_nand(mtdinfo); immap_t __iomem *immr = (immap_t __iomem *)CONFIG_SYS_IMMR; unsigned short pddat = 0; From patchwork Fri Mar 2 09:32:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Leroy X-Patchwork-Id: 880394 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=c-s.fr Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zt40t4PxXz9s3P for ; Fri, 2 Mar 2018 20:35:42 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 3149DC21E18; Fri, 2 Mar 2018 09:33:30 +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 641A4C2206C; Fri, 2 Mar 2018 09:32:44 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B809EC22055; Fri, 2 Mar 2018 09:32:34 +0000 (UTC) Received: from pegase1.c-s.fr (pegase1.c-s.fr [93.17.236.30]) by lists.denx.de (Postfix) with ESMTPS id B3946C220C0 for ; Fri, 2 Mar 2018 09:32:30 +0000 (UTC) Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 3zt3wv36m6z9ttBc; Fri, 2 Mar 2018 10:32:15 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id f3DJ8dGEq5V6; Fri, 2 Mar 2018 10:32:15 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 3zt3wv2fbGz9ttBQ; Fri, 2 Mar 2018 10:32:15 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 981948B842; Fri, 2 Mar 2018 10:32:29 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id I5rKoMMUmGXd; Fri, 2 Mar 2018 10:32:29 +0100 (CET) Received: from po15720vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.5]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 4BA3D8B840; Fri, 2 Mar 2018 10:32:29 +0100 (CET) Received: by po15720vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 3EAA76C4AD; Fri, 2 Mar 2018 10:32:29 +0100 (CET) Message-Id: <386e86afbe9f825a0d158721cdb9b0aad4236884.1519976944.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy To: Tom Rini Date: Fri, 2 Mar 2018 10:32:29 +0100 (CET) Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH v2 03/10] board: MCR3000: Increase Monitor size 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" U-boot doesn't fit anymore in a 256kb area, increase it to 320kb Signed-off-by: Christophe Leroy --- include/configs/MCR3000.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/configs/MCR3000.h b/include/configs/MCR3000.h index 6b03873ce87..29e61c7c222 100644 --- a/include/configs/MCR3000.h +++ b/include/configs/MCR3000.h @@ -25,7 +25,7 @@ "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:" \ "mcr3k:eth0:off;" \ "${ofl_args}; " \ - "bootm 0x04060000 - 0x04050000\0" \ + "bootm 0x04070000 - 0x04060000\0" \ "tftpboot=setenv bootargs " \ "${console_args} " \ "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:" \ @@ -46,7 +46,7 @@ "${console_args} " \ "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:" \ "mcr3k:eth0:off;" \ - "bootm 0x04060000 - 0x04050000\0" \ + "bootm 0x04070000 - 0x04060000\0" \ "dhcpboot=dhcp ${loadaddr} ${filename};" \ "tftp 0xf00000 mcr3000.dtb;" \ "setenv bootargs " \ @@ -108,7 +108,7 @@ * the maximum mapped by the Linux kernel during initialization. */ #define CONFIG_SYS_BOOTMAPSZ (8 << 20) -#define CONFIG_SYS_MONITOR_LEN (256 << 10) +#define CONFIG_SYS_MONITOR_LEN (320 << 10) #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE #define CONFIG_SYS_MALLOC_LEN (4096 << 10) From patchwork Fri Mar 2 09:32:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Leroy X-Patchwork-Id: 880399 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=c-s.fr Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zt44G0y6xz9s3P for ; Fri, 2 Mar 2018 20:38:38 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id BD270C2206F; Fri, 2 Mar 2018 09:34:12 +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 D67CEC220E5; Fri, 2 Mar 2018 09:33:01 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id BA6AFC220D8; Fri, 2 Mar 2018 09:32:36 +0000 (UTC) Received: from pegase1.c-s.fr (pegase1.c-s.fr [93.17.236.30]) by lists.denx.de (Postfix) with ESMTPS id 443A0C22055 for ; Fri, 2 Mar 2018 09:32:32 +0000 (UTC) Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 3zt3ww6t8wz9ttBc; Fri, 2 Mar 2018 10:32:16 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id AwhjXwgOmVYh; Fri, 2 Mar 2018 10:32:16 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 3zt3ww5v7Nz9ttBQ; Fri, 2 Mar 2018 10:32:16 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 91BC28B840; Fri, 2 Mar 2018 10:32:31 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id Gy8IbRvmxH7i; Fri, 2 Mar 2018 10:32:31 +0100 (CET) Received: from po15720vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.5]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 577758B842; Fri, 2 Mar 2018 10:32:31 +0100 (CET) Received: by po15720vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 465C56C4AD; Fri, 2 Mar 2018 10:32:31 +0100 (CET) Message-Id: <1b61d4721947af6b907a92097624b8330969d085.1519976944.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy To: Tom Rini Date: Fri, 2 Mar 2018 10:32:31 +0100 (CET) Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH v2 04/10] soft_i2c: cleanup - no mpc8xx support 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" commit 907208c452999 ("powerpc: Partialy restore core of mpc8xx") didn't bring back support for I2C on the mpc8xx Signed-off-by: Christophe Leroy --- drivers/i2c/soft_i2c.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/i2c/soft_i2c.c b/drivers/i2c/soft_i2c.c index 4fd5551a228..cc9c5ef356f 100644 --- a/drivers/i2c/soft_i2c.c +++ b/drivers/i2c/soft_i2c.c @@ -25,9 +25,6 @@ #include #endif #endif -#if defined(CONFIG_8xx) -#include -#endif #include #if defined(CONFIG_SOFT_I2C_GPIO_SCL) From patchwork Fri Mar 2 09:32:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Leroy X-Patchwork-Id: 880393 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=c-s.fr Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zt40Q6mbwz9s3P for ; Fri, 2 Mar 2018 20:35:18 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 22A77C21C50; Fri, 2 Mar 2018 09:33:52 +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 CCAC1C220C0; Fri, 2 Mar 2018 09:32:45 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 75AA3C21F99; Fri, 2 Mar 2018 09:32:37 +0000 (UTC) Received: from pegase1.c-s.fr (pegase1.c-s.fr [93.17.236.30]) by lists.denx.de (Postfix) with ESMTPS id 359A9C220AF for ; Fri, 2 Mar 2018 09:32:34 +0000 (UTC) Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 3zt3wy5w2zz9ttBc; Fri, 2 Mar 2018 10:32:18 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id BX2JDTRhbi5J; Fri, 2 Mar 2018 10:32:18 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 3zt3wy4fr0z9ttBQ; Fri, 2 Mar 2018 10:32:18 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 85CE78B844; Fri, 2 Mar 2018 10:32:33 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id ibixaX0KNwuL; Fri, 2 Mar 2018 10:32:33 +0100 (CET) Received: from po15720vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.5]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 656FC8B843; Fri, 2 Mar 2018 10:32:33 +0100 (CET) Received: by po15720vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 51FC36C4AD; Fri, 2 Mar 2018 10:32:33 +0100 (CET) Message-Id: <53dd01f7ca9dec91bc60d682d9947cdbb922b739.1519976944.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy To: Tom Rini Date: Fri, 2 Mar 2018 10:32:33 +0100 (CET) Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH v2 05/10] boards: MCR3000: cleanup config 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" Some config is redundant with Kconfig. Fix it. Also remove unused configs Move SDRAM_MAX_SIZE in the only place it is used Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig | 1 + board/cssi/MCR3000/MCR3000.c | 2 ++ configs/MCR3000_defconfig | 2 ++ include/configs/MCR3000.h | 22 ---------------------- 4 files changed, 5 insertions(+), 22 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index e4b3043fa22..3a2653ff0d3 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -32,6 +32,7 @@ config MPC86xx config 8xx bool "MPC8xx" + select BOARD_EARLY_INIT_F imply CMD_REGINFO endchoice diff --git a/board/cssi/MCR3000/MCR3000.c b/board/cssi/MCR3000/MCR3000.c index c9288818049..6939a2cf617 100644 --- a/board/cssi/MCR3000/MCR3000.c +++ b/board/cssi/MCR3000/MCR3000.c @@ -16,6 +16,8 @@ DECLARE_GLOBAL_DATA_PTR; +#define SDRAM_MAX_SIZE (32 * 1024 * 1024) + static const uint cs1_dram_table_66[] = { /* DRAM - single read. (offset 0 in upm RAM) */ 0x0F3DFC04, 0x0FEFBC04, 0x00BE7804, 0x0FFDF400, diff --git a/configs/MCR3000_defconfig b/configs/MCR3000_defconfig index 108cf00154a..6a29f9de1ef 100644 --- a/configs/MCR3000_defconfig +++ b/configs/MCR3000_defconfig @@ -71,3 +71,5 @@ CONFIG_MPC8XX_FEC=y CONFIG_SHA256=y CONFIG_LZMA=y CONFIG_OF_LIBFDT=y +CONFIG_USE_BOOTCOMMAND=y +CONFIG_BOOTCOMMAND="run flashboot" diff --git a/include/configs/MCR3000.h b/include/configs/MCR3000.h index 29e61c7c222..ab90ea20d8f 100644 --- a/include/configs/MCR3000.h +++ b/include/configs/MCR3000.h @@ -9,7 +9,6 @@ #define __CONFIG_H /* High Level Configuration Options */ -#define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_early_init_f */ #define CONFIG_MISC_INIT_R 1 /* Call misc_init_r */ #define CONFIG_EXTRA_ENV_SETTINGS \ @@ -55,25 +54,16 @@ "${ofl_args}; " \ "bootm ${loadaddr} - 0xf00000\0" -#define CONFIG_BOOTDELAY 5 - #define CONFIG_IPADDR 192.168.0.3 #define CONFIG_SERVERIP 192.168.0.1 #define CONFIG_NETMASK 255.0.0.0 -#define CONFIG_BOOTCOMMAND "run flashboot" - #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ -#undef CONFIG_LOADS_BAUD_CHANGE /* don't allow baudrate change */ #define CONFIG_WATCHDOG 1 /* watchdog enabled */ /* Miscellaneous configurable options */ -#ifdef CONFIG_HUSH_PARSER -#define CONFIG_SYS_PROMPT_HUSH_PS2 "S3K> " -#endif - #define CONFIG_SYS_MEMTEST_START 0x00002000 #define CONFIG_SYS_MEMTEST_END 0x00800000 @@ -91,7 +81,6 @@ /* RAM configuration (note that CONFIG_SYS_SDRAM_BASE must be zero) */ #define CONFIG_SYS_SDRAM_BASE 0x00000000 -#define SDRAM_MAX_SIZE (32 * 1024 * 1024) /* FLASH organization */ #define CONFIG_SYS_FLASH_BASE CONFIG_SYS_TEXT_BASE @@ -121,24 +110,13 @@ #define CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR - CONFIG_SYS_FLASH_BASE) #define CONFIG_ENV_OVERWRITE 1 -/* Cache Configuration */ -#define CONFIG_SYS_CACHELINE_SIZE 16 - /* Ethernet configuration part */ #define CONFIG_SYS_DISCOVER_PHY 1 -#ifdef CONFIG_MPC8XX_FEC #define CONFIG_MII_INIT 1 -#endif /* NAND configuration part */ #define CONFIG_SYS_MAX_NAND_DEVICE 1 #define CONFIG_SYS_NAND_MAX_CHIPS 1 #define CONFIG_SYS_NAND_BASE 0x0C000000 -/* Internal Definitions */ - -/* Boot Flags*/ -#define BOOTFLAG_COLD 0x01 -#define BOOTFLAG_WARM 0x02 - #endif /* __CONFIG_H */ From patchwork Fri Mar 2 09:32:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Leroy X-Patchwork-Id: 880400 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=c-s.fr Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zt44s6KFfz9s3P for ; Fri, 2 Mar 2018 20:39:09 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 96911C220B7; Fri, 2 Mar 2018 09:34:31 +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 D8544C220ED; Fri, 2 Mar 2018 09:33:02 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D4632C220E5; Fri, 2 Mar 2018 09:32:39 +0000 (UTC) Received: from pegase1.c-s.fr (pegase1.c-s.fr [93.17.236.30]) by lists.denx.de (Postfix) with ESMTPS id 323ABC2208D for ; Fri, 2 Mar 2018 09:32:36 +0000 (UTC) Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 3zt3x06NRGz9ttBc; Fri, 2 Mar 2018 10:32:20 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id CmVhJkBFgZCp; Fri, 2 Mar 2018 10:32:20 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 3zt3x05VrYz9ttBQ; Fri, 2 Mar 2018 10:32:20 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 92E498B842; Fri, 2 Mar 2018 10:32:35 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id hZIUW2tjVRRV; Fri, 2 Mar 2018 10:32:35 +0100 (CET) Received: from po15720vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.5]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 6E9DA8B840; Fri, 2 Mar 2018 10:32:35 +0100 (CET) Received: by po15720vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 580FD6C4AD; Fri, 2 Mar 2018 10:32:35 +0100 (CET) Message-Id: In-Reply-To: References: From: Christophe Leroy To: Tom Rini Date: Fri, 2 Mar 2018 10:32:35 +0100 (CET) Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH v2 06/10] powerpc: mpc8xx: cleaning up watchdog 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" In preparation of migration to DM watchdog, clean up a bit. The 8xx watchdog really is a HW watchdog, so declare it as is then it goes through Kconfig Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig | 1 + arch/powerpc/cpu/mpc8xx/cpu.c | 20 +++++--------------- arch/powerpc/cpu/mpc8xx/cpu_init.c | 4 +--- include/configs/MCR3000.h | 2 -- include/watchdog.h | 5 ----- 5 files changed, 7 insertions(+), 25 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 3a2653ff0d3..b20837b473f 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -34,6 +34,7 @@ config 8xx bool "MPC8xx" select BOARD_EARLY_INIT_F imply CMD_REGINFO + imply HW_WATCHDOG endchoice diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c index 1e0ea28a918..1883440db34 100644 --- a/arch/powerpc/cpu/mpc8xx/cpu.c +++ b/arch/powerpc/cpu/mpc8xx/cpu.c @@ -273,26 +273,16 @@ unsigned long get_tbclk(void) /* ------------------------------------------------------------------------- */ -#if defined(CONFIG_WATCHDOG) -void watchdog_reset(void) +#if defined(CONFIG_HW_WATCHDOG) +void hw_watchdog_reset(void) { + immap_t __iomem *immr = (immap_t __iomem *)CONFIG_SYS_IMMR; int re_enable = disable_interrupts(); - reset_8xx_watchdog((immap_t __iomem *)CONFIG_SYS_IMMR); - if (re_enable) - enable_interrupts(); -} -#endif /* CONFIG_WATCHDOG */ - -#if defined(CONFIG_WATCHDOG) - -void reset_8xx_watchdog(immap_t __iomem *immr) -{ - /* - * All other boards use the MPC8xx Internal Watchdog - */ out_be16(&immr->im_siu_conf.sc_swsr, 0x556c); /* write magic1 */ out_be16(&immr->im_siu_conf.sc_swsr, 0xaa39); /* write magic2 */ + if (re_enable) + enable_interrupts(); } #endif /* CONFIG_WATCHDOG */ diff --git a/arch/powerpc/cpu/mpc8xx/cpu_init.c b/arch/powerpc/cpu/mpc8xx/cpu_init.c index 3c9c4b19753..654d559eeb8 100644 --- a/arch/powerpc/cpu/mpc8xx/cpu_init.c +++ b/arch/powerpc/cpu/mpc8xx/cpu_init.c @@ -34,9 +34,7 @@ void cpu_init_f(immap_t __iomem *immr) out_be32(&immr->im_siu_conf.sc_sypcr, CONFIG_SYS_SYPCR); -#if defined(CONFIG_WATCHDOG) - reset_8xx_watchdog(immr); -#endif /* CONFIG_WATCHDOG */ + WATCHDOG_RESET(); /* SIUMCR - contains debug pin configuration (11-6) */ setbits_be32(&immr->im_siu_conf.sc_siumcr, CONFIG_SYS_SIUMCR); diff --git a/include/configs/MCR3000.h b/include/configs/MCR3000.h index ab90ea20d8f..9a89089a504 100644 --- a/include/configs/MCR3000.h +++ b/include/configs/MCR3000.h @@ -60,8 +60,6 @@ #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ -#define CONFIG_WATCHDOG 1 /* watchdog enabled */ - /* Miscellaneous configurable options */ #define CONFIG_SYS_MEMTEST_START 0x00002000 diff --git a/include/watchdog.h b/include/watchdog.h index 64b59f107ad..52f4c506b04 100644 --- a/include/watchdog.h +++ b/include/watchdog.h @@ -72,11 +72,6 @@ int init_func_watchdog_reset(void); * Prototypes from $(CPU)/cpu.c. */ -/* MPC 8xx */ -#if defined(CONFIG_8xx) && !defined(__ASSEMBLY__) - void reset_8xx_watchdog(immap_t __iomem *immr); -#endif - #if defined(CONFIG_HW_WATCHDOG) && !defined(__ASSEMBLY__) void hw_watchdog_init(void); #endif From patchwork Fri Mar 2 09:32:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Leroy X-Patchwork-Id: 880396 X-Patchwork-Delegate: wd@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=c-s.fr Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zt4110FV7z9s3P for ; Fri, 2 Mar 2018 20:35:48 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id C1F5CC21F99; Fri, 2 Mar 2018 09:34:49 +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 8B54BC220F5; Fri, 2 Mar 2018 09:33:03 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 03684C220D2; Fri, 2 Mar 2018 09:32:42 +0000 (UTC) Received: from pegase1.c-s.fr (pegase1.c-s.fr [93.17.236.30]) by lists.denx.de (Postfix) with ESMTPS id 3C8A1C22066 for ; Fri, 2 Mar 2018 09:32:38 +0000 (UTC) Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 3zt3x26Rnwz9ttBc; Fri, 2 Mar 2018 10:32:22 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id yUG4vn7JcFSW; Fri, 2 Mar 2018 10:32:22 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 3zt3x261VVz9ttBQ; Fri, 2 Mar 2018 10:32:22 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id AF72D8B842; Fri, 2 Mar 2018 10:32:37 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id 6R8_Q8ENQ9A7; Fri, 2 Mar 2018 10:32:37 +0100 (CET) Received: from po15720vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.5]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 8FF598B840; Fri, 2 Mar 2018 10:32:37 +0100 (CET) Received: by po15720vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 7623F6C4AD; Fri, 2 Mar 2018 10:32:37 +0100 (CET) Message-Id: <622b8aec162cc43e774bde5da990a61fc961b4d9.1519976944.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy To: Tom Rini Date: Fri, 2 Mar 2018 10:32:37 +0100 (CET) Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH v2 07/10] powerpc: mpc8xx: get rid of get_immr() 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" Function get_immr() is almost not used and doesn't bring much added value. Just replace it with mfspr(SPRN_IMMR) at the two needed places. Signed-off-by: Christophe Leroy --- arch/powerpc/cpu/mpc8xx/cpu.c | 7 +++---- arch/powerpc/cpu/mpc8xx/reginfo.c | 2 +- arch/powerpc/cpu/mpc8xx/speed.c | 3 +-- arch/powerpc/include/asm/ppc.h | 8 -------- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/arch/powerpc/cpu/mpc8xx/cpu.c b/arch/powerpc/cpu/mpc8xx/cpu.c index 1883440db34..0eabb714d31 100644 --- a/arch/powerpc/cpu/mpc8xx/cpu.c +++ b/arch/powerpc/cpu/mpc8xx/cpu.c @@ -36,7 +36,7 @@ DECLARE_GLOBAL_DATA_PTR; static int check_CPU(long clock, uint pvr, uint immr) { - immap_t __iomem *immap = (immap_t __iomem *)(immr & 0xFFFF0000); + immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; uint k; char buf[32]; @@ -90,7 +90,7 @@ static int check_CPU(long clock, uint pvr, uint immr) int checkcpu(void) { ulong clock = gd->cpu_clk; - uint immr = get_immr(0); /* Return full IMMR contents */ + uint immr = mfspr(SPRN_IMMR); /* Return full IMMR contents */ uint pvr = get_pvr(); puts("CPU: "); @@ -237,8 +237,7 @@ int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) */ unsigned long get_tbclk(void) { - uint immr = get_immr(0); /* Return full IMMR contents */ - immap_t __iomem *immap = (immap_t __iomem *)(immr & 0xFFFF0000); + immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; ulong oscclk, factor, pll; if (in_be32(&immap->im_clkrst.car_sccr) & SCCR_TBS) diff --git a/arch/powerpc/cpu/mpc8xx/reginfo.c b/arch/powerpc/cpu/mpc8xx/reginfo.c index 277d2753b25..1f6e606e52a 100644 --- a/arch/powerpc/cpu/mpc8xx/reginfo.c +++ b/arch/powerpc/cpu/mpc8xx/reginfo.c @@ -22,7 +22,7 @@ void print_reginfo(void) */ printf("\nSystem Configuration registers\n" - "\tIMMR\t0x%08X\n", get_immr(0)); + "\tIMMR\t0x%08X\n", mfspr(SPRN_IMMR)); printf("\tSIUMCR\t0x%08X", in_be32(&sysconf->sc_siumcr)); printf("\tSYPCR\t0x%08X\n", in_be32(&sysconf->sc_sypcr)); diff --git a/arch/powerpc/cpu/mpc8xx/speed.c b/arch/powerpc/cpu/mpc8xx/speed.c index fa8f87cbc5e..f8eb4a13eaf 100644 --- a/arch/powerpc/cpu/mpc8xx/speed.c +++ b/arch/powerpc/cpu/mpc8xx/speed.c @@ -17,8 +17,7 @@ DECLARE_GLOBAL_DATA_PTR; */ int get_clocks(void) { - uint immr = get_immr(0); /* Return full IMMR contents */ - immap_t __iomem *immap = (immap_t __iomem *)(immr & 0xFFFF0000); + immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; uint sccr = in_be32(&immap->im_clkrst.car_sccr); uint divider = 1 << (((sccr & SCCR_DFBRG11) >> 11) * 2); diff --git a/arch/powerpc/include/asm/ppc.h b/arch/powerpc/include/asm/ppc.h index 5e0aa08be93..db289ed7072 100644 --- a/arch/powerpc/include/asm/ppc.h +++ b/arch/powerpc/include/asm/ppc.h @@ -40,14 +40,6 @@ #include -#if defined(CONFIG_8xx) -static inline uint get_immr(uint mask) -{ - uint immr = mfspr(SPRN_IMMR); - - return mask ? (immr & mask) : immr; -} -#endif static inline uint get_pvr(void) { return mfspr(PVR); From patchwork Fri Mar 2 09:32:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Leroy X-Patchwork-Id: 880398 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=c-s.fr Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zt42x0R9Cz9s4w for ; Fri, 2 Mar 2018 20:37:28 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 7FB55C220B0; Fri, 2 Mar 2018 09:35:25 +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 739FEC220DA; Fri, 2 Mar 2018 09:33:12 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 45862C22055; Fri, 2 Mar 2018 09:32:44 +0000 (UTC) Received: from pegase1.c-s.fr (pegase1.c-s.fr [93.17.236.30]) by lists.denx.de (Postfix) with ESMTPS id 7F77AC220BC for ; Fri, 2 Mar 2018 09:32:40 +0000 (UTC) Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 3zt3x51SS2z9ttBc; Fri, 2 Mar 2018 10:32:25 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id vgEn7VNnaUfe; Fri, 2 Mar 2018 10:32:25 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 3zt3x50bHQz9ttBQ; Fri, 2 Mar 2018 10:32:25 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id D5EF78B843; Fri, 2 Mar 2018 10:32:39 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id y8HbLcHZF9kN; Fri, 2 Mar 2018 10:32:39 +0100 (CET) Received: from po15720vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.5]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 99A408B840; Fri, 2 Mar 2018 10:32:39 +0100 (CET) Received: by po15720vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 7C7326C4AD; Fri, 2 Mar 2018 10:32:39 +0100 (CET) Message-Id: <777a39556fb83ba86d52633d01f2fa82b065a11c.1519976944.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy To: Tom Rini Date: Fri, 2 Mar 2018 10:32:39 +0100 (CET) Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH v2 08/10] powerpc: mpc8xx: Change CONFIG_8xx to CONFIG_MPC8xx 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" CONFIG_8xx doesn't mean much outside of arch/powerpc/ This patch renames it CONFIG_MPC8xx just like CONFIG_MPC85xx etc ... It also renames 8xx_immap.h to immap_8xx.h to be consistent with other file names. Signed-off-by: Christophe Leroy --- api/api_platform-powerpc.c | 2 +- arch/powerpc/Kconfig | 2 +- arch/powerpc/cpu/mpc8xx/Kconfig | 2 +- arch/powerpc/cpu/mpc8xx/immap.c | 2 +- arch/powerpc/include/asm/cache.h | 6 +++--- arch/powerpc/include/asm/global_data.h | 2 +- arch/powerpc/include/asm/{8xx_immap.h => immap_8xx.h} | 0 arch/powerpc/include/asm/iopin_8xx.h | 2 +- arch/powerpc/include/asm/ppc.h | 4 ++-- cmd/bdinfo.c | 2 +- configs/MCR3000_defconfig | 2 +- drivers/net/Kconfig | 2 +- drivers/serial/Kconfig | 2 +- drivers/spi/Kconfig | 2 +- include/asm-generic/u-boot.h | 2 +- include/commproc.h | 2 +- include/mpc8xx.h | 4 ++-- include/ppc_asm.tmpl | 6 +++--- 18 files changed, 23 insertions(+), 23 deletions(-) rename arch/powerpc/include/asm/{8xx_immap.h => immap_8xx.h} (100%) diff --git a/api/api_platform-powerpc.c b/api/api_platform-powerpc.c index 9e9bc63b2f5..aae7ddee959 100644 --- a/api/api_platform-powerpc.c +++ b/api/api_platform-powerpc.c @@ -30,7 +30,7 @@ int platform_sys_info(struct sys_info *si) si->clk_bus = gd->bus_clk; si->clk_cpu = gd->cpu_clk; -#if defined(CONFIG_8xx) || defined(CONFIG_E500) || defined(CONFIG_MPC86xx) +#if defined(CONFIG_MPC8xx) || defined(CONFIG_E500) || defined(CONFIG_MPC86xx) #define bi_bar bi_immr_base #elif defined(CONFIG_MPC83xx) #define bi_bar bi_immrbar diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index b20837b473f..af45cfe8498 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -30,7 +30,7 @@ config MPC86xx select SYS_FSL_DDR_BE imply CMD_REGINFO -config 8xx +config MPC8xx bool "MPC8xx" select BOARD_EARLY_INIT_F imply CMD_REGINFO diff --git a/arch/powerpc/cpu/mpc8xx/Kconfig b/arch/powerpc/cpu/mpc8xx/Kconfig index 5a7db335ed2..f1123173765 100644 --- a/arch/powerpc/cpu/mpc8xx/Kconfig +++ b/arch/powerpc/cpu/mpc8xx/Kconfig @@ -1,5 +1,5 @@ menu "mpc8xx CPU" - depends on 8xx + depends on MPC8xx config SYS_CPU default "mpc8xx" diff --git a/arch/powerpc/cpu/mpc8xx/immap.c b/arch/powerpc/cpu/mpc8xx/immap.c index 2284979dd65..dfe5dc21251 100644 --- a/arch/powerpc/cpu/mpc8xx/immap.c +++ b/arch/powerpc/cpu/mpc8xx/immap.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include #include diff --git a/arch/powerpc/include/asm/cache.h b/arch/powerpc/include/asm/cache.h index 0801d2c3677..445a366807d 100644 --- a/arch/powerpc/include/asm/cache.h +++ b/arch/powerpc/include/asm/cache.h @@ -7,7 +7,7 @@ #include /* bytes per L1 cache line */ -#if defined(CONFIG_8xx) +#if defined(CONFIG_MPC8xx) #define L1_CACHE_SHIFT 4 #elif defined(CONFIG_PPC64BRIDGE) #define L1_CACHE_SHIFT 7 @@ -72,7 +72,7 @@ void disable_cpc_sram(void); #define L2CACHE_NONE 0x03 /* NONE */ #define L2CACHE_PARITY 0x08 /* Mask for L2 Cache Parity Protected bit */ -#ifdef CONFIG_8xx +#ifdef CONFIG_MPC8xx /* Cache control on the MPC8xx is provided through some additional * special purpose registers. */ @@ -139,6 +139,6 @@ static inline void wr_dc_adr(uint val) mtspr(DC_ADR, val); } #endif -#endif /* CONFIG_8xx */ +#endif /* CONFIG_MPC8xx */ #endif diff --git a/arch/powerpc/include/asm/global_data.h b/arch/powerpc/include/asm/global_data.h index 35a02b61a44..016dc19cb4c 100644 --- a/arch/powerpc/include/asm/global_data.h +++ b/arch/powerpc/include/asm/global_data.h @@ -19,7 +19,7 @@ struct arch_global_data { u8 sdhc_adapter; #endif #endif -#if defined(CONFIG_8xx) +#if defined(CONFIG_MPC8xx) unsigned long brg_clk; #endif #if defined(CONFIG_CPM2) diff --git a/arch/powerpc/include/asm/8xx_immap.h b/arch/powerpc/include/asm/immap_8xx.h similarity index 100% rename from arch/powerpc/include/asm/8xx_immap.h rename to arch/powerpc/include/asm/immap_8xx.h diff --git a/arch/powerpc/include/asm/iopin_8xx.h b/arch/powerpc/include/asm/iopin_8xx.h index 15679a2db55..3b4e1b64a41 100644 --- a/arch/powerpc/include/asm/iopin_8xx.h +++ b/arch/powerpc/include/asm/iopin_8xx.h @@ -11,7 +11,7 @@ #define _ASM_IOPIN_8XX_H_ #include -#include +#include #include #ifdef __KERNEL__ diff --git a/arch/powerpc/include/asm/ppc.h b/arch/powerpc/include/asm/ppc.h index db289ed7072..ec7adddc5e3 100644 --- a/arch/powerpc/include/asm/ppc.h +++ b/arch/powerpc/include/asm/ppc.h @@ -13,8 +13,8 @@ #ifndef __ASSEMBLY__ -#if defined(CONFIG_8xx) -#include +#if defined(CONFIG_MPC8xx) +#include #endif #ifdef CONFIG_MPC86xx #include diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index de6fc489877..7bea9b7a2d1 100644 --- a/cmd/bdinfo.c +++ b/cmd/bdinfo.c @@ -180,7 +180,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) print_bi_flash(bd); print_num("sramstart", bd->bi_sramstart); print_num("sramsize", bd->bi_sramsize); -#if defined(CONFIG_8xx) || defined(CONFIG_E500) +#if defined(CONFIG_MPC8xx) || defined(CONFIG_E500) print_num("immr_base", bd->bi_immr_base); #endif print_num("bootflags", bd->bi_bootflags); diff --git a/configs/MCR3000_defconfig b/configs/MCR3000_defconfig index 6a29f9de1ef..e32273cb2ee 100644 --- a/configs/MCR3000_defconfig +++ b/configs/MCR3000_defconfig @@ -1,6 +1,6 @@ CONFIG_PPC=y CONFIG_SYS_TEXT_BASE=0x4000000 -CONFIG_8xx=y +CONFIG_MPC8xx=y CONFIG_TARGET_MCR3000=y CONFIG_8xx_GCLK_FREQ=132000000 CONFIG_CMD_IMMAP=y diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index de1947ccc17..9b53f4c77b8 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -330,7 +330,7 @@ config RENESAS_RAVB config MPC8XX_FEC bool "Fast Ethernet Controller on MPC8XX" - depends on 8xx + depends on MPC8xx select MII help This driver implements support for the Fast Ethernet Controller diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index 93e602e0ee0..c0497803cba 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -592,7 +592,7 @@ config ZYNQ_SERIAL config MPC8XX_CONS bool "Console driver for MPC8XX" - depends on 8xx + depends on MPC8xx default y choice diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 235a8c7d73a..0c99afc659b 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -276,7 +276,7 @@ config LPC32XX_SSP config MPC8XX_SPI bool "MPC8XX SPI Driver" - depends on 8xx + depends on MPC8xx help Enable support for SPI on MPC8XX diff --git a/include/asm-generic/u-boot.h b/include/asm-generic/u-boot.h index d3049d81f58..f734d53eec2 100644 --- a/include/asm-generic/u-boot.h +++ b/include/asm-generic/u-boot.h @@ -37,7 +37,7 @@ typedef struct bd_info { unsigned long bi_dsp_freq; /* dsp core frequency */ unsigned long bi_ddr_freq; /* ddr frequency */ #endif -#if defined(CONFIG_8xx) || defined(CONFIG_E500) || defined(CONFIG_MPC86xx) +#if defined(CONFIG_MPC8xx) || defined(CONFIG_E500) || defined(CONFIG_MPC86xx) unsigned long bi_immr_base; /* base of IMMR register */ #endif #if defined(CONFIG_M68K) diff --git a/include/commproc.h b/include/commproc.h index 9536b135dcf..bd8adec6b07 100644 --- a/include/commproc.h +++ b/include/commproc.h @@ -16,7 +16,7 @@ #ifndef __CPM_8XX__ #define __CPM_8XX__ -#include +#include /* CPM Command register. */ diff --git a/include/mpc8xx.h b/include/mpc8xx.h index fc081ab7568..daa874ccf58 100644 --- a/include/mpc8xx.h +++ b/include/mpc8xx.h @@ -81,7 +81,7 @@ #define TBSCR_TBIRQ2 0x0400 /* Time Base Interrupt Request 2 */ #define TBSCR_TBIRQ1 0x0200 /* Time Base Interrupt Request 1 */ #define TBSCR_TBIRQ0 0x0100 /* Time Base Interrupt Request 0 */ -#if 0 /* already in asm/8xx_immap.h */ +#if 0 /* already in asm/immap_8xx.h */ #define TBSCR_REFA 0x0080 /* Reference Interrupt Status A */ #define TBSCR_REFB 0x0040 /* Reference Interrupt Status B */ #define TBSCR_REFAE 0x0008 /* Second Interrupt Enable A */ @@ -95,7 +95,7 @@ */ #undef PISCR_PIRQ /* TBD */ #define PISCR_PITF 0x0002 /* Periodic Interrupt Timer Freeze */ -#if 0 /* already in asm/8xx_immap.h */ +#if 0 /* already in asm/immap_8xx.h */ #define PISCR_PS 0x0080 /* Periodic interrupt Status */ #define PISCR_PIE 0x0004 /* Periodic Interrupt Enable */ #define PISCR_PTE 0x0001 /* Periodic Timer Enable */ diff --git a/include/ppc_asm.tmpl b/include/ppc_asm.tmpl index 18783340d96..4947c77b8d4 100644 --- a/include/ppc_asm.tmpl +++ b/include/ppc_asm.tmpl @@ -81,7 +81,7 @@ #define r30 30 #define r31 31 -#if defined(CONFIG_8xx) +#if defined(CONFIG_MPC8xx) /* Some special registers */ @@ -93,10 +93,10 @@ #define LCTRL2 157 /* Load/Store Support (37-41) */ #define ICTRL 158 -#endif /* CONFIG_8xx */ +#endif /* CONFIG_MPC8xx */ -#if defined(CONFIG_8xx) +#if defined(CONFIG_MPC8xx) /* Registers in the processor's internal memory map that we use. */ From patchwork Fri Mar 2 09:32:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Leroy X-Patchwork-Id: 880397 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=c-s.fr Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zt42H4hqtz9s3P for ; Fri, 2 Mar 2018 20:36:55 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 4B9BAC22090; Fri, 2 Mar 2018 09:35:08 +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 633E7C220BE; Fri, 2 Mar 2018 09:33:11 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6606FC220D8; Fri, 2 Mar 2018 09:32:46 +0000 (UTC) Received: from pegase1.c-s.fr (pegase1.c-s.fr [93.17.236.30]) by lists.denx.de (Postfix) with ESMTPS id 68517C22018 for ; Fri, 2 Mar 2018 09:32:42 +0000 (UTC) Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 3zt3x71887z9ttBc; Fri, 2 Mar 2018 10:32:27 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id 5aFmUFW9yeoJ; Fri, 2 Mar 2018 10:32:27 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 3zt3x70V21z9ttBQ; Fri, 2 Mar 2018 10:32:27 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id D2D418B843; Fri, 2 Mar 2018 10:32:41 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id MFu9mCZsadlB; Fri, 2 Mar 2018 10:32:41 +0100 (CET) Received: from po15720vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.5]) by messagerie.si.c-s.fr (Postfix) with ESMTP id A33B88B840; Fri, 2 Mar 2018 10:32:41 +0100 (CET) Received: by po15720vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 832216C4AD; Fri, 2 Mar 2018 10:32:41 +0100 (CET) Message-Id: <36b291263bbf15e60ad9b71aa2aecb0003fa6f57.1519976944.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy To: Tom Rini Date: Fri, 2 Mar 2018 10:32:41 +0100 (CET) Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH v2 09/10] powerpc: 8xx: get rid of the multiple PVR_ values 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" None of those values are used at the time being. Just keep one and call it PVR_8xx Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/processor.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h index 57b11b83657..6fbe8c46b31 100644 --- a/arch/powerpc/include/asm/processor.h +++ b/arch/powerpc/include/asm/processor.h @@ -973,10 +973,8 @@ * differentiated by the version number in the Communication Processor * Module (CPM). */ -#define PVR_821 0x00500000 -#define PVR_823 PVR_821 -#define PVR_850 PVR_821 -#define PVR_860 PVR_821 +#define PVR_8xx 0x00500000 + #define PVR_7400 0x000C0000 /* From patchwork Fri Mar 2 09:32:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Leroy X-Patchwork-Id: 880401 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=c-s.fr Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zt45C0ckZz9s3P for ; Fri, 2 Mar 2018 20:39:26 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id AF27BC21FE4; Fri, 2 Mar 2018 09:35:51 +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 37635C22078; Fri, 2 Mar 2018 09:33:21 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 55350C2205E; Fri, 2 Mar 2018 09:32:49 +0000 (UTC) Received: from pegase1.c-s.fr (pegase1.c-s.fr [93.17.236.30]) by lists.denx.de (Postfix) with ESMTPS id 79B92C2208D for ; Fri, 2 Mar 2018 09:32:44 +0000 (UTC) Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 3zt3x91JXTz9ttBc; Fri, 2 Mar 2018 10:32:29 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id TiLhh_XQCM56; Fri, 2 Mar 2018 10:32:29 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 3zt3x90sQcz9ttBQ; Fri, 2 Mar 2018 10:32:29 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 0D7598B843; Fri, 2 Mar 2018 10:32:44 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id aEyp5sYGnp3J; Fri, 2 Mar 2018 10:32:43 +0100 (CET) Received: from po15720vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.5]) by messagerie.si.c-s.fr (Postfix) with ESMTP id ADD128B840; Fri, 2 Mar 2018 10:32:43 +0100 (CET) Received: by po15720vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 89DA76C4AD; Fri, 2 Mar 2018 10:32:43 +0100 (CET) Message-Id: <58166097b14a7ecd96c00efad66783e81cd17e8c.1519976944.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy To: Tom Rini Date: Fri, 2 Mar 2018 10:32:43 +0100 (CET) Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH v2 10/10] powerpc: mpc8xx: refactorise reginfo 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" reginfo is redundant with some of the commands in immap.c, so move reginfo into that file and remove duplicated info. Signed-off-by: Christophe Leroy --- arch/powerpc/cpu/mpc8xx/Makefile | 1 - arch/powerpc/cpu/mpc8xx/immap.c | 20 +++++++++++ arch/powerpc/cpu/mpc8xx/reginfo.c | 71 --------------------------------------- 3 files changed, 20 insertions(+), 72 deletions(-) delete mode 100644 arch/powerpc/cpu/mpc8xx/reginfo.c diff --git a/arch/powerpc/cpu/mpc8xx/Makefile b/arch/powerpc/cpu/mpc8xx/Makefile index 40f38923ece..35ff18a7b3b 100644 --- a/arch/powerpc/cpu/mpc8xx/Makefile +++ b/arch/powerpc/cpu/mpc8xx/Makefile @@ -12,6 +12,5 @@ obj-y += cpu_init.o obj-$(CONFIG_OF_LIBFDT) += fdt.o obj-$(CONFIG_CMD_IMMAP) += immap.o obj-y += interrupts.o -obj-$(CONFIG_CMD_REGINFO) += reginfo.o obj-y += speed.o obj-y += cache.o diff --git a/arch/powerpc/cpu/mpc8xx/immap.c b/arch/powerpc/cpu/mpc8xx/immap.c index dfe5dc21251..7059a4eb063 100644 --- a/arch/powerpc/cpu/mpc8xx/immap.c +++ b/arch/powerpc/cpu/mpc8xx/immap.c @@ -342,6 +342,26 @@ static int do_brginfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 0; } +#ifdef CONFIG_CMD_REGINFO +void print_reginfo(void) +{ + immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; + sit8xx_t __iomem *timers = &immap->im_sit; + + printf("\nSystem Configuration registers\n" + "\tIMMR\t0x%08X\n", mfspr(SPRN_IMMR)); + do_siuinfo(NULL, 0, 0, NULL); + + printf("Memory Controller Registers\n"); + do_memcinfo(NULL, 0, 0, NULL); + + printf("\nSystem Integration Timers\n"); + printf("\tTBSCR\t0x%04X\tRTCSC\t0x%04X\n", + in_be16(&timers->sit_tbscr), in_be16(&timers->sit_rtcsc)); + printf("\tPISCR\t0x%04X\n", in_be16(&timers->sit_piscr)); +} +#endif + /***************************************************/ U_BOOT_CMD( diff --git a/arch/powerpc/cpu/mpc8xx/reginfo.c b/arch/powerpc/cpu/mpc8xx/reginfo.c deleted file mode 100644 index 1f6e606e52a..00000000000 --- a/arch/powerpc/cpu/mpc8xx/reginfo.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * (C) Copyright 2000 - * Subodh Nijsure, SkyStream Networks, snijsure@skystream.com - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include -#include -#include -#include - -void print_reginfo(void) -{ - immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR; - memctl8xx_t __iomem *memctl = &immap->im_memctl; - sysconf8xx_t __iomem *sysconf = &immap->im_siu_conf; - sit8xx_t __iomem *timers = &immap->im_sit; - - /* Hopefully more PowerPC knowledgable people will add code to display - * other useful registers - */ - - printf("\nSystem Configuration registers\n" - "\tIMMR\t0x%08X\n", mfspr(SPRN_IMMR)); - - printf("\tSIUMCR\t0x%08X", in_be32(&sysconf->sc_siumcr)); - printf("\tSYPCR\t0x%08X\n", in_be32(&sysconf->sc_sypcr)); - - printf("\tSWT\t0x%08X", in_be32(&sysconf->sc_swt)); - printf("\tSWSR\t0x%04X\n", in_be16(&sysconf->sc_swsr)); - - printf("\tSIPEND\t0x%08X\tSIMASK\t0x%08X\n", - in_be32(&sysconf->sc_sipend), in_be32(&sysconf->sc_simask)); - printf("\tSIEL\t0x%08X\tSIVEC\t0x%08X\n", - in_be32(&sysconf->sc_siel), in_be32(&sysconf->sc_sivec)); - printf("\tTESR\t0x%08X\tSDCR\t0x%08X\n", - in_be32(&sysconf->sc_tesr), in_be32(&sysconf->sc_sdcr)); - - printf("Memory Controller Registers\n"); - printf("\tBR0\t0x%08X\tOR0\t0x%08X\n", in_be32(&memctl->memc_br0), - in_be32(&memctl->memc_or0)); - printf("\tBR1\t0x%08X\tOR1\t0x%08X\n", in_be32(&memctl->memc_br1), - in_be32(&memctl->memc_or1)); - printf("\tBR2\t0x%08X\tOR2\t0x%08X\n", in_be32(&memctl->memc_br2), - in_be32(&memctl->memc_or2)); - printf("\tBR3\t0x%08X\tOR3\t0x%08X\n", in_be32(&memctl->memc_br3), - in_be32(&memctl->memc_or3)); - printf("\tBR4\t0x%08X\tOR4\t0x%08X\n", in_be32(&memctl->memc_br4), - in_be32(&memctl->memc_or4)); - printf("\tBR5\t0x%08X\tOR5\t0x%08X\n", in_be32(&memctl->memc_br5), - in_be32(&memctl->memc_or5)); - printf("\tBR6\t0x%08X\tOR6\t0x%08X\n", in_be32(&memctl->memc_br6), - in_be32(&memctl->memc_or6)); - printf("\tBR7\t0x%08X\tOR7\t0x%08X\n", in_be32(&memctl->memc_br7), - in_be32(&memctl->memc_or7)); - printf("\n\tmamr\t0x%08X\tmbmr\t0x%08X\n", in_be32(&memctl->memc_mamr), - in_be32(&memctl->memc_mbmr)); - printf("\tmstat\t0x%04X\tmptpr\t0x%04X\n", in_be16(&memctl->memc_mstat), - in_be16(&memctl->memc_mptpr)); - printf("\tmdr\t0x%08X\n", in_be32(&memctl->memc_mdr)); - - printf("\nSystem Integration Timers\n"); - printf("\tTBSCR\t0x%04X\tRTCSC\t0x%04X\n", - in_be16(&timers->sit_tbscr), in_be16(&timers->sit_rtcsc)); - printf("\tPISCR\t0x%04X\n", in_be16(&timers->sit_piscr)); - - /* - * May be some CPM info here? - */ -}