Changeset 34279


Ignore:
Timestamp:
2012-11-20T17:29:43+01:00 (5 years ago)
Author:
juhosg
Message:

ar71xx: make rb750_nand driver compatible with 3.7

Also add compatibility patches for the currently
supported kernels.

Signed-off-by: Gabor Juhos <juhosg@…>

Location:
trunk/target/linux/ar71xx
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/files/drivers/mtd/nand/rb750_nand.c

    r33971 r34279  
    111111} 
    112112 
    113 static int rb750_nand_read_verify(u8 *read_buf, unsigned len, 
    114                                   const u8 *verify_buf) 
     113static void rb750_nand_read(u8 *read_buf, unsigned len) 
    115114{ 
    116115        void __iomem *base = ath79_gpio_base; 
     
    132131                __raw_writel(RB750_NAND_NRE, base + AR71XX_GPIO_REG_SET); 
    133132 
    134                 if (read_buf) 
    135                         read_buf[i] = data; 
    136                 else if (verify_buf && verify_buf[i] != data) 
    137                         return -EFAULT; 
    138         } 
    139  
    140         return 0; 
     133                read_buf[i] = data; 
     134        } 
    141135} 
    142136 
     
    213207{ 
    214208        u8 data = 0; 
    215         rb750_nand_read_verify(&data, 1, NULL); 
     209        rb750_nand_read(&data, 1); 
    216210        return data; 
    217211} 
     
    219213static void rb750_nand_read_buf(struct mtd_info *mtd, u8 *buf, int len) 
    220214{ 
    221         rb750_nand_read_verify(buf, len, NULL); 
     215        rb750_nand_read(buf, len); 
    222216} 
    223217 
     
    225219{ 
    226220        rb750_nand_write(buf, len); 
    227 } 
    228  
    229 static int rb750_nand_verify_buf(struct mtd_info *mtd, const u8 *buf, int len) 
    230 { 
    231         return rb750_nand_read_verify(NULL, len, buf); 
    232221} 
    233222 
     
    286275        info->chip.write_buf    = rb750_nand_write_buf; 
    287276        info->chip.read_buf     = rb750_nand_read_buf; 
    288         info->chip.verify_buf   = rb750_nand_verify_buf; 
    289277 
    290278        info->chip.chip_delay   = 25; 
  • trunk/target/linux/ar71xx/patches-3.3/a04-rb750_nand-add-NO_AUTOINCR-flag.patch

    r33971 r34279  
    22--- a/drivers/mtd/nand/rb750_nand.c 
    33+++ b/drivers/mtd/nand/rb750_nand.c 
    4 @@ -289,6 +289,7 @@ static int __devinit rb750_nand_probe(st 
     4@@ -277,6 +277,7 @@ static int __devinit rb750_nand_probe(st 
    55  
    66        info->chip.chip_delay   = 25; 
Note: See TracChangeset for help on using the changeset viewer.