Hello everybody.Now I am working on the SEED OMAPL137 evm board.
I met a problem when seting the registers. I wrote a driver for setting registers through ioctl(), PINMUX13 for instance ( the PINMUX13 is related to EMA_D):
static int reg_set(unsigned int reg, unsigned int value)
{
void __iomem *regVirt = ioremap(reg, sizeof(reg));
iowrite32(value, regVirt);
iounmap(regVirt);
return 0;
}
......
static int setreg_ioctl (struct inode *inode,
struct file *filp,
unsigned int cmd,
unsigned long param)
{
reg_set(cmd, param);
return 1;
}
Tests to this driver were correct and the value of chosen register changed. However, after setting the register, the console is crashed and there was no response when pressing any keys. The console occupied UART2 and I was sure UART2 related registers were not changed.
So I wanna to know what is wrong with my code and how to set the registers?