AnsweredAssumed Answered

I.MX35 IIM SCS register

Question asked by Max van Kessel on Sep 17, 2013
Latest reply on Oct 14, 2013 by Max van Kessel

I'm trying to read a byte from register IIMSCS2,

But every time I try the kernel get stuck.

Other registers like IIMSREV are readable but I can't read IIMSCS0  to IIMSCS3

 

I'm using Linux 3.2 on a I.MX35 and some hardware bits are signed in this register.

 

Code:

u8 rev = (__raw_readb(MX35_IO_ADDRESS(MX35_IIM_BASE_ADDR + MXC_IIMSCS2))) & 0x7F;

 

I got a succesfull result in previous kernel 2.6.28 and 2.6.31.

With this code:

  unsigned char *iim_base;

  unsigned char  reg;

 

  iim_base = ioremap(IIM_BASE_ADDR, SZ_4K);

  reg = *(iim_base + IIM_SCS2_OFFSET);

  iounmap(iim_base);

 

  u8 rev = reg & IIM_SCS_DATA_MASK; // 0x7F

 

Also this piece of code ain't working for kernel 3.2

 

Can someone explain this?

Outcomes