How to remapped WEIM CS address space in Linux

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to remapped WEIM CS address space in Linux

Jump to solution
1,064 Views
hengyewlim
Contributor III

Hi,

I have a problem trying to remap WEIM CS physical address to virtual address in Linux 3.14.52.1.1.0.

I am using CS1 and split the WEIM address space to 32MB block each.

I tried using the IMX_IO_P2V(0x52000000) that remapped to 0xF9200000 and got a segmentation fault when trying to read it.

Do I need to setup the device tree in order to access this memory space.

I was able to access this memory space correctly in u-boot using the physical address.

HengYew

Labels (2)
0 Kudos
1 Solution
851 Views
hengyewlim
Contributor III

I found a solution which is to add mapping the CS1 region in pm-imx6.c similar to CCM/Anatop region.

View solution in original post

0 Kudos
3 Replies
851 Views
igorpadykov
NXP Employee
NXP Employee

Hi Heng

eim remapping in device tree is described in linux/Docimentation/..imx-weim.txt

linux-2.6-imx.git - Freescale i.MX Linux Tree

example with weim usage can be found in imx6qdl-sabreauto.dtsi

linux-2.6-imx.git - Freescale i.MX Linux Tree

Best regards

igor

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

Note: If this post answers your question, please click the Correct Answer button. Thank you!

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

0 Kudos
851 Views
hengyewlim
Contributor III

Igor,

I managed to use of_iomap to remapped to virtual address but was thinking whether it can be done using #define IMX_IO_P2V because it will be called from different modules.

HengYew

0 Kudos
852 Views
hengyewlim
Contributor III

I found a solution which is to add mapping the CS1 region in pm-imx6.c similar to CCM/Anatop region.

0 Kudos