* [PATCH v2 0/2] OMAP: mailbox initial device tree support @ 2012-09-13 0:08 Omar Ramirez Luna [not found] ` <1347494898-16671-1-git-send-email-omar.luna-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> ` (2 more replies) 0 siblings, 3 replies; 6+ messages in thread From: Omar Ramirez Luna @ 2012-09-13 0:08 UTC (permalink / raw) To: Tony Lindgren, Benoit Cousson Cc: Russell King, Omar Ramirez Luna, devicetree-discuss, linux-doc, linux-kernel, linux-arm-kernel, linux-omap To allow mailbox driver to function with device tree. Tested in OMAP4 and OMAP3. OMAP2 untested. Patch: arm/dts: OMAP2+: Add mailbox nodes, was Acked by Benoit however it seems it wasn't picked up, so resend. http://www.mail-archive.com/linux-omap@vger.kernel.org/msg69121.html Patch: OMAP: mailbox: add device tree support, there wasn't an opposition other than to cleanup the driver too, however I got quite some patches to send before continuing the cleanup. http://www.mail-archive.com/linux-omap@vger.kernel.org/msg69338.html Omar Ramirez Luna (2): OMAP: mailbox: add device tree support arm/dts: OMAP2+: Add mailbox nodes .../devicetree/bindings/arm/omap/mailbox.txt | 9 +++++++++ arch/arm/boot/dts/omap2.dtsi | 5 +++++ arch/arm/boot/dts/omap3.dtsi | 5 +++++ arch/arm/boot/dts/omap4.dtsi | 5 +++++ arch/arm/mach-omap2/devices.c | 3 +++ arch/arm/mach-omap2/mailbox.c | 12 ++++++++++++ 6 files changed, 39 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/omap/mailbox.txt -- 1.7.9.5 ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <1347494898-16671-1-git-send-email-omar.luna-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>]
* [PATCH v2 1/2] OMAP: mailbox: add device tree support [not found] ` <1347494898-16671-1-git-send-email-omar.luna-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> @ 2012-09-13 0:08 ` Omar Ramirez Luna 0 siblings, 0 replies; 6+ messages in thread From: Omar Ramirez Luna @ 2012-09-13 0:08 UTC (permalink / raw) To: Tony Lindgren, Benoit Cousson Cc: Russell King, linux-doc-u79uwXL29TY76Z2rM5mHXA, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r Adapt driver to use DT if provided. Signed-off-by: Omar Ramirez Luna <omar.luna-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> --- .../devicetree/bindings/arm/omap/mailbox.txt | 9 +++++++++ arch/arm/mach-omap2/devices.c | 3 +++ arch/arm/mach-omap2/mailbox.c | 12 ++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/omap/mailbox.txt diff --git a/Documentation/devicetree/bindings/arm/omap/mailbox.txt b/Documentation/devicetree/bindings/arm/omap/mailbox.txt new file mode 100644 index 0000000..c57c0d5 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/omap/mailbox.txt @@ -0,0 +1,9 @@ +OMAP Mailbox module + +Required properties: + compatible : should be "ti,omap2-mailbox" for OMAP2 mailbox + compatible : should be "ti,omap3-mailbox" for OMAP3 mailbox + compatible : should be "ti,omap4-mailbox" for OMAP4 mailbox + +Optional properties: + None diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index c00c689..19093fb 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -279,6 +279,9 @@ static inline void __init omap_init_mbox(void) struct omap_hwmod *oh; struct platform_device *pdev; + if (of_have_populated_dt()) + return; + oh = omap_hwmod_lookup("mailbox"); if (!oh) { pr_err("%s: unable to find hwmod\n", __func__); diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c index 6875be8..80beadf 100644 --- a/arch/arm/mach-omap2/mailbox.c +++ b/arch/arm/mach-omap2/mailbox.c @@ -13,6 +13,7 @@ #include <linux/module.h> #include <linux/clk.h> #include <linux/err.h> +#include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/io.h> #include <linux/pm_runtime.h> @@ -400,11 +401,22 @@ static int __devexit omap2_mbox_remove(struct platform_device *pdev) return 0; } +#if defined(CONFIG_OF) +static const struct of_device_id omap_mailbox_of_match[] = { + { .compatible = "ti,omap2-mailbox" }, + { .compatible = "ti,omap3-mailbox" }, + { .compatible = "ti,omap4-mailbox" }, + {}, +}; +MODULE_DEVICE_TABLE(of, omap_mailbox_of_match); +#endif + static struct platform_driver omap2_mbox_driver = { .probe = omap2_mbox_probe, .remove = __devexit_p(omap2_mbox_remove), .driver = { .name = "omap-mailbox", + .of_match_table = of_match_ptr(omap_mailbox_of_match), }, }; -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/2] arm/dts: OMAP2+: Add mailbox nodes 2012-09-13 0:08 [PATCH v2 0/2] OMAP: mailbox initial device tree support Omar Ramirez Luna [not found] ` <1347494898-16671-1-git-send-email-omar.luna-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> @ 2012-09-13 0:08 ` Omar Ramirez Luna 2012-09-13 0:08 ` [PATCH v2 0/2] OMAP: mailbox initial device tree support Omar Ramirez Luna 2 siblings, 0 replies; 6+ messages in thread From: Omar Ramirez Luna @ 2012-09-13 0:08 UTC (permalink / raw) To: Tony Lindgren, Benoit Cousson Cc: Russell King, Omar Ramirez Luna, devicetree-discuss, linux-doc, linux-kernel, linux-arm-kernel, linux-omap Add nodes for mailbox DT, to interface with hwmods. Signed-off-by: Omar Ramirez Luna <omar.luna@linaro.org> Acked-by: Benoit Cousson <b-cousson@ti.com> --- arch/arm/boot/dts/omap2.dtsi | 5 +++++ arch/arm/boot/dts/omap3.dtsi | 5 +++++ arch/arm/boot/dts/omap4.dtsi | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/arch/arm/boot/dts/omap2.dtsi b/arch/arm/boot/dts/omap2.dtsi index 581cb08..372d55a 100644 --- a/arch/arm/boot/dts/omap2.dtsi +++ b/arch/arm/boot/dts/omap2.dtsi @@ -48,6 +48,11 @@ reg = <0x480FE000 0x1000>; }; + mailbox: mailbox@48094000 { + compatible = "ti,omap2-mailbox"; + ti,hwmods = "mailbox"; + }; + uart1: serial@4806a000 { compatible = "ti,omap2-uart"; ti,hwmods = "uart1"; diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index 8109471..ce68604 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi @@ -168,6 +168,11 @@ ti,hwmods = "i2c3"; }; + mailbox: mailbox@48094000 { + compatible = "ti,omap3-mailbox"; + ti,hwmods = "mailbox"; + }; + mcspi1: spi@48098000 { compatible = "ti,omap2-mcspi"; #address-cells = <1>; diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi index 04cbbcb..6677d80 100644 --- a/arch/arm/boot/dts/omap4.dtsi +++ b/arch/arm/boot/dts/omap4.dtsi @@ -210,6 +210,11 @@ ti,hwmods = "i2c4"; }; + mailbox: mailbox@4a0f4000 { + compatible = "ti,omap4-mailbox"; + ti,hwmods = "mailbox"; + }; + mcspi1: spi@48098000 { compatible = "ti,omap4-mcspi"; #address-cells = <1>; -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 0/2] OMAP: mailbox initial device tree support 2012-09-13 0:08 [PATCH v2 0/2] OMAP: mailbox initial device tree support Omar Ramirez Luna [not found] ` <1347494898-16671-1-git-send-email-omar.luna-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> 2012-09-13 0:08 ` [PATCH v2 2/2] arm/dts: OMAP2+: Add mailbox nodes Omar Ramirez Luna @ 2012-09-13 0:08 ` Omar Ramirez Luna 2012-09-26 22:21 ` Omar Ramirez Luna 2 siblings, 1 reply; 6+ messages in thread From: Omar Ramirez Luna @ 2012-09-13 0:08 UTC (permalink / raw) To: Tony Lindgren, Benoit Cousson Cc: Russell King, Omar Ramirez Luna, devicetree-discuss, linux-doc, linux-kernel, linux-arm-kernel, linux-omap To allow mailbox driver to function with device tree. Tested in OMAP4 and OMAP3. OMAP2 untested. Patch: arm/dts: OMAP2+: Add mailbox nodes, was Acked by Benoit however it seems it wasn't picked up, so resend. http://www.mail-archive.com/linux-omap@vger.kernel.org/msg69121.html Patch: OMAP: mailbox: add device tree support, there wasn't an opposition other than to cleanup the driver too, however I got quite some patches to send before continuing the cleanup. http://www.mail-archive.com/linux-omap@vger.kernel.org/msg69338.html Omar Ramirez Luna (2): OMAP: mailbox: add device tree support arm/dts: OMAP2+: Add mailbox nodes .../devicetree/bindings/arm/omap/mailbox.txt | 9 +++++++++ arch/arm/boot/dts/omap2.dtsi | 5 +++++ arch/arm/boot/dts/omap3.dtsi | 5 +++++ arch/arm/boot/dts/omap4.dtsi | 5 +++++ arch/arm/mach-omap2/devices.c | 3 +++ arch/arm/mach-omap2/mailbox.c | 12 ++++++++++++ 6 files changed, 39 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/omap/mailbox.txt -- 1.7.9.5 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/2] OMAP: mailbox initial device tree support 2012-09-13 0:08 ` [PATCH v2 0/2] OMAP: mailbox initial device tree support Omar Ramirez Luna @ 2012-09-26 22:21 ` Omar Ramirez Luna 2012-09-26 23:27 ` Cousson, Benoit 0 siblings, 1 reply; 6+ messages in thread From: Omar Ramirez Luna @ 2012-09-26 22:21 UTC (permalink / raw) To: Tony Lindgren, Benoit Cousson Cc: Russell King, Omar Ramirez Luna, devicetree-discuss, linux-doc, linux-kernel, linux-arm-kernel, linux-omap Hi Benoit, On 12 September 2012 19:08, Omar Ramirez Luna <omar.luna@linaro.org> wrote: > To allow mailbox driver to function with device tree. > > Tested in OMAP4 and OMAP3. OMAP2 untested. > > Patch: arm/dts: OMAP2+: Add mailbox nodes, was Acked by Benoit > however it seems it wasn't picked up, so resend. > > http://www.mail-archive.com/linux-omap@vger.kernel.org/msg69121.html > > Patch: OMAP: mailbox: add device tree support, there wasn't an > opposition other than to cleanup the driver too, however I got > quite some patches to send before continuing the cleanup. > > http://www.mail-archive.com/linux-omap@vger.kernel.org/msg69338.html > > Omar Ramirez Luna (2): > OMAP: mailbox: add device tree support > arm/dts: OMAP2+: Add mailbox nodes > > .../devicetree/bindings/arm/omap/mailbox.txt | 9 +++++++++ > arch/arm/boot/dts/omap2.dtsi | 5 +++++ > arch/arm/boot/dts/omap3.dtsi | 5 +++++ > arch/arm/boot/dts/omap4.dtsi | 5 +++++ > arch/arm/mach-omap2/devices.c | 3 +++ > arch/arm/mach-omap2/mailbox.c | 12 ++++++++++++ > 6 files changed, 39 insertions(+) > create mode 100644 Documentation/devicetree/bindings/arm/omap/mailbox.txt Ping. I'm in the understanding that these go through your tree, am I right? Regards, Omar ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/2] OMAP: mailbox initial device tree support 2012-09-26 22:21 ` Omar Ramirez Luna @ 2012-09-26 23:27 ` Cousson, Benoit 0 siblings, 0 replies; 6+ messages in thread From: Cousson, Benoit @ 2012-09-26 23:27 UTC (permalink / raw) To: Omar Ramirez Luna Cc: Tony Lindgren, Russell King, devicetree-discuss, linux-doc, linux-kernel, linux-arm-kernel, linux-omap Hi Omar, On 9/26/2012 3:21 PM, Omar Ramirez Luna wrote: > Hi Benoit, > > On 12 September 2012 19:08, Omar Ramirez Luna <omar.luna@linaro.org> wrote: >> To allow mailbox driver to function with device tree. >> >> Tested in OMAP4 and OMAP3. OMAP2 untested. >> >> Patch: arm/dts: OMAP2+: Add mailbox nodes, was Acked by Benoit >> however it seems it wasn't picked up, so resend. >> >> http://www.mail-archive.com/linux-omap@vger.kernel.org/msg69121.html >> >> Patch: OMAP: mailbox: add device tree support, there wasn't an >> opposition other than to cleanup the driver too, however I got >> quite some patches to send before continuing the cleanup. >> >> http://www.mail-archive.com/linux-omap@vger.kernel.org/msg69338.html >> >> Omar Ramirez Luna (2): >> OMAP: mailbox: add device tree support >> arm/dts: OMAP2+: Add mailbox nodes >> >> .../devicetree/bindings/arm/omap/mailbox.txt | 9 +++++++++ >> arch/arm/boot/dts/omap2.dtsi | 5 +++++ >> arch/arm/boot/dts/omap3.dtsi | 5 +++++ >> arch/arm/boot/dts/omap4.dtsi | 5 +++++ >> arch/arm/mach-omap2/devices.c | 3 +++ >> arch/arm/mach-omap2/mailbox.c | 12 ++++++++++++ >> 6 files changed, 39 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/arm/omap/mailbox.txt > > Ping. I'm in the understanding that these go through your tree, am I right? Since it is too late for 3.7, you should probably do two more things: - move the mailbox driver outside mach-omap2 - move the nr_mbox information in the driver as well instead of the hwmod for the DT boot. Regards, Benoit ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-09-26 23:27 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-09-13 0:08 [PATCH v2 0/2] OMAP: mailbox initial device tree support Omar Ramirez Luna [not found] ` <1347494898-16671-1-git-send-email-omar.luna-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> 2012-09-13 0:08 ` [PATCH v2 1/2] OMAP: mailbox: add " Omar Ramirez Luna 2012-09-13 0:08 ` [PATCH v2 2/2] arm/dts: OMAP2+: Add mailbox nodes Omar Ramirez Luna 2012-09-13 0:08 ` [PATCH v2 0/2] OMAP: mailbox initial device tree support Omar Ramirez Luna 2012-09-26 22:21 ` Omar Ramirez Luna 2012-09-26 23:27 ` Cousson, Benoit
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).