From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Subject: Re: omap 5912 serial driver Date: Fri, 13 Jan 2006 16:43:42 -0800 Message-ID: <20060114004342.GK5499@atomide.com> References: <9cba36250601130644t2554c420x78373804a51a2949@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <9cba36250601130644t2554c420x78373804a51a2949@mail.gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-omap-open-source-bounces@linux.omap.com Errors-To: linux-omap-open-source-bounces@linux.omap.com To: vikas gupta Cc: linux-omap-open-source@linux.omap.com List-Id: linux-omap@vger.kernel.org * vikas gupta [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 > > #include > > #include > > #include > > > > #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