the eim register is :
i want to change the register value, but i can't read or write it wen i ioremap the phy_adr.
i built a mode ,when i insmod it :
#define ADDR_PHY 0x21B8000
void read_phy_addr(int offset)
{
static struct resource *my_mem;
printk("offset = %d\n",offset);
my_mem = request_mem_region(ADDR_PHY + 0x4000 * offset, 0x4000, "testPF");
if (my_mem == NULL) {
printk("failed to get memory region\n");
return -ENOENT;
}
else
printk("phy_addr = %8x\n",ADDR_PHY + 0x4000 * offset);
void __iomem *plx_membase;
plx_membase = ioremap(ADDR_PHY + 0x4000 * offset, 0x4000);
if(NULL == plx_membase){
printk("ioremap error\n");
}
printk("ioremap_addr=%lx\n",(u_long)plx_membase);
printk("print_out: %d\n",readl(plx_membase));
printk("+++++++++++++++++++++\n");
iounmap(plx_membase);
release_mem_region(ADDR_PHY + 0x4000 * offset,0x4000);
}
the result is:
the program deadlock.
i have tried other phy_addr.
some can read the value ,and some can't.
0200_0000
6000_0000
0C00_0000
they can be read the value.
1000_0000
5800_0000
can't.
the board information :
CPU: Freescale i.MX6UL rev1.0 at 396 MHz
CPU: Temperature 40 C
Reset cause: POR
Board: MX6UL 14x14 EVK
I2C: ready
DRAM: 512 MiB
已解决! 转到解答。
Hi Yi
please check that CCM register CCM_CCGR6
enables clock (eim_slow clocks) for EIM module.
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Yi
please check that CCM register CCM_CCGR6
enables clock (eim_slow clocks) for EIM module.
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi igorpadykov
thanks for you help,i read the CCM_CCGR6,found the eim_slow clocks bit is disable.
i can read and write the weim register after enable the clocks.
thanks again for you help!
Best regards
lyi