public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] ARM: vexpress_ca9x4: Add missing flash width config option
@ 2023-09-20  7:41 Patryk Biel
  2023-09-21  8:32 ` Kristian Amlie
  2023-10-10 12:58 ` Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Patryk Biel @ 2023-09-20  7:41 UTC (permalink / raw)
  To: u-boot; +Cc: Patryk Biel, Kristian Amlie

Allow for a proper configuration of CFI flash banks avaialble on the vexpress_ca9x4
board. Without this option, the CFI flash incorrectly detects that the board has two
banks of 32MB flash devices, while in reality, the board provides
two flash banks, each with 64MB size. As a result, it becomes impossible to e.g. to
save u-boot env in flash. According to device tree for this board and
its implementation in QEMU, the CFI width should be set to 32 bits.

After applying this fix, CFI flash will correctly detect both flash
banks each with a size of 64MB. As as result the functionality of e.g. saving u-boot
env will work correctly.

Tested on QEMU 6.2.0.

Cc: Kristian Amlie <kristian.amlie@northern.tech>
Signed-off-by: Patryk Biel <pbiel7@gmail.com>
---
 configs/vexpress_ca9x4_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/vexpress_ca9x4_defconfig b/configs/vexpress_ca9x4_defconfig
index 5cacecc7cb..ac9c0e1d71 100644
--- a/configs/vexpress_ca9x4_defconfig
+++ b/configs/vexpress_ca9x4_defconfig
@@ -55,3 +55,4 @@ CONFIG_SMC911X_32_BIT=y
 CONFIG_BAUDRATE=38400
 CONFIG_CONS_INDEX=0
 CONFIG_SYS_TIMER_COUNTS_DOWN=y
+CONFIG_SYS_FLASH_CFI_WIDTH_32BIT=y
-- 
2.34.1


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

* Re: [PATCH] ARM: vexpress_ca9x4: Add missing flash width config option
  2023-09-20  7:41 [PATCH] ARM: vexpress_ca9x4: Add missing flash width config option Patryk Biel
@ 2023-09-21  8:32 ` Kristian Amlie
  2023-10-10 12:58 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Kristian Amlie @ 2023-09-21  8:32 UTC (permalink / raw)
  To: Patryk Biel, u-boot


[-- Attachment #1.1: Type: text/plain, Size: 1593 bytes --]

On 20/09/2023 09:41, Patryk Biel wrote:
> Allow for a proper configuration of CFI flash banks avaialble on the vexpress_ca9x4
> board. Without this option, the CFI flash incorrectly detects that the board has two
> banks of 32MB flash devices, while in reality, the board provides
> two flash banks, each with 64MB size. As a result, it becomes impossible to e.g. to
> save u-boot env in flash. According to device tree for this board and
> its implementation in QEMU, the CFI width should be set to 32 bits.
> 
> After applying this fix, CFI flash will correctly detect both flash
> banks each with a size of 64MB. As as result the functionality of e.g. saving u-boot
> env will work correctly.
> 
> Tested on QEMU 6.2.0.
> 
> Cc: Kristian Amlie <kristian.amlie@northern.tech>
> Signed-off-by: Patryk Biel <pbiel7@gmail.com>
> ---
>   configs/vexpress_ca9x4_defconfig | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/configs/vexpress_ca9x4_defconfig b/configs/vexpress_ca9x4_defconfig
> index 5cacecc7cb..ac9c0e1d71 100644
> --- a/configs/vexpress_ca9x4_defconfig
> +++ b/configs/vexpress_ca9x4_defconfig
> @@ -55,3 +55,4 @@ CONFIG_SMC911X_32_BIT=y
>   CONFIG_BAUDRATE=38400
>   CONFIG_CONS_INDEX=0
>   CONFIG_SYS_TIMER_COUNTS_DOWN=y
> +CONFIG_SYS_FLASH_CFI_WIDTH_32BIT=y

Reviewed-by: Kristian Amlie <kristian.amlie@northern.tech>

I believe this should be fine.

This is probably a recent issue, since we are using the 64MB banks 
already in our test setup, and it's working. But it's based on v2022.01, 
so it's a bit older.

-- 
Kristian

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] ARM: vexpress_ca9x4: Add missing flash width config option
  2023-09-20  7:41 [PATCH] ARM: vexpress_ca9x4: Add missing flash width config option Patryk Biel
  2023-09-21  8:32 ` Kristian Amlie
@ 2023-10-10 12:58 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2023-10-10 12:58 UTC (permalink / raw)
  To: Patryk Biel; +Cc: u-boot, Kristian Amlie

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

On Wed, Sep 20, 2023 at 09:41:20AM +0200, Patryk Biel wrote:

> Allow for a proper configuration of CFI flash banks avaialble on the vexpress_ca9x4
> board. Without this option, the CFI flash incorrectly detects that the board has two
> banks of 32MB flash devices, while in reality, the board provides
> two flash banks, each with 64MB size. As a result, it becomes impossible to e.g. to
> save u-boot env in flash. According to device tree for this board and
> its implementation in QEMU, the CFI width should be set to 32 bits.
> 
> After applying this fix, CFI flash will correctly detect both flash
> banks each with a size of 64MB. As as result the functionality of e.g. saving u-boot
> env will work correctly.
> 
> Tested on QEMU 6.2.0.
> 
> Cc: Kristian Amlie <kristian.amlie@northern.tech>
> Signed-off-by: Patryk Biel <pbiel7@gmail.com>
> Reviewed-by: Kristian Amlie <kristian.amlie@northern.tech>

Applied to u-boot/master, thanks!

-- 
Tom

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

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

end of thread, other threads:[~2023-10-10 13:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-20  7:41 [PATCH] ARM: vexpress_ca9x4: Add missing flash width config option Patryk Biel
2023-09-21  8:32 ` Kristian Amlie
2023-10-10 12:58 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox