]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mtd: denali: fix incorrect bitmask error in denali_setup_dma
authorGraham Moore <grmoore@opensource.altera.com>
Fri, 9 Jan 2015 15:32:35 +0000 (09:32 -0600)
committerBrian Norris <computersforpeace@gmail.com>
Tue, 13 Jan 2015 10:32:08 +0000 (02:32 -0800)
commit 3157d1ed2309 ("mtd: denali: remove unnecessary casts") introduced
an error by using a wrong bitmask.

A uint16_t cast was replaced with & 0xff, should be & 0xffff.

Signed-off-by: Graham Moore <grmoore@opensource.altera.com>
Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/denali.c

index b3b7ca1bafb807f8828b3af853aa7886b87d7e90..5e397fba419bafc59716ddfc612c00cf27d5edd8 100644 (file)
@@ -1041,7 +1041,7 @@ static void denali_setup_dma(struct denali_nand_info *denali, int op)
        index_addr(denali, mode | ((addr >> 16) << 8), 0x2200);
 
        /* 3. set memory low address bits 23:8 */
-       index_addr(denali, mode | ((addr & 0xff) << 8), 0x2300);
+       index_addr(denali, mode | ((addr & 0xffff) << 8), 0x2300);
 
        /* 4. interrupt when complete, burst len = 64 bytes */
        index_addr(denali, mode | 0x14000, 0x2400);