<?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>i.MX ProcessorsのトピックRe: iMX53: EIM access from Linux user space</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/iMX53-EIM-access-from-Linux-user-space/m-p/211520#M12833</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks very much for your reply. I haven't implemented the rw/ro control function, since I do not want the memory to be read-only. The mtd-&amp;gt;flags have MTD_WRITABLE set.&lt;/P&gt;&lt;P&gt;However, in the meantime I managed to get the memory writable. I still don't understand why this works, but it does: The function &lt;EM&gt;mapram_write&lt;/EM&gt; in map_ram.c, which is responsible for executing the write-access to the MTD RAM device, uses the macro &lt;EM&gt;memcpy_toio&lt;/EM&gt; for write access, which places a &lt;EM&gt;__force&lt;/EM&gt; before the target address. If I replace the &lt;EM&gt;memcpy_toio&lt;/EM&gt; with a simple &lt;EM&gt;memcpy&lt;/EM&gt;, everything works fine. So in the end the whole problem obviously did not have anything to do with kernel/user space acccess restrictions. I don't know what this &lt;EM&gt;__force&lt;/EM&gt; does, but at least it works now and that's all I wanted.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Oct 2012 09:01:21 GMT</pubDate>
    <dc:creator>timjaacks</dc:creator>
    <dc:date>2012-10-18T09:01:21Z</dc:date>
    <item>
      <title>iMX53: EIM access from Linux user space</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX53-EIM-access-from-Linux-user-space/m-p/211518#M12831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to interface an external SRAM which is connected to the CS0 of the iMX53's EIM. The memory region starts at 0xF0000000. I want to access it from Linux as an MTD device using the plat-ram driver. On a previous platform running the iMX35, this worked without any problems. However, on the iMX53 there seems to be an access restriction. While I can read and write the memory from a kernel driver directly (using ioremap, __raw_writel and __raw_readl), I can only read the memory from user space (cat /dev/mtd0). Writing to the memory is not possible (echo "test" &amp;gt; /dev/mtd0).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot find the place where to enable access from user space. There is a bit in the EIM (GCR1, b19) which should be responsible for this, but it is already cleared, i.e. user space access is allowed. There is also a write-protect bit (b27), which is cleared as well, i.e. not write-protected. I also checked the AIPS registers (OPACR) where permissions for several peripherals can be set, but these get correctly initialized with zeros. The clocks cannot be the reason either, I tested the access with all of the clocks running. I have no idea why the access does not work from the user space. Does anyone have a clue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 13:22:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX53-EIM-access-from-Linux-user-space/m-p/211518#M12831</guid>
      <dc:creator>timjaacks</dc:creator>
      <dc:date>2012-10-08T13:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: iMX53: EIM access from Linux user space</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX53-EIM-access-from-Linux-user-space/m-p/211519#M12832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/timjaacks"&gt;timjaacks&lt;/A&gt;&amp;nbsp; is there any MTD DEBUG&amp;nbsp; log for write file .&lt;/P&gt;&lt;P&gt;And is you use plat-ram driver , what is your implement of platform device's set rw/ro control .&lt;/P&gt;&lt;P&gt;Could you check mtd-&amp;gt;flags is MTD_WRITEABLE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 03:01:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX53-EIM-access-from-Linux-user-space/m-p/211519#M12832</guid>
      <dc:creator>fushi_peng</dc:creator>
      <dc:date>2012-10-17T03:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: iMX53: EIM access from Linux user space</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX53-EIM-access-from-Linux-user-space/m-p/211520#M12833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks very much for your reply. I haven't implemented the rw/ro control function, since I do not want the memory to be read-only. The mtd-&amp;gt;flags have MTD_WRITABLE set.&lt;/P&gt;&lt;P&gt;However, in the meantime I managed to get the memory writable. I still don't understand why this works, but it does: The function &lt;EM&gt;mapram_write&lt;/EM&gt; in map_ram.c, which is responsible for executing the write-access to the MTD RAM device, uses the macro &lt;EM&gt;memcpy_toio&lt;/EM&gt; for write access, which places a &lt;EM&gt;__force&lt;/EM&gt; before the target address. If I replace the &lt;EM&gt;memcpy_toio&lt;/EM&gt; with a simple &lt;EM&gt;memcpy&lt;/EM&gt;, everything works fine. So in the end the whole problem obviously did not have anything to do with kernel/user space acccess restrictions. I don't know what this &lt;EM&gt;__force&lt;/EM&gt; does, but at least it works now and that's all I wanted.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 09:01:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX53-EIM-access-from-Linux-user-space/m-p/211520#M12833</guid>
      <dc:creator>timjaacks</dc:creator>
      <dc:date>2012-10-18T09:01:21Z</dc:date>
    </item>
  </channel>
</rss>

