]> git.sur5r.net Git - u-boot/commitdiff
arm: kirkwood: lsxl: Add SPI driver model support
authorMichael Walle <michael@walle.cc>
Tue, 29 May 2018 21:13:20 +0000 (23:13 +0200)
committerStefan Roese <sr@denx.de>
Tue, 5 Jun 2018 05:29:09 +0000 (07:29 +0200)
This patch shows how to enable driver model support for the LS-CHLv2 and
LS-XHL boards.

There are a couple of open questions:
 - do I need the u-boot,dm-pre-reloc tags in the device tree?
 - should mach/config.h define CONFIG_DM_SEQ_ALIAS?
 - how can we split this patch or are there any other pending patches
   which does the same and I didn't catch these.

This patch is based on the http://git.denx.de/u-boot-marvell.git (master
branch) and needs the following patches, which are still pending:
  https://patchwork.ozlabs.org/patch/909618/
  https://patchwork.ozlabs.org/patch/909617/
  https://patchwork.ozlabs.org/patch/909973/

Signed-off-by: Michael Walle <michael@walle.cc>
Tested-by: Michael Walle <michael@walle.cc>
Signed-off-by: Stefan Roese <sr@denx.de>
arch/arm/dts/kirkwood-lsxl.dtsi
arch/arm/mach-kirkwood/include/mach/config.h
configs/lschlv2_defconfig
configs/lsxhl_defconfig

index 92b11c75b8fb7a74fa05defe12011160d4072bf9..479a750d1d816104f006acba2b099b1d1dd1118e 100644 (file)
@@ -8,6 +8,10 @@
                stdout-path = &uart0;
        };
 
+       aliases {
+               spi0 = &spi0;
+       };
+
        ocp@f1000000 {
                pinctrl: pin-controller@10000 {
                        pmx_power_hdd: pmx-power-hdd {
index 98639114dbdd17dfcfad6ba850125482cb5fc73c..d2dc1c2e68bcdb5192578da25cf399165f687437 100644 (file)
@@ -59,7 +59,6 @@
  * SPI Flash configuration
  */
 #ifdef CONFIG_CMD_SF
-#define CONFIG_HARD_SPI                        1
 #ifndef CONFIG_ENV_SPI_BUS
 # define CONFIG_ENV_SPI_BUS            0
 #endif
index f2763221a196e9fc914fb1129cb1f6a0a4745cab..23e57e61c5079bd984b917594d4e1bcdd1ea3550 100644 (file)
@@ -23,14 +23,17 @@ CONFIG_CMD_USB=y
 CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_DM=y
 CONFIG_MVSATA_IDE=y
 # CONFIG_MMC is not set
+CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_MVGBE=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
+CONFIG_DM_SPI=y
 CONFIG_KIRKWOOD_SPI=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
index b523b68284aaecbfc6d699a90cb6f34d87d682f3..73e13d0880770536d977cc3bb022078796a15f33 100644 (file)
@@ -23,14 +23,17 @@ CONFIG_CMD_USB=y
 CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_DM=y
 CONFIG_MVSATA_IDE=y
 # CONFIG_MMC is not set
+CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_MVGBE=y
 CONFIG_SYS_NS16550=y
 CONFIG_SPI=y
+CONFIG_DM_SPI=y
 CONFIG_KIRKWOOD_SPI=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y