ar71xx: use the button for WPS control on the DB120
[openwrt.git] / target / linux / xburst / patches-2.6.37 / 302-nand-fixes.patch
1 From 3ac9f7e0bc48b3c9ab6529410a2b8f3f9eac5bc5 Mon Sep 17 00:00:00 2001
2 From: Lars-Peter Clausen <lars@metafoo.de>
3 Date: Wed, 10 Nov 2010 11:29:36 +0100
4 Subject: [PATCH 20/23] MTD: NAND: jz4740: Make 'struct platform_driver jz_nand_driver' static
5
6 Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
7 ---
8 drivers/mtd/nand/jz4740_nand.c | 2 +-
9 1 files changed, 1 insertions(+), 1 deletions(-)
10
11 --- a/drivers/mtd/nand/jz4740_nand.c
12 +++ b/drivers/mtd/nand/jz4740_nand.c
13 @@ -251,58 +251,6 @@ static int jz_nand_correct_ecc_rs(struct
14 return 0;
15 }
16
17 -
18 -/* Copy paste of nand_read_page_hwecc_oob_first except for different eccpos
19 - * handling. The ecc area is for 4k chips 72 bytes long and thus does not fit
20 - * into the eccpos array. */
21 -static int jz_nand_read_page_hwecc_oob_first(struct mtd_info *mtd,
22 - struct nand_chip *chip, uint8_t *buf, int page)
23 -{
24 - int i, eccsize = chip->ecc.size;
25 - int eccbytes = chip->ecc.bytes;
26 - int eccsteps = chip->ecc.steps;
27 - uint8_t *p = buf;
28 - unsigned int ecc_offset = chip->page_shift;
29 -
30 - /* Read the OOB area first */
31 - chip->cmdfunc(mtd, NAND_CMD_READOOB, 0, page);
32 - chip->read_buf(mtd, chip->oob_poi, mtd->oobsize);
33 - chip->cmdfunc(mtd, NAND_CMD_READ0, 0, page);
34 -
35 - for (i = ecc_offset; eccsteps; eccsteps--, i += eccbytes, p += eccsize) {
36 - int stat;
37 -
38 - chip->ecc.hwctl(mtd, NAND_ECC_READ);
39 - chip->read_buf(mtd, p, eccsize);
40 -
41 - stat = chip->ecc.correct(mtd, p, &chip->oob_poi[i], NULL);
42 - if (stat < 0)
43 - mtd->ecc_stats.failed++;
44 - else
45 - mtd->ecc_stats.corrected += stat;
46 - }
47 - return 0;
48 -}
49 -
50 -/* Copy-and-paste of nand_write_page_hwecc with different eccpos handling. */
51 -static void jz_nand_write_page_hwecc(struct mtd_info *mtd,
52 - struct nand_chip *chip, const uint8_t *buf)
53 -{
54 - int i, eccsize = chip->ecc.size;
55 - int eccbytes = chip->ecc.bytes;
56 - int eccsteps = chip->ecc.steps;
57 - const uint8_t *p = buf;
58 - unsigned int ecc_offset = chip->page_shift;
59 -
60 - for (i = ecc_offset; eccsteps; eccsteps--, i += eccbytes, p += eccsize) {
61 - chip->ecc.hwctl(mtd, NAND_ECC_WRITE);
62 - chip->write_buf(mtd, p, eccsize);
63 - chip->ecc.calculate(mtd, p, &chip->oob_poi[i]);
64 - }
65 -
66 - chip->write_buf(mtd, chip->oob_poi, mtd->oobsize);
67 -}
68 -
69 #ifdef CONFIG_MTD_CMDLINE_PARTS
70 static const char *part_probes[] = {"cmdline", NULL};
71 #endif
72 @@ -393,9 +341,6 @@ static int __devinit jz_nand_probe(struc
73 chip->ecc.size = 512;
74 chip->ecc.bytes = 9;
75
76 - chip->ecc.read_page = jz_nand_read_page_hwecc_oob_first;
77 - chip->ecc.write_page = jz_nand_write_page_hwecc;
78 -
79 if (pdata)
80 chip->ecc.layout = pdata->ecc_layout;
81
82 @@ -489,7 +434,7 @@ static int __devexit jz_nand_remove(stru
83 return 0;
84 }
85
86 -struct platform_driver jz_nand_driver = {
87 +static struct platform_driver jz_nand_driver = {
88 .probe = jz_nand_probe,
89 .remove = __devexit_p(jz_nand_remove),
90 .driver = {
This page took 0.045036 seconds and 5 git commands to generate.