mx7dsabresd: Remove CONFIG_DM_MMC to avoid regression
Subsystems (3)
PATCH 1/1 mx7dsabresd: Remove CONFIG_DM_MMC to avoid regression
Since U-Boot 2017.09 it is no longer possible to boot a kernel from SD card:
U-Boot 2017.11-rc1-00149-g38c8107-dirty (Oct 11 2017 - 09:55:22 -0300)
CPU: Freescale i.MX7D rev1.2 1000 MHz (running at 792 MHz) CPU: Commercial temperature grade (0C to 95C) at 35C Reset cause: POR Model: Freescale i.MX7 SabreSD Board Board: i.MX7D SABRESD in non-secure mode DRAM: 1 GiB MMC: MMC/SD: Reset never completed.
MMC Device 0 not found
*** Warning - No MMC card found, using default environment
While a proper fix is not available, remove CONFIG_DM_MMC and register the USDHC1 port in the old way, so that this board can boot a kernel again.
--- board/freescale/mx7dsabresd/mx7dsabresd.c | 42 +++++++++++++++++++++++++++++++ configs/mx7dsabresd_defconfig | 1 - 2 files changed, 42 insertions(+), 1 deletion(-)
board/freescale/mx7dsabresd/mx7dsabresd.c +42 -0
@@ -29,6 +29,9 @@ DECLARE_GLOBAL_DATA_PTR;#define UART_PAD_CTRL (PAD_CTL_DSE_3P3V_49OHM | \ PAD_CTL_PUS_PU100KOHM | PAD_CTL_HYS) +#define USDHC_PAD_CTRL (PAD_CTL_DSE_3P3V_32OHM | PAD_CTL_SRE_SLOW | \ + PAD_CTL_HYS | PAD_CTL_PUE | PAD_CTL_PUS_PU47KOHM) +#define ENET_PAD_CTRL (PAD_CTL_PUS_PU100KOHM | PAD_CTL_DSE_3P3V_49OHM)#define ENET_PAD_CTRL_MII (PAD_CTL_DSE_3P3V_32OHM)
@@ -191,6 +194,18 @@ static iomux_v3_cfg_t const fec1_pads[] = { MX7D_PAD_GPIO1_IO11__ENET1_MDC | MUX_PAD_CTRL(ENET_PAD_CTRL_MII), }; +static iomux_v3_cfg_t const usdhc1_pads[] = { +MX7D_PAD_SD1_CLK__SD1_CLK |MUX_PAD_CTRL (USDHC_PAD_CTRL ), +MX7D_PAD_SD1_CMD__SD1_CMD |MUX_PAD_CTRL (USDHC_PAD_CTRL ), +MX7D_PAD_SD1_DATA0__SD1_DATA0 |MUX_PAD_CTRL (USDHC_PAD_CTRL ), +MX7D_PAD_SD1_DATA1__SD1_DATA1 |MUX_PAD_CTRL (USDHC_PAD_CTRL ), +MX7D_PAD_SD1_DATA2__SD1_DATA2 |MUX_PAD_CTRL (USDHC_PAD_CTRL ), +MX7D_PAD_SD1_DATA3__SD1_DATA3 |MUX_PAD_CTRL (USDHC_PAD_CTRL ), + +MX7D_PAD_SD1_CD_B__GPIO5_IO0 |MUX_PAD_CTRL (USDHC_PAD_CTRL ), +MX7D_PAD_SD1_RESET_B__GPIO5_IO2 |MUX_PAD_CTRL (USDHC_PAD_CTRL ), +}; +static void setup_iomux_fec (void ) {imx_iomux_v3_setup_multiple_pads (fec1_pads,ARRAY_SIZE (fec1_pads));
@@ -218,6 +233,33 @@ int mmc_map_to_kernel_blk(int dev_no)return dev_no; } +#define USDHC1_CD_GPIO IMX_GPIO_NR(5, 0) +#define USDHC1_PWR_GPIO IMX_GPIO_NR(5, 2) + +static struct fsl_esdhc_cfg usdhc_cfg[3 ] = { + {USDHC1_BASE_ADDR ,0 ,4 }, +}; + +int board_mmc_getcd (struct mmc *mmc) +{ +return !gpio_get_value (USDHC1_CD_GPIO ); +} + +int board_mmc_init (bd_t *bis) +{ +imx_iomux_v3_setup_multiple_pads (usdhc1_pads,ARRAY_SIZE (usdhc1_pads)); +gpio_request (USDHC1_CD_GPIO ,"usdhc1_cd" ); +gpio_direction_input (USDHC1_CD_GPIO ); +gpio_request (USDHC1_PWR_GPIO ,"usdhc1_pwr" ); +gpio_direction_output (USDHC1_PWR_GPIO ,0 ); +udelay (500 ); +gpio_direction_output (USDHC1_PWR_GPIO ,1 ); + usdhc_cfg[0 ].sdhc_clk =mxc_get_clock (MXC_ESDHC_CLK ); +return fsl_esdhc_initialize (bis, &usdhc_cfg[0 ]); + +return 0 ; +} +#ifdef CONFIG_FEC_MXC int board_eth_init (bd_t *bis) {
configs/mx7dsabresd_defconfig +0 -1
@@ -44,7 +44,6 @@ CONFIG_DFU_RAM=y CONFIG_DM_GPIO=y CONFIG_DM_74X164=y CONFIG_DM_I2C=y -CONFIG_DM_MMC=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_EON=y CONFIG_PHYLIB=y
Signature · 1 line
2.7.4
PATCH 1/1 mx7dsabresd: Remove CONFIG_DM_MMC to avoid regression
Quoted 13 lines · Fabio Estevam
Since U-Boot 2017.09 it is no longer possible to boot a kernel from SD card:
U-Boot 2017.11-rc1-00149-g38c8107-dirty (Oct 11 2017 - 09:55:22 -0300)
CPU: Freescale i.MX7D rev1.2 1000 MHz (running at 792 MHz) CPU: Commercial temperature grade (0C to 95C) at 35C Reset cause: POR Model: Freescale i.MX7 SabreSD Board Board: i.MX7D SABRESD in non-secure mode DRAM: 1 GiB MMC: MMC/SD: Reset never completed.
Quoted 8 lines
MMC Device 0 not found
*** Warning - No MMC card found, using default environmentWhile a proper fix is not available, remove
CONFIG_DM_MMCand register the USDHC1 port in the old way, so that this board can boot a kernel again.Signed-off-by Fabio Estevam <[email protected]>
I understand your goal but I think we ought to focus on fixing the root cause of it instead of moving things back out of DM. I even think we could postpone a little the release until a fix is made but revert out from DM seems wrong.
Signature · 3 lines
Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
PATCH 1/1 mx7dsabresd: Remove CONFIG_DM_MMC to avoid regression
Quoted 4 lines · Otavio Salvador
I understand your goal but I think we ought to focus on fixing the root cause of it instead of moving things back out of DM. I even think we could postpone a little the release until a fix is made but revert out from DM seems wrong.
Sure, patches are welcome!
However if the fix does not come in soon, I would really like to apply this one so that U-Boot mainline can be used again on this board.
PATCH 1/1 imx: mx7dsabresd: include BLK for MMC/eMMC support of driver model
--- configs/mx7dsabresd_defconfig | 1 - 1 file changed, 1 deletion(-)
configs/mx7dsabresd_defconfig +0 -1
@@ -38,7 +38,6 @@ CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_OF_CONTROL=y -# CONFIG_BLK is not set CONFIG_DFU_MMC=y CONFIG_DFU_RAM=y CONFIG_DM_GPIO=y
Signature · 1 line
2.7.4
PATCH 1/1 imx: mx7dsabresd: include BLK for MMC/eMMC support of driver model
Quoted 2 lines · Eric Nelson
Change-Id I1bdfffe782a61a4c688f1bb56e85448024cd497bSigned-off-by Eric Nelson <[email protected]>
Signature · 4 lines
Jagan Teki Free Software Engineer | www.openedev.com U-Boot, Linux | Upstream Maintainer Hyderabad, India.
PATCH 1/1 imx: mx7dsabresd: include BLK for MMC/eMMC support of driver model
In reply to Eric NelsonHi Eric,
That was the fix I was waiting for, thanks!
On Wed, Oct 11, 2017 at 5:29 PM, Eric Nelson <[email protected]> wrote:
Please add a commit log and explain that this fixes a regression.
Quoted 1 line
Change-Id: I1bdfffe782a61a4c688f1bb56e85448024cd497b
Please remove this line.
Also, when you send a v2, please do the same change in mx7dsabresd_secure_defconfig.
Quoted 1 line
Signed-off-by Eric Nelson <[email protected]>
Now I can boot a kernel successfully, thanks:
PATCH 1/1 imx: mx7dsabresd: include BLK for MMC/eMMC support of driver model
Quoted 12 lines · Fabio Estevam
Hi Eric,
That was the fix I was waiting for, thanks!
On Wed, Oct 11, 2017 at 5:29 PM, Eric Nelson <[email protected]> wrote:
Please add a commit log and explain that this fixes a regression.
Quoted 1 line
Change-Id: I1bdfffe782a61a4c688f1bb56e85448024cd497b
Please remove this line.
Quoted 8 lines
Also, when you send a v2, please do the same change in
mx7dsabresd_secure_defconfig.Quoted 1 line
Signed-off-by Eric Nelson <[email protected]>Now I can boot a kernel successfully, thanks:
Tested-by Fabio Estevam <[email protected]>
Is there perhaps a dependency here we need to enforce via Kconfig so this isn't a game of whack-a-mole? Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171011/468d3322/attachment.sig>
PATCH 1/1 imx: mx7dsabresd: include BLK for MMC/eMMC support of driver model
Hi Tom,
Quoted 16 lines · Tom Rini
Quoted 15 lines · Fabio Estevam
Hi Eric,
That was the fix I was waiting for, thanks!
On Wed, Oct 11, 2017 at 5:29 PM, Eric Nelson <[email protected]> wrote:
Please add a commit log and explain that this fixes a regression.
Quoted 1 line
Change-Id: I1bdfffe782a61a4c688f1bb56e85448024cd497b
Please remove this line.
Also, when you send a v2, please do the same change in
mx7dsabresd_secure_defconfig.
Quoted 9 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Eric Nelson <[email protected]>Now I can boot a kernel successfully, thanks:
Tested-by Fabio Estevam <[email protected]>Is there perhaps a dependency here we need to enforce via
Kconfigso this isn't a game of whack-a-mole? Thanks!
We have a "default Y if DM" for it, which should be enough.
Commit 6fbbcfd explicitly disabled it when converting to DM_MMC (secure_defconfig followed suit in commit 8ae5bb3), and that's where the trouble came in.
Hmmm. A quick search shows that quite a few configurations have this choice (CONFIG_DM_MMC without CONFIG_BLK):
~u-boot/configs$ git grep -l CONFIG_DM_MMC=y | xargs grep BLK am335x_boneblack_vboot_defconfig:# CONFIG_BLK is not set am335x_evm_defconfig:# CONFIG_BLK is not set am335x_hs_evm_defconfig:# CONFIG_BLK is not set am43xx_evm_defconfig:# CONFIG_BLK is not set am43xx_evm_usbhost_boot_defconfig:# CONFIG_BLK is not set am43xx_hs_evm_defconfig:# CONFIG_BLK is not set am57xx_evm_defconfig:# CONFIG_BLK is not set am57xx_hs_evm_defconfig:# CONFIG_BLK is not set k2g_evm_defconfig:# CONFIG_BLK is not set k2g_hs_evm_defconfig:# CONFIG_BLK is not set ls1012aqds_qspi_defconfig:# CONFIG_BLK is not set ls1012ardb_qspi_defconfig:# CONFIG_BLK is not set mx6slevk_defconfig:# CONFIG_BLK is not set mx6slevk_spinor_defconfig:# CONFIG_BLK is not set mx6sllevk_defconfig:# CONFIG_BLK is not set mx6sllevk_plugin_defconfig:# CONFIG_BLK is not set mx6sxsabreauto_defconfig:# CONFIG_BLK is not set mx6ull_14x14_evk_defconfig:# CONFIG_BLK is not set mx6ull_14x14_evk_plugin_defconfig:# CONFIG_BLK is not set mx7ulp_evk_defconfig:# CONFIG_BLK is not set mx7ulp_evk_plugin_defconfig:# CONFIG_BLK is not set omap3_logic_defconfig:# CONFIG_BLK is not set pic32mzdask_defconfig:# CONFIG_BLK is not set
Are all of these broken?
I don't have any of the other boards, and am not in a position to say whether there's a legitimate use case for DM_MMC without BLK.
PATCH 1/1 imx: mx7dsabresd: include BLK for MMC/eMMC support of driver model
In reply to Fabio EstevamHi Fabio,
Quoted 4 lines · Fabio Estevam
Hi Eric,
That was the fix I was waiting for, thanks!
Glad to hear it.
Quoted 4 lines · Eric Nelson
Please add a commit log and explain that this fixes a regression.
Okay. If you insist ;)
Quoted 4 lines
Quoted 1 line
Change-Id: I1bdfffe782a61a4c688f1bb56e85448024cd497b
Please remove this line.
Oops. I think we need to refresh checkpatch. I think the version in the kernel tree checks for that.
Quoted 3 lines
Also, when you send a v2, please do the same change in
mx7dsabresd_secure_defconfig.
Okay.
Quoted 6 lines
Quoted 1 line
Signed-off-by Eric Nelson <[email protected]>Now I can boot a kernel successfully, thanks:
Tested-by Fabio Estevam <[email protected]>
Great.
A message that is not in the archive (sent off-list or not yet received): 1507753798-20666-1-git-send-email-eric-SeqgQ6RdavfQT0dZR+AlfA@public.gmane.org
PATCH v2 1/1 imx: mx7dsabresd: include BLK for MMC/eMMC support of driver model
Commit 6fbbcfd introduced device-tree support for MMC devices on the mx7sabresd boards and didn't include BLK, which requires BLK.
Commit 8ae5bb3 did the same for secure boot.
Fix both by allowing blk-uclass (BLK) support.
---
V2 includes the updated to mx7dsabresd_secure_defconfig
configs/mx7dsabresd_defconfig | 1 - configs/mx7dsabresd_secure_defconfig | 1 - 2 files changed, 2 deletions(-)
configs/mx7dsabresd_defconfig +0 -1
@@ -38,7 +38,6 @@ CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_OF_CONTROL=y -# CONFIG_BLK is not set CONFIG_DFU_MMC=y CONFIG_DFU_RAM=y CONFIG_DM_GPIO=y
configs/mx7dsabresd_secure_defconfig +0 -1
@@ -40,7 +40,6 @@ CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_OF_CONTROL=y -# CONFIG_BLK is not set CONFIG_DFU_MMC=y CONFIG_DFU_RAM=y CONFIG_DM_GPIO=y
Signature · 6 lines
2.7.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1507757654-22114-1-git-send-email-eric-SeqgQ6RdavfQT0dZR+AlfA@public.gmane.org
Re: [PATCH V2] imx: mx7dsabresd: include BLK for MMC/eMMC support of driver model
Please disregard.
I chose the wrong entry in my command-line history and sent this to the wrong list.
Quoted 33 lines · Eric Nelson
Commit 6fbbcfd introduced device-tree support for MMC devices on the mx7sabresd boards and didn't include BLK, which requires BLK.
Commit 8ae5bb3 did the same for secure boot.
Fix both by allowing blk-uclass (BLK) support.
Tested-by Fabio Estevam <[email protected]>Signed-off-by Eric Nelson <[email protected]>---
V2 includes the updated tomx7dsabresd_secure_defconfigconfigs/mx7dsabresd_defconfig | 1 - configs/mx7dsabresd_secure_defconfig | 1 - 2 files changed, 2 deletions(-)configs/mx7dsabresd_defconfig +0
-1@@ -38,7 +38,6 @@ CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_OF_CONTROL=y -# CONFIG_BLK is not set CONFIG_DFU_MMC=y CONFIG_DFU_RAM=y CONFIG_DM_GPIO=yconfigs/mx7dsabresd_secure_defconfig +0
-0
configs/mx7dsabresd_secure_defconfig CONFIG_CMD_EXT4=y · line 45
Quoted 7 lines
configs/mx7dsabresd_secure_defconfig +0
-1@@ -40,7 +40,6 @@ CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_OF_CONTROL=y -# CONFIG_BLK is not set CONFIG_DFU_MMC=y CONFIG_DFU_RAM=y CONFIG_DM_GPIO=y
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v2 1/1 imx: mx7dsabresd: include BLK for MMC/eMMC support of driver model
In reply to Eric NelsonCommit 6fbbcfd introduced device-tree support for MMC devices on the mx7sabresd boards and didn't include BLK, which requires BLK.
Commit 8ae5bb3 did the same for secure boot.
Fix both by allowing blk-uclass (BLK) support.
---
V2 includes the updated to mx7dsabresd_secure_defconfig
configs/mx7dsabresd_defconfig | 1 - configs/mx7dsabresd_secure_defconfig | 1 - 2 files changed, 2 deletions(-)
configs/mx7dsabresd_defconfig +0 -1
@@ -38,7 +38,6 @@ CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_OF_CONTROL=y -# CONFIG_BLK is not set CONFIG_DFU_MMC=y CONFIG_DFU_RAM=y CONFIG_DM_GPIO=y
configs/mx7dsabresd_secure_defconfig +0 -1
@@ -40,7 +40,6 @@ CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_OF_CONTROL=y -# CONFIG_BLK is not set CONFIG_DFU_MMC=y CONFIG_DFU_RAM=y CONFIG_DM_GPIO=y
Signature · 1 line
2.7.4
PATCH v2 1/1 imx: mx7dsabresd: include BLK for MMC/eMMC support of driver model
Quoted 32 lines · Eric Nelson
Commit 6fbbcfd introduced device-tree support for MMC devices on the mx7sabresd boards and didn't include BLK, which requires BLK.
Commit 8ae5bb3 did the same for secure boot.
Fix both by allowing blk-uclass (BLK) support.
Tested-by Fabio Estevam <[email protected]>Signed-off-by Eric Nelson <[email protected]>---
V2 includes the updated tomx7dsabresd_secure_defconfigconfigs/mx7dsabresd_defconfig | 1 - configs/mx7dsabresd_secure_defconfig | 1 - 2 files changed, 2 deletions(-)configs/mx7dsabresd_defconfig +0
-1@@ -38,7 +38,6 @@ CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_OF_CONTROL=y -# CONFIG_BLK is not set CONFIG_DFU_MMC=y CONFIG_DFU_RAM=y CONFIG_DM_GPIO=yconfigs/mx7dsabresd_secure_defconfig +0
-0
configs/mx7dsabresd_secure_defconfig CONFIG_CMD_EXT4=y · line 45
Quoted 7 lines
configs/mx7dsabresd_secure_defconfig +0
-1@@ -40,7 +40,6 @@ CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_OF_CONTROL=y -# CONFIG_BLK is not set CONFIG_DFU_MMC=y CONFIG_DFU_RAM=y CONFIG_DM_GPIO=y
It sounds like BLK shouldn't be default y if DM_MMC but rather selected by DM_MMC. Yes?
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171011/e04eae64/attachment.sig>
PATCH v2 1/1 imx: mx7dsabresd: include BLK for MMC/eMMC support of driver model
Quoted 2 lines · Tom Rini
It sounds like BLK shouldn't be default y if
DM_MMCbut rather selected byDM_MMC. Yes?
What about this?
drivers/mmc/Kconfig +1 -0
@@ -13,6 +13,7 @@ config MMC config DM_MMC bool "Enable MMC controllers using Driver Model" depends on DM + select BLK help This enables the MultiMediaCard (MMC) uclass which supports MMC and Secure Digital I/O (SDIO) cards. Both removable (SD, micro-SD, etc.)
PATCH v2 1/1 imx: mx7dsabresd: include BLK for MMC/eMMC support of driver model
Quoted 10 lines · Fabio Estevam
Quoted 2 lines · Tom Rini
It sounds like BLK shouldn't be default y if
DM_MMCbut rather selected byDM_MMC. Yes?What about this?
drivers/mmc/Kconfig config MMC · line 19
Quoted 7 lines
drivers/mmc/Kconfig +1
-0@@ -13,6 +13,7 @@ config MMC config DM_MMC bool "Enable MMC controllers using Driver Model" depends on DM + select BLK help This enables the MultiMediaCard (MMC) uclass which supports MMC and Secure Digital I/O (SDIO) cards. Both removable (SD, micro-SD, etc.)
Yes, I think that's it, along with removing the default y if DM_MMC from the BLK entry. Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171011/90746733/attachment.sig>
PATCH v2 1/1 imx: mx7dsabresd: include BLK for MMC/eMMC support of driver model
Quoted 2 lines · Tom Rini
Yes, I think that's it, along with removing the default y if
DM_MMCfrom the BLK entry. Thanks!
Ok, if I do as suggested:
drivers/block/Kconfig +0 -1
@@ -1,7 +1,6 @@ config BLK bool "Support block devices" depends on DM - default y if DM_MMC help Enable support for block devices, such as SCSI, MMC and USB flash sticks. These provide a block-level interface which permits
drivers/mmc/Kconfig +1 -0
@@ -13,6 +13,7 @@ config MMC config DM_MMC bool "Enable MMC controllers using Driver Model" depends on DM + select BLK help This enables the MultiMediaCard (MMC) uclass which supports MMC and Secure Digital I/O (SDIO) cards. Both removable (SD, micro-SD, etc.)
Then mx7dsabresd_defconfig build and boots fine.
However, mx6slevk_defconfig fails to build like this:
CC common/usb_storage.ocommon/usb_storage.c: In function ‘usb_stor_probe_device’:common/usb_storage.c:208:30: error: ‘struct usb_device’ has no member named ‘dev’
data = dev_get_platdata(udev->dev);
^
common/usb_storage.c:218:32: error: ‘struct usb_device’ has no member
named ‘dev’
ret = blk_create_devicef(udev->dev, "usb_storage_blk", str,
^I can fix it by doing:
configs/mx6slevk_defconfig +1 -0
@@ -44,6 +44,7 @@ CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y CONFIG_DM_THERMAL=y CONFIG_USB=y +CONFIG_DM_USB=y CONFIG_USB_STORAGE=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y
Is there a better fix for this breakage?
PATCH v2 1/1 imx: mx7dsabresd: include BLK for MMC/eMMC support of driver model
Quoted 57 lines · Fabio Estevam
Quoted 2 lines · Tom Rini
Yes, I think that's it, along with removing the default y if
DM_MMCfrom the BLK entry. Thanks!Ok, if I do as suggested:
drivers/block/Kconfig +0
-1@@ -1,7 +1,6 @@ config BLK bool "Support block devices" depends on DM - default y if DM_MMC help Enable support for block devices, such as SCSI, MMC and USB flash sticks. These provide a block-level interface which permitsdrivers/mmc/Kconfig +1
-0@@ -13,6 +13,7 @@ config MMC config DM_MMC bool "Enable MMC controllers using Driver Model" depends on DM + select BLK help This enables the MultiMediaCard (MMC) uclass which supports MMC and Secure Digital I/O (SDIO) cards. Both removable (SD, micro-SD, etc.)Then
mx7dsabresd_defconfigbuild and boots fine.However,
mx6slevk_defconfigfails to build like this:CC
common/usb_storage.ocommon/usb_storage.c: In function ‘usb_stor_probe_device’:common/usb_storage.c:208:30: error: ‘struct usb_device’ has no member named ‘dev’data = dev_get_platdata(udev->dev); ^ common/usb_storage.c:218:32: error: ‘struct usb_device’ has no member named ‘dev’ ret = blk_create_devicef(udev->dev, "usb_storage_blk", str, ^I can fix it by doing:
configs/mx6slevk_defconfig +1
-0@@ -44,6 +44,7 @@ CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y CONFIG_DM_THERMAL=y CONFIG_USB=y +CONFIG_DM_USB=y CONFIG_USB_STORAGE=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y
Quoted 1 line
Is there a better fix for this breakage?
Hmmm. So, if you have DM and DM_MMC, you need BLK. If you have DM and BLK and USB, you also need DM_USB (and vice-versa, if you have DM and DM_USB and not DM_MMC, things will break too, on another platform I bet). So, DM_USB should also select BLK I think. The case like mx6slkevk where you have DM_USB supported by not enabled are a bug of sorts where it needs to also be enabling DM_USB. I think I'll need to do a world build to see what fails in this case, unless you want to do it? Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171011/1521f14b/attachment.sig>
PATCH v2 1/1 imx: mx7dsabresd: include BLK for MMC/eMMC support of driver model
Quoted 7 lines · Tom Rini
Hmmm. So, if you have DM and
DM_MMC, you need BLK. If you have DM and BLK and USB, you also needDM_USB(and vice-versa, if you have DM andDM_USBand notDM_MMC, things will break too, on another platform I bet). So,DM_USBshould also select BLK I think. The case like mx6slkevk where you haveDM_USBsupported by not enabled are a bug of sorts where it needs to also be enablingDM_USB. I think I'll need to do a world build to see what fails in this case, unless you want to do it? Thanks!
Please go ahead with the build. I am about to leave for holidays.
Thanks
PATCH v2 1/1 imx: mx7dsabresd: include BLK for MMC/eMMC support of driver model
In reply to Tom RiniQuoted 58 lines · Tom Rini
Quoted 57 lines · Fabio Estevam
Quoted 2 lines · Tom Rini
Yes, I think that's it, along with removing the default y if
DM_MMCfrom the BLK entry. Thanks!Ok, if I do as suggested:
drivers/block/Kconfig +0
-1@@ -1,7 +1,6 @@ config BLK bool "Support block devices" depends on DM - default y if DM_MMC help Enable support for block devices, such as SCSI, MMC and USB flash sticks. These provide a block-level interface which permitsdrivers/mmc/Kconfig +1
-0@@ -13,6 +13,7 @@ config MMC config DM_MMC bool "Enable MMC controllers using Driver Model" depends on DM + select BLK help This enables the MultiMediaCard (MMC) uclass which supports MMC and Secure Digital I/O (SDIO) cards. Both removable (SD, micro-SD, etc.)Then
mx7dsabresd_defconfigbuild and boots fine.However,
mx6slevk_defconfigfails to build like this:CC
common/usb_storage.ocommon/usb_storage.c: In function ‘usb_stor_probe_device’:common/usb_storage.c:208:30: error: ‘struct usb_device’ has no member named ‘dev’data = dev_get_platdata(udev->dev); ^ common/usb_storage.c:218:32: error: ‘struct usb_device’ has no member named ‘dev’ ret = blk_create_devicef(udev->dev, "usb_storage_blk", str, ^I can fix it by doing:
configs/mx6slevk_defconfig +1
-0@@ -44,6 +44,7 @@ CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y CONFIG_DM_THERMAL=y CONFIG_USB=y +CONFIG_DM_USB=y CONFIG_USB_STORAGE=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y
Quoted 9 lines
Quoted 1 line
Is there a better fix for this breakage?
Hmmm. So, if you have DM and
DM_MMC, you need BLK. If you have DM and BLK and USB, you also needDM_USB(and vice-versa, if you have DM andDM_USBand notDM_MMC, things will break too, on another platform I bet). So,DM_USBshould also select BLK I think. The case like mx6slkevk where you haveDM_USBsupported by not enabled are a bug of sorts where it needs to also be enablingDM_USB. I think I'll need to do a world build to see what fails in this case, unless you want to do it? Thanks!
OK, disregard what I had been saying. At this point, it's a matter of correcting and testing boards to have either DM_MMC (and DM_USB and BLK) on, or having DM_MMC off (because they want USB gadget support).
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171012/ccff4eb2/attachment.sig>
PATCH v2 1/1 imx: mx7dsabresd: include BLK for MMC/eMMC support of driver model
Tom,
Quoted 3 lines · Tom Rini
OK, disregard what I had been saying. At this point, it's a matter of correcting and testing boards to have either
DM_MMC(andDM_USBand BLK) on, or havingDM_MMCoff (because they want USB gadget support).
Here is what I tried:
https://pastebin.com/yYEdC5fA
but then am335x_hs_evm_defconfig fails like this:
LD spl/drivers/built-in.o
LD spl/u-boot-spl/usr/bin/arm-linux-gnueabi-ld.bfd: u-boot-spl section .rodata' will not fit in region .sram'/usr/bin/arm-linux-gnueabi-ld.bfd: region `.sram' overflowed by 7212 bytes scripts/Makefile.spl:358: recipe for target 'spl/u-boot-spl' failed make[1]: *** [spl/u-boot-spl] Error 1
Makefile:1407: recipe for target 'spl/u-boot-spl' failed
make: *** [spl/u-boot-spl] Error
Suggestions?
PATCH v2 1/1 imx: mx7dsabresd: include BLK for MMC/eMMC support of driver model
Quoted 23 lines · Fabio Estevam
Tom,
Quoted 3 lines · Tom Rini
OK, disregard what I had been saying. At this point, it's a matter of correcting and testing boards to have either
DM_MMC(andDM_USBand BLK) on, or havingDM_MMCoff (because they want USB gadget support).Here is what I tried:
https://pastebin.com/yYEdC5fAbut then
am335x_hs_evm_defconfigfails like this:LD
spl/drivers/built-in.o
LD spl/u-boot-spl/usr/bin/arm-linux-gnueabi-ld.bfd: u-boot-spl section.rodata' will not fit in region.sram'/usr/bin/arm-linux-gnueabi-ld.bfd: region `.sram' overflowed by 7212 bytesscripts/Makefile.spl:358: recipe for target 'spl/u-boot-spl' failed make[1]: *** [spl/u-boot-spl] Error 1
Makefile:1407: recipe for target 'spl/u-boot-spl' failed
make: *** [spl/u-boot-spl] Error
Quoted 1 line
Suggestions?
Yes, just work on the imx* targets. For am33xx/am43xx/am57xx we don't want to swap things around as we then get rid of USB gadget support. It's a bit tricky atm to get all cases covered as, iirc, there's something outstanding for the USB gadget case for DM.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171012/bee18484/attachment.sig>
PATCH v2 1/1 imx: mx7dsabresd: include BLK for MMC/eMMC support of driver model
Quoted 4 lines · Tom Rini
Yes, just work on the imx* targets. For am33xx/am43xx/am57xx we don't want to swap things around as we then get rid of USB gadget support. It's a bit tricky atm to get all cases covered as, iirc, there's something outstanding for the USB gadget case for DM.
Ok, so in this case, should I fix this by touching only the imx6 defconfigs?
PATCH v2 1/1 imx: mx7dsabresd: include BLK for MMC/eMMC support of driver model
Quoted 8 lines · Fabio Estevam
Quoted 4 lines · Tom Rini
Yes, just work on the imx* targets. For am33xx/am43xx/am57xx we don't want to swap things around as we then get rid of USB gadget support. It's a bit tricky atm to get all cases covered as, iirc, there's something outstanding for the USB gadget case for DM.
Ok, so in this case, should I fix this by touching only the imx6 defconfigs?
Yes, thanks.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171012/fae31843/attachment.sig>