From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Thu, 19 Jan 2017 06:57:55 -0700 Subject: [U-Boot] [PATCH 06/12] SPI: SPL: sunxi: fix 64-bit build In-Reply-To: <20170115121727.lcx5u3hhm6ramnuv@localhost> References: <1484271004-19681-1-git-send-email-andre.przywara@arm.com> <1484271004-19681-7-git-send-email-andre.przywara@arm.com> <20170115121727.lcx5u3hhm6ramnuv@localhost> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 15 January 2017 at 05:17, Rask Ingemann Lambertsen wrote: > On Fri, Jan 13, 2017 at 01:29:58AM +0000, Andre Przywara wrote: >> Addresses passed on to readl and writel are expected to be of the same >> size as a pointer. Change the parameter types of sunxi_spi0_read_data() >> to make the compiler happy and allow a warning-free aarch64 compile. >> >> Signed-off-by: Andre Przywara > > How about using intptr_t and uintptr_t from include/compiler.h? It will make > it clearer that these parameters should be able to hold a pointer. > >> --- >> drivers/mtd/spi/sunxi_spi_spl.c | 16 ++++++++-------- >> 1 file changed, 8 insertions(+), 8 deletions(-) >> >> diff --git a/drivers/mtd/spi/sunxi_spi_spl.c b/drivers/mtd/spi/sunxi_spi_spl.c >> index a24c115..852abd4 100644 >> --- a/drivers/mtd/spi/sunxi_spi_spl.c >> +++ b/drivers/mtd/spi/sunxi_spi_spl.c >> @@ -185,14 +185,14 @@ static void spi0_deinit(void) >> #define SPI_READ_MAX_SIZE 60 /* FIFO size, minus 4 bytes of the header */ >> >> static void sunxi_spi0_read_data(u8 *buf, u32 addr, u32 bufsize, >> - u32 spi_ctl_reg, >> - u32 spi_ctl_xch_bitmask, >> - u32 spi_fifo_reg, >> - u32 spi_tx_reg, >> - u32 spi_rx_reg, >> - u32 spi_bc_reg, >> - u32 spi_tc_reg, >> - u32 spi_bcc_reg) >> + ulong spi_ctl_reg, >> + ulong spi_ctl_xch_bitmask, >> + ulong spi_fifo_reg, >> + ulong spi_tx_reg, >> + ulong spi_rx_reg, >> + ulong spi_bc_reg, >> + ulong spi_tc_reg, >> + ulong spi_bcc_reg) >> { >> writel(4 + bufsize, spi_bc_reg); /* Burst counter (total bytes) */ >> writel(4, spi_tc_reg); /* Transfer counter (bytes to send) */ We normally use ulong for addresses in U-Boot. Reviewed-by: Simon Glass