ts-7000
[Top] [All Lists]

Re: [ts-7000] ioremap() example

To:
Subject: Re: [ts-7000] ioremap() example
From: Curtis Monroe <>
Date: Mon, 18 Apr 2005 15:38:41 -0400
What's your error number?
Some code to help find the error message follows:


int fd;
        uint32_t* base;
        
        fd=open("/dev/mem", O_RDWR);
        if(fd == -1)
        {
                fprintf(stderr, "mmap returned error: %s\n", strerror(errno));
        }
        assert(fd != -1);

        base = (uint32_t*)mmap(0, getpagesize(), PROT_READ|PROT_WRITE,
MAP_SHARED, fd, offset);
        if(base == MAP_FAILED)
        {
                fprintf(stderr, "mmap() returned error: %s\n", strerror(errno));
        }




On Mon, 2005-04-18 at 14:45, Scott Swanson wrote:
> 
> I am porting an x86 Linux driver to ARM Linux for the TS-7250.  The
> device is a PC/104 synchronous serial interface.
> 
> I am able to read the device registers from a user-mode application by
> opening /dev/mem and calling mmap().  I am failing when I use
> ioremap_nocache() in the loadable module code to access the ISA 8-bit
> I/O ports using the existing inb() and outb() calls.
> 
> Can someone point to a loadable module in the TS-7200 kernel source
> that correctly accesses I/O ports on the ISA (PC/104) bus?
> 
> Thanks in advance,
> 
> Scott
> 
> 
> 
> 
> 
> 
> 
> 
> ______________________________________________________________________
> Yahoo! Groups Links
>       * To visit your group on the web, go to:
>         http://groups.yahoo.com/group/ts-7000/
>           
>       * To unsubscribe from this group, send an email to:
>         
>           
>       * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>         Service.
> 



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU