* Re: Boot using SPI-NOR device
[not found] <OF2C7718AB.DA224B8D-ONC1257E7C.002375F3-C1257E7C.0023CCF2@beijer.se>
@ 2015-07-08 12:32 ` Sascha Hauer
[not found] ` <OF33093548.0EB61029-ONC1257E7C.004A9EB9-C1257E7C.004A9EBC@beijer.se>
1 sibling, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2015-07-08 12:32 UTC (permalink / raw)
To: joacim.zetterling; +Cc: barebox
On Wed, Jul 08, 2015 at 08:31:02AM +0200, joacim.zetterling@westermo.se 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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread