atmel, at91: fix smartweb board
authorHeiko Schocher <hs@denx.de>
Fri, 23 Jun 2017 18:13:59 +0000 (20:13 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 29 Jun 2017 14:01:11 +0000 (10:01 -0400)
since commit: f8b7fff1d5c5 "serial: atmel_usart: Add clk support"

smartweb board comes not up anymore. Fix it.

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Wenyou Yang <wenyou.yang@microchip.com>
arch/arm/dts/at91sam9260-smartweb.dts
board/siemens/smartweb/smartweb.c
configs/smartweb_defconfig
include/configs/smartweb.h

index faed763e433899273266e7b3180c3bf6c2c0601f..e59781bf45be969279296bb4edd9e0e3aefccb10 100644 (file)
@@ -18,6 +18,7 @@
        compatible = "atmel,at91sam9260", "atmel,at91sam9";
 
        chosen {
+               u-boot,dm-pre-reloc;
                stdout-path = &dbgu;
        };
 
@@ -48,6 +49,7 @@
                        };
 
                        dbgu: serial@fffff200 {
+                               u-boot,dm-pre-reloc;
                                status = "okay";
                        };
 
index 78a7946836ef5b2a1aabd00bc8636b5237a331f7..718ccc7839529d1ba58b90337f1781dc913ded76 100644 (file)
@@ -256,12 +256,3 @@ void mem_init(void)
        sdramc_initialize(ATMEL_BASE_CS1, &setting);
 }
 #endif
-
-static struct atmel_serial_platdata at91sam9260_serial_plat = {
-       .base_addr = ATMEL_BASE_DBGU,
-};
-
-U_BOOT_DEVICE(at91sam9260_serial) = {
-       .name   = "serial_atmel",
-       .platdata = &at91sam9260_serial_plat,
-};
index 48c8781eadf651015d1d5be1978f3b9d065fbdd0..a769fc55354f3d1f2df85051298bf3dd2424d9c7 100644 (file)
@@ -7,6 +7,7 @@ CONFIG_TARGET_SMARTWEB=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="at91sam9260-smartweb"
 CONFIG_FIT=y
@@ -33,6 +34,8 @@ CONFIG_CMD_FAT=y
 # CONFIG_DOS_PARTITION is not set
 CONFIG_OF_CONTROL=y
 CONFIG_OF_EMBED=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
 CONFIG_DFU_NAND=y
 # CONFIG_MMC is not set
 CONFIG_USB=y
index 1236da724e088da7a1653d8f0a6d3fdf4321386d..840027820947a7cf7b46104cfae3360780e1e915 100644 (file)
 #define CONFIG_SYS_INIT_SP_ADDR                0x301000
 #define CONFIG_SPL_STACK_R
 #define CONFIG_SPL_STACK_R_ADDR                CONFIG_SYS_TEXT_BASE
+/* we have only 4k sram in SPL, so cut SYS_MALLOC_F_LEN */
+#undef CONFIG_SYS_MALLOC_F_LEN
+#define CONFIG_SYS_MALLOC_F_LEN 0x400
 #else
 /*
  * Initial stack pointer: 4k - GENERATED_GBL_DATA_SIZE in internal SRAM,