Re: [RFC PATCH 06/10] hwspinlock: OMAP4: Add spinlock support in DT

From
Arnd Bergmann <arnd@arndb.de>
Date
2011-09-08 14:47:55
Also in
linux-arm-kernel, linux-omap
Reply to
Ohad Ben-Cohen, 2011-09-08
On Thursday 08 September 2011, Ohad Ben-Cohen wrote:
On Thu, Sep 8, 2011 at 11:07 AM, Cousson, Benoit [off-list ref] wrote:
quoted
The (small) issue for my point of view is that the #hwspinlock is already
encoded in the IP itself. So adding a baseid directly in DT will look like
duplicating indirectly something that is already there in the HW.
That being said, since we cannot rely on the order, we will not be able to
get the proper baseid until the driver probe every hwspinlock devices :-(
So baseid might be a easier choice.
Sounds good. Thanks a lot !
I think a number would work here but is not optimal for the device tree
representation. I think a better binding would be to encode it like
interrupt numbers, where every device that uses a hwspinlock will describe
that as a combination of phandle to the hwspinlock controller and
identifier to be used by that controller, e.g.

	spinlock1 {
		compatible = "ti,omap-spinlock";
		regs = ...
		interrupts = <42>;
		interrupt-parent = &irq-controller;
	};

	dsp {
		compatible = ...
		regs = ...
		spinlocks = <23>; // local number withing &spinlock1;
		spinlock-controller = &spinlock1;
	};

or possibly shorter

		spinlocks = <&spinlock1 23>;

	Arnd
Thread (8 messages) 8 messages, 4 authors, last reply 2011-09-08
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help