> In addition, in the address range 0x30000000-0x300000FF, I have a CPLD > mapped. > > Now, I wish to access the registers of this CPLD. For this, I create a > module and insert it into the kernel. Now, in my 'init_module' function, I > map the address range 0x30000000-0x300000FF to cpld_mem: > > But when I execute this program on the target, it crashes after displaying > "Writing to CPLD". Sometimes it says 'Bus error' and some other times I get > a 'Kernel panic' message and the system reboots. >
If you are getting 'bus error' it sounds like the memory controller is not set up [correctly] for this address. Do you know if the bootloader is configuring the CPLD chip select correctly?