All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] arm: at91: gardena-smart-gateway-at91sam: Enable CONFIG_SYS_NAND_USE_FLASH_BBT
@ 2019-08-27  6:14 Stefan Roese
  2019-08-27  7:54 ` Eugen.Hristev at microchip.com
  2019-09-13 13:09 ` Alexander Dahl
  0 siblings, 2 replies; 7+ messages in thread
From: Stefan Roese @ 2019-08-27  6:14 UTC (permalink / raw)
  To: u-boot

This patch enables the BBT in NAND on the AT91SAM based GARDENA smart
Gateway. This is especially important, since the Linux driver also
enables this option and uses the BBT table pages. Without setting this
option, U-Boot will try to re-use these pages again (e.g. UBI).

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
Cc: Tom Rini <trini@konsulko.com>
---
Eugen, I would advise you to double-check, if your AT91 based boards
using NAND also have this BBT option enabled in Linux. If yes, its
definitely necessary to enable it in U-Boot as well to match the same
layout.

 configs/gardena-smart-gateway-at91sam_defconfig | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/configs/gardena-smart-gateway-at91sam_defconfig b/configs/gardena-smart-gateway-at91sam_defconfig
index c495ba4612..4a2cc331a6 100644
--- a/configs/gardena-smart-gateway-at91sam_defconfig
+++ b/configs/gardena-smart-gateway-at91sam_defconfig
@@ -17,6 +17,7 @@ CONFIG_DEBUG_UART_BASE=0xfffff200
 CONFIG_DEBUG_UART_CLOCK=132000000
 CONFIG_SMBIOS_PRODUCT_NAME="at91sam9x5ek"
 CONFIG_DEBUG_UART=y
+CONFIG_SPL_TEXT_BASE=0x300000
 CONFIG_FIT=y
 CONFIG_NAND_BOOT=y
 CONFIG_BOOTDELAY=3
@@ -24,7 +25,6 @@ CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,768k(uboot)ro,256k(env_redundant),256k(env),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=6 root=ubi0:rootfs rw"
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
-CONFIG_SPL_TEXT_BASE=0x300000
 CONFIG_SPL_SYS_MALLOC_SIMPLE=y
 CONFIG_SPL_SEPARATE_BSS=y
 # CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set
@@ -66,7 +66,6 @@ CONFIG_AT91_GPIO=y
 CONFIG_LED=y
 CONFIG_LED_GPIO=y
 # CONFIG_MMC is not set
-# CONFIG_SYS_NAND_USE_FLASH_BBT is not set
 CONFIG_NAND_ATMEL=y
 CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y
 CONFIG_DM_ETH=y
-- 
2.23.0

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

* [U-Boot] [PATCH] arm: at91: gardena-smart-gateway-at91sam: Enable CONFIG_SYS_NAND_USE_FLASH_BBT
  2019-08-27  6:14 [U-Boot] [PATCH] arm: at91: gardena-smart-gateway-at91sam: Enable CONFIG_SYS_NAND_USE_FLASH_BBT Stefan Roese
@ 2019-08-27  7:54 ` Eugen.Hristev at microchip.com
  2019-09-11 13:13   ` Stefan Roese
  2019-09-13 13:09 ` Alexander Dahl
  1 sibling, 1 reply; 7+ messages in thread
From: Eugen.Hristev at microchip.com @ 2019-08-27  7:54 UTC (permalink / raw)
  To: u-boot



On 27.08.2019 09:14, Stefan Roese wrote:

> 
> This patch enables the BBT in NAND on the AT91SAM based GARDENA smart
> Gateway. This is especially important, since the Linux driver also
> enables this option and uses the BBT table pages. Without setting this
> option, U-Boot will try to re-use these pages again (e.g. UBI).
> 
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Eugen Hristev <eugen.hristev@microchip.com>
> Cc: Tom Rini <trini@konsulko.com>
> ---
> Eugen, I would advise you to double-check, if your AT91 based boards
> using NAND also have this BBT option enabled in Linux. If yes, its
> definitely necessary to enable it in U-Boot as well to match the same
> layout.

Hi Stefan,

Thank you for the patch.
I will look into it with help of Tudor and provide some feedback.

Eugen

> 
>   configs/gardena-smart-gateway-at91sam_defconfig | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/configs/gardena-smart-gateway-at91sam_defconfig b/configs/gardena-smart-gateway-at91sam_defconfig
> index c495ba4612..4a2cc331a6 100644
> --- a/configs/gardena-smart-gateway-at91sam_defconfig
> +++ b/configs/gardena-smart-gateway-at91sam_defconfig
> @@ -17,6 +17,7 @@ CONFIG_DEBUG_UART_BASE=0xfffff200
>   CONFIG_DEBUG_UART_CLOCK=132000000
>   CONFIG_SMBIOS_PRODUCT_NAME="at91sam9x5ek"
>   CONFIG_DEBUG_UART=y
> +CONFIG_SPL_TEXT_BASE=0x300000
>   CONFIG_FIT=y
>   CONFIG_NAND_BOOT=y
>   CONFIG_BOOTDELAY=3
> @@ -24,7 +25,6 @@ CONFIG_USE_BOOTARGS=y
>   CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,768k(uboot)ro,256k(env_redundant),256k(env),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=6 root=ubi0:rootfs rw"
>   CONFIG_SYS_CONSOLE_IS_IN_ENV=y
>   CONFIG_SYS_CONSOLE_INFO_QUIET=y
> -CONFIG_SPL_TEXT_BASE=0x300000
>   CONFIG_SPL_SYS_MALLOC_SIMPLE=y
>   CONFIG_SPL_SEPARATE_BSS=y
>   # CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set
> @@ -66,7 +66,6 @@ CONFIG_AT91_GPIO=y
>   CONFIG_LED=y
>   CONFIG_LED_GPIO=y
>   # CONFIG_MMC is not set
> -# CONFIG_SYS_NAND_USE_FLASH_BBT is not set
>   CONFIG_NAND_ATMEL=y
>   CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y
>   CONFIG_DM_ETH=y
> 

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

* [U-Boot] [PATCH] arm: at91: gardena-smart-gateway-at91sam: Enable CONFIG_SYS_NAND_USE_FLASH_BBT
  2019-08-27  7:54 ` Eugen.Hristev at microchip.com
@ 2019-09-11 13:13   ` Stefan Roese
  2019-09-12  6:07     ` Eugen.Hristev at microchip.com
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Roese @ 2019-09-11 13:13 UTC (permalink / raw)
  To: u-boot

Hi Eugen,

On 27.08.19 09:54, Eugen.Hristev at microchip.com wrote:
> 
> 
> On 27.08.2019 09:14, Stefan Roese wrote:
> 
>>
>> This patch enables the BBT in NAND on the AT91SAM based GARDENA smart
>> Gateway. This is especially important, since the Linux driver also
>> enables this option and uses the BBT table pages. Without setting this
>> option, U-Boot will try to re-use these pages again (e.g. UBI).
>>
>> Signed-off-by: Stefan Roese <sr@denx.de>
>> Cc: Eugen Hristev <eugen.hristev@microchip.com>
>> Cc: Tom Rini <trini@konsulko.com>
>> ---
>> Eugen, I would advise you to double-check, if your AT91 based boards
>> using NAND also have this BBT option enabled in Linux. If yes, its
>> definitely necessary to enable it in U-Boot as well to match the same
>> layout.
> 
> Hi Stefan,
> 
> Thank you for the patch.
> I will look into it with help of Tudor and provide some feedback.

Do you have any updates on this?

Would it be possible to apply this patch for the upcoming release?

Thanks,
Stefan
  
> Eugen
> 
>>
>>    configs/gardena-smart-gateway-at91sam_defconfig | 3 +--
>>    1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/configs/gardena-smart-gateway-at91sam_defconfig b/configs/gardena-smart-gateway-at91sam_defconfig
>> index c495ba4612..4a2cc331a6 100644
>> --- a/configs/gardena-smart-gateway-at91sam_defconfig
>> +++ b/configs/gardena-smart-gateway-at91sam_defconfig
>> @@ -17,6 +17,7 @@ CONFIG_DEBUG_UART_BASE=0xfffff200
>>    CONFIG_DEBUG_UART_CLOCK=132000000
>>    CONFIG_SMBIOS_PRODUCT_NAME="at91sam9x5ek"
>>    CONFIG_DEBUG_UART=y
>> +CONFIG_SPL_TEXT_BASE=0x300000
>>    CONFIG_FIT=y
>>    CONFIG_NAND_BOOT=y
>>    CONFIG_BOOTDELAY=3
>> @@ -24,7 +25,6 @@ CONFIG_USE_BOOTARGS=y
>>    CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,768k(uboot)ro,256k(env_redundant),256k(env),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=6 root=ubi0:rootfs rw"
>>    CONFIG_SYS_CONSOLE_IS_IN_ENV=y
>>    CONFIG_SYS_CONSOLE_INFO_QUIET=y
>> -CONFIG_SPL_TEXT_BASE=0x300000
>>    CONFIG_SPL_SYS_MALLOC_SIMPLE=y
>>    CONFIG_SPL_SEPARATE_BSS=y
>>    # CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set
>> @@ -66,7 +66,6 @@ CONFIG_AT91_GPIO=y
>>    CONFIG_LED=y
>>    CONFIG_LED_GPIO=y
>>    # CONFIG_MMC is not set
>> -# CONFIG_SYS_NAND_USE_FLASH_BBT is not set
>>    CONFIG_NAND_ATMEL=y
>>    CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER=y
>>    CONFIG_DM_ETH=y
>>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot
> 

Viele Grüße,
Stefan

-- 
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 at denx.de

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

* [U-Boot] [PATCH] arm: at91: gardena-smart-gateway-at91sam: Enable CONFIG_SYS_NAND_USE_FLASH_BBT
  2019-09-11 13:13   ` Stefan Roese
@ 2019-09-12  6:07     ` Eugen.Hristev at microchip.com
  2019-09-12  9:00       ` Stefan Roese
  0 siblings, 1 reply; 7+ messages in thread
From: Eugen.Hristev at microchip.com @ 2019-09-12  6:07 UTC (permalink / raw)
  To: u-boot



On 11.09.2019 16:13, Stefan Roese wrote:

> 
> Hi Eugen,
> 
> On 27.08.19 09:54, Eugen.Hristev at microchip.com wrote:
>>
>>
>> On 27.08.2019 09:14, Stefan Roese wrote:
>>
>>>
>>> This patch enables the BBT in NAND on the AT91SAM based GARDENA smart
>>> Gateway. This is especially important, since the Linux driver also
>>> enables this option and uses the BBT table pages. Without setting this
>>> option, U-Boot will try to re-use these pages again (e.g. UBI).
>>>
>>> Signed-off-by: Stefan Roese <sr@denx.de>
>>> Cc: Eugen Hristev <eugen.hristev@microchip.com>
>>> Cc: Tom Rini <trini@konsulko.com>
>>> ---
>>> Eugen, I would advise you to double-check, if your AT91 based boards
>>> using NAND also have this BBT option enabled in Linux. If yes, its
>>> definitely necessary to enable it in U-Boot as well to match the same
>>> layout.
>>
>> Hi Stefan,
>>
>> Thank you for the patch.
>> I will look into it with help of Tudor and provide some feedback.
> 
> Do you have any updates on this?
> 
> Would it be possible to apply this patch for the upcoming release?
> 
> Thanks,
> Stefan
> 

Applied to u-boot-atmel/master

Will queue it before release in a PR. Have to check if more at91 boards 
need the same kind of patch.

Eugen

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

* [U-Boot] [PATCH] arm: at91: gardena-smart-gateway-at91sam: Enable CONFIG_SYS_NAND_USE_FLASH_BBT
  2019-09-12  6:07     ` Eugen.Hristev at microchip.com
@ 2019-09-12  9:00       ` Stefan Roese
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Roese @ 2019-09-12  9:00 UTC (permalink / raw)
  To: u-boot

Hi Eugen,

On 12.09.19 08:07, Eugen.Hristev at microchip.com wrote:
>>>> This patch enables the BBT in NAND on the AT91SAM based GARDENA smart
>>>> Gateway. This is especially important, since the Linux driver also
>>>> enables this option and uses the BBT table pages. Without setting this
>>>> option, U-Boot will try to re-use these pages again (e.g. UBI).
>>>>
>>>> Signed-off-by: Stefan Roese <sr@denx.de>
>>>> Cc: Eugen Hristev <eugen.hristev@microchip.com>
>>>> Cc: Tom Rini <trini@konsulko.com>
>>>> ---
>>>> Eugen, I would advise you to double-check, if your AT91 based boards
>>>> using NAND also have this BBT option enabled in Linux. If yes, its
>>>> definitely necessary to enable it in U-Boot as well to match the same
>>>> layout.
>>>
>>> Hi Stefan,
>>>
>>> Thank you for the patch.
>>> I will look into it with help of Tudor and provide some feedback.
>>
>> Do you have any updates on this?
>>
>> Would it be possible to apply this patch for the upcoming release?
>>
>> Thanks,
>> Stefan
>>
> 
> Applied to u-boot-atmel/master

Thanks.
  
> Will queue it before release in a PR. Have to check if more at91 boards
> need the same kind of patch.

As mentioned before, I'm pretty sure that most (all) at91 boards with
NAND need this patch.

Thanks,
Stefan

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

* [U-Boot] [PATCH] arm: at91: gardena-smart-gateway-at91sam: Enable CONFIG_SYS_NAND_USE_FLASH_BBT
  2019-08-27  6:14 [U-Boot] [PATCH] arm: at91: gardena-smart-gateway-at91sam: Enable CONFIG_SYS_NAND_USE_FLASH_BBT Stefan Roese
  2019-08-27  7:54 ` Eugen.Hristev at microchip.com
@ 2019-09-13 13:09 ` Alexander Dahl
  2019-09-13 13:15   ` Stefan Roese
  1 sibling, 1 reply; 7+ messages in thread
From: Alexander Dahl @ 2019-09-13 13:09 UTC (permalink / raw)
  To: u-boot

Hei hei,

Am Dienstag, 27. August 2019, 08:14:50 CEST schrieb Stefan Roese:
> This patch enables the BBT in NAND on the AT91SAM based GARDENA smart
> Gateway. This is especially important, since the Linux driver also
> enables this option and uses the BBT table pages. Without setting this
> option, U-Boot will try to re-use these pages again (e.g. UBI).

Does the Linux kernel driver use those unconditionally or is that a kernel 
config option? Which one? (Search in 5.2 kernel config for BBT is 
inconclusive.)

Greets
Alex

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

* [U-Boot] [PATCH] arm: at91: gardena-smart-gateway-at91sam: Enable CONFIG_SYS_NAND_USE_FLASH_BBT
  2019-09-13 13:09 ` Alexander Dahl
@ 2019-09-13 13:15   ` Stefan Roese
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Roese @ 2019-09-13 13:15 UTC (permalink / raw)
  To: u-boot

Hi Alex,

On 13.09.19 15:09, Alexander Dahl wrote:
> Am Dienstag, 27. August 2019, 08:14:50 CEST schrieb Stefan Roese:
>> This patch enables the BBT in NAND on the AT91SAM based GARDENA smart
>> Gateway. This is especially important, since the Linux driver also
>> enables this option and uses the BBT table pages. Without setting this
>> option, U-Boot will try to re-use these pages again (e.g. UBI).
> 
> Does the Linux kernel driver use those unconditionally or is that a kernel
> config option? Which one? (Search in 5.2 kernel config for BBT is
> inconclusive.)

Linux uses the DT property "nand-on-flash-bbt" for this decision.
But please be aware - this is only for raw NAND and not SPI NAND
(IIRC).

And yes, we should definitely move to this DT property instead of
the Kconfig symbol in U-Boot as well. To automatically match the
configuration of such boards in U-Boot and Linux. But such a change
it too intrusive at this time of release cycle.

Thanks,
Stefan

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

end of thread, other threads:[~2019-09-13 13:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-27  6:14 [U-Boot] [PATCH] arm: at91: gardena-smart-gateway-at91sam: Enable CONFIG_SYS_NAND_USE_FLASH_BBT Stefan Roese
2019-08-27  7:54 ` Eugen.Hristev at microchip.com
2019-09-11 13:13   ` Stefan Roese
2019-09-12  6:07     ` Eugen.Hristev at microchip.com
2019-09-12  9:00       ` Stefan Roese
2019-09-13 13:09 ` Alexander Dahl
2019-09-13 13:15   ` Stefan Roese

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.