arm: at91: Makefile: Compile lowlevel_init only when really necessary
Subsystems (5)
PATCH v2 1/12 arm: at91: Makefile: Compile lowlevel_init only when really necessary
Make sure that lowlevel_init is not compiled when CONFIG_SKIP_LOWLEVEL_INIT_ONLY is configured.
---
v2:
- No change
arch/arm/mach-at91/arm926ejs/Makefile | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/mach-at91/arm926ejs/Makefile +2 -0
@@ -24,8 +24,10 @@ obj-y += timer.o endif ifndef CONFIG_SKIP_LOWLEVEL_INIT +ifndef CONFIG_SKIP_LOWLEVEL_INIT_ONLY obj-y += lowlevel_init.o endif +endif ifdef CONFIG_$(SPL_)SYS_THUMB_BUILD ifndef CONFIG_HAS_THUMB2
Signature · 1 line
2.21.0
PATCH v2 2/12 arm: at91: spl_at91.c: Call spl_early_init() if OF_CONTROL is enabled
This patch adds a call to spl_early_init() to board_init_f() which is needed when CONFIG_SPL_OF_CONTROL is configured. This is necessary for the early SPL setup including the DTB setup for later usage.
Please note that this call might also be needed for non SPL_OF_CONTROL board, like the smartweb target. But smartweb fails to build with this call because its binary grows too big. So I disabled it for these kind of targets for now.
---
v2:
- No change
arch/arm/mach-at91/spl_at91.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm/mach-at91/spl_at91.c +10 -0
@@ -75,6 +75,16 @@ void __weak spl_board_init(void)void board_init_f (ulong dummy) { +#if CONFIG_IS_ENABLED (OF_CONTROL ) +int ret; + + ret =spl_early_init (); +if (ret) { +debug ("spl_early_init() failed: %d\n" , ret); +hang (); + } +#endif +lowlevel_clock_init ();#if !defined(CONFIG_WDT_AT91 )at91_disable_wdt ();
Signature · 1 line
2.21.0
PATCH v2 2/12 arm: at91: spl_at91.c: Call spl_early_init() if OF_CONTROL is enabled
Hello Stefan,
Am 26.03.2019 um 13:16 schrieb Stefan Roese:
Quoted 13 lines
This patch adds a call to
spl_early_init()toboard_init_f()which is needed whenCONFIG_SPL_OF_CONTROLis configured. This is necessary for the early SPL setup including the DTB setup for later usage.Please note that this call might also be needed for non
SPL_OF_CONTROLboard, like the smartweb target. But smartweb fails to build with this call because its binary grows too big. So I disabled it for these kind of targets for now.Signed-off-by Stefan Roese <[email protected]>Cc Heiko Schocher <[email protected]>Cc Andreas Bießmann <[email protected]>Cc Eugen Hristev <[email protected]>
Quoted 6 lines
---
v2:
- No changearch/arm/mach-at91/spl_at91.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
Tested on the taurus board:
Yes ... smartweb board ... The problem is, I have there only 4k for SPL ... no chance for DM nor DTS ...
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de
PATCH v2 3/12 serial: atmel_usart: Use fixed clock value in SPL version with DM_SERIAL
In reply to Stefan RoeseThis patch adds an alterative SPL version of atmel_serial_enable_clk(). This enables the usage of this driver without full clock support (in drivers and DT nodes). This saves some space in the SPL image.
Please note that this fixed clock support is only added to the SPL code in the DM_SERIAL part of this file. All boards not using SPL & DM_SERIAL should not be affected.
If some boards need a different clock than the one provided with this patch, then support for this needs to be added later.
---
v2:
- Reword patch subject and commit text to make it more clear, that this change only affects ports with SPL and DM_SERIAL enabled
drivers/serial/atmel_usart.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/serial/atmel_usart.c +12 -0
@@ -218,6 +218,17 @@ static const struct dm_serial_ops atmel_serial_ops = { .setbrg = atmel_serial_setbrg, }; +#ifdef CONFIG_SPL_BUILD +static int atmel_serial_enable_clk (struct udevice *dev) +{ +struct atmel_serial_priv *priv =dev_get_priv (dev); + +/* Use fixed clock value in SPL */ + priv->usart_clk_rate =132096000 ; + +return 0 ; +} +#else static int atmel_serial_enable_clk (struct udevice *dev) {struct atmel_serial_priv *priv =dev_get_priv (dev);
@@ -245,6 +256,7 @@ static int atmel_serial_enable_clk(struct udevice *dev) return 0; } +#endif static int atmel_serial_probe (struct udevice *dev) {
Signature · 1 line
2.21.0
PATCH v2 3/12 serial: atmel_usart: Use fixed clock value in SPL version with DM_SERIAL
Quoted 7 lines · Stefan Roese
This patch adds an alterative SPL version of
atmel_serial_enable_clk(). This enables the usage of this driver without full clock support (in drivers and DT nodes). This saves some space in the SPL image.Please note that this fixed clock support is only added to the SPL code in the
DM_SERIALpart of this file. All boards not using SPL &DM_SERIALshould not be affected.
Hello Stefan,
For example, sama5d2_xplained_mmc_defconfig has DM_SERIAL and SPL. This means it's affected ? If so, then it's not OK to take it as-is.
And another question, is the rest of your patch series OK if this patch is missing ? Or it's any dependency on this ? the SPL for Gardena will not fit in the SRAM without this patch ?
Eugen
Quoted 47 lines
If some boards need a different clock than the one provided with this patch, then support for this needs to be added later.
Signed-off-by Stefan Roese <[email protected]>Cc Heiko Schocher <[email protected]>Cc Andreas Bießmann <[email protected]>Cc Eugen Hristev <[email protected]>---
v2:
- Reword patch subject and commit text to make it more clear, that this change only affects ports with SPL andDM_SERIALenableddrivers/serial/atmel_usart.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)drivers/serial/atmel_usart.c +12
-0@@ -218,6 +218,17 @@ static const struct dm_serial_ops atmel_serial_ops = { .setbrg = atmel_serial_setbrg, }; +#ifdef CONFIG_SPL_BUILD +static int atmel_serial_enable_clk (struct udevice *dev) +{ +struct atmel_serial_priv *priv =dev_get_priv (dev); + +/* Use fixed clock value in SPL */ + priv->usart_clk_rate =132096000 ; + +return 0 ; +} +#else static int atmel_serial_enable_clk (struct udevice *dev) {struct atmel_serial_priv *priv =dev_get_priv (dev);@@ -245,6 +256,7 @@ static int atmel_serial_enable_clk(struct udevice *dev) return 0; } +#endif static int atmel_serial_probe (struct udevice *dev) {
PATCH v2 3/12 serial: atmel_usart: Use fixed clock value in SPL version with DM_SERIAL
Quoted 8 lines · Eugen.Hristev at microchip.com
Quoted 4 lines · Stefan Roese
This patch adds an alterative SPL version of
atmel_serial_enable_clk(). This enables the usage of this driver without full clock support (in drivers and DT nodes). This saves some space in the SPL image.
Quoted 7 lines
Quoted 3 lines
Please note that this fixed clock support is only added to the SPL code in the
DM_SERIALpart of this file. All boards not using SPL &DM_SERIALshould not be affected.Hello Stefan,
For example,
sama5d2_xplained_mmc_defconfighasDM_SERIALand SPL.
Ah, I was not aware of that. It also has CONFIG_SPL_CLK enabled, that's why I didn't spot it. I should make sure that in such cases the original atmel_serial_enable_clk() function is used.
BTW: I did not enable CONFIG_SPL_CLK for size reasons of the SPL.
Quoted 1 line
This means it's affected ? If so, then it's not OK to take it as-is.
Sure, this is not good, as mentioned above. I'll re-work this path to only enable the new fixed clock value for !SPL_CLK.
Quoted 3 lines
And another question, is the rest of your patch series OK if this patch is missing ? Or it's any dependency on this ? the SPL for Gardena will not fit in the SRAM without this patch ?
Without this patch, building the gardena board will break (IIRC), most likely because the CLK stuff is missing. And enabling SPL_CLK will result in a too big image.
Thanks,
Stefan
PATCH v2 3/12 serial: atmel_usart: Use fixed clock value in SPL version with DM_SERIAL
In reply to Stefan RoeseHello Stefan,
Am 26.03.2019 um 13:16 schrieb Stefan Roese:
Quoted 28 lines
This patch adds an alterative SPL version of
atmel_serial_enable_clk(). This enables the usage of this driver without full clock support (in drivers and DT nodes). This saves some space in the SPL image.Please note that this fixed clock support is only added to the SPL code in the
DM_SERIALpart of this file. All boards not using SPL &DM_SERIALshould not be affected.If some boards need a different clock than the one provided with this patch, then support for this needs to be added later.
Signed-off-by Stefan Roese <[email protected]>Cc Heiko Schocher <[email protected]>Cc Andreas Bießmann <[email protected]>Cc Eugen Hristev <[email protected]>---
v2:
- Reword patch subject and commit text to make it more clear, that this change only affects ports with SPL andDM_SERIALenableddrivers/serial/atmel_usart.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)drivers/serial/atmel_usart.c +0
-0
drivers/serial/atmel_usart.c static const struct dm_serial_ops atmel_serial_ops = { · line 227
Quoted 10 lines
drivers/serial/atmel_usart.c +7
-0@@ -218,6 +218,17 @@ static const struct dm_serial_ops atmel_serial_ops = { .setbrg = atmel_serial_setbrg, }; +#ifdef CONFIG_SPL_BUILD +static int atmel_serial_enable_clk (struct udevice *dev) +{ +struct atmel_serial_priv *priv =dev_get_priv (dev); + +/* Use fixed clock value in SPL */ + priv->usart_clk_rate =132096000 ;
Hmm... could we have this value immediately configurable?
Beside of this nitpick:
Tested on the taurus board:
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de
PATCH v2 3/12 serial: atmel_usart: Use fixed clock value in SPL version with DM_SERIAL
Quoted 34 lines · Heiko Schocher
Hello Stefan,
Am 26.03.2019 um 13:16 schrieb Stefan Roese:
Quoted 31 lines
This patch adds an alterative SPL version of
atmel_serial_enable_clk(). This enables the usage of this driver without full clock support (in drivers and DT nodes). This saves some space in the SPL image.Please note that this fixed clock support is only added to the SPL code in the
DM_SERIALpart of this file. All boards not using SPL &DM_SERIALshould not be affected.If some boards need a different clock than the one provided with this patch, then support for this needs to be added later.
Signed-off-by Stefan Roese <[email protected]>Cc Heiko Schocher <[email protected]>Cc Andreas Bießmann <[email protected]>Cc Eugen Hristev <[email protected]>---
v2:
- Reword patch subject and commit text to make it more clear, that this change only affects ports with SPL andDM_SERIALenableddrivers/serial/atmel_usart.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)drivers/serial/atmel_usart.c +0
-0@@ -218,6 +218,17 @@ static const struct dm_serial_ops atmel_serial_ops = { .setbrg = atmel_serial_setbrg, };
Quoted 9 lines
drivers/serial/atmel_usart.c static const struct dm_serial_ops atmel_serial_ops = { · line 227
Quoted 7 lines
drivers/serial/atmel_usart.c +7
-0+#ifdef CONFIG_SPL_BUILD +static int atmel_serial_enable_clk (struct udevice *dev) +{ +struct atmel_serial_priv *priv =dev_get_priv (dev); + +/* Use fixed clock value in SPL */ + priv->usart_clk_rate =132096000 ;Hmm... could we have this value immediately configurable?
Sure. I'll add the CONFIG_SPL_UART_CLOCK as discussed before with Eugen.
Thanks,
Stefan
Quoted 9 lines
Beside of this nitpick:
Reviewed-by Heiko Schocher <[email protected]>Tested on the taurus board:
Tested-by Heiko Schocher <[email protected]>bye,
Heiko
Viele Grüße,
Stefan
Signature · 3 lines
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
PATCH v2 4/12 watchdog: Handle SPL build with watchdog disabled
In reply to Stefan RoeseThis patch adds some checks, so that the watchdog can be enabled in main U-Boot proper but can be disabled in SPL.
This will be used by some AT91SAM based boards, which might enable the watchdog in the main U-Boot proper and not in SPL. It will be enabled in SPL by default there, so no need to configure it there. This approach saves some space in SPL.
---
v2:
- No change
include/watchdog.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
include/watchdog.h +8 -2
@@ -51,9 +51,15 @@ int init_func_watchdog_reset(void);#if defined(__ASSEMBLY__)#define WATCHDOG_RESET bl watchdog_reset#else -extern void watchdog_reset (void ); +/* Don't require the watchdog to be enabled in SPL */ +#if defined(CONFIG_SPL_BUILD ) && \ + !defined(CONFIG_SPL_WATCHDOG_SUPPORT ) +#define WATCHDOG_RESET () {} +#else +extern void watchdog_reset (void ); -#define WATCHDOG_RESET watchdog_reset +#define WATCHDOG_RESET watchdog_reset +#endif #endif #else /*
Signature · 1 line
2.21.0
PATCH v2 4/12 watchdog: Handle SPL build with watchdog disabled
Hello Stefan,
Am 26.03.2019 um 13:16 schrieb Stefan Roese:
Quoted 12 lines
This patch adds some checks, so that the watchdog can be enabled in main U-Boot proper but can be disabled in SPL.
This will be used by some AT91SAM based boards, which might enable the watchdog in the main U-Boot proper and not in SPL. It will be enabled in SPL by default there, so no need to configure it there. This approach saves some space in SPL.
Signed-off-by Stefan Roese <[email protected]>Cc Heiko Schocher <[email protected]>Cc Andreas Bießmann <[email protected]>Cc Eugen Hristev <[email protected]>
Quoted 6 lines
---
v2:
- No changeinclude/watchdog.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
Tested on the taurus board:
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de
PATCH v2 5/12 watchdog: at91sam9_wdt: Fix WDT setup in at91_wdt_start()
In reply to Stefan RoeseThis patch fixes the timer register setup in at91_wdt_start() to correctly configure the register again. The input timeout value is now in milli-seconds instead of seconds with the new watchdog API. Make sure to take this into account and only use a max timeout value of 16 seconds as appropriate for this SoC.
Also the check against a lower timeout value than 0 is removed. This check makes no sense, as the timeout value is unsigned.
---
v2:
- No change
drivers/watchdog/at91sam9_wdt.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-)
drivers/watchdog/at91sam9_wdt.c +14 -12
@@ -17,6 +17,7 @@#include <asm/io.h> #include <asm/arch/at91_wdt.h> #include <common.h> +#include <div64.h> #include <dm.h> #include <errno.h> #include <wdt.h>
@@ -31,27 +32,30 @@ DECLARE_GLOBAL_DATA_PTR;#define WDT_SEC2TICKS (s) (((s) << 8) - 1)/* Hardware timeout in seconds */ -#define WDT_MAX_TIMEOUT 16 -#define WDT_MIN_TIMEOUT 0 -#define WDT_DEFAULT_TIMEOUT 2 +#define WDT_MAX_TIMEOUT 16 +#define WDT_DEFAULT_TIMEOUT 2struct at91_wdt_priv {void __iomem *regs; -u32 regval; -u32 timeout; +u32 regval; +u32 timeout; };/* * Set the watchdog time interval in 1/256Hz (write-once) * Counter is 12 bit. */ -static int at91_wdt_start (struct udevice *dev,u64 timeout_s,ulong flags) +static int at91_wdt_start (struct udevice *dev,u64 timeout_ms,ulong flags) {struct at91_wdt_priv *priv =dev_get_priv (dev); -u32 timeout =WDT_SEC2TICKS (timeout_s); +u64 timeout; +u32 ticks; -if (timeout_s >WDT_MAX_TIMEOUT || timeout_s <WDT_MIN_TIMEOUT ) - timeout = priv->timeout; +/* Calculate timeout in seconds and the resulting ticks */ + timeout = timeout_ms; +do_div (timeout,1000 ); + timeout =min_t (u64, timeout,WDT_MAX_TIMEOUT ); + ticks =WDT_SEC2TICKS (timeout);/* Check if disabled */ if (readl (priv->regs +AT91_WDT_MR ) &AT91_WDT_MR_WDDIS ) {
@@ -65,12 +69,10 @@ static int at91_wdt_start(struct udevice *dev, u64 timeout_s, ulong flags)* Since WDV is a 12-bit counter, the maximum period is * 4096 / 256 = 16 seconds. */ - priv->regval =AT91_WDT_MR_WDRSTEN /* causes watchdog reset */ |AT91_WDT_MR_WDDBGHLT /* disabled in debug mode */ |AT91_WDT_MR_WDD (0xfff )/* restart at any time */ - |AT91_WDT_MR_WDV (timeout);/* timer value */ - + |AT91_WDT_MR_WDV (ticks);/* timer value */ writel (priv->regval, priv->regs +AT91_WDT_MR );return 0 ;
Signature · 1 line
2.21.0
PATCH v2 5/12 watchdog: at91sam9_wdt: Fix WDT setup in at91_wdt_start()
Hello Stefan,
Am 26.03.2019 um 13:16 schrieb Stefan Roese:
Quoted 14 lines
This patch fixes the timer register setup in
at91_wdt_start()to correctly configure the register again. The input timeout value is now in milli-seconds instead of seconds with the new watchdog API. Make sure to take this into account and only use a max timeout value of 16 seconds as appropriate for this SoC.Also the check against a lower timeout value than 0 is removed. This check makes no sense, as the timeout value is unsigned.
Signed-off-by Stefan Roese <[email protected]>Reported-by Heiko Schocher <[email protected]>Cc Heiko Schocher <[email protected]>Cc Andreas Bießmann <[email protected]>Cc Eugen Hristev <[email protected]>
Quoted 6 lines
---
v2:
- No changedrivers/watchdog/at91sam9_wdt.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-)
Thanks!
Tested on the taurus board:
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de
PATCH v2 6/12 arm: at91: Enable watchdog support
In reply to Stefan RoeseThis patch enables and starts the watchdog on the AT91 platform if configured. Currently the WD timeout is configured to 16 seconds, which is the longest value for this timer.
---
v2:
- Remove #ifdef to enable compilation also in SPL version
arch/arm/mach-at91/clock.c | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+)
arch/arm/mach-at91/clock.c +39 -0
@@ -5,12 +5,16 @@*/ #include <common.h> +#include <dm.h> +#include <wdt.h> #include <asm/io.h> #include <asm/arch/hardware.h> #include <asm/arch/at91_pmc.h> #define EN_UPLL_TIMEOUT 500 +static struct udevice *watchdog_dev; +void at91_periph_clk_enable (int id) {struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC ;
@@ -118,3 +122,38 @@ void at91_pllicpr_init(u32 icpr)writel (icpr, &pmc->pllicpr); } + +/* Called by macro WATCHDOG_RESET */ +void watchdog_reset (void ) +{ +static ulong next_reset; +ulong now; + +if (!watchdog_dev) +return ; + + now =get_timer (0 ); + +/* Do not reset the watchdog too often */ +if (now > next_reset) { + next_reset = now +1000 ;/* reset every 1000ms */ +wdt_reset (watchdog_dev); + } +} + +int arch_misc_init (void ) +{ +/* Init watchdog */ +if (uclass_get_device_by_seq (UCLASS_WDT ,0 , &watchdog_dev)) { +debug ("Watchdog: Not found by seq!\n" ); +if (uclass_get_device (UCLASS_WDT ,0 , &watchdog_dev)) { +puts ("Watchdog: Not found!\n" ); +return 0 ; + } + } + +wdt_start (watchdog_dev,16000 ,0 );/* 16 seconds is max */ +printf ("Watchdog: Started\n" ); + +return 0 ; +}
Signature · 1 line
2.21.0
PATCH v2 6/12 arm: at91: Enable watchdog support
Hello Stefan,
Am 26.03.2019 um 13:16 schrieb Stefan Roese:
Quoted 22 lines
This patch enables and starts the watchdog on the AT91 platform if configured. Currently the WD timeout is configured to 16 seconds, which is the longest value for this timer.
Signed-off-by Stefan Roese <[email protected]>Cc Heiko Schocher <[email protected]>Cc Andreas Bießmann <[email protected]>Cc Eugen Hristev <[email protected]>---
v2:
- Remove #ifdef to enable compilation also in SPL versionarch/arm/mach-at91/clock.c | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+)arch/arm/mach-at91/clock.c +0
-0@@ -5,12 +5,16 @@*/
arch/arm/mach-at91/clock.c line 16
Quoted 10 lines
arch/arm/mach-at91/clock.c +3
-0#include <common.h> +#include <dm.h> +#include <wdt.h> #include <asm/io.h> #include <asm/arch/hardware.h> #include <asm/arch/at91_pmc.h> #define EN_UPLL_TIMEOUT 500 +static struct udevice *watchdog_dev;
This does not work for me on the taurus Board!
This variable sits in the BSS, which is not set to 0 before U-Boot is relocated.
On the taurus board I see:
System.map:
21040930 b next_reset.9546
21040934 b watchdog_dev
21040938 b data.8182
hexudmp u-boot.bin:
(TEXT_BASE 0x21000000)
00040920 00 00 00 00 00 00 00 00 01 00 00 00 20 00 00 21 |............ ..!| 00040930 17 00 00 00 24 00 00 21 17 00 00 00 28 00 00 21 |....$..!....(..!| 00040940 17 00 00 00 2c 00 00 21 17 00 00 00 30 00 00 21 |....,..!....0..!|
And I see before relocation 0x21000024 for *watchdog_dev ... which leads in failure of the check "if (!watchdog_dev)" and cpu accesses wrong addresses in the end ...
As discussed offline moving watchdog_dev to data section helps:
arch/arm/mach-at91/clock.c +1 -1
@@ -13,7 +13,7 @@#define EN_UPLL_TIMEOUT 500 -static struct udevice *watchdog_dev; +static struct udevice *watchdog_dev __attribute__((section(".data"))) = NULL;void at91_periph_clk_enable (int id) {
The big question is, how many places do we have in code, where we access BSS before relocation ?
May we better clear BSS very early (at last may possible on arm)?
Quoted 29 lines
arch/arm/mach-at91/clock.c +22
-0+void at91_periph_clk_enable (int id) {struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC ;@@ -118,3 +122,38 @@ void at91_pllicpr_init(u32 icpr)writel (icpr, &pmc->pllicpr); } + +/* Called by macro WATCHDOG_RESET */ +void watchdog_reset (void ) +{ +static ulong next_reset; +ulong now; + +if (!watchdog_dev) +return ; + + now =get_timer (0 ); + +/* Do not reset the watchdog too often */ +if (now > next_reset) { + next_reset = now +1000 ;/* reset every 1000ms */ +wdt_reset (watchdog_dev); + } +} + +int arch_misc_init (void ) +{
arch/arm/mach-at91/clock.c void at91_pllicpr_init(u32 icpr) · line 155
Quoted 10 lines
arch/arm/mach-at91/clock.c +10
-0+/* Init watchdog */ +if (uclass_get_device_by_seq (UCLASS_WDT ,0 , &watchdog_dev)) { +debug ("Watchdog: Not found by seq!\n" ); +if (uclass_get_device (UCLASS_WDT ,0 , &watchdog_dev)) { +puts ("Watchdog: Not found!\n" ); +return 0 ; + } + } + +wdt_start (watchdog_dev,16000 ,0 );/* 16 seconds is max */
Here we have now a fix wdt timeout for all at91 based boards ...
We should use the value from DTS.
Beside of this, wdt is now running fine again on the taurus board!
Thanks for this work.
arch/arm/mach-at91/clock.c void at91_pllicpr_init(u32 icpr) · line 159
Quoted 5 lines
arch/arm/mach-at91/clock.c +4
-0+printf ("Watchdog: Started\n" ); + +return 0 ; +}
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de
PATCH v2 6/12 arm: at91: Enable watchdog support
Dear Heiko,
Quoted 3 lines · In message <[email protected]> you wrote:
The big question is, how many places do we have in code, where we access BSS before relocation ?
Hopefully none.
Quoted 1 line
May we better clear BSS very early (at last may possible on arm)?
You cannot. There is no storage allocated for BSS - this happens only during relocation, and then it also gets zeroed.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de The amount of time between slipping on the peel and landing on the pavement is precisely 1 bananosecond.
PATCH v2 6/12 arm: at91: Enable watchdog support
Hi Wolfgang,
Quoted 11 lines · Wolfgang Denk
Quoted 3 lines · In message <[email protected]> you wrote:
The big question is, how many places do we have in code, where we access BSS before relocation ?
Hopefully none.
Quoted 1 line
May we better clear BSS very early (at last may possible on arm)?
You cannot. There is no storage allocated for BSS - this happens only during relocation, and then it also gets zeroed.
This is not 100% correct for all platforms. On some targets, e.g. where the DDR is initialized by SPL, the BSS location before relocation is already a valid address space in DDR in the main U-Boot proper. AFAICT, the BSS *could* already be used before relocation in these cases. Here the BBS could be cleared very early and relocated later with the code etc. No clearing in the relocation stage necessary.
But since this is a special case, it makes no real sense to implement such an "early BSS" strategy into U-Boot, as other platforms will always exist, where the BSS is really only available after relocation (as you mentioned above).
Thanks,
Stefan
PATCH v2 6/12 arm: at91: Enable watchdog support
In reply to Wolfgang DenkHello Wolfgang,
added Simon Goldschmidt to cc, as he just posted a patchset, which exactly wants to introduce "clear BSS before relocation" ...
Am 29.03.2019 um 13:06 schrieb Wolfgang Denk:
Quoted 8 lines
Dear Heiko,
Quoted 3 lines · In message <[email protected]> you wrote:
The big question is, how many places do we have in code, where we access BSS before relocation ?
Hopefully none.
Hmm... Hopefully, but I think, not easy to detect when reviewing patches ... I just stumbeld over this issue in this patch from Stefan, because I could try it on a hardware, and my hardware doesn;t boot with this patch...
Theoretically you must check all vars, which are in BSS segment, if they are used before relocation ... and drop an error, no idea yet, how to detect this at compile time ...
Quoted 4 lines
Quoted 1 line
May we better clear BSS very early (at last may possible on arm)?
You cannot. There is no storage allocated for BSS - this happens only during relocation, and then it also gets zeroed.
Yes, valid for the boards which have no SPL ... but if U-Boot is loaded with SPL into RAM, BSS is writeable. But as this is not valid for all boards, we cannot do this!
Just see the patches from Simon:
https://lists.denx.de/pipermail/u-boot/2019-March/361452.html
http://patchwork.ozlabs.org/patch/1067363/
Same problem ...
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de
PATCH v2 6/12 arm: at91: Enable watchdog support
Quoted 34 lines · Heiko Schocher
Hello Wolfgang,
added Simon Goldschmidt to cc, as he just posted a patchset, which exactly wants to introduce "clear BSS before relocation" ...
Am 29.03.2019 um 13:06 schrieb Wolfgang Denk:
Quoted 8 lines
Dear Heiko,
Quoted 3 lines · In message <[email protected]> you wrote:
The big question is, how many places do we have in code, where we access BSS before relocation ?
Hopefully none.
Hmm... Hopefully, but I think, not easy to detect when reviewing patches ... I just stumbeld over this issue in this patch from Stefan, because I could try it on a hardware, and my hardware doesn;t boot with this patch...
Theoretically you must check all vars, which are in BSS segment, if they are used before relocation ... and drop an error, no idea yet, how to detect this at compile time ...
Quoted 4 lines
Quoted 1 line
May we better clear BSS very early (at last may possible on arm)?
You cannot. There is no storage allocated for BSS - this happens only during relocation, and then it also gets zeroed.
Yes, valid for the boards which have no SPL ... but if U-Boot is loaded with SPL into RAM, BSS is writeable. But as this is not valid for all boards, we cannot do this!
Quoted 7 lines
Just see the patches from Simon:
https://lists.denx.de/pipermail/u-boot/2019-March/361452.html
http://patchwork.ozlabs.org/patch/1067363/
Same problem ...
OK, so the word stands "BSS is not used before relocation". Like already mentioned, we don't have a check that tells us when this rule is violated. Being like
that, I would be surprised if such a check (if added) would yield zero failures...
However, I'm not sure what "relocation" means for SPL boards where the SPL is loaded into SRAM (as is the case on many ARM boards at least). The correct wording here might be "RAM available" or something like that, instead of "relocation".
With this definition, a new question arises: how can I be forced to provide a malloc
implementation in "pre-reloc" phase (for pre-reloc driver model, e.g. drivers for serial
and SDRAM) when people keep telling me bss might not even be available? That sounds a bit confusing to me.
Regards,
Simon
PATCH v2 6/12 arm: at91: Enable watchdog support
Hello Simon,
Am 01.04.2019 um 11:13 schrieb Simon Goldschmidt:
Quoted 41 lines · Heiko Schocher
Quoted 40 lines
Hello Wolfgang,
added Simon Goldschmidt to cc, as he just posted a patchset, which exactly wants to introduce "clear BSS before relocation" ...
Am 29.03.2019 um 13:06 schrieb Wolfgang Denk:
Quoted 8 lines
Dear Heiko,
Quoted 3 lines · In message <[email protected]> you wrote:
The big question is, how many places do we have in code, where we access BSS before relocation ?
Hopefully none.
Hmm... Hopefully, but I think, not easy to detect when reviewing patches ... I just stumbeld over this issue in this patch from Stefan, because I could try it on a hardware, and my hardware doesn;t boot with this patch...
Theoretically you must check all vars, which are in BSS segment, if they are used before relocation ... and drop an error, no idea yet, how to detect this at compile time ...
Quoted 4 lines
Quoted 1 line
May we better clear BSS very early (at last may possible on arm)?
You cannot. There is no storage allocated for BSS - this happens only during relocation, and then it also gets zeroed.
Yes, valid for the boards which have no SPL ... but if U-Boot is loaded with SPL into RAM, BSS is writeable. But as this is not valid for all boards, we cannot do this!
Just see the patches from Simon:
https://lists.denx.de/pipermail/u-boot/2019-March/361452.html
Quoted 7 lines
Quoted 1 line
Same problem ...
OK, so the word stands "BSS is not used before relocation". Like already mentioned, we don't have a check that tells us when this rule is violated. Being like
that, I would be surprised if such a check (if added) would yield zero failures...
Hmm... I hope not.
Quoted 4 lines
However, I'm not sure what "relocation" means for SPL boards where the SPL is loaded into SRAM (as is the case on many ARM boards at least). The correct wording here might be "RAM available" or something like that, instead of "relocation".
In case of SPL ... there is no code relocation and "after relocation" is equivalent to "RAM available".
Quoted 6 lines
With this definition, a new question arises: how can I be forced to provide a malloc
implementation in "pre-reloc" phase (for pre-reloc driver model, e.g. drivers for serial
and SDRAM) when people keep telling me bss might not even be available? That sounds a bit confusing to me.
But Simon Glass suggestion to put all variables dlmalloc needs into a struct and put a pointer into GD should solve this problem, or?
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de
PATCH v2 7/12 arm: at91: arm926ejs/u-boot-spl.lds: Add _image_binary_end to SPL lds
In reply to Stefan RoeseThis patch adds _image_binary_end to the SPL linker script. This will be used be the upcoming GARDENA AT91SAM based platform, which uses DT in SPL and configures CONFIGURE_SPL_SEPARATE_BSS.
---
v2:
- No change
arch/arm/mach-at91/arm926ejs/u-boot-spl.lds | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/mach-at91/arm926ejs/u-boot-spl.lds +2 -0
@@ -39,6 +39,8 @@ SECTIONS *(.__end) } >.sram + _image_binary_end = .; + .bss : { . = ALIGN(4);
Signature · 1 line
2.21.0
PATCH v2 7/12 arm: at91: arm926ejs/u-boot-spl.lds: Add _image_binary_end to SPL lds
Hello Stefan,
Am 26.03.2019 um 13:16 schrieb Stefan Roese:
Quoted 8 lines
This patch adds
_image_binary_endto the SPL linker script. This will be used be the upcoming GARDENA AT91SAM based platform, which uses DT in SPL and configuresCONFIGURE_SPL_SEPARATE_BSS.Signed-off-by Stefan Roese <[email protected]>Cc Heiko Schocher <[email protected]>Cc Andreas Bießmann <[email protected]>Cc Eugen Hristev <[email protected]>
Quoted 6 lines
---
v2:
- No changearch/arm/mach-at91/arm926ejs/u-boot-spl.lds | 2 ++ 1 file changed, 2 insertions(+)
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de
PATCH v2 8/12 Makefile.spl: Move generated AT91SAM NAND image boot.bin to spl directory
In reply to Stefan RoeseThis patch moves the AT91SAM NAND booting SPL image "boot.bin" which includes the ECC values from the root directory into the spl directory, where all SPL related images are located.
---
v2:
- No change
scripts/Makefile.spl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
scripts/Makefile.spl +3 -3
@@ -179,10 +179,10 @@ MKIMAGEFLAGS_boot.bin = -T atmelimage ifeq ($(CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER),y) MKIMAGEFLAGS_boot.bin += -n $(shell $(obj)/../tools/atmel_pmecc_params) -boot.bin: $(obj)/../tools/atmel_pmecc_params +$(obj)/boot.bin: $(obj)/../tools/atmel_pmecc_params endif -boot.bin: $(obj)/u-boot-spl.bin FORCE +$(obj)/boot.bin: $(obj)/u-boot-spl.bin FORCE $(call if_changed,mkimage) else ifdef CONFIG_ARCH_ZYNQ
@@ -225,7 +225,7 @@ endif endif ifeq ($(CONFIG_SYS_SOC),"at91") -ALL-y += boot.bin +ALL-y += $(obj)/boot.bin endif ALL-$(CONFIG_SPL_X86_16BIT_INIT) += $(obj)/u-boot-x86-16bit-spl.bin
Signature · 1 line
2.21.0
PATCH v2 8/12 Makefile.spl: Move generated AT91SAM NAND image boot.bin to spl directory
Hello Stefan,
Am 26.03.2019 um 13:16 schrieb Stefan Roese:
Quoted 8 lines
This patch moves the AT91SAM NAND booting SPL image "boot.bin" which includes the ECC values from the root directory into the spl directory, where all SPL related images are located.
Signed-off-by Stefan Roese <[email protected]>Cc Heiko Schocher <[email protected]>Cc Andreas Bießmann <[email protected]>Cc Eugen Hristev <[email protected]>
Quoted 6 lines
---
v2:
- No changescripts/Makefile.spl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Tested on the taurus board:
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de
PATCH v2 9/12 Makefile: Add Kconfig option CONFIG_SPL_IMAGE to select the SPL binary
In reply to Stefan RoeseThis patch adds the CONFIG_SPL_IMAGE option to select the SPL image that shall be used to generate the combined SPL + U-Boot image. The default value is the current value "spl/u-boot-spl.bin".
This patch also sets CONFIG_SPL_IMAGE to "spl/boot.bin" for AT91 targets which use SPL NAND support (boot from NAND).
---
v2:
- No change
Kconfig | 10 ++++++++++ Makefile | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-)
Kconfig +10 -0
@@ -224,6 +224,15 @@ config BUILD_ROM which are not shipped in the U-Boot source tree. Please, see doc/README.x86 for details. +config SPL_IMAGE + string "SPL image filename that is generated" + default "spl/boot.bin" if ARCH_AT91 && SPL_NAND_SUPPORT + default "spl/u-boot-spl.bin" + help + The SPL image filename that is generated by the build process. + This image might be used to generated a combined image with + SPL and main U-Boot proper as well. + config BUILD_TARGET string "Build target special images" default "u-boot-with-spl.sfp" if TARGET_SOCFPGA_ARRIA10
@@ -232,6 +241,7 @@ config BUILD_TARGET default "u-boot-elf.srec" if RCAR_GEN3 default "u-boot.itb" if SPL_LOAD_FIT && ARCH_SUNXI default "u-boot.kwb" if KIRKWOOD + default "u-boot-with-spl.bin" if ARCH_AT91 && SPL_NAND_SUPPORT help Some SoCs need special image types (e.g. U-Boot binary with a special header) as build targets. By defining
Makefile +3 -1
@@ -1225,9 +1225,11 @@ else SPL_PAYLOAD := u-boot.bin endif +SPL_IMAGE := $(CONFIG_SPL_IMAGE:"%"=%) + OBJCOPYFLAGS_u-boot-with-spl.bin = -I binary -O binary \ --pad-to=$(CONFIG_SPL_PAD_TO) -u-boot-with-spl.bin: spl/u-boot-spl.bin $(SPL_PAYLOAD) FORCE +u-boot-with-spl.bin: $(SPL_IMAGE) $(SPL_PAYLOAD) FORCE $(call if_changed,pad_cat) ifeq ($(CONFIG_ARCH_LPC32XX)$(CONFIG_SPL),yy)
Signature · 1 line
2.21.0
PATCH v2 9/12 Makefile: Add Kconfig option CONFIG_SPL_IMAGE to select the SPL binary
Quoted 24 lines · Stefan Roese
This patch adds the
CONFIG_SPL_IMAGEoption to select the SPL image that shall be used to generate the combined SPL + U-Boot image. The default value is the current value "spl/u-boot-spl.bin". >
This patch also setsCONFIG_SPL_IMAGEto "spl/boot.bin" for AT91 targets which use SPL NAND support (boot from NAND).Signed-off-by Stefan Roese <[email protected]>Cc Heiko Schocher <[email protected]>Cc Andreas Bießmann <[email protected]>Cc Eugen Hristev <[email protected]>---
v2:
- No changeKconfig | 10 ++++++++++ Makefile | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-)Kconfig +0
-0
Kconfig config BUILD_ROM · line 230
Quoted 7 lines
Kconfig +4
-0@@ -224,6 +224,15 @@ config BUILD_ROM which are not shipped in the U-Boot source tree. Please, see doc/README.x86 for details. +config SPL_IMAGE + string "SPL image filename that is generated" + default "spl/boot.bin" if ARCH_AT91 && SPL_NAND_SUPPORT + default "spl/u-boot-spl.bin"
Hi Stefan,
This means that the old spl/u-boot-spl.bin is gone for AT91 and NAND ? Please correct me if I am wrong
Kconfig config BUILD_TARGET · line 244
Quoted 13 lines
Kconfig +6
-0+ help + The SPL image filename that is generated by the build process. + This image might be used to generated a combined image with + SPL and main U-Boot proper as well. + config BUILD_TARGET string "Build target special images" default "u-boot-with-spl.sfp" if TARGET_SOCFPGA_ARRIA10@@ -232,6 +241,7 @@ config BUILD_TARGET default "u-boot-elf.srec" if RCAR_GEN3 default "u-boot.itb" if SPL_LOAD_FIT && ARCH_SUNXI default "u-boot.kwb" if KIRKWOOD + default "u-boot-with-spl.bin" if ARCH_AT91 && SPL_NAND_SUPPORT
This means that before this patch, there was no special target for AT91 ? Thus no special image was built ? And after this patch, there will also be a new binary u-boot-with-spl.bin, except spl/boot.bin and spl/u-boot-spl.bin ?
Thus your patch does a bit more than what it's explained in the commit message ?
Thanks,
Eugen
Quoted 21 lines
Kconfig +0
-0help Some SoCs need special image types (e.g. U-Boot binary with a special header) as build targets. By definingMakefile +3
-1@@ -1225,9 +1225,11 @@ else SPL_PAYLOAD := u-boot.bin endif +SPL_IMAGE := $(CONFIG_SPL_IMAGE:"%"=%) + OBJCOPYFLAGS_u-boot-with-spl.bin = -I binary -O binary \ --pad-to=$(CONFIG_SPL_PAD_TO) -u-boot-with-spl.bin: spl/u-boot-spl.bin $(SPL_PAYLOAD) FORCE +u-boot-with-spl.bin: $(SPL_IMAGE) $(SPL_PAYLOAD) FORCE $(call if_changed,pad_cat) ifeq ($(CONFIG_ARCH_LPC32XX)$(CONFIG_SPL),yy)
PATCH v2 9/12 Makefile: Add Kconfig option CONFIG_SPL_IMAGE to select the SPL binary
Quoted 38 lines · Eugen.Hristev at microchip.com
Quoted 24 lines · Stefan Roese
This patch adds the
CONFIG_SPL_IMAGEoption to select the SPL image that shall be used to generate the combined SPL + U-Boot image. The default value is the current value "spl/u-boot-spl.bin". >
This patch also setsCONFIG_SPL_IMAGEto "spl/boot.bin" for AT91 targets which use SPL NAND support (boot from NAND).Signed-off-by Stefan Roese <[email protected]>Cc Heiko Schocher <[email protected]>Cc Andreas Bießmann <[email protected]>Cc Eugen Hristev <[email protected]>---
v2:
- No changeKconfig | 10 ++++++++++ Makefile | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-)Kconfig +0
-0Kconfig config BUILD_ROM · line 230
Quoted 7 lines
Kconfig +4
-0@@ -224,6 +224,15 @@ config BUILD_ROM which are not shipped in the U-Boot source tree. Please, see doc/README.x86 for details. +config SPL_IMAGE + string "SPL image filename that is generated" + default "spl/boot.bin" if ARCH_AT91 && SPL_NAND_SUPPORT + default "spl/u-boot-spl.bin"Hi Stefan,
Quoted 2 lines
This means that the old spl/u-boot-spl.bin is gone for AT91 and NAND ? Please correct me if I am wrong
No, its still there.
Quoted 9 lines
Quoted 9 lines
Kconfig +5
-0+ help + The SPL image filename that is generated by the build process. + This image might be used to generated a combined image with + SPL and main U-Boot proper as well. + config BUILD_TARGET string "Build target special images" default "u-boot-with-spl.sfp" if TARGET_SOCFPGA_ARRIA10@@ -232,6 +241,7 @@ config BUILD_TARGET
Quoted 8 lines
Kconfig config BUILD_TARGET · line 244
Quoted 4 lines
Kconfig +1
-0default "u-boot-elf.srec" if RCAR_GEN3 default "u-boot.itb" if SPL_LOAD_FIT && ARCH_SUNXI default "u-boot.kwb" if KIRKWOOD + default "u-boot-with-spl.bin" if ARCH_AT91 && SPL_NAND_SUPPORTThis means that before this patch, there was no special target for AT91 ?
Yes.
Quoted 1 line
Thus no special image was built ?
Yes.
Quoted 3 lines
And after this patch, there will
also be a new binary u-boot-with-spl.bin, except spl/boot.bin and spl/u-boot-spl.bin ?
The old binaries are still generated. Only a new combined image is generated too.
Quoted 2 lines
Thus your patch does a bit more than what it's explained in the commit message ?
Does it? What exactly is missing in the commit message? Please explain and I'll add something in the next patch version.
Thanks,
Stefan
PATCH v2 9/12 Makefile: Add Kconfig option CONFIG_SPL_IMAGE to select the SPL binary
Quoted 74 lines · Stefan Roese
External E-Mail
Quoted 37 lines · Eugen.Hristev at microchip.com
Quoted 24 lines · Stefan Roese
This patch adds the
CONFIG_SPL_IMAGEoption to select the SPL image that shall be used to generate the combined SPL + U-Boot image. The default value is the current value "spl/u-boot-spl.bin". >
This patch also setsCONFIG_SPL_IMAGEto "spl/boot.bin" for AT91 targets which use SPL NAND support (boot from NAND).Signed-off-by Stefan Roese <[email protected]>Cc Heiko Schocher <[email protected]>Cc Andreas Bießmann <[email protected]>Cc Eugen Hristev <[email protected]>---
v2:
- No changeKconfig | 10 ++++++++++
Makefile| 4 +++-2 files changed, 13 insertions(+), 1 deletion(-)Kconfig +0
-0@@ -224,6 +224,15 @@ config BUILD_ROMQuoted 6 lines
which are not shipped in the U-Boot source tree. Please, see doc/README.x86 for details. +config
SPL_IMAGE
+ string "SPL image filename that is generated" + default "spl/boot.bin" ifARCH_AT91&&SPL_NAND_SUPPORT+ default "spl/u-boot-spl.bin"Hi Stefan,
Quoted 2 lines
This means that the old spl/u-boot-spl.bin is gone for AT91 and NAND ? Please correct me if I am wrong
No, its still there.
Quoted 9 lines
Quoted 9 lines
+ help
+ The SPL image filename that is generated by the build process. + This image might be used to generated a combined image with + SPL and main U-Boot proper as well.
+
configBUILD_TARGET
string "Build target special images"
default "u-boot-with-spl.sfp" ifTARGET_SOCFPGA_ARRIA10Kconfig +0
-0@@ -232,6 +241,7 @@ config BUILD_TARGETQuoted 8 lines
Quoted 4 lines
default "u-boot-elf.srec" if
RCAR_GEN3
default "u-boot.itb" ifSPL_LOAD_FIT&&ARCH_SUNXIdefault "u-boot.kwb" if KIRKWOOD
+ default "u-boot-with-spl.bin" ifARCH_AT91&&SPL_NAND_SUPPORTThis means that before this patch, there was no special target for AT91 ?
Yes.
Quoted 1 line
Thus no special image was built ?
Yes.
Quoted 3 lines
And after this patch, there will
also be a new binary u-boot-with-spl.bin, except spl/boot.bin and spl/u-boot-spl.bin ?
Quoted 8 lines
The old binaries are still generated. Only a new combined image is generated too.
Quoted 2 lines
Thus your patch does a bit more than what it's explained in the commit message ?
Does it? What exactly is missing in the commit message? Please explain and I'll add something in the next patch version.
A new binary is generated on build after this patch is applied. Your commit states that you add a new Kconfig to select the name of a file which is included in a generating a binary (which did not exist before )
So I see 2 changes: 1) new binary will be created from now on
2) to create this binary a new Kconfig is used which selects one of the files used to create it
Quoted 3 lines
Thanks,
Stefan
PATCH v2 9/12 Makefile: Add Kconfig option CONFIG_SPL_IMAGE to select the SPL binary
On 29.03.19 16:59, Eugen.Hristev at microchip.com wrote:
<snip>
Quoted 10 lines
Quoted 10 lines
Quoted 3 lines
And after this patch, there will
also be a new binary u-boot-with-spl.bin, except spl/boot.bin and spl/u-boot-spl.bin ?The old binaries are still generated. Only a new combined image is generated too.
Quoted 2 lines
Thus your patch does a bit more than what it's explained in the commit message ?
Quoted 7 lines
Quoted 2 lines
Does it? What exactly is missing in the commit message? Please explain and I'll add something in the next patch version.
A new binary is generated on build after this patch is applied. Your commit states that you add a new
Kconfigto select the name of a file which is included in a generating a binary (which did not exist before )
This "new binary" is already generated on other platforms (e.g. MVEBU). So its not introduced with this patch.
Quoted 3 lines
So I see 2 changes: 1) new binary will be created from now on
2) to create this binary a newKconfigis used which selects one of the files used to create it
I'll add that this "new binary" is now generated for AT91 & SPL_NAND. Like this:
Makefile: Add Kconfig option CONFIG_SPL_IMAGE to select the SPL binary
This patch adds the CONFIG_SPL_IMAGE option to select the SPL image that shall be used to generate the combined SPL + U-Boot image. The default value is the current value "spl/u-boot-spl.bin".
This patch also sets CONFIG_SPL_IMAGE to "spl/boot.bin" for AT91 targets which use SPL NAND support (boot from NAND). For these build targets the combined image "u-boot-with-spl.bin" is now automatically generated and can be programmed into NAND as one single image (vs. SPL image and U-Boot as 2 separate images).
What do you think?
Thanks,
Stefan
PATCH v2 9/12 Makefile: Add Kconfig option CONFIG_SPL_IMAGE to select the SPL binary
In reply to Stefan RoeseHello Stefan,
Am 26.03.2019 um 13:16 schrieb Stefan Roese:
Quoted 11 lines
This patch adds the
CONFIG_SPL_IMAGEoption to select the SPL image that shall be used to generate the combined SPL + U-Boot image. The default value is the current value "spl/u-boot-spl.bin".This patch also sets
CONFIG_SPL_IMAGEto "spl/boot.bin" for AT91 targets which use SPL NAND support (boot from NAND).Signed-off-by Stefan Roese <[email protected]>Cc Heiko Schocher <[email protected]>Cc Andreas Bießmann <[email protected]>Cc Eugen Hristev <[email protected]>
Quoted 7 lines
---
v2:
- No changeKconfig | 10 ++++++++++ Makefile | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-)
Tested on the taurus board:
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de
PATCH v2 10/12 arm: at91: siemens: Add support to generate combined SPL+U-Boot image
In reply to Stefan RoeseThis patch adds the necessary defines to the Siemens AT91SAM based boards (smartweb, corvus and taurus) to generate the combined binary image with SPL and main U-Boot image combined (u-boot-with-spl.bin).
---
v2:
- No change
include/configs/corvus.h | 3 +++ include/configs/smartweb.h | 4 ++++ include/configs/taurus.h | 3 +++ 3 files changed, 10 insertions(+)
include/configs/corvus.h +3 -0
@@ -139,4 +139,7 @@#define CONFIG_SYS_MCKR 0x1301#define CONFIG_SYS_MCKR_CSS 0x1302 +#define CONFIG_SPL_PAD_TO CONFIG_SYS_NAND_U_BOOT_OFFS +#define CONFIG_SYS_SPL_LEN CONFIG_SPL_PAD_TO +#endif
include/configs/smartweb.h +4 -0
@@ -221,4 +221,8 @@#define CONFIG_SYS_ICACHE_OFF #define CONFIG_SYS_DCACHE_OFF #endif + +#define CONFIG_SPL_PAD_TO CONFIG_SYS_NAND_U_BOOT_OFFS +#define CONFIG_SYS_SPL_LEN CONFIG_SPL_PAD_TO +#endif /* __CONFIG_H */
include/configs/taurus.h +3 -0
@@ -177,4 +177,7 @@#define CONFIG_SYS_MCKR_CSS (0x02 | CONFIG_SYS_MCKR)#define CONFIG_SYS_AT91_PLLB 0x10193F05 +#define CONFIG_SPL_PAD_TO CONFIG_SYS_NAND_U_BOOT_OFFS +#define CONFIG_SYS_SPL_LEN CONFIG_SPL_PAD_TO +#endif
Signature · 1 line
2.21.0
PATCH v2 10/12 arm: at91: siemens: Add support to generate combined SPL+U-Boot image
Hello Stefan,
Am 26.03.2019 um 13:16 schrieb Stefan Roese:
Quoted 8 lines
This patch adds the necessary defines to the Siemens AT91SAM based boards (smartweb, corvus and taurus) to generate the combined binary image with SPL and main U-Boot image combined (u-boot-with-spl.bin).
Signed-off-by Stefan Roese <[email protected]>Cc Heiko Schocher <[email protected]>Cc Andreas Bießmann <[email protected]>Cc Eugen Hristev <[email protected]>
Quoted 8 lines
---
v2:
- No changeinclude/configs/corvus.h | 3 +++ include/configs/smartweb.h | 4 ++++ include/configs/taurus.h | 3 +++ 3 files changed, 10 insertions(+)
Thanks for adapting this boards!
Tested on the taurus board:
Test for corvus and smartweb follow, but no time yet.
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de
PATCH v2 11/12 arm: at91: at91sam9x5.dtsi: Add watchdog handle
In reply to Stefan RoeseThis makes it possible to reference the watchdog DT node via "&watchdog" from board dts files.
---
v2:
- New patch
arch/arm/dts/at91sam9x5.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/dts/at91sam9x5.dtsi +1 -1
@@ -1180,7 +1180,7 @@ }; }; - watchdog at fffffe40 { + watchdog: watchdog at fffffe40 { compatible = "atmel,at91sam9260-wdt"; reg = <0xfffffe40 0x10>; interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
Signature · 1 line
2.21.0
PATCH v2 11/12 arm: at91: at91sam9x5.dtsi: Add watchdog handle
Hello Stefan,
Am 26.03.2019 um 13:16 schrieb Stefan Roese:
Quoted 7 lines
This makes it possible to reference the watchdog DT node via "&watchdog" from board dts files.
Signed-off-by Stefan Roese <[email protected]>Cc Heiko Schocher <[email protected]>Cc Andreas Bießmann <[email protected]>Cc Eugen Hristev <[email protected]>
Quoted 6 lines
---
v2:
- New patcharch/arm/dts/at91sam9x5.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
I have such a similiar patch now in my queue for at91sam9260.dtsi as I tested with the taurus board.
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de
PATCH v2 12/12 arm: at91: Add gardena-gateway-at91sam support
In reply to Stefan RoeseThe GARDENA smart Gateway boards are equipped with an Atmel / Microchip AT91SAM9G25 SoC and with 128 MiB of RAM and 256 MiB of NAND storage. This patch adds support for this board including SPL support. Therefore the AT91Boostrap is not needed on this platform any more.
---
v2:
- Add dtb build target in dts Makefile
- Add gardena-smart-gateway-at91sam-u-boot.dtsi file with U-Boot specific DT properties
- at91sam9x5ek.dtsi is not included in the dts file any more as this did enable too much unused devices
arch/arm/dts/Makefile | 3 + .../gardena-smart-gateway-at91sam-u-boot.dtsi | 5 + .../arm/dts/gardena-smart-gateway-at91sam.dts | 119 +++++++++++++++ arch/arm/mach-at91/Kconfig | 8 ++ board/gardena/smart-gateway-at91sam/Kconfig | 12 ++ .../gardena/smart-gateway-at91sam/MAINTAINERS | 7 + board/gardena/smart-gateway-at91sam/Makefile | 7 + board/gardena/smart-gateway-at91sam/board.c | 59 ++++++++ board/gardena/smart-gateway-at91sam/spl.c | 135 ++++++++++++++++++ .../gardena-smart-gateway-at91sam_defconfig | 84 +++++++++++ .../configs/gardena-smart-gateway-at91sam.h | 88 ++++++++++++ 11 files changed, 527 insertions(+) create mode 100644 arch/arm/dts/gardena-smart-gateway-at91sam-u-boot.dtsi create mode 100644 arch/arm/dts/gardena-smart-gateway-at91sam.dts create mode 100644 board/gardena/smart-gateway-at91sam/Kconfig create mode 100644 board/gardena/smart-gateway-at91sam/MAINTAINERS create mode 100644 board/gardena/smart-gateway-at91sam/Makefile create mode 100644 board/gardena/smart-gateway-at91sam/board.c create mode 100644 board/gardena/smart-gateway-at91sam/spl.c create mode 100644 configs/gardena-smart-gateway-at91sam_defconfig create mode 100644 include/configs/gardena-smart-gateway-at91sam.h
arch/arm/dts/Makefile +3 -0
@@ -607,6 +607,9 @@ dtb-$(CONFIG_TARGET_AT91SAM9X5EK) += \ dtb-$(CONFIG_TARGET_AT91SAM9N12EK) += at91sam9n12ek.dtb +dtb-$(CONFIG_TARGET_GARDENA_SMART_GATWAY_AT91SAM) += \ + gardena-smart-gateway-at91sam.dtb + dtb-$(CONFIG_TARGET_ETHERNUT5) += ethernut5.dtb dtb-$(CONFIG_TARGET_USB_A9263) += usb_a9263.dtb
arch/arm/dts/gardena-smart-gateway-at91sam-u-boot.dtsi new file +5 -0
@@ -0,0 +1,5 @@ +// SPDX-License-Identifier: GPL-2.0+ + +&dbgu { + u-boot,dm-pre-reloc; +};
arch/arm/dts/gardena-smart-gateway-at91sam.dts new file +119 -0
119 lines not on this page · raw message
arch/arm/mach-at91/Kconfig +8 -0
@@ -147,6 +147,13 @@ config TARGET_AT91SAM9X5EK select BOARD_LATE_INIT select SUPPORT_SPL +config TARGET_GARDENA_SMART_GATWAY_AT91SAM + bool "GARDENA smart Gateway (AT91SAM)" + select AT91SAM9X5 + select BOARD_EARLY_INIT_F + select BOARD_LATE_INIT + select SUPPORT_SPL + config TARGET_SAMA5D2_PTC_EK bool "SAMA5D2 PTC EK board" select BOARD_EARLY_INIT_F
@@ -283,6 +290,7 @@ source "board/bluewater/snapper9260/Kconfig" source "board/calao/usb_a9263/Kconfig" source "board/egnite/ethernut5/Kconfig" source "board/esd/meesc/Kconfig" +source "board/gardena/smart-gateway-at91sam/Kconfig" source "board/l+g/vinco/Kconfig" source "board/mini-box/picosam9g45/Kconfig" source "board/ronetix/pm9261/Kconfig"
board/gardena/smart-gateway-at91sam/Kconfig new file +12 -0
@@ -0,0 +1,12 @@ +if TARGET_GARDENA_SMART_GATWAY_AT91SAM + +config SYS_BOARD + default "smart-gateway-at91sam" + +config SYS_VENDOR + default "gardena" + +config SYS_CONFIG_NAME + default "gardena-smart-gateway-at91sam" + +endif
board/gardena/smart-gateway-at91sam/MAINTAINERS new file +7 -0
@@ -0,0 +1,7 @@ +GARDENA_SMART_GATEWAY_AT91SAM BOARD +M: Stefan Roese <[email protected]> +S: Maintained +F: board/gardena/smart-gateway-at91sam/ +F: include/configs/gardena-smart-gateway-at91sam.h +F: configs/gardena-smart-gateway-at91sam_defconfig +F: arch/arm/dts/gardena-smart-gateway-at91sam.dts
board/gardena/smart-gateway-at91sam/Makefile new file +7 -0
@@ -0,0 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0+ + +obj-y += board.o + +ifdef CONFIG_SPL_BUILD +obj-y += spl.o +endif
board/gardena/smart-gateway-at91sam/board.c new file +59 -0
59 lines not on this page · raw message
board/gardena/smart-gateway-at91sam/spl.c new file +135 -0
135 lines not on this page · raw message
configs/gardena-smart-gateway-at91sam_defconfig new file +84 -0
84 lines not on this page · raw message
include/configs/gardena-smart-gateway-at91sam.h new file +88 -0
88 lines not on this page · raw message
Signature · 1 line
2.21.0
PATCH v2 12/12 arm: at91: Add gardena-gateway-at91sam support
Quoted 44 lines · Stefan Roese
The GARDENA smart Gateway boards are equipped with an Atmel / Microchip AT91SAM9G25 SoC and with 128 MiB of RAM and 256 MiB of NAND storage. This patch adds support for this board including SPL support. Therefore the AT91Boostrap is not needed on this platform any more.
Signed-off-by Stefan Roese <[email protected]>Cc Heiko Schocher <[email protected]>Cc Andreas Bießmann <[email protected]>Cc Eugen Hristev <[email protected]>---
v2:
- Add dtb build target in dtsMakefile
- Addgardena-smart-gateway-at91sam-u-boot.dtsifile with U-Boot specific DT properties
-at91sam9x5ek.dtsiis not included in the dts file any more as this did enable too much unused devicesarch/arm/dts/Makefile | 3 + .../gardena-smart-gateway-at91sam-u-boot.dtsi | 5 + .../arm/dts/gardena-smart-gateway-at91sam.dts | 119 +++++++++++++++ arch/arm/mach-at91/Kconfig | 8 ++ board/gardena/smart-gateway-at91sam/Kconfig | 12 ++ .../gardena/smart-gateway-at91sam/MAINTAINERS | 7 + board/gardena/smart-gateway-at91sam/Makefile | 7 + board/gardena/smart-gateway-at91sam/board.c | 59 ++++++++ board/gardena/smart-gateway-at91sam/spl.c | 135 ++++++++++++++++++ .../gardena-smart-gateway-at91sam_defconfig | 84 +++++++++++ .../configs/gardena-smart-gateway-at91sam.h | 88 ++++++++++++ 11 files changed, 527 insertions(+)create mode 100644
arch/arm/dts/gardena-smart-gateway-at91sam-u-boot.dtsicreate mode 100644arch/arm/dts/gardena-smart-gateway-at91sam.dtscreate mode 100644 board/gardena/smart-gateway-at91sam/Kconfig create mode 100644 board/gardena/smart-gateway-at91sam/MAINTAINERS create mode 100644 board/gardena/smart-gateway-at91sam/Makefile create mode 100644board/gardena/smart-gateway-at91sam/board.ccreate mode 100644board/gardena/smart-gateway-at91sam/spl.ccreate mode 100644 configs/gardena-smart-gateway-at91sam_defconfig create mode 100644include/configs/gardena-smart-gateway-at91sam.harch/arm/dts/Makefile +0
-0
arch/arm/dts/Makefile dtb-$(CONFIG_TARGET_AT91SAM9X5EK) += \ · line 610
Quoted 4 lines
arch/arm/dts/Makefile +1
-0@@ -607,6 +607,9 @@ dtb-$(CONFIG_TARGET_AT91SAM9X5EK) += \ dtb-$(CONFIG_TARGET_AT91SAM9N12EK) += at91sam9n12ek.dtb +dtb-$(CONFIG_TARGET_GARDENA_SMART_GATWAY_AT91SAM) += \
Hi Stefan,
Is the "GATWAY" intentional? would be difficult to find if someone searches for it...
Eugen
[snip]
PATCH v2 12/12 arm: at91: Add gardena-gateway-at91sam support
Quoted 49 lines · Eugen.Hristev at microchip.com
Quoted 45 lines · Stefan Roese
The GARDENA smart Gateway boards are equipped with an Atmel / Microchip AT91SAM9G25 SoC and with 128 MiB of RAM and 256 MiB of NAND storage. This patch adds support for this board including SPL support. Therefore the AT91Boostrap is not needed on this platform any more.
Signed-off-by Stefan Roese <[email protected]>Cc Heiko Schocher <[email protected]>Cc Andreas Bießmann <[email protected]>Cc Eugen Hristev <[email protected]>---
v2:
- Add dtb build target in dtsMakefile
- Addgardena-smart-gateway-at91sam-u-boot.dtsifile with U-Boot specific DT properties
-at91sam9x5ek.dtsiis not included in the dts file any more as this did enable too much unused devicesarch/arm/dts/Makefile | 3 + .../gardena-smart-gateway-at91sam-u-boot.dtsi | 5 + .../arm/dts/gardena-smart-gateway-at91sam.dts | 119 +++++++++++++++ arch/arm/mach-at91/Kconfig | 8 ++ board/gardena/smart-gateway-at91sam/Kconfig | 12 ++ .../gardena/smart-gateway-at91sam/MAINTAINERS | 7 + board/gardena/smart-gateway-at91sam/Makefile | 7 + board/gardena/smart-gateway-at91sam/board.c | 59 ++++++++ board/gardena/smart-gateway-at91sam/spl.c | 135 ++++++++++++++++++ .../gardena-smart-gateway-at91sam_defconfig | 84 +++++++++++ .../configs/gardena-smart-gateway-at91sam.h | 88 ++++++++++++ 11 files changed, 527 insertions(+)create mode 100644
arch/arm/dts/gardena-smart-gateway-at91sam-u-boot.dtsicreate mode 100644arch/arm/dts/gardena-smart-gateway-at91sam.dtscreate mode 100644 board/gardena/smart-gateway-at91sam/Kconfig create mode 100644 board/gardena/smart-gateway-at91sam/MAINTAINERS create mode 100644 board/gardena/smart-gateway-at91sam/Makefile create mode 100644board/gardena/smart-gateway-at91sam/board.ccreate mode 100644board/gardena/smart-gateway-at91sam/spl.ccreate mode 100644 configs/gardena-smart-gateway-at91sam_defconfig create mode 100644include/configs/gardena-smart-gateway-at91sam.harch/arm/dts/Makefile +0
-0@@ -607,6 +607,9 @@ dtb-$(CONFIG_TARGET_AT91SAM9X5EK) += \
Quoted 8 lines
arch/arm/dts/Makefile dtb-$(CONFIG_TARGET_AT91SAM9X5EK) += \ · line 610
Quoted 3 lines
arch/arm/dts/Makefile +1
-0dtb-$(CONFIG_TARGET_AT91SAM9N12EK) += at91sam9n12ek.dtb +dtb-$(CONFIG_TARGET_GARDENA_SMART_GATWAY_AT91SAM) += \Hi Stefan,
Is the "GATWAY" intentional? would be difficult to find if someone searches for it...
Ups. Definitely not! Thanks for catching. I'll fix it in the next version.
I also thought about adding "at91sam9g25-" to the beginning of the dts file to better include it in the dts directory to the SoC family. What is your thinking about this?
Thanks,
Stefan
PATCH v2 12/12 arm: at91: Add gardena-gateway-at91sam support
Quoted 60 lines · Stefan Roese
Quoted 55 lines · Eugen.Hristev at microchip.com
Quoted 46 lines · Stefan Roese
The GARDENA smart Gateway boards are equipped with an Atmel / Microchip AT91SAM9G25 SoC and with 128 MiB of RAM and 256 MiB of NAND storage. This patch adds support for this board including SPL support. Therefore the AT91Boostrap is not needed on this platform any more.
Signed-off-by Stefan Roese <[email protected]>Cc Heiko Schocher <[email protected]>Cc Andreas Bießmann <[email protected]>Cc Eugen Hristev <[email protected]>---
v2:
- Add dtb build target in dtsMakefile
- Addgardena-smart-gateway-at91sam-u-boot.dtsifile with U-Boot specific DT properties
-at91sam9x5ek.dtsiis not included in the dts file any more as this did enable too much unused devicesarch/arm/dts/Makefile | 3 +
.../gardena-smart-gateway-at91sam-u-boot.dtsi| 5 +.../arm/dts/gardena-smart-gateway-at91sam.dts| 119 +++++++++++++++ arch/arm/mach-at91/Kconfig | 8 ++ board/gardena/smart-gateway-at91sam/Kconfig | 12 ++ .../gardena/smart-gateway-at91sam/MAINTAINERS | 7 + board/gardena/smart-gateway-at91sam/Makefile | 7 + board/gardena/smart-gateway-at91sam/board.c | 59 ++++++++ board/gardena/smart-gateway-at91sam/spl.c | 135
++++++++++++++++++
.../gardena-smart-gateway-at91sam_defconfig | 84 +++++++++++ .../configs/gardena-smart-gateway-at91sam.h | 88 ++++++++++++11 files changed, 527 insertions(+)create mode 100644
arch/arm/dts/gardena-smart-gateway-at91sam-u-boot.dtsicreate mode 100644arch/arm/dts/gardena-smart-gateway-at91sam.dtscreate mode 100644 board/gardena/smart-gateway-at91sam/Kconfig create mode 100644 board/gardena/smart-gateway-at91sam/MAINTAINERS create mode 100644 board/gardena/smart-gateway-at91sam/Makefile create mode 100644board/gardena/smart-gateway-at91sam/board.ccreate mode 100644board/gardena/smart-gateway-at91sam/spl.ccreate mode 100644 configs/gardena-smart-gateway-at91sam_defconfig create mode 100644include/configs/gardena-smart-gateway-at91sam.harch/arm/dts/Makefile +0
-0@@ -607,6 +607,9 @@ dtb-$(CONFIG_TARGET_AT91SAM9X5EK) += \Quoted 2 lines
dtb-$(CONFIG_TARGET_AT91SAM9N12EK) += at91sam9n12ek.dtb +dtb-$(CONFIG_TARGET_GARDENA_SMART_GATWAY_AT91SAM) += \
Hi Stefan,
Quoted 2 lines
Is the "GATWAY" intentional? would be difficult to find if someone searches for it...
Quoted 7 lines
Ups. Definitely not! Thanks for catching. I'll fix it in the next version.
I also thought about adding "at91sam9g25-" to the beginning of the dts file to better include it in the dts directory to the SoC family. What is your thinking about this?
I do not have a strong opinion. As you like.
Quoted 2 lines
Thanks,
Stefan
PATCH v2 12/12 arm: at91: Add gardena-gateway-at91sam support
Quoted 67 lines · Eugen.Hristev at microchip.com
Quoted 63 lines · Stefan Roese
Quoted 55 lines · Eugen.Hristev at microchip.com
Quoted 46 lines · Stefan Roese
The GARDENA smart Gateway boards are equipped with an Atmel / Microchip AT91SAM9G25 SoC and with 128 MiB of RAM and 256 MiB of NAND storage. This patch adds support for this board including SPL support. Therefore the AT91Boostrap is not needed on this platform any more.
Signed-off-by Stefan Roese <[email protected]>Cc Heiko Schocher <[email protected]>Cc Andreas Bießmann <[email protected]>Cc Eugen Hristev <[email protected]>---
v2:
- Add dtb build target in dtsMakefile
- Addgardena-smart-gateway-at91sam-u-boot.dtsifile with U-Boot specific DT properties
-at91sam9x5ek.dtsiis not included in the dts file any more as this did enable too much unused devicesarch/arm/dts/Makefile | 3 + .../gardena-smart-gateway-at91sam-u-boot.dtsi | 5 + .../arm/dts/gardena-smart-gateway-at91sam.dts | 119 +++++++++++++++ arch/arm/mach-at91/Kconfig | 8 ++ board/gardena/smart-gateway-at91sam/Kconfig | 12 ++ .../gardena/smart-gateway-at91sam/MAINTAINERS | 7 + board/gardena/smart-gateway-at91sam/Makefile | 7 + board/gardena/smart-gateway-at91sam/board.c | 59 ++++++++ board/gardena/smart-gateway-at91sam/spl.c | 135 ++++++++++++++++++ .../gardena-smart-gateway-at91sam_defconfig | 84 +++++++++++ .../configs/gardena-smart-gateway-at91sam.h | 88 ++++++++++++ 11 files changed, 527 insertions(+)create mode 100644
arch/arm/dts/gardena-smart-gateway-at91sam-u-boot.dtsi
create mode 100644arch/arm/dts/gardena-smart-gateway-at91sam.dtscreate mode 100644 board/gardena/smart-gateway-at91sam/Kconfig create mode 100644 board/gardena/smart-gateway-at91sam/MAINTAINERS create mode 100644 board/gardena/smart-gateway-at91sam/Makefile create mode 100644board/gardena/smart-gateway-at91sam/board.ccreate mode 100644board/gardena/smart-gateway-at91sam/spl.ccreate mode 100644 configs/gardena-smart-gateway-at91sam_defconfig create mode 100644include/configs/gardena-smart-gateway-at91sam.harch/arm/dts/Makefile +0
-0arch/arm/dts/Makefile dtb-$(CONFIG_TARGET_AT91SAM9X5EK) += \ · line 608
Quoted 2 lines
arch/arm/dts/Makefile +1
-0@@ -607,6 +607,9 @@ dtb-$(CONFIG_TARGET_AT91SAM9X5EK) += \ dtb-$(CONFIG_TARGET_AT91SAM9N12EK) += at91sam9n12ek.dtb +dtb-$(CONFIG_TARGET_GARDENA_SMART_GATWAY_AT91SAM) += \Hi Stefan,
Quoted 2 lines
Is the "GATWAY" intentional? would be difficult to find if someone searches for it...
Ups. Definitely not! Thanks for catching. I'll fix it in the next version.
Quoted 6 lines
Quoted 4 lines
I also thought about adding "at91sam9g25-" to the beginning of the dts file to better include it in the dts directory to the SoC family. What is your thinking about this?
I do not have a strong opinion. As you like.
I've changed it locally and will send v3 in a few days (waiting for some further review comments).
Thanks,
Stefan
PATCH v2 12/12 arm: at91: Add gardena-gateway-at91sam support
In reply to Stefan RoeseHello Stefan,
Am 26.03.2019 um 13:16 schrieb Stefan Roese:
Quoted 29 lines
The GARDENA smart Gateway boards are equipped with an Atmel / Microchip AT91SAM9G25 SoC and with 128 MiB of RAM and 256 MiB of NAND storage. This patch adds support for this board including SPL support. Therefore the AT91Boostrap is not needed on this platform any more.
Signed-off-by Stefan Roese <[email protected]>Cc Heiko Schocher <[email protected]>Cc Andreas Bießmann <[email protected]>Cc Eugen Hristev <[email protected]>---
v2:
- Add dtb build target in dtsMakefile
- Addgardena-smart-gateway-at91sam-u-boot.dtsifile with U-Boot specific DT properties
-at91sam9x5ek.dtsiis not included in the dts file any more as this did enable too much unused devicesarch/arm/dts/Makefile | 3 + .../gardena-smart-gateway-at91sam-u-boot.dtsi | 5 + .../arm/dts/gardena-smart-gateway-at91sam.dts | 119 +++++++++++++++ arch/arm/mach-at91/Kconfig | 8 ++ board/gardena/smart-gateway-at91sam/Kconfig | 12 ++ .../gardena/smart-gateway-at91sam/MAINTAINERS | 7 + board/gardena/smart-gateway-at91sam/Makefile | 7 + board/gardena/smart-gateway-at91sam/board.c | 59 ++++++++ board/gardena/smart-gateway-at91sam/spl.c | 135 ++++++++++++++++++ .../gardena-smart-gateway-at91sam_defconfig | 84 +++++++++++ .../configs/gardena-smart-gateway-at91sam.h | 88 ++++++++++++ 11 files changed, 527 insertions(+)
Quoted 9 lines
create mode 100644
arch/arm/dts/gardena-smart-gateway-at91sam-u-boot.dtsicreate mode 100644arch/arm/dts/gardena-smart-gateway-at91sam.dtscreate mode 100644 board/gardena/smart-gateway-at91sam/Kconfig create mode 100644 board/gardena/smart-gateway-at91sam/MAINTAINERS create mode 100644 board/gardena/smart-gateway-at91sam/Makefile create mode 100644board/gardena/smart-gateway-at91sam/board.ccreate mode 100644board/gardena/smart-gateway-at91sam/spl.ccreate mode 100644 configs/gardena-smart-gateway-at91sam_defconfig create mode 100644include/configs/gardena-smart-gateway-at91sam.h
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de
PATCH v2 1/12 arm: at91: Makefile: Compile lowlevel_init only when really necessary
In reply to Stefan RoeseHello Stefan,
Am 26.03.2019 um 13:16 schrieb Stefan Roese:
Quoted 7 lines
Make sure that
lowlevel_initis not compiled whenCONFIG_SKIP_LOWLEVEL_INIT_ONLYis configured.Signed-off-by Stefan Roese <[email protected]>Cc Heiko Schocher <[email protected]>Cc Andreas Bießmann <[email protected]>Cc Eugen Hristev <[email protected]>
Quoted 6 lines
---
v2:
- No changearch/arm/mach-at91/arm926ejs/Makefile | 2 ++ 1 file changed, 2 insertions(+)
Tested on the taurus board:
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de