[RFC PATCH 0/5] arm64: prepare for basic Allwinner support

110 views
Skip to first unread message

Andre Przywara

unread,
Dec 22, 2015, 8:02:15 AM12/22/15
to Maxime Ripard, Chen-Yu Tsai, ar...@arndb.de, marc.z...@arm.com, catalin...@arm.com, will....@arm.com, linux...@googlegroups.com, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
This is a first step for introducing support for the Allwinner A64
SoC that made a recent appearance on the Pine A64 board featured on
Kickstarter.
This mini-series prepares the ground by allowing ARCH_SUNXI to be
defined for an arm64 kernel.
The patches fix some minor warnings which appear when Allwinner
(aka. sunxi) drivers are compiled for a 64-bit architecture.

Due to a lack of official documentation and hardware availability
this doesn't go any further at this moment.

Please have a look and comment!

Cheers,
Andre.

Andre Przywara (5):
drivers: sunxi-rsb: fix error output type
crypto: sunxi-ss: fix min3() call to match types
crypto: sunxi-ss: fix dev_dbg() output type
irqchip: sun4i: fix compilation outside of arch/arm
arm64: Introduce Allwinner SoC config option

arch/arm64/Kconfig.platforms | 5 +++++
drivers/bus/sunxi-rsb.c | 4 ++--
drivers/crypto/sunxi-ss/sun4i-ss-cipher.c | 14 +++++++-------
drivers/crypto/sunxi-ss/sun4i-ss-hash.c | 8 ++++----
drivers/irqchip/irq-sun4i.c | 1 -
5 files changed, 18 insertions(+), 14 deletions(-)

--
2.5.1

Andre Przywara

unread,
Dec 22, 2015, 8:02:15 AM12/22/15
to Maxime Ripard, Chen-Yu Tsai, ar...@arndb.de, marc.z...@arm.com, catalin...@arm.com, will....@arm.com, linux...@googlegroups.com, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org, Corentin Labbe, Herbert Xu, David S. Miller, linux-...@vger.kernel.org
The length parameter in this dev_dbg() call is actually a size_t,
so use the proper type to avoid warnings when compiling for 64-bit
architectures.

Signed-off-by: Andre Przywara <andre.p...@arm.com>
---
drivers/crypto/sunxi-ss/sun4i-ss-cipher.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c b/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c
index b3bc7bd..af2690c 100644
--- a/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c
+++ b/drivers/crypto/sunxi-ss/sun4i-ss-cipher.c
@@ -251,7 +251,7 @@ static int sun4i_ss_cipher_poll(struct ablkcipher_request *areq)
spaces = readl(ss->base + SS_FCSR);
rx_cnt = SS_RXFIFO_SPACES(spaces);
tx_cnt = SS_TXFIFO_SPACES(spaces);
- dev_dbg(ss->dev, "%x %u/%u %u/%u cnt=%u %u/%u %u/%u cnt=%u %u %u\n",
+ dev_dbg(ss->dev, "%x %u/%zu %u/%u cnt=%u %u/%zu %u/%u cnt=%u %u %u\n",
mode,
oi, mi.length, ileft, areq->nbytes, rx_cnt,
oo, mo.length, oleft, areq->nbytes, tx_cnt,
--
2.5.1

Andre Przywara

unread,
Dec 22, 2015, 8:02:15 AM12/22/15
to Maxime Ripard, Chen-Yu Tsai, ar...@arndb.de, marc.z...@arm.com, catalin...@arm.com, will....@arm.com, linux...@googlegroups.com, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
"len" is actually a size_t in this function here, so properly annotate
the dev_err printf type to allow compilation for 64-bit architectures.

Signed-off-by: Andre Przywara <andre.p...@arm.com>
---
drivers/bus/sunxi-rsb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/sunxi-rsb.c b/drivers/bus/sunxi-rsb.c
index 846bc29..7f26bc1d 100644
--- a/drivers/bus/sunxi-rsb.c
+++ b/drivers/bus/sunxi-rsb.c
@@ -330,7 +330,7 @@ static int sunxi_rsb_read(struct sunxi_rsb *rsb, u8 rtaddr, u8 addr,
cmd = RSB_CMD_RD32;
break;
default:
- dev_err(rsb->dev, "Invalid access width: %d\n", len);
+ dev_err(rsb->dev, "Invalid access width: %zd\n", len);
return -EINVAL;
}

@@ -372,7 +372,7 @@ static int sunxi_rsb_write(struct sunxi_rsb *rsb, u8 rtaddr, u8 addr,
cmd = RSB_CMD_WR32;
break;
default:
- dev_err(rsb->dev, "Invalid access width: %d\n", len);
+ dev_err(rsb->dev, "Invalid access width: %zd\n", len);
return -EINVAL;
}

--
2.5.1

Arnd Bergmann

unread,
Dec 22, 2015, 5:02:56 PM12/22/15
to linux-ar...@lists.infradead.org, Andre Przywara, Maxime Ripard, Chen-Yu Tsai, marc.z...@arm.com, catalin...@arm.com, will....@arm.com, linux-...@vger.kernel.org, linux...@googlegroups.com
On Tuesday 22 December 2015, Andre Przywara wrote:
> "len" is actually a size_t in this function here, so properly annotate
> the dev_err printf type to allow compilation for 64-bit architectures.
>
> Signed-off-by: Andre Przywara <andre.p...@arm.com>

Acked-by:

Arnd Bergmann

unread,
Dec 22, 2015, 5:07:36 PM12/22/15
to linux-ar...@lists.infradead.org, Andre Przywara, Maxime Ripard, Chen-Yu Tsai, Herbert Xu, marc.z...@arm.com, catalin...@arm.com, will....@arm.com, linux-...@vger.kernel.org, linux...@googlegroups.com, Corentin Labbe, linux-...@vger.kernel.org, David S. Miller
On Tuesday 22 December 2015, Andre Przywara wrote:
> The length parameter in this dev_dbg() call is actually a size_t,
> so use the proper type to avoid warnings when compiling for 64-bit
> architectures.
>
> Signed-off-by: Andre Przywara <andre.p...@arm.com>

Acked-by: Arnd Bergmann <ar...@arndb.de>

Corentin LABBE

unread,
Dec 24, 2015, 7:56:44 AM12/24/15
to Andre Przywara, Maxime Ripard, Chen-Yu Tsai, ar...@arndb.de, marc.z...@arm.com, catalin...@arm.com, will....@arm.com, linux...@googlegroups.com, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org, Herbert Xu, David S. Miller, linux-...@vger.kernel.org
Acked-by: LABBE Corentin <clabbe....@gmail.com>

Maxime Ripard

unread,
Dec 27, 2015, 5:03:40 PM12/27/15
to Andre Przywara, Chen-Yu Tsai, ar...@arndb.de, marc.z...@arm.com, catalin...@arm.com, will....@arm.com, linux...@googlegroups.com, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
On Tue, Dec 22, 2015 at 12:27:43PM +0000, Andre Przywara wrote:
> "len" is actually a size_t in this function here, so properly annotate
> the dev_err printf type to allow compilation for 64-bit architectures.
>
> Signed-off-by: Andre Przywara <andre.p...@arm.com>

Queued for 4.6, thanks!

Maxime

--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
signature.asc

Maxime Ripard

unread,
Dec 27, 2015, 5:05:52 PM12/27/15
to Andre Przywara, Chen-Yu Tsai, ar...@arndb.de, marc.z...@arm.com, catalin...@arm.com, will....@arm.com, linux...@googlegroups.com, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org, Corentin Labbe, Herbert Xu, David S. Miller, linux-...@vger.kernel.org
On Tue, Dec 22, 2015 at 12:27:45PM +0000, Andre Przywara wrote:
> The length parameter in this dev_dbg() call is actually a size_t,
> so use the proper type to avoid warnings when compiling for 64-bit
> architectures.
>
> Signed-off-by: Andre Przywara <andre.p...@arm.com>

Acked-by: Maxime Ripard <maxime...@free-electrons.com>

Thanks!
signature.asc
Reply all
Reply to author
Forward
0 new messages