Re: enabling uart2 on omap5912 osk

2008-05-22 Thread Steve Poulsen
If you do not have a "c" as the first character in the permissions, then 
your device file is not a true device file, but just a file.  You should 
delete that file (ttyS1) and create the device file:


mknod /dev/ttyS1 c 4 65
mknod /dev/ttyS2 c 4 66

Steve

mohammed shareef wrote:

hi,

i have changed the line in omap_osk.c to:

static struct omap_uart_config osk_uart_config __initdata = {
  .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
};

And all the three UARTs are enabled now as i can see in the kernel boot-log:

serial8250.0: ttyS0 at MMIO 0xfffb (irq = 46) is a ST16654
serial8250.0: ttyS1 at MMIO 0xfffb0800 (irq = 47) is a ST16654
serial8250.0: ttyS2 at MMIO 0xfffb9800 (irq = 15) is a ST16654

A node called ttyS0 is already there which is linked to uart0.

when i type:

ls -l /dev/ttyS0
crw-rw-rw-1 root root   4,  64 Aug  8  2004
\0x1b[1;35m/dev/ttyS0\0x1b[0m
# ls -l /dev/ttyS1
-rw-r--r--1 root root   16 May 21  2008
\0x1b[0;0m/dev/ttyS1\0x1b[0m

i have a question on the above output. the major and minor number for
ttyS0 are 4, 64 but fot ttyS1 i dont find a major number. what does
this indicate?

thanx for all the help.

regards,
Shareef


On Thu, May 22, 2008 at 2:18 AM, Tony Lindgren <[EMAIL PROTECTED]> wrote:
  

* Felipe Balbi <[EMAIL PROTECTED]> [080521 12:37]:


On Wed, 21 May 2008 10:44:28 -0700, Tony Lindgren <[EMAIL PROTECTED]> wrote:
  

* mohammed shareef <[EMAIL PROTECTED]> [080521 10:12]:


i see the following lines in the omap-osk.c file regarding the uarts:

static struct omap_uart_config osk_uart_config __initdata = {
   .enabled_uarts = (1 << 0),
};


what does it mean? i want all my uarts (1,2,3) enabled. how do i have
to modify the above line?
  

How about try .enabled_uarts = 3


this would enable only uarts 1 and 2, right?
maybe it's enough :-p
  

Oh yeh, that's true :)

Tony



___
Linux-omap-open-source mailing list
[EMAIL PROTECTED]
http://linux.omap.com/mailman/listinfo/linux-omap-open-source

  


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: enabling uart2 on omap5912 osk

2008-05-21 Thread Felipe Balbi


On Thu, 22 May 2008 04:01:17 +0530, "mohammed shareef"
<[EMAIL PROTECTED]> wrote:
> # cat /proc/tty/drivers
> /dev/tty /dev/tty5   0 system:/dev/tty
> /dev/console /dev/console5   1 system:console
> /dev/ptmx/dev/ptmx   5   2 system
> /dev/vc/0/dev/vc/0   4   0 system:vtmaster
> serial   /dev/ttyS   4 64-67 serial

Here's what you're looking for.

> pty_slave/dev/pts  136 0-1048575 pty:slave
> pty_master   /dev/ptm  128 0-1048575 pty:master
> pty_slave/dev/ttyp   3 0-255 pty:slave
> pty_master   /dev/pty2 0-255 pty:master
> unknown  /dev/tty4 1-63 console
> 
> this is the output..

It seems ok, no idea why the 4 doesn't appear in ls -l.
Sorry :-s

-- 
Best Regards,

Felipe Balbi
http://felipebalbi.com
[EMAIL PROTECTED]

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: enabling uart2 on omap5912 osk

2008-05-21 Thread mohammed shareef
# cat /proc/tty/drivers
/dev/tty /dev/tty5   0 system:/dev/tty
/dev/console /dev/console5   1 system:console
/dev/ptmx/dev/ptmx   5   2 system
/dev/vc/0/dev/vc/0   4   0 system:vtmaster
serial   /dev/ttyS   4 64-67 serial
pty_slave/dev/pts  136 0-1048575 pty:slave
pty_master   /dev/ptm  128 0-1048575 pty:master
pty_slave/dev/ttyp   3 0-255 pty:slave
pty_master   /dev/pty2 0-255 pty:master
unknown  /dev/tty4 1-63 console

this is the output..

regards and thanx,
shareef

On Thu, May 22, 2008 at 3:51 AM, Felipe Balbi <[EMAIL PROTECTED]> wrote:
>
>
> On Thu, 22 May 2008 03:46:37 +0530, "mohammed shareef"
> <[EMAIL PROTECTED]> wrote:
>> when i type:
>>
>> ls -l /dev/ttyS0
>> crw-rw-rw-1 root root   4,  64 Aug  8  2004
>> \0x1b[1;35m/dev/ttyS0\0x1b[0m
>> # ls -l /dev/ttyS1
>> -rw-r--
>
> ...
>
> that's a bit weird. What does cat /proc/tty/drivers show ?
>
> --
> Best Regards,
>
> Felipe Balbi
> http://felipebalbi.com
> [EMAIL PROTECTED]
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: enabling uart2 on omap5912 osk

2008-05-21 Thread Felipe Balbi


On Thu, 22 May 2008 03:46:37 +0530, "mohammed shareef"
<[EMAIL PROTECTED]> wrote:
> when i type:
> 
> ls -l /dev/ttyS0
> crw-rw-rw-1 root root   4,  64 Aug  8  2004
> \0x1b[1;35m/dev/ttyS0\0x1b[0m
> # ls -l /dev/ttyS1
> -rw-r--

...

that's a bit weird. What does cat /proc/tty/drivers show ?

-- 
Best Regards,

Felipe Balbi
http://felipebalbi.com
[EMAIL PROTECTED]

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: enabling uart2 on omap5912 osk

2008-05-21 Thread mohammed shareef
hi,

i have changed the line in omap_osk.c to:

static struct omap_uart_config osk_uart_config __initdata = {
  .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
};

And all the three UARTs are enabled now as i can see in the kernel boot-log:

serial8250.0: ttyS0 at MMIO 0xfffb (irq = 46) is a ST16654
serial8250.0: ttyS1 at MMIO 0xfffb0800 (irq = 47) is a ST16654
serial8250.0: ttyS2 at MMIO 0xfffb9800 (irq = 15) is a ST16654

A node called ttyS0 is already there which is linked to uart0.

when i type:

ls -l /dev/ttyS0
crw-rw-rw-1 root root   4,  64 Aug  8  2004
\0x1b[1;35m/dev/ttyS0\0x1b[0m
# ls -l /dev/ttyS1
-rw-r--r--1 root root   16 May 21  2008
\0x1b[0;0m/dev/ttyS1\0x1b[0m

i have a question on the above output. the major and minor number for
ttyS0 are 4, 64 but fot ttyS1 i dont find a major number. what does
this indicate?

thanx for all the help.

regards,
Shareef


On Thu, May 22, 2008 at 2:18 AM, Tony Lindgren <[EMAIL PROTECTED]> wrote:
> * Felipe Balbi <[EMAIL PROTECTED]> [080521 12:37]:
>>
>>
>> On Wed, 21 May 2008 10:44:28 -0700, Tony Lindgren <[EMAIL PROTECTED]> wrote:
>> > * mohammed shareef <[EMAIL PROTECTED]> [080521 10:12]:
>> >> i see the following lines in the omap-osk.c file regarding the uarts:
>> >>
>> >> static struct omap_uart_config osk_uart_config __initdata = {
>> >>.enabled_uarts = (1 << 0),
>> >> };
>> >>
>> >>
>> >> what does it mean? i want all my uarts (1,2,3) enabled. how do i have
>> >> to modify the above line?
>> >
>> > How about try .enabled_uarts = 3
>>
>> this would enable only uarts 1 and 2, right?
>> maybe it's enough :-p
>
> Oh yeh, that's true :)
>
> Tony
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: enabling uart2 on omap5912 osk

2008-05-21 Thread Tony Lindgren
* Felipe Balbi <[EMAIL PROTECTED]> [080521 12:37]:
> 
> 
> On Wed, 21 May 2008 10:44:28 -0700, Tony Lindgren <[EMAIL PROTECTED]> wrote:
> > * mohammed shareef <[EMAIL PROTECTED]> [080521 10:12]:
> >> i see the following lines in the omap-osk.c file regarding the uarts:
> >>
> >> static struct omap_uart_config osk_uart_config __initdata = {
> >>.enabled_uarts = (1 << 0),
> >> };
> >>
> >>
> >> what does it mean? i want all my uarts (1,2,3) enabled. how do i have
> >> to modify the above line?
> > 
> > How about try .enabled_uarts = 3
> 
> this would enable only uarts 1 and 2, right?
> maybe it's enough :-p

Oh yeh, that's true :)

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: enabling uart2 on omap5912 osk

2008-05-21 Thread Felipe Balbi


On Wed, 21 May 2008 10:44:28 -0700, Tony Lindgren <[EMAIL PROTECTED]> wrote:
> * mohammed shareef <[EMAIL PROTECTED]> [080521 10:12]:
>> i see the following lines in the omap-osk.c file regarding the uarts:
>>
>> static struct omap_uart_config osk_uart_config __initdata = {
>>  .enabled_uarts = (1 << 0),
>> };
>>
>>
>> what does it mean? i want all my uarts (1,2,3) enabled. how do i have
>> to modify the above line?
> 
> How about try .enabled_uarts = 3

this would enable only uarts 1 and 2, right?
maybe it's enough :-p

-- 
Best Regards,

Felipe Balbi
http://felipebalbi.com
[EMAIL PROTECTED]

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: enabling uart2 on omap5912 osk

2008-05-21 Thread Tony Lindgren
* mohammed shareef <[EMAIL PROTECTED]> [080521 10:12]:
> i see the following lines in the omap-osk.c file regarding the uarts:
> 
> static struct omap_uart_config osk_uart_config __initdata = {
>   .enabled_uarts = (1 << 0),
> };
> 
> 
> what does it mean? i want all my uarts (1,2,3) enabled. how do i have
> to modify the above line?

How about try .enabled_uarts = 3

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: enabling uart2 on omap5912 osk

2008-05-21 Thread roman.tereshonkov

Each bit enables one uart.
For uarts 1, 2, 3 it will look like:

static struct omap_uart_config osk_uart_config __initdata = {
.enabled_uarts = (1 << 0) | (1 << 1) | (1 << 2),
};


Just a hint. You can look board-xxx.c config files and see examples
there.



Roman Tereshonkov

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of ext mohammed
shareef
Sent: 21 May, 2008 20:12
To: Tony Lindgren
Cc: omap; [EMAIL PROTECTED]
Subject: Re: enabling uart2 on omap5912 osk

i see the following lines in the omap-osk.c file regarding the uarts:

static struct omap_uart_config osk_uart_config __initdata = {
.enabled_uarts = (1 << 0),
};


what does it mean? i want all my uarts (1,2,3) enabled. how do i have
to modify the above line?

thanx for the help.

regards,
Shareef

On Wed, May 21, 2008 at 9:10 PM, Tony Lindgren <[EMAIL PROTECTED]> wrote:
> * mohammed shareef <[EMAIL PROTECTED]> [080520 23:43]:
>> Hello,
>>
>> How do i enable UART2 on omap5912_osk in the kernel?
>>
>> and is there a way by which i can test if the uart2 has been
recongnised?
>>
>> i dont see uart module being initialized during the kernel boot-up.
>
> You need to enable it in board-osk.c, see enabled_uarts. Then to use
it
> you also need the right hardware attached to it.
>
> Tony
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: enabling uart2 on omap5912 osk

2008-05-21 Thread mohammed shareef
i see the following lines in the omap-osk.c file regarding the uarts:

static struct omap_uart_config osk_uart_config __initdata = {
.enabled_uarts = (1 << 0),
};


what does it mean? i want all my uarts (1,2,3) enabled. how do i have
to modify the above line?

thanx for the help.

regards,
Shareef

On Wed, May 21, 2008 at 9:10 PM, Tony Lindgren <[EMAIL PROTECTED]> wrote:
> * mohammed shareef <[EMAIL PROTECTED]> [080520 23:43]:
>> Hello,
>>
>> How do i enable UART2 on omap5912_osk in the kernel?
>>
>> and is there a way by which i can test if the uart2 has been recongnised?
>>
>> i dont see uart module being initialized during the kernel boot-up.
>
> You need to enable it in board-osk.c, see enabled_uarts. Then to use it
> you also need the right hardware attached to it.
>
> Tony
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: enabling uart2 on omap5912 osk

2008-05-21 Thread Tony Lindgren
* mohammed shareef <[EMAIL PROTECTED]> [080520 23:43]:
> Hello,
> 
> How do i enable UART2 on omap5912_osk in the kernel?
> 
> and is there a way by which i can test if the uart2 has been recongnised?
> 
> i dont see uart module being initialized during the kernel boot-up.

You need to enable it in board-osk.c, see enabled_uarts. Then to use it
you also need the right hardware attached to it.

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


enabling uart2 on omap5912 osk

2008-05-21 Thread mohammed shareef
Hello,

How do i enable UART2 on omap5912_osk in the kernel?

and is there a way by which i can test if the uart2 has been recongnised?

i dont see uart module being initialized during the kernel boot-up.

thank you.

regards,
Shareef
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


enabling uart2 on omap5912 osk

2008-05-20 Thread mohammed shareef
Hello,

How do i enable UART2 on omap5912_osk in the kernel?

and is there a way by which i can test if the uart2 has been recongnised?

i dont see uart module being initialized during the kernel boot-up.

thank you.

regards,
Shareef
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html