Interrupt problem

prashant sangal <[email protected]>
Newsgroups gmane.linux.ports.arm.general
Message-ID <[email protected]>
Hello, 

I am working on AT91SAM9260 based board. The board is running linux. Using mmap, i can access GPIOs. 
I have been trying to access Interrupt controller through mmap, but failed. 
Is it possible to access Interrupt controller of processor using mmap? what may be alternate way without digging deep into kernel?

Also, I need a better understanding of how linux manages addressing of peripherals? For GPIOs, I am using a sample code as basis of my application. this sample code has been provided by the board manufacturer. The code snippets are as followed:

----
----
#define  AT_BASE     0xFFFFF000
--
---
static void *piobase;
static unsigned int* base;
---
---
int main()
{
    static int fd, pagesize;
    int pattern;    
    pagesize = getpagesize();
    fd = open("/dev/mem", O_RDWR);
    piobase = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, AT_BASE);
    base = (unsigned int *) piobase + 0x100;
--------
---------

}

Here i am unable to undersatnd the reason of choosing 0xFFFFF000 as AT_BASE, because as per the memory map of AT91SAM960, this particular location is assigned to Advanced Interrupt Controller. 

With Best Regards, 
Prashant 



      Yahoo! recommends that you upgrade to the new and safer Internet Explorer 8. http://downloads.yahoo.com/in/internetexplorer/
-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.