]> git.baikalelectronics.ru Git - uboot.git/commitdiff
mpc83xx: Migrate legacy PCI options to Kconfig
authorMario Six <mario.six@gdsys.cc>
Mon, 21 Jan 2019 08:17:51 +0000 (09:17 +0100)
committerMario Six <mario.six@gdsys.cc>
Tue, 21 May 2019 05:51:40 +0000 (07:51 +0200)
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 <mario.six@gdsys.cc>
13 files changed:
arch/powerpc/cpu/mpc83xx/Kconfig
board/freescale/mpc8349emds/pci.c
configs/MPC8349EMDS_SDRAM_defconfig
configs/MPC8349EMDS_defconfig
configs/sbc8349_PCI_33_defconfig
configs/sbc8349_PCI_66_defconfig
configs/vme8349_defconfig
include/configs/MPC8349EMDS.h
include/configs/MPC8349EMDS_SDRAM.h
include/configs/TQM834x.h
include/configs/caddy2.h
include/configs/sbc8349.h
include/configs/vme8349.h

index 0ce1aad6d03115ccda3e9b05345c8226ff033f15..bd4e5c14a9acdc3eb2b8cf2045c8588ef1f8a1e3 100644 (file)
@@ -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"
index a2feda855f6c5186fa7cb8c4c443d80600090cfd..005190ed87de64adc99261fa6a40dea26ec275dc 100644 (file)
@@ -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
index 2607dfa4f3393bd9c931d6243f5bb2199ebe54bb..a98cc74027ce52cf21af9e54fc0ada3bb8d2afe3 100644 (file)
@@ -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
index 41a1d9609b50aabcab4dec0a227bb444f288e888..bd8ff625e19c242ea55755edf6cb94248e05457c 100644 (file)
@@ -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
index 02d5185124c09a6a13e1aecf149da80c608fb194..5c2720aef14efc7f6b5ddcae2fc9bd9731bd7f17 100644 (file)
@@ -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"
index 945c5229b932f16c74732875e7c15554b6bb4299..e6535dafcf73385f582a6ef591bc51afd7c69e43 100644 (file)
@@ -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"
index a7d81a3a0f15b796d859d6d03b00ebd462f853b5..90c29b7fedfe1b9c2444323385e203a53e41ffc2 100644 (file)
@@ -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
index fe2b81b905b53dcf2ba0eaff4f4c71fe82736e68..40e5c1997dad54cc7d6ee4e65a88e88a6b721e9a 100644 (file)
 
 #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
        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 |\
        HRCWH_ROM_LOC_LOCAL_16BIT |\
        HRCWH_TSEC1M_IN_GMII |\
        HRCWH_TSEC2M_IN_GMII)
-#endif /* PCI_64BIT */
+#endif /* CONFIG_PCI_64BIT */
 #endif /* CONFIG_PCISLAVE */
 
 /*
index b610b555a75bcaa721adaac84bcf8be5789acc11..15f10492a584eb35d32b68a1ae3b865f88b96308 100644 (file)
 
 #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
        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 |\
        HRCWH_ROM_LOC_LOCAL_16BIT |\
        HRCWH_TSEC1M_IN_GMII |\
        HRCWH_TSEC2M_IN_GMII)
-#endif /* PCI_64BIT */
+#endif /* CONFIG_PCI_64BIT */
 #endif /* CONFIG_PCISLAVE */
 
 /*
index 2b82bd82eb7da03d894037c434ec2910195a949c..949e370150f2d59f2b9cf40f3c0265c2091a2a4b 100644 (file)
        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 |\
index a7bbbbdd0b39f3cca6a4a6518e58d272fc5cd558..a8f692d5eada23485cc065e3502556aa6035002d 100644 (file)
 
 #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
 
index 6ae11185cb786628e8e5ab6fa17e525ced3c2f10..60eb2cf831409a8c4bd313cce24a4c31f405cf7d 100644 (file)
 
 #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
 
        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 |\
index 6c3ad76e524c6459465099d834a97e99a5a71a73..ea0805875225cbce04f5d04c9f0ea093c8a1c7b0 100644 (file)
 
 #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
 
        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 |\