Skip to content

Commit

Permalink
mtd: denali: fix incorrect bitmask error in denali_setup_dma
Browse files Browse the repository at this point in the history
commit 3157d1e ("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 <[email protected]>
Signed-off-by: Dinh Nguyen <[email protected]>
Signed-off-by: Brian Norris <[email protected]>
  • Loading branch information
Graham Moore authored and computersforpeace committed Jan 13, 2015
1 parent a9b679b commit 7c272ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/nand/denali.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7c272ac

Please sign in to comment.