[PATCHv3 4/6] omap4: sdp: convert to device model
Tero Kristo
t-kristo at ti.com
Tue Jun 16 10:03:08 CEST 2020
From: Peter Ujfalusi <peter.ujfalusi at ti.com>
Convert omap4 sdp to device model.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi at ti.com>
Signed-off-by: Tero Kristo <t-kristo at ti.com>
---
v3:
* dropped SPI support
arch/arm/dts/Makefile | 4 ++++
board/ti/sdp4430/sdp.c | 12 ++++++++++++
configs/omap4_sdp4430_defconfig | 12 +++++++++---
3 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index dd574f57fa..70cf05f2b8 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -852,6 +852,10 @@ dtb-$(CONFIG_TARGET_OMAP4_PANDA) += \
omap4-panda.dtb \
omap4-panda-es.dtb
+dtb-$(CONFIG_TARGET_OMAP4_SDP4430) += \
+ omap4-sdp.dtb \
+ omap4-sdp-es23plus.dtb
+
dtb-$(CONFIG_TARGET_SAMA5D2_PTC_EK) += \
at91-sama5d2_ptc_ek.dtb
diff --git a/board/ti/sdp4430/sdp.c b/board/ti/sdp4430/sdp.c
index a5b3504045..5b294ea79b 100644
--- a/board/ti/sdp4430/sdp.c
+++ b/board/ti/sdp4430/sdp.c
@@ -9,6 +9,7 @@
#include <init.h>
#include <net.h>
#include <twl6030.h>
+#include <serial.h>
#include <asm/arch/sys_proto.h>
#include <asm/arch/mmc_host_def.h>
@@ -91,6 +92,17 @@ void board_mmc_power_init(void)
#endif
#endif
+#if defined(CONFIG_SPL_OS_BOOT)
+int spl_start_uboot(void)
+{
+ /* break into full u-boot on 'c' */
+ if (serial_tstc() && serial_getc() == 'c')
+ return 1;
+
+ return 0;
+}
+#endif /* CONFIG_SPL_OS_BOOT */
+
/*
* get_board_rev() - get board revision
*/
diff --git a/configs/omap4_sdp4430_defconfig b/configs/omap4_sdp4430_defconfig
index 219721388f..e9a8a90786 100644
--- a/configs/omap4_sdp4430_defconfig
+++ b/configs/omap4_sdp4430_defconfig
@@ -5,6 +5,7 @@ CONFIG_ARCH_OMAP2PLUS=y
CONFIG_ENV_OFFSET=0xE0000
CONFIG_OMAP44XX=y
CONFIG_TARGET_OMAP4_SDP4430=y
+CONFIG_DEFAULT_DEVICE_TREE="omap4-sdp"
CONFIG_CMD_BAT=y
CONFIG_SPL=y
CONFIG_SPL_TEXT_BASE=0x40300000
@@ -12,6 +13,7 @@ CONFIG_DISTRO_DEFAULTS=y
CONFIG_BOOTCOMMAND="if test ${boot_fit} -eq 1; then run update_to_fit; fi; run findfdt; run init_console; run envboot; run distro_bootcmd"
CONFIG_SYS_CONSOLE_IS_IN_ENV=y
CONFIG_SYS_CONSOLE_INFO_QUIET=y
+CONFIG_DEFAULT_FDT_FILE="omap4-sdp.dtb"
CONFIG_VERSION_VARIABLE=y
# CONFIG_SPL_I2C_SUPPORT is not set
# CONFIG_SPL_NAND_SUPPORT is not set
@@ -19,20 +21,22 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
-CONFIG_CMD_SPI=y
# CONFIG_CMD_SETEXPR is not set
# CONFIG_CMD_NFS is not set
CONFIG_CMD_EXT4_WRITE=y
+CONFIG_OF_CONTROL=y
# CONFIG_EFI_PARTITION is not set
CONFIG_SPL_PARTITION_UUIDS=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_DM=y
+CONFIG_DM_MMC=y
CONFIG_MMC_OMAP_HS=y
CONFIG_CONS_INDEX=3
CONFIG_SYS_NS16550=y
-CONFIG_SPI=y
-CONFIG_OMAP3_SPI=y
+# CONFIG_SPI is not set
CONFIG_USB=y
+CONFIG_DM_USB=y
CONFIG_USB_MUSB_UDC=y
CONFIG_USB_OMAP3=y
CONFIG_USB_GADGET=y
@@ -40,3 +44,5 @@ CONFIG_FAT_WRITE=y
# CONFIG_REGEX is not set
CONFIG_OF_LIBFDT=y
# CONFIG_EFI_LOADER is not set
+CONFIG_SYS_MALLOC_F_LEN=0x4000
+CONFIG_DM_ETH=y
--
2.17.1
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
More information about the U-Boot
mailing list