Using MTD_PHYSMAP_GPIO_ADDR

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

 



Hi All,

I'm having a little trouble understanding how to use the updated 
MTD_PHYSMAP_GPIO_ADDR support.

I think there is a bug introduced by commit ba32ce95cbd9 ("mtd: maps: 
Merge gpio-addr-flash.c into physmap-core.c") because I see nothing that 
sets info->gpio_values in the old gpio-addr-flash.c the equivalent was 
done in gf_set_gpios so I think maybe physmap_set_addr_gpios() needs this.

I'm also finding the devicetree binding a little hard to get right (or 
maybe I have got it right and there's just a bug).

What I have so far is

nor@20000000 {
         status = "okay";
         #address-cells = <1>;
         #size-cells = <1>;
         compatible = "cfi-flash", "jedec-flash";
         reg = <0x20000000 0x02000000>;
         ranges = <0 0x00000000 0x02000000
                   1 0x02000000 0x02000000>;
         bank-width = <2>;
         addr-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
         partition@0 {
                 label = "u-boot";
                 reg = <0x00000000 0x000c0000>;
         };
         ... more partitions
         partition@220000 {
                 label = "user";
                 reg = <0x00220000 0x03de0000>;
         };
};

What I have seems to pass the probe but it doesn't seem to be toggling 
the gpios and mounting the "user" partition fails.

# mount -t jffs2 /dev/mtdblock5 /mnt
jffs2: error: (1026) jffs2_do_read_inode_internal: CRC failed for 
read_inode of inode 1 at physical location 0x33dc1d8
mount: mounting /dev/mtdblock5 on /mnt failed: Input/output error

The hardware in question has a GPIO connected to ADDR24 of the flash chip.

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux