<?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: uBoot MXS NAND Driver in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/uBoot-MXS-NAND-Driver/m-p/720383#M111995</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the answer to #1 is no. iMX6 stores the data in compatible mode.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Mar 2018 19:41:35 GMT</pubDate>
    <dc:creator>mus</dc:creator>
    <dc:date>2018-03-21T19:41:35Z</dc:date>
    <item>
      <title>uBoot MXS NAND Driver</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/uBoot-MXS-NAND-Driver/m-p/720382#M111994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are working with the mxs nand driver in uBoot on iMX6SX. uBoot loads the kernel from NAND fine and the kernel boots successfully. However, when we use&amp;nbsp;mxs_nand_ecc_read_page() declared in mxs_nand.c to read a page, the buffer returned doesn't contain all the bytes from the kernel but also includes some ecc sections.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a separate discussion in the community and research online, we found that there may be 2 ways of raw NAND layout for ECC. The&amp;nbsp;two ways to store the redundant data are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;After every 512 bytes of data. This will cause some original data to be stored in the spare area. In RBL terminology, this is called "compatible mode".&lt;/LI&gt;&lt;LI&gt;Completely within the spare memory area. Here, the original data is stored in the page followed by all of the redundant data for that page together. This is called "non-compatible mode".&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since the&amp;nbsp;&lt;SPAN&gt;mxs_nand_ecc_read_page() is returning ecc data after the 512 bytes in the buffer, we probably have the first layout described above.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;As far as we can tell from reading the code in this function, the parameters configured suggests that BCH should strip out this extra data and just return the standalone data in the buffer returned. Although it strips the header, it still leaves the extra ecc data in the buffer causing the data to be truncated. But again, uBoot itself can read this area from NAND and put it in DRAM correctly. When we use the&amp;nbsp;mxs_nand_ecc_read_page() from SPL, it fails as described above.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For reference, the NAND ecc layout picture is at&amp;nbsp;&lt;A href="https://community.nxp.com/thread/343771"&gt;iMX28 NAND Flash ECC Layout BBI Swap&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;As far as we can tell, there is a 10byte header, 512byte data + 13byte ecc repeated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do we resolve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Is there a way to configure the NAND ecc implementation for iMX6SX?&amp;nbsp;Can the BCH be configured for "non-compatible mode" vs "compatible mode", either in DCD or in board init?&lt;/LI&gt;&lt;LI&gt;How do we fix &lt;SPAN&gt;mxs_nand_ecc_read_page()&lt;/SPAN&gt;&amp;nbsp;so it returns only the raw data?&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2018 00:48:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/uBoot-MXS-NAND-Driver/m-p/720382#M111994</guid>
      <dc:creator>mus</dc:creator>
      <dc:date>2018-03-21T00:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: uBoot MXS NAND Driver</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/uBoot-MXS-NAND-Driver/m-p/720383#M111995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the answer to #1 is no. iMX6 stores the data in compatible mode.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2018 19:41:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/uBoot-MXS-NAND-Driver/m-p/720383#M111995</guid>
      <dc:creator>mus</dc:creator>
      <dc:date>2018-03-21T19:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: uBoot MXS NAND Driver</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/uBoot-MXS-NAND-Driver/m-p/720384#M111996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If anyone is wondering, after patching the bug in&amp;nbsp;NXP's mxs_nand driver in uBoot, SPL is working correctly for i.MX6SoloX.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2018 00:28:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/uBoot-MXS-NAND-Driver/m-p/720384#M111996</guid>
      <dc:creator>mus</dc:creator>
      <dc:date>2018-03-26T00:28:45Z</dc:date>
    </item>
  </channel>
</rss>

