Skip to contentSkip to conversation

arm: sunxi: Move spl spi sunxi code to mach-sunxi

PATCH New Jagan Teki 1 participant 2 messages Feb 6, 2018 – Mar 13, 2018

Subsystems (4)
lore
Share & tools
lore

Jagan Teki

author
#0 lore raw

PATCH 1/1 arm: sunxi: Move spl spi sunxi code to mach-sunxi

This SUNXI variant SPL SPI code doesn't use either SPI or SPL_FLASG subsystems due to size constraints and also placing this code in drivers/mtd/spi will unnecessary build SPI_FLASH code(if defined) which never required, hence moved to arch area.

And also renamed the file according to kconfig which resembles proper name.

---
 arch/arm/mach-sunxi/Kconfig                                 |  8 ++++++++
 arch/arm/mach-sunxi/Makefile                                |  1 +
 .../sunxi_spi_spl.c => arch/arm/mach-sunxi/spl_spi_sunxi.c  |  0
 drivers/mtd/spi/Kconfig                                     | 13 -------------
 drivers/mtd/spi/Makefile                                    |  1 -
 5 files changed, 9 insertions(+), 14 deletions(-)
 rename drivers/mtd/spi/sunxi_spi_spl.c => arch/arm/mach-sunxi/spl_spi_sunxi.c (100%)
arch/arm/mach-sunxi/Kconfig +8 -0
index 1fededd..dc48eef 100644
@@ -847,4 +847,12 @@ config SPL_STACK_R_ADDR
 	default 0x2fe00000 if MACH_SUN9I
 	default 0x4fe00000 if MACH_SUN50I
 
+config SPL_SPI_SUNXI
+	bool "Support for SPI Flash on Allwinner SoCs in SPL"
+	depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || MACH_SUNXI_H3_H5 || MACH_SUN50I
+	help
+	  Enable support for SPI Flash. This option allows SPL to read from
+	  sunxi SPI Flash. It uses the same method as the boot ROM, so does
+	  not need any extra configuration.
+
 endif
arch/arm/mach-sunxi/Makefile +1 -0
index 2a3c379..6ddf682 100644
@@ -48,6 +48,7 @@ obj-$(CONFIG_MACH_SUN7I)	+= dram_sun4i.o
 obj-$(CONFIG_MACH_SUN8I_A23)	+= dram_sun8i_a23.o
 obj-$(CONFIG_MACH_SUN8I_A33)	+= dram_sun8i_a33.o
 obj-$(CONFIG_MACH_SUN8I_A83T)	+= dram_sun8i_a83t.o
+obj-$(CONFIG_SPL_SPI_SUNXI)	+= spl_spi_sunxi.o
 obj-$(CONFIG_SUNXI_DRAM_DW)	+= dram_sunxi_dw.o
 obj-$(CONFIG_SUNXI_DRAM_DW)	+= dram_timings/
 obj-$(CONFIG_MACH_SUN9I)	+= dram_sun9i.o
arch/arm/mach-sunxi/spl_spi_sunxi.c renamed from drivers/mtd/spi/sunxi_spi_spl.c +0 -0
similarity index 100%
rename from drivers/mtd/spi/sunxi_spi_spl.c
rename to arch/arm/mach-sunxi/spl_spi_sunxi.c
drivers/mtd/spi/Kconfig +0 -13
index 6ba255d..4484cf8 100644
@@ -135,17 +135,4 @@ config SPI_FLASH_MTD
 
 	  If unsure, say N
 
-if SPL
-
-config SPL_SPI_SUNXI
-	bool "Support for SPI Flash on Allwinner SoCs in SPL"
-	depends on MACH_SUN4I || MACH_SUN5I || MACH_SUN7I || MACH_SUNXI_H3_H5 || MACH_SUN50I
-	select SPL_SPI_FLASH_SUPPORT
-	---help---
-	Enable support for SPI Flash. This option allows SPL to read from
-	sunxi SPI Flash. It uses the same method as the boot ROM, so does
-	not need any extra configuration.
-
-endif
-
 endmenu # menu "SPI Flash Support"
drivers/mtd/spi/Makefile +0 -1
index fcda023..4be6e9b 100644
@@ -9,7 +9,6 @@ obj-$(CONFIG_DM_SPI_FLASH) += sf-uclass.o
 
 ifdef CONFIG_SPL_BUILD
 obj-$(CONFIG_SPL_SPI_BOOT)	+= fsl_espi_spl.o
-obj-$(CONFIG_SPL_SPI_SUNXI)	+= sunxi_spi_spl.o
 endif
 
 obj-$(CONFIG_SPI_FLASH) += sf_probe.o spi_flash.o spi_flash_ids.o sf.o
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 1/1 arm: sunxi: Move spl spi sunxi code to mach-sunxi

Quoted 9 lines · Jagan Teki

This SUNXI variant SPL SPI code doesn't use either SPI or SPL_FLASG subsystems due to size constraints and also placing this code in drivers/mtd/spi will unnecessary build SPI_FLASH code(if defined) which never required, hence moved to arch area.

And also renamed the file according to kconfig which resembles proper name.

Applied to u-boot-spi/master