From: Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Jason Liu <r64343-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
linaro-dev-cunTk1MwBs8s++Sfvej+rw@public.gmane.org,
patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org
Subject: Re: [PATCH 2/3] arm/dt: add very basic dts file for babbage board
Date: Sat, 26 Feb 2011 22:30:31 +0800 [thread overview]
Message-ID: <AANLkTimQk_KOjr7zOS+82GD9DkfHaMi=0bY-YpWuNxGW@mail.gmail.com> (raw)
In-Reply-To: <1298016730-22761-3-git-send-email-r64343-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
On 18 February 2011 16:12, Jason Liu <r64343-KZfg59tc24xl57MIdRCFDg@public.gmane.org> wrote:
> Signed-off-by: Jason Liu <r64343-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> ---
> arch/arm/boot/dts/babbage.dts | 117 +++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 117 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/boot/dts/babbage.dts b/arch/arm/boot/dts/babbage.dts
> new file mode 100644
> index 0000000..7ee26f1
> --- /dev/null
> +++ b/arch/arm/boot/dts/babbage.dts
> @@ -0,0 +1,117 @@
> +/dts-v1/;
> +
> +/ {
> + model = "mx51_babbage";
> + compatible = "fsl,mx51_babbage";
> + #address-cells = <0x1>;
> + #size-cells = <0x1>;
> + #interrupt-cells = <0x1>;
> + interrupt-parent = <0x1>;
> +
> + memory {
> + device_type = "memory";
> + reg = <0x90000000 0x20000000>;
> + };
> +
> + chosen {
> + bootargs = "console=ttymxc1,115200n8 debug earlyprintk";
> + };
I was confused by this a little bit. We used to have ttymxc0 than
ttymxc1 here for bootargs. Per this dts file, we have the imx uart
nodes in order of imx-uart.2 (0x7000c000) --> imx-uart.0 (0x73fbc000)
--> mx-uart.1 (0x73fc0000). That is why we have the following message
of of_platform_bus_probe().
of_platform_bus_probe()
starting at: /
match: /soc
create child: /soc/tzic
match: /spba@70000000
create child: /spba@70000000/imx-uart@C000
match: /aips@73f00000
create child: /aips@73f00000/imx-uart@BC000
create child: /aips@73f00000/imx-uart@C0000
match: /aips@83f00000
create child: /aips@83f00000/fec@EC000
That is to say imx-uart.2 will get probed as the first one before
imx-uart.0. Meanwhile, the '[PATCH 3/3] serial/imx: parse from device
tree support' assumes it's the usual order, imx-uart.0 --> imx-uart.1
--> imx-uart.2.
======
+#ifdef CONFIG_OF
+static int serial_imx_probe_dt(struct imx_port *sport,
+ struct platform_device *pdev)
+{
+ struct device_node *node = pdev->dev.of_node;
+ static int line;
+
+ if (!node)
+ return -ENODEV;
+
+ if (of_get_property(node, "rts-cts", NULL))
+ sport->have_rtscts = 1;
+
+#ifdef CONFIG_IRDA
+ if (of_get_property(node, "irda", NULL))
+ sport->use_irda = 1;
+#endif
+ sport->port.line = line++;
+
+ return 0;
+}
+#else
+static int serial_imx_probe_dt(struct imx_port *sport,
+ struct platform_device *pdev)
+{
+ return -ENODEV;
+}
+#endif
+
[...]
@@ -1236,6 +1288,12 @@ static int serial_imx_probe(struct platform_device *pdev)
if (!sport)
return -ENOMEM;
+ ret = serial_imx_probe_dt(sport, pdev);
+ if (ret == -ENODEV)
+ ret = serial_imx_probe_pdata(sport, pdev);
+ if (ret)
+ goto free;
+
======
That's probably we have to tell console=ttymxc1 in bootargs, however
ttymxc0 hardware is actually being used.
> +
> + soc {
> + #address-cells = <0x1>;
> + #size-cells = <0x1>;
> + device_type = "soc";
> + compatible = "simple-bus";
> + ranges = <0x0 0x0 0xffffffff>;
> +
> + tzic {
> + #address-cells = <0x0>;
> + #interrupt-cells = <0x1>;
> + interrupt-controller;
> + reg = <0xe0000000 0x1000>;
> + compatible = "fsl,tzic";
> + device_type = "tzic";
> + phandle = <0x1>;
> + };
> + };
> +
> + clocks {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + uart_clk0: uart@0 {
> + compatible = "clock";
> + clock-outputs = "imx-uart.0";
> + };
> +
> + uart_clk1: uart@1{
> + compatible = "clock";
> + clock-outputs = "imx-uart.1";
> + };
> +
> + uart_clk2: uart@2{
> + compatible = "clock";
> + clock-outputs = "imx-uart.2";
> + };
> +
> + fec_clk: @0{
> + compatible = "clock";
> + clock-outputs = "fec.0";
> + };
> + };
> +
> + spba@70000000 {
> + #address-cells = <0x1>;
> + #size-cells = <0x1>;
> + device_type = "soc";
> + compatible = "simple-bus";
> + ranges = <0x0 0x70000000 0x100000>;
> +
> + imx-uart@C000 {
> + compatible = "imx-uart";
> + reg = <0xc000 0x1000>;
> + interrupts = <0x21>;
> + rts-cts;
> + uart-clock = < &uart_clk2 >, "uart";
> + };
> + };
> +
> + aips@73f00000 {
> + #address-cells = <0x1>;
> + #size-cells = <0x1>;
> + device_type = "soc";
> + compatible = "simple-bus";
> + ranges = <0x0 0x73f00000 0x100000>;
> +
> + imx-uart@BC000 {
> + compatible = "imx-uart";
> + reg = <0xbc000 0x1000>;
> + interrupts = <0x1f>;
> + rts-cts;
> + uart-clock = < &uart_clk0 >, "uart";
> + };
> +
> + imx-uart@C0000 {
> + compatible = "imx-uart";
> + reg = <0xc0000 0x1000>;
> + interrupts = <0x20>;
> + rts-cts;
> + uart-clock = <&uart_clk1>, "uart";
> + };
> + };
> +
> + aips@83f00000 {
> + #address-cells = <0x1>;
> + #size-cells = <0x1>;
> + device_type = "soc";
> + compatible = "simple-bus";
> + ranges = <0x0 0x83f00000 0x100000>;
> +
> + fec@EC000 {
> + compatible = "fec";
> + reg = <0xec000 0x1000>;
> + interrupts = <0x57>;
> + fec_clk-clock = < &fec_clk >, "fec";
> + };
> + };
> +};
> --
> 1.7.0.4
>
>
>
> _______________________________________________
> linaro-dev mailing list
> linaro-dev-cunTk1MwBs8s++Sfvej+rw@public.gmane.org
> http://lists.linaro.org/mailman/listinfo/linaro-dev
>
--
Regards,
Shawn
next prev parent reply other threads:[~2011-02-26 14:30 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-18 8:12 [PATCH 0/3] Add MX51 basic DT support Jason Liu
[not found] ` <1298016730-22761-1-git-send-email-r64343-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2011-02-18 8:12 ` [PATCH 1/3] arm/dt: add basic mx51 device tree support Jason Liu
[not found] ` <1298016730-22761-2-git-send-email-r64343-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2011-02-21 8:37 ` Shawn Guo
2011-02-28 6:48 ` Shawn Guo
[not found] ` <AANLkTi=v4X6XU9VUOVyr1MYZVsBeF494MBP3aeoZc4y6-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-03-07 5:05 ` Jason Hui
2011-02-18 8:12 ` [PATCH 2/3] arm/dt: add very basic dts file for babbage board Jason Liu
[not found] ` <1298016730-22761-3-git-send-email-r64343-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2011-02-21 9:46 ` Shawn Guo
[not found] ` <AANLkTikerADxGGRfnumWMN+s2r8gWOb1UAaS3tQ6DTe5-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-02-21 17:10 ` Grant Likely
[not found] ` <AANLkTi=kxbzDCJqOnPNjCsNxMsLtcbbcGLfZbY05_Svh-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-02-22 14:13 ` Shawn Guo
[not found] ` <20110222141309.GH19871-+NayF8gZjK2ctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2011-02-23 18:59 ` Grant Likely
2011-02-28 14:32 ` Shawn Guo
[not found] ` <20110228143159.GA3688-+NayF8gZjK2ctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2011-02-28 18:09 ` Grant Likely
[not found] ` <20110228180917.GG13690-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
2011-03-07 5:06 ` Jason Hui
2011-02-26 14:30 ` Shawn Guo [this message]
2011-02-18 8:12 ` [PATCH 3/3] serial/imx: parse from device tree support Jason Liu
[not found] ` <1298016730-22761-4-git-send-email-r64343-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2011-02-18 8:34 ` Arnd Bergmann
2011-02-28 10:35 ` Shawn Guo
[not found] ` <AANLkTind79cPhBoSbGZsVodYRRk4dEQpr4G-Zf19yi7G-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-03-07 5:08 ` Jason Hui
2011-02-18 15:12 ` [PATCH 0/3] Add MX51 basic DT support Rob Herring
[not found] ` <4D5E8C74.4090004-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-02-21 2:10 ` Liu Hui-R64343
2011-02-21 8:17 ` Shawn Guo
[not found] ` <AANLkTinWF54qvgSc4MVjS4ONPb3upnwQ2YJzVxmePiH_-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-03-07 5:03 ` Jason Hui
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='AANLkTimQk_KOjr7zOS+82GD9DkfHaMi=0bY-YpWuNxGW@mail.gmail.com' \
--to=shawn.guo-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=linaro-dev-cunTk1MwBs8s++Sfvej+rw@public.gmane.org \
--cc=patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=r64343-KZfg59tc24xl57MIdRCFDg@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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).