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>
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"
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 */
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
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
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
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"
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"
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
#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 */
/*
#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 */
/*
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 |\
#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
#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 |\
#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 |\