Accessing SRAM

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

Accessing SRAM

2,749 Views
rans
Senior Contributor I

Hello,

I try to understand how to access SRAM with imx6.

I've seen previous post about accessing SRAM but it seems to deal only with how to define it in dts, not how to test its access

i.mx28 on-chip SRAM 

I would like to ask:

1. Using other socs, it usually requires no specific driver, but it is a plain access to memory space. Is it really required to define it in dts in order to access the memory ? Is it required even if the access is only from userspace not kernel.

2. How do we test access to SRAM, is it by accessing the physical memory (using mmap or /dev/mem for example ) ?

Thank you,

ranran

0 Kudos
1 Reply

1,245 Views
igorpadykov
NXP Employee
NXP Employee

Hi ranran

sram (ocram module) is defined in dts file since this is separate module requiring

some configuartion (for example enabling clocks) as

        ocram: sram@00905000 {
            compatible = "mmio-sram";
            reg = <0x00905000 0x3B000>;
            clocks = <&clks IMX6QDL_CLK_OCRAM>;
        };

linux-imx.git - i.MX Linux Kernel 

seems one can use memtool for accessing memory, in the same manner as to ddr,

examples of usage can be found in

i.MX6Q PCIe EP/RC Validation System 

for dev/mem usage one can look on

i.MX5x device register access - Boundary Devices 

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

0 Kudos