I am trying to access the McASP control registers. Reading from the first 
one fails with the  kernel oops stating "external abort on non-linefetch 
(0x1028)". I dont know what that means. A minimum failing example of the 
code is below:

#include <linux/module.h>
#include <linux/printk.h>
#include <asm/io.h>

#define MCASP_START 0x48038000
#define MCASP_LENGTH    0x2000
#define PFUNC_REG_OFFSET 0x10

static int start(void)
{
   pr_info("Calling for ioremap\n");
   void *mcasp = ioremap(MCASP_START, MCASP_LENGTH);
   if(mcasp == NULL) {
      pr_info("ioremap failed!\n");
      return -1;
   }

   u32 pfunc_reg = ioread32(mcasp + PFUNC_REG_OFFSET); // Kernel Oops here!
   pr_info("Success! PFUNC=%08X\n", test);
   iounmap(mcasp);
   return 0;
}
module_init(start);

I have also tried request_mem_region around it, but that changes nothing. 
The sound drivers are not loaded, and the devicetree entry for the McASP is 
disabled, so there shouldn't be any problems with conflicts.

Any help is greatly appreciated.
Marc

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to