]> xenbits.xensource.com Git - xen.git/commit
dt-uart: use ':' as separator between path and options
authorIan Campbell <ian.campbell@citrix.com>
Thu, 8 Jan 2015 11:53:55 +0000 (11:53 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 20 Jan 2015 14:47:39 +0000 (14:47 +0000)
commit4da395fe75c24cceb9337b64d4c96e8c2da29b2e
tree8a569ed546f7b425ccb10abfeeaabbf6f3710d87
parent17664f0ba031344846090a482ad42d225aa911c7
dt-uart: use ':' as separator between path and options

',' is a valid character in a device-tree path (see ePAPR v1.1 Table
2-1), in fact ',' is actually pretty common in node names.

Using ',' as a separator breaks for example on fast models. If you use
the full path (/smb/motherboard/iofpga@3,00000000/uart@090000) rather
than the alias then earlyprintk gives:

(XEN) Looking for UART console /smb/motherboard/iofpga@3
(XEN) Unable to find device "/smb/motherboard/iofpga@3"
(XEN) Bad console= option 'dtuart'

I actually noticed this on Jetson where the uart is
"/serial@0,70006300" and there happened to be no alias defined.

Instead use ':' as the separator, it is defined to terminate the path
in the context of /chosen/stdout-path (Table 3-4) which is pretty
closely analogous to the dtuart= option and so makes a pretty good
choice (especially since the next patch adds support for stdout-path).

Since no DT aware driver current supports any options there is no
point in retaining support for ',' for backwards compatibility.

Additionally, expand the buffer for the dtuart option, a path can be
far longer than 30 characters (in fact the maximum size of a single
node name is 31, so it's not even necessarily enough for an alias).
128 is completely arbitrary and allows for paths at least 8 deep even
with worst case node names.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Julien Grall <julien.grall@linaro.org>
(cherry picked from commit f01af57300cb60ab0fd8487fb5bbbe97bee234f0)

Conflicts:
docs/misc/xen-command-line.markdown
        -- dropped since precursor patch not present.
xen/drivers/char/dt-uart.c