summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2016-02-29 20:57:29 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2016-03-24 01:36:49 +0900
commit73b5b27b7a8a01cf0527ecba5419ef5a44caf27d (patch)
tree1df4eb03c70c3384c21367c80a4fcb5540eb691f /drivers
parent0764f24ae6bc937e358990c357f7452b4d5351e3 (diff)
downloadu-boot-imx-73b5b27b7a8a01cf0527ecba5419ef5a44caf27d.zip
u-boot-imx-73b5b27b7a8a01cf0527ecba5419ef5a44caf27d.tar.gz
u-boot-imx-73b5b27b7a8a01cf0527ecba5419ef5a44caf27d.tar.bz2
mtd: denali: fix warning when compiled for 64bit system
The 64-bit compiler (ex. aarch64) emits "warning: cast from pointer to integer of different size". Make it work with 64bit DMA address while I am here. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/denali.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
index 192be7d..018d14f 100644
--- a/drivers/mtd/nand/denali.c
+++ b/drivers/mtd/nand/denali.c
@@ -741,7 +741,7 @@ static void denali_setup_dma(struct denali_nand_info *denali, int op)
{
uint32_t mode;
const int page_count = 1;
- uint32_t addr = (uint32_t)denali->buf.dma_buf;
+ uint64_t addr = (unsigned long)denali->buf.dma_buf;
flush_dcache_range(addr, addr + sizeof(denali->buf.dma_buf));
@@ -759,7 +759,7 @@ static void denali_setup_dma(struct denali_nand_info *denali, int op)
index_addr(denali, mode, addr);
/* 3. set memory high address bits 64:32 */
- index_addr(denali, mode, 0);
+ index_addr(denali, mode, addr >> 32);
#else
mode = MODE_10 | BANK(denali->flash_bank);
@@ -769,7 +769,7 @@ static void denali_setup_dma(struct denali_nand_info *denali, int op)
index_addr(denali, mode | denali->page, 0x2000 | op | page_count);
/* 2. set memory high address bits 23:8 */
- index_addr(denali, mode | ((addr >> 16) << 8), 0x2200);
+ index_addr(denali, mode | (((addr >> 16) & 0xffff) << 8), 0x2200);
/* 3. set memory low address bits 23:8 */
index_addr(denali, mode | ((addr & 0xffff) << 8), 0x2300);