From: Benoit Cousson <b-cousson-l0cyMroinI0@public.gmane.org> To: grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org, tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org Cc: khilman-l0cyMroinI0@public.gmane.org, Ohad Ben-Cohen <ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org>, manjugk-l0cyMroinI0@public.gmane.org, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Subject: [RFC PATCH 06/10] hwspinlock: OMAP4: Add spinlock support in DT Date: Wed, 24 Aug 2011 15:09:12 +0200 [thread overview] Message-ID: <1314191356-10963-7-git-send-email-b-cousson@ti.com> (raw) In-Reply-To: <1314191356-10963-1-git-send-email-b-cousson-l0cyMroinI0@public.gmane.org> Add a device-tree node for the spinlock. Remove the static device build code if CONFIG_OF is set. Update the hwspinlock driver to use the of_match method. Add the information in Documentation/devicetree. Signed-off-by: Benoit Cousson <b-cousson-l0cyMroinI0@public.gmane.org> Cc: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org> Cc: Ohad Ben-Cohen <ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org> --- arch/arm/boot/dts/omap4.dtsi | 5 +++++ arch/arm/mach-omap2/Makefile | 6 +++++- drivers/hwspinlock/omap_hwspinlock.c | 11 +++++++++++ 3 files changed, 21 insertions(+), 1 deletions(-) diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi index a3efe76..231d7b4 100644 --- a/arch/arm/boot/dts/omap4.dtsi +++ b/arch/arm/boot/dts/omap4.dtsi @@ -105,5 +105,10 @@ reg = <0x48241000 0x1000>, <0x48240100 0x0200>; }; + + spinlock { + compatible = "ti,omap-spinlock"; + hwmods = "spinlock"; + }; }; }; diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 79e42a1..6ab9116 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -263,9 +263,13 @@ obj-y += $(smc91x-m) $(smc91x-y) smsc911x-$(CONFIG_SMSC911X) := gpmc-smsc911x.o obj-y += $(smsc911x-m) $(smsc911x-y) -obj-$(CONFIG_ARCH_OMAP4) += hwspinlock.o disp-$(CONFIG_OMAP2_DSS) := display.o obj-y += $(disp-m) $(disp-y) obj-y += common-board-devices.o twl-common.o + +# Do not build static device init code in case of DT build +ifneq ($(CONFIG_OF),y) +obj-$(CONFIG_ARCH_OMAP4) += hwspinlock.o +endif diff --git a/drivers/hwspinlock/omap_hwspinlock.c b/drivers/hwspinlock/omap_hwspinlock.c index a8f0273..09dd132 100644 --- a/drivers/hwspinlock/omap_hwspinlock.c +++ b/drivers/hwspinlock/omap_hwspinlock.c @@ -203,11 +203,22 @@ static int omap_hwspinlock_remove(struct platform_device *pdev) return 0; } +#if defined(CONFIG_OF) +static const struct of_device_id spinlock_match[] = { + {.compatible = "ti,omap-spinlock", }, + {}, +} +MODULE_DEVICE_TABLE(of, spinlock_match); +#else +#define spinlock_match NULL +#endif + static struct platform_driver omap_hwspinlock_driver = { .probe = omap_hwspinlock_probe, .remove = omap_hwspinlock_remove, .driver = { .name = "omap_hwspinlock", + .of_match_table = spinlock_match, }, }; -- 1.7.0.4
WARNING: multiple messages have this Message-ID (diff)
From: b-cousson@ti.com (Benoit Cousson) To: linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH 06/10] hwspinlock: OMAP4: Add spinlock support in DT Date: Wed, 24 Aug 2011 15:09:12 +0200 [thread overview] Message-ID: <1314191356-10963-7-git-send-email-b-cousson@ti.com> (raw) In-Reply-To: <1314191356-10963-1-git-send-email-b-cousson@ti.com> Add a device-tree node for the spinlock. Remove the static device build code if CONFIG_OF is set. Update the hwspinlock driver to use the of_match method. Add the information in Documentation/devicetree. Signed-off-by: Benoit Cousson <b-cousson@ti.com> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Ohad Ben-Cohen <ohad@wizery.com> --- arch/arm/boot/dts/omap4.dtsi | 5 +++++ arch/arm/mach-omap2/Makefile | 6 +++++- drivers/hwspinlock/omap_hwspinlock.c | 11 +++++++++++ 3 files changed, 21 insertions(+), 1 deletions(-) diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi index a3efe76..231d7b4 100644 --- a/arch/arm/boot/dts/omap4.dtsi +++ b/arch/arm/boot/dts/omap4.dtsi @@ -105,5 +105,10 @@ reg = <0x48241000 0x1000>, <0x48240100 0x0200>; }; + + spinlock { + compatible = "ti,omap-spinlock"; + hwmods = "spinlock"; + }; }; }; diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 79e42a1..6ab9116 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -263,9 +263,13 @@ obj-y += $(smc91x-m) $(smc91x-y) smsc911x-$(CONFIG_SMSC911X) := gpmc-smsc911x.o obj-y += $(smsc911x-m) $(smsc911x-y) -obj-$(CONFIG_ARCH_OMAP4) += hwspinlock.o disp-$(CONFIG_OMAP2_DSS) := display.o obj-y += $(disp-m) $(disp-y) obj-y += common-board-devices.o twl-common.o + +# Do not build static device init code in case of DT build +ifneq ($(CONFIG_OF),y) +obj-$(CONFIG_ARCH_OMAP4) += hwspinlock.o +endif diff --git a/drivers/hwspinlock/omap_hwspinlock.c b/drivers/hwspinlock/omap_hwspinlock.c index a8f0273..09dd132 100644 --- a/drivers/hwspinlock/omap_hwspinlock.c +++ b/drivers/hwspinlock/omap_hwspinlock.c @@ -203,11 +203,22 @@ static int omap_hwspinlock_remove(struct platform_device *pdev) return 0; } +#if defined(CONFIG_OF) +static const struct of_device_id spinlock_match[] = { + {.compatible = "ti,omap-spinlock", }, + {}, +} +MODULE_DEVICE_TABLE(of, spinlock_match); +#else +#define spinlock_match NULL +#endif + static struct platform_driver omap_hwspinlock_driver = { .probe = omap_hwspinlock_probe, .remove = omap_hwspinlock_remove, .driver = { .name = "omap_hwspinlock", + .of_match_table = spinlock_match, }, }; -- 1.7.0.4
next prev parent reply other threads:[~2011-08-24 13:09 UTC|newest] Thread overview: 84+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-08-24 13:09 [RFC PATCH 00/10] OMAP: Add DT support for early init OMAP4 devices Benoit Cousson 2011-08-24 13:09 ` Benoit Cousson [not found] ` <1314191356-10963-1-git-send-email-b-cousson-l0cyMroinI0@public.gmane.org> 2011-08-24 13:09 ` [RFC PATCH 01/10] OMAP2+: l3-noc: Add support for device-tree Benoit Cousson 2011-08-24 13:09 ` Benoit Cousson 2011-09-08 18:01 ` Grant Likely 2011-09-08 18:01 ` Grant Likely [not found] ` <20110908180148.GA2967-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org> 2011-09-08 21:59 ` Cousson, Benoit 2011-09-08 21:59 ` Cousson, Benoit 2011-09-08 23:35 ` Grant Likely 2011-09-08 23:35 ` Grant Likely 2011-08-24 13:09 ` [RFC PATCH 02/10] arm/dts: OMAP4: Add a main ocp entry bound to l3-noc driver Benoit Cousson 2011-08-24 13:09 ` Benoit Cousson [not found] ` <1314191356-10963-3-git-send-email-b-cousson-l0cyMroinI0@public.gmane.org> 2011-09-08 18:03 ` Grant Likely 2011-09-08 18:03 ` Grant Likely 2011-09-09 0:10 ` Cousson, Benoit 2011-09-09 0:10 ` Cousson, Benoit 2011-09-09 2:41 ` Grant Likely 2011-09-09 2:41 ` Grant Likely 2011-08-24 13:09 ` [RFC PATCH 03/10] documentation/dt: Add l3-noc bindings Benoit Cousson 2011-08-24 13:09 ` Benoit Cousson 2011-09-08 18:06 ` Grant Likely 2011-09-08 18:06 ` Grant Likely 2011-09-09 0:18 ` Cousson, Benoit 2011-09-09 0:18 ` Cousson, Benoit 2011-08-24 13:09 ` Benoit Cousson [this message] 2011-08-24 13:09 ` [RFC PATCH 06/10] hwspinlock: OMAP4: Add spinlock support in DT Benoit Cousson 2011-09-07 19:58 ` Ohad Ben-Cohen 2011-09-07 19:58 ` Ohad Ben-Cohen 2011-09-08 7:14 ` Cousson, Benoit 2011-09-08 7:14 ` Cousson, Benoit 2011-09-08 7:56 ` Ohad Ben-Cohen 2011-09-08 7:56 ` Ohad Ben-Cohen 2011-09-08 8:07 ` Cousson, Benoit 2011-09-08 8:07 ` Cousson, Benoit 2011-09-08 8:11 ` Ohad Ben-Cohen 2011-09-08 8:11 ` Ohad Ben-Cohen 2011-09-08 14:47 ` Arnd Bergmann 2011-09-08 14:47 ` Arnd Bergmann 2011-09-08 15:34 ` Cousson, Benoit 2011-09-08 15:34 ` Cousson, Benoit [not found] ` <4E68E09B.4050006-l0cyMroinI0@public.gmane.org> 2011-09-08 16:03 ` Arnd Bergmann 2011-09-08 16:03 ` Arnd Bergmann [not found] ` <201109081647.55377.arnd-r2nGTMty4D4@public.gmane.org> 2011-09-08 16:36 ` Ohad Ben-Cohen 2011-09-08 16:36 ` Ohad Ben-Cohen 2011-09-09 12:58 ` Arnd Bergmann 2011-09-09 12:58 ` Arnd Bergmann 2011-09-11 7:57 ` Ohad Ben-Cohen 2011-09-11 7:57 ` Ohad Ben-Cohen 2011-09-12 14:32 ` Arnd Bergmann 2011-09-12 14:32 ` Arnd Bergmann 2011-08-24 13:09 ` [RFC PATCH 04/10] arm/dts: OMAP4: Add mpu, dsp and iva nodes Benoit Cousson 2011-08-24 13:09 ` Benoit Cousson [not found] ` <1314191356-10963-5-git-send-email-b-cousson-l0cyMroinI0@public.gmane.org> 2011-09-08 18:07 ` Grant Likely 2011-09-08 18:07 ` Grant Likely 2011-08-24 13:09 ` [RFC PATCH 05/10] documentation/dt: Add mpu, dsp and iva bindings Benoit Cousson 2011-08-24 13:09 ` Benoit Cousson [not found] ` <1314191356-10963-6-git-send-email-b-cousson-l0cyMroinI0@public.gmane.org> 2011-09-08 18:09 ` Grant Likely 2011-09-08 18:09 ` Grant Likely 2011-09-09 0:30 ` Cousson, Benoit 2011-09-09 0:30 ` Cousson, Benoit 2011-09-09 2:40 ` Grant Likely 2011-09-09 2:40 ` Grant Likely 2011-08-24 13:09 ` [RFC PATCH 07/10] documentation/dt: Add spinlock bindings Benoit Cousson 2011-08-24 13:09 ` Benoit Cousson [not found] ` <1314191356-10963-8-git-send-email-b-cousson-l0cyMroinI0@public.gmane.org> 2011-09-08 18:10 ` Grant Likely 2011-09-08 18:10 ` Grant Likely 2011-09-09 0:32 ` Cousson, Benoit 2011-09-09 0:32 ` Cousson, Benoit 2011-08-24 13:09 ` [RFC PATCH 08/10] gpio/omap: Adapt GPIO driver to DT Benoit Cousson 2011-08-24 13:09 ` Benoit Cousson [not found] ` <1314191356-10963-9-git-send-email-b-cousson-l0cyMroinI0@public.gmane.org> 2011-09-08 18:15 ` Grant Likely 2011-09-08 18:15 ` Grant Likely 2011-09-09 1:48 ` Cousson, Benoit 2011-09-09 1:48 ` Cousson, Benoit 2011-08-24 13:09 ` [RFC PATCH 09/10] arm/dts: OMAP4: Add gpio nodes Benoit Cousson 2011-08-24 13:09 ` Benoit Cousson [not found] ` <1314191356-10963-10-git-send-email-b-cousson-l0cyMroinI0@public.gmane.org> 2011-09-08 18:16 ` Grant Likely 2011-09-08 18:16 ` Grant Likely 2011-08-24 13:09 ` [RFC PATCH 10/10] documentation/dt: Add OMAP GPIO properties Benoit Cousson 2011-08-24 13:09 ` Benoit Cousson [not found] ` <1314191356-10963-11-git-send-email-b-cousson-l0cyMroinI0@public.gmane.org> 2011-09-08 18:18 ` Grant Likely 2011-09-08 18:18 ` Grant Likely 2011-09-09 1:51 ` Cousson, Benoit 2011-09-09 1:51 ` Cousson, Benoit
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1314191356-10963-7-git-send-email-b-cousson@ti.com \ --to=b-cousson-l0cymroini0@public.gmane.org \ --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \ --cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \ --cc=khilman-l0cyMroinI0@public.gmane.org \ --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \ --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=manjugk-l0cyMroinI0@public.gmane.org \ --cc=ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org \ --cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.