AnsweredAssumed Answered

Writing to the IPU's CPMEM region

Question asked by Pradeepa Senanayake on Jun 16, 2015
Latest reply on Jun 17, 2015 by Qiang Li - Mpu Se

Hello,

 

I used the following code to write to the CPMEM region of the IPU. But as soon as I reached 'writel' function the O/S hangs. I do not get a kernel panic. But it just hangs there.

 

void imx_fill_cpmem(struct cpmem_word *cpmem, char channel)

{

  int w, d;

  void *addr = (((struct ipu_ch_param *)ioremap(MX6Q_IPU1_ARB_BASE_ADDR + 0x00200000 + 0x00100000 + 0, SZ_128K)) + (channel));

 

  if(addr && cpmem)

  {

  for(w=0; w < 2; w++)

  {

  for(d=0; d < 5; d++)

  {

  pr_alert("%s: Check point *3\n",__func__);

  pr_alert("%s: Address: 0x%p -> Data: 0x%x \n",__func__,addr,cpmem->word[w].data[d]);

 

  writel(cpmem->word[w].data[d], addr);

  addr += 4;

  pr_alert("%s: Check point 4\n",__func__);

 

 

  pr_alert("%s: Word_no: 0x%x -> Data_no: 0x%x \n",__func__,w,d);

  }

 

  addr += 12;

  }

  }

}

 

As soon as the system hangs the following gets printed in the console.

 

imx_fill_cpmem: Check point *3

imx_fill_cpmem: Address: 0xc0b00000 -> Data: 0xf40d8000

 

Can someone let me know what mistake I am doing here?

 

Thank you.

Outcomes