* RFC: MPC52xx serial port configuration from DT blob
@ 2007-04-13 21:21 Bartlomiej Sieka
2007-04-13 23:24 ` Dale Farnsworth
2007-04-17 6:07 ` Sylvain Munaut
0 siblings, 2 replies; 4+ messages in thread
From: Bartlomiej Sieka @ 2007-04-13 21:21 UTC (permalink / raw)
To: linuxppc-embedded
Hi All,
We have a MPC5200B-based board running an arch/powerpc kernel and we
need the ability to configure a non-console serial port for a particular
baud rate during system start-up. It seems that the UART driver in
drivers/serial/mpc52xx_uart.c does not support this. It only allows to
set parameters for a port that is used as a console, and for which those
parameters are passed in the kernel command line. We would like to
extend the mpc52xx_uart.c driver to be able to retrieve port options
from the DT blob and configure a given port accordingly. A new
port-specific property called "options" would be used for this. It would
have syntax following its namesake in "console" kernel parameter, as
described in Documentation/kernel-parameters.txt.
For example, the following settings in the .dts file would make UART5 to
be configured at 115200 baud, no parity, 8 bits.
serial@2800 { // PSC5
device_type = "serial";
compatible = "mpc5200b-psc-uart\0mpc5200-psc-uart";
port-number = <4>; // Logical port assignment
options = "115200n8"
cell-index = <4>;
reg = <2800 100>;
interrupts = <2 c 0>;
interrupt-parent = <500>;
};
In case a console port has conflicting options given in the kernel
command line and in the DT blob, the command line values would be used.
Any comments on the above will be appreciated.
Thanks in advance,
Bartlomiej
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: RFC: MPC52xx serial port configuration from DT blob
2007-04-13 21:21 RFC: MPC52xx serial port configuration from DT blob Bartlomiej Sieka
@ 2007-04-13 23:24 ` Dale Farnsworth
2007-04-17 5:34 ` Grant Likely
2007-04-17 6:07 ` Sylvain Munaut
1 sibling, 1 reply; 4+ messages in thread
From: Dale Farnsworth @ 2007-04-13 23:24 UTC (permalink / raw)
To: tur, linuxppc-embedded
Bartlomiej wrote:
> We have a MPC5200B-based board running an arch/powerpc kernel and we
> need the ability to configure a non-console serial port for a particular
> baud rate during system start-up. It seems that the UART driver in
> drivers/serial/mpc52xx_uart.c does not support this. It only allows to
> set parameters for a port that is used as a console, and for which those
> parameters are passed in the kernel command line. We would like to
> extend the mpc52xx_uart.c driver to be able to retrieve port options
> from the DT blob and configure a given port accordingly. A new
> port-specific property called "options" would be used for this. It would
> have syntax following its namesake in "console" kernel parameter, as
> described in Documentation/kernel-parameters.txt.
>
> For example, the following settings in the .dts file would make UART5 to
> be configured at 115200 baud, no parity, 8 bits.
>
> serial@2800 { // PSC5
> device_type = "serial";
> compatible = "mpc5200b-psc-uart\0mpc5200-psc-uart";
> port-number = <4>; // Logical port assignment
> options = "115200n8"
> cell-index = <4>;
> reg = <2800 100>;
> interrupts = <2 c 0>;
> interrupt-parent = <500>;
> };
>
>
> In case a console port has conflicting options given in the kernel
> command line and in the DT blob, the command line values would be used.
>
> Any comments on the above will be appreciated.
The device tree is intended to be an OS-independent description of the
state of the platform hardware as left by firmware (or bootwrapper).
It is not intended to contain kernel configuration parameters or options,
though there are a few exceptions.
So, this kind of change is unlikely to be accepted.
-Dale
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: RFC: MPC52xx serial port configuration from DT blob
2007-04-13 23:24 ` Dale Farnsworth
@ 2007-04-17 5:34 ` Grant Likely
0 siblings, 0 replies; 4+ messages in thread
From: Grant Likely @ 2007-04-17 5:34 UTC (permalink / raw)
To: Dale Farnsworth; +Cc: linuxppc-embedded
On 13 Apr 2007 16:24:22 -0700, Dale Farnsworth <dale@farnsworth.org> wrote:
> Bartlomiej wrote:
> > We have a MPC5200B-based board running an arch/powerpc kernel and we
> > need the ability to configure a non-console serial port for a particular
> > baud rate during system start-up. It seems that the UART driver in
> > drivers/serial/mpc52xx_uart.c does not support this. It only allows to
> > set parameters for a port that is used as a console, and for which those
> > parameters are passed in the kernel command line. We would like to
> > extend the mpc52xx_uart.c driver to be able to retrieve port options
> > from the DT blob and configure a given port accordingly. A new
> > port-specific property called "options" would be used for this. It would
> > have syntax following its namesake in "console" kernel parameter, as
> > described in Documentation/kernel-parameters.txt.
> >
> > For example, the following settings in the .dts file would make UART5 to
> > be configured at 115200 baud, no parity, 8 bits.
> >
> > serial@2800 { // PSC5
> > device_type = "serial";
> > compatible = "mpc5200b-psc-uart\0mpc5200-psc-uart";
> > port-number = <4>; // Logical port assignment
> > options = "115200n8"
> > cell-index = <4>;
> > reg = <2800 100>;
> > interrupts = <2 c 0>;
> > interrupt-parent = <500>;
> > };
> >
> >
> > In case a console port has conflicting options given in the kernel
> > command line and in the DT blob, the command line values would be used.
> >
> > Any comments on the above will be appreciated.
>
> The device tree is intended to be an OS-independent description of the
> state of the platform hardware as left by firmware (or bootwrapper).
> It is not intended to contain kernel configuration parameters or options,
> though there are a few exceptions.
>
> So, this kind of change is unlikely to be accepted.
Isn't the /chosen node intended for this kind of data? Although I
must admit that I'm not at all familiar with the conventions used in
/chosen.
g.
--
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: RFC: MPC52xx serial port configuration from DT blob
2007-04-13 21:21 RFC: MPC52xx serial port configuration from DT blob Bartlomiej Sieka
2007-04-13 23:24 ` Dale Farnsworth
@ 2007-04-17 6:07 ` Sylvain Munaut
1 sibling, 0 replies; 4+ messages in thread
From: Sylvain Munaut @ 2007-04-17 6:07 UTC (permalink / raw)
To: Bartlomiej Sieka; +Cc: linuxppc-embedded
Bartlomiej Sieka wrote:
> Hi All,
>
> We have a MPC5200B-based board running an arch/powerpc kernel and we
> need the ability to configure a non-console serial port for a particular
> baud rate during system start-up. It seems that the UART driver in
> drivers/serial/mpc52xx_uart.c does not support this. It only allows to
> set parameters for a port that is used as a console, and for which those
> parameters are passed in the kernel command line. We would like to
> extend the mpc52xx_uart.c driver to be able to retrieve port options
> from the DT blob and configure a given port accordingly. A new
> port-specific property called "options" would be used for this. It would
> have syntax following its namesake in "console" kernel parameter, as
> described in Documentation/kernel-parameters.txt.
>
> For example, the following settings in the .dts file would make UART5 to
> be configured at 115200 baud, no parity, 8 bits.
>
> serial@2800 { // PSC5
> device_type = "serial";
> compatible = "mpc5200b-psc-uart\0mpc5200-psc-uart";
> port-number = <4>; // Logical port assignment
> options = "115200n8"
> cell-index = <4>;
> reg = <2800 100>;
> interrupts = <2 c 0>;
> interrupt-parent = <500>;
> };
>
>
> In case a console port has conflicting options given in the kernel
> command line and in the DT blob, the command line values would be used.
>
> Any comments on the above will be appreciated.
>
The kernel only "use" the serial for console. If it's not a console,
then it's used
by userspace and it's userspace job to configure it as it sees fit imho ...
Sylvain
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-04-17 6:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-13 21:21 RFC: MPC52xx serial port configuration from DT blob Bartlomiej Sieka
2007-04-13 23:24 ` Dale Farnsworth
2007-04-17 5:34 ` Grant Likely
2007-04-17 6:07 ` Sylvain Munaut
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).