Skip to content

Commit e0d6511

Browse files
committed
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (226 commits) mtd: tests: annotate as DANGEROUS in Kconfig mtd: tests: don't use mtd0 as a default mtd: clean up usage of MTD_DOCPROBE_ADDRESS jffs2: add compr=lzo and compr=zlib options jffs2: implement mount option parsing and compression overriding mtd: nand: initialize ops.mode mtd: provide an alias for the redboot module name mtd: m25p80: don't probe device which has status of 'disabled' mtd: nand_h1900 never worked mtd: Add DiskOnChip G3 support mtd: m25p80: add EON flash EN25Q32B into spi flash id table mtd: mark block device queue as non-rotational mtd: r852: make r852_pm_ops static mtd: m25p80: add support for at25df321a spi data flash mtd: mxc_nand: preset_v1_v2: unlock all NAND flash blocks mtd: nand: switch `check_pattern()' to standard `memcmp()' mtd: nand: invalidate cache on unaligned reads mtd: nand: do not scan bad blocks with NAND_BBT_NO_OOB set mtd: nand: wait to set BBT version mtd: nand: scrub BBT on ECC errors ... Fix up trivial conflicts: - arch/arm/mach-at91/board-usb-a9260.c Merged into board-usb-a926x.c - drivers/mtd/maps/lantiq-flash.c add_mtd_partitions -> mtd_device_register vs changed to use mtd_device_parse_register.
2 parents cf5e15f + 48e546b commit e0d6511

190 files changed

Lines changed: 7583 additions & 4046 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/DocBook/mtdnand.tmpl‎

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
572572
</para>
573573
<para>
574574
The simplest way to activate the FLASH based bad block table support
575-
is to set the option NAND_USE_FLASH_BBT in the option field of
575+
is to set the option NAND_BBT_USE_FLASH in the bbt_option field of
576576
the nand chip structure before calling nand_scan(). For AG-AND
577577
chips is this done by default.
578578
This activates the default FLASH based bad block table functionality
@@ -773,20 +773,6 @@ struct nand_oobinfo {
773773
done according to the default builtin scheme.
774774
</para>
775775
</sect2>
776-
<sect2 id="User_space_placement_selection">
777-
<title>User space placement selection</title>
778-
<para>
779-
All non ecc functions like mtd->read and mtd->write use an internal
780-
structure, which can be set by an ioctl. This structure is preset
781-
to the autoplacement default.
782-
<programlisting>
783-
ioctl (fd, MEMSETOOBSEL, oobsel);
784-
</programlisting>
785-
oobsel is a pointer to a user supplied structure of type
786-
nand_oobconfig. The contents of this structure must match the
787-
criteria of the filesystem, which will be used. See an example in utils/nandwrite.c.
788-
</para>
789-
</sect2>
790776
</sect1>
791777
<sect1 id="Spare_area_autoplacement_default">
792778
<title>Spare area autoplacement default schemes</title>
@@ -1158,9 +1144,6 @@ in this page</entry>
11581144
These constants are defined in nand.h. They are ored together to describe
11591145
the functionality.
11601146
<programlisting>
1161-
/* Use a flash based bad block table. This option is parsed by the
1162-
* default bad block table function (nand_default_bbt). */
1163-
#define NAND_USE_FLASH_BBT 0x00010000
11641147
/* The hw ecc generator provides a syndrome instead a ecc value on read
11651148
* This can only work if we have the ecc bytes directly behind the
11661149
* data bytes. Applies for DOC and AG-AND Renesas HW Reed Solomon generators */
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
* Atmel Data Flash
2+
3+
Required properties:
4+
- compatible : "atmel,<model>", "atmel,<series>", "atmel,dataflash".
5+
6+
Example:
7+
8+
flash@1 {
9+
#address-cells = <1>;
10+
#size-cells = <1>;
11+
compatible = "atmel,at45db321d", "atmel,at45", "atmel,dataflash";
12+
spi-max-frequency = <25000000>;
13+
reg = <1>;
14+
};

‎arch/arm/mach-at91/board-afeb-9260v1.c‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -130,19 +130,14 @@ static struct mtd_partition __initdata afeb9260_nand_partition[] = {
130130
},
131131
};
132132

133-
static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
134-
{
135-
*num_partitions = ARRAY_SIZE(afeb9260_nand_partition);
136-
return afeb9260_nand_partition;
137-
}
138-
139133
static struct atmel_nand_data __initdata afeb9260_nand_data = {
140134
.ale = 21,
141135
.cle = 22,
142136
.rdy_pin = AT91_PIN_PC13,
143137
.enable_pin = AT91_PIN_PC14,
144-
.partition_info = nand_partitions,
145138
.bus_width_16 = 0,
139+
.parts = afeb9260_nand_partition,
140+
.num_parts = ARRAY_SIZE(afeb9260_nand_partition),
146141
};
147142

148143

‎arch/arm/mach-at91/board-cam60.c‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,19 +132,14 @@ static struct mtd_partition __initdata cam60_nand_partition[] = {
132132
},
133133
};
134134

135-
static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
136-
{
137-
*num_partitions = ARRAY_SIZE(cam60_nand_partition);
138-
return cam60_nand_partition;
139-
}
140-
141135
static struct atmel_nand_data __initdata cam60_nand_data = {
142136
.ale = 21,
143137
.cle = 22,
144138
// .det_pin = ... not there
145139
.rdy_pin = AT91_PIN_PA9,
146140
.enable_pin = AT91_PIN_PA7,
147-
.partition_info = nand_partitions,
141+
.parts = cam60_nand_partition,
142+
.num_parts = ARRAY_SIZE(cam60_nand_partition),
148143
};
149144

150145
static struct sam9_smc_config __initdata cam60_nand_smc_config = {

‎arch/arm/mach-at91/board-cap9adk.c‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -169,19 +169,14 @@ static struct mtd_partition __initdata cap9adk_nand_partitions[] = {
169169
},
170170
};
171171

172-
static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
173-
{
174-
*num_partitions = ARRAY_SIZE(cap9adk_nand_partitions);
175-
return cap9adk_nand_partitions;
176-
}
177-
178172
static struct atmel_nand_data __initdata cap9adk_nand_data = {
179173
.ale = 21,
180174
.cle = 22,
181175
// .det_pin = ... not connected
182176
// .rdy_pin = ... not connected
183177
.enable_pin = AT91_PIN_PD15,
184-
.partition_info = nand_partitions,
178+
.parts = cap9adk_nand_partitions,
179+
.num_parts = ARRAY_SIZE(cap9adk_nand_partitions),
185180
};
186181

187182
static struct sam9_smc_config __initdata cap9adk_nand_smc_config = {

‎arch/arm/mach-at91/board-kb9202.c‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,19 +97,14 @@ static struct mtd_partition __initdata kb9202_nand_partition[] = {
9797
},
9898
};
9999

100-
static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
101-
{
102-
*num_partitions = ARRAY_SIZE(kb9202_nand_partition);
103-
return kb9202_nand_partition;
104-
}
105-
106100
static struct atmel_nand_data __initdata kb9202_nand_data = {
107101
.ale = 22,
108102
.cle = 21,
109103
// .det_pin = ... not there
110104
.rdy_pin = AT91_PIN_PC29,
111105
.enable_pin = AT91_PIN_PC28,
112-
.partition_info = nand_partitions,
106+
.parts = kb9202_nand_partition,
107+
.num_parts = ARRAY_SIZE(kb9202_nand_partition),
113108
};
114109

115110
static void __init kb9202_board_init(void)

‎arch/arm/mach-at91/board-neocore926.c‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -182,19 +182,14 @@ static struct mtd_partition __initdata neocore926_nand_partition[] = {
182182
},
183183
};
184184

185-
static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
186-
{
187-
*num_partitions = ARRAY_SIZE(neocore926_nand_partition);
188-
return neocore926_nand_partition;
189-
}
190-
191185
static struct atmel_nand_data __initdata neocore926_nand_data = {
192186
.ale = 21,
193187
.cle = 22,
194188
.rdy_pin = AT91_PIN_PB19,
195189
.rdy_pin_active_low = 1,
196190
.enable_pin = AT91_PIN_PD15,
197-
.partition_info = nand_partitions,
191+
.parts = neocore926_nand_partition,
192+
.num_parts = ARRAY_SIZE(neocore926_nand_partition),
198193
};
199194

200195
static struct sam9_smc_config __initdata neocore926_nand_smc_config = {

‎arch/arm/mach-at91/board-qil-a9260.c‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -130,19 +130,14 @@ static struct mtd_partition __initdata ek_nand_partition[] = {
130130
},
131131
};
132132

133-
static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
134-
{
135-
*num_partitions = ARRAY_SIZE(ek_nand_partition);
136-
return ek_nand_partition;
137-
}
138-
139133
static struct atmel_nand_data __initdata ek_nand_data = {
140134
.ale = 21,
141135
.cle = 22,
142136
// .det_pin = ... not connected
143137
.rdy_pin = AT91_PIN_PC13,
144138
.enable_pin = AT91_PIN_PC14,
145-
.partition_info = nand_partitions,
139+
.parts = ek_nand_partition,
140+
.num_parts = ARRAY_SIZE(ek_nand_partition),
146141
};
147142

148143
static struct sam9_smc_config __initdata ek_nand_smc_config = {

‎arch/arm/mach-at91/board-rm9200dk.c‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,19 +138,14 @@ static struct mtd_partition __initdata dk_nand_partition[] = {
138138
},
139139
};
140140

141-
static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
142-
{
143-
*num_partitions = ARRAY_SIZE(dk_nand_partition);
144-
return dk_nand_partition;
145-
}
146-
147141
static struct atmel_nand_data __initdata dk_nand_data = {
148142
.ale = 22,
149143
.cle = 21,
150144
.det_pin = AT91_PIN_PB1,
151145
.rdy_pin = AT91_PIN_PC2,
152146
// .enable_pin = ... not there
153-
.partition_info = nand_partitions,
147+
.parts = dk_nand_partition,
148+
.num_parts = ARRAY_SIZE(dk_nand_partition),
154149
};
155150

156151
#define DK_FLASH_BASE AT91_CHIPSELECT_0

‎arch/arm/mach-at91/board-sam9-l9260.c‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,19 +131,14 @@ static struct mtd_partition __initdata ek_nand_partition[] = {
131131
},
132132
};
133133

134-
static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
135-
{
136-
*num_partitions = ARRAY_SIZE(ek_nand_partition);
137-
return ek_nand_partition;
138-
}
139-
140134
static struct atmel_nand_data __initdata ek_nand_data = {
141135
.ale = 21,
142136
.cle = 22,
143137
// .det_pin = ... not connected
144138
.rdy_pin = AT91_PIN_PC13,
145139
.enable_pin = AT91_PIN_PC14,
146-
.partition_info = nand_partitions,
140+
.parts = ek_nand_partition,
141+
.num_parts = ARRAY_SIZE(ek_nand_partition),
147142
};
148143

149144
static struct sam9_smc_config __initdata ek_nand_smc_config = {

0 commit comments

Comments
 (0)