omap 5912 serial driver

vikas gupta
2006-01-13T14:44:33Z

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