static int my_ioctl(struct file *filp, unsigned int reg_num, unsigned long arg){ if(reg_num>=0&®_num<=8) {iowrite32(arg,aes_slave_reg0_addr+reg_num*4);
prink("write0x% xto0x% x!\n",arg,aes_slave_reg0_addr+reg_num*4);}
else prink("wrong reg num"); return 0; }
static ssize_t my_write(struct file* filp, const char *data,size_t count,loff_t *offp){ return ioread(aes_slave_reg0_addr+count*4); }