mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* SFI NOR sizes totally off ?!?
@ 2014-06-23  9:28 Holger Schurig
  2014-06-23  9:59 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Holger Schurig @ 2014-06-23  9:28 UTC (permalink / raw)
  To: barebox

Seems like "ls -l" is right, but "devinfo" is wrong:

barebox:/ ls -l /dev/m25p0
crw-------   67108864 /dev/m25p0
barebox:/ devinfo m25p0
Parameters:
  size: 5468012149590870304
  erasesize: 4096
  writesize: 1
  oobsize: 0
barebox:/ of_dump /soc/aips-bus@02000000/spba-bus@02000000/ecspi@02010000
ecspi@02010000 {
        #address-cells = <0x1>;
        #size-cells = <0x0>;
        compatible = "fsl,imx6q-ecspi", "fsl,imx51-ecspi";
        reg = <0x2010000 0x4000>;
        interrupts = <0x0 0x21 0x4>;
        clocks = <0x2 0x72 0x2 0x72>;
        clock-names = "ipg", "per";
        dmas = <0x4 0x7 0x7 0x1 0x4 0x8 0x7 0x2>;
        dma-names = "rx", "tx";
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <0x5>;
        fsl,spi-num-chipselects = <0x3>;
        cs-gpios = <0x6 0x18 0x0 0x6 0x19 0x0 0x6 0x1a 0x0>;
        spiflash@0 {
                #address-cells = <0x1>;
                #size-cells = <0x1>;
                compatible = "n25q512ax3", "m25p80";
                spi-max-frequency = <0x989680>;
                reg = <0x0>;
        };
};

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

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

* Re: SFI NOR sizes totally off ?!?
  2014-06-23  9:28 SFI NOR sizes totally off ?!? Holger Schurig
@ 2014-06-23  9:59 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2014-06-23  9:59 UTC (permalink / raw)
  To: Holger Schurig; +Cc: barebox

On Mon, Jun 23, 2014 at 11:28:09AM +0200, Holger Schurig wrote:
> Seems like "ls -l" is right, but "devinfo" is wrong:
> 
> barebox:/ ls -l /dev/m25p0
> crw-------   67108864 /dev/m25p0
> barebox:/ devinfo m25p0
> Parameters:
>   size: 5468012149590870304
>   erasesize: 4096
>   writesize: 1
>   oobsize: 0

This should be fixed with the following Commit.

Grumpf. We really need some stable strategy.

Sascha

commit 3ee907d89eaeaee5f75bd73eb89d2b4b3d05f6d4
Author: Herve Codina <Herve.CODINA@celad.com>
Date:   Thu Jun 12 11:37:38 2014 +0200

    mtd: use long long dev param for size
    
    Signed-off-by: Herve Codina <Herve.CODINA@celad.com>
    Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c
index d3e7763..82fb5f7 100644
--- a/drivers/mtd/core.c
+++ b/drivers/mtd/core.c
@@ -401,7 +401,7 @@ int add_mtd_device(struct mtd_info *mtd, char *devname, int device_id)
        mtd->cdev.mtd = mtd;
 
        if (IS_ENABLED(CONFIG_PARAMETER)) {
-               dev_add_param_int_ro(&mtd->class_dev, "size", mtd->size, "%llu");
+               dev_add_param_llint_ro(&mtd->class_dev, "size", mtd->size, "%llu");
                dev_add_param_int_ro(&mtd->class_dev, "erasesize", mtd->erasesize, "%u");
                dev_add_param_int_ro(&mtd->class_dev, "writesize", mtd->writesize, "%u");
                dev_add_param_int_ro(&mtd->class_dev, "oobsize", mtd->oobsize, "%u");


-- 
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

end of thread, other threads:[~2014-06-23 10:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-23  9:28 SFI NOR sizes totally off ?!? Holger Schurig
2014-06-23  9:59 ` Sascha Hauer

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