Re: [U-Boot] [PATCH] imx: mx6sxsabresd: support emmc
Hi Peng, On 23/12/2015 04:10, Peng Fan wrote: > Hi Otavio, > On Tue, Dec 22, 2015 at 09:51:37AM -0200, Otavio Salvador wrote: >> On Tue, Dec 22, 2015 at 7:03 AM, Peng Fanwrote: >>> From: Peng Fan >>> >>> For i.MX6SX SABRESD, USDHC4 can be used for SD and EMMC, default >>> it is used for SD. >>> >>> This patch introduces EMMC pinmux settings and a new macro >>> CONFIG_MX6SXSABRESD_EMMC_REWORK. If the board has been reworked >>> to support emmc, need to enable this macro. >>> >>> Signed-off-by: Peng Fan >>> Cc: Stefano Babic >> >> Is it worth supporting this 'reworked' board? if someone reworks a >> board it is expected to have to rework the BSP of it, as well. > > usdhc4 can be used for SD and emmc. This is the feature of the board, > so I think we need to support it. But there is no way to dynamically check > whether using sd or emmc now, adding the macro for using emmc. I agree with Otavio that this is a very nasty hack, and the hardware developer should provide a way getting the board revision. Anyway, I would not certainly block it, as it concerns just this board, but I ask if it is not better to let decide to an environment variable if eMMC must be activated. Advantage is to have a single U-Boot binary for both boards, disadvantage is that it coul be set for the wrong board revision, too. But if USDHC4 was not used anymore, this drives just to a not found eMMC. Both ways are hacks, I fully agree, but CONFIG_MX6SXSABRESD_EMMC_REWORK remains undocumented at all, too. What do you think ? Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] imx: mx6sxsabresd: support emmc
Hi Stefano, On Sun, Jan 24, 2016 at 12:07:14PM +0100, Stefano Babic wrote: >Hi Peng, > >On 23/12/2015 04:10, Peng Fan wrote: >> Hi Otavio, >> On Tue, Dec 22, 2015 at 09:51:37AM -0200, Otavio Salvador wrote: >>> On Tue, Dec 22, 2015 at 7:03 AM, Peng Fanwrote: From: Peng Fan For i.MX6SX SABRESD, USDHC4 can be used for SD and EMMC, default it is used for SD. This patch introduces EMMC pinmux settings and a new macro CONFIG_MX6SXSABRESD_EMMC_REWORK. If the board has been reworked to support emmc, need to enable this macro. Signed-off-by: Peng Fan Cc: Stefano Babic >>> >>> Is it worth supporting this 'reworked' board? if someone reworks a >>> board it is expected to have to rework the BSP of it, as well. >> >> usdhc4 can be used for SD and emmc. This is the feature of the board, >> so I think we need to support it. But there is no way to dynamically check >> whether using sd or emmc now, adding the macro for using emmc. > >I agree with Otavio that this is a very nasty hack, and the hardware >developer should provide a way getting the board revision. Anyway, I >would not certainly block it, as it concerns just this board, but I ask >if it is not better to let decide to an environment variable if eMMC >must be activated. Advantage is to have a single U-Boot binary for both >boards, disadvantage is that it coul be set for the wrong board >revision, too. But if USDHC4 was not used anymore, this drives just to a >not found eMMC. Both ways are hacks, I fully agree, but >CONFIG_MX6SXSABRESD_EMMC_REWORK remains undocumented at all, too. > >What do you think ? There is no fuse bit or else to let uboot do runtime checking. I also disklike this, but I do not have a better idea. Without runtime checking, it's hard to use one image support SD/EMMC both. I would like to add doc for the macro CONFIG_MX6SXSABRESD_EMMC_REWORK in the next version, do you agree with this? Thanks, Peng. > >Best regards, >Stefano Babic > >-- >= >DENX Software Engineering GmbH, Managing Director: Wolfgang Denk >HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany >Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de >= ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] imx: mx6sxsabresd: support emmc
Hi Peng, On 24/01/2016 14:04, Peng Fan wrote: >> I agree with Otavio that this is a very nasty hack, and the hardware >> developer should provide a way getting the board revision. Anyway, I >> would not certainly block it, as it concerns just this board, but I ask >> if it is not better to let decide to an environment variable if eMMC >> must be activated. Advantage is to have a single U-Boot binary for both >> boards, disadvantage is that it coul be set for the wrong board >> revision, too. But if USDHC4 was not used anymore, this drives just to a >> not found eMMC. Both ways are hacks, I fully agree, but >> CONFIG_MX6SXSABRESD_EMMC_REWORK remains undocumented at all, too. >> >> What do you think ? > > There is no fuse bit or else to let uboot do runtime checking. I also > disklike this, but I do not have a better idea. Without runtime checking, > it's hard to use one image support SD/EMMC both. I would like to > add doc for the macro CONFIG_MX6SXSABRESD_EMMC_REWORK in the next version, do > you agree with > this? I add Fabio as he is the board maintainer for mx6sxsabresd. If adding the #ifdef remains the preferred solution instead of checkin an env variable, it should be done that it does not generate dead code as the current patch. That means that a defconfig file must be added into configs, where CONFIG_MX6SXSABRESD_EMMC_REWORK is set. Else the code is never built by running buildman and breakages cannot be detected. Anyway, there are already two files for the board, mx6sxsabresd_defconfig and mx6sxsabresd_spl_defconfig, and if you want to have for this board revision both U-Boot with and without SPL, two additional files are needed - it does not scale very well. Best regards, Stefano Babic -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] imx: mx6sxsabresd: support emmc
Hi Otavio, On Tue, Dec 22, 2015 at 09:51:37AM -0200, Otavio Salvador wrote: >On Tue, Dec 22, 2015 at 7:03 AM, Peng Fanwrote: >> From: Peng Fan >> >> For i.MX6SX SABRESD, USDHC4 can be used for SD and EMMC, default >> it is used for SD. >> >> This patch introduces EMMC pinmux settings and a new macro >> CONFIG_MX6SXSABRESD_EMMC_REWORK. If the board has been reworked >> to support emmc, need to enable this macro. >> >> Signed-off-by: Peng Fan >> Cc: Stefano Babic > >Is it worth supporting this 'reworked' board? if someone reworks a >board it is expected to have to rework the BSP of it, as well. usdhc4 can be used for SD and emmc. This is the feature of the board, so I think we need to support it. But there is no way to dynamically check whether using sd or emmc now, adding the macro for using emmc. Regards, Peng. > >-- >Otavio Salvador O.S. Systems >http://www.ossystems.com.brhttp://code.ossystems.com.br >Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] imx: mx6sxsabresd: support emmc
On Tue, Dec 22, 2015 at 7:03 AM, Peng Fanwrote: > From: Peng Fan > > For i.MX6SX SABRESD, USDHC4 can be used for SD and EMMC, default > it is used for SD. > > This patch introduces EMMC pinmux settings and a new macro > CONFIG_MX6SXSABRESD_EMMC_REWORK. If the board has been reworked > to support emmc, need to enable this macro. > > Signed-off-by: Peng Fan > Cc: Stefano Babic Is it worth supporting this 'reworked' board? if someone reworks a board it is expected to have to rework the BSP of it, as well. -- Otavio Salvador O.S. Systems http://www.ossystems.com.brhttp://code.ossystems.com.br Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot