* omap irda problem
@ 2006-09-06 14:21 Zgembo Adislic
2006-09-06 18:01 ` andrzej zaborowski
0 siblings, 1 reply; 8+ messages in thread
From: Zgembo Adislic @ 2006-09-06 14:21 UTC (permalink / raw)
To: linux-omap-open-source
Hello all,
I am using omap5910 and kernel 2.6.8.1. I am supposed to make IrDa operational so I can communicate with other devices (for example: desktop PC using some terminal emulation program).
Is there any open sorce avaible for that? Could anyone give some advice how to start dealing with this issue (I am beginning from zero)
Thanx :-)
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: omap irda problem
2006-09-06 14:21 omap irda problem Zgembo Adislic
@ 2006-09-06 18:01 ` andrzej zaborowski
2006-09-19 2:57 ` informaton about gpio of omap w.b.b
0 siblings, 1 reply; 8+ messages in thread
From: andrzej zaborowski @ 2006-09-06 18:01 UTC (permalink / raw)
To: Zgembo Adislic; +Cc: linux-omap-open-source
[-- Attachment #1: Type: text/plain, Size: 3714 bytes --]
Hi,
On 06/09/06, Zgembo Adislic <adislic_zgembo@yahoo.com> wrote:
> Hello all,
> I am using omap5910 and kernel 2.6.8.1. I am supposed to make IrDa operational so I can communicate with other devices (for example: desktop PC using some terminal emulation program).
> Is there any open sorce avaible for that? Could anyone give some advice how to start dealing with this issue (I am beginning from zero)
There's the OMAP IrDA driver in drivers/net/irda/omap-ir.c that
supports 16xx and some other CPUs, but not any of 15xx out of the box.
I don't know if it's as old as 2.6.8.1 but you'll probably want to
upgrade your tree anyway if you want to start modifying it.
Now I have a OMAP 311 (which is 15xx) and I have been playing with
this driver and I eventually got it to work (or it seems like it),
with a couple of rather simple changes so it's possible that it will
also work on your processor. Here are the main changes I had to make
in omap-ir.c (writing from memory, I don't have the code here):
1) In the irq handler the driver accesses a DMA register directly to
check how many bytes were received. The register is called something
like CPDC and it turns out that 15xx have a different register at this
address so wrong data is returned. This is because 15xx has only one
CPC register per channel and 16xx and the other CPUs have separate
registers for source addresses and destination addresses called CPSC
and CPDC respectively (or similar). So, either change the irda driver
to use CPSC, cause 15xx's CPC has the same offset, or better add
proper register names for 15xx in include/asm/arch/dma.h and use
these. (The 15xx and 16xx DMAs also differ in other places which
causes many accesses to non-existent registers in dma.c. I have
patches for this)
Another idea is to use the IrDA (UART3) registers to retrieve last
frame length instead of DMA registers.
2) It seems that the DMA receives always (frame length + 1) bytes
instead of (frame length + 2) on my device so replace the "w - 2" with
"w - 1" in the driver. However, this is strange because the
documentation says that two bytes of CRC are written in the buffer
with each frame.
3) I don't receive the TX Underrun interrupt, so I placed the
netif_queue_wake() call in the TX dma callback. This, however, makes
the driver start sending some frames too early and they overwrite
endings of previous frames, at high traffic. I prevent it by polling
the registers until the TX fifo drains, maybe I can find a better way
later.
4) The driver leaves the OSC_12M_SEL register untouched so I zero it
at init. You can skip this if you're sure that no other OS was running
before Linux after machine reset. Or set OSC_12M_SEL and divide baud
rate appropriately.
I also changed the driver to use the clk_* api instead of writing to
clock registers.
I can't show you any code because I'm away from my computer (call it
holidays...). I didn't manage to get irlan/ircomm/obex to work but
it's likely that my other device was responsible, to which I was
trying to connect. I just don't know which end is more broken now.
Maybe it was an irda-utils version mismatch or something.
I tested rx and tx with some generated frames and they were usually
transmitted correctly. I hacked up a fake tty driver on top of
omap-ir.c and it works for a remote console.
Hope this helps.
>
> Thanx :-)
>
>
> ---------------------------------
> Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.
> _______________________________________________
> Linux-omap-open-source mailing list
> Linux-omap-open-source@linux.omap.com
> http://linux.omap.com/mailman/listinfo/linux-omap-open-source
>
--
balrog 2oo6
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* informaton about gpio of omap
2006-09-06 18:01 ` andrzej zaborowski
@ 2006-09-19 2:57 ` w.b.b
2006-09-19 8:52 ` problem about io.h file!!!! w.b.b
2006-09-19 8:54 ` Is there wrong with the file :io.h???????? w.b.b
0 siblings, 2 replies; 8+ messages in thread
From: w.b.b @ 2006-09-19 2:57 UTC (permalink / raw)
To: linux-omap-open-source
[-- Attachment #1: Type: text/plain, Size: 270 bytes --]
hi:
i'd ever met with problems of omap's gpio.it'd confused me. but i find some
useful information about it now.
it 'll be helpful for fresh man as me!
http://tree.celinuxforum.org/CelfPubWiki/OSK . in the homepage,you can find information about gpio.
good luck
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* problem about io.h file!!!!
2006-09-19 2:57 ` informaton about gpio of omap w.b.b
@ 2006-09-19 8:52 ` w.b.b
2006-09-19 9:09 ` Stefano Babic
2006-09-19 8:54 ` Is there wrong with the file :io.h???????? w.b.b
1 sibling, 1 reply; 8+ messages in thread
From: w.b.b @ 2006-09-19 8:52 UTC (permalink / raw)
To: linux-omap-open-source
[-- Attachment #1: Type: text/plain, Size: 785 bytes --]
hi:
i 'd written a simeple program.and i'd found some questions about io.h.
the following code is:
that:
#include<asm/arch/gpio.h>
main()
{
omap_request_gpio(3);
omap_set_gpio_direction(3,1);
}
compile command :
arm-linux-gcc -I linux-2.6.13.4/include -c main.c
and then i got the following error information:
linux-2.6.13.4/include/asm/arch/io.h:91 error:parse error before "offset"
linux-2.6.13.4/include/asm/arch/io.h:97 error:parse error before "offset"
linux-2.6.13.4/include/asm/arch/io.h:102 error:parse error before "offset".
the toolchains which i used is gcc-3.4.1 for omap 5912,and the kernel is linux-2.6.13.4 for osk.
Is the file wrong? i'm not sure about it!!!!!!!
who has interest in it? i hope to get your help.
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Is there wrong with the file :io.h????????
2006-09-19 2:57 ` informaton about gpio of omap w.b.b
2006-09-19 8:52 ` problem about io.h file!!!! w.b.b
@ 2006-09-19 8:54 ` w.b.b
2006-09-19 9:28 ` w.b.b
1 sibling, 1 reply; 8+ messages in thread
From: w.b.b @ 2006-09-19 8:54 UTC (permalink / raw)
To: Linux-omap-open-source
[-- Attachment #1: Type: text/plain, Size: 880 bytes --]
hi:
i 'd written a simeple program.and i'd found some questions about io.h.
the following code is:
that:
#include<asm/arch/gpio.h>
main()
{
omap_request_gpio(3);
omap_set_gpio_direction(3,1);
}
compile command :
arm-linux-gcc -I linux-2.6.13.4/include -c main.c
and then i got the following error information:
linux-2.6.13.4/include/asm/arch/io.h:91 error:parse error before "offset"
linux-2.6.13.4/include/asm/arch/io.h:97 error:parse error before "offset"
linux-2.6.13.4/include/asm/arch/io.h:102 error:parse error before "offset".
the toolchains which i used is gcc-3.4.1 for omap 5912,and the kernel is linux-2.6.13.4 for osk.
Is the file wrong? i'm not sure about it!!!!!!!
who has interest in it? i hope to get your help.
> Linux-omap-open-source@linux.omap.com
> http://linux.omap.com/mailman/listinfo/linux-omap-open-source
>
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: problem about io.h file!!!!
2006-09-19 8:52 ` problem about io.h file!!!! w.b.b
@ 2006-09-19 9:09 ` Stefano Babic
0 siblings, 0 replies; 8+ messages in thread
From: Stefano Babic @ 2006-09-19 9:09 UTC (permalink / raw)
To: linux-omap-open-source
On Tuesday 19 September 2006 10:52, w.b.b wrote:
> that:
> #include<asm/arch/gpio.h>
> main()
> {
> omap_request_gpio(3);
> omap_set_gpio_direction(3,1);
> }
You cannot call these functions in user space. They are available only in
kernel. Write a simple char driver to use them.
stefano
--
stefano <stefano.babic@babic.homelinux.org>
GPG Key: 0x55814DDE
Fingerprint 4E85 2A66 4CBA 497A 2A7B D3BF 5973 F216 5581 4DDE
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Is there wrong with the file :io.h????????
2006-09-19 8:54 ` Is there wrong with the file :io.h???????? w.b.b
@ 2006-09-19 9:28 ` w.b.b
2006-09-19 10:56 ` Arnold
0 siblings, 1 reply; 8+ messages in thread
From: w.b.b @ 2006-09-19 9:28 UTC (permalink / raw)
To: Linux-omap-open-source
[-- Attachment #1: Type: text/plain, Size: 1673 bytes --]
i had found the way to avoid the error. modify the file asm/arch/io.h.
to change the data types ,such as u8,u16,u32 with uint8_t,uint16_t,uint32_t.
then there is no error when you compile that file.
i think there is a little bug in the io.h!!!
----- Original Message -----
From: "w.b.b" <rememberme_2000@126.com>
To: <Linux-omap-open-source@linux.omap.com>
Sent: Tuesday, September 19, 2006 4:54 PM
Subject: Is there wrong with the file :io.h????????
> hi:
> i 'd written a simeple program.and i'd found some questions about io.h.
> the following code is:
> that:
> #include<asm/arch/gpio.h>
> main()
> {
> omap_request_gpio(3);
> omap_set_gpio_direction(3,1);
> }
> compile command :
> arm-linux-gcc -I linux-2.6.13.4/include -c main.c
> and then i got the following error information:
> linux-2.6.13.4/include/asm/arch/io.h:91 error:parse error before "offset"
> linux-2.6.13.4/include/asm/arch/io.h:97 error:parse error before "offset"
> linux-2.6.13.4/include/asm/arch/io.h:102 error:parse error before "offset".
> the toolchains which i used is gcc-3.4.1 for omap 5912,and the kernel is linux-2.6.13.4 for osk.
> Is the file wrong? i'm not sure about it!!!!!!!
> who has interest in it? i hope to get your help.
>> Linux-omap-open-source@linux.omap.com
>> http://linux.omap.com/mailman/listinfo/linux-omap-open-source
>>
--------------------------------------------------------------------------------
> _______________________________________________
> Linux-omap-open-source mailing list
> Linux-omap-open-source@linux.omap.com
> http://linux.omap.com/mailman/listinfo/linux-omap-open-source
>
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Is there wrong with the file :io.h????????
2006-09-19 9:28 ` w.b.b
@ 2006-09-19 10:56 ` Arnold
0 siblings, 0 replies; 8+ messages in thread
From: Arnold @ 2006-09-19 10:56 UTC (permalink / raw)
To: w.b.b, Linux-omap-open-source
Hi,
I think you need to create a char driver in order to
use the GPIO APIs. In this way you can already control
GPIO in the userspace through your char driver. There
are many linux device driver books that you could
refer to make a char driver.
Best Regards,
OJ
--- "w.b.b" <rememberme_2000@126.com> wrote:
> i had found the way to avoid the error. modify the
> file asm/arch/io.h.
> to change the data types ,such as u8,u16,u32 with
> uint8_t,uint16_t,uint32_t.
> then there is no error when you compile that file.
> i think there is a little bug in the io.h!!!
>
> ----- Original Message -----
> From: "w.b.b" <rememberme_2000@126.com>
> To: <Linux-omap-open-source@linux.omap.com>
> Sent: Tuesday, September 19, 2006 4:54 PM
> Subject: Is there wrong with the file :io.h????????
>
>
> > hi:
> > i 'd written a simeple program.and i'd found some
> questions about io.h.
> > the following code is:
> > that:
> > #include<asm/arch/gpio.h>
> > main()
> > {
> > omap_request_gpio(3);
> > omap_set_gpio_direction(3,1);
> > }
> > compile command :
> > arm-linux-gcc -I linux-2.6.13.4/include -c main.c
> > and then i got the following error information:
> > linux-2.6.13.4/include/asm/arch/io.h:91
> error:parse error before "offset"
> > linux-2.6.13.4/include/asm/arch/io.h:97
> error:parse error before "offset"
> > linux-2.6.13.4/include/asm/arch/io.h:102
> error:parse error before "offset".
> > the toolchains which i used is gcc-3.4.1 for omap
> 5912,and the kernel is linux-2.6.13.4 for osk.
> > Is the file wrong? i'm not sure about it!!!!!!!
> > who has interest in it? i hope to get
> your help.
> >> Linux-omap-open-source@linux.omap.com
> >>
>
http://linux.omap.com/mailman/listinfo/linux-omap-open-source
> >>
>
>
>
--------------------------------------------------------------------------------
>
>
> > _______________________________________________
> > Linux-omap-open-source mailing list
> > Linux-omap-open-source@linux.omap.com
> >
>
http://linux.omap.com/mailman/listinfo/linux-omap-open-source
> >> _______________________________________________
> Linux-omap-open-source mailing list
> Linux-omap-open-source@linux.omap.com
>
http://linux.omap.com/mailman/listinfo/linux-omap-open-source
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-09-19 10:56 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-06 14:21 omap irda problem Zgembo Adislic
2006-09-06 18:01 ` andrzej zaborowski
2006-09-19 2:57 ` informaton about gpio of omap w.b.b
2006-09-19 8:52 ` problem about io.h file!!!! w.b.b
2006-09-19 9:09 ` Stefano Babic
2006-09-19 8:54 ` Is there wrong with the file :io.h???????? w.b.b
2006-09-19 9:28 ` w.b.b
2006-09-19 10:56 ` Arnold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox