]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
at91: Minor tweaks to SPL logic for space savings on smartweb
authorTom Rini <trini@konsulko.com>
Thu, 10 May 2018 11:15:52 +0000 (07:15 -0400)
committerTom Rini <trini@konsulko.com>
Wed, 23 May 2018 02:08:57 +0000 (22:08 -0400)
- spl_board_init is empty on smartweb so drop that function
- When CONFIG_AT91SAM9_WATCHDOG is set we do not disable the watchdog in
  SPL and instead let full U-Boot handle it.  Instead of an empty
  function just do not call a function.

Signed-off-by: Tom Rini <trini@konsulko.com>
arch/arm/Kconfig
arch/arm/mach-at91/spl.c
arch/arm/mach-at91/spl_at91.c
arch/arm/mach-at91/spl_atmel.c

index 3e05f79f638cd4d3c4a3b6bdde59b59efd5efd3f..d273294afd953fd7ed1fd293a3e4e53ac6835a7d 100644 (file)
@@ -393,7 +393,7 @@ choice
 
 config ARCH_AT91
        bool "Atmel AT91"
-       select SPL_BOARD_INIT if SPL
+       select SPL_BOARD_INIT if SPL && !TARGET_SMARTWEB
 
 config TARGET_EDB93XX
        bool "Support edb93xx"
index 7cba3825e7f4bc7c0b865add21cfb9829ee49431..8bfb2a452b5e89b898697df2d1f9ee1600bcf558 100644 (file)
@@ -11,9 +11,7 @@
 #include <asm/arch/clk.h>
 #include <spl.h>
 
-#if defined(CONFIG_AT91SAM9_WATCHDOG)
-void at91_disable_wdt(void) { }
-#else
+#if !defined(CONFIG_AT91SAM9_WATCHDOG)
 void at91_disable_wdt(void)
 {
        struct at91_wdt *wdt = (struct at91_wdt *)ATMEL_BASE_WDT;
index d701c3586d38805af8abf5baaab81837e0a7d212..8c368042a6b29a0ace586c7b17026f0b0a24f482 100644 (file)
@@ -76,7 +76,9 @@ void __weak spl_board_init(void)
 void board_init_f(ulong dummy)
 {
        lowlevel_clock_init();
+#if !defined(CONFIG_AT91SAM9_WATCHDOG)
        at91_disable_wdt();
+#endif
 
        /*
         * At this stage the main oscillator is supposed to be enabled
index 11db1e5f8cff2d2258458b89edf2d7eb063b5918..597ff8c036736f206b61389b7945a61bfe7721d9 100644 (file)
@@ -98,8 +98,10 @@ void board_init_f(ulong dummy)
        configure_2nd_sram_as_l2_cache();
 #endif
 
+#if !defined(CONFIG_AT91SAM9_WATCHDOG)
        /* disable watchdog */
        at91_disable_wdt();
+#endif
 
        /* PMC configuration */
        at91_pmc_init();