From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752313AbdCHKwh (ORCPT ); Wed, 8 Mar 2017 05:52:37 -0500 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:55413 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750745AbdCHKwf (ORCPT ); Wed, 8 Mar 2017 05:52:35 -0500 Message-ID: <1488966776.2467.13.camel@pengutronix.de> Subject: Re: [PATCH] reset: sunxi: fix for 64-bit compilation From: Philipp Zabel To: Andre Przywara Cc: Chen-Yu Tsai , Maxime Ripard , linux-arm-kernel , linux-kernel Date: Wed, 08 Mar 2017 10:52:56 +0100 In-Reply-To: <6a0e362b-8ebf-6254-6387-12967ec8c484@arm.com> References: <1488764156-22197-1-git-send-email-andre.przywara@arm.com> <6a0e362b-8ebf-6254-6387-12967ec8c484@arm.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.9-1+b1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:100:3ad5:47ff:feaf:1a17 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2017-03-08 at 09:26 +0000, Andre Przywara wrote: > Hi, > > On 08/03/17 04:28, Chen-Yu Tsai wrote: > > On Mon, Mar 6, 2017 at 9:35 AM, Andre Przywara wrote: > >> The Allwinner reset controller has 32-bit registers, so translating > >> the reset cell number into a register and bit offset should not use > >> any architecture dependent data size. Otherwise this breaks for 64-bit > >> architectures like arm64. > >> Fix this by making it clear that it's the hardware register width which > >> matters here in the calculation. > >> > >> Signed-off-by: Andre Przywara > > > > Acked-by: Chen-Yu Tsai > > Thanks a lot! Applied, thanks. > > Though I don't expect this driver to be used with arm64 chips. > > Well, weren't we toying with the idea of using this for the A64 PRCM > support? > > Also the driver is actually pretty generic, and I have (renaming) > patches lying around to make this obvious. That is interesting, I have an untested patch that unifies sunxi, socfpga, and stm32 floating around. I suppose this could be extended to also cover ath79 and zx2967. I'll dust it off and send it out. regards Philipp