<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: i.mx28 on-chip SRAM in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-mx28-on-chip-SRAM/m-p/377305#M54147</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ran,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The example I pointed out is for the kernel to use the internal RAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fabio Estevam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 20 Jan 2018 21:01:28 GMT</pubDate>
    <dc:creator>fabio_estevam</dc:creator>
    <dc:date>2018-01-20T21:01:28Z</dc:date>
    <item>
      <title>i.mx28 on-chip SRAM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-mx28-on-chip-SRAM/m-p/377296#M54138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking for a way to use the 128 KB on-chip SRAM from our Linux platform (mainline 3.10.x). In the reference manual, I see that the SRAM is part of the DIGCTL block and in the DeviceTree I see a digctl@8001c000 part. But I have no idea how to enable this and how I would be able to use this part of memory, preferably from user-space. Can anyone help me in the right direction?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ruud &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2014 13:49:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-mx28-on-chip-SRAM/m-p/377296#M54138</guid>
      <dc:creator>slay</dc:creator>
      <dc:date>2014-11-04T13:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: i.mx28 on-chip SRAM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-mx28-on-chip-SRAM/m-p/377297#M54139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the generic SRAM allocator: drivers/misc/sram.c&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Search for "mmio-sram" inside arch/arm/boot/dts for examples of its usage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As an example (from imx6q.dtis):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;soc {&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt; ocram: sram@00900000 {&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt; compatible = "mmio-sram";&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt; reg = &amp;lt;0x00900000 0x40000&amp;gt;;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt; clocks = &amp;lt;&amp;amp;clks IMX6QDL_CLK_OCRAM&amp;gt;;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt; };&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2014 16:02:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-mx28-on-chip-SRAM/m-p/377297#M54139</guid>
      <dc:creator>fabio_estevam</dc:creator>
      <dc:date>2014-11-04T16:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: i.mx28 on-chip SRAM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-mx28-on-chip-SRAM/m-p/377298#M54140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fabio, thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I looked for this dts code, but it seems that the example code is from a newer kernel version. If I look at the documentation for 3.10 (sram.txt), I see an example like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sram: sram@5c000000 {&lt;/P&gt;&lt;P&gt;&amp;nbsp; compatible = "mmio-sram";&lt;/P&gt;&lt;P&gt;&amp;nbsp; reg = &amp;lt;0x5c000000 0x40000&amp;gt;; /* 256 KiB SRAM at address 0x5c000000 */&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to adjust this to the i.mx28 address range &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;and enabled the CONFIG_SRAM in the kernel, but sofar no luck. So I have another few questions:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Should the part in the dtsi be called sram or ocram for the 3.10 kernel version?&lt;/LI&gt;&lt;LI&gt;For the address range: should this be addressed from 0x00000000 (ocram in memory map) or should it refer to the DIGCTL part?&lt;/LI&gt;&lt;LI&gt;Shouldn't there be some reference to a freescale driver, like "fsl,imx-ocram"?&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;If it does succeed, should there be some /dev/sram device that can be accessed from user space?&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your answers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 12:17:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-mx28-on-chip-SRAM/m-p/377298#M54140</guid>
      <dc:creator>slay</dc:creator>
      <dc:date>2014-11-05T12:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: i.mx28 on-chip SRAM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-mx28-on-chip-SRAM/m-p/377299#M54141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. The compatible string is 'mmio-sram'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2; From 0x0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. No, the allocation of SRM memory is a generic operation handled by a generic driver, so nothing FSL specific here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. The use cases I saw was SRAM to be accessed by kernel drivers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2014 13:28:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-mx28-on-chip-SRAM/m-p/377299#M54141</guid>
      <dc:creator>fabio_estevam</dc:creator>
      <dc:date>2014-11-05T13:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: i.mx28 on-chip SRAM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-mx28-on-chip-SRAM/m-p/377300#M54142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, not sure if this would be the right solution for me then.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I am trying to achieve, is to use a block of RAM from user-space as "persistent RAM". In other words: RAM that keeps its contents over a reboot.&lt;/P&gt;&lt;P&gt;I noticed the PRAMFS, but that is not part of the mainline kernel and I am not to sure about the status of this part. Therefore I thought to use the internal SRAM for this purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did some new attempts this week by using the "mmap" function, and it seems to me that it is working. By using mmap with a 4K (pagesize) aligned value for the offset in the SRAM area and a file descriptor to /dev/mem, I am able to read and write from this part of RAM. In the i.mx28 reference manual, chapter 12.4, I read that this RAM is also used by the ROM boot code. And I noticed after reboot, that this contents is indeed overwritten, for instance at address 0 or 0x10000. However, when using the reserved area from 0xF000 - 0xFFFF, the test contents I wrote to it was still there after reboot. So I seem to have achieved what I wanted, but I'm not sure if this is indeed a proper solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Is it correct that I do not need to enable or configure anything for this SRAM before using it?&amp;nbsp; (probably already enabled by the boot part??)&lt;/LI&gt;&lt;LI&gt;Can I rely on it that this 4KB reserved area (as well as the 6 KB one) can indeed be used for user storage and the contents will not be overwritten or initialized by other parts?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ruud&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 10:28:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-mx28-on-chip-SRAM/m-p/377300#M54142</guid>
      <dc:creator>slay</dc:creator>
      <dc:date>2014-11-13T10:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: i.mx28 on-chip SRAM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-mx28-on-chip-SRAM/m-p/377301#M54143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, I did some further testing and it appeared to be that only the 1st 1K of the 0xF000 - 0xFFFF area was preserved at reboot. The contents of the upper 3K was overwritten. So I did a 2nd attempt on the reserved 6K area form 0x1A800 - 0x1BFFF. Since 1A800 is not a 4K aligned address, I only used the 4K part from 0x1B000 - 0x1BFFF. And for this block the contents does seem to be preserved at reboot (writing 00-FF repeatedly to the whole 4K block and dump the contents after reboot).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, again, I think to have found a solution for my problem, but the question about reliability is still open. If anyone from Freescale could answer this question, I would be more than happy. Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ruud&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Nov 2014 15:08:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-mx28-on-chip-SRAM/m-p/377301#M54143</guid>
      <dc:creator>slay</dc:creator>
      <dc:date>2014-11-26T15:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: i.mx28 on-chip SRAM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-mx28-on-chip-SRAM/m-p/377302#M54144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ruud,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it's been while, but maybe you want to share the additions to the device tree you used and how did you did the tests?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Jörg Krause&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 13:29:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-mx28-on-chip-SRAM/m-p/377302#M54144</guid>
      <dc:creator>jörg_krause</dc:creator>
      <dc:date>2016-03-23T13:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: i.mx28 on-chip SRAM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-mx28-on-chip-SRAM/m-p/377303#M54145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay, this wasn't to hard:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ocram: ocram@00000000 {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; compatible = "mmio-sram";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reg = &amp;lt;0x00000000 0x20000&amp;gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Mar 2016 10:23:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-mx28-on-chip-SRAM/m-p/377303#M54145</guid>
      <dc:creator>jörg_krause</dc:creator>
      <dc:date>2016-03-24T10:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: i.mx28 on-chip SRAM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-mx28-on-chip-SRAM/m-p/377304#M54146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Fabio,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand that a part from adding in device tree, the "mmio-sram" compatibility, in order to access sram from userspace we need to use "/dev/mem"&lt;/P&gt;&lt;P&gt;It raise 2 questions:&lt;/P&gt;&lt;P&gt;1. Is it that /dev/mem can't access sram without adding "mmio-sram" section in device tree&amp;nbsp; ? I mean, if sram is a plain ram, does it really need a driver or will it work even without it ?&lt;/P&gt;&lt;P&gt;2. /dev/mem required root privilidege. Is there any other alternative for userspace ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Jan 2018 20:57:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-mx28-on-chip-SRAM/m-p/377304#M54146</guid>
      <dc:creator>rans</dc:creator>
      <dc:date>2018-01-20T20:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: i.mx28 on-chip SRAM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-mx28-on-chip-SRAM/m-p/377305#M54147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ran,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The example I pointed out is for the kernel to use the internal RAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fabio Estevam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Jan 2018 21:01:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-mx28-on-chip-SRAM/m-p/377305#M54147</guid>
      <dc:creator>fabio_estevam</dc:creator>
      <dc:date>2018-01-20T21:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: i.mx28 on-chip SRAM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-mx28-on-chip-SRAM/m-p/377306#M54148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ran,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I did for using the internal RAM fro userspace, is to use the 'mmap' function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;/*!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;\brief Function to get a mapped to pointer to a specific address area&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;in memory. The address should be 4K (blocksize) aligned&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;\param address The 4K aligned physical address to map to&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;\param size The size in bytes to be mapped&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;\return The pointer to the mapped memory, NULL if mapping fails&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;void * NonVolStorage::MapMemory(uint32_t address, size_t size)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;int fd;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;void *ret_addr;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;fd = open("/dev/mem", O_RDWR | O_SYNC);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (fd == -1) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;perror("open");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return NULL;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;ret_addr = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, address);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;if (ret_addr == MAP_FAILED) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;perror("mmap");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ret_addr = NULL;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (close(fd) == -1) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;perror("close");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return ret_addr;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I call this function with the below defined address and size:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define NV_RAM_ADDRESS 0x1B000&lt;BR /&gt;#define NV_RAM_SIZE 4096&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did not add an mmio-sram part to the device-tree.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps. Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ruud&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jan 2018 09:02:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-mx28-on-chip-SRAM/m-p/377306#M54148</guid>
      <dc:creator>slay</dc:creator>
      <dc:date>2018-01-25T09:02:17Z</dc:date>
    </item>
  </channel>
</rss>

