mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* Lost access to M25Pxx in move to 2013.01
@ 2013-02-02 16:35 George Pontis
  2013-02-02 17:56 ` Antony Pavlov
  0 siblings, 1 reply; 4+ messages in thread
From: George Pontis @ 2013-02-02 16:35 UTC (permalink / raw)
  To: barebox

Under 2012.11 I created a new board support package for custom hardware,
which included a M25P32. I store barebox and its environment there, and boot
from it. The board file also defines partitions for it. The first three look
like this:

        devfs_add_partition("m25p0",        0, 0x050000,
DEVFS_PARTITION_FIXED, "barebox");
        devfs_add_partition("m25p0", 0x050000, 0x010000,
DEVFS_PARTITION_FIXED, "env0");
        devfs_add_partition("m25p0", 0x060000, 0x330000,
DEVFS_PARTITION_FIXED, "kernel");

This created devices /dev/barebox, /dev/env0, and so on. It also allowed for
simple commands like "erase /dev/barebox", "tftp barebox.bin /dev/barebox",
etc.

More recently I updated to the 2013.01 release. My config file is not much
different and it still has enabled CONFIG_MTD, CONFIG_MTD_M25P80,
CONFIG_MTD_WRITE. The new release starts up just fine and boots the kernel
as usual. However, it does not see the M25P32.

With the earlier release, I saw a line displayed at startup as so:

m25p m25p0: m25p32 (4096 Kbytes)

Also, devinfo listed the partitions on the part. That m25p line is not
displayed with the 2013.01 release and there are no partitions. Devinfo does
show one line for the m25p driver.

Any suggestions where to look for a fix ?



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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Lost access to M25Pxx in move to 2013.01
  2013-02-02 16:35 Lost access to M25Pxx in move to 2013.01 George Pontis
@ 2013-02-02 17:56 ` Antony Pavlov
  2013-02-02 18:09   ` Eric Bénard
  2013-02-04 20:16   ` George Pontis
  0 siblings, 2 replies; 4+ messages in thread
From: Antony Pavlov @ 2013-02-02 17:56 UTC (permalink / raw)
  To: George Pontis; +Cc: barebox

On 2 February 2013 20:35, George Pontis <GPontis@z9.com> wrote:
> Under 2012.11 I created a new board support package for custom hardware,
> which included a M25P32. I store barebox and its environment there, and boot
> from it. The board file also defines partitions for it. The first three look
> like this:
>
>         devfs_add_partition("m25p0",        0, 0x050000,
> DEVFS_PARTITION_FIXED, "barebox");
>         devfs_add_partition("m25p0", 0x050000, 0x010000,
> DEVFS_PARTITION_FIXED, "env0");
>         devfs_add_partition("m25p0", 0x060000, 0x330000,
> DEVFS_PARTITION_FIXED, "kernel");
>
> This created devices /dev/barebox, /dev/env0, and so on. It also allowed for
> simple commands like "erase /dev/barebox", "tftp barebox.bin /dev/barebox",
> etc.
>
> More recently I updated to the 2013.01 release. My config file is not much
> different and it still has enabled CONFIG_MTD, CONFIG_MTD_M25P80,
> CONFIG_MTD_WRITE. The new release starts up just fine and boots the kernel
> as usual. However, it does not see the M25P32.
>
> With the earlier release, I saw a line displayed at startup as so:
>
> m25p m25p0: m25p32 (4096 Kbytes)
>
> Also, devinfo listed the partitions on the part. That m25p line is not
> displayed with the 2013.01 release and there are no partitions. Devinfo does
> show one line for the m25p driver.
>
> Any suggestions where to look for a fix ?

Some times ago I have got just the same problem: after rebasing to the
new barebox release the spi memory chips "disappeared".

Here is part of my board code. It works for old barebox release:

static struct spi_board_info board_spi_devs[] __initdata = {
       {
               /* Spansion S25FL004A SPI flash */
               .name           = "m25p",
               .max_speed_hz   = 50000000,
               .bus_num        = 0,
               .chip_select    = 0,
               .mode           = SPI_MODE_3,
               .platform_data  = &lig32_spi0_flash_data,
       }
...
       spi_register_board_info(board_spi_devs, ARRAY_SIZE(board_spi_devs));

I changed the 'name' field from "m25p" to "m25p80", and it works again!



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



-- 
Best regards,
  Antony Pavlov

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Lost access to M25Pxx in move to 2013.01
  2013-02-02 17:56 ` Antony Pavlov
@ 2013-02-02 18:09   ` Eric Bénard
  2013-02-04 20:16   ` George Pontis
  1 sibling, 0 replies; 4+ messages in thread
From: Eric Bénard @ 2013-02-02 18:09 UTC (permalink / raw)
  To: Antony Pavlov; +Cc: barebox, George Pontis

Hi Antony, Hi George,

Le Sat, 2 Feb 2013 21:56:26 +0400,
Antony Pavlov <antonynpavlov@gmail.com> a écrit :
> I changed the 'name' field from "m25p" to "m25p80", and it works again!
> 
check the comments (and the patch) in commit
1308d908ea6f1c6267007b485f3d8373bef9cf7f
for more details.

Eric

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Lost access to M25Pxx in move to 2013.01
  2013-02-02 17:56 ` Antony Pavlov
  2013-02-02 18:09   ` Eric Bénard
@ 2013-02-04 20:16   ` George Pontis
  1 sibling, 0 replies; 4+ messages in thread
From: George Pontis @ 2013-02-04 20:16 UTC (permalink / raw)
  To: barebox

> -----Original Message-----
> From: Antony Pavlov [mailto:antonynpavlov@gmail.com]
> Sent: Saturday, February 02, 2013 9:56 AM
> To: George Pontis
> Cc: barebox@lists.infradead.org
> Subject: Re: Lost access to M25Pxx in move to 2013.01
> 

...


> 
> Here is part of my board code. It works for old barebox release:
> 
> static struct spi_board_info board_spi_devs[] __initdata = {
>        {
>                /* Spansion S25FL004A SPI flash */
>                .name           = "m25p",
>                .max_speed_hz   = 50000000,
>                .bus_num        = 0,
>                .chip_select    = 0,
>                .mode           = SPI_MODE_3,
>                .platform_data  = &lig32_spi0_flash_data,
>        }
> ...
>        spi_register_board_info(board_spi_devs,
> ARRAY_SIZE(board_spi_devs));
> 
> I changed the 'name' field from "m25p" to "m25p80", and it works again!
> 
> 

This fixed it for me too, thanks for posting. This behavior is different
from the way that at least some kernels work. I was working with 3.4.6, and
there it prefers to see the name be the same as the actual hardware device.
So in my case the kernel expects .name to be "m25p32", and if it gets m25p80
it squawks a message saying what it really found was "m25p32".

GP



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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-02-04 20:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-02 16:35 Lost access to M25Pxx in move to 2013.01 George Pontis
2013-02-02 17:56 ` Antony Pavlov
2013-02-02 18:09   ` Eric Bénard
2013-02-04 20:16   ` George Pontis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox