[U-Boot] Using spi_alloc_slave() from SPL

Fabio Estevam festevam at gmail.com
Thu Aug 6 16:14:34 CEST 2015


Hi Stefano and Marek,

Thanks for the suggestions.

On Thu, Aug 6, 2015 at 10:38 AM, Stefano Babic <sbabic at denx.de> wrote:

> There is the possibility to set a malloc area inside SPL:
>
> CONFIG_SYS_SPL_MALLOC_START
> CONFIG_SYS_SPL_MALLOC_SIZE
> you do not need a lot of space, and you can try to put it inside the IRAM.
>
> This should guarantee that spi_alloc_slave() works.

So I tried moving them to the internal RAM:

--- a/include/configs/imx6_spl.h
+++ b/include/configs/imx6_spl.h
@@ -70,8 +70,8 @@
 #else
 #define CONFIG_SPL_BSS_START_ADDR      0x18200000
 #define CONFIG_SPL_BSS_MAX_SIZE                0x100000        /* 1 MB */
-#define CONFIG_SYS_SPL_MALLOC_START    0x18300000
-#define CONFIG_SYS_SPL_MALLOC_SIZE     0x3200000       /* 50 MB */
+#define CONFIG_SYS_SPL_MALLOC_START    0x900000
+#define CONFIG_SYS_SPL_MALLOC_SIZE     0x8000
 #define CONFIG_SYS_TEXT_BASE           0x17800000
 #endif
 #endif

but still getting spi_alloc_slave() to fail.

Regards,

Fabio Estevam


More information about the U-Boot mailing list