imx6ul:help,i can't read or write the weim register

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

imx6ul:help,i can't read or write the weim register

ソリューションへジャンプ
1,499件の閲覧回数
半醒的狐狸
Contributor I

the eim register is :

eim register.png

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:

卡死.png

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

ラベル(2)
0 件の賞賛
返信
1 解決策
962件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

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!

-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
963件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

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!

-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信
962件の閲覧回数
半醒的狐狸
Contributor I

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

0 件の賞賛
返信