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/
|