Re: Boot using SPI-NOR device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 08, 2015 at 08:31:02AM +0200, joacim.zetterling@xxxxxxxxxxx wrote:
>    Hi
> 
>    I have some problem booting a linux from a spi-nor device (Spansion,
>    s25fl512s). There is no trouble booting up barebox from the first
>    partition.
>    When I debugged our system (ARM based) I find out that when we probe the
>    file system, we get -22 as a result code from a memmap(s->fd, PROT_READ)
>    function call.
>    With further investigations I see that memmap is set to 0 with no ops is
>    defined, witch probably means that I do not have any memory mapped spi.
> 
>    I add my partitions like this
>     addpart -n /dev/s25fl512s
>    2048k(barebox),24M(primary),24M(reserved),2048k(config),4096k(barebox-environment)
> 
>    And my dts section for the spi looks like this
>     ...
>     ...
>     spi: spi@10600 {
>       spi-flash@0 {
>          #address-cells = <1>;
>          #size-cells = <1>;
>          compatible = "s25fl512s", "nor-jedec";
>          spi-max-frequency = <20000000>;
>          reg = <0>; /* Chip select 0 */
>      };
>    };
>    ...
>    ...
> 
>    I also have all the configurations for spi, mtd and env in place.
>    And I have no issues reading/writing/erasing the spi flash.
> 
>    My simple question is. How do I enable memory mapped spi-nor support in
>    barebox?

That's not possible because spi-nor is never memory mapped. The good
news is that you won't need this. What exactly are you doing to get the
memmap error? Are you trying to use the 'go' command to start something
from spi-nor? Use bootm instead.

Regards,
 Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux