* omap 5912 serial driver
@ 2006-01-13 14:44 vikas gupta
2006-01-14 0:43 ` Tony Lindgren
0 siblings, 1 reply; 4+ messages in thread
From: vikas gupta @ 2006-01-13 14:44 UTC (permalink / raw)
To: linux-omap-open-source
hi all
i am a naive user trying his hands on arm osk omap5912 board
Well i wanted to know whether it is possible to test serial port on omap
board by using inb/outb instruction as can be done in x86 platform...
If it is possible then can u please suggest me a working example of one test
case doing this thing..
I have tried my hands in it but wothout success on x86 platform below
mention program is working fine but on arm board it's not working so can
anyone help me ???
Sorry, if the question seems naive as this is my initial attempt :)
test program
=============
include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/io.h>
#define base 0x378
#define value 255
main(int argc, char **argv)
{
int value1;
if (ioperm(base,1,1))
fprintf(stderr, "Couldn't get the port at %x\n", base), exit(1);
outb(value, base);
value1 = inb(base);
printf("value written is %d \n",value1);
}
vikas
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: omap 5912 serial driver
2006-01-13 14:44 omap 5912 serial driver vikas gupta
@ 2006-01-14 0:43 ` Tony Lindgren
2006-01-16 3:41 ` vikas gupta
0 siblings, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2006-01-14 0:43 UTC (permalink / raw)
To: vikas gupta; +Cc: linux-omap-open-source
* vikas gupta <vikas.iet@gmail.com> [060113 06:50]:
> hi all
>
>
>
> i am a naive user trying his hands on arm osk omap5912 board
>
>
>
> Well i wanted to know whether it is possible to test serial port on omap
> board by using inb/outb instruction as can be done in x86 platform...
>
> If it is possible then can u please suggest me a working example of one test
> case doing this thing..
>
> I have tried my hands in it but wothout success on x86 platform below
> mention program is working fine but on arm board it's not working so can
> anyone help me ???
>
>
>
> Sorry, if the question seems naive as this is my initial attempt :)
>
>
>
> test program
>
> =============
>
>
>
> include <stdio.h>
>
> #include <stdlib.h>
>
> #include <unistd.h>
>
> #include <sys/io.h>
>
>
>
> #define base 0x378
>
> #define value 255
>
>
>
> main(int argc, char **argv)
>
> {
>
> int value1;
>
> if (ioperm(base,1,1))
>
> fprintf(stderr, "Couldn't get the port at %x\n", base), exit(1);
>
>
>
> outb(value, base);
>
> value1 = inb(base);
>
> printf("value written is %d \n",value1);
>
> }
It won't quite work as the IO address is different. Also inb/outb are
mapped to __raw_readb/__raw_writeb.
See these files:
include/asm-arm/io.h
include/asm-arm/arch-omap/io.h
Tony
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: omap 5912 serial driver
2006-01-14 0:43 ` Tony Lindgren
@ 2006-01-16 3:41 ` vikas gupta
2006-01-16 18:44 ` Tony Lindgren
0 siblings, 1 reply; 4+ messages in thread
From: vikas gupta @ 2006-01-16 3:41 UTC (permalink / raw)
To: Tony Lindgren; +Cc: linux-omap-open-source
So can you suggest me how i can test my serial driver
i need to check the functionality of inb/outb
Can any one provide some pointer on it
On 1/14/06, Tony Lindgren <tony@atomide.com> wrote:
>
> * vikas gupta <vikas.iet@gmail.com> [060113 06:50]:
> > hi all
> >
> >
> >
> > i am a naive user trying his hands on arm osk omap5912 board
> >
> >
> >
> > Well i wanted to know whether it is possible to test serial port on omap
> > board by using inb/outb instruction as can be done in x86 platform...
> >
> > If it is possible then can u please suggest me a working example of one
> test
> > case doing this thing..
> >
> > I have tried my hands in it but wothout success on x86 platform below
> > mention program is working fine but on arm board it's not working so can
> > anyone help me ???
> >
> >
> >
> > Sorry, if the question seems naive as this is my initial attempt :)
> >
> >
> >
> > test program
> >
> > =============
> >
> >
> >
> > include <stdio.h>
> >
> > #include <stdlib.h>
> >
> > #include <unistd.h>
> >
> > #include <sys/io.h>
> >
> >
> >
> > #define base 0x378
> >
> > #define value 255
> >
> >
> >
> > main(int argc, char **argv)
> >
> > {
> >
> > int value1;
> >
> > if (ioperm(base,1,1))
> >
> > fprintf(stderr, "Couldn't get the port at %x\n", base), exit(1);
> >
> >
> >
> > outb(value, base);
> >
> > value1 = inb(base);
> >
> > printf("value written is %d \n",value1);
> >
> > }
>
> It won't quite work as the IO address is different. Also inb/outb are
> mapped to __raw_readb/__raw_writeb.
>
> See these files:
>
> include/asm-arm/io.h
> include/asm-arm/arch-omap/io.h
>
> Tony
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-01-16 18:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-13 14:44 omap 5912 serial driver vikas gupta
2006-01-14 0:43 ` Tony Lindgren
2006-01-16 3:41 ` vikas gupta
2006-01-16 18:44 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox