diff mbox series

[U-Boot,RESEND,v2,1/2] arm: mvebu: clearfog: Fix SPI-NOR flash access

Message ID 40ecf7cac3dbd9ecd4c06a675212ae0072f6ceb6.1510549471.git.baruch@tkos.co.il
State Accepted
Commit 962b8fef91fbfa58c1045bee4d9a73c72b46c829
Delegated to: Stefan Roese
Headers show
Series [U-Boot,RESEND,v2,1/2] arm: mvebu: clearfog: Fix SPI-NOR flash access | expand

Commit Message

Baruch Siach Nov. 13, 2017, 5:04 a.m. UTC
From: Jon Nettleton <jon@solid-run.com>

The production variant of the SPI flash used by the clearfog
devices are based on winbond chips.  Additionally enable
SPI_FLASH_BAR since some variants will have 16MB of flash
that requires this to be enabled.

Remove the default speed and mode; these values are taken from the
device tree when CONFIG_DM_SPI_FLASH is enabled.

Add default bus, so that 'sf' detects the SPI flash by default.

Signed-off-by: Jon Nettleton <jon@solid-run.com>
[baruch: remove speed/mode; add bus; move winbond to defconfig]
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
v2: Move CONFIG_SPI_FLASH_WINBOND to defconfig (Jagan)
---
 configs/clearfog_defconfig | 3 +++
 include/configs/clearfog.h | 4 +---
 2 files changed, 4 insertions(+), 3 deletions(-)

Comments

Stefan Roese Nov. 16, 2017, 1:08 p.m. UTC | #1
On 13.11.2017 06:04, Baruch Siach wrote:
> From: Jon Nettleton <jon@solid-run.com>
> 
> The production variant of the SPI flash used by the clearfog
> devices are based on winbond chips.  Additionally enable
> SPI_FLASH_BAR since some variants will have 16MB of flash
> that requires this to be enabled.
> 
> Remove the default speed and mode; these values are taken from the
> device tree when CONFIG_DM_SPI_FLASH is enabled.
> 
> Add default bus, so that 'sf' detects the SPI flash by default.
> 
> Signed-off-by: Jon Nettleton <jon@solid-run.com>
> [baruch: remove speed/mode; add bus; move winbond to defconfig]
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
> v2: Move CONFIG_SPI_FLASH_WINBOND to defconfig (Jagan)

Applied to u-boot-marvell/master.

Thanks,
Stefan
diff mbox series

Patch

diff --git a/configs/clearfog_defconfig b/configs/clearfog_defconfig
index 3de204346d88..5fa645a45e23 100644
--- a/configs/clearfog_defconfig
+++ b/configs/clearfog_defconfig
@@ -46,3 +46,6 @@  CONFIG_DM_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_MVEBU=y
 CONFIG_USB_STORAGE=y
+CONFIG_SPI_FLASH_BAR=y
+CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_SPI_FLASH_MTD=y
diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h
index 5061f6c6fd16..bf87bac30021 100644
--- a/include/configs/clearfog.h
+++ b/include/configs/clearfog.h
@@ -33,9 +33,7 @@ 
 #define CONFIG_SYS_I2C_SPEED		100000
 
 /* SPI NOR flash default params, used by sf commands */
-#define CONFIG_SF_DEFAULT_SPEED		1000000
-#define CONFIG_SF_DEFAULT_MODE		SPI_MODE_3
-#define CONFIG_SPI_FLASH_STMICRO
+#define CONFIG_SF_DEFAULT_BUS		1
 
 /*
  * SDIO/MMC Card Configuration