From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Subject: Re: [PATCH] ARM: dts: Correct offset in OMAP4_WKUP_IOPAD macro Date: Mon, 12 May 2014 09:16:48 -0700 Message-ID: <20140512161647.GJ31772@atomide.com> References: <1397924056-6462-1-git-send-email-manabian@gmail.com> <20140421153539.GB23945@atomide.com> <20140506001237.GK25949@atomide.com> <20140509160725.GG17814@atomide.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mho-03-ewr.mailhop.org ([204.13.248.66]:30059 "EHLO mho-01-ewr.mailhop.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754494AbaELQQv (ORCPT ); Mon, 12 May 2014 12:16:51 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: Joachim Eastwood Cc: linux-omap@vger.kernel.org * Joachim Eastwood [140511 10:28]: > On 9 May 2014 18:07, Tony Lindgren wrote: > > > > I was thinking that too initially, but then we would have macros that behave > > in a different way: > > > > 1. Calculate the iopad offset from the iopad register area start based on > > the iopad physical address > > > > 2. Calculate the iopad offset from the iopad register area start based on > > the iopadd offset from the driver base address > > > >> One other possibility is to use my original patch in this mail or just > >> create a OMAP4_IOPAD with offset 0x040 which will on OMAP4 work for > >> both core and wkup. > > > > That also makes the macro behave in a different way depending on the > > SoC which is not nice. > > How about something like this then: > /* > * Macros to allow using the offset from the padconf physical address > * instead of the offset from padconf base. > */ > #define OMAP_PADCONF_OFFSET(offset, base_offset) ((offset) - (base_offset)) > > #define OMAP4_IOPAD(offset, val) OMAP_PADCONF_OFFSET((offset), 0x0040) (val) > #define OMAP5_IOPAD(offset, val) OMAP_PADCONF_OFFSET((offset), 0x0040) (val) > > The OMAP4/5 TRMs list address offsets from the padconf physical > address (which is not driver base address) and not absolute physical > address for padconf registers like some other OMAP TRMs. So create a > new macro to avoid confusion between different OMAP parts. > > I can cook up a patch if you like the idea above. Sure sounds good to me. The offset is different for at least omap3 instances, so those should use OMAP3_*_IOPAD macros. Regards, Tony