summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
* ENGR00319415 pcie: random link down issue after warm-rstRichard Zhu2017-04-05-0/+18
| | | | | | | | | | | | | | | | | | | | | There are about 0.02% percentage on some imx6q/dl/solo hw boards, random pcie link down when warm-reset is used. Make sure to clear the ref_ssp_en bit16 of gpr1 before warm-rst, and set ref_ssp_en after the pcie clks are stable to workaround it. rootcause: * gpr regisers wouldn't be reset by warm-rst, while the ref_ssp_en is required to be reset by pcie. (work-around in u-boot) * ref_ssp_en should be set after pcie clks are stable. (work-around in kernel) Signed-off-by: Richard Zhu <r65037@freescale.com> (cherry picked from commit 5cc825b12c6b86a22f1a6a0535b52cf3ee142e77) Signed-off-by: Peng Fan <Peng.Fan@freescale.com> (cherry picked from commit 6193cf4e3384a59e29546d13a67657f7faeafc9e) (cherry picked from commit 7b4aabeddffabca46d7d6e7ef2611de468a6b4f7)
* MLK-11064 imx: mx6qp: Adjust AQos settings for peripheralsYe.Li2017-04-05-0/+3
| | | | | | | | | | | To resolve USB camera bandwidth issue, the patch sets recommended AQoS setting from IC team value for peripheral and only on imx6qp. The address is: 0xbb0608, the value is: 0x80000201 Signed-off-by: Ye.Li <B37916@freescale.com> (cherry picked from commit 11906c712a52e7a20caf71d7c5da4e951a59db29) (cherry picked from commit 5dcf073b8f2479a2adbb8d9fb03d9c9c70664e32)
* MLK-12534 mx6: shutdown vddpu and PCIE phy to save powerYe Li2017-04-05-0/+42
| | | | | | | | | | | | | | | | | | | Shutdown VDDPU and PCIE phy to save power. For PCIE, the i.MX6SL and i.MX6UL does not have this module, so don't need it. For VDDPU, the i.MX6UL does not have GPU, does not need it. And on i.MX6QP there is narrow window that PRE driver is ready but GPU driver probe later, and the later GPU driver turn on PU may cause 'PRE hang' issue. To simplify thing, do not turn off PU in u-boot. Reference: commit: 6b0787b726e2ff32210d742d93ecd3f4bb2ae402 commit: 4bd0032c0eba50fa0caf43f50f735a3cfbe36a8d Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 5c96ea91fe89c67991c929c9b39ffaa940d28391)
* MLK-12533 mx6sx: select OSC as uart's clk parentYe Li2017-04-05-0/+13
| | | | | | | | | | | As M4 is sourcing UART clk from OSC, to make UART work when M4 is enabled, need to select OSC as clk parent, 24M OSC is enough for debug UART in uboot. Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Anson Huang <b20788@freescale.com> (cherry picked from commit b5e1b393192099e91c5cb75b69291c87eacb9f60) (cherry picked from commit 416dea861c2dd5a197bf2354069bba8415a20b12)
* MLK-12452-4 mx6sxsabreauto: Add secondary enet supportYe Li2017-04-05-7/+39
| | | | | | | Add configurations and board codes for second enet. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 4dfd06dc649615f8dd3e1ac8018a0a7109fc4147)
* MLK-12452-3 mx6sxsabresd: Add secondary enet supportYe Li2017-04-05-6/+38
| | | | | | | Add configurations and board codes for second enet. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit b646262f1f201e11e08968ddf88aeb8ab41fcf21)
* MLK-12452-1 FEC: Update fec driver to support two MDIOYe Li2017-04-05-1/+24
| | | | | | | | | | | | | | | | | | | | On i.MX6SX, 6UL and 7D, there are two enet controllers each has a MDIO port. Some boards share the MDIO port for the two enets. So introduce a configuration CONFIG_FEC_MXC_MDIO_BASE to indicate the MDIO port for sharing. In Kconfig, user needs enable CONFIG_FEC_MXC_SHARE_MDIO first to enter the CONFIG_FEC_MXC_MDIO_BASE. Without defining this configuration, the enet will uses own MDIO port. Also add this configurationfor FEC DM driver, since the ENET PHY currently does not support FDT. Modify the dev_id for DM driver, the first fec will set dev_id with 0, while second fec sets the dev_id with 1. So the MII bus name won't be duplicated. Then we can add two FEC devices from DTB. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 088afc073c480bd02208145bfb04259ccdf391c1)
* MLK-12439 mx6sxsabreauto: Enable GIS for the AI boardYe Li2017-04-05-0/+6
| | | | | | | | | Enable the GIS feature for i.MX6SX sabreauto board. Need to define the "gis=vadc" environment variable for the gis input. At default this variable is not set. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 2271dcfee3500e96503a9fc59929e73167e3c4a2)
* ENGR00315894-81 gis: Add gis moduleYe.Li2017-04-05-1/+611
| | | | | | | | | | | Add gis module, current gis is support vadc input. Add power down function to lcdif driver. Signed-off-by: Sandor Yu <R01008@freescale.com> Signed-off-by: Ye.Li <B37916@freescale.com> (cherry picked from commit a007b00dd8ef9f773dfdebef0b1deb0990281793) (cherry picked from commit a31dcdafb0963381e7213c59f79a340ef27ec2e2) (cherry picked from commit 02dfe2e4af5f51d39a51542fb0e81f93faf505bc)
* ENGR00315894-80 pxp: Add pxp moduleYe.Li2017-04-05-0/+324
| | | | | | | | | | | | Add pxp module. Support csc between YUV444 and RGB888 and scaling. Signed-off-by: Sandor Yu <R01008@freescale.com> Signed-off-by: Ye.Li <B37916@freescale.com> (cherry picked from commit 4c6e1f9ed1b2f5c98a34502b44b6414593fdd290) Signed-off-by: Peng Fan <Peng.Fan@freescale.com> (cherry picked from commit 92295fafcdbaa3a3fe0a63ede15f896dfc9ce0b0) (cherry picked from commit 096a63e81a8c78b3f8bbc65a9d418aa032d62231)
* ENGR00315894-79 csi: Add csi moduleYe.Li2017-04-05-0/+425
| | | | | | | | | | | Add csi module. Signed-off-by: Sandor Yu <R01008@freescale.com> Signed-off-by: Ye.Li <B37916@freescale.com> (cherry picked from commit 854ae26758ec8132ef749b98645dd2f43b84e5e2) Signed-off-by: Peng Fan <Peng.Fan@freescale.com> (cherry picked from commit 5f133bd9420109951fd03bd5168801327e929c3b) (cherry picked from commit 16960e59fa3334162d2e2212ee4bc1e7f0c420a3)
* ENGR00315894-78 vadc: Add vadc moduleYe.Li2017-04-05-0/+603
| | | | | | | | | | | | Add vadc module. Both PAL and NTSC mode can work. Signed-off-by: Sandor Yu <R01008@freescale.com> Signed-off-by: Ye.Li <B37916@freescale.com> (cherry picked from commit 03c31ae30c1e81c99f6824221e4801433445e04a) Signed-off-by: Peng Fan <Peng.Fan@freescale.com> (cherry picked from commit b5d776ffc1519c16091736445b3217ffb7fcd7db) (cherry picked from commit 2377eb9fd299b76888f11faf76383b68e77bcc8a)
* ENGR00321299 gis: clean csi0 input mux set bit in GPRSandor Yu2017-04-05-0/+6
| | | | | | | | | | | | When gis enable in uboot, the CSI0 input mux select setting to vadc module, clean the bit when gis disabled. Signed-off-by: Sandor Yu <R01008@freescale.com> (cherry picked from commit ae66b17b7da3be50dc81ca636b67e8e879f52e26) (cherry picked from commit c83fd326e810c2fff44b8b02e78406d5d04c977c) Signed-off-by: Peng Fan <Peng.Fan@freescale.com> (cherry picked from commit d6e803ed5f51d31ebe7e9d178aa11f16401b7fc8) (cherry picked from commit 2065b417ae93436736e49ca66b66aa0791d003fe)
* ENGR00315894-77 mx6 soc: Add vadc power up/down functionYe.Li2017-04-05-0/+49
| | | | | | | | | | | Add vadc power up/down function. Signed-off-by: Sandor Yu <R01008@freescale.com> Signed-off-by: Ye.Li <B37916@freescale.com> (cherry picked from commit 96d990ef754a879f6ca9da4adf6e0be3d21cdc51) Signed-off-by: Peng Fan <Peng.Fan@freescale.com> (cherry picked from commit 01b88201aa86bef26a4254ac43aff90e99fd2c06) (cherry picked from commit d50b53f138dd3b4c463c80ac8e14f41ac0fdd415)
* ENGR00315894-76 mx6 clock: Add vadc clock enable functionYe.Li2017-04-05-0/+13
| | | | | | | | | | | Add vadc clock enable function. Signed-off-by: Sandor Yu <R01008@freescale.com> Signed-off-by: Ye.Li <B37916@freescale.com> (cherry picked from commit 721c7a1448c5b7265b597b83d18f8338a27ea213) Signed-off-by: Peng Fan <Peng.Fan@freescale.com> (cherry picked from commit 903a59ef941f39b6d7f693dd7c60528e166de079) (cherry picked from commit dc767fb7d5c155f2a6ef01c4dee808b9c1944fc2)
* MLK-10655 Video: Fix second line string display issueYe.Li2017-04-05-4/+5
| | | | | | | | | | | | The string display on second line repeats the last word of first line and does not show full. This is the bug introduced by the fixing to MLK-10542. Signed-off-by: Ye.Li <B37916@freescale.com> (cherry picked from commit ac430cee8c42f0acad9e126631d772b99f1166ea) (cherry picked from commit ff62c5b275a9b5e47d570d3eb10622799bf12070) (cherry picked from commit bd265a064c8f797e542955352d170e7f20f7b0d1) (cherry picked from commit aaa55881de3e9aa8232c819a2c8a3abb285b682f)
* MLK-10542 video: Support multiple lines version string displayYe.Li2017-04-05-7/+23
| | | | | | | | | | | | | | The caculation of left space for version string is not correct, should use VIDEO_COLS not VIDEO_LINE_LEN / 2, otherwise we will get larger space than actual have and cause string to overlay logo picture. Also current version string display only supports two lines words at max. This also causes overlay when the LCD pixel colume size is not enough. Signed-off-by: Ye.Li <B37916@freescale.com> (cherry picked from commit ed53487d36a886fb4557088804a4b5232b168889) (cherry picked from commit 253936bb920c5bb8e7d26e0425d155fb2576ab77) (cherry picked from commit a12ec4c29b4cbdf03ae68a5ecb739253f79b59fc)
* MLK-11211 lcd: fix build warningPeng Fan2017-04-05-4/+1
| | | | | | | | | | | | | | | | Fix build warning: common/lcd.c: In function 'lcd_clear': common/lcd.c:166:6: warning: variable 'bg_color' set but not used [-Wunused-but-set-variable] int bg_color; ^ common/lcd.c: In function 'lcd_setmem': common/lcd.c:296:2: warning: format '%d' expects argument of type 'int', but argument 2 has type 'u_long' [-Wformat=] debug("LCD panel info: %d x %d, %d bit/pix\n", panel_info.vl_col, ^ common/lcd.c:296:2: warning: format '%d' expects argument of type 'int', but argument 3 has type 'u_long' [-Wformat=] Signed-off-by: Peng Fan <Peng.Fan@freescale.com> (cherry picked from commit acfeb43685efb04423ce064c67228d15fa6d3da5)
* MLK-14365-2 mx6ullevk: Add LCD splash screen supportYe Li2017-04-05-0/+97
| | | | | | | Add LCD configurations and TFT43AB display settings for mx6sllevk. Enable the CONFIG_VIDEO for this feature. Signed-off-by: Ye Li <ye.li@nxp.com>
* MLK-14365-1 mx6sllevk: Add LCD splash screen supportYe Li2017-04-05-0/+106
| | | | | | | Add LCD configurations and MCIMX28LCD display settings for mx6sllevk. Enable the CONFIG_VIDEO for this feature. Signed-off-by: Ye Li <ye.li@nxp.com>
* MLK-12437-5 mx6ulevk: Update display to support panel selectionYe Li2017-04-05-10/+28
| | | | | | | | Change to panel environment for display at default. Align this feature to v2015.04 uboot. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit ea93a34a3348f80462ea5b61a4ca2e9a1d267f4c)
* MLK-12437-4 mx6sxsabreauto: Update display to support panel selectionYe Li2017-04-05-1/+138
| | | | | | | | Support two display panels, one for LVDS, another for parallel LCD. Align the feature to v2015.04 uboot. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit d5f7833adf6236357cf3c139e14e46d718e20524)
* MLK-12437-3 mx6sxsabresd: Update display to support panel selectionYe Li2017-04-05-11/+91
| | | | | | | | Support two display panels, one for LVDS, another for parallel LCD. Align the feature to the v2015.04 uboot. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit d7f54f22607ffcace6cda97984649a5ae4f65996)
* MLK-12437-2 Video: Update the common board_video_skip to support MXS LCDYe Li2017-04-05-0/+14
| | | | | | | Update the board_video_skip to use CONFIG_VIDEO_MXS for LCD display support. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit d6d0265b09e66c576ab4c01841166415f834a1ff)
* MLK-12437-1 mx6sx: Add support for LVDS displayYe Li2017-04-05-1/+63
| | | | | | | | The i.MX6SX uses a LVDS bridge to mux to the LCDIF interface. Implmement a function for this muxing. So that on 6SX we can use a LVDS display. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 763658d9b497e44b7411581da592ef5b522e9cc9)
* ENGR00315894-70 iMX6SX:Video Update MXS LCDIF driverYe.Li2017-04-05-11/+89
| | | | | | | | | | | | | | | Add a new interface "mxs_lcd_panel_setup" to setup fb parameters and specifies the LCDIF controller for multiple controllers of iMX6SX. Pass fb parameters via "videomode" env remains work if the new interface is not called before video initialization. Modify LCDIF clock interface "mxs_set_lcdclk" to support multiple LCDIF controllers on iMX6SX. Signed-off-by: Ye.Li <B37916@freescale.com> Signed-off-by: Peng Fan <Peng.Fan@freescale.com> (cherry picked from commit d7f49b9378547c3a57b96bcdb907fc44616beb3d) (cherry picked from commit e1343191b9de227c582847e7eeb5ce9238be0754)
* MLK-12434-9: mx6: define CONFIG_BOARD_LATE_INITPeng Fan2017-04-05-0/+5
| | | | | | | | Define CONFIG_BOARD_LATE_INIT for mx6qarm2/mx6slevk/mx6sxsabresd to let mmcdev/mmcroot work as expected. Signed-off-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit 86135fb7e55c3046ead899b83f58dd6048eda9e8)
* MLK-12434-8: mx7dsabresd: dynamic setting mmcdev and mmcrootPeng Fan2017-04-05-35/+2
| | | | | | | Dynamic setting mmcdev and mmcroot for mx7dsabresd. Signed-off-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit 2fc0e6ccc90989375ac6355d4f33fd4ffaca9b3a)
* MLK-12434-7: mx6ulevk: dynamic setting mmcdev and mmcrootPeng Fan2017-04-05-0/+4
| | | | | | | Dynamic setting mmcdev and mmcroot for mx6ul evk board. Signed-off-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit 95cf514bb3c17014622bca26cbcbfda31cec861a)
* MLK-12434-6: mx6slevk: dynamic setting mmcdev and mmcrootPeng Fan2017-04-05-0/+9
| | | | | | | Dynamic setting mmcdev and mmcroot for mx6slevk. Signed-off-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit 3308f3c48c644938c415ead23ed9acedc2fd7981)
* MLK-12434-5: mx6sxsabreauto: dynamic setting mmcdev and mmcrootPeng Fan2017-04-05-1/+20
| | | | | | | Dynamic setting mmcdev and mmcroot for mx6sxsabresd. Signed-off-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit ebb43ae292d43817202b71b25368516887f4686b)
* MLK-12434-4: mx6sxsabresd: dynamic setting mmcdev and mmcrootPeng Fan2017-04-05-1/+17
| | | | | | | Dynamic setting mmcdev and mmcroot for mx6sxsabresd. Signed-off-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit fb53c90269ead4f72028fd9bcc764e4924921a30)
* MLK-12434-3: mx6sabre: dynamic setting mmcdev and mmcrootPeng Fan2017-04-05-1/+35
| | | | | | | Dynamic setting mmcdev and mmcroot for mx6sabresd and mx6qsabreauto. Signed-off-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit 14040e07549a394500c11e815f31299e4fb0ac50)
* MLK-12434-2: mx6qarm2: dynamic setting mmcdev and mmcrootPeng Fan2017-04-05-2/+18
| | | | | | | Dynamic setting mmcdev and mmcroot for mx6qarm2. Signed-off-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit 54ea563dbe1804e426afbbf0710ffa815551d92b)
* MLK-12434-1: imx: dynamic setting mmcdev and mmcrootPeng Fan2017-04-05-0/+54
| | | | | | | | Align to imx_v2015.04, dynamic setting mmcdev and mmcroot. Then when boot linux, we can have correct "root=/dev/mmcblk[x]p2" Signed-off-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit b46b99a901eb194e81fc4836ee2259ad8857f4d3)
* MLK-12425-4: mx6dlsabresd: support epdcPeng Fan2017-04-05-2/+265
| | | | | | | | | Support epdc for mx6dlsabresd board. Introduce a new configuration file mx6dlsabresd_epdc_defconfig. Add related settings. Signed-off-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit 467974ffda4b874e16f0c84974c3d65d85f84f6a)
* MLK-12425-3: mx6slevk: support epdcPeng Fan2017-04-05-3/+261
| | | | | | | | | Support epdc for mx6slevk board. Introduce a new configuration file mx6slevk_epdc_defconfig. Add related settings. Signed-off-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit 8e4304c2ab95928fb6fbb24ba83115cf1cd1e6d2)
* MLK-12425-2: video: epdc: introduce epdc supportPeng Fan2017-04-05-11/+1370
| | | | | | | | | | | | | | | | | | | | | | | | | Support EPDC. E-Ink feature is supported by i.MX6DL/SL and i.MX7D. For now this driver only supports i.MX6DL/SL, because the i.MX7D EPDC driver needs pxp support which is not included in U-Boot. Support user defined logo file, if there is no logo file, it will draw a black border around a white screen. If need to enable EPDC, a waveform file is required to let all work. Since we need LCD_MONOCHROME mode for EPDC, we introduce LCD_MONOCHROME support. Please refer to Linux Reference Manual for how to flash WAVEFORM file. Signed-off-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Robby Cai <R63905@freescale.com> Signed-off-by: Nitin Garg <nitin.garg@freescale.com> Signed-off-by: Ye.Li <B37916@freescale.com> (cherry picked from commit a7244f279cc3c3994bcd103f5e9a183b1075ae71)
* MLK-12425-1: mx6sl/ul: introudce more pinmux macrosPeng Fan2017-04-05-3/+84
| | | | | | | Introuduce more pinmux macros definitions. Signed-off-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit 06893558f2cc042b683247989be5127a8027ebf2)
* MLK-11304 MX6 SabreSD: Disable HDMI detectPeng Fan2017-04-05-1/+1
| | | | | | | | | | | | | | | | | As the HDMI splash screen feature is not well supported, we should not set it to be the default display. In case, users leave the 'panel' uboot environment variable empty and connect the board with a HDMI monitor, the HDMI detect funtion will work and enable the HDMI splash screen. So, this patch disables HDMI detect function so that users may only explicitly set the 'panel' variable to be 'HDMI' to use HDMI splash screen. Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Signed-off-by: Liu Ying <Ying.Liu@freescale.com> Signed-off-by: Ye.Li <B37916@freescale.com> (cherry picked from commit d482c54a9fbf458fdb2270cf990d8ec727823bb1) (cherry picked from commit b484d36882c8db9ddb8262001cfef187a28051b2)
* MLK-11952 Video: IPU: Fix dereferencing NULL pointer problemYe.Li2017-04-05-0/+4
| | | | | | | | | | By Coverity check, the clk_set_rate function dereferences the clk pointer without checking whether it is NULL. This may cause problem when clk is NULL. Fix the problem by adding NULL check. Signed-off-by: Ye.Li <B37916@freescale.com> (cherry picked from commit ded2f2958d568411274eeecd265fcc1181638335) (cherry picked from commit b58ac1502391d87470918ff8d172b2b8dc1e7a68)
* MLK-10747-2 video: ipu: Enable/disable LDB_DI clock when necessaryLiu Ying2017-04-05-8/+67
| | | | | | | | | This patch adds enable/disable hooks support for ldb_di[0/1] clocks and enables/disables them when necessary. Signed-off-by: Liu Ying <Ying.Liu@freescale.com> (cherry picked from commit 615d4c51679a6c2ee0ed4c5e3922eec76646eef1) (cherry picked from commit 152192507c3bbaba093783d7da32b88327705c63)
* MLK-10747-1 video: ipu: Build ldb_di clock relevant code only for MX6 and MX53Liu Ying2017-04-05-1/+13
| | | | | | | | | The LDB is found in MX6 variants and MX53, so this patch makes the ldb_di clock relevant code be built only for them. Signed-off-by: Liu Ying <Ying.Liu@freescale.com> (cherry picked from commit 3e40c7466ae7d1d6ca74011bfe69ae059d412a3b) (cherry picked from commit 0c47d4138fd2fe8aa864160e23428b2ef95f16ae)
* MLK-10774-2 HDMI: splash screen function enhancementPeng Fan2017-04-05-12/+12
| | | | | | | | | | | | | | | | -Change HDMI video mode to VGA. -Add pixel clock fraction part setting in IPU driver, fix video mode timing issue. -Add overflow state clear workaround, fix kernel hang in HDMI driver issue. -Correct IPU clock to 264MHz. Signed-off-by: Sandor Yu <R01008@freescale.com> Signed-off-by: Nitin Garg <nitin.garg@freescale.com> Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 5028519b434d5dfbe53c48ac4b115ff8b69bbac7) (cherry picked from commit 8dcbd43b971616fb67dc3b2af32e2d33f68ed0ce)
* MLK-12865 Nand: Fix BCH debug1 register access issueYe Li2017-04-05-1/+1
| | | | | | | Should have "&" to access the register address, otherwise uboot will hang. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 0b65071afaae9d6a49fb7dda2902f5c8bcd678c2)
* MLK-12693-2 nand: mxs: correct bitflip for erased NAND pagePeng Fan2017-04-05-2/+23
| | | | | | | | | | | | | | | | | | | | This patch is a porting of http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/?h=imx_4.1.15_1.0.0_ga&id=e4dacc44d22e9474ec456cb330df525cd805ea38 " i.MX6QP and i.MX7D BCH module integrated a new feature to detect the bitflip number for erased NAND page. So for these two platform, set the erase threshold to gf/2 and if bitflip detected, GPMI driver will correct the data to all 0xFF. Also updated the imx6qp dts file to ditinguish the GPMI module for i.MX6Q with the one for i.MX6QP. " In this patch, i.MX6UL is added and threshold changed to use ecc_strength. Signed-off-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit 489929be0221bb7d4c46bb5bc6083650b78f73e0) Signed-off-by: Ye Li <ye.li@nxp.com>
* MLK-12693-1 nand: mxs: fix the bitflips for erased page when uncorrectable errorPeng Fan2017-04-05-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is porting from linux: http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/?h=imx_4.1.15_1.0.0_ga&id=3d42fcece496224fde59f9343763fb2dfc5b0768 " We may meet the bitflips in reading an erased page(contains all 0xFF), this may causes the UBIFS corrupt, please see the log from Elie: ----------------------------------------------------------------- [ 3.831323] UBI warning: ubi_io_read: error -74 (ECC error) while reading 16384 bytes from PEB 443:245760, read only 16384 bytes, retry [ 3.845026] UBI warning: ubi_io_read: error -74 (ECC error) while reading 16384 bytes from PEB 443:245760, read only 16384 bytes, retry [ 3.858710] UBI warning: ubi_io_read: error -74 (ECC error) while reading 16384 bytes from PEB 443:245760, read only 16384 bytes, retry [ 3.872408] UBI error: ubi_io_read: error -74 (ECC error) while reading 16384 bytes from PEB 443:245760, read 16384 bytes ... [ 4.011529] UBIFS error (pid 36): ubifs_recover_leb: corrupt empty space LEB 27:237568, corruption starts at 9815 [ 4.021897] UBIFS error (pid 36): ubifs_scanned_corruption: corruption at LEB 27:247383 [ 4.030000] UBIFS error (pid 36): ubifs_scanned_corruption: first 6569 bytes from LEB 27:247383 ----------------------------------------------------------------- This patch does a check for the uncorrectable failure in the following steps: [0] set the threshold. The threshold is set based on the truth: "A single 0 bit will lead to gf_len(13 or 14) bits 0 after the BCH do the ECC." For the sake of safe, we will set the threshold with half the gf_len, and do not make it bigger the ECC strength. [1] count the bitflips of the current ECC chunk, assume it is N. [2] if the (N <= threshold) is true, we continue to read out the page with ECC disabled. and we count the bitflips again, assume it is N2. (We read out the whole page, not just a chunk, this makes the check more strictly, and make the code more simple.) [3] if the (N2 <= threshold) is true again, we can regard this is a erased page. This is because a real erased page is full of 0xFF(maybe also has several bitflips), while a page contains the 0xFF data will definitely has many bitflips in the ECC parity areas. [4] if the [3] fails, we can regard this is a page filled with the '0xFF' data. " Signed-off-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit ceb324a2914487aa517a6c70a06a20b5e3438fda)
* MLK-12603: mtd: gpmi: may use legacy bch geometry in u-bootHan Xu2017-04-05-0/+13
| | | | | | | | | | | | provide one config "CONFIG_NAND_MXS_BCH_LEGACY_GEO" to keep using legacy bch geometry. NOTICE: the feature must be enabled/disabled in both u-boot and kernel. Signed-off-by: Han Xu <han.xu@nxp.com> (cherry picked from commit 0abc9c182c24f88522bd74fa1b53cd2fa3477184) (cherry picked from commit 772af34b1216acc8e6a1a3faf43fef7c90b26a2f) Signed-off-by: Ye Li <ye.li@nxp.com>
* MLK-12214 NAND:apbh_dma: Fix logically dead code issueYe.Li2017-04-05-3/+3
| | | | | | | | | | | The list_first_entry always assumes the list is not empty, it won't return NULL pointer when the list is empty. So the "if (pdesc == NULL)" becomes a dead code. Fix the issue by calling the list_empty before the list_first_entry. (Coverity CID 29934) Signed-off-by: Ye.Li <ye.li@nxp.com> (cherry picked from commit ff3923f294cc2e15f436d7520b4042736b1b48a6)
* MLK-11718-2: mtd: nand: change the BCH layout setting for large oob NANDHan Xu2017-04-05-38/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | The cod change updated the NAND driver BCH ECC layout algorithm to support large oob size NAND chips(oob > 1024 bytes). Current implementation requires each chunk size larger than oob size so the bad block marker (BBM) can be guaranteed located in data chunk. The ECC layout always using the unbalanced layout(Ecc for both meta and Data0 chunk), but for the NAND chips with oob larger than 1k, the driver cannot support because BCH doesn’t support GF 15 for 2K chunk. The change keeps the data chunk no larger than 1k and adjust the ECC strength or ECC layout to locate the BBM in data chunk. General idea for large oob NAND chips is 1.Try all ECC strength from the minimum value required by NAND spec to the maximum one that works, any ECC makes the BBM locate in data chunk can be chosen. 2.If none of them works, using separate ECC for meta, which will add one extra ecc with the same ECC strength as other data chunks. This extra ECC can guarantee BBM located in data chunk, of course, we need to check if oob can afford it. Signed-off-by: Han Xu <b45815@freescale.com> (cherry picked from commit 78f620a6d6ab44bd34e42f00abe4673db099ca73)