Skip to content

Commit ca2a88f

Browse files
committed
Merge tag 'for-linus-20121219' of git://git.infradead.org/linux-mtd
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 ...
2 parents 3935e89 + d4d4f1b commit ca2a88f

121 files changed

Lines changed: 2544 additions & 1833 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ Recommended properties :
2323
- ti,davinci-nand-buswidth: buswidth 8 or 16
2424
- ti,davinci-nand-use-bbt: use flash based bad block table support.
2525

26+
nand device bindings may contain additional sub-nodes describing
27+
partitions of the address space. See partition.txt for more detail.
28+
2629
Example(da850 EVM ):
2730
nand_cs3@62000000 {
2831
compatible = "ti,davinci-nand";
@@ -35,4 +38,9 @@ nand_cs3@62000000 {
3538
ti,davinci-ecc-mode = "hw";
3639
ti,davinci-ecc-bits = <4>;
3740
ti,davinci-nand-use-bbt;
41+
42+
partition@180000 {
43+
label = "ubifs";
44+
reg = <0x180000 0x7e80000>;
45+
};
3846
};
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
* Denali NAND controller
2+
3+
Required properties:
4+
- compatible : should be "denali,denali-nand-dt"
5+
- reg : should contain registers location and length for data and reg.
6+
- reg-names: Should contain the reg names "nand_data" and "denali_reg"
7+
- interrupts : The interrupt number.
8+
- dm-mask : DMA bit mask
9+
10+
The device tree may optionally contain sub-nodes describing partitions of the
11+
address space. See partition.txt for more detail.
12+
13+
Examples:
14+
15+
nand: nand@ff900000 {
16+
#address-cells = <1>;
17+
#size-cells = <1>;
18+
compatible = "denali,denali-nand-dt";
19+
reg = <0xff900000 0x100000>, <0xffb80000 0x10000>;
20+
reg-names = "nand_data", "denali_reg";
21+
interrupts = <0 144 4>;
22+
dma-mask = <0xffffffff>;
23+
};
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
FLCTL NAND controller
2+
3+
Required properties:
4+
- compatible : "renesas,shmobile-flctl-sh7372"
5+
- reg : Address range of the FLCTL
6+
- interrupts : flste IRQ number
7+
- nand-bus-width : bus width to NAND chip
8+
9+
Optional properties:
10+
- dmas: DMA specifier(s)
11+
- dma-names: name for each DMA specifier. Valid names are
12+
"data_tx", "data_rx", "ecc_tx", "ecc_rx"
13+
14+
The DMA fields are not used yet in the driver but are listed here for
15+
completing the bindings.
16+
17+
The device tree may optionally contain sub-nodes describing partitions of the
18+
address space. See partition.txt for more detail.
19+
20+
Example:
21+
22+
flctl@e6a30000 {
23+
#address-cells = <1>;
24+
#size-cells = <1>;
25+
compatible = "renesas,shmobile-flctl-sh7372";
26+
reg = <0xe6a30000 0x100>;
27+
interrupts = <0x0d80>;
28+
29+
nand-bus-width = <16>;
30+
31+
dmas = <&dmac 1 /* data_tx */
32+
&dmac 2;> /* data_rx */
33+
dma-names = "data_tx", "data_rx";
34+
35+
system@0 {
36+
label = "system";
37+
reg = <0x0 0x8000000>;
38+
};
39+
40+
userdata@8000000 {
41+
label = "userdata";
42+
reg = <0x8000000 0x10000000>;
43+
};
44+
45+
cache@18000000 {
46+
label = "cache";
47+
reg = <0x18000000 0x8000000>;
48+
};
49+
};

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
Required properties:
44
- compatible : "st,spear600-fsmc-nand"
55
- reg : Address range of the mtd chip
6-
- reg-names: Should contain the reg names "fsmc_regs" and "nand_data"
7-
- st,ale-off : Chip specific offset to ALE
8-
- st,cle-off : Chip specific offset to CLE
6+
- reg-names: Should contain the reg names "fsmc_regs", "nand_data", "nand_addr" and "nand_cmd"
97

108
Optional properties:
119
- bank-width : Width (in bytes) of the device. If not present, the width
@@ -19,10 +17,10 @@ Example:
1917
#address-cells = <1>;
2018
#size-cells = <1>;
2119
reg = <0xd1800000 0x1000 /* FSMC Register */
22-
0xd2000000 0x4000>; /* NAND Base */
23-
reg-names = "fsmc_regs", "nand_data";
24-
st,ale-off = <0x20000>;
25-
st,cle-off = <0x10000>;
20+
0xd2000000 0x0010 /* NAND Base DATA */
21+
0xd2020000 0x0010 /* NAND Base ADDR */
22+
0xd2010000 0x0010>; /* NAND Base CMD */
23+
reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd";
2624

2725
bank-width = <1>;
2826
nand-skip-bbtscan;
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
* MTD SPI driver for ST M25Pxx (and similar) serial flash chips
2+
3+
Required properties:
4+
- #address-cells, #size-cells : Must be present if the device has sub-nodes
5+
representing partitions.
6+
- compatible : Should be the manufacturer and the name of the chip. Bear in mind
7+
the DT binding is not Linux-only, but in case of Linux, see the
8+
"m25p_ids" table in drivers/mtd/devices/m25p80.c for the list of
9+
supported chips.
10+
- reg : Chip-Select number
11+
- spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at
12+
13+
Optional properties:
14+
- m25p,fast-read : Use the "fast read" opcode to read data from the chip instead
15+
of the usual "read" opcode. This opcode is not supported by
16+
all chips and support for it can not be detected at runtime.
17+
Refer to your chips' datasheet to check if this is supported
18+
by your chip.
19+
20+
Example:
21+
22+
flash: m25p80@0 {
23+
#address-cells = <1>;
24+
#size-cells = <1>;
25+
compatible = "spansion,m25p80";
26+
reg = <0>;
27+
spi-max-frequency = <40000000>;
28+
m25p,fast-read;
29+
};

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ file systems on embedded devices.
2323
unaligned accesses as implemented in the JFFS2 code via memcpy().
2424
By defining "no-unaligned-direct-access", the flash will not be
2525
exposed directly to the MTD users (e.g. JFFS2) any more.
26+
- linux,mtd-name: allow to specify the mtd name for retro capability with
27+
physmap-flash drivers as boot loader pass the mtd partition via the old
28+
device name physmap-flash.
2629

2730
For JEDEC compatible devices, the following additional properties
2831
are defined:

‎arch/arm/boot/dts/spear13xx.dtsi‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
400000
7474
500000
7575
600000 >;
76-
status = "disable";
76+
status = "disabled";
7777
};
7878

7979
ahb {
@@ -118,15 +118,15 @@
118118
compatible = "st,spear600-fsmc-nand";
119119
#address-cells = <1>;
120120
#size-cells = <1>;
121-
reg = <0xb0000000 0x1000 /* FSMC Register */
122-
0xb0800000 0x0010>; /* NAND Base */
123-
reg-names = "fsmc_regs", "nand_data";
121+
reg = <0xb0000000 0x1000 /* FSMC Register*/
122+
0xb0800000 0x0010 /* NAND Base DATA */
123+
0xb0820000 0x0010 /* NAND Base ADDR */
124+
0xb0810000 0x0010>; /* NAND Base CMD */
125+
reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd";
124126
interrupts = <0 20 0x4
125127
0 21 0x4
126128
0 22 0x4
127129
0 23 0x4>;
128-
st,ale-off = <0x20000>;
129-
st,cle-off = <0x10000>;
130130
st,mode = <2>;
131131
status = "disabled";
132132
};
@@ -144,7 +144,7 @@
144144
compatible = "st,pcm-audio";
145145
#address-cells = <0>;
146146
#size-cells = <0>;
147-
status = "disable";
147+
status = "disabled";
148148
};
149149

150150
smi: flash@ea000000 {

‎arch/arm/boot/dts/spear300.dtsi‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@
3838
#address-cells = <1>;
3939
#size-cells = <1>;
4040
reg = <0x94000000 0x1000 /* FSMC Register */
41-
0x80000000 0x0010>; /* NAND Base */
42-
reg-names = "fsmc_regs", "nand_data";
43-
st,ale-off = <0x20000>;
44-
st,cle-off = <0x10000>;
41+
0x80000000 0x0010 /* NAND Base DATA */
42+
0x80020000 0x0010 /* NAND Base ADDR */
43+
0x80010000 0x0010>; /* NAND Base CMD */
44+
reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd";
4545
status = "disabled";
4646
};
4747

‎arch/arm/boot/dts/spear310.dtsi‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@
3333
#address-cells = <1>;
3434
#size-cells = <1>;
3535
reg = <0x44000000 0x1000 /* FSMC Register */
36-
0x40000000 0x0010>; /* NAND Base */
37-
reg-names = "fsmc_regs", "nand_data";
38-
st,ale-off = <0x10000>;
39-
st,cle-off = <0x20000>;
36+
0x40000000 0x0010 /* NAND Base DATA */
37+
0x40020000 0x0010 /* NAND Base ADDR */
38+
0x40010000 0x0010>; /* NAND Base CMD */
39+
reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd";
4040
status = "disabled";
4141
};
4242

‎arch/arm/boot/dts/spear320.dtsi‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@
4040
#address-cells = <1>;
4141
#size-cells = <1>;
4242
reg = <0x4c000000 0x1000 /* FSMC Register */
43-
0x50000000 0x0010>; /* NAND Base */
44-
reg-names = "fsmc_regs", "nand_data";
45-
st,ale-off = <0x20000>;
46-
st,cle-off = <0x10000>;
43+
0x50000000 0x0010 /* NAND Base DATA */
44+
0x50020000 0x0010 /* NAND Base ADDR */
45+
0x50010000 0x0010>; /* NAND Base CMD */
46+
reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd";
4747
status = "disabled";
4848
};
4949

0 commit comments

Comments
 (0)