]> Pileus Git - ~andy/linux/commitdiff
Merge git://git.infradead.org/mtd-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 6 Apr 2009 21:56:26 +0000 (14:56 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 6 Apr 2009 21:56:26 +0000 (14:56 -0700)
* git://git.infradead.org/mtd-2.6: (53 commits)
  [MTD] struct device - replace bus_id with dev_name(), dev_set_name()
  [MTD] [NOR] Fixup for Numonyx M29W128 chips
  [MTD] mtdpart: Make ecc_stats more realistic.
  powerpc/85xx: TQM8548: Update DTS file for multi-chip support
  powerpc: NAND: FSL UPM: document new bindings
  [MTD] [NAND] FSL-UPM: Add wait flags to support board/chip specific delays
  [MTD] [NAND] FSL-UPM: add multi chip support
  [MTD] [NOR] Add device parent info to physmap_of
  [MTD] [NAND] Add support for NAND on the Socrates board
  [MTD] [NAND] Add support for 4KiB pages.
  [MTD] sysfs support should not depend on CONFIG_PROC_FS
  [MTD] [NAND] Add parent info for CAFÉ controller
  [MTD] support driver model updates
  [MTD] driver model updates (part 2)
  [MTD] driver model updates
  [MTD] [NAND] move gen_nand's probe function to .devinit.text
  [MTD] [MAPS] move sa1100 flash's probe function to .devinit.text
  [MTD] fix use after free in register_mtd_blktrans
  [MTD] [MAPS] Drop now unused sharpsl-flash map
  [MTD] ofpart: Check name property to determine partition nodes.
  ...

Manually fix trivial conflict in drivers/mtd/maps/Makefile

1  2 
arch/blackfin/kernel/process.c
arch/powerpc/boot/dts/tqm8548-bigflash.dts
arch/powerpc/boot/dts/tqm8548.dts
drivers/mtd/maps/Kconfig
drivers/mtd/maps/Makefile
drivers/mtd/maps/sa1100-flash.c
drivers/mtd/nand/Kconfig
drivers/mtd/nand/mxc_nand.c
drivers/mtd/nand/nand_base.c
drivers/mtd/nand/pxa3xx_nand.c
fs/jffs2/acl.c

index f49427293ca1c48e688e1f95a92504d2d8fa0b0a,7f7ce076184ba8b492ee238dbc4112bc7fb8dedc..e040e03335ea3c54792e44651424bbad51db5728
@@@ -193,7 -193,7 +193,7 @@@ asmlinkage int bfin_clone(struct pt_reg
  }
  
  int
 -copy_thread(int nr, unsigned long clone_flags,
 +copy_thread(unsigned long clone_flags,
            unsigned long usp, unsigned long topstk,
            struct task_struct *p, struct pt_regs *regs)
  {
@@@ -337,7 -337,7 +337,7 @@@ int _access_ok(unsigned long addr, unsi
        if (addr >= memory_mtd_end && (addr + size) <= physical_mem_end)
                return 1;
  
- #ifdef CONFIG_ROMFS_MTD_FS
+ #ifdef CONFIG_ROMFS_ON_MTD
        /* For XIP, allow user space to use pointers within the ROMFS.  */
        if (addr >= memory_mtd_start && (addr + size) <= memory_mtd_end)
                return 1;
index 28b1a95257cdfd8d5986f971b8cdf318d2808537,21061145b58633731a030bf8f7367ec147fd3536..19aa72301c837348b7d04c91c0b167faa232569c
                        interrupt-parent = <&mpic>;
                        dfsrr;
  
 +                      dtt@50 {
 +                              compatible = "national,lm75";
 +                              reg = <0x50>;
 +                      };
 +
                        rtc@68 {
                                compatible = "dallas,ds1337";
                                reg = <0x68>;
                        };
                };
  
 -              mdio@24520 {
 -                      #address-cells = <1>;
 -                      #size-cells = <0>;
 -                      compatible = "fsl,gianfar-mdio";
 -                      reg = <0x24520 0x20>;
 -
 -                      phy1: ethernet-phy@0 {
 -                              interrupt-parent = <&mpic>;
 -                              interrupts = <8 1>;
 -                              reg = <1>;
 -                              device_type = "ethernet-phy";
 -                      };
 -                      phy2: ethernet-phy@1 {
 -                              interrupt-parent = <&mpic>;
 -                              interrupts = <8 1>;
 -                              reg = <2>;
 -                              device_type = "ethernet-phy";
 -                      };
 -                      phy3: ethernet-phy@3 {
 -                              interrupt-parent = <&mpic>;
 -                              interrupts = <8 1>;
 -                              reg = <3>;
 -                              device_type = "ethernet-phy";
 -                      };
 -                      phy4: ethernet-phy@4 {
 -                              interrupt-parent = <&mpic>;
 -                              interrupts = <8 1>;
 -                              reg = <4>;
 -                              device_type = "ethernet-phy";
 -                      };
 -                      phy5: ethernet-phy@5 {
 -                              interrupt-parent = <&mpic>;
 -                              interrupts = <8 1>;
 -                              reg = <5>;
 -                              device_type = "ethernet-phy";
 -                      };
 -                      tbi0: tbi-phy@11 {
 -                              reg = <0x11>;
 -                              device_type = "tbi-phy";
 -                      };
 -              };
 -
 -              mdio@25520 {
 -                      #address-cells = <1>;
 -                      #size-cells = <0>;
 -                      compatible = "fsl,gianfar-tbi";
 -                      reg = <0x25520 0x20>;
 -
 -                      tbi1: tbi-phy@11 {
 -                              reg = <0x11>;
 -                              device_type = "tbi-phy";
 -                      };
 -              };
 -
 -              mdio@26520 {
 -                      #address-cells = <1>;
 -                      #size-cells = <0>;
 -                      compatible = "fsl,gianfar-tbi";
 -                      reg = <0x26520 0x20>;
 -
 -                      tbi2: tbi-phy@11 {
 -                              reg = <0x11>;
 -                              device_type = "tbi-phy";
 -                      };
 -              };
 -
 -              mdio@27520 {
 -                      #address-cells = <1>;
 -                      #size-cells = <0>;
 -                      compatible = "fsl,gianfar-tbi";
 -                      reg = <0x27520 0x20>;
 -
 -                      tbi3: tbi-phy@11 {
 -                              reg = <0x11>;
 -                              device_type = "tbi-phy";
 -                      };
 -              };
 -
                enet0: ethernet@24000 {
 +                      #address-cells = <1>;
 +                      #size-cells = <1>;
                        cell-index = <0>;
                        device_type = "network";
                        model = "eTSEC";
                        compatible = "gianfar";
                        reg = <0x24000 0x1000>;
 +                      ranges = <0x0 0x24000 0x1000>;
                        local-mac-address = [ 00 00 00 00 00 00 ];
                        interrupts = <29 2 30 2 34 2>;
                        interrupt-parent = <&mpic>;
                        tbi-handle = <&tbi0>;
                        phy-handle = <&phy2>;
 +
 +                      mdio@520 {
 +                              #address-cells = <1>;
 +                              #size-cells = <0>;
 +                              compatible = "fsl,gianfar-mdio";
 +                              reg = <0x520 0x20>;
 +
 +                              phy1: ethernet-phy@0 {
 +                                      interrupt-parent = <&mpic>;
 +                                      interrupts = <8 1>;
 +                                      reg = <1>;
 +                                      device_type = "ethernet-phy";
 +                              };
 +                              phy2: ethernet-phy@1 {
 +                                      interrupt-parent = <&mpic>;
 +                                      interrupts = <8 1>;
 +                                      reg = <2>;
 +                                      device_type = "ethernet-phy";
 +                              };
 +                              phy3: ethernet-phy@3 {
 +                                      interrupt-parent = <&mpic>;
 +                                      interrupts = <8 1>;
 +                                      reg = <3>;
 +                                      device_type = "ethernet-phy";
 +                              };
 +                              phy4: ethernet-phy@4 {
 +                                      interrupt-parent = <&mpic>;
 +                                      interrupts = <8 1>;
 +                                      reg = <4>;
 +                                      device_type = "ethernet-phy";
 +                              };
 +                              phy5: ethernet-phy@5 {
 +                                      interrupt-parent = <&mpic>;
 +                                      interrupts = <8 1>;
 +                                      reg = <5>;
 +                                      device_type = "ethernet-phy";
 +                              };
 +                              tbi0: tbi-phy@11 {
 +                                      reg = <0x11>;
 +                                      device_type = "tbi-phy";
 +                              };
 +                      };
                };
  
                enet1: ethernet@25000 {
 +                      #address-cells = <1>;
 +                      #size-cells = <1>;
                        cell-index = <1>;
                        device_type = "network";
                        model = "eTSEC";
                        compatible = "gianfar";
                        reg = <0x25000 0x1000>;
 +                      ranges = <0x0 0x25000 0x1000>;
                        local-mac-address = [ 00 00 00 00 00 00 ];
                        interrupts = <35 2 36 2 40 2>;
                        interrupt-parent = <&mpic>;
                        tbi-handle = <&tbi1>;
                        phy-handle = <&phy1>;
 +
 +                      mdio@520 {
 +                              #address-cells = <1>;
 +                              #size-cells = <0>;
 +                              compatible = "fsl,gianfar-tbi";
 +                              reg = <0x520 0x20>;
 +
 +                              tbi1: tbi-phy@11 {
 +                                      reg = <0x11>;
 +                                      device_type = "tbi-phy";
 +                              };
 +                      };
                };
  
                enet2: ethernet@26000 {
 +                      #address-cells = <1>;
 +                      #size-cells = <1>;
                        cell-index = <2>;
                        device_type = "network";
                        model = "eTSEC";
                        compatible = "gianfar";
                        reg = <0x26000 0x1000>;
 +                      ranges = <0x0 0x26000 0x1000>;
                        local-mac-address = [ 00 00 00 00 00 00 ];
                        interrupts = <31 2 32 2 33 2>;
                        interrupt-parent = <&mpic>;
                        tbi-handle = <&tbi2>;
                        phy-handle = <&phy3>;
 +
 +                      mdio@520 {
 +                              #address-cells = <1>;
 +                              #size-cells = <0>;
 +                              compatible = "fsl,gianfar-tbi";
 +                              reg = <0x520 0x20>;
 +
 +                              tbi2: tbi-phy@11 {
 +                                      reg = <0x11>;
 +                                      device_type = "tbi-phy";
 +                              };
 +                      };
                };
  
                enet3: ethernet@27000 {
 +                      #address-cells = <1>;
 +                      #size-cells = <1>;
                        cell-index = <3>;
                        device_type = "network";
                        model = "eTSEC";
                        compatible = "gianfar";
                        reg = <0x27000 0x1000>;
 +                      ranges = <0x0 0x27000 0x1000>;
                        local-mac-address = [ 00 00 00 00 00 00 ];
                        interrupts = <37 2 38 2 39 2>;
                        interrupt-parent = <&mpic>;
                        tbi-handle = <&tbi3>;
                        phy-handle = <&phy4>;
 +
 +                      mdio@520 {
 +                              #address-cells = <1>;
 +                              #size-cells = <0>;
 +                              compatible = "fsl,gianfar-tbi";
 +                              reg = <0x520 0x20>;
 +
 +                              tbi3: tbi-phy@11 {
 +                                      reg = <0x11>;
 +                                      device_type = "tbi-phy";
 +                              };
 +                      };
                };
  
                serial0: serial@4500 {
                can0@2,0 {
                        compatible = "intel,82527"; // Bosch CC770
                        reg = <2 0x0 0x100>;
 -                      interrupts = <4 0>;
 +                      interrupts = <4 1>;
                        interrupt-parent = <&mpic>;
                };
  
                can1@2,100 {
                        compatible = "intel,82527"; // Bosch CC770
                        reg = <2 0x100 0x100>;
 -                      interrupts = <4 0>;
 +                      interrupts = <4 1>;
                        interrupt-parent = <&mpic>;
                };
  
                upm@3,0 {
                        #address-cells = <0>;
                        #size-cells = <0>;
-                       compatible = "fsl,upm-nand";
+                       compatible = "tqc,tqm8548-upm-nand", "fsl,upm-nand";
                        reg = <3 0x0 0x800>;
                        fsl,upm-addr-offset = <0x10>;
                        fsl,upm-cmd-offset = <0x08>;
+                       /* Micron MT29F8G08FAB multi-chip device */
+                       fsl,upm-addr-line-cs-offsets = <0x0 0x200>;
+                       fsl,upm-wait-flags = <0x5>;
                        chip-delay = <25>; // in micro-seconds
  
                        nand@0 {
  
                                partition@0 {
                                            label = "fs";
-                                           reg = <0x00000000 0x01000000>;
+                                           reg = <0x00000000 0x10000000>;
                                };
                        };
                };
index 826fb622cd3c4525f3f897401302016a97b8d53d,413c27fe4741b84d71d50eb438f3fe550222f7a3..49145a04fc6c2b892535036ec2b1de89a76e38b7
                        interrupt-parent = <&mpic>;
                        dfsrr;
  
 +                      dtt@50 {
 +                              compatible = "national,lm75";
 +                              reg = <0x50>;
 +                      };
 +
                        rtc@68 {
                                compatible = "dallas,ds1337";
                                reg = <0x68>;
                        };
                };
  
 -              mdio@24520 {
 -                      #address-cells = <1>;
 -                      #size-cells = <0>;
 -                      compatible = "fsl,gianfar-mdio";
 -                      reg = <0x24520 0x20>;
 -
 -                      phy1: ethernet-phy@0 {
 -                              interrupt-parent = <&mpic>;
 -                              interrupts = <8 1>;
 -                              reg = <1>;
 -                              device_type = "ethernet-phy";
 -                      };
 -                      phy2: ethernet-phy@1 {
 -                              interrupt-parent = <&mpic>;
 -                              interrupts = <8 1>;
 -                              reg = <2>;
 -                              device_type = "ethernet-phy";
 -                      };
 -                      phy3: ethernet-phy@3 {
 -                              interrupt-parent = <&mpic>;
 -                              interrupts = <8 1>;
 -                              reg = <3>;
 -                              device_type = "ethernet-phy";
 -                      };
 -                      phy4: ethernet-phy@4 {
 -                              interrupt-parent = <&mpic>;
 -                              interrupts = <8 1>;
 -                              reg = <4>;
 -                              device_type = "ethernet-phy";
 -                      };
 -                      phy5: ethernet-phy@5 {
 -                              interrupt-parent = <&mpic>;
 -                              interrupts = <8 1>;
 -                              reg = <5>;
 -                              device_type = "ethernet-phy";
 -                      };
 -                      tbi0: tbi-phy@11 {
 -                              reg = <0x11>;
 -                              device_type = "tbi-phy";
 -                      };
 -              };
 -
 -              mdio@25520 {
 -                      #address-cells = <1>;
 -                      #size-cells = <0>;
 -                      compatible = "fsl,gianfar-tbi";
 -                      reg = <0x25520 0x20>;
 -
 -                      tbi1: tbi-phy@11 {
 -                              reg = <0x11>;
 -                              device_type = "tbi-phy";
 -                      };
 -              };
 -
 -              mdio@26520 {
 -                      #address-cells = <1>;
 -                      #size-cells = <0>;
 -                      compatible = "fsl,gianfar-tbi";
 -                      reg = <0x26520 0x20>;
 -
 -                      tbi2: tbi-phy@11 {
 -                              reg = <0x11>;
 -                              device_type = "tbi-phy";
 -                      };
 -              };
 -
 -              mdio@27520 {
 -                      #address-cells = <1>;
 -                      #size-cells = <0>;
 -                      compatible = "fsl,gianfar-tbi";
 -                      reg = <0x27520 0x20>;
 -
 -                      tbi3: tbi-phy@11 {
 -                              reg = <0x11>;
 -                              device_type = "tbi-phy";
 -                      };
 -              };
 -
                enet0: ethernet@24000 {
 +                      #address-cells = <1>;
 +                      #size-cells = <1>;
                        cell-index = <0>;
                        device_type = "network";
                        model = "eTSEC";
                        compatible = "gianfar";
                        reg = <0x24000 0x1000>;
 +                      ranges = <0x0 0x24000 0x1000>;
                        local-mac-address = [ 00 00 00 00 00 00 ];
                        interrupts = <29 2 30 2 34 2>;
                        interrupt-parent = <&mpic>;
                        tbi-handle = <&tbi0>;
                        phy-handle = <&phy2>;
 +
 +                      mdio@520 {
 +                              #address-cells = <1>;
 +                              #size-cells = <0>;
 +                              compatible = "fsl,gianfar-mdio";
 +                              reg = <0x520 0x20>;
 +
 +                              phy1: ethernet-phy@0 {
 +                                      interrupt-parent = <&mpic>;
 +                                      interrupts = <8 1>;
 +                                      reg = <1>;
 +                                      device_type = "ethernet-phy";
 +                              };
 +                              phy2: ethernet-phy@1 {
 +                                      interrupt-parent = <&mpic>;
 +                                      interrupts = <8 1>;
 +                                      reg = <2>;
 +                                      device_type = "ethernet-phy";
 +                              };
 +                              phy3: ethernet-phy@3 {
 +                                      interrupt-parent = <&mpic>;
 +                                      interrupts = <8 1>;
 +                                      reg = <3>;
 +                                      device_type = "ethernet-phy";
 +                              };
 +                              phy4: ethernet-phy@4 {
 +                                      interrupt-parent = <&mpic>;
 +                                      interrupts = <8 1>;
 +                                      reg = <4>;
 +                                      device_type = "ethernet-phy";
 +                              };
 +                              phy5: ethernet-phy@5 {
 +                                      interrupt-parent = <&mpic>;
 +                                      interrupts = <8 1>;
 +                                      reg = <5>;
 +                                      device_type = "ethernet-phy";
 +                              };
 +                              tbi0: tbi-phy@11 {
 +                                      reg = <0x11>;
 +                                      device_type = "tbi-phy";
 +                              };
 +                      };
                };
  
                enet1: ethernet@25000 {
 +                      #address-cells = <1>;
 +                      #size-cells = <1>;
                        cell-index = <1>;
                        device_type = "network";
                        model = "eTSEC";
                        compatible = "gianfar";
                        reg = <0x25000 0x1000>;
 +                      ranges = <0x0 0x25000 0x1000>;
                        local-mac-address = [ 00 00 00 00 00 00 ];
                        interrupts = <35 2 36 2 40 2>;
                        interrupt-parent = <&mpic>;
                        tbi-handle = <&tbi1>;
                        phy-handle = <&phy1>;
 +
 +                      mdio@520 {
 +                              #address-cells = <1>;
 +                              #size-cells = <0>;
 +                              compatible = "fsl,gianfar-tbi";
 +                              reg = <0x520 0x20>;
 +
 +                              tbi1: tbi-phy@11 {
 +                                      reg = <0x11>;
 +                                      device_type = "tbi-phy";
 +                              };
 +                      };
                };
  
                enet2: ethernet@26000 {
 +                      #address-cells = <1>;
 +                      #size-cells = <1>;
                        cell-index = <2>;
                        device_type = "network";
                        model = "eTSEC";
                        compatible = "gianfar";
                        reg = <0x26000 0x1000>;
 +                      ranges = <0x0 0x26000 0x1000>;
                        local-mac-address = [ 00 00 00 00 00 00 ];
                        interrupts = <31 2 32 2 33 2>;
                        interrupt-parent = <&mpic>;
                        tbi-handle = <&tbi2>;
                        phy-handle = <&phy3>;
 +
 +                      mdio@520 {
 +                              #address-cells = <1>;
 +                              #size-cells = <0>;
 +                              compatible = "fsl,gianfar-tbi";
 +                              reg = <0x520 0x20>;
 +
 +                              tbi2: tbi-phy@11 {
 +                                      reg = <0x11>;
 +                                      device_type = "tbi-phy";
 +                              };
 +                      };
                };
  
                enet3: ethernet@27000 {
 +                      #address-cells = <1>;
 +                      #size-cells = <1>;
                        cell-index = <3>;
                        device_type = "network";
                        model = "eTSEC";
                        compatible = "gianfar";
                        reg = <0x27000 0x1000>;
 +                      ranges = <0x0 0x27000 0x1000>;
                        local-mac-address = [ 00 00 00 00 00 00 ];
                        interrupts = <37 2 38 2 39 2>;
                        interrupt-parent = <&mpic>;
                        tbi-handle = <&tbi3>;
                        phy-handle = <&phy4>;
 +
 +                      mdio@520 {
 +                              #address-cells = <1>;
 +                              #size-cells = <0>;
 +                              compatible = "fsl,gianfar-tbi";
 +                              reg = <0x520 0x20>;
 +
 +                              tbi3: tbi-phy@11 {
 +                                      reg = <0x11>;
 +                                      device_type = "tbi-phy";
 +                              };
 +                      };
                };
  
                serial0: serial@4500 {
                can0@2,0 {
                        compatible = "intel,82527"; // Bosch CC770
                        reg = <2 0x0 0x100>;
 -                      interrupts = <4 0>;
 +                      interrupts = <4 1>;
                        interrupt-parent = <&mpic>;
                };
  
                can1@2,100 {
                        compatible = "intel,82527"; // Bosch CC770
                        reg = <2 0x100 0x100>;
 -                      interrupts = <4 0>;
 +                      interrupts = <4 1>;
                        interrupt-parent = <&mpic>;
                };
  
                upm@3,0 {
                        #address-cells = <0>;
                        #size-cells = <0>;
-                       compatible = "fsl,upm-nand";
+                       compatible = "tqc,tqm8548-upm-nand", "fsl,upm-nand";
                        reg = <3 0x0 0x800>;
                        fsl,upm-addr-offset = <0x10>;
                        fsl,upm-cmd-offset = <0x08>;
+                       /* Micron MT29F8G08FAB multi-chip device */
+                       fsl,upm-addr-line-cs-offsets = <0x0 0x200>;
+                       fsl,upm-wait-flags = <0x5>;
                        chip-delay = <25>; // in micro-seconds
  
                        nand@0 {
  
                                partition@0 {
                                            label = "fs";
-                                           reg = <0x00000000 0x01000000>;
+                                           reg = <0x00000000 0x10000000>;
                                };
                        };
                };
diff --combined drivers/mtd/maps/Kconfig
index 729f899a5cd5d71725ab137715d2c5b1c8a45789,a2d9b95bcdd7397db1a2e79e2fccd1df9693bb73..82923bd2d9c5444166c53552a409f27ebb646e50
@@@ -529,12 -529,6 +529,6 @@@ config MTD_DMV18
          help
            Map driver for Dy-4 SVME/DMV-182 board.
  
- config MTD_SHARP_SL
-       tristate "ROM mapped on Sharp SL Series"
-       depends on ARCH_PXA
-       help
-         This enables access to the flash chip on the Sharp SL Series of PDAs.
  config MTD_INTEL_VR_NOR
        tristate "NOR flash on Intel Vermilion Range Expansion Bus CS0"
        depends on PCI
          Map driver for a NOR flash bank located on the Expansion Bus of the
          Intel Vermilion Range chipset.
  
+ config MTD_RBTX4939
+       tristate "Map driver for RBTX4939 board"
+       depends on TOSHIBA_RBTX4939 && MTD_CFI && MTD_COMPLEX_MAPPINGS
+       help
+         Map driver for NOR flash chips on RBTX4939 board.
  config MTD_PLATRAM
        tristate "Map driver for platform device RAM (mtd-ram)"
        select MTD_RAM
  
          This selection automatically selects the map_ram driver.
  
 -endmenu
 +config MTD_VMU
 +      tristate "Map driver for Dreamcast VMU"
 +      depends on MAPLE
 +      help
 +        This driver enables access to the Dreamcast Visual Memory Unit (VMU).
 +
 +        Most Dreamcast users will want to say Y here.
  
 +        To build this as a module select M here, the module will be called
 +        vmu-flash.
 +
 +endmenu
index 26b28a7a90b5e19a57baf21502d2dd94fdc349a7,ba62013485a78e490eb614584b96448ce608cc17..2dbc1bec848808559f4bc52995eda5ee06fb8dad
@@@ -56,9 -56,8 +56,9 @@@ obj-$(CONFIG_MTD_IXP4XX)      += ixp4xx.
  obj-$(CONFIG_MTD_IXP2000)     += ixp2000.o
  obj-$(CONFIG_MTD_WRSBC8260)   += wr_sbc82xx_flash.o
  obj-$(CONFIG_MTD_DMV182)      += dmv182.o
- obj-$(CONFIG_MTD_SHARP_SL)    += sharpsl-flash.o
  obj-$(CONFIG_MTD_PLATRAM)     += plat-ram.o
  obj-$(CONFIG_MTD_OMAP_NOR)    += omap_nor.o
  obj-$(CONFIG_MTD_INTEL_VR_NOR)        += intel_vr_nor.o
  obj-$(CONFIG_MTD_BFIN_ASYNC)  += bfin-async-flash.o
+ obj-$(CONFIG_MTD_RBTX4939)    += rbtx4939-flash.o
 +obj-$(CONFIG_MTD_VMU)         += vmu-flash.o
index 8f57b6f40aa2d3cfef54db252a3b9d63f9d47974,1757ab01b0e488c66de1c42e86534fef3443c41e..05e9362dc7f0fdd252d7c7ecb5d6922cf000de98
@@@ -12,7 -12,6 +12,7 @@@
  #include <linux/slab.h>
  #include <linux/platform_device.h>
  #include <linux/err.h>
 +#include <linux/io.h>
  
  #include <linux/mtd/mtd.h>
  #include <linux/mtd/map.h>
@@@ -20,6 -19,7 +20,6 @@@
  #include <linux/mtd/concat.h>
  
  #include <mach/hardware.h>
 -#include <asm/io.h>
  #include <asm/sizes.h>
  #include <asm/mach/flash.h>
  
@@@ -351,7 -351,7 +351,7 @@@ sa1100_setup_mtd(struct platform_devic
  
  static const char *part_probes[] = { "cmdlinepart", "RedBoot", NULL };
  
- static int __init sa1100_mtd_probe(struct platform_device *pdev)
+ static int __devinit sa1100_mtd_probe(struct platform_device *pdev)
  {
        struct flash_platform_data *plat = pdev->dev.platform_data;
        struct mtd_partition *parts;
diff --combined drivers/mtd/nand/Kconfig
index 2ff88791cebc359aae7b830a18cf5b9679ec15b4,3419944c8892804ba9c13df24eab665169223ceb..890936d0275ed21b957e2a46a9af52764a1fe28b
@@@ -273,7 -273,7 +273,7 @@@ config MTD_NAND_CAF
  
  config MTD_NAND_CS553X
        tristate "NAND support for CS5535/CS5536 (AMD Geode companion chip)"
 -      depends on X86_32 && (X86_PC || X86_GENERICARCH)
 +      depends on X86_32
        help
          The CS553x companion chips for the AMD Geode processor
          include NAND flash controllers with built-in hardware ECC
@@@ -334,7 -334,7 +334,7 @@@ config MTD_NAND_ATMEL_ECC_NON
  endchoice
  
  config MTD_NAND_PXA3xx
-       bool "Support for NAND flash devices on PXA3xx"
+       tristate "Support for NAND flash devices on PXA3xx"
        depends on MTD_NAND && PXA3xx
        help
          This enables the driver for the NAND flash device found on
@@@ -427,4 -427,23 +427,23 @@@ config MTD_NAND_SH_FLCT
          Several Renesas SuperH CPU has FLCTL. This option enables support
          for NAND Flash using FLCTL. This driver support SH7723.
  
+ config MTD_NAND_DAVINCI
+         tristate "Support NAND on DaVinci SoC"
+         depends on ARCH_DAVINCI
+         help
+         Enable the driver for NAND flash chips on Texas Instruments
+         DaVinci processors.
+ config MTD_NAND_TXX9NDFMC
+       tristate "NAND Flash support for TXx9 SoC"
+       depends on SOC_TX4938 || SOC_TX4939
+       help
+         This enables the NAND flash controller on the TXx9 SoCs.
+ config MTD_NAND_SOCRATES
+       tristate "Support for NAND on Socrates board"
+       depends on MTD_NAND && SOCRATES
+       help
+         Enables support for NAND Flash chips wired onto Socrates board.
  endif # MTD_NAND
index bad048aca89af040b48248bd7e3852365c143044,bfde74a9ba6bdab6b3f8683a2c4c858fcf74a37a..f3548d0480142cb5fa8c5e599ff3b8add7b91e97
@@@ -866,6 -866,7 +866,7 @@@ static int __init mxcnd_probe(struct pl
        mtd = &host->mtd;
        mtd->priv = this;
        mtd->owner = THIS_MODULE;
+       mtd->dev.parent = &pdev->dev;
  
        /* 50 us command delay time */
        this->chip_delay = 5;
        this->read_buf = mxc_nand_read_buf;
        this->verify_buf = mxc_nand_verify_buf;
  
 -      host->clk = clk_get(&pdev->dev, "nfc_clk");
 +      host->clk = clk_get(&pdev->dev, "nfc");
        if (IS_ERR(host->clk))
                goto eclk;
  
index 5f71371eb1b085ce6ad469d0120264dbc5bb1f33,facee262b4ba7fa257874ecc3f6c0fd857be7015..3d7ed432fa4157ec9d655c3354c4c1edc699ebc8
@@@ -82,6 -82,20 +82,20 @@@ static struct nand_ecclayout nand_oob_6
                 .length = 38}}
  };
  
+ static struct nand_ecclayout nand_oob_128 = {
+       .eccbytes = 48,
+       .eccpos = {
+                  80, 81, 82, 83, 84, 85, 86, 87,
+                  88, 89, 90, 91, 92, 93, 94, 95,
+                  96, 97, 98, 99, 100, 101, 102, 103,
+                  104, 105, 106, 107, 108, 109, 110, 111,
+                  112, 113, 114, 115, 116, 117, 118, 119,
+                  120, 121, 122, 123, 124, 125, 126, 127},
+       .oobfree = {
+               {.offset = 2,
+                .length = 78}}
+ };
  static int nand_get_device(struct nand_chip *chip, struct mtd_info *mtd,
                           int new_state);
  
@@@ -748,6 -762,8 +762,8 @@@ static int nand_wait(struct mtd_info *m
   * @mtd:      mtd info structure
   * @chip:     nand chip info structure
   * @buf:      buffer to store read data
+  *
+  * Not for syndrome calculating ecc controllers, which use a special oob layout
   */
  static int nand_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
                              uint8_t *buf)
        return 0;
  }
  
+ /**
+  * nand_read_page_raw_syndrome - [Intern] read raw page data without ecc
+  * @mtd:      mtd info structure
+  * @chip:     nand chip info structure
+  * @buf:      buffer to store read data
+  *
+  * We need a special oob layout and handling even when OOB isn't used.
+  */
+ static int nand_read_page_raw_syndrome(struct mtd_info *mtd, struct nand_chip *chip,
+                             uint8_t *buf)
+ {
+       int eccsize = chip->ecc.size;
+       int eccbytes = chip->ecc.bytes;
+       uint8_t *oob = chip->oob_poi;
+       int steps, size;
+       for (steps = chip->ecc.steps; steps > 0; steps--) {
+               chip->read_buf(mtd, buf, eccsize);
+               buf += eccsize;
+               if (chip->ecc.prepad) {
+                       chip->read_buf(mtd, oob, chip->ecc.prepad);
+                       oob += chip->ecc.prepad;
+               }
+               chip->read_buf(mtd, oob, eccbytes);
+               oob += eccbytes;
+               if (chip->ecc.postpad) {
+                       chip->read_buf(mtd, oob, chip->ecc.postpad);
+                       oob += chip->ecc.postpad;
+               }
+       }
+       size = mtd->oobsize - (oob - chip->oob_poi);
+       if (size)
+               chip->read_buf(mtd, oob, size);
+       return 0;
+ }
  /**
   * nand_read_page_swecc - [REPLACABLE] software ecc based page read function
   * @mtd:      mtd info structure
@@@ -1482,6 -1539,8 +1539,8 @@@ static int nand_read_oob(struct mtd_inf
   * @mtd:      mtd info structure
   * @chip:     nand chip info structure
   * @buf:      data buffer
+  *
+  * Not for syndrome calculating ecc controllers, which use a special oob layout
   */
  static void nand_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
                                const uint8_t *buf)
        chip->write_buf(mtd, chip->oob_poi, mtd->oobsize);
  }
  
+ /**
+  * nand_write_page_raw_syndrome - [Intern] raw page write function
+  * @mtd:      mtd info structure
+  * @chip:     nand chip info structure
+  * @buf:      data buffer
+  *
+  * We need a special oob layout and handling even when ECC isn't checked.
+  */
+ static void nand_write_page_raw_syndrome(struct mtd_info *mtd, struct nand_chip *chip,
+                               const uint8_t *buf)
+ {
+       int eccsize = chip->ecc.size;
+       int eccbytes = chip->ecc.bytes;
+       uint8_t *oob = chip->oob_poi;
+       int steps, size;
+       for (steps = chip->ecc.steps; steps > 0; steps--) {
+               chip->write_buf(mtd, buf, eccsize);
+               buf += eccsize;
+               if (chip->ecc.prepad) {
+                       chip->write_buf(mtd, oob, chip->ecc.prepad);
+                       oob += chip->ecc.prepad;
+               }
+               chip->read_buf(mtd, oob, eccbytes);
+               oob += eccbytes;
+               if (chip->ecc.postpad) {
+                       chip->write_buf(mtd, oob, chip->ecc.postpad);
+                       oob += chip->ecc.postpad;
+               }
+       }
+       size = mtd->oobsize - (oob - chip->oob_poi);
+       if (size)
+               chip->write_buf(mtd, oob, size);
+ }
  /**
   * nand_write_page_swecc - [REPLACABLE] software ecc based page write function
   * @mtd:      mtd info structure
@@@ -1863,7 -1960,7 +1960,7 @@@ static int nand_do_write_oob(struct mtd
        }
  
        if (unlikely(ops->ooboffs >= len)) {
-               DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: "
+               DEBUG(MTD_DEBUG_LEVEL0, "nand_do_write_oob: "
                        "Attempt to start write outside oob\n");
                return -EINVAL;
        }
                     ops->ooboffs + ops->ooblen >
                        ((mtd->size >> chip->page_shift) -
                         (to >> chip->page_shift)) * len)) {
-               DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: "
+               DEBUG(MTD_DEBUG_LEVEL0, "nand_do_write_oob: "
                        "Attempt write beyond end of device\n");
                return -EINVAL;
        }
@@@ -1929,8 -2026,8 +2026,8 @@@ static int nand_write_oob(struct mtd_in
  
        /* Do not allow writes past end of device */
        if (ops->datbuf && (to + ops->len) > mtd->size) {
-               DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: "
-                     "Attempt read beyond end of device\n");
+               DEBUG(MTD_DEBUG_LEVEL0, "nand_write_oob: "
+                     "Attempt write beyond end of device\n");
                return -EINVAL;
        }
  
@@@ -2555,6 -2652,9 +2652,9 @@@ int nand_scan_tail(struct mtd_info *mtd
                case 64:
                        chip->ecc.layout = &nand_oob_64;
                        break;
+               case 128:
+                       chip->ecc.layout = &nand_oob_128;
+                       break;
                default:
                        printk(KERN_WARNING "No oob scheme defined for "
                               "oobsize %d\n", mtd->oobsize);
         * check ECC mode, default to software if 3byte/512byte hardware ECC is
         * selected and we have 256 byte pagesize fallback to software ECC
         */
-       if (!chip->ecc.read_page_raw)
-               chip->ecc.read_page_raw = nand_read_page_raw;
-       if (!chip->ecc.write_page_raw)
-               chip->ecc.write_page_raw = nand_write_page_raw;
  
        switch (chip->ecc.mode) {
        case NAND_ECC_HW:
                        chip->ecc.read_page = nand_read_page_hwecc;
                if (!chip->ecc.write_page)
                        chip->ecc.write_page = nand_write_page_hwecc;
+               if (!chip->ecc.read_page_raw)
+                       chip->ecc.read_page_raw = nand_read_page_raw;
+               if (!chip->ecc.write_page_raw)
+                       chip->ecc.write_page_raw = nand_write_page_raw;
                if (!chip->ecc.read_oob)
                        chip->ecc.read_oob = nand_read_oob_std;
                if (!chip->ecc.write_oob)
                        chip->ecc.read_page = nand_read_page_syndrome;
                if (!chip->ecc.write_page)
                        chip->ecc.write_page = nand_write_page_syndrome;
+               if (!chip->ecc.read_page_raw)
+                       chip->ecc.read_page_raw = nand_read_page_raw_syndrome;
+               if (!chip->ecc.write_page_raw)
+                       chip->ecc.write_page_raw = nand_write_page_raw_syndrome;
                if (!chip->ecc.read_oob)
                        chip->ecc.read_oob = nand_read_oob_syndrome;
                if (!chip->ecc.write_oob)
                chip->ecc.read_page = nand_read_page_swecc;
                chip->ecc.read_subpage = nand_read_subpage;
                chip->ecc.write_page = nand_write_page_swecc;
+               chip->ecc.read_page_raw = nand_read_page_raw;
+               chip->ecc.write_page_raw = nand_write_page_raw;
                chip->ecc.read_oob = nand_read_oob_std;
                chip->ecc.write_oob = nand_write_oob_std;
                chip->ecc.size = 256;
                chip->ecc.read_page = nand_read_page_raw;
                chip->ecc.write_page = nand_write_page_raw;
                chip->ecc.read_oob = nand_read_oob_std;
+               chip->ecc.read_page_raw = nand_read_page_raw;
+               chip->ecc.write_page_raw = nand_write_page_raw;
                chip->ecc.write_oob = nand_write_oob_std;
                chip->ecc.size = mtd->writesize;
                chip->ecc.bytes = 0;
                        break;
                case 4:
                case 8:
+               case 16:
                        mtd->subpage_sft = 2;
                        break;
                }
        return chip->scan_bbt(mtd);
  }
  
 -/* module_text_address() isn't exported, and it's mostly a pointless
 +/* is_module_text_address() isn't exported, and it's mostly a pointless
     test if this is a module _anyway_ -- they'd have to try _really_ hard
     to call us from in-kernel code if the core NAND support is modular. */
  #ifdef MODULE
  #define caller_is_module() (1)
  #else
  #define caller_is_module() \
 -      module_text_address((unsigned long)__builtin_return_address(0))
 +      is_module_text_address((unsigned long)__builtin_return_address(0))
  #endif
  
  /**
index 61b69cc4000956cee468f116653bc5766fa1037f,2857a6a37b5ca0cafd27a4ca6a422acfd58f26b7..30a8ce6d3e69bcdc1f0429daafacd06115baf06e
@@@ -22,6 -22,7 +22,6 @@@
  #include <linux/irq.h>
  
  #include <mach/dma.h>
 -#include <mach/pxa-regs.h>
  #include <mach/pxa3xx_nand.h>
  
  #define       CHIP_DELAY_TIMEOUT      (2 * HZ/10)
@@@ -170,7 -171,13 +170,13 @@@ static int use_dma = 1
  module_param(use_dma, bool, 0444);
  MODULE_PARM_DESC(use_dma, "enable DMA for data transfering to/from NAND HW");
  
- #ifdef CONFIG_MTD_NAND_PXA3xx_BUILTIN
+ /*
+  * Default NAND flash controller configuration setup by the
+  * bootloader. This configuration is used only when pdata->keep_config is set
+  */
+ static struct pxa3xx_nand_timing default_timing;
+ static struct pxa3xx_nand_flash default_flash;
  static struct pxa3xx_nand_cmdset smallpage_cmdset = {
        .read1          = 0x0000,
        .read2          = 0x0050,
@@@ -197,6 -204,7 +203,7 @@@ static struct pxa3xx_nand_cmdset largep
        .lock_status    = 0x007A,
  };
  
+ #ifdef CONFIG_MTD_NAND_PXA3xx_BUILTIN
  static struct pxa3xx_nand_timing samsung512MbX16_timing = {
        .tCH    = 10,
        .tCS    = 0,
@@@ -296,9 -304,23 +303,23 @@@ static struct pxa3xx_nand_flash *builti
  #define NDTR1_tWHR(c) (min((c), 15) << 4)
  #define NDTR1_tAR(c)  (min((c), 15) << 0)
  
+ #define tCH_NDTR0(r)  (((r) >> 19) & 0x7)
+ #define tCS_NDTR0(r)  (((r) >> 16) & 0x7)
+ #define tWH_NDTR0(r)  (((r) >> 11) & 0x7)
+ #define tWP_NDTR0(r)  (((r) >> 8) & 0x7)
+ #define tRH_NDTR0(r)  (((r) >> 3) & 0x7)
+ #define tRP_NDTR0(r)  (((r) >> 0) & 0x7)
+ #define tR_NDTR1(r)   (((r) >> 16) & 0xffff)
+ #define tWHR_NDTR1(r) (((r) >> 4) & 0xf)
+ #define tAR_NDTR1(r)  (((r) >> 0) & 0xf)
  /* convert nano-seconds to nand flash controller clock cycles */
  #define ns2cycle(ns, clk)     (int)(((ns) * (clk / 1000000) / 1000) - 1)
  
+ /* convert nand flash controller clock cycles to nano-seconds */
+ #define cycle2ns(c, clk)      ((((c) + 1) * 1000000 + clk / 500) / (clk / 1000))
  static void pxa3xx_nand_set_timing(struct pxa3xx_nand_info *info,
                                   const struct pxa3xx_nand_timing *t)
  {
@@@ -920,6 -942,82 +941,82 @@@ static int pxa3xx_nand_config_flash(str
        return 0;
  }
  
+ static void pxa3xx_nand_detect_timing(struct pxa3xx_nand_info *info,
+                                     struct pxa3xx_nand_timing *t)
+ {
+       unsigned long nand_clk = clk_get_rate(info->clk);
+       uint32_t ndtr0 = nand_readl(info, NDTR0CS0);
+       uint32_t ndtr1 = nand_readl(info, NDTR1CS0);
+       t->tCH = cycle2ns(tCH_NDTR0(ndtr0), nand_clk);
+       t->tCS = cycle2ns(tCS_NDTR0(ndtr0), nand_clk);
+       t->tWH = cycle2ns(tWH_NDTR0(ndtr0), nand_clk);
+       t->tWP = cycle2ns(tWP_NDTR0(ndtr0), nand_clk);
+       t->tRH = cycle2ns(tRH_NDTR0(ndtr0), nand_clk);
+       t->tRP = cycle2ns(tRP_NDTR0(ndtr0), nand_clk);
+       t->tR = cycle2ns(tR_NDTR1(ndtr1), nand_clk);
+       t->tWHR = cycle2ns(tWHR_NDTR1(ndtr1), nand_clk);
+       t->tAR = cycle2ns(tAR_NDTR1(ndtr1), nand_clk);
+ }
+ static int pxa3xx_nand_detect_config(struct pxa3xx_nand_info *info)
+ {
+       uint32_t ndcr = nand_readl(info, NDCR);
+       struct nand_flash_dev *type = NULL;
+       uint32_t id = -1;
+       int i;
+       default_flash.page_per_block = ndcr & NDCR_PG_PER_BLK ? 64 : 32;
+       default_flash.page_size = ndcr & NDCR_PAGE_SZ ? 2048 : 512;
+       default_flash.flash_width = ndcr & NDCR_DWIDTH_M ? 16 : 8;
+       default_flash.dfc_width = ndcr & NDCR_DWIDTH_C ? 16 : 8;
+       if (default_flash.page_size == 2048)
+               default_flash.cmdset = &largepage_cmdset;
+       else
+               default_flash.cmdset = &smallpage_cmdset;
+       /* set info fields needed to __readid */
+       info->flash_info = &default_flash;
+       info->read_id_bytes = (default_flash.page_size == 2048) ? 4 : 2;
+       info->reg_ndcr = ndcr;
+       if (__readid(info, &id))
+               return -ENODEV;
+       /* Lookup the flash id */
+       id = (id >> 8) & 0xff;          /* device id is byte 2 */
+       for (i = 0; nand_flash_ids[i].name != NULL; i++) {
+               if (id == nand_flash_ids[i].id) {
+                       type =  &nand_flash_ids[i];
+                       break;
+               }
+       }
+       if (!type)
+               return -ENODEV;
+       /* fill the missing flash information */
+       i = __ffs(default_flash.page_per_block * default_flash.page_size);
+       default_flash.num_blocks = type->chipsize << (20 - i);
+       info->oob_size = (default_flash.page_size == 2048) ? 64 : 16;
+       /* calculate addressing information */
+       info->col_addr_cycles = (default_flash.page_size == 2048) ? 2 : 1;
+       if (default_flash.num_blocks * default_flash.page_per_block > 65536)
+               info->row_addr_cycles = 3;
+       else
+               info->row_addr_cycles = 2;
+       pxa3xx_nand_detect_timing(info, &default_timing);
+       default_flash.timing = &default_timing;
+       return 0;
+ }
  static int pxa3xx_nand_detect_flash(struct pxa3xx_nand_info *info,
                                    const struct pxa3xx_nand_platform_data *pdata)
  {
        uint32_t id = -1;
        int i;
  
+       if (pdata->keep_config)
+               if (pxa3xx_nand_detect_config(info) == 0)
+                       return 0;
        for (i = 0; i<pdata->num_flash; ++i) {
                f = pdata->flash + i;
  
@@@ -1078,6 -1180,7 +1179,7 @@@ static int pxa3xx_nand_probe(struct pla
  
        this = &info->nand_chip;
        mtd->priv = info;
+       mtd->owner = THIS_MODULE;
  
        info->clk = clk_get(&pdev->dev, NULL);
        if (IS_ERR(info->clk)) {
                goto fail_put_clk;
        }
  
-       r = request_mem_region(r->start, r->end - r->start + 1, pdev->name);
+       r = request_mem_region(r->start, resource_size(r), pdev->name);
        if (r == NULL) {
                dev_err(&pdev->dev, "failed to request memory resource\n");
                ret = -EBUSY;
                goto fail_put_clk;
        }
  
-       info->mmio_base = ioremap(r->start, r->end - r->start + 1);
+       info->mmio_base = ioremap(r->start, resource_size(r));
        if (info->mmio_base == NULL) {
                dev_err(&pdev->dev, "ioremap() failed\n");
                ret = -ENODEV;
@@@ -1173,7 -1276,7 +1275,7 @@@ fail_free_buf
  fail_free_io:
        iounmap(info->mmio_base);
  fail_free_res:
-       release_mem_region(r->start, r->end - r->start + 1);
+       release_mem_region(r->start, resource_size(r));
  fail_put_clk:
        clk_disable(info->clk);
        clk_put(info->clk);
@@@ -1186,6 -1289,7 +1288,7 @@@ static int pxa3xx_nand_remove(struct pl
  {
        struct mtd_info *mtd = platform_get_drvdata(pdev);
        struct pxa3xx_nand_info *info = mtd->priv;
+       struct resource *r;
  
        platform_set_drvdata(pdev, NULL);
  
                                info->data_buff, info->data_buff_phys);
        } else
                kfree(info->data_buff);
+       iounmap(info->mmio_base);
+       r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       release_mem_region(r->start, resource_size(r));
+       clk_disable(info->clk);
+       clk_put(info->clk);
        kfree(mtd);
        return 0;
  }
diff --combined fs/jffs2/acl.c
index 77ccf8cb0823c805ff9af233aba63404d0df01a2,6e63e8b41066d9b41ad5f782ded428608cf69994..043740dde20c75fb317bfdedac040abedf9004aa
@@@ -38,12 -38,12 +38,12 @@@ static int jffs2_acl_count(size_t size
        size_t s;
  
        size -= sizeof(struct jffs2_acl_header);
-       s = size - 4 * sizeof(struct jffs2_acl_entry_short);
-       if (s < 0) {
+       if (size < 4 * sizeof(struct jffs2_acl_entry_short)) {
                if (size % sizeof(struct jffs2_acl_entry_short))
                        return -1;
                return size / sizeof(struct jffs2_acl_entry_short);
        } else {
+               s = size - 4 * sizeof(struct jffs2_acl_entry_short);
                if (s % sizeof(struct jffs2_acl_entry))
                        return -1;
                return s / sizeof(struct jffs2_acl_entry) + 4;
@@@ -336,7 -336,7 +336,7 @@@ int jffs2_init_acl_pre(struct inode *di
                return PTR_ERR(acl);
  
        if (!acl) {
 -              *i_mode &= ~current->fs->umask;
 +              *i_mode &= ~current_umask();
        } else {
                if (S_ISDIR(*i_mode))
                        jffs2_iset_acl(inode, &f->i_acl_default, acl);