All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] arm: mvebu: Use MVEBU_SPL_BOOT_DEVICE instead of SPL_BOOT_DEVICE
@ 2022-05-28 23:13 Chris Packham
  2022-05-28 23:13 ` [PATCH 2/3] Convert CONFIG_FIXED_SDHCI_ALIGNED_BUFFER to Kconfig Chris Packham
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Chris Packham @ 2022-05-28 23:13 UTC (permalink / raw)
  To: u-boot; +Cc: Chris Packham, Stefan Roese, Tom Rini

Update the way KWB_CFG_SEC_BOOT_DEV is determined to use
CONFIG_MVEBU_SPL_BOOT_DEVICE_{SPI,MMC} instead of
CONFIG_SPL_BOOT_DEVICE.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
---

 arch/arm/mach-mvebu/Makefile | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
index 8bd2246325ca..61eeb9c8c186 100644
--- a/arch/arm/mach-mvebu/Makefile
+++ b/arch/arm/mach-mvebu/Makefile
@@ -65,10 +65,12 @@ KWB_REPLACE += CSK_INDEX
 KWB_CFG_CSK_INDEX = $(CONFIG_SECURED_MODE_CSK_INDEX)
 
 KWB_REPLACE += SEC_BOOT_DEV
-KWB_CFG_SEC_BOOT_DEV=$(patsubst "%",%, \
-	$(if $(findstring BOOT_SPI_NOR_FLASH,$(CONFIG_SPL_BOOT_DEVICE)),0x34) \
-	$(if $(findstring BOOT_SDIO_MMC_CARD,$(CONFIG_SPL_BOOT_DEVICE)),0x31) \
-	)
+ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI),)
+	KWB_CFG_SEC_BOOT_DEV=0x34
+endif
+ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC),)
+	KWB_CFG_SEC_BOOT_DEV=0x31
+endif
 
 KWB_REPLACE += SEC_FUSE_DUMP
 KWB_CFG_SEC_FUSE_DUMP = a38x
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/3] Convert CONFIG_FIXED_SDHCI_ALIGNED_BUFFER to Kconfig
  2022-05-28 23:13 [PATCH 1/3] arm: mvebu: Use MVEBU_SPL_BOOT_DEVICE instead of SPL_BOOT_DEVICE Chris Packham
@ 2022-05-28 23:13 ` Chris Packham
  2022-05-29 10:47   ` Marek Behún
                     ` (2 more replies)
  2022-05-28 23:13 ` [PATCH 3/3] arm: mvebu: Remove CONFIG_SPL_BOOT_DEVICE Chris Packham
                   ` (2 subsequent siblings)
  3 siblings, 3 replies; 11+ messages in thread
From: Chris Packham @ 2022-05-28 23:13 UTC (permalink / raw)
  To: u-boot
  Cc: Chris Packham, Dennis Gilmore, Jaehoon Chung, Marek Behun,
	Mario Six, Patrick Delaunay, Peng Fan, Simon Glass, Stefan Roese

CONFIG_FIXED_SDHCI_ALIGNED_BUFFER is needed on some Marvell SoCs when
booting from MMC. All existing usages of this have the same value so
make this the default and have the Kconfig option depend on SPL &&
MVEBU_SPL_BOOT_DEVICE_MMC.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
---

 drivers/mmc/Kconfig               | 13 +++++++++++++
 include/configs/clearfog.h        |  7 -------
 include/configs/controlcenterdc.h |  7 -------
 include/configs/db-88f6820-gp.h   |  7 -------
 include/configs/helios4.h         |  7 -------
 include/configs/turris_omnia.h    |  7 -------
 scripts/config_whitelist.txt      |  1 -
 7 files changed, 13 insertions(+), 36 deletions(-)

diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
index 5e2921ce41a7..c8f9709d2d49 100644
--- a/drivers/mmc/Kconfig
+++ b/drivers/mmc/Kconfig
@@ -484,6 +484,19 @@ config SPL_MMC_SDHCI_ADMA
 	  This enables support for the ADMA (Advanced DMA) defined
 	  in the SD Host Controller Standard Specification Version 3.00 in SPL.
 
+config FIXED_SDHCI_ALIGNED_BUFFER
+	hex "SDRAM address for fixed buffer"
+	depends on SPL && MVEBU_SPL_BOOT_DEVICE_MMC
+	default 0x00180000
+	help
+	  On the Marvell Armada 38x when the SPL runs it located in internal
+	  SRAM which is the L2 cache locked to memory. When the MMC buffers
+	  are located on the stack (or bss), the SDIO controller (SDHCI) can't
+	  write into this L2 cache memory.
+
+	  This specifies the address of a fixed buffer located in SDRAM that
+	  will be used for all SDHCI transfers in the SPL.
+
 config MMC_SDHCI_ASPEED
 	bool "Aspeed SDHCI controller"
 	depends on ARCH_ASPEED
diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h
index 871e87c26d01..ec0f0e3ed115 100644
--- a/include/configs/clearfog.h
+++ b/include/configs/clearfog.h
@@ -56,13 +56,6 @@
 #define CONFIG_SPL_STACK		(0x40000000 + ((192 - 16) << 10))
 #define CONFIG_SPL_BOOTROM_SAVE		(CONFIG_SPL_STACK + 4)
 
-#if defined(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC) || defined(CONFIG_MVEBU_SPL_BOOT_DEVICE_SATA)
-/* SPL related MMC defines */
-#ifdef CONFIG_SPL_BUILD
-#define CONFIG_FIXED_SDHCI_ALIGNED_BUFFER	0x00180000	/* in SDRAM */
-#endif
-#endif
-
 /*
  * mv-common.h should be defined after CMD configs since it used them
  * to enable certain macros
diff --git a/include/configs/controlcenterdc.h b/include/configs/controlcenterdc.h
index b499d7085fd4..a8534e59d9b1 100644
--- a/include/configs/controlcenterdc.h
+++ b/include/configs/controlcenterdc.h
@@ -53,13 +53,6 @@
 #define CONFIG_SPL_STACK		(0x40000000 + ((212 - 16) << 10))
 #define CONFIG_SPL_BOOTROM_SAVE		(CONFIG_SPL_STACK + 4)
 
-#if CONFIG_SPL_BOOT_DEVICE == SPL_BOOT_SDIO_MMC_CARD
-/* SPL related MMC defines */
-#ifdef CONFIG_SPL_BUILD
-#define CONFIG_FIXED_SDHCI_ALIGNED_BUFFER	0x00180000	/* in SDRAM */
-#endif
-#endif
-
 /*
  * Environment Configuration
  */
diff --git a/include/configs/db-88f6820-gp.h b/include/configs/db-88f6820-gp.h
index 8dc73e8b1cc9..b4b58e0bcb8a 100644
--- a/include/configs/db-88f6820-gp.h
+++ b/include/configs/db-88f6820-gp.h
@@ -53,13 +53,6 @@
 #define CONFIG_SPL_STACK		(0x40000000 + ((192 - 16) << 10))
 #define CONFIG_SPL_BOOTROM_SAVE		(CONFIG_SPL_STACK + 4)
 
-#if CONFIG_SPL_BOOT_DEVICE == SPL_BOOT_SDIO_MMC_CARD
-/* SPL related MMC defines */
-#ifdef CONFIG_SPL_BUILD
-#define CONFIG_FIXED_SDHCI_ALIGNED_BUFFER	0x00180000	/* in SDRAM */
-#endif
-#endif
-
 /*
  * mv-common.h should be defined after CMD configs since it used them
  * to enable certain macros
diff --git a/include/configs/helios4.h b/include/configs/helios4.h
index 151ab66f4c3f..62a52e68b56a 100644
--- a/include/configs/helios4.h
+++ b/include/configs/helios4.h
@@ -56,13 +56,6 @@
 #define CONFIG_SPL_STACK		(0x40000000 + ((192 - 16) << 10))
 #define CONFIG_SPL_BOOTROM_SAVE		(CONFIG_SPL_STACK + 4)
 
-#if defined(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC) || defined(CONFIG_MVEBU_SPL_BOOT_DEVICE_SATA)
-/* SPL related MMC defines */
-#ifdef CONFIG_SPL_BUILD
-#define CONFIG_FIXED_SDHCI_ALIGNED_BUFFER	0x00180000	/* in SDRAM */
-#endif
-#endif
-
 /*
  * mv-common.h should be defined after CMD configs since it used them
  * to enable certain macros
diff --git a/include/configs/turris_omnia.h b/include/configs/turris_omnia.h
index 8119340b112f..112ddd3f4961 100644
--- a/include/configs/turris_omnia.h
+++ b/include/configs/turris_omnia.h
@@ -36,13 +36,6 @@
 #define CONFIG_SPL_STACK		(0x40000000 + ((192 - 16) << 10))
 #define CONFIG_SPL_BOOTROM_SAVE		(CONFIG_SPL_STACK + 4)
 
-#ifdef CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC
-/* SPL related MMC defines */
-# ifdef CONFIG_SPL_BUILD
-#  define CONFIG_FIXED_SDHCI_ALIGNED_BUFFER	0x00180000	/* in SDRAM */
-# endif
-#endif
-
 /*
  * mv-common.h should be defined after CMD configs since it used them
  * to enable certain macros
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index cecdda678191..25962b735f27 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -87,7 +87,6 @@ CONFIG_FDTFILE
 CONFIG_FEC_ENET_DEV
 CONFIG_FEC_FIXED_SPEED
 CONFIG_FEC_MXC_PHYADDR
-CONFIG_FIXED_SDHCI_ALIGNED_BUFFER
 CONFIG_FLASH_BR_PRELIM
 CONFIG_FLASH_CFI_LEGACY
 CONFIG_FLASH_OR_PRELIM
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/3] arm: mvebu: Remove CONFIG_SPL_BOOT_DEVICE
  2022-05-28 23:13 [PATCH 1/3] arm: mvebu: Use MVEBU_SPL_BOOT_DEVICE instead of SPL_BOOT_DEVICE Chris Packham
  2022-05-28 23:13 ` [PATCH 2/3] Convert CONFIG_FIXED_SDHCI_ALIGNED_BUFFER to Kconfig Chris Packham
@ 2022-05-28 23:13 ` Chris Packham
  2022-05-29 10:47   ` Marek Behún
                     ` (2 more replies)
  2022-05-30  6:52 ` [PATCH 1/3] arm: mvebu: Use MVEBU_SPL_BOOT_DEVICE instead of SPL_BOOT_DEVICE Stefan Roese
  2022-06-06 21:36 ` Tom Rini
  3 siblings, 3 replies; 11+ messages in thread
From: Chris Packham @ 2022-05-28 23:13 UTC (permalink / raw)
  To: u-boot
  Cc: Chris Packham, Chris Packham, Marek Behún, Mario Six,
	Patrick Delaunay, Simon Glass, Stefan Roese, Tom Rini

CONFIG_SPL_BOOT_DEVICE was made obsolete by
CONFIG_MVEBU_SPL_BOOT_DEVICE_{SPI,MMC,SATA,UART}.
CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI is the default so existing users of
CONFIG_SPL_BOOT_DEVICE can simply have the option removed.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
---

 include/configs/controlcenterdc.h | 11 -----------
 include/configs/db-88f6820-amc.h  | 12 ------------
 include/configs/db-88f6820-gp.h   | 11 -----------
 scripts/config_whitelist.txt      |  1 -
 4 files changed, 35 deletions(-)

diff --git a/include/configs/controlcenterdc.h b/include/configs/controlcenterdc.h
index a8534e59d9b1..3d7da4b2a33e 100644
--- a/include/configs/controlcenterdc.h
+++ b/include/configs/controlcenterdc.h
@@ -23,17 +23,6 @@
 #endif
 
 /* SPL */
-/*
- * Select the boot device here
- *
- * Currently supported are:
- * SPL_BOOT_SPI_NOR_FLASH	- Booting via SPI NOR flash
- * SPL_BOOT_SDIO_MMC_CARD	- Booting via SDIO/MMC card (partition 1)
- */
-#define SPL_BOOT_SPI_NOR_FLASH		1
-#define SPL_BOOT_SDIO_MMC_CARD		2
-#define CONFIG_SPL_BOOT_DEVICE		SPL_BOOT_SPI_NOR_FLASH
-
 /* Defines for SPL */
 #define CONFIG_SPL_SIZE			(160 << 10)
 
diff --git a/include/configs/db-88f6820-amc.h b/include/configs/db-88f6820-amc.h
index 6538e66052aa..d044292d6b5a 100644
--- a/include/configs/db-88f6820-amc.h
+++ b/include/configs/db-88f6820-amc.h
@@ -27,18 +27,6 @@
 	"initrd_high=0x10000000\0"
 
 /* SPL */
-/*
- * Select the boot device here
- *
- * Currently supported are:
- * SPL_BOOT_SPI_NOR_FLASH	- Booting via SPI NOR flash
- *
- * MMC is not populated on this board.
- * NAND support may be added in the future.
- */
-#define SPL_BOOT_SPI_NOR_FLASH		1
-#define CONFIG_SPL_BOOT_DEVICE		SPL_BOOT_SPI_NOR_FLASH
-
 /* Defines for SPL */
 #define CONFIG_SPL_SIZE			(140 << 10)
 #define CONFIG_SPL_MAX_SIZE		(CONFIG_SPL_SIZE - (CONFIG_SPL_TEXT_BASE - 0x40000000))
diff --git a/include/configs/db-88f6820-gp.h b/include/configs/db-88f6820-gp.h
index b4b58e0bcb8a..35ff6a876fde 100644
--- a/include/configs/db-88f6820-gp.h
+++ b/include/configs/db-88f6820-gp.h
@@ -28,17 +28,6 @@
 	"initrd_high=0x10000000\0"
 
 /* SPL */
-/*
- * Select the boot device here
- *
- * Currently supported are:
- * SPL_BOOT_SPI_NOR_FLASH	- Booting via SPI NOR flash
- * SPL_BOOT_SDIO_MMC_CARD	- Booting via SDIO/MMC card (partition 1)
- */
-#define SPL_BOOT_SPI_NOR_FLASH		1
-#define SPL_BOOT_SDIO_MMC_CARD		2
-#define CONFIG_SPL_BOOT_DEVICE		SPL_BOOT_SPI_NOR_FLASH
-
 /* Defines for SPL */
 #define CONFIG_SPL_SIZE			(140 << 10)
 #define CONFIG_SPL_MAX_SIZE		(CONFIG_SPL_SIZE - (CONFIG_SPL_TEXT_BASE - 0x40000000))
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 25962b735f27..a8766c9755ab 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -565,7 +565,6 @@ CONFIG_SPI_HALF_DUPLEX
 CONFIG_SPI_N25Q256A_RESET
 CONFIG_SPL_BOARD_LOAD_IMAGE
 CONFIG_SPL_BOOTROM_SAVE
-CONFIG_SPL_BOOT_DEVICE
 CONFIG_SPL_BSS_MAX_SIZE
 CONFIG_SPL_BSS_START_ADDR
 CONFIG_SPL_CMT
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/3] Convert CONFIG_FIXED_SDHCI_ALIGNED_BUFFER to Kconfig
  2022-05-28 23:13 ` [PATCH 2/3] Convert CONFIG_FIXED_SDHCI_ALIGNED_BUFFER to Kconfig Chris Packham
@ 2022-05-29 10:47   ` Marek Behún
  2022-05-30  6:52   ` Stefan Roese
  2022-06-06 21:36   ` Tom Rini
  2 siblings, 0 replies; 11+ messages in thread
From: Marek Behún @ 2022-05-29 10:47 UTC (permalink / raw)
  To: Chris Packham
  Cc: u-boot, Dennis Gilmore, Jaehoon Chung, Mario Six,
	Patrick Delaunay, Peng Fan, Simon Glass, Stefan Roese

On Sun, 29 May 2022 11:13:17 +1200
Chris Packham <judge.packham@gmail.com> wrote:

> CONFIG_FIXED_SDHCI_ALIGNED_BUFFER is needed on some Marvell SoCs when
> booting from MMC. All existing usages of this have the same value so
> make this the default and have the Kconfig option depend on SPL &&
> MVEBU_SPL_BOOT_DEVICE_MMC.
> 
> Signed-off-by: Chris Packham <judge.packham@gmail.com>

Reviewed-by: Marek Behún <marek.behun@nic.cz>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3] arm: mvebu: Remove CONFIG_SPL_BOOT_DEVICE
  2022-05-28 23:13 ` [PATCH 3/3] arm: mvebu: Remove CONFIG_SPL_BOOT_DEVICE Chris Packham
@ 2022-05-29 10:47   ` Marek Behún
  2022-05-30  6:53   ` Stefan Roese
  2022-06-06 21:36   ` Tom Rini
  2 siblings, 0 replies; 11+ messages in thread
From: Marek Behún @ 2022-05-29 10:47 UTC (permalink / raw)
  To: Chris Packham
  Cc: u-boot, Chris Packham, Mario Six, Patrick Delaunay, Simon Glass,
	Stefan Roese, Tom Rini

On Sun, 29 May 2022 11:13:18 +1200
Chris Packham <judge.packham@gmail.com> wrote:

> CONFIG_SPL_BOOT_DEVICE was made obsolete by
> CONFIG_MVEBU_SPL_BOOT_DEVICE_{SPI,MMC,SATA,UART}.
> CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI is the default so existing users of
> CONFIG_SPL_BOOT_DEVICE can simply have the option removed.
> 
> Signed-off-by: Chris Packham <judge.packham@gmail.com>

Reviewed-by: Marek Behún <marek.behun@nic.cz>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/3] arm: mvebu: Use MVEBU_SPL_BOOT_DEVICE instead of SPL_BOOT_DEVICE
  2022-05-28 23:13 [PATCH 1/3] arm: mvebu: Use MVEBU_SPL_BOOT_DEVICE instead of SPL_BOOT_DEVICE Chris Packham
  2022-05-28 23:13 ` [PATCH 2/3] Convert CONFIG_FIXED_SDHCI_ALIGNED_BUFFER to Kconfig Chris Packham
  2022-05-28 23:13 ` [PATCH 3/3] arm: mvebu: Remove CONFIG_SPL_BOOT_DEVICE Chris Packham
@ 2022-05-30  6:52 ` Stefan Roese
  2022-06-06 21:36 ` Tom Rini
  3 siblings, 0 replies; 11+ messages in thread
From: Stefan Roese @ 2022-05-30  6:52 UTC (permalink / raw)
  To: Chris Packham, u-boot; +Cc: Tom Rini

On 29.05.22 01:13, Chris Packham wrote:
> Update the way KWB_CFG_SEC_BOOT_DEV is determined to use
> CONFIG_MVEBU_SPL_BOOT_DEVICE_{SPI,MMC} instead of
> CONFIG_SPL_BOOT_DEVICE.
> 
> Signed-off-by: Chris Packham <judge.packham@gmail.com>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

> ---
> 
>   arch/arm/mach-mvebu/Makefile | 10 ++++++----
>   1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
> index 8bd2246325ca..61eeb9c8c186 100644
> --- a/arch/arm/mach-mvebu/Makefile
> +++ b/arch/arm/mach-mvebu/Makefile
> @@ -65,10 +65,12 @@ KWB_REPLACE += CSK_INDEX
>   KWB_CFG_CSK_INDEX = $(CONFIG_SECURED_MODE_CSK_INDEX)
>   
>   KWB_REPLACE += SEC_BOOT_DEV
> -KWB_CFG_SEC_BOOT_DEV=$(patsubst "%",%, \
> -	$(if $(findstring BOOT_SPI_NOR_FLASH,$(CONFIG_SPL_BOOT_DEVICE)),0x34) \
> -	$(if $(findstring BOOT_SDIO_MMC_CARD,$(CONFIG_SPL_BOOT_DEVICE)),0x31) \
> -	)
> +ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI),)
> +	KWB_CFG_SEC_BOOT_DEV=0x34
> +endif
> +ifneq ($(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC),)
> +	KWB_CFG_SEC_BOOT_DEV=0x31
> +endif
>   
>   KWB_REPLACE += SEC_FUSE_DUMP
>   KWB_CFG_SEC_FUSE_DUMP = a38x

Viele Grüße,
Stefan Roese

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/3] Convert CONFIG_FIXED_SDHCI_ALIGNED_BUFFER to Kconfig
  2022-05-28 23:13 ` [PATCH 2/3] Convert CONFIG_FIXED_SDHCI_ALIGNED_BUFFER to Kconfig Chris Packham
  2022-05-29 10:47   ` Marek Behún
@ 2022-05-30  6:52   ` Stefan Roese
  2022-06-06 21:36   ` Tom Rini
  2 siblings, 0 replies; 11+ messages in thread
From: Stefan Roese @ 2022-05-30  6:52 UTC (permalink / raw)
  To: Chris Packham, u-boot
  Cc: Dennis Gilmore, Jaehoon Chung, Marek Behun, Mario Six,
	Patrick Delaunay, Peng Fan, Simon Glass

On 29.05.22 01:13, Chris Packham wrote:
> CONFIG_FIXED_SDHCI_ALIGNED_BUFFER is needed on some Marvell SoCs when
> booting from MMC. All existing usages of this have the same value so
> make this the default and have the Kconfig option depend on SPL &&
> MVEBU_SPL_BOOT_DEVICE_MMC.
> 
> Signed-off-by: Chris Packham <judge.packham@gmail.com>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

> ---
> 
>   drivers/mmc/Kconfig               | 13 +++++++++++++
>   include/configs/clearfog.h        |  7 -------
>   include/configs/controlcenterdc.h |  7 -------
>   include/configs/db-88f6820-gp.h   |  7 -------
>   include/configs/helios4.h         |  7 -------
>   include/configs/turris_omnia.h    |  7 -------
>   scripts/config_whitelist.txt      |  1 -
>   7 files changed, 13 insertions(+), 36 deletions(-)
> 
> diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
> index 5e2921ce41a7..c8f9709d2d49 100644
> --- a/drivers/mmc/Kconfig
> +++ b/drivers/mmc/Kconfig
> @@ -484,6 +484,19 @@ config SPL_MMC_SDHCI_ADMA
>   	  This enables support for the ADMA (Advanced DMA) defined
>   	  in the SD Host Controller Standard Specification Version 3.00 in SPL.
>   
> +config FIXED_SDHCI_ALIGNED_BUFFER
> +	hex "SDRAM address for fixed buffer"
> +	depends on SPL && MVEBU_SPL_BOOT_DEVICE_MMC
> +	default 0x00180000
> +	help
> +	  On the Marvell Armada 38x when the SPL runs it located in internal
> +	  SRAM which is the L2 cache locked to memory. When the MMC buffers
> +	  are located on the stack (or bss), the SDIO controller (SDHCI) can't
> +	  write into this L2 cache memory.
> +
> +	  This specifies the address of a fixed buffer located in SDRAM that
> +	  will be used for all SDHCI transfers in the SPL.
> +
>   config MMC_SDHCI_ASPEED
>   	bool "Aspeed SDHCI controller"
>   	depends on ARCH_ASPEED
> diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h
> index 871e87c26d01..ec0f0e3ed115 100644
> --- a/include/configs/clearfog.h
> +++ b/include/configs/clearfog.h
> @@ -56,13 +56,6 @@
>   #define CONFIG_SPL_STACK		(0x40000000 + ((192 - 16) << 10))
>   #define CONFIG_SPL_BOOTROM_SAVE		(CONFIG_SPL_STACK + 4)
>   
> -#if defined(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC) || defined(CONFIG_MVEBU_SPL_BOOT_DEVICE_SATA)
> -/* SPL related MMC defines */
> -#ifdef CONFIG_SPL_BUILD
> -#define CONFIG_FIXED_SDHCI_ALIGNED_BUFFER	0x00180000	/* in SDRAM */
> -#endif
> -#endif
> -
>   /*
>    * mv-common.h should be defined after CMD configs since it used them
>    * to enable certain macros
> diff --git a/include/configs/controlcenterdc.h b/include/configs/controlcenterdc.h
> index b499d7085fd4..a8534e59d9b1 100644
> --- a/include/configs/controlcenterdc.h
> +++ b/include/configs/controlcenterdc.h
> @@ -53,13 +53,6 @@
>   #define CONFIG_SPL_STACK		(0x40000000 + ((212 - 16) << 10))
>   #define CONFIG_SPL_BOOTROM_SAVE		(CONFIG_SPL_STACK + 4)
>   
> -#if CONFIG_SPL_BOOT_DEVICE == SPL_BOOT_SDIO_MMC_CARD
> -/* SPL related MMC defines */
> -#ifdef CONFIG_SPL_BUILD
> -#define CONFIG_FIXED_SDHCI_ALIGNED_BUFFER	0x00180000	/* in SDRAM */
> -#endif
> -#endif
> -
>   /*
>    * Environment Configuration
>    */
> diff --git a/include/configs/db-88f6820-gp.h b/include/configs/db-88f6820-gp.h
> index 8dc73e8b1cc9..b4b58e0bcb8a 100644
> --- a/include/configs/db-88f6820-gp.h
> +++ b/include/configs/db-88f6820-gp.h
> @@ -53,13 +53,6 @@
>   #define CONFIG_SPL_STACK		(0x40000000 + ((192 - 16) << 10))
>   #define CONFIG_SPL_BOOTROM_SAVE		(CONFIG_SPL_STACK + 4)
>   
> -#if CONFIG_SPL_BOOT_DEVICE == SPL_BOOT_SDIO_MMC_CARD
> -/* SPL related MMC defines */
> -#ifdef CONFIG_SPL_BUILD
> -#define CONFIG_FIXED_SDHCI_ALIGNED_BUFFER	0x00180000	/* in SDRAM */
> -#endif
> -#endif
> -
>   /*
>    * mv-common.h should be defined after CMD configs since it used them
>    * to enable certain macros
> diff --git a/include/configs/helios4.h b/include/configs/helios4.h
> index 151ab66f4c3f..62a52e68b56a 100644
> --- a/include/configs/helios4.h
> +++ b/include/configs/helios4.h
> @@ -56,13 +56,6 @@
>   #define CONFIG_SPL_STACK		(0x40000000 + ((192 - 16) << 10))
>   #define CONFIG_SPL_BOOTROM_SAVE		(CONFIG_SPL_STACK + 4)
>   
> -#if defined(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC) || defined(CONFIG_MVEBU_SPL_BOOT_DEVICE_SATA)
> -/* SPL related MMC defines */
> -#ifdef CONFIG_SPL_BUILD
> -#define CONFIG_FIXED_SDHCI_ALIGNED_BUFFER	0x00180000	/* in SDRAM */
> -#endif
> -#endif
> -
>   /*
>    * mv-common.h should be defined after CMD configs since it used them
>    * to enable certain macros
> diff --git a/include/configs/turris_omnia.h b/include/configs/turris_omnia.h
> index 8119340b112f..112ddd3f4961 100644
> --- a/include/configs/turris_omnia.h
> +++ b/include/configs/turris_omnia.h
> @@ -36,13 +36,6 @@
>   #define CONFIG_SPL_STACK		(0x40000000 + ((192 - 16) << 10))
>   #define CONFIG_SPL_BOOTROM_SAVE		(CONFIG_SPL_STACK + 4)
>   
> -#ifdef CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC
> -/* SPL related MMC defines */
> -# ifdef CONFIG_SPL_BUILD
> -#  define CONFIG_FIXED_SDHCI_ALIGNED_BUFFER	0x00180000	/* in SDRAM */
> -# endif
> -#endif
> -
>   /*
>    * mv-common.h should be defined after CMD configs since it used them
>    * to enable certain macros
> diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
> index cecdda678191..25962b735f27 100644
> --- a/scripts/config_whitelist.txt
> +++ b/scripts/config_whitelist.txt
> @@ -87,7 +87,6 @@ CONFIG_FDTFILE
>   CONFIG_FEC_ENET_DEV
>   CONFIG_FEC_FIXED_SPEED
>   CONFIG_FEC_MXC_PHYADDR
> -CONFIG_FIXED_SDHCI_ALIGNED_BUFFER
>   CONFIG_FLASH_BR_PRELIM
>   CONFIG_FLASH_CFI_LEGACY
>   CONFIG_FLASH_OR_PRELIM

Viele Grüße,
Stefan Roese

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3] arm: mvebu: Remove CONFIG_SPL_BOOT_DEVICE
  2022-05-28 23:13 ` [PATCH 3/3] arm: mvebu: Remove CONFIG_SPL_BOOT_DEVICE Chris Packham
  2022-05-29 10:47   ` Marek Behún
@ 2022-05-30  6:53   ` Stefan Roese
  2022-06-06 21:36   ` Tom Rini
  2 siblings, 0 replies; 11+ messages in thread
From: Stefan Roese @ 2022-05-30  6:53 UTC (permalink / raw)
  To: Chris Packham, u-boot
  Cc: Chris Packham, Marek Behún, Mario Six, Patrick Delaunay,
	Simon Glass, Tom Rini

On 29.05.22 01:13, Chris Packham wrote:
> CONFIG_SPL_BOOT_DEVICE was made obsolete by
> CONFIG_MVEBU_SPL_BOOT_DEVICE_{SPI,MMC,SATA,UART}.
> CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI is the default so existing users of
> CONFIG_SPL_BOOT_DEVICE can simply have the option removed.
> 
> Signed-off-by: Chris Packham <judge.packham@gmail.com>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

> ---
> 
>   include/configs/controlcenterdc.h | 11 -----------
>   include/configs/db-88f6820-amc.h  | 12 ------------
>   include/configs/db-88f6820-gp.h   | 11 -----------
>   scripts/config_whitelist.txt      |  1 -
>   4 files changed, 35 deletions(-)
> 
> diff --git a/include/configs/controlcenterdc.h b/include/configs/controlcenterdc.h
> index a8534e59d9b1..3d7da4b2a33e 100644
> --- a/include/configs/controlcenterdc.h
> +++ b/include/configs/controlcenterdc.h
> @@ -23,17 +23,6 @@
>   #endif
>   
>   /* SPL */
> -/*
> - * Select the boot device here
> - *
> - * Currently supported are:
> - * SPL_BOOT_SPI_NOR_FLASH	- Booting via SPI NOR flash
> - * SPL_BOOT_SDIO_MMC_CARD	- Booting via SDIO/MMC card (partition 1)
> - */
> -#define SPL_BOOT_SPI_NOR_FLASH		1
> -#define SPL_BOOT_SDIO_MMC_CARD		2
> -#define CONFIG_SPL_BOOT_DEVICE		SPL_BOOT_SPI_NOR_FLASH
> -
>   /* Defines for SPL */
>   #define CONFIG_SPL_SIZE			(160 << 10)
>   
> diff --git a/include/configs/db-88f6820-amc.h b/include/configs/db-88f6820-amc.h
> index 6538e66052aa..d044292d6b5a 100644
> --- a/include/configs/db-88f6820-amc.h
> +++ b/include/configs/db-88f6820-amc.h
> @@ -27,18 +27,6 @@
>   	"initrd_high=0x10000000\0"
>   
>   /* SPL */
> -/*
> - * Select the boot device here
> - *
> - * Currently supported are:
> - * SPL_BOOT_SPI_NOR_FLASH	- Booting via SPI NOR flash
> - *
> - * MMC is not populated on this board.
> - * NAND support may be added in the future.
> - */
> -#define SPL_BOOT_SPI_NOR_FLASH		1
> -#define CONFIG_SPL_BOOT_DEVICE		SPL_BOOT_SPI_NOR_FLASH
> -
>   /* Defines for SPL */
>   #define CONFIG_SPL_SIZE			(140 << 10)
>   #define CONFIG_SPL_MAX_SIZE		(CONFIG_SPL_SIZE - (CONFIG_SPL_TEXT_BASE - 0x40000000))
> diff --git a/include/configs/db-88f6820-gp.h b/include/configs/db-88f6820-gp.h
> index b4b58e0bcb8a..35ff6a876fde 100644
> --- a/include/configs/db-88f6820-gp.h
> +++ b/include/configs/db-88f6820-gp.h
> @@ -28,17 +28,6 @@
>   	"initrd_high=0x10000000\0"
>   
>   /* SPL */
> -/*
> - * Select the boot device here
> - *
> - * Currently supported are:
> - * SPL_BOOT_SPI_NOR_FLASH	- Booting via SPI NOR flash
> - * SPL_BOOT_SDIO_MMC_CARD	- Booting via SDIO/MMC card (partition 1)
> - */
> -#define SPL_BOOT_SPI_NOR_FLASH		1
> -#define SPL_BOOT_SDIO_MMC_CARD		2
> -#define CONFIG_SPL_BOOT_DEVICE		SPL_BOOT_SPI_NOR_FLASH
> -
>   /* Defines for SPL */
>   #define CONFIG_SPL_SIZE			(140 << 10)
>   #define CONFIG_SPL_MAX_SIZE		(CONFIG_SPL_SIZE - (CONFIG_SPL_TEXT_BASE - 0x40000000))
> diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
> index 25962b735f27..a8766c9755ab 100644
> --- a/scripts/config_whitelist.txt
> +++ b/scripts/config_whitelist.txt
> @@ -565,7 +565,6 @@ CONFIG_SPI_HALF_DUPLEX
>   CONFIG_SPI_N25Q256A_RESET
>   CONFIG_SPL_BOARD_LOAD_IMAGE
>   CONFIG_SPL_BOOTROM_SAVE
> -CONFIG_SPL_BOOT_DEVICE
>   CONFIG_SPL_BSS_MAX_SIZE
>   CONFIG_SPL_BSS_START_ADDR
>   CONFIG_SPL_CMT

Viele Grüße,
Stefan Roese

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/3] arm: mvebu: Use MVEBU_SPL_BOOT_DEVICE instead of SPL_BOOT_DEVICE
  2022-05-28 23:13 [PATCH 1/3] arm: mvebu: Use MVEBU_SPL_BOOT_DEVICE instead of SPL_BOOT_DEVICE Chris Packham
                   ` (2 preceding siblings ...)
  2022-05-30  6:52 ` [PATCH 1/3] arm: mvebu: Use MVEBU_SPL_BOOT_DEVICE instead of SPL_BOOT_DEVICE Stefan Roese
@ 2022-06-06 21:36 ` Tom Rini
  3 siblings, 0 replies; 11+ messages in thread
From: Tom Rini @ 2022-06-06 21:36 UTC (permalink / raw)
  To: Chris Packham; +Cc: u-boot, Stefan Roese

[-- Attachment #1: Type: text/plain, Size: 357 bytes --]

On Sun, May 29, 2022 at 11:13:16AM +1200, Chris Packham wrote:

> Update the way KWB_CFG_SEC_BOOT_DEV is determined to use
> CONFIG_MVEBU_SPL_BOOT_DEVICE_{SPI,MMC} instead of
> CONFIG_SPL_BOOT_DEVICE.
> 
> Signed-off-by: Chris Packham <judge.packham@gmail.com>
> Reviewed-by: Stefan Roese <sr@denx.de>

Applied to u-boot/next, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/3] Convert CONFIG_FIXED_SDHCI_ALIGNED_BUFFER to Kconfig
  2022-05-28 23:13 ` [PATCH 2/3] Convert CONFIG_FIXED_SDHCI_ALIGNED_BUFFER to Kconfig Chris Packham
  2022-05-29 10:47   ` Marek Behún
  2022-05-30  6:52   ` Stefan Roese
@ 2022-06-06 21:36   ` Tom Rini
  2 siblings, 0 replies; 11+ messages in thread
From: Tom Rini @ 2022-06-06 21:36 UTC (permalink / raw)
  To: Chris Packham
  Cc: u-boot, Dennis Gilmore, Jaehoon Chung, Marek Behun, Mario Six,
	Patrick Delaunay, Peng Fan, Simon Glass, Stefan Roese

[-- Attachment #1: Type: text/plain, Size: 511 bytes --]

On Sun, May 29, 2022 at 11:13:17AM +1200, Chris Packham wrote:

> CONFIG_FIXED_SDHCI_ALIGNED_BUFFER is needed on some Marvell SoCs when
> booting from MMC. All existing usages of this have the same value so
> make this the default and have the Kconfig option depend on SPL &&
> MVEBU_SPL_BOOT_DEVICE_MMC.
> 
> Signed-off-by: Chris Packham <judge.packham@gmail.com>
> Reviewed-by: Marek Behún <marek.behun@nic.cz>
> Reviewed-by: Stefan Roese <sr@denx.de>

Applied to u-boot/next, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3] arm: mvebu: Remove CONFIG_SPL_BOOT_DEVICE
  2022-05-28 23:13 ` [PATCH 3/3] arm: mvebu: Remove CONFIG_SPL_BOOT_DEVICE Chris Packham
  2022-05-29 10:47   ` Marek Behún
  2022-05-30  6:53   ` Stefan Roese
@ 2022-06-06 21:36   ` Tom Rini
  2 siblings, 0 replies; 11+ messages in thread
From: Tom Rini @ 2022-06-06 21:36 UTC (permalink / raw)
  To: Chris Packham
  Cc: u-boot, Chris Packham, Marek Behún, Mario Six,
	Patrick Delaunay, Simon Glass, Stefan Roese

[-- Attachment #1: Type: text/plain, Size: 500 bytes --]

On Sun, May 29, 2022 at 11:13:18AM +1200, Chris Packham wrote:

> CONFIG_SPL_BOOT_DEVICE was made obsolete by
> CONFIG_MVEBU_SPL_BOOT_DEVICE_{SPI,MMC,SATA,UART}.
> CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI is the default so existing users of
> CONFIG_SPL_BOOT_DEVICE can simply have the option removed.
> 
> Signed-off-by: Chris Packham <judge.packham@gmail.com>
> Reviewed-by: Marek Behún <marek.behun@nic.cz>
> Reviewed-by: Stefan Roese <sr@denx.de>

Applied to u-boot/next, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-06-06 21:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-28 23:13 [PATCH 1/3] arm: mvebu: Use MVEBU_SPL_BOOT_DEVICE instead of SPL_BOOT_DEVICE Chris Packham
2022-05-28 23:13 ` [PATCH 2/3] Convert CONFIG_FIXED_SDHCI_ALIGNED_BUFFER to Kconfig Chris Packham
2022-05-29 10:47   ` Marek Behún
2022-05-30  6:52   ` Stefan Roese
2022-06-06 21:36   ` Tom Rini
2022-05-28 23:13 ` [PATCH 3/3] arm: mvebu: Remove CONFIG_SPL_BOOT_DEVICE Chris Packham
2022-05-29 10:47   ` Marek Behún
2022-05-30  6:53   ` Stefan Roese
2022-06-06 21:36   ` Tom Rini
2022-05-30  6:52 ` [PATCH 1/3] arm: mvebu: Use MVEBU_SPL_BOOT_DEVICE instead of SPL_BOOT_DEVICE Stefan Roese
2022-06-06 21:36 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.