All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wg@domain.hid>
To: Everett Wang <everteq@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] problem with serial example
Date: Wed, 26 May 2010 07:38:48 +0200	[thread overview]
Message-ID: <4BFCB3E8.4040607@domain.hid> (raw)
In-Reply-To: <AANLkTingSXRAZDsNW6VUsDMh9prHKvnk_jV3PjTnSl8s@domain.hid>

On 05/25/2010 03:47 PM, Everett Wang wrote:
> On Mon, May 24, 2010 at 11:45 PM, Wolfgang Grandegger <wg@domain.hid> wrote:
>> On 05/24/2010 09:32 AM, Everett Wang wrote:
>>> On Mon, May 24, 2010 at 7:36 AM, Everett Wang <everteq@domain.hid> wrote:
>>>> On Mon, May 24, 2010 at 12:28 AM, Wolfgang Grandegger <wg@domain.hid> wrote:
>>>>> On 05/23/2010 06:19 PM, Everett Wang wrote:
>>>>>> On Sun, May 23, 2010 at 11:46 PM, Wolfgang Grandegger <wg@domain.hid> wrote:
>>>>>
>>>>>>> There are other possibilities to interact with Linux, e.g. telnet,
>>>>>>> slogin or netcat. But it's always good to have a console.
>>>>>>>
>>>>>> I guess I need a USB to ethernet for these.
>>>>>
>>>>> Yes.
>>>>>
>>>>> ...
>>>>>>> All three uarts are occupied by Linux and you cannot use them as
>>>>>>> rtserial. First you need to release at least one of them. What Linux
>>>>>>> config do you use for your board?
>>>>>>
>>>>>> I didn't do any configuration. Do you mean to config these during kernel
>>>>>> configuration?
>>>>>
>>>>> Can you show us the .config of your kernel?
>>>>>
>>>>> Some more insights:
>>>>>
>>>>> I think the serial ports for the beagle boards are configured in:
>>>>>
>>>>> http://lxr.linux.no/#linux+v2.6.34/arch/arm/mach-omap2/serial.c
>>>>>
>>>>> Therein you find entries like:
>>>>>
>>>>> http://lxr.linux.no/#linux+v2.6.34/arch/arm/mach-omap2/serial.c#L82
>>>>>
>>>>> As you can see, a regshift of 2 is used, which is not yet supported by
>>>>> the 16550A RTDM driver. Should not be a big deal to add it, though.
>>>>> Also, as "baud_base" you should use OMAP24XX_BASE_BAUD.
>>>>>
>>>>> Wolfgang.
>>>>>
>>>>
>>>> Thanks for the suggestions. The .config file is attached. I will look at the
>>>> code you pointed to today to study the configuration of the serial port.
>>>>
>>>> Everett
>>>>
>>>
>>> Hi Wolfgang,
>>>
>>> I looked at the serial.c and function you pointed too. I have can't figure
>>> out how to modify it. Could you point me to the right direction to read so
>>> I can understand and eventually improve the serial for beagleboard? I thought
>>> I could limit the kernel to use only one of the uart (console) by
>>> changing function
>>>  __init omap_serial_init(void):
>>>
>>>  void __init omap_serial_init(void)
>>> {
>>>         int i;
>>>
>>> //        for (i = 0; i < ARRAY_SIZE(omap_uart); i++)
>>> //                omap_serial_init_port(i);
>>>       omap_serial_init_port(2);
>>> }
>>>
>>> But the kernel hangs during booting after printing this message:
>>>
>>> uncompressing Linux... done.
>>>
>>> I guess it is not that simple to let kernel not to claim the uart0 and uart1.
>>
>> Yes, unfortunately. I would try to comment out the uarts you want to
>> use for rtser in the following struct:
>>
>> http://lxr.linux.no/#linux+v2.6.34/arch/arm/mach-omap2/serial.c#L562
>>
>> Maybe the better option is to download setserial from
>>
>> http://sourceforge.net/projects/setserial/files/setserial/2.17/setserial-2.17.tar.gz/download
>>
>> and cross-compile it for your target. Then try:
>>
>> # setserial /dev/ttyS2 uart none
>>
>> Wolfgang.
>>
>>
> 
> Hi Wolfgang,
> 
> Thanks,
> 
> I took the easiest way by
> opkg install setserial
> 
> The setserial got installed into my flash. I then
> 
>  # setserial /dev/ttyS0 uart none
> Linux has no complain. dmesg | tail doesn't show anything
> 
> Finally I did this:
>  # setserial /dev/ttyS2 uart none
> Linux reports "Can't set serial info: Device or resource busy". The
> uart3 is used by console login.
> And my console login still works,
> 
> I guess I still don't have a clear direction what to do next. What are
> needed to make the uart
> to work with xenomai? I also want to make SPI to work with xenomai. Is
> that even harder to
> do?

Next I would try to load the xeno_16550a.ko as described earlier. Then
you need to fix the register access by introducing a proper regshift, at
least. I can't tell if other fixups are necessary but if you are lucky
it will already work. And yes, implementing a RTDM SPI driver is even
harder, unfortunately.

Wolfgang.


  reply	other threads:[~2010-05-26  5:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-23  3:48 [Xenomai-help] problem with serial example Everett Wang
2010-05-23  9:37 ` Wolfgang Grandegger
2010-05-23 14:59   ` Everett Wang
2010-05-23 15:29     ` Gilles Chanteperdrix
2010-05-23 16:12       ` Everett Wang
2010-05-23 15:46     ` Wolfgang Grandegger
2010-05-23 16:19       ` Everett Wang
2010-05-23 16:28         ` Wolfgang Grandegger
2010-05-23 23:36           ` Everett Wang
2010-05-24  7:32             ` Everett Wang
2010-05-24 15:45               ` Wolfgang Grandegger
2010-05-25 13:47                 ` Everett Wang
2010-05-26  5:38                   ` Wolfgang Grandegger [this message]
2010-05-27  1:22                     ` Everett Wang
2010-05-27  7:34                       ` Wolfgang Grandegger
2010-05-23 16:28       ` Wolfgang Grandegger
2011-02-24  9:29       ` [Xenomai-help] problem with xeno_16550A:Fatal Module not found zair
2011-02-24 10:46         ` Gilles Chanteperdrix
     [not found]           ` <AANLkTinRd-KQ1HKy1tn1USfxL-8GT8FdZKujKTzfo_HE@mail.gmail.com>
2011-02-25 18:36             ` Gilles Chanteperdrix

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=4BFCB3E8.4040607@domain.hid \
    --to=wg@domain.hid \
    --cc=everteq@domain.hid \
    --cc=xenomai@xenomai.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.