[Xenomai-help] Omap3630, rtserial, xeno_16550A: crash on insmod

2012-01-12 Thread Manfred
Dear Xenomai-Developers/Users, I am trying to get xenomai running on an omap3630 device (gumstix overo). xenomai 2.6.0/kernel: linux-omap3-2.6.38 / i-pipe patch 2.6.38.8-arm-1.18.04 I would like to use the UART devices in a RT-application, and I was following the following guidelines: http://ww

Re: [Xenomai-help] Omap3630, rtserial, xeno_16550A: crash on insmod

2012-01-12 Thread Gilles Chanteperdrix
On 01/12/2012 06:53 PM, Manfred wrote: > Dear Xenomai-Developers/Users, > > I am trying to get xenomai running on an omap3630 device (gumstix overo). > xenomai 2.6.0/kernel: linux-omap3-2.6.38 / i-pipe patch 2.6.38.8-arm-1.18.04 > > I would like to use the UART devices in a RT-application, > an

Re: [Xenomai-help] Omap3630, rtserial, xeno_16550A: crash on insmod

2012-01-12 Thread Wolfgang Grandegger
On 01/12/2012 06:53 PM, Manfred wrote: > Dear Xenomai-Developers/Users, > > I am trying to get xenomai running on an omap3630 device (gumstix overo). > xenomai 2.6.0/kernel: linux-omap3-2.6.38 / i-pipe patch > 2.6.38.8-arm-1.18.04 > > I would like to use the UART devices in a RT-application, > a

Re: [Xenomai-help] Omap3630, rtserial, xeno_16550A: crash on insmod

2012-01-12 Thread Manfred
Ok, so this is my first attempt on trying to debug a kernel module, so please bear with me: First, I repeated what I did before: 1.) setserial /dev/ttyS0 uart none 2.)modprobe xeno_16550A mem=0x4806a000 irq=72 baud_base=300 3.) dmesg->error message with: Unhandled fault: external abo

Re: [Xenomai-help] Omap3630, rtserial, xeno_16550A: crash on insmod

2012-01-12 Thread Gilles Chanteperdrix
On 01/12/2012 08:36 PM, Manfred wrote: > Ok, so this is my first attempt on trying to debug a kernel module, so > please bear with me: > First, I repeated what I did before: > > 1.) setserial /dev/ttyS0 uart none > > 2.)modprobe xeno_16550A mem=0x4806a000 irq=72 baud_base=300 > > 3.) d

Re: [Xenomai-help] Omap3630, rtserial, xeno_16550A: crash on insmod

2012-01-13 Thread Manfred
(In reply to Wolfgangs Respond) Thank you for the explanations. So I managed to recompile the kernel module with a lot of "printk" commands. And I could track the problem to the following: it fails in:[1] int __init rt_16550_init(void) When calling these lines: rt_16550_reg_out(mode, base, IER,

Re: [Xenomai-help] Omap3630, rtserial, xeno_16550A: crash on insmod

2012-01-15 Thread Wolfgang Grandegger
On 01/13/2012 08:15 PM, Manfred wrote: > (In reply to Wolfgangs Respond) > > Thank you for the explanations. > So I managed to recompile the kernel module with a lot of "printk" > > commands. And I could track the problem to the following: > it fails in:[1] > int __init rt_16550_init(void) > > W

Re: [Xenomai-help] Omap3630, rtserial, xeno_16550A: crash on insmod

2012-01-18 Thread Fabrice Gasnier
Dear all, On 15/01/2012 20:35, Wolfgang Grandegger wrote: >> --> >> > So can I just change the function in 16550A.c like this?: >> > rt_16550_reg_in(io_mode_t io_mode, unsigned long base, int off, int >> > regshift) >> > { >> > switch (io_mode) { >> > case MODE_PIO: >> > return in

Re: [Xenomai-help] Omap3630, rtserial, xeno_16550A: crash on insmod

2012-01-18 Thread Wolfgang Grandegger
On 01/18/2012 05:15 PM, Fabrice Gasnier wrote: > Dear all, > > On 15/01/2012 20:35, Wolfgang Grandegger wrote: >>> --> So can I just change the function in 16550A.c like this?: rt_16550_reg_in(io_mode_t io_mode, unsigned long base, int off, int regshift) { switch (io_

Re: [Xenomai-help] Omap3630, rtserial, xeno_16550A: crash on insmod

2012-01-19 Thread Fabrice Gasnier
On 18/01/2012 17:32, Wolfgang Grandegger wrote: >> Further investigation indicates that when writing, tx interrupt is not >> asserted as expected (rt_16550_write): >> > /* unmask tx interrupt */ >> > ctx->ier_status |= IER_TX; >> > rt_16550_reg_out(rt_16550_io_mode_from_ctx(ctx), >> >

Re: [Xenomai-help] Omap3630, rtserial, xeno_16550A: crash on insmod

2012-01-19 Thread Manfred
I finally managed to get the module compiling, running and inserting. The main problems (so far) were basically: - Need a regshift for the offset - Need a regshift when calling ioremap AND (and this a bit tricky, because it is omap3630-specific): - Make sure that we never read an empty rx_fifo: i

Re: [Xenomai-help] Omap3630, rtserial, xeno_16550A: crash on insmod

2012-01-20 Thread Manfred
Hi All, I tested the patch on my omap3630 and I ran the cross-link test. It works. I want to thank Fabrice Gasnier from my side. I have, however, the following suggestions/questions to the patch: - If I got it right, the errata only affects the RX_fifo (not the tx_fifo), so I suggest to handle

Re: [Xenomai-help] Omap3630, rtserial, xeno_16550A: crash on insmod

2012-01-20 Thread Fabrice Gasnier
Dear all, Manfred, Please find interleaved answers/questions. On 20/01/2012 13:03, Manfred wrote: > Hi All, > > I tested the patch on my omap3630 and I ran the cross-link test. > It works. I want to thank Fabrice Gasnier from my side. you're welcome. > > I have, however, the following suggestio

Re: [Xenomai-help] Omap3630, rtserial, xeno_16550A: crash on insmod

2012-01-20 Thread Felipe Brandão Cavalcanti
Dear All, Any chance you guys could make a Gumstix Overo image with Xenomai and the RTDM drivers working? I was actually going to start working on this very issue (RTDM drivers for the OMAP) next week, but you seem to have had a head start on that. Many thanks! -Felipe Brandão Cavalcanti

Re: [Xenomai-help] Omap3630, rtserial, xeno_16550A: crash on insmod

2012-01-20 Thread Wolfgang Grandegger
Hi Fabrice and Manfred, On 01/19/2012 06:09 PM, Fabrice Gasnier wrote: > On 18/01/2012 17:32, Wolfgang Grandegger wrote: >>> Further investigation indicates that when writing, tx interrupt is not >>> asserted as expected (rt_16550_write): /* unmask tx interrupt */ ctx->ier_status |= IER

Re: [Xenomai-help] Omap3630, rtserial, xeno_16550A: crash on insmod

2012-01-20 Thread Gilles Chanteperdrix
On 01/20/2012 07:03 PM, Wolfgang Grandegger wrote: > Hi Fabrice and Manfred, > > On 01/19/2012 06:09 PM, Fabrice Gasnier wrote: >> On 18/01/2012 17:32, Wolfgang Grandegger wrote: Further investigation indicates that when writing, tx interrupt is not asserted as expected (rt_16550_write)

Re: [Xenomai-help] Omap3630, rtserial, xeno_16550A: crash on insmod

2012-01-20 Thread Wolfgang Grandegger
On 01/20/2012 07:46 PM, Gilles Chanteperdrix wrote: > On 01/20/2012 07:03 PM, Wolfgang Grandegger wrote: >> Hi Fabrice and Manfred, >> >> On 01/19/2012 06:09 PM, Fabrice Gasnier wrote: >>> On 18/01/2012 17:32, Wolfgang Grandegger wrote: > Further investigation indicates that when writing, tx in

Re: [Xenomai-help] Omap3630, rtserial, xeno_16550A: crash on insmod

2012-01-22 Thread Manfred
On 1/20/12 3:41 PM, Fabrice Gasnier wrote: Dear all, Manfred, Please find interleaved answers/questions. On 20/01/2012 13:03, Manfred wrote: Hi All, I tested the patch on my omap3630 and I ran the cross-link test. It works. I want to thank Fabrice Gasnier from my side. you're welcome. I h

Re: [Xenomai-help] Omap3630, rtserial, xeno_16550A: crash on insmod

2012-01-26 Thread Fabrice Gasnier
Hi all, I've been busy trying to clarify few things discussed here. Please find attached a re-worked patch and comments interleaved here after. Thank you very much for your help! Regards, Fabrice On 20/01/2012 20:04, Wolfgang Grandegger wrote: > On 01/20/2012 07:46 PM, Gilles Chanteperdrix wrote:

Re: [Xenomai-help] Omap3630, rtserial, xeno_16550A: crash on insmod

2012-02-23 Thread Felipe Brandão Cavalcanti
Dear all, On Sun, Jan 22, 2012 at 5:04 PM, Manfred wrote: > > On 1/20/12 3:41 PM, Fabrice Gasnier wrote: > >> Dear all, Manfred, >> >> Please find interleaved answers/questions. >> >> On 20/01/2012 13:03, Manfred wrote: >> >>> Hi All, >>> >>> I tested the patch on my omap3630 and I ran the cross