From mboxrd@z Thu Jan 1 00:00:00 1970 From: s-anna@ti.com (Suman Anna) Date: Thu, 24 Jul 2014 10:13:37 -0500 Subject: [PATCH 1/2] hwspinlock/omap: enable module before reading SYSSTATUS register In-Reply-To: References: <1404342060-2919-1-git-send-email-s-anna@ti.com> <1404342060-2919-2-git-send-email-s-anna@ti.com> Message-ID: <53D122A1.4040204@ti.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Ohad, On 07/24/2014 08:45 AM, Ohad Ben-Cohen wrote: > Hi Suman, > > On Thu, Jul 3, 2014 at 2:00 AM, Suman Anna wrote: >> The number of hwspinlocks are determined based on the value read >> from the IP block's SYSSTATUS register. However, the module may >> not be enabled and clocked, and the read may result in a bus error. >> >> This particular issue is seen rather easily on AM33XX, since the >> module wakeup is software controlled, and it is disabled out of >> reset. Make sure the module is enabled and clocked before reading >> the SYSSTATUS register. >> >> Signed-off-by: Suman Anna > ... >> + /* >> + * runtime PM will make sure the clock of this module is >> + * enabled again iff at least one lock is requested >> + */ >> + ret = pm_runtime_put_sync(&pdev->dev); > > Is there a specific reason for using the put_sync variant here? If > not, let's just use the regular put(). There was no particular reason, you can change it. > > Let me know, and I can do the change while applying these two patches. Sure, thanks. regards Suman