From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tero Kristo Subject: Re: [PATCH 0/3] ARM: OMAP2+: hwmod: RTC: Add lock and unlock hooks Date: Tue, 14 Jul 2015 17:51:52 +0300 Message-ID: <55A52208.5060302@ti.com> References: <1433928386-24891-1-git-send-email-lokeshvutla@ti.com> <55A4DFEF.6040005@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <55A4DFEF.6040005@ti.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Lokesh Vutla , paul@pwsan.com, tony@atomide.com Cc: linux-omap@vger.kernel.org, nsekhar@ti.com, linux-arm-kernel@lists.infradead.org List-Id: linux-omap@vger.kernel.org On 07/14/2015 01:09 PM, Lokesh Vutla wrote: > Hi, > On Wednesday 10 June 2015 02:56 PM, Lokesh Vutla wrote: >> Some IP blocks like RTC, needs an additional unlocking mechanism for >> writing to its registers. This patch adds optional lock and unlock >> function pointers to the IP block's hwmod data which gets executed >> before and after writing into IP sysconfig register. >> And also hook lock and unlock functions to AMx3xx, DRA7 RTC hwmod data, >> so that sysconfig registers are updated properly. > ping on this series. > > Thanks and regards, > Lokesh This looks kind of hackish to have the unlock + lock functionality copy pasted to both driver and hwmod. It is also racy, as there is no locking in place to avoid concurrent access to the lock/unlock registers across hwmod+driver. Can we avoid these issues somehow? -Tero >> >> Tested on: >> DRA7-evm: http://pastebin.ubuntu.com/11688889/ >> DRA72-evm: http://pastebin.ubuntu.com/11688901/ >> BeagleBoard-x15: http://pastebin.ubuntu.com/11688907/ >> BeagleBoneBlack: http://pastebin.ubuntu.com/11688923/ >> AM437x-gp-evm: http://pastebin.ubuntu.com/11689157/ (Used an out of tree patch to enable RTC) >> >> Lokesh Vutla (3): >> ARM: OMAP2+: hwmod: add support for lock and unlock hooks >> ARM: DRA: hwmod: RTC: Add lock and unlock functions >> ARM: AMx3xx: RTC: Add lock and unlock functions >> >> arch/arm/mach-omap2/omap_hwmod.c | 13 ++++++ >> arch/arm/mach-omap2/omap_hwmod.h | 6 +++ >> .../mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c | 2 + >> arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 2 + >> arch/arm/mach-omap2/omap_hwmod_reset.c | 47 ++++++++++++++++++++++ >> 5 files changed, 70 insertions(+) >> >