Support for omap hwspinlocks in 3.8 for BeagleBone (AM335X)

Hi,

I’m using the built-in HW-spinlocks in the AM3359/AM3358 as synchronization between the ARM processor and the PRU’s. It’s seems the omap_hwspinlock -driver is easy to modify to make it waork not only for OMAP4 but also for “SOC_AM33XX” -processors. It would be nice to get this into the patchset from git://github.com/beagleboard/kernel.git so I’ll attach a patch for what changes I’ve done to get this to work.

Maybe sombody with deeper knowledge about the pm-framework should take a look at this as well. I’m not very familiar with the Power Management Framework, and most of the changes are related to that.

I’ve verified this patch on a BeagleBone A6, running a 3.8.4 kernel with patch set from git://github.com/beagleboard/kernel.git, and as far as I can see it is working fine.

br Håkan Engblom

hwspinlock_feature.patch (4.28 KB)

Minor comment - You should look at using the devm_* APIs in the probe function
since that's the preferred approach now. But overall this looks fine so I would
suggest posting this to the linux-arm and linux-omap mailing lists for
more comments.

Regards,
Vaibhav B.

I’ll look into the devm_* API. Thanks for the quick reply, I’ll look into this after a few days vacation that I’ll have from tomorrow.

br Håkan

Hi,

I'm using the built-in HW-spinlocks in the AM3359/AM3358 as synchronization between the ARM processor and the PRU's. It's seems the omap_hwspinlock -driver is easy to modify to make it waork not only for OMAP4 but also for "SOC_AM33XX" -processors. It would be nice to get this into the patchset from git://github.com/beagleboard/kernel.git so I'll attach a patch for what changes I've done to get this to work.

Please provide a github pull request for that

Hi Koen,

>
> I'm using the built-in HW-spinlocks in the AM3359/AM3358 as synchronization between the ARM processor and the PRU's. It's seems the omap_hwspinlock -driver is easy to modify to make it waork not only for OMAP4 but also for "SOC_AM33XX" -processors. It would be nice to get this into the patchset from git://github.com/beagleboard/kernel.git so I'll attach a patch for what changes I've done to get this to work.

Please provide a github pull request for that

I'm new to this so excuse me if the answer to this question is
obvious, but technically, do I need a git repository that is reachable
from your point of view to perform a pull request ? In other word, as
a response to my pull request, will you pull the changes from a
repository hosted by me ? I'm asking since it might be problematic to
make the employer and IT responsible provide a git repository
reachable from public internet, even if it may not be impossible if I
can motivate it.

br Håkan Engblom

Minor comment - You should look at using the devm_* APIs in the probe function
since that's the preferred approach now. But overall this looks fine so I would
suggest posting this to the linux-arm and linux-omap mailing lists for
more comments.

Hi Vaibhav,

Have some general question about the workflow; I was under the
impression that the repo git://github.com/beagleboard/kernel.git was
regularly "pushed" to the mainline kernel, but maybe that is not the
case. Since you're advicing me to post this patch to arm-linux and
omap-linux for comments, is arm-linux and/or omap-linux the place I
should try to get the patch in, or how is the workflow for a patch
like this ? It would be nice to know how this procedure works, if you
have some information to share, it would be nice.

BTW, I made changes to use the devm_* API instead, attaching a new
patch, though it should maybe be sent to arm-linux/omap-linux instead.

br Håkan E.

hwspinlock_feature_rev1.patch (5.15 KB)