Re: [U-Boot] Using spi_alloc_slave() from SPL

2015-11-10 Thread Fabio Estevam
On Mon, Nov 9, 2015 at 10:05 PM, Fabio Estevam wrote: > Hi Nikolay, > > On Thu, Aug 13, 2015 at 9:37 AM, Nikolay Dimitrov wrote: > >> Thanks for sharing this info, it seems it will solve a similar problem >> of mine on the latest U-Boot code (SPI slave malloc not working during >> SPL boot from S

Re: [U-Boot] Using spi_alloc_slave() from SPL

2015-11-09 Thread Fabio Estevam
Hi Nikolay, On Thu, Aug 13, 2015 at 9:37 AM, Nikolay Dimitrov wrote: > Thanks for sharing this info, it seems it will solve a similar problem > of mine on the latest U-Boot code (SPI slave malloc not working during > SPL boot from SPI NOR). Unfortunately this is not working in U-boot mainline n

Re: [U-Boot] Using spi_alloc_slave() from SPL

2015-11-09 Thread Fabio Estevam
On Thu, Aug 6, 2015 at 7:13 PM, Fabio Estevam wrote: > Hi Simon, > > On Thu, Aug 6, 2015 at 4:31 PM, Simon Glass wrote: > >> Please check the README about the SPL flow. From what I can see >> malloc() is not available before board_init_r() in SPL. >> >> However, if you add a call to spl_init() fr

Re: [U-Boot] Using spi_alloc_slave() from SPL

2015-08-13 Thread Nikolay Dimitrov
Hi Fabio, guys, On 08/07/2015 01:13 AM, Fabio Estevam wrote: Hi Simon, On Thu, Aug 6, 2015 at 4:31 PM, Simon Glass wrote: Please check the README about the SPL flow. From what I can see malloc() is not available before board_init_r() in SPL. However, if you add a call to spl_init() from you

Re: [U-Boot] Using spi_alloc_slave() from SPL

2015-08-06 Thread Marek Vasut
On Thursday, August 06, 2015 at 07:03:24 PM, Stefano Babic wrote: > Hi Marek, > > On 06/08/2015 16:28, Marek Vasut wrote: > > On Thursday, August 06, 2015 at 04:14:34 PM, Fabio Estevam wrote: > >> Hi Stefano and Marek, > >> > >> Thanks for the suggestions. > >> > >> On Thu, Aug 6, 2015 at 10:38

Re: [U-Boot] Using spi_alloc_slave() from SPL

2015-08-06 Thread Fabio Estevam
Hi Simon, On Thu, Aug 6, 2015 at 4:31 PM, Simon Glass wrote: > Please check the README about the SPL flow. From what I can see > malloc() is not available before board_init_r() in SPL. > > However, if you add a call to spl_init() from your board_init_f(), > then early malloc would be available.

Re: [U-Boot] Using spi_alloc_slave() from SPL

2015-08-06 Thread Simon Glass
Hi, On 6 August 2015 at 12:24, Fabio Estevam wrote: > On Thu, Aug 6, 2015 at 2:03 PM, Stefano Babic wrote: > >> This is in RAM, of course. Increasing the size by 3KiB is not IMHO for >> i.MX6 a problem, there is enough space in IRAM. But what is surprising >> is that Fabio gets a Null pointer by

Re: [U-Boot] Using spi_alloc_slave() from SPL

2015-08-06 Thread Fabio Estevam
On Thu, Aug 6, 2015 at 3:24 PM, Fabio Estevam wrote: > On Thu, Aug 6, 2015 at 2:03 PM, Stefano Babic wrote: > >> This is in RAM, of course. Increasing the size by 3KiB is not IMHO for >> i.MX6 a problem, there is enough space in IRAM. But what is surprising >> is that Fabio gets a Null pointer by

Re: [U-Boot] Using spi_alloc_slave() from SPL

2015-08-06 Thread Fabio Estevam
On Thu, Aug 6, 2015 at 2:03 PM, Stefano Babic wrote: > This is in RAM, of course. Increasing the size by 3KiB is not IMHO for > i.MX6 a problem, there is enough space in IRAM. But what is surprising > is that Fabio gets a Null pointer by malloc(). Yes, so I did a simpler patch that shows the mal

Re: [U-Boot] Using spi_alloc_slave() from SPL

2015-08-06 Thread Stefano Babic
Hi Marek, On 06/08/2015 16:28, Marek Vasut wrote: > On Thursday, August 06, 2015 at 04:14:34 PM, Fabio Estevam wrote: >> Hi Stefano and Marek, >> >> Thanks for the suggestions. >> >> On Thu, Aug 6, 2015 at 10:38 AM, Stefano Babic wrote: >>> There is the possibility to set a malloc area inside SPL

Re: [U-Boot] Using spi_alloc_slave() from SPL

2015-08-06 Thread Fabio Estevam
Hi Marek, On Thu, Aug 6, 2015 at 11:28 AM, Marek Vasut wrote: > You want to avoid this "CONFIG_SYS_SPL_MALLOC_*" stuff, as it increases the > SPL size by 3kiB compared to MALLOC_F . Also, MALLOC_F needs just the base > address of the malloc area to work (see my email). Thanks, I removed CONFIG_

Re: [U-Boot] Using spi_alloc_slave() from SPL

2015-08-06 Thread Marek Vasut
On Thursday, August 06, 2015 at 04:14:34 PM, Fabio Estevam wrote: > Hi Stefano and Marek, > > Thanks for the suggestions. > > On Thu, Aug 6, 2015 at 10:38 AM, Stefano Babic wrote: > > There is the possibility to set a malloc area inside SPL: > > > > CONFIG_SYS_SPL_MALLOC_START > > CONFIG_SYS_SP

Re: [U-Boot] Using spi_alloc_slave() from SPL

2015-08-06 Thread Fabio Estevam
Hi Stefano and Marek, Thanks for the suggestions. On Thu, Aug 6, 2015 at 10:38 AM, Stefano Babic 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

Re: [U-Boot] Using spi_alloc_slave() from SPL

2015-08-06 Thread Stefano Babic
Hi Fabio, On 06/08/2015 15:25, Fabio Estevam wrote: > Hi, > > I am trying to use spi_flash_probe() inside SPL on a custom mx6 board. > > The idea is to read some parameters from the SPI NOR flash and configure > the DDR accordingly. > > This is similar to what gw_ventana_spl.c does, but it read

Re: [U-Boot] Using spi_alloc_slave() from SPL

2015-08-06 Thread Marek Vasut
On Thursday, August 06, 2015 at 03:25:22 PM, Fabio Estevam wrote: > Hi, > > I am trying to use spi_flash_probe() inside SPL on a custom mx6 board. > > The idea is to read some parameters from the SPI NOR flash and configure > the DDR accordingly. > > This is similar to what gw_ventana_spl.c does

[U-Boot] Using spi_alloc_slave() from SPL

2015-08-06 Thread Fabio Estevam
Hi, I am trying to use spi_flash_probe() inside SPL on a custom mx6 board. The idea is to read some parameters from the SPI NOR flash and configure the DDR accordingly. This is similar to what gw_ventana_spl.c does, but it reads from i2c eeprom instead of SPI NOR. Here are the changes just to i