From patchwork Mon Nov 5 14:44:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Six X-Patchwork-Id: 993123 X-Patchwork-Delegate: mario.six@gdsys.cc 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=gdsys.cc Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42pbhV6KvBz9sDb for ; Tue, 6 Nov 2018 02:10:18 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 7825FC2270E; Mon, 5 Nov 2018 15:02:33 +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=KHOP_BIG_TO_CC, SPF_HELO_PASS 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 EB2D8C2269A; Mon, 5 Nov 2018 14:55:15 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 046EBC22269; Mon, 5 Nov 2018 14:55:14 +0000 (UTC) Received: from smtprelay08.ispgateway.de (smtprelay08.ispgateway.de [134.119.228.110]) by lists.denx.de (Postfix) with ESMTPS id CE3ECC22263 for ; Mon, 5 Nov 2018 14:54:35 +0000 (UTC) Received: from [80.151.34.241] (helo=bob3.testumgebung.local) by smtprelay08.ispgateway.de with esmtpa (Exim 4.90_1) (envelope-from ) id 1gJgGw-00060n-5a; Mon, 05 Nov 2018 15:54:34 +0100 From: Mario Six To: U-Boot Mailing List , Wolfgang Denk , Reinhard Arlt , Sinan Akman , Holger Brunck , York Sun , Heiko Schocher , Paul Gortmaker , Peter Tyser , Bin Meng Date: Mon, 5 Nov 2018 15:44:42 +0100 Message-Id: <20181105144512.16727-28-mario.six@gdsys.cc> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181105144512.16727-1-mario.six@gdsys.cc> References: <20181105144512.16727-1-mario.six@gdsys.cc> MIME-Version: 1.0 X-Df-Sender: bWFyaW8uc2l4QGdkc3lzLmNj Subject: [U-Boot] [PATCH v2 28/58] mpc83xx: Migrate legacy PCI options to Kconfig 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The MPC83xx include files contain some settings of the PCI subsystem. Migrate these to Kconfig until a proper DM PCI driver exists. Signed-off-by: Mario Six --- v1 -> v2: No changes --- arch/powerpc/cpu/mpc83xx/Kconfig | 26 ++++++++++++++++++++++++++ board/freescale/mpc8349emds/pci.c | 12 ++++++------ configs/MPC8349EMDS_SDRAM_defconfig | 1 + configs/MPC8349EMDS_defconfig | 1 + configs/sbc8349_PCI_33_defconfig | 1 + configs/sbc8349_PCI_66_defconfig | 1 + configs/vme8349_defconfig | 1 + include/configs/MPC8349EMDS.h | 11 ++--------- include/configs/MPC8349EMDS_SDRAM.h | 11 ++--------- include/configs/TQM834x.h | 2 +- include/configs/caddy2.h | 8 -------- include/configs/sbc8349.h | 10 +--------- include/configs/vme8349.h | 10 +--------- 13 files changed, 44 insertions(+), 51 deletions(-) diff --git a/arch/powerpc/cpu/mpc83xx/Kconfig b/arch/powerpc/cpu/mpc83xx/Kconfig index 0ce1aad6d03..bd4e5c14a9a 100644 --- a/arch/powerpc/cpu/mpc83xx/Kconfig +++ b/arch/powerpc/cpu/mpc83xx/Kconfig @@ -215,6 +215,32 @@ config ARCH_MPC8360 config ARCH_MPC837X bool +menu "Legacy options" + +if ARCH_MPC8349 + +#TODO(mario.six@gdsys.cc): Remove when mpc83xx PCI has been converted to DM/DT +choice + prompt "PMC slot configuration" + +config PCI_ALL_PCI1 + bool "All PMC slots on PCI1" + +config PCI_ONE_PCI1 + bool "First PMC1 on PCI1" + +config PCI_TWO_PCI1 + bool "First two PMC1 on PCI1" + +endchoice + +config PCI_64BIT + bool "PMC2 is 64bit" + +endif + +endmenu + source "board/esd/vme8349/Kconfig" source "board/freescale/mpc8308rdb/Kconfig" source "board/freescale/mpc8313erdb/Kconfig" diff --git a/board/freescale/mpc8349emds/pci.c b/board/freescale/mpc8349emds/pci.c index a2feda855f6..005190ed87d 100644 --- a/board/freescale/mpc8349emds/pci.c +++ b/board/freescale/mpc8349emds/pci.c @@ -77,11 +77,11 @@ void pib_init(void) i2c_write(0x26, 0x6, 1, &val8, 1); val8 = 0x34; i2c_write(0x26, 0x7, 1, &val8, 1); -#if defined(PCI_64BIT) +#if defined(CONFIG_PCI_64BIT) val8 = 0xf4; /* PMC2:PCI1/64-bit */ -#elif defined(PCI_ALL_PCI1) +#elif defined(CONFIG_PCI_ALL_PCI1) val8 = 0xf3; /* PMC1:PCI1 PMC2:PCI1 PMC3:PCI1 */ -#elif defined(PCI_ONE_PCI1) +#elif defined(CONFIG_PCI_ONE_PCI1) val8 = 0xf9; /* PMC1:PCI1 PMC2:PCI2 PMC3:PCI2 */ #else val8 = 0xf5; /* PMC1:PCI1 PMC2:PCI1 PMC3:PCI2 */ @@ -98,11 +98,11 @@ void pib_init(void) i2c_write(0x27, 0x3, 1, &val8, 1); asm("eieio"); -#if defined(PCI_64BIT) +#if defined(CONFIG_PCI_64BIT) printf("PCI1: 64-bit on PMC2\n"); -#elif defined(PCI_ALL_PCI1) +#elif defined(CONFIG_PCI_ALL_PCI1) printf("PCI1: 32-bit on PMC1, PMC2, PMC3\n"); -#elif defined(PCI_ONE_PCI1) +#elif defined(CONFIG_PCI_ONE_PCI1) printf("PCI1: 32-bit on PMC1\n"); printf("PCI2: 32-bit on PMC2, PMC3\n"); #else diff --git a/configs/MPC8349EMDS_SDRAM_defconfig b/configs/MPC8349EMDS_SDRAM_defconfig index 8ec87408398..4da9774f070 100644 --- a/configs/MPC8349EMDS_SDRAM_defconfig +++ b/configs/MPC8349EMDS_SDRAM_defconfig @@ -2,6 +2,7 @@ CONFIG_PPC=y CONFIG_SYS_TEXT_BASE=0xFE000000 CONFIG_MPC83xx=y CONFIG_TARGET_MPC8349EMDS_SDRAM=y +CONFIG_PCI_ONE_PCI1=y CONFIG_OF_BOARD_SETUP=y CONFIG_OF_STDOUT_VIA_ALIAS=y CONFIG_BOOTDELAY=6 diff --git a/configs/MPC8349EMDS_defconfig b/configs/MPC8349EMDS_defconfig index 41a1d9609b5..bd8ff625e19 100644 --- a/configs/MPC8349EMDS_defconfig +++ b/configs/MPC8349EMDS_defconfig @@ -2,6 +2,7 @@ CONFIG_PPC=y CONFIG_SYS_TEXT_BASE=0xFE000000 CONFIG_MPC83xx=y CONFIG_TARGET_MPC8349EMDS=y +CONFIG_PCI_ONE_PCI1=y CONFIG_OF_BOARD_SETUP=y CONFIG_OF_STDOUT_VIA_ALIAS=y CONFIG_BOOTDELAY=6 diff --git a/configs/sbc8349_PCI_33_defconfig b/configs/sbc8349_PCI_33_defconfig index 02d5185124c..5c2720aef14 100644 --- a/configs/sbc8349_PCI_33_defconfig +++ b/configs/sbc8349_PCI_33_defconfig @@ -2,6 +2,7 @@ CONFIG_PPC=y CONFIG_SYS_TEXT_BASE=0xFF800000 CONFIG_MPC83xx=y CONFIG_TARGET_SBC8349=y +CONFIG_PCI_64BIT=y CONFIG_OF_BOARD_SETUP=y CONFIG_OF_STDOUT_VIA_ALIAS=y CONFIG_SYS_EXTRA_OPTIONS="PCI_33M" diff --git a/configs/sbc8349_PCI_66_defconfig b/configs/sbc8349_PCI_66_defconfig index 945c5229b93..e6535dafcf7 100644 --- a/configs/sbc8349_PCI_66_defconfig +++ b/configs/sbc8349_PCI_66_defconfig @@ -2,6 +2,7 @@ CONFIG_PPC=y CONFIG_SYS_TEXT_BASE=0xFF800000 CONFIG_MPC83xx=y CONFIG_TARGET_SBC8349=y +CONFIG_PCI_64BIT=y CONFIG_OF_BOARD_SETUP=y CONFIG_OF_STDOUT_VIA_ALIAS=y CONFIG_SYS_EXTRA_OPTIONS="PCI_66M" diff --git a/configs/vme8349_defconfig b/configs/vme8349_defconfig index a7d81a3a0f1..90c29b7fedf 100644 --- a/configs/vme8349_defconfig +++ b/configs/vme8349_defconfig @@ -2,6 +2,7 @@ CONFIG_PPC=y CONFIG_SYS_TEXT_BASE=0xFFF00000 CONFIG_MPC83xx=y CONFIG_TARGET_VME8349=y +CONFIG_PCI_64BIT=y CONFIG_OF_BOARD_SETUP=y CONFIG_OF_STDOUT_VIA_ALIAS=y CONFIG_BOOTDELAY=6 diff --git a/include/configs/MPC8349EMDS.h b/include/configs/MPC8349EMDS.h index fe2b81b905b..40e5c1997da 100644 --- a/include/configs/MPC8349EMDS.h +++ b/include/configs/MPC8349EMDS.h @@ -285,13 +285,6 @@ #if defined(CONFIG_PCI) -#define PCI_ONE_PCI1 -#if defined(PCI_64BIT) -#undef PCI_ALL_PCI1 -#undef PCI_TWO_PCI1 -#undef PCI_ONE_PCI1 -#endif - #define CONFIG_83XX_PCI_STREAMING #undef CONFIG_EEPRO100 @@ -436,7 +429,7 @@ HRCWH_TSEC1M_IN_GMII |\ HRCWH_TSEC2M_IN_GMII) #else -#if defined(PCI_64BIT) +#if defined(CONFIG_PCI_64BIT) #define CONFIG_SYS_HRCW_HIGH (\ HRCWH_PCI_HOST |\ HRCWH_64_BIT_PCI |\ @@ -462,7 +455,7 @@ HRCWH_ROM_LOC_LOCAL_16BIT |\ HRCWH_TSEC1M_IN_GMII |\ HRCWH_TSEC2M_IN_GMII) -#endif /* PCI_64BIT */ +#endif /* CONFIG_PCI_64BIT */ #endif /* CONFIG_PCISLAVE */ /* diff --git a/include/configs/MPC8349EMDS_SDRAM.h b/include/configs/MPC8349EMDS_SDRAM.h index b610b555a75..15f10492a58 100644 --- a/include/configs/MPC8349EMDS_SDRAM.h +++ b/include/configs/MPC8349EMDS_SDRAM.h @@ -357,13 +357,6 @@ #if defined(CONFIG_PCI) -#define PCI_ONE_PCI1 -#if defined(PCI_64BIT) -#undef PCI_ALL_PCI1 -#undef PCI_TWO_PCI1 -#undef PCI_ONE_PCI1 -#endif - #define CONFIG_83XX_PCI_STREAMING #undef CONFIG_EEPRO100 @@ -508,7 +501,7 @@ HRCWH_TSEC1M_IN_GMII |\ HRCWH_TSEC2M_IN_GMII) #else -#if defined(PCI_64BIT) +#if defined(CONFIG_PCI_64BIT) #define CONFIG_SYS_HRCW_HIGH (\ HRCWH_PCI_HOST |\ HRCWH_64_BIT_PCI |\ @@ -534,7 +527,7 @@ HRCWH_ROM_LOC_LOCAL_16BIT |\ HRCWH_TSEC1M_IN_GMII |\ HRCWH_TSEC2M_IN_GMII) -#endif /* PCI_64BIT */ +#endif /* CONFIG_PCI_64BIT */ #endif /* CONFIG_PCISLAVE */ /* diff --git a/include/configs/TQM834x.h b/include/configs/TQM834x.h index 2b82bd82eb7..949e370150f 100644 --- a/include/configs/TQM834x.h +++ b/include/configs/TQM834x.h @@ -270,7 +270,7 @@ HRCWL_VCO_1X2 |\ HRCWL_CORE_TO_CSB_2X1) -#if defined(PCI_64BIT) +#if defined(CONFIG_PCI_64BIT) #define CONFIG_SYS_HRCW_HIGH (\ HRCWH_PCI_HOST |\ HRCWH_64_BIT_PCI |\ diff --git a/include/configs/caddy2.h b/include/configs/caddy2.h index a7bbbbdd0b3..a8f692d5ead 100644 --- a/include/configs/caddy2.h +++ b/include/configs/caddy2.h @@ -212,14 +212,6 @@ #if defined(CONFIG_PCI) -#define PCI_64BIT -#define PCI_ONE_PCI1 -#if defined(PCI_64BIT) -#undef PCI_ALL_PCI1 -#undef PCI_TWO_PCI1 -#undef PCI_ONE_PCI1 -#endif - #undef CONFIG_EEPRO100 #undef CONFIG_TULIP diff --git a/include/configs/sbc8349.h b/include/configs/sbc8349.h index 6ae11185cb7..60eb2cf8314 100644 --- a/include/configs/sbc8349.h +++ b/include/configs/sbc8349.h @@ -307,14 +307,6 @@ #if defined(CONFIG_PCI) -#define PCI_64BIT -#define PCI_ONE_PCI1 -#if defined(PCI_64BIT) -#undef PCI_ALL_PCI1 -#undef PCI_TWO_PCI1 -#undef PCI_ONE_PCI1 -#endif - #undef CONFIG_EEPRO100 #undef CONFIG_TULIP @@ -435,7 +427,7 @@ HRCWL_CORE_TO_CSB_1X1) #endif -#if defined(PCI_64BIT) +#if defined(CONFIG_PCI_64BIT) #define CONFIG_SYS_HRCW_HIGH (\ HRCWH_PCI_HOST |\ HRCWH_64_BIT_PCI |\ diff --git a/include/configs/vme8349.h b/include/configs/vme8349.h index 6c3ad76e524..ea080587522 100644 --- a/include/configs/vme8349.h +++ b/include/configs/vme8349.h @@ -212,14 +212,6 @@ #if defined(CONFIG_PCI) -#define PCI_64BIT -#define PCI_ONE_PCI1 -#if defined(PCI_64BIT) -#undef PCI_ALL_PCI1 -#undef PCI_TWO_PCI1 -#undef PCI_ONE_PCI1 -#endif - #undef CONFIG_EEPRO100 #undef CONFIG_TULIP @@ -316,7 +308,7 @@ HRCWL_VCO_1X2 |\ HRCWL_CORE_TO_CSB_2X1) -#if defined(PCI_64BIT) +#if defined(CONFIG_PCI_64BIT) #define CONFIG_SYS_HRCW_HIGH (\ HRCWH_PCI_HOST |\ HRCWH_64_BIT_PCI |\