* [U-Boot] [PATCH] mtd: denali: fix warning when compiled for 64bit system
@ 2016-02-29 11:57 Masahiro Yamada
2016-03-01 1:59 ` Tom Rini
2016-03-23 16:48 ` Masahiro Yamada
0 siblings, 2 replies; 3+ messages in thread
From: Masahiro Yamada @ 2016-02-29 11:57 UTC (permalink / raw)
To: u-boot
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>
---
drivers/mtd/nand/denali.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
index b94fb29..53e6956 100644
--- a/drivers/mtd/nand/denali.c
+++ b/drivers/mtd/nand/denali.c
@@ -747,7 +747,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));
@@ -765,7 +765,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);
@@ -775,7 +775,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);
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] mtd: denali: fix warning when compiled for 64bit system
2016-02-29 11:57 [U-Boot] [PATCH] mtd: denali: fix warning when compiled for 64bit system Masahiro Yamada
@ 2016-03-01 1:59 ` Tom Rini
2016-03-23 16:48 ` Masahiro Yamada
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2016-03-01 1:59 UTC (permalink / raw)
To: u-boot
On Mon, Feb 29, 2016 at 08:57:29PM +0900, Masahiro Yamada wrote:
> 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>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160229/67dd8d8c/attachment.sig>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] mtd: denali: fix warning when compiled for 64bit system
2016-02-29 11:57 [U-Boot] [PATCH] mtd: denali: fix warning when compiled for 64bit system Masahiro Yamada
2016-03-01 1:59 ` Tom Rini
@ 2016-03-23 16:48 ` Masahiro Yamada
1 sibling, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2016-03-23 16:48 UTC (permalink / raw)
To: u-boot
2016-02-29 20:57 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
> 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>
Applied to u-boot-uniphier/master.
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-23 16:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-29 11:57 [U-Boot] [PATCH] mtd: denali: fix warning when compiled for 64bit system Masahiro Yamada
2016-03-01 1:59 ` Tom Rini
2016-03-23 16:48 ` Masahiro Yamada
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.