projects/linux·commit ca2a88f5

Merge tag 'for-linus-20121219' of git://git.infradead.org/linux-mtd

ca2a88f5 · Linus Torvalds <[email protected]> · 2012-12-19 12:47:41 -08:00

Pull MTD updates from David Woodhouse:
 - Various cleanups especially in NAND tests
 - Add support for NAND flash on BCMA bus
 - DT support for sh_flctl and denali NAND drivers
 - Kill obsolete/superceded drivers (fortunet, nomadik_nand)
 - Fix JFFS2 locking bug in ENOMEM failure path
 - New SPI flash chips, as usual
 - Support writing in 'reliable mode' for DiskOnChip G4
 - Debugfs support in nandsim

* tag 'for-linus-20121219' of git://git.infradead.org/linux-mtd: (96 commits)
  mtd: nand: typo in nand_id_has_period() comments
  mtd: nand/gpio: use io{read,write}*_rep accessors
  mtd: block2mtd: throttle writes by calling balance_dirty_pages_ratelimited.
  mtd: nand: gpmi: reset BCH earlier, too, to avoid NAND startup problems
  mtd: nand/docg4: fix and improve read of factory bbt
  mtd: nand/docg4: reserve bb marker area in ecclayout
  mtd: nand/docg4: add support for writing in reliable mode
  mtd: mxc_nand: reorder part_probes to let cmdline override other sources
  mtd: mxc_nand: fix unbalanced clk_disable() in error path
  mtd: nandsim: Introduce debugfs infrastructure
  mtd: physmap_of: error checking to prevent a NULL pointer dereference
  mtg: docg3: potential divide by zero in doc_write_oob()
  mtd: bcm47xxnflash: writing support
  mtd: tests/read: initialize buffer for whole next page
  mtd: at91: atmel_nand: return bit flips for the PMECC read_page()
  mtd: fix recovery after failed write-buffer operation in cfi_cmdset_0002.c
  mtd: nand: onfi need to be probed in 8 bits mode
  mtd: nand: add NAND_BUSWIDTH_AUTO to autodetect bus width
  mtd: nand: print flash size during detection
  mted: nand_wait_ready timeout fix
  ...
Commit
ca2a88f56aa385890c7fd4ce9d2722b0848ca990
Parents
3935e895 · d4d4f1bf

Merge commit. Changes below are compared with the first parent: 3935e895.

Changes

121 files changed · +2544 −1833

FileStatusAddDelContent
Documentation/devicetree/bindings/arm/davinci/nand.txtmodified+8−0View file
Documentation/devicetree/bindings/mtd/denali-nand.txtadded+23−0View file
Documentation/devicetree/bindings/mtd/flctl-nand.txtadded+49−0View file
Documentation/devicetree/bindings/mtd/fsmc-nand.txtmodified+5−7View file
Documentation/devicetree/bindings/mtd/m25p80.txtadded+29−0View file
Documentation/devicetree/bindings/mtd/mtd-physmap.txtmodified+3−0View file
arch/arm/boot/dts/spear13xx.dtsimodified+7−7View file
arch/arm/boot/dts/spear300.dtsimodified+4−4View file
arch/arm/boot/dts/spear310.dtsimodified+4−4View file
arch/arm/boot/dts/spear320.dtsimodified+4−4View file
arch/arm/boot/dts/spear600.dtsimodified+4−4View file
arch/arm/configs/nhk8815_defconfigmodified+1−1View file
arch/arm/mach-nomadik/board-nhk8815.cmodified+39−32View file
arch/arm/mach-nomadik/include/mach/fsmc.hdeleted+0−29View before deletion
arch/arm/mach-u300/core.cmodified+12−2View file
drivers/bcma/driver_chipcommon_pmu.cmodified+2−1View file
drivers/clk/clk-nomadik.cmodified+1−0View file
drivers/mtd/ar7part.cmodified+2−5View file
drivers/mtd/bcm63xxpart.cmodified+14−18View file
drivers/mtd/chips/cfi_cmdset_0002.cmodified+14−2View file
drivers/mtd/cmdlinepart.cmodified+48−43View file
drivers/mtd/devices/bcm47xxsflash.cmodified+2−2View file
drivers/mtd/devices/block2mtd.cmodified+3−1View file
drivers/mtd/devices/docg3.cmodified+1−1View file
drivers/mtd/devices/docprobe.cmodified+0−2View file
drivers/mtd/devices/m25p80.cmodified+30−18View file
drivers/mtd/devices/mtd_dataflash.cmodified+7−7View file
drivers/mtd/devices/spear_smi.cmodified+6−17View file
drivers/mtd/devices/sst25l.cmodified+5−5View file
drivers/mtd/maps/Kconfigmodified+0−7View file
drivers/mtd/maps/Makefilemodified+0−1View file
drivers/mtd/maps/amd76xrom.cmodified+3−4View file
drivers/mtd/maps/autcpu12-nvram.cmodified+3−3View file
drivers/mtd/maps/bfin-async-flash.cmodified+5−4View file
drivers/mtd/maps/ck804xrom.cmodified+3−3View file
drivers/mtd/maps/esb2rom.cmodified+3−3View file
drivers/mtd/maps/fortunet.cdeleted+0−277View before deletion
drivers/mtd/maps/gpio-addr-flash.cmodified+7−5View file
drivers/mtd/maps/ichxrom.cmodified+4−4View file
drivers/mtd/maps/intel_vr_nor.cmodified+9−9View file
drivers/mtd/maps/lantiq-flash.cmodified+4−4View file
drivers/mtd/maps/latch-addr-flash.cmodified+2−2View file
drivers/mtd/maps/pci.cmodified+3−3View file
drivers/mtd/maps/physmap_of.cmodified+12−7View file
drivers/mtd/maps/pismo.cmodified+9−9View file
drivers/mtd/maps/pxa2xx-flash.cmodified+3−3View file
drivers/mtd/maps/sa1100-flash.cmodified+3−3View file
drivers/mtd/maps/scb2_flash.cmodified+4−4View file
drivers/mtd/maps/sun_uflash.cmodified+3−3View file
drivers/mtd/maps/vmu-flash.cmodified+5−5View file
drivers/mtd/mtd_blkdevs.cmodified+17−34View file
drivers/mtd/mtdoops.cmodified+7−8View file
drivers/mtd/nand/Kconfigmodified+25−9View file
drivers/mtd/nand/Makefilemodified+3−1View file
drivers/mtd/nand/ams-delta.cmodified+3−3View file
drivers/mtd/nand/atmel_nand.cmodified+17−11View file
drivers/mtd/nand/au1550nd.cmodified+4−4View file
drivers/mtd/nand/bcm47xxnflash/Makefileadded+4−0View file
drivers/mtd/nand/bcm47xxnflash/bcm47xxnflash.hadded+22−0View file
drivers/mtd/nand/bcm47xxnflash/main.cadded+108−0View file
drivers/mtd/nand/bcm47xxnflash/ops_bcm4706.cadded+413−0View file
drivers/mtd/nand/bf5xx_nand.cmodified+4−4View file
drivers/mtd/nand/cafe_nand.cmodified+6−6View file
drivers/mtd/nand/cs553x_nand.cmodified+1−2View file
drivers/mtd/nand/davinci_nand.cmodified+10−3View file
drivers/mtd/nand/denali.cmodified+30−132View file
drivers/mtd/nand/denali.hmodified+5−0View file
drivers/mtd/nand/denali_dt.cadded+167−0View file
drivers/mtd/nand/denali_pci.cadded+144−0View file
drivers/mtd/nand/diskonchip.cmodified+0−2View file
drivers/mtd/nand/docg4.cmodified+64−9View file
drivers/mtd/nand/fsl_elbc_nand.cmodified+1−16View file
drivers/mtd/nand/fsl_ifc_nand.cmodified+3−3View file
drivers/mtd/nand/fsl_upm.cmodified+4−4View file
drivers/mtd/nand/fsmc_nand.cmodified+44−62View file
drivers/mtd/nand/gpio.cmodified+21−13View file
drivers/mtd/nand/gpmi-nand/gpmi-lib.cmodified+9−1View file
drivers/mtd/nand/gpmi-nand/gpmi-nand.cmodified+24−17View file
drivers/mtd/nand/gpmi-nand/gpmi-nand.hmodified+0−1View file
drivers/mtd/nand/jz4740_nand.cmodified+9−5View file
drivers/mtd/nand/lpc32xx_mlc.cmodified+3−3View file
drivers/mtd/nand/lpc32xx_slc.cmodified+3−3View file
drivers/mtd/nand/mpc5121_nfc.cmodified+4−4View file
drivers/mtd/nand/mxc_nand.cmodified+7−5View file
drivers/mtd/nand/nand_base.cmodified+65−49View file
drivers/mtd/nand/nandsim.cmodified+130−56View file
drivers/mtd/nand/ndfc.cmodified+3−3View file
drivers/mtd/nand/nomadik_nand.cdeleted+0−235View before deletion
drivers/mtd/nand/nuc900_nand.cmodified+3−3View file
drivers/mtd/nand/omap2.cmodified+1−1View file
drivers/mtd/nand/orion_nand.cmodified+2−2View file
drivers/mtd/nand/pasemi_nand.cmodified+2−2View file
drivers/mtd/nand/plat_nand.cmodified+3−3View file
drivers/mtd/nand/s3c2410.cmodified+5−2View file
drivers/mtd/nand/sh_flctl.cmodified+275−31View file
drivers/mtd/nand/sharpsl.cmodified+3−3View file
drivers/mtd/nand/socrates_nand.cmodified+3−3View file
drivers/mtd/ofpart.cmodified+4−1View file
drivers/mtd/onenand/generic.cmodified+3−3View file
drivers/mtd/onenand/omap2.cmodified+3−3View file
drivers/mtd/onenand/samsung.cmodified+2−2View file
drivers/mtd/tests/mtd_nandbiterrs.cmodified+37−36View file
drivers/mtd/tests/mtd_nandecctest.cmodified+4−2View file
drivers/mtd/tests/mtd_oobtest.cmodified+84−87View file
drivers/mtd/tests/mtd_pagetest.cmodified+76−76View file
drivers/mtd/tests/mtd_readtest.cmodified+22−22View file
drivers/mtd/tests/mtd_speedtest.cmodified+44−44View file
drivers/mtd/tests/mtd_stresstest.cmodified+22−22View file
drivers/mtd/tests/mtd_subpagetest.cmodified+62−62View file
drivers/mtd/tests/mtd_torturetest.cmodified+37−36View file
fs/jffs2/nodemgmt.cmodified+4−2View file
include/linux/bcma/bcma.hmodified+1−0View file
include/linux/mtd/blktrans.hmodified+3−1View file
include/linux/mtd/doc2000.hmodified+18−4View file
include/linux/mtd/fsmc.hmodified+0−3View file
include/linux/mtd/gpmi-nand.hdeleted+0−68View before deletion
include/linux/mtd/map.hmodified+2−2View file
include/linux/mtd/mtd.hmodified+1−1View file
include/linux/mtd/nand.hmodified+9−2View file
include/linux/mtd/sh_flctl.hmodified+13−1View file
include/linux/platform_data/mtd-nomadik-nand.hdeleted+0−16View before deletion

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/devicetree/bindings/arm/davinci/nand.txt

View file
diff --git a/Documentation/devicetree/bindings/arm/davinci/nand.txt b/Documentation/devicetree/bindings/arm/davinci/nand.txt
index 49fc7ad..3545ea7 100644
--- a/Documentation/devicetree/bindings/arm/davinci/nand.txt
+++ b/Documentation/devicetree/bindings/arm/davinci/nand.txt
@@ -23,6 +23,9 @@ Recommended properties :
- ti,davinci-nand-buswidth: buswidth 8 or 16
- ti,davinci-nand-use-bbt: use flash based bad block table support.
+nand device bindings may contain additional sub-nodes describing
+partitions of the address space. See partition.txt for more detail.
+
Example(da850 EVM ):
nand_cs3@62000000 {
compatible = "ti,davinci-nand";
@@ -35,4 +38,9 @@ nand_cs3@62000000 {
ti,davinci-ecc-mode = "hw";
ti,davinci-ecc-bits = <4>;
ti,davinci-nand-use-bbt;
+
+ partition@180000 {
+ label = "ubifs";
+ reg = <0x180000 0x7e80000>;
+ };
};

Documentation/devicetree/bindings/mtd/denali-nand.txt

View file
diff --git a/Documentation/devicetree/bindings/mtd/denali-nand.txt b/Documentation/devicetree/bindings/mtd/denali-nand.txt
new file mode 100644
index 0000000..b04d03a
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/denali-nand.txt
@@ -0,0 +1,23 @@
+* Denali NAND controller
+
+Required properties:
+ - compatible : should be "denali,denali-nand-dt"
+ - reg : should contain registers location and length for data and reg.
+ - reg-names: Should contain the reg names "nand_data" and "denali_reg"
+ - interrupts : The interrupt number.
+ - dm-mask : DMA bit mask
+
+The device tree may optionally contain sub-nodes describing partitions of the
+address space. See partition.txt for more detail.
+
+Examples:
+
+nand: nand@ff900000 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "denali,denali-nand-dt";
+ reg = <0xff900000 0x100000>, <0xffb80000 0x10000>;
+ reg-names = "nand_data", "denali_reg";
+ interrupts = <0 144 4>;
+ dma-mask = <0xffffffff>;
+};

Documentation/devicetree/bindings/mtd/flctl-nand.txt

View file
diff --git a/Documentation/devicetree/bindings/mtd/flctl-nand.txt b/Documentation/devicetree/bindings/mtd/flctl-nand.txt
new file mode 100644
index 0000000..427f46d
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/flctl-nand.txt
@@ -0,0 +1,49 @@
+FLCTL NAND controller
+
+Required properties:
+- compatible : "renesas,shmobile-flctl-sh7372"
+- reg : Address range of the FLCTL
+- interrupts : flste IRQ number
+- nand-bus-width : bus width to NAND chip
+
+Optional properties:
+- dmas: DMA specifier(s)
+- dma-names: name for each DMA specifier. Valid names are
+ "data_tx", "data_rx", "ecc_tx", "ecc_rx"
+
+The DMA fields are not used yet in the driver but are listed here for
+completing the bindings.
+
+The device tree may optionally contain sub-nodes describing partitions of the
+address space. See partition.txt for more detail.
+
+Example:
+
+ flctl@e6a30000 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "renesas,shmobile-flctl-sh7372";
+ reg = <0xe6a30000 0x100>;
+ interrupts = <0x0d80>;
+
+ nand-bus-width = <16>;
+
+ dmas = <&dmac 1 /* data_tx */
+ &dmac 2;> /* data_rx */
+ dma-names = "data_tx", "data_rx";
+
+ system@0 {
+ label = "system";
+ reg = <0x0 0x8000000>;
+ };
+
+ userdata@8000000 {
+ label = "userdata";
+ reg = <0x8000000 0x10000000>;
+ };
+
+ cache@18000000 {
+ label = "cache";
+ reg = <0x18000000 0x8000000>;
+ };
+ };

Documentation/devicetree/bindings/mtd/fsmc-nand.txt

View file
diff --git a/Documentation/devicetree/bindings/mtd/fsmc-nand.txt b/Documentation/devicetree/bindings/mtd/fsmc-nand.txt
index e2c663b..e3ea32e 100644
--- a/Documentation/devicetree/bindings/mtd/fsmc-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/fsmc-nand.txt
@@ -3,9 +3,7 @@
Required properties:
- compatible : "st,spear600-fsmc-nand"
- reg : Address range of the mtd chip
-- reg-names: Should contain the reg names "fsmc_regs" and "nand_data"
-- st,ale-off : Chip specific offset to ALE
-- st,cle-off : Chip specific offset to CLE
+- reg-names: Should contain the reg names "fsmc_regs", "nand_data", "nand_addr" and "nand_cmd"
Optional properties:
- bank-width : Width (in bytes) of the device. If not present, the width
@@ -19,10 +17,10 @@ Example:
#address-cells = <1>;
#size-cells = <1>;
reg = <0xd1800000 0x1000 /* FSMC Register */
- 0xd2000000 0x4000>; /* NAND Base */
- reg-names = "fsmc_regs", "nand_data";
- st,ale-off = <0x20000>;
- st,cle-off = <0x10000>;
+ 0xd2000000 0x0010 /* NAND Base DATA */
+ 0xd2020000 0x0010 /* NAND Base ADDR */
+ 0xd2010000 0x0010>; /* NAND Base CMD */
+ reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd";
bank-width = <1>;
nand-skip-bbtscan;

Documentation/devicetree/bindings/mtd/m25p80.txt

View file
diff --git a/Documentation/devicetree/bindings/mtd/m25p80.txt b/Documentation/devicetree/bindings/mtd/m25p80.txt
new file mode 100644
index 0000000..6d3d576
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/m25p80.txt
@@ -0,0 +1,29 @@
+* MTD SPI driver for ST M25Pxx (and similar) serial flash chips
+
+Required properties:
+- #address-cells, #size-cells : Must be present if the device has sub-nodes
+ representing partitions.
+- compatible : Should be the manufacturer and the name of the chip. Bear in mind
+ the DT binding is not Linux-only, but in case of Linux, see the
+ "m25p_ids" table in drivers/mtd/devices/m25p80.c for the list of
+ supported chips.
+- reg : Chip-Select number
+- spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at
+
+Optional properties:
+- m25p,fast-read : Use the "fast read" opcode to read data from the chip instead
+ of the usual "read" opcode. This opcode is not supported by
+ all chips and support for it can not be detected at runtime.
+ Refer to your chips' datasheet to check if this is supported
+ by your chip.
+
+Example:
+
+ flash: m25p80@0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "spansion,m25p80";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+ m25p,fast-read;
+ };

Documentation/devicetree/bindings/mtd/mtd-physmap.txt

View file
diff --git a/Documentation/devicetree/bindings/mtd/mtd-physmap.txt b/Documentation/devicetree/bindings/mtd/mtd-physmap.txt
index 94de19b..dab7847 100644
--- a/Documentation/devicetree/bindings/mtd/mtd-physmap.txt
+++ b/Documentation/devicetree/bindings/mtd/mtd-physmap.txt
@@ -23,6 +23,9 @@ file systems on embedded devices.
unaligned accesses as implemented in the JFFS2 code via memcpy().
By defining "no-unaligned-direct-access", the flash will not be
exposed directly to the MTD users (e.g. JFFS2) any more.
+ - linux,mtd-name: allow to specify the mtd name for retro capability with
+ physmap-flash drivers as boot loader pass the mtd partition via the old
+ device name physmap-flash.
For JEDEC compatible devices, the following additional properties
are defined:

arch/arm/boot/dts/spear13xx.dtsi

View file
diff --git a/arch/arm/boot/dts/spear13xx.dtsi b/arch/arm/boot/dts/spear13xx.dtsi
index 009096d..b4ca60f 100644
--- a/arch/arm/boot/dts/spear13xx.dtsi
+++ b/arch/arm/boot/dts/spear13xx.dtsi
@@ -73,7 +73,7 @@
400000
500000
600000 >;
- status = "disable";
+ status = "disabled";
};
ahb {
@@ -118,15 +118,15 @@
compatible = "st,spear600-fsmc-nand";
#address-cells = <1>;
#size-cells = <1>;
- reg = <0xb0000000 0x1000 /* FSMC Register */
- 0xb0800000 0x0010>; /* NAND Base */
- reg-names = "fsmc_regs", "nand_data";
+ reg = <0xb0000000 0x1000 /* FSMC Register*/
+ 0xb0800000 0x0010 /* NAND Base DATA */
+ 0xb0820000 0x0010 /* NAND Base ADDR */
+ 0xb0810000 0x0010>; /* NAND Base CMD */
+ reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd";
interrupts = <0 20 0x4
0 21 0x4
0 22 0x4
0 23 0x4>;
- st,ale-off = <0x20000>;
- st,cle-off = <0x10000>;
st,mode = <2>;
status = "disabled";
};
@@ -144,7 +144,7 @@
compatible = "st,pcm-audio";
#address-cells = <0>;
#size-cells = <0>;
- status = "disable";
+ status = "disabled";
};
smi: flash@ea000000 {

arch/arm/boot/dts/spear300.dtsi

View file
diff --git a/arch/arm/boot/dts/spear300.dtsi b/arch/arm/boot/dts/spear300.dtsi
index 090adc6..f79b3df 100644
--- a/arch/arm/boot/dts/spear300.dtsi
+++ b/arch/arm/boot/dts/spear300.dtsi
@@ -38,10 +38,10 @@
#address-cells = <1>;
#size-cells = <1>;
reg = <0x94000000 0x1000 /* FSMC Register */
- 0x80000000 0x0010>; /* NAND Base */
- reg-names = "fsmc_regs", "nand_data";
- st,ale-off = <0x20000>;
- st,cle-off = <0x10000>;
+ 0x80000000 0x0010 /* NAND Base DATA */
+ 0x80020000 0x0010 /* NAND Base ADDR */
+ 0x80010000 0x0010>; /* NAND Base CMD */
+ reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd";
status = "disabled";
};

arch/arm/boot/dts/spear310.dtsi

View file
diff --git a/arch/arm/boot/dts/spear310.dtsi b/arch/arm/boot/dts/spear310.dtsi
index e814e5e..ab45b8c 100644
--- a/arch/arm/boot/dts/spear310.dtsi
+++ b/arch/arm/boot/dts/spear310.dtsi
@@ -33,10 +33,10 @@
#address-cells = <1>;
#size-cells = <1>;
reg = <0x44000000 0x1000 /* FSMC Register */
- 0x40000000 0x0010>; /* NAND Base */
- reg-names = "fsmc_regs", "nand_data";
- st,ale-off = <0x10000>;
- st,cle-off = <0x20000>;
+ 0x40000000 0x0010 /* NAND Base DATA */
+ 0x40020000 0x0010 /* NAND Base ADDR */
+ 0x40010000 0x0010>; /* NAND Base CMD */
+ reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd";
status = "disabled";
};

arch/arm/boot/dts/spear320.dtsi

View file
diff --git a/arch/arm/boot/dts/spear320.dtsi b/arch/arm/boot/dts/spear320.dtsi
index c056a84..caa5520 100644
--- a/arch/arm/boot/dts/spear320.dtsi
+++ b/arch/arm/boot/dts/spear320.dtsi
@@ -40,10 +40,10 @@
#address-cells = <1>;
#size-cells = <1>;
reg = <0x4c000000 0x1000 /* FSMC Register */
- 0x50000000 0x0010>; /* NAND Base */
- reg-names = "fsmc_regs", "nand_data";
- st,ale-off = <0x20000>;
- st,cle-off = <0x10000>;
+ 0x50000000 0x0010 /* NAND Base DATA */
+ 0x50020000 0x0010 /* NAND Base ADDR */
+ 0x50010000 0x0010>; /* NAND Base CMD */
+ reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd";
status = "disabled";
};

arch/arm/boot/dts/spear600.dtsi

View file
diff --git a/arch/arm/boot/dts/spear600.dtsi b/arch/arm/boot/dts/spear600.dtsi
index e051dde..19f99dc 100644
--- a/arch/arm/boot/dts/spear600.dtsi
+++ b/arch/arm/boot/dts/spear600.dtsi
@@ -76,10 +76,10 @@
#address-cells = <1>;
#size-cells = <1>;
reg = <0xd1800000 0x1000 /* FSMC Register */
- 0xd2000000 0x4000>; /* NAND Base */
- reg-names = "fsmc_regs", "nand_data";
- st,ale-off = <0x20000>;
- st,cle-off = <0x10000>;
+ 0xd2000000 0x0010 /* NAND Base DATA */
+ 0xd2020000 0x0010 /* NAND Base ADDR */
+ 0xd2010000 0x0010>; /* NAND Base CMD */
+ reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd";
status = "disabled";
};

arch/arm/configs/nhk8815_defconfig

View file
diff --git a/arch/arm/configs/nhk8815_defconfig b/arch/arm/configs/nhk8815_defconfig
index 240b25e..86cfd29 100644
--- a/arch/arm/configs/nhk8815_defconfig
+++ b/arch/arm/configs/nhk8815_defconfig
@@ -57,7 +57,7 @@ CONFIG_MTD_CHAR=y
CONFIG_MTD_BLOCK=y
CONFIG_MTD_NAND=y
CONFIG_MTD_NAND_ECC_SMC=y
-CONFIG_MTD_NAND_NOMADIK=y
+CONFIG_MTD_NAND_FSMC=y
CONFIG_MTD_ONENAND=y
CONFIG_MTD_ONENAND_VERIFY_WRITE=y
CONFIG_MTD_ONENAND_GENERIC=y

arch/arm/mach-nomadik/board-nhk8815.c

View file
diff --git a/arch/arm/mach-nomadik/board-nhk8815.c b/arch/arm/mach-nomadik/board-nhk8815.c
index 5ccdf53..98167a4 100644
--- a/arch/arm/mach-nomadik/board-nhk8815.c
+++ b/arch/arm/mach-nomadik/board-nhk8815.c
@@ -19,6 +19,7 @@
#include <linux/gpio.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
+#include <linux/mtd/fsmc.h>
#include <linux/mtd/onenand.h>
#include <linux/mtd/partitions.h>
#include <linux/i2c.h>
@@ -33,7 +34,6 @@
#include <asm/mach/arch.h>
#include <asm/mach/flash.h>
#include <asm/mach/time.h>
-#include <mach/fsmc.h>
#include <mach/irqs.h>
#include "cpu-8815.h"
@@ -42,39 +42,34 @@
#define SRC_CR_INIT_MASK 0x00007fff
#define SRC_CR_INIT_VAL 0x2aaa8000
+#define ALE_OFF 0x1000000
+#define CLE_OFF 0x800000
+
/* These addresses span 16MB, so use three individual pages */
static struct resource nhk8815_nand_resources[] = {
{
+ .name = "nand_data",
+ .start = 0x40000000,
+ .end = 0x40000000 + SZ_16K - 1,
+ .flags = IORESOURCE_MEM,
+ }, {
.name = "nand_addr",
- .start = NAND_IO_ADDR,
- .end = NAND_IO_ADDR + 0xfff,
+ .start = 0x40000000 + ALE_OFF,
+ .end = 0x40000000 +ALE_OFF + SZ_16K - 1,
.flags = IORESOURCE_MEM,
}, {
.name = "nand_cmd",
- .start = NAND_IO_CMD,
- .end = NAND_IO_CMD + 0xfff,
+ .start = 0x40000000 + CLE_OFF,
+ .end = 0x40000000 + CLE_OFF + SZ_16K - 1,
.flags = IORESOURCE_MEM,
}, {
- .name = "nand_data",
- .start = NAND_IO_DATA,
- .end = NAND_IO_DATA + 0xfff,
+ .name = "fsmc_regs",
+ .start = NOMADIK_FSMC_BASE,
+ .end = NOMADIK_FSMC_BASE + SZ_4K - 1,
.flags = IORESOURCE_MEM,
- }
+ },
};
-static int nhk8815_nand_init(void)
-{
- /* FSMC setup for nand chip select (8-bit nand in 8815NHK) */
- writel(0x0000000E, FSMC_PCR(0));
- writel(0x000D0A00, FSMC_PMEM(0));
- writel(0x00100A00, FSMC_PATT(0));
-
- /* enable access to the chip select area */
- writel(readl(FSMC_PCR(0)) | 0x04, FSMC_PCR(0));
-
- return 0;
-}
-
/*
* These partitions are the same as those used in the 2.6.20 release
* shipped by the vendor; the first two partitions are mandated
@@ -108,20 +103,28 @@ static struct mtd_partition nhk8815_partitions[] = {
}
};
-static struct nomadik_nand_platform_data nhk8815_nand_data = {
- .parts = nhk8815_partitions,
- .nparts = ARRAY_SIZE(nhk8815_partitions),
- .options = NAND_COPYBACK | NAND_CACHEPRG | NAND_NO_PADDING,
- .init = nhk8815_nand_init,
+static struct fsmc_nand_timings nhk8815_nand_timings = {
+ .thiz = 0,
+ .thold = 0x10,
+ .twait = 0x0A,
+ .tset = 0,
+};
+
+static struct fsmc_nand_platform_data nhk8815_nand_platform_data = {
+ .nand_timings = &nhk8815_nand_timings,
+ .partitions = nhk8815_partitions,
+ .nr_partitions = ARRAY_SIZE(nhk8815_partitions),
+ .width = FSMC_NAND_BW8,
};
static struct platform_device nhk8815_nand_device = {
- .name = "nomadik_nand",
- .dev = {
- .platform_data = &nhk8815_nand_data,
+ .name = "fsmc-nand",
+ .id = -1,
+ .resource = nhk8815_nand_resources,
+ .num_resources = ARRAY_SIZE(nhk8815_nand_resources),
+ .dev = {
+ .platform_data = &nhk8815_nand_platform_data,
},
- .resource = nhk8815_nand_resources,
- .num_resources = ARRAY_SIZE(nhk8815_nand_resources),
};
/* These are the partitions for the OneNand device, different from above */
@@ -176,6 +179,10 @@ static struct platform_device nhk8815_onenand_device = {
.num_resources = ARRAY_SIZE(nhk8815_onenand_resource),
};
+/* bus control reg. and bus timing reg. for CS0..CS3 */
+#define FSMC_BCR(x) (NOMADIK_FSMC_VA + (x << 3))
+#define FSMC_BTR(x) (NOMADIK_FSMC_VA + (x << 3) + 0x04)
+
static void __init nhk8815_onenand_init(void)
{
#ifdef CONFIG_MTD_ONENAND

arch/arm/mach-nomadik/include/mach/fsmc.h

View before deletion
diff --git a/arch/arm/mach-nomadik/include/mach/fsmc.h b/arch/arm/mach-nomadik/include/mach/fsmc.h
deleted file mode 100644
index 8c2c051..0000000
--- a/arch/arm/mach-nomadik/include/mach/fsmc.h
+++ /dev/null
@@ -1,29 +0,0 @@
-
-/* Definitions for the Nomadik FSMC "Flexible Static Memory controller" */
-
-#ifndef __ASM_ARCH_FSMC_H
-#define __ASM_ARCH_FSMC_H
-
-#include <mach/hardware.h>
-/*
- * Register list
- */
-
-/* bus control reg. and bus timing reg. for CS0..CS3 */
-#define FSMC_BCR(x) (NOMADIK_FSMC_VA + (x << 3))
-#define FSMC_BTR(x) (NOMADIK_FSMC_VA + (x << 3) + 0x04)
-
-/* PC-card and NAND:
- * PCR = control register
- * PMEM = memory timing
- * PATT = attribute timing
- * PIO = I/O timing
- * PECCR = ECC result
- */
-#define FSMC_PCR(x) (NOMADIK_FSMC_VA + ((2 + x) << 5) + 0x00)
-#define FSMC_PMEM(x) (NOMADIK_FSMC_VA + ((2 + x) << 5) + 0x08)
-#define FSMC_PATT(x) (NOMADIK_FSMC_VA + ((2 + x) << 5) + 0x0c)
-#define FSMC_PIO(x) (NOMADIK_FSMC_VA + ((2 + x) << 5) + 0x10)
-#define FSMC_PECCR(x) (NOMADIK_FSMC_VA + ((2 + x) << 5) + 0x14)
-
-#endif /* __ASM_ARCH_FSMC_H */

arch/arm/mach-u300/core.c

View file
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c
index 12f3994..8b204ae 100644
--- a/arch/arm/mach-u300/core.c
+++ b/arch/arm/mach-u300/core.c
@@ -250,6 +250,18 @@ static struct resource rtc_resources[] = {
*/
static struct resource fsmc_resources[] = {
{
+ .name = "nand_addr",
+ .start = U300_NAND_CS0_PHYS_BASE + PLAT_NAND_ALE,
+ .end = U300_NAND_CS0_PHYS_BASE + PLAT_NAND_ALE + SZ_16K - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ {
+ .name = "nand_cmd",
+ .start = U300_NAND_CS0_PHYS_BASE + PLAT_NAND_CLE,
+ .end = U300_NAND_CS0_PHYS_BASE + PLAT_NAND_CLE + SZ_16K - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ {
.name = "nand_data",
.start = U300_NAND_CS0_PHYS_BASE,
.end = U300_NAND_CS0_PHYS_BASE + SZ_16K - 1,
@@ -1492,8 +1504,6 @@ static struct fsmc_nand_platform_data nand_platform_data = {
.nr_partitions = ARRAY_SIZE(u300_partitions),
.options = NAND_SKIP_BBTSCAN,
.width = FSMC_NAND_BW8,
- .ale_off = PLAT_NAND_ALE,
- .cle_off = PLAT_NAND_CLE,
};
static struct platform_device nand_device = {

drivers/bcma/driver_chipcommon_pmu.c

View file
diff --git a/drivers/bcma/driver_chipcommon_pmu.c b/drivers/bcma/driver_chipcommon_pmu.c
index e162999..c62c788 100644
--- a/drivers/bcma/driver_chipcommon_pmu.c
+++ b/drivers/bcma/driver_chipcommon_pmu.c
@@ -13,12 +13,13 @@
#include <linux/export.h>
#include <linux/bcma/bcma.h>
-static u32 bcma_chipco_pll_read(struct bcma_drv_cc *cc, u32 offset)
+u32 bcma_chipco_pll_read(struct bcma_drv_cc *cc, u32 offset)
{
bcma_cc_write32(cc, BCMA_CC_PLLCTL_ADDR, offset);
bcma_cc_read32(cc, BCMA_CC_PLLCTL_ADDR);
return bcma_cc_read32(cc, BCMA_CC_PLLCTL_DATA);
}
+EXPORT_SYMBOL_GPL(bcma_chipco_pll_read);
void bcma_chipco_pll_write(struct bcma_drv_cc *cc, u32 offset, u32 value)
{

drivers/clk/clk-nomadik.c

View file
diff --git a/drivers/clk/clk-nomadik.c b/drivers/clk/clk-nomadik.c
index 517a8ff..6b4c70f 100644
--- a/drivers/clk/clk-nomadik.c
+++ b/drivers/clk/clk-nomadik.c
@@ -20,6 +20,7 @@ void __init nomadik_clk_init(void)
clk_register_clkdev(clk, NULL, "gpio.2");
clk_register_clkdev(clk, NULL, "gpio.3");
clk_register_clkdev(clk, NULL, "rng");
+ clk_register_clkdev(clk, NULL, "fsmc-nand");
/*
* The 2.4 MHz TIMCLK reference clock is active at boot time, this is

drivers/mtd/ar7part.c

View file
diff --git a/drivers/mtd/ar7part.c b/drivers/mtd/ar7part.c
index 9453931..7c057a0 100644
--- a/drivers/mtd/ar7part.c
+++ b/drivers/mtd/ar7part.c
@@ -26,19 +26,16 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/bootmem.h>
-#include <linux/magic.h>
#include <linux/module.h>
+#include <uapi/linux/magic.h>
+
#define AR7_PARTS 4
#define ROOT_OFFSET 0xe0000
#define LOADER_MAGIC1 le32_to_cpu(0xfeedfa42)
#define LOADER_MAGIC2 le32_to_cpu(0xfeed1281)
-#ifndef SQUASHFS_MAGIC
-#define SQUASHFS_MAGIC 0x73717368
-#endif
-
struct ar7_bin_rec {
unsigned int checksum;
unsigned int length;

drivers/mtd/bcm63xxpart.c

View file
diff --git a/drivers/mtd/bcm63xxpart.c b/drivers/mtd/bcm63xxpart.c
index 63d2a64..6eeb84c 100644
--- a/drivers/mtd/bcm63xxpart.c
+++ b/drivers/mtd/bcm63xxpart.c
@@ -37,8 +37,7 @@
#define BCM63XX_EXTENDED_SIZE 0xBFC00000 /* Extended flash address */
-#define BCM63XX_MIN_CFE_SIZE 0x10000 /* always at least 64KiB */
-#define BCM63XX_MIN_NVRAM_SIZE 0x10000 /* always at least 64KiB */
+#define BCM63XX_CFE_BLOCK_SIZE 0x10000 /* always at least 64KiB */
#define BCM63XX_CFE_MAGIC_OFFSET 0x4e0
@@ -79,7 +78,7 @@ static int bcm63xx_parse_cfe_partitions(struct mtd_info *master,
unsigned int rootfsaddr, kerneladdr, spareaddr;
unsigned int rootfslen, kernellen, sparelen, totallen;
unsigned int cfelen, nvramlen;
- int namelen = 0;
+ unsigned int cfe_erasesize;
int i;
u32 computed_crc;
bool rootfs_first = false;
@@ -87,8 +86,11 @@ static int bcm63xx_parse_cfe_partitions(struct mtd_info *master,
if (bcm63xx_detect_cfe(master))
return -EINVAL;
- cfelen = max_t(uint32_t, master->erasesize, BCM63XX_MIN_CFE_SIZE);
- nvramlen = max_t(uint32_t, master->erasesize, BCM63XX_MIN_NVRAM_SIZE);
+ cfe_erasesize = max_t(uint32_t, master->erasesize,
+ BCM63XX_CFE_BLOCK_SIZE);

This diff is incomplete. Download the complete patch.

drivers/mtd/chips/cfi_cmdset_0002.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/cmdlinepart.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/devices/bcm47xxsflash.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/devices/block2mtd.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/devices/docg3.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/devices/docprobe.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/devices/m25p80.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/devices/mtd_dataflash.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/devices/spear_smi.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/devices/sst25l.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/amd76xrom.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/autcpu12-nvram.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/bfin-async-flash.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/ck804xrom.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/esb2rom.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/fortunet.c

View before deletion

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/gpio-addr-flash.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/ichxrom.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/intel_vr_nor.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/lantiq-flash.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/latch-addr-flash.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/pci.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/physmap_of.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/pismo.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/pxa2xx-flash.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/sa1100-flash.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/scb2_flash.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/sun_uflash.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/maps/vmu-flash.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/mtd_blkdevs.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/mtdoops.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/ams-delta.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/atmel_nand.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/au1550nd.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/bcm47xxnflash/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/bcm47xxnflash/bcm47xxnflash.h

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/bcm47xxnflash/main.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/bcm47xxnflash/ops_bcm4706.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/bf5xx_nand.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/cafe_nand.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/cs553x_nand.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/davinci_nand.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/denali.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/denali.h

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/denali_dt.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/denali_pci.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/diskonchip.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/docg4.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/fsl_elbc_nand.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/fsl_ifc_nand.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/fsl_upm.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/fsmc_nand.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/gpio.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/gpmi-nand/gpmi-lib.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/gpmi-nand/gpmi-nand.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/gpmi-nand/gpmi-nand.h

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/jz4740_nand.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/lpc32xx_mlc.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/lpc32xx_slc.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/mpc5121_nfc.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/mxc_nand.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/nand_base.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/nandsim.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/ndfc.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/nomadik_nand.c

View before deletion

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/nuc900_nand.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/omap2.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/orion_nand.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/pasemi_nand.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/plat_nand.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/s3c2410.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/sh_flctl.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/sharpsl.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/nand/socrates_nand.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/ofpart.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/onenand/generic.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/onenand/omap2.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/onenand/samsung.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/tests/mtd_nandbiterrs.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/tests/mtd_nandecctest.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/tests/mtd_oobtest.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/tests/mtd_pagetest.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/tests/mtd_readtest.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/tests/mtd_speedtest.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/tests/mtd_stresstest.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/tests/mtd_subpagetest.c

View file

This diff is incomplete. Download the complete patch.

drivers/mtd/tests/mtd_torturetest.c

View file

This diff is incomplete. Download the complete patch.

fs/jffs2/nodemgmt.c

View file

This diff is incomplete. Download the complete patch.

include/linux/bcma/bcma.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mtd/blktrans.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mtd/doc2000.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mtd/fsmc.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mtd/gpmi-nand.h

View before deletion

This diff is incomplete. Download the complete patch.

include/linux/mtd/map.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mtd/mtd.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mtd/nand.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mtd/sh_flctl.h

View file

This diff is incomplete. Download the complete patch.

include/linux/platform_data/mtd-nomadik-nand.h

View before deletion

This diff is incomplete. Download the complete patch.