Re: [PATCH] ARM: tegra: dts: add aliases and DMA requestor for serial controller

2013-01-02 Thread Stephen Warren
On 12/18/2012 11:31 PM, Laxman Dewangan wrote:
> Add APB DMA requestor and serial aliases for serial controller.
> There will be two serial driver i.e. 8250 based simple serial driver
> and APB DMA based serial driver for higher baudrate and performace.
> 
> The simple serial driver get enabled with compatible nvidia,tegra20-uart
> and APB DMA based driver will get enabled with compatible
> nvidia,tegra20-hsuart.

I've applied this to Tegra's for-3.9/dt branch.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] ARM: tegra: dts: add aliases and DMA requestor for serial controller

2013-01-02 Thread Stephen Warren
On 12/18/2012 11:31 PM, Laxman Dewangan wrote:
 Add APB DMA requestor and serial aliases for serial controller.
 There will be two serial driver i.e. 8250 based simple serial driver
 and APB DMA based serial driver for higher baudrate and performace.
 
 The simple serial driver get enabled with compatible nvidia,tegra20-uart
 and APB DMA based driver will get enabled with compatible
 nvidia,tegra20-hsuart.

I've applied this to Tegra's for-3.9/dt branch.

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] ARM: tegra: dts: add aliases and DMA requestor for serial controller

2012-12-25 Thread Laxman Dewangan

On Tuesday 25 December 2012 11:03 AM, Stephen Warren wrote:

On 12/22/2012 01:15 PM, Laxman Dewangan wrote:


This way it is straight
forward for the uart user to directly see the uart instance on board and
decide the port number rather than going to what are other uart and
their corresponding driver.

Still, there is some precedent in the kernel for your approach. So, I
guess we can go ahead with using the aliases as-is.



So can I assume this patch is fine and I need not to re-spin it for 
removing aliases?


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] ARM: tegra: dts: add aliases and DMA requestor for serial controller

2012-12-25 Thread Laxman Dewangan

On Tuesday 25 December 2012 11:03 AM, Stephen Warren wrote:

On 12/22/2012 01:15 PM, Laxman Dewangan wrote:


This way it is straight
forward for the uart user to directly see the uart instance on board and
decide the port number rather than going to what are other uart and
their corresponding driver.

Still, there is some precedent in the kernel for your approach. So, I
guess we can go ahead with using the aliases as-is.



So can I assume this patch is fine and I need not to re-spin it for 
removing aliases?


--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] ARM: tegra: dts: add aliases and DMA requestor for serial controller

2012-12-24 Thread Stephen Warren
On 12/22/2012 01:15 PM, Laxman Dewangan wrote:
> On Saturday 22 December 2012 02:20 AM, Stephen Warren wrote:
>> On 12/20/2012 09:18 PM, Laxman Dewangan wrote:
>>> On Thursday 20 December 2012 10:33 PM, Stephen Warren wrote:
 On 12/19/2012 11:15 PM, Laxman Dewangan wrote:
> On Wednesday 19 December 2012 10:30 PM, Stephen Warren wrote:
>> On 12/18/2012 11:31 PM, Laxman Dewangan wrote:
>>> Add APB DMA requestor and serial aliases for serial controller.
>>> There will be two serial driver i.e. 8250 based simple serial driver
>>> and APB DMA based serial driver for higher baudrate and performace.
>> ...
>> This patch seems to do two things:
>> ...
>> 2) Add aliases for the serial ports. I have no idea why this is
>> useful.
> Serial aliases are added because we want to get the port number like
> /dev/ttyTHS0,  /d/ttyTHS2 etc. The uarta should be /dev/ttyTHS0 and
> uartc should be /dev/ttyTHS2. The port number can be found using
> aliases
> and of_alias_get_id() in driver file:
>
> port_number = of_alias_get_id(np, "serial");
 Oh, I see. I guess the aliases make sense then.

 But, wouldn't you only add aliases for the specific UARTs that are in
 use on a particular board (so put them in tegraNN-board.dts) rather
 than
 all UARTs on Tegra (i.e. the current patch which puts them into
 tegraNN.dtsi)?
>>> I like to have this in tegraN N.dtsi file becasue:
>>> - This policy is not going to change the board to board. For high speed
>>> driver the uarta will be ttyTHS0 and uartb ttyTHS1.
>> Sure it is. Since the board files select which UARTs use the low-speed
>> driver vs. the high-speed driver by overriding the compatible value,
>> each board will have a different subset of UARTs which use the high
>> speed driver and hence which use the aliases. Don't you want to end up
>> with /dev/ttyHS0 on each board, rather than ending up with a "random"
>> device node name depending on which UART the board designer picked for
>> the high speed device?
> 
> We had this in past where we started the high speed driver always from 0
> like in one board uartc become ttyHS0 and another board uarta become
> ttyHS0 and uartc become ttyHS1.
> This confused more to other team (BT and modem team) as they need to
> know all uart instance and their corresponding driver.  So we kept uarta

That doesn't really make sense; The BT and MODEM team should only care
about the specific UARTs they use.

> will be always 0 and uartc will be always 2.

That seems a little unlikely; why can't different boards use different
UARTs for different purposes; after all, UARTA is often a debug UART not
a BT or MODEM UART.

> This way it is straight
> forward for the uart user to directly see the uart instance on board and
> decide the port number rather than going to what are other uart and
> their corresponding driver.

Still, there is some precedent in the kernel for your approach. So, I
guess we can go ahead with using the aliases as-is.

Your approach breaks down in the following scenarios though:

a) Somebody (random customer board designer or SW engineer, who NVIDIA
can't control) wants the console UART to always have alias serial0;
there are examples of this in the kernel. On just the boards we support
upstream, some use UART A for the debug/console and some use UART D. I
know of others that use UART B.

b) The board contains UARTs (e.g. PCIe) that aren't the Tegra-internal
UARTs, so the alias IDs can't all map to Tegra UART IDs.

c) Conceptually, the purpose of aliases seems to be to provide useful
names (numbers) for the relevant ports, and naming/numbering
non-existent ports doesn't seem particularly useful.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] ARM: tegra: dts: add aliases and DMA requestor for serial controller

2012-12-24 Thread Stephen Warren
On 12/22/2012 01:15 PM, Laxman Dewangan wrote:
 On Saturday 22 December 2012 02:20 AM, Stephen Warren wrote:
 On 12/20/2012 09:18 PM, Laxman Dewangan wrote:
 On Thursday 20 December 2012 10:33 PM, Stephen Warren wrote:
 On 12/19/2012 11:15 PM, Laxman Dewangan wrote:
 On Wednesday 19 December 2012 10:30 PM, Stephen Warren wrote:
 On 12/18/2012 11:31 PM, Laxman Dewangan wrote:
 Add APB DMA requestor and serial aliases for serial controller.
 There will be two serial driver i.e. 8250 based simple serial driver
 and APB DMA based serial driver for higher baudrate and performace.
 ...
 This patch seems to do two things:
 ...
 2) Add aliases for the serial ports. I have no idea why this is
 useful.
 Serial aliases are added because we want to get the port number like
 /dev/ttyTHS0,  /d/ttyTHS2 etc. The uarta should be /dev/ttyTHS0 and
 uartc should be /dev/ttyTHS2. The port number can be found using
 aliases
 and of_alias_get_id() in driver file:

 port_number = of_alias_get_id(np, serial);
 Oh, I see. I guess the aliases make sense then.

 But, wouldn't you only add aliases for the specific UARTs that are in
 use on a particular board (so put them in tegraNN-board.dts) rather
 than
 all UARTs on Tegra (i.e. the current patch which puts them into
 tegraNN.dtsi)?
 I like to have this in tegraN N.dtsi file becasue:
 - This policy is not going to change the board to board. For high speed
 driver the uarta will be ttyTHS0 and uartb ttyTHS1.
 Sure it is. Since the board files select which UARTs use the low-speed
 driver vs. the high-speed driver by overriding the compatible value,
 each board will have a different subset of UARTs which use the high
 speed driver and hence which use the aliases. Don't you want to end up
 with /dev/ttyHS0 on each board, rather than ending up with a random
 device node name depending on which UART the board designer picked for
 the high speed device?
 
 We had this in past where we started the high speed driver always from 0
 like in one board uartc become ttyHS0 and another board uarta become
 ttyHS0 and uartc become ttyHS1.
 This confused more to other team (BT and modem team) as they need to
 know all uart instance and their corresponding driver.  So we kept uarta

That doesn't really make sense; The BT and MODEM team should only care
about the specific UARTs they use.

 will be always 0 and uartc will be always 2.

That seems a little unlikely; why can't different boards use different
UARTs for different purposes; after all, UARTA is often a debug UART not
a BT or MODEM UART.

 This way it is straight
 forward for the uart user to directly see the uart instance on board and
 decide the port number rather than going to what are other uart and
 their corresponding driver.

Still, there is some precedent in the kernel for your approach. So, I
guess we can go ahead with using the aliases as-is.

Your approach breaks down in the following scenarios though:

a) Somebody (random customer board designer or SW engineer, who NVIDIA
can't control) wants the console UART to always have alias serial0;
there are examples of this in the kernel. On just the boards we support
upstream, some use UART A for the debug/console and some use UART D. I
know of others that use UART B.

b) The board contains UARTs (e.g. PCIe) that aren't the Tegra-internal
UARTs, so the alias IDs can't all map to Tegra UART IDs.

c) Conceptually, the purpose of aliases seems to be to provide useful
names (numbers) for the relevant ports, and naming/numbering
non-existent ports doesn't seem particularly useful.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] ARM: tegra: dts: add aliases and DMA requestor for serial controller

2012-12-22 Thread Laxman Dewangan

On Saturday 22 December 2012 02:20 AM, Stephen Warren wrote:

On 12/20/2012 09:18 PM, Laxman Dewangan wrote:

On Thursday 20 December 2012 10:33 PM, Stephen Warren wrote:

On 12/19/2012 11:15 PM, Laxman Dewangan wrote:

On Wednesday 19 December 2012 10:30 PM, Stephen Warren wrote:

On 12/18/2012 11:31 PM, Laxman Dewangan wrote:

Add APB DMA requestor and serial aliases for serial controller.
There will be two serial driver i.e. 8250 based simple serial driver
and APB DMA based serial driver for higher baudrate and performace.

...

This patch seems to do two things:

...

2) Add aliases for the serial ports. I have no idea why this is useful.

Serial aliases are added because we want to get the port number like
/dev/ttyTHS0,  /d/ttyTHS2 etc. The uarta should be /dev/ttyTHS0 and
uartc should be /dev/ttyTHS2. The port number can be found using aliases
and of_alias_get_id() in driver file:

port_number = of_alias_get_id(np, "serial");

Oh, I see. I guess the aliases make sense then.

But, wouldn't you only add aliases for the specific UARTs that are in
use on a particular board (so put them in tegraNN-board.dts) rather than
all UARTs on Tegra (i.e. the current patch which puts them into
tegraNN.dtsi)?

I like to have this in tegraN N.dtsi file becasue:
- This policy is not going to change the board to board. For high speed
driver the uarta will be ttyTHS0 and uartb ttyTHS1.

Sure it is. Since the board files select which UARTs use the low-speed
driver vs. the high-speed driver by overriding the compatible value,
each board will have a different subset of UARTs which use the high
speed driver and hence which use the aliases. Don't you want to end up
with /dev/ttyHS0 on each board, rather than ending up with a "random"
device node name depending on which UART the board designer picked for
the high speed device?


We had this in past where we started the high speed driver always from 0 
like in one board uartc become ttyHS0 and another board uarta become 
ttyHS0 and uartc become ttyHS1.
This confused more to other team (BT and modem team) as they need to 
know all uart instance and their corresponding driver.  So we kept uarta 
will be always 0 and uartc will be always 2. This way it is straight 
forward for the uart user to directly see the uart instance on board and 
decide the port number rather than going to what are other uart and 
their corresponding driver.



So we kept the

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] ARM: tegra: dts: add aliases and DMA requestor for serial controller

2012-12-22 Thread Laxman Dewangan

On Saturday 22 December 2012 02:20 AM, Stephen Warren wrote:

On 12/20/2012 09:18 PM, Laxman Dewangan wrote:

On Thursday 20 December 2012 10:33 PM, Stephen Warren wrote:

On 12/19/2012 11:15 PM, Laxman Dewangan wrote:

On Wednesday 19 December 2012 10:30 PM, Stephen Warren wrote:

On 12/18/2012 11:31 PM, Laxman Dewangan wrote:

Add APB DMA requestor and serial aliases for serial controller.
There will be two serial driver i.e. 8250 based simple serial driver
and APB DMA based serial driver for higher baudrate and performace.

...

This patch seems to do two things:

...

2) Add aliases for the serial ports. I have no idea why this is useful.

Serial aliases are added because we want to get the port number like
/dev/ttyTHS0,  /d/ttyTHS2 etc. The uarta should be /dev/ttyTHS0 and
uartc should be /dev/ttyTHS2. The port number can be found using aliases
and of_alias_get_id() in driver file:

port_number = of_alias_get_id(np, "serial");

Oh, I see. I guess the aliases make sense then.

But, wouldn't you only add aliases for the specific UARTs that are in
use on a particular board (so put them in tegraNN-board.dts) rather than
all UARTs on Tegra (i.e. the current patch which puts them into
tegraNN.dtsi)?

I like to have this in tegraN N.dtsi file becasue:
- This policy is not going to change the board to board. For high speed
driver the uarta will be ttyTHS0 and uartb ttyTHS1.

Sure it is. Since the board files select which UARTs use the low-speed
driver vs. the high-speed driver by overriding the compatible value,
each board will have a different subset of UARTs which use the high
speed driver and hence which use the aliases. Don't you want to end up
with /dev/ttyHS0 on each board, rather than ending up with a "random"
device node name depending on which UART the board designer picked for
the high speed device?


We had this in past where we started the high speed driver always from 0 
like in one board uartc become ttyHS0 and another board uarta become 
ttyHS0 and uartc become ttyHS1.
This confused more to other team (BT and modem team) as they need to 
know all uart instance and their corresponding driver.  So we kept uarta 
will be always 0 and uartc will be always 2. This way it is straight 
forward for the uart user to directly see the uart instance on board and 
decide the port number rather than going to what are other uart and 
their corresponding driver.



So we kept the

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] ARM: tegra: dts: add aliases and DMA requestor for serial controller

2012-12-22 Thread Laxman Dewangan

On Saturday 22 December 2012 02:20 AM, Stephen Warren wrote:

On 12/20/2012 09:18 PM, Laxman Dewangan wrote:

On Thursday 20 December 2012 10:33 PM, Stephen Warren wrote:

On 12/19/2012 11:15 PM, Laxman Dewangan wrote:

On Wednesday 19 December 2012 10:30 PM, Stephen Warren wrote:

On 12/18/2012 11:31 PM, Laxman Dewangan wrote:

Add APB DMA requestor and serial aliases for serial controller.
There will be two serial driver i.e. 8250 based simple serial driver
and APB DMA based serial driver for higher baudrate and performace.

...

This patch seems to do two things:

...

2) Add aliases for the serial ports. I have no idea why this is useful.

Serial aliases are added because we want to get the port number like
/dev/ttyTHS0,  /d/ttyTHS2 etc. The uarta should be /dev/ttyTHS0 and
uartc should be /dev/ttyTHS2. The port number can be found using aliases
and of_alias_get_id() in driver file:

port_number = of_alias_get_id(np, serial);

Oh, I see. I guess the aliases make sense then.

But, wouldn't you only add aliases for the specific UARTs that are in
use on a particular board (so put them in tegraNN-board.dts) rather than
all UARTs on Tegra (i.e. the current patch which puts them into
tegraNN.dtsi)?

I like to have this in tegraN N.dtsi file becasue:
- This policy is not going to change the board to board. For high speed
driver the uarta will be ttyTHS0 and uartb ttyTHS1.

Sure it is. Since the board files select which UARTs use the low-speed
driver vs. the high-speed driver by overriding the compatible value,
each board will have a different subset of UARTs which use the high
speed driver and hence which use the aliases. Don't you want to end up
with /dev/ttyHS0 on each board, rather than ending up with a random
device node name depending on which UART the board designer picked for
the high speed device?


We had this in past where we started the high speed driver always from 0 
like in one board uartc become ttyHS0 and another board uarta become 
ttyHS0 and uartc become ttyHS1.
This confused more to other team (BT and modem team) as they need to 
know all uart instance and their corresponding driver.  So we kept uarta 
will be always 0 and uartc will be always 2. This way it is straight 
forward for the uart user to directly see the uart instance on board and 
decide the port number rather than going to what are other uart and 
their corresponding driver.



So we kept the

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] ARM: tegra: dts: add aliases and DMA requestor for serial controller

2012-12-22 Thread Laxman Dewangan

On Saturday 22 December 2012 02:20 AM, Stephen Warren wrote:

On 12/20/2012 09:18 PM, Laxman Dewangan wrote:

On Thursday 20 December 2012 10:33 PM, Stephen Warren wrote:

On 12/19/2012 11:15 PM, Laxman Dewangan wrote:

On Wednesday 19 December 2012 10:30 PM, Stephen Warren wrote:

On 12/18/2012 11:31 PM, Laxman Dewangan wrote:

Add APB DMA requestor and serial aliases for serial controller.
There will be two serial driver i.e. 8250 based simple serial driver
and APB DMA based serial driver for higher baudrate and performace.

...

This patch seems to do two things:

...

2) Add aliases for the serial ports. I have no idea why this is useful.

Serial aliases are added because we want to get the port number like
/dev/ttyTHS0,  /d/ttyTHS2 etc. The uarta should be /dev/ttyTHS0 and
uartc should be /dev/ttyTHS2. The port number can be found using aliases
and of_alias_get_id() in driver file:

port_number = of_alias_get_id(np, serial);

Oh, I see. I guess the aliases make sense then.

But, wouldn't you only add aliases for the specific UARTs that are in
use on a particular board (so put them in tegraNN-board.dts) rather than
all UARTs on Tegra (i.e. the current patch which puts them into
tegraNN.dtsi)?

I like to have this in tegraN N.dtsi file becasue:
- This policy is not going to change the board to board. For high speed
driver the uarta will be ttyTHS0 and uartb ttyTHS1.

Sure it is. Since the board files select which UARTs use the low-speed
driver vs. the high-speed driver by overriding the compatible value,
each board will have a different subset of UARTs which use the high
speed driver and hence which use the aliases. Don't you want to end up
with /dev/ttyHS0 on each board, rather than ending up with a random
device node name depending on which UART the board designer picked for
the high speed device?


We had this in past where we started the high speed driver always from 0 
like in one board uartc become ttyHS0 and another board uarta become 
ttyHS0 and uartc become ttyHS1.
This confused more to other team (BT and modem team) as they need to 
know all uart instance and their corresponding driver.  So we kept uarta 
will be always 0 and uartc will be always 2. This way it is straight 
forward for the uart user to directly see the uart instance on board and 
decide the port number rather than going to what are other uart and 
their corresponding driver.



So we kept the

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] ARM: tegra: dts: add aliases and DMA requestor for serial controller

2012-12-21 Thread Stephen Warren
On 12/20/2012 09:18 PM, Laxman Dewangan wrote:
> On Thursday 20 December 2012 10:33 PM, Stephen Warren wrote:
>> On 12/19/2012 11:15 PM, Laxman Dewangan wrote:
>>> On Wednesday 19 December 2012 10:30 PM, Stephen Warren wrote:
 On 12/18/2012 11:31 PM, Laxman Dewangan wrote:
> Add APB DMA requestor and serial aliases for serial controller.
> There will be two serial driver i.e. 8250 based simple serial driver
> and APB DMA based serial driver for higher baudrate and performace.
...
 This patch seems to do two things:
...
 2) Add aliases for the serial ports. I have no idea why this is useful.
>>> Serial aliases are added because we want to get the port number like
>>> /dev/ttyTHS0,  /d/ttyTHS2 etc. The uarta should be /dev/ttyTHS0 and
>>> uartc should be /dev/ttyTHS2. The port number can be found using aliases
>>> and of_alias_get_id() in driver file:
>>>
>>> port_number = of_alias_get_id(np, "serial");
>>
>> Oh, I see. I guess the aliases make sense then.
>>
>> But, wouldn't you only add aliases for the specific UARTs that are in
>> use on a particular board (so put them in tegraNN-board.dts) rather than
>> all UARTs on Tegra (i.e. the current patch which puts them into
>> tegraNN.dtsi)?
> 
> I like to have this in tegraN N.dtsi file becasue:
> - This policy is not going to change the board to board. For high speed
> driver the uarta will be ttyTHS0 and uartb ttyTHS1.

Sure it is. Since the board files select which UARTs use the low-speed
driver vs. the high-speed driver by overriding the compatible value,
each board will have a different subset of UARTs which use the high
speed driver and hence which use the aliases. Don't you want to end up
with /dev/ttyHS0 on each board, rather than ending up with a "random"
device node name depending on which UART the board designer picked for
the high speed device?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] ARM: tegra: dts: add aliases and DMA requestor for serial controller

2012-12-21 Thread Stephen Warren
On 12/20/2012 09:18 PM, Laxman Dewangan wrote:
 On Thursday 20 December 2012 10:33 PM, Stephen Warren wrote:
 On 12/19/2012 11:15 PM, Laxman Dewangan wrote:
 On Wednesday 19 December 2012 10:30 PM, Stephen Warren wrote:
 On 12/18/2012 11:31 PM, Laxman Dewangan wrote:
 Add APB DMA requestor and serial aliases for serial controller.
 There will be two serial driver i.e. 8250 based simple serial driver
 and APB DMA based serial driver for higher baudrate and performace.
...
 This patch seems to do two things:
...
 2) Add aliases for the serial ports. I have no idea why this is useful.
 Serial aliases are added because we want to get the port number like
 /dev/ttyTHS0,  /d/ttyTHS2 etc. The uarta should be /dev/ttyTHS0 and
 uartc should be /dev/ttyTHS2. The port number can be found using aliases
 and of_alias_get_id() in driver file:

 port_number = of_alias_get_id(np, serial);

 Oh, I see. I guess the aliases make sense then.

 But, wouldn't you only add aliases for the specific UARTs that are in
 use on a particular board (so put them in tegraNN-board.dts) rather than
 all UARTs on Tegra (i.e. the current patch which puts them into
 tegraNN.dtsi)?
 
 I like to have this in tegraN N.dtsi file becasue:
 - This policy is not going to change the board to board. For high speed
 driver the uarta will be ttyTHS0 and uartb ttyTHS1.

Sure it is. Since the board files select which UARTs use the low-speed
driver vs. the high-speed driver by overriding the compatible value,
each board will have a different subset of UARTs which use the high
speed driver and hence which use the aliases. Don't you want to end up
with /dev/ttyHS0 on each board, rather than ending up with a random
device node name depending on which UART the board designer picked for
the high speed device?
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] ARM: tegra: dts: add aliases and DMA requestor for serial controller

2012-12-20 Thread Laxman Dewangan

On Thursday 20 December 2012 10:33 PM, Stephen Warren wrote:

On 12/19/2012 11:15 PM, Laxman Dewangan wrote:

On Wednesday 19 December 2012 10:30 PM, Stephen Warren wrote:

On 12/18/2012 11:31 PM, Laxman Dewangan wrote:

Add APB DMA requestor and serial aliases for serial controller.
There will be two serial driver i.e. 8250 based simple serial driver
and APB DMA based serial driver for higher baudrate and performace.

The simple serial driver get enabled with compatible nvidia,tegra20-uart
and APB DMA based driver will get enabled with compatible
nvidia,tegra20-hsuart.

This patch seems to do two things:

1) Add a comment describing how to select the basic or DMA-based driver.
I can see why this is useful.

2) Add aliases for the serial ports. I have no idea why this is useful.

Serial aliases are added because we want to get the port number like
/dev/ttyTHS0,  /d/ttyTHS2 etc. The uarta should be /dev/ttyTHS0 and
uartc should be /dev/ttyTHS2. The port number can be found using aliases
and of_alias_get_id() in driver file:

port_number = of_alias_get_id(np, "serial");

Oh, I see. I guess the aliases make sense then.

But, wouldn't you only add aliases for the specific UARTs that are in
use on a particular board (so put them in tegraNN-board.dts) rather than
all UARTs on Tegra (i.e. the current patch which puts them into
tegraNN.dtsi)?


I like to have this in tegraN N.dtsi file becasue:
- This policy is not going to change the board to board. For high speed 
driver the uarta will be ttyTHS0 and uartb ttyTHS1.
- In board file I will only enable driver and make compatible, not worry 
about the making aliases.


This approach will simplify the instantiation. This will also avoid 
confusion like the aliases get added or not when we create board dts file.
This will be on same line we have with board files where pdev->id is 
fixed for all board in common place i.e. device.c which decide the 
port-number.




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] ARM: tegra: dts: add aliases and DMA requestor for serial controller

2012-12-20 Thread Stephen Warren
On 12/19/2012 11:15 PM, Laxman Dewangan wrote:
> On Wednesday 19 December 2012 10:30 PM, Stephen Warren wrote:
>> On 12/18/2012 11:31 PM, Laxman Dewangan wrote:
>>> Add APB DMA requestor and serial aliases for serial controller.
>>> There will be two serial driver i.e. 8250 based simple serial driver
>>> and APB DMA based serial driver for higher baudrate and performace.
>>>
>>> The simple serial driver get enabled with compatible nvidia,tegra20-uart
>>> and APB DMA based driver will get enabled with compatible
>>> nvidia,tegra20-hsuart.
>> This patch seems to do two things:
>>
>> 1) Add a comment describing how to select the basic or DMA-based driver.
>> I can see why this is useful.
>>
>> 2) Add aliases for the serial ports. I have no idea why this is useful.
> 
> Serial aliases are added because we want to get the port number like
> /dev/ttyTHS0,  /d/ttyTHS2 etc. The uarta should be /dev/ttyTHS0 and
> uartc should be /dev/ttyTHS2. The port number can be found using aliases
> and of_alias_get_id() in driver file:
> 
> port_number = of_alias_get_id(np, "serial");

Oh, I see. I guess the aliases make sense then.

But, wouldn't you only add aliases for the specific UARTs that are in
use on a particular board (so put them in tegraNN-board.dts) rather than
all UARTs on Tegra (i.e. the current patch which puts them into
tegraNN.dtsi)?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] ARM: tegra: dts: add aliases and DMA requestor for serial controller

2012-12-20 Thread Stephen Warren
On 12/19/2012 11:15 PM, Laxman Dewangan wrote:
 On Wednesday 19 December 2012 10:30 PM, Stephen Warren wrote:
 On 12/18/2012 11:31 PM, Laxman Dewangan wrote:
 Add APB DMA requestor and serial aliases for serial controller.
 There will be two serial driver i.e. 8250 based simple serial driver
 and APB DMA based serial driver for higher baudrate and performace.

 The simple serial driver get enabled with compatible nvidia,tegra20-uart
 and APB DMA based driver will get enabled with compatible
 nvidia,tegra20-hsuart.
 This patch seems to do two things:

 1) Add a comment describing how to select the basic or DMA-based driver.
 I can see why this is useful.

 2) Add aliases for the serial ports. I have no idea why this is useful.
 
 Serial aliases are added because we want to get the port number like
 /dev/ttyTHS0,  /d/ttyTHS2 etc. The uarta should be /dev/ttyTHS0 and
 uartc should be /dev/ttyTHS2. The port number can be found using aliases
 and of_alias_get_id() in driver file:
 
 port_number = of_alias_get_id(np, serial);

Oh, I see. I guess the aliases make sense then.

But, wouldn't you only add aliases for the specific UARTs that are in
use on a particular board (so put them in tegraNN-board.dts) rather than
all UARTs on Tegra (i.e. the current patch which puts them into
tegraNN.dtsi)?
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] ARM: tegra: dts: add aliases and DMA requestor for serial controller

2012-12-20 Thread Laxman Dewangan

On Thursday 20 December 2012 10:33 PM, Stephen Warren wrote:

On 12/19/2012 11:15 PM, Laxman Dewangan wrote:

On Wednesday 19 December 2012 10:30 PM, Stephen Warren wrote:

On 12/18/2012 11:31 PM, Laxman Dewangan wrote:

Add APB DMA requestor and serial aliases for serial controller.
There will be two serial driver i.e. 8250 based simple serial driver
and APB DMA based serial driver for higher baudrate and performace.

The simple serial driver get enabled with compatible nvidia,tegra20-uart
and APB DMA based driver will get enabled with compatible
nvidia,tegra20-hsuart.

This patch seems to do two things:

1) Add a comment describing how to select the basic or DMA-based driver.
I can see why this is useful.

2) Add aliases for the serial ports. I have no idea why this is useful.

Serial aliases are added because we want to get the port number like
/dev/ttyTHS0,  /d/ttyTHS2 etc. The uarta should be /dev/ttyTHS0 and
uartc should be /dev/ttyTHS2. The port number can be found using aliases
and of_alias_get_id() in driver file:

port_number = of_alias_get_id(np, serial);

Oh, I see. I guess the aliases make sense then.

But, wouldn't you only add aliases for the specific UARTs that are in
use on a particular board (so put them in tegraNN-board.dts) rather than
all UARTs on Tegra (i.e. the current patch which puts them into
tegraNN.dtsi)?


I like to have this in tegraN N.dtsi file becasue:
- This policy is not going to change the board to board. For high speed 
driver the uarta will be ttyTHS0 and uartb ttyTHS1.
- In board file I will only enable driver and make compatible, not worry 
about the making aliases.


This approach will simplify the instantiation. This will also avoid 
confusion like the aliases get added or not when we create board dts file.
This will be on same line we have with board files where pdev-id is 
fixed for all board in common place i.e. device.c which decide the 
port-number.




--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] ARM: tegra: dts: add aliases and DMA requestor for serial controller

2012-12-19 Thread Laxman Dewangan

On Wednesday 19 December 2012 10:30 PM, Stephen Warren wrote:

On 12/18/2012 11:31 PM, Laxman Dewangan wrote:

Add APB DMA requestor and serial aliases for serial controller.
There will be two serial driver i.e. 8250 based simple serial driver
and APB DMA based serial driver for higher baudrate and performace.

The simple serial driver get enabled with compatible nvidia,tegra20-uart
and APB DMA based driver will get enabled with compatible
nvidia,tegra20-hsuart.

This patch seems to do two things:

1) Add a comment describing how to select the basic or DMA-based driver.
I can see why this is useful.

2) Add aliases for the serial ports. I have no idea why this is useful.


Serial aliases are added because we want to get the port number like 
/dev/ttyTHS0,  /d/ttyTHS2 etc. The uarta should be /dev/ttyTHS0 and 
uartc should be /dev/ttyTHS2. The port number can be found using aliases 
and of_alias_get_id() in driver file:


port_number = of_alias_get_id(np, "serial");




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] ARM: tegra: dts: add aliases and DMA requestor for serial controller

2012-12-19 Thread Stephen Warren
On 12/18/2012 11:31 PM, Laxman Dewangan wrote:
> Add APB DMA requestor and serial aliases for serial controller.
> There will be two serial driver i.e. 8250 based simple serial driver
> and APB DMA based serial driver for higher baudrate and performace.
> 
> The simple serial driver get enabled with compatible nvidia,tegra20-uart
> and APB DMA based driver will get enabled with compatible
> nvidia,tegra20-hsuart.

This patch seems to do two things:

1) Add a comment describing how to select the basic or DMA-based driver.
I can see why this is useful.

2) Add aliases for the serial ports. I have no idea why this is useful.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] ARM: tegra: dts: add aliases and DMA requestor for serial controller

2012-12-19 Thread Stephen Warren
On 12/18/2012 11:31 PM, Laxman Dewangan wrote:
 Add APB DMA requestor and serial aliases for serial controller.
 There will be two serial driver i.e. 8250 based simple serial driver
 and APB DMA based serial driver for higher baudrate and performace.
 
 The simple serial driver get enabled with compatible nvidia,tegra20-uart
 and APB DMA based driver will get enabled with compatible
 nvidia,tegra20-hsuart.

This patch seems to do two things:

1) Add a comment describing how to select the basic or DMA-based driver.
I can see why this is useful.

2) Add aliases for the serial ports. I have no idea why this is useful.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] ARM: tegra: dts: add aliases and DMA requestor for serial controller

2012-12-19 Thread Laxman Dewangan

On Wednesday 19 December 2012 10:30 PM, Stephen Warren wrote:

On 12/18/2012 11:31 PM, Laxman Dewangan wrote:

Add APB DMA requestor and serial aliases for serial controller.
There will be two serial driver i.e. 8250 based simple serial driver
and APB DMA based serial driver for higher baudrate and performace.

The simple serial driver get enabled with compatible nvidia,tegra20-uart
and APB DMA based driver will get enabled with compatible
nvidia,tegra20-hsuart.

This patch seems to do two things:

1) Add a comment describing how to select the basic or DMA-based driver.
I can see why this is useful.

2) Add aliases for the serial ports. I have no idea why this is useful.


Serial aliases are added because we want to get the port number like 
/dev/ttyTHS0,  /d/ttyTHS2 etc. The uarta should be /dev/ttyTHS0 and 
uartc should be /dev/ttyTHS2. The port number can be found using aliases 
and of_alias_get_id() in driver file:


port_number = of_alias_get_id(np, serial);




--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/