generic: ar8216: add vtu_flush field to ar8xxx_chip
[openwrt.git] / target / linux / generic / patches-2.6.39 / 475-mtd-m25p80-allow-to-disable-small-sector-erase.patch
1 --- a/drivers/mtd/devices/Kconfig
2 +++ b/drivers/mtd/devices/Kconfig
3 @@ -102,6 +102,14 @@ config M25PXX_USE_FAST_READ
4 help
5 This option enables FAST_READ access supported by ST M25Pxx.
6
7 +config M25PXX_PREFER_SMALL_SECTOR_ERASE
8 + bool "Prefer small sector erase"
9 + depends on MTD_M25P80
10 + default y
11 + help
12 + This option enables use of the small erase sectors if that is
13 + supported by the flash chip.
14 +
15 config MTD_SST25L
16 tristate "Support SST25L (non JEDEC) SPI Flash chips"
17 depends on SPI_MASTER
18 --- a/drivers/mtd/devices/m25p80.c
19 +++ b/drivers/mtd/devices/m25p80.c
20 @@ -77,6 +77,12 @@
21 #define FAST_READ_DUMMY_BYTE 0
22 #endif
23
24 +#ifdef CONFIG_M25PXX_PREFER_SMALL_SECTOR_ERASE
25 +#define PREFER_SMALL_SECTOR_ERASE 1
26 +#else
27 +#define PREFER_SMALL_SECTOR_ERASE 0
28 +#endif
29 +
30 /****************************************************************************/
31
32 struct m25p {
33 @@ -902,7 +908,7 @@ static int __devinit m25p_probe(struct s
34 flash->mtd.write = m25p80_write;
35
36 /* prefer "small sector" erase if possible */
37 - if (info->flags & SECT_4K) {
38 + if (PREFER_SMALL_SECTOR_ERASE && (info->flags & SECT_4K)) {
39 flash->erase_opcode = OPCODE_BE_4K;
40 flash->mtd.erasesize = 4096;
41 } else if (info->flags & SECT_4K_PMC) {
This page took 0.047904 seconds and 5 git commands to generate.