[PATCH 1/1] pico-imx7d: add baseboard SD card boot detect

From: Benjamin Szőke egyszeregy@freemail.hu
Technexion PICO-IMX7 SoM is supporting USDHC3 (eMMC or micro SD on SoM) and USDHC1 (SD on carrier board) to use on any carrier board like PICO-NYMPH. Based on the U-Boot version from Technexion it adds baseboard SD card boot detect to able to boot from selected USDHC1 or USDHC3 boot devices.
- Add baseboard SD card boot detect from Technexion's U-Boot. - Implement board_mmc_get_env_dev() for pico-imx7d SoM. - Implement mmc_map_to_kernel_blk() for pico-imx7d SoM. - Add board_late_mmc_env_init() to use from common freescale functions to able to provide "mmcdev" and "mmcroot" variables in environment of U-boot. - Add "mmc1" alias to use for usdhc1 in imx7d-pico-pi-u-boot.dtsi. - In default environment set "mmcautodetect=yes" to use boot detection.
Signed-off-by: Benjamin Szőke egyszeregy@freemail.hu --- arch/arm/dts/imx7d-pico-pi-u-boot.dtsi | 1 + board/technexion/pico-imx7d/Makefile | 2 +- board/technexion/pico-imx7d/pico-imx7d.c | 63 ++++++++++++++++ board/technexion/pico-imx7d/spl.c | 91 ++++++++++++++++++++++-- include/configs/pico-imx7d.h | 4 +- 5 files changed, 152 insertions(+), 9 deletions(-)
diff --git a/arch/arm/dts/imx7d-pico-pi-u-boot.dtsi b/arch/arm/dts/imx7d-pico-pi-u-boot.dtsi index 843b4583e5..6289a76486 100644 --- a/arch/arm/dts/imx7d-pico-pi-u-boot.dtsi +++ b/arch/arm/dts/imx7d-pico-pi-u-boot.dtsi @@ -3,6 +3,7 @@ /{ aliases { mmc0 = &usdhc3; + mmc1 = &usdhc1; usb0 = &usbotg1; display0 = &lcdif; }; diff --git a/board/technexion/pico-imx7d/Makefile b/board/technexion/pico-imx7d/Makefile index 4ae3d606b5..61b55fcc55 100644 --- a/board/technexion/pico-imx7d/Makefile +++ b/board/technexion/pico-imx7d/Makefile @@ -1,4 +1,4 @@ # SPDX-License-Identifier: GPL-2.0+ # (C) Copyright 2017 NXP Semiconductors
-obj-y := pico-imx7d.o spl.o +obj-y := pico-imx7d.o spl.o ../../freescale/common/mmc.o diff --git a/board/technexion/pico-imx7d/pico-imx7d.c b/board/technexion/pico-imx7d/pico-imx7d.c index 6e98b85b28..edd66ac7ac 100644 --- a/board/technexion/pico-imx7d/pico-imx7d.c +++ b/board/technexion/pico-imx7d/pico-imx7d.c @@ -13,6 +13,7 @@ #include <asm/global_data.h> #include <asm/gpio.h> #include <asm/mach-imx/iomux-v3.h> +#include <asm/mach-imx/boot_mode.h> #include <asm/io.h> #include <common.h> #include <miiphy.h> @@ -25,6 +26,11 @@ DECLARE_GLOBAL_DATA_PTR; #define UART_PAD_CTRL (PAD_CTL_DSE_3P3V_49OHM | \ PAD_CTL_PUS_PU100KOHM | PAD_CTL_HYS)
+#define PICO_MMC0 0 +#define PICO_MMC0_BLK 2 +#define PICO_MMC1 1 +#define PICO_MMC1_BLK 0 + int dram_init(void) { gd->ram_size = imx_ddr_size(); @@ -176,6 +182,12 @@ int board_late_init(void)
set_wdog_reset(wdog);
+#if CONFIG_IS_ENABLED(FSL_ESDHC_IMX) +#if CONFIG_IS_ENABLED(ENV_IS_IN_MMC) || CONFIG_IS_ENABLED(ENV_IS_NOWHERE) + board_late_mmc_env_init(); +#endif /* CONFIG_ENV_IS_IN_MMC or CONFIG_ENV_IS_NOWHERE */ +#endif + /* * Do not assert internal WDOG_RESET_B_DEB(controlled by bit 4), * since we use PMIC_PWRON to reset the board. @@ -210,3 +222,54 @@ int board_ehci_hcd_init(int port) } return 0; } + +#if CONFIG_IS_ENABLED(FSL_ESDHC_IMX) +#if CONFIG_IS_ENABLED(ENV_IS_IN_MMC) || CONFIG_IS_ENABLED(ENV_IS_NOWHERE) +int board_mmc_get_env_dev(int devno) +{ + int dev_env = 0; + (void)(devno); + + switch (get_boot_device()) { + case SD3_BOOT: + case MMC3_BOOT: + env_set("bootdev", "MMC3"); + dev_env = PICO_MMC0; + break; + case SD1_BOOT: + env_set("bootdev", "SD1"); + dev_env = PICO_MMC1; + break; + default: + printf("Wrong boot device!"); + } + + return dev_env; +} + +int mmc_map_to_kernel_blk(int dev_no) +{ + int blk_no = 0; + + switch (dev_no) { + case PICO_MMC0: + blk_no = PICO_MMC0_BLK; + break; + case PICO_MMC1: + blk_no = PICO_MMC1_BLK; + break; + default: + printf("Invalid MMC device!"); + } + + return blk_no; +} +#endif + +#if CONFIG_IS_ENABLED(ENV_IS_NOWHERE) +int mmc_get_env_dev(void) +{ + return board_mmc_get_env_dev(0); +} +#endif +#endif /* CONFIG_FSL_ESDHC_IMX */ diff --git a/board/technexion/pico-imx7d/spl.c b/board/technexion/pico-imx7d/spl.c index c6b21aaa42..0192eafbaa 100644 --- a/board/technexion/pico-imx7d/spl.c +++ b/board/technexion/pico-imx7d/spl.c @@ -15,6 +15,7 @@ #include <asm/arch/sys_proto.h> #include <asm/arch-mx7/mx7-ddr.h> #include <asm/mach-imx/iomux-v3.h> +#include <asm/mach-imx/boot_mode.h> #include <asm/gpio.h> #include <asm/sections.h> #include <fsl_esdhc_imx.h> @@ -159,7 +160,20 @@ void reset_cpu(void) #define USDHC_PAD_CTRL (PAD_CTL_DSE_3P3V_32OHM | PAD_CTL_SRE_SLOW | \ PAD_CTL_HYS | PAD_CTL_PUE | PAD_CTL_PUS_PU47KOHM)
-static iomux_v3_cfg_t const usdhc3_pads[] = { +#define USDHC1_CD_GPIO IMX_GPIO_NR(5, 0) +/* EMMC/SD */ +static const iomux_v3_cfg_t 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), +}; + +#define USDHC3_CD_GPIO IMX_GPIO_NR(1, 14) +static const iomux_v3_cfg_t usdhc3_emmc_pads[] = { MX7D_PAD_SD3_CLK__SD3_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), MX7D_PAD_SD3_CMD__SD3_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL), MX7D_PAD_SD3_DATA0__SD3_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL), @@ -173,20 +187,83 @@ static iomux_v3_cfg_t const usdhc3_pads[] = { MX7D_PAD_GPIO1_IO14__GPIO1_IO14 | MUX_PAD_CTRL(USDHC_PAD_CTRL), };
-static struct fsl_esdhc_cfg usdhc_cfg[1] = { +static struct fsl_esdhc_cfg usdhc_cfg[2] = { {USDHC3_BASE_ADDR}, + {USDHC1_BASE_ADDR}, };
int board_mmc_getcd(struct mmc *mmc) { - /* Assume uSDHC3 emmc is always present */ - return 1; + struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv; + int ret = 0; + + switch (cfg->esdhc_base) { + case USDHC1_BASE_ADDR: + ret = !gpio_get_value(USDHC1_CD_GPIO); + break; + case USDHC3_BASE_ADDR: + ret = !gpio_get_value(USDHC3_CD_GPIO); + break; + } + + return ret; }
int board_mmc_init(struct bd_info *bis) { - imx_iomux_v3_setup_multiple_pads(usdhc3_pads, ARRAY_SIZE(usdhc3_pads)); - usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK); - return fsl_esdhc_initialize(bis, &usdhc_cfg[0]); + int ret; + u32 index; + + /* + * Following map is done: + * (USDHC) (Physical Port) + * usdhc3 SOM MicroSD/MMC + * usdhc1 Carrier board MicroSD + * Always set boot USDHC as mmc0 + */ + + imx_iomux_v3_setup_multiple_pads(usdhc3_emmc_pads, + ARRAY_SIZE(usdhc3_emmc_pads)); + gpio_direction_input(USDHC3_CD_GPIO); + + imx_iomux_v3_setup_multiple_pads(usdhc1_pads, + ARRAY_SIZE(usdhc1_pads)); + gpio_direction_input(USDHC1_CD_GPIO); + + switch (get_boot_device()) { + case SD1_BOOT: + usdhc_cfg[0].esdhc_base = USDHC1_BASE_ADDR; + usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK); + usdhc_cfg[0].max_bus_width = 4; + usdhc_cfg[1].esdhc_base = USDHC3_BASE_ADDR; + usdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK); + usdhc_cfg[1].max_bus_width = 4; + break; + case MMC3_BOOT: + usdhc_cfg[0].esdhc_base = USDHC3_BASE_ADDR; + usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK); + usdhc_cfg[0].max_bus_width = 8; + usdhc_cfg[1].esdhc_base = USDHC1_BASE_ADDR; + usdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK); + usdhc_cfg[1].max_bus_width = 4; + break; + case SD3_BOOT: + default: + usdhc_cfg[0].esdhc_base = USDHC3_BASE_ADDR; + usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK); + usdhc_cfg[0].max_bus_width = 4; + usdhc_cfg[1].esdhc_base = USDHC1_BASE_ADDR; + usdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK); + usdhc_cfg[1].max_bus_width = 4; + break; + } + + for (index = 0; index < CFG_SYS_FSL_USDHC_NUM; ++index) { + ret = fsl_esdhc_initialize(bis, &usdhc_cfg[index]); + if (ret) + return ret; + } + + return 0; } #endif diff --git a/include/configs/pico-imx7d.h b/include/configs/pico-imx7d.h index 096e5bbe66..e7a8cb20df 100644 --- a/include/configs/pico-imx7d.h +++ b/include/configs/pico-imx7d.h @@ -13,7 +13,7 @@ #define CFG_MXC_UART_BASE UART5_IPS_BASE_ADDR
/* MMC Config */ -#define CFG_SYS_FSL_ESDHC_ADDR 0 +#define CFG_SYS_FSL_ESDHC_ADDR USDHC3_BASE_ADDR
#define CFG_DFU_ENV_SETTINGS \ "dfu_alt_info=" \ @@ -79,9 +79,11 @@ "name=rootfs,size=0,uuid=${uuid_gpt_rootfs}\0" \ "fastboot_partition_alias_system=rootfs\0" \ "setup_emmc=mmc dev 0; gpt write mmc 0 $partitions; reset;\0" \ + "mmcautodetect=yes\0" \ PICO_BOOT_ENV
#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 1) \ func(MMC, mmc, 0) \ func(USB, usb, 0) \ func(PXE, pxe, na) \

Hi Benjamin,
You should have indicated that this is v7.
The subject should be:
[PATCH v7] pico-imx7d: add baseboard SD card boot detect
No need for adding 1/1 for a single patch.
On Tue, Nov 7, 2023 at 7:16 PM egyszeregy@freemail.hu wrote:
From: Benjamin Szőke egyszeregy@freemail.hu
Technexion PICO-IMX7 SoM is supporting USDHC3 (eMMC or micro SD on SoM) and USDHC1 (SD on carrier board) to use on any carrier board like PICO-NYMPH. Based on the U-Boot version from Technexion it adds baseboard SD card boot detect to able to boot from selected USDHC1 or USDHC3 boot devices.
- Add baseboard SD card boot detect from Technexion's U-Boot. - Implement board_mmc_get_env_dev() for pico-imx7d SoM. - Implement mmc_map_to_kernel_blk() for pico-imx7d SoM. - Add board_late_mmc_env_init() to use from common freescale functions to able to provide "mmcdev" and "mmcroot" variables in environment of U-boot. - Add "mmc1" alias to use for usdhc1 in imx7d-pico-pi-u-boot.dtsi. - In default environment set "mmcautodetect=yes" to use boot detection.
These comments above should be placed below the --- line.
Signed-off-by: Benjamin Szőke egyszeregy@freemail.hu
Here you should place the changelog:
Changes since v6: - bla bla bla
+#if CONFIG_IS_ENABLED(FSL_ESDHC_IMX) +#if CONFIG_IS_ENABLED(ENV_IS_IN_MMC) || CONFIG_IS_ENABLED(ENV_IS_NOWHERE) +int board_mmc_get_env_dev(int devno) +{
int dev_env = 0;
(void)(devno);
Why? Just drop this ' (void)(devno);' line.
I tested it successfully, so:
Tested-by: Fabio Estevam festevam@gmail.com

Hi,All previouse stage/patches was a "blind alley" solution because finally i found, many code parts are ready from freesacle sources. So needed to refactor the full codes, which seems now a totally new code/solution for it.So, I don't see the point in describing them in a changelog, useless to share logs about crappy attempts. Also i do not know how can be the git configured to use custom PATCH prefix, it was generated by git automatically.(void)(devno); is need because devno arguments is an unused variable, need to use this solution to suppress any potential warnings.I am ready with this patch, i will not change anything, i am done. If you feel something is missing in the descriptions or in code feel free to change it in text of my patch source or in a new patch, you can do it, if you are a maintainer. Now it's your turn to finalize it if something need more.-------- Eredeti levél --------Feladó: Fabio Estevam festevam@gmail.comDátum: 2023 november 15 18:31:21Tárgy: Re: [PATCH 1/1] pico-imx7d: add baseboard SD card boot detectCímzett: egyszeregy@freemail.huHi Benjamin, You should have indicated that this is v7. The subject should be: [PATCH v7] pico-imx7d: add baseboard SD card boot detect No need for adding 1/1 for a single patch. On Tue, Nov 7, 2023 at 7:16 PM egyszeregy@freemail.hu wrote: > > From: Benjamin Szőke egyszeregy@freemail.hu > > Technexion PICO-IMX7 SoM is supporting USDHC3 (eMMC or micro SD on SoM) > and USDHC1 (SD on carrier board) to use on any carrier board like > PICO-NYMPH. Based on the U-Boot version from Technexion it adds > baseboard SD card boot detect to able to boot from selected USDHC1 > or USDHC3 boot devices. > > - Add baseboard SD card boot detect from Technexion's U-Boot. > - Implement board_mmc_get_env_dev() for pico-imx7d SoM. > - Implement mmc_map_to_kernel_blk() for pico-imx7d SoM. > - Add board_late_mmc_env_init() to use from common freescale > functions to able to provide "mmcdev" and "mmcroot" variables > in environment of U-boot. > - Add "mmc1" alias to use for usdhc1 in imx7d-pico-pi-u-boot.dtsi. > - In default environment set "mmcautodetect=yes" to use boot detection. These comments above should be placed below the --- line. > Signed-off-by: Benjamin Szőke egyszeregy@freemail.hu > --- Here you should place the changelog: Changes since v6: - bla bla bla > +#if CONFIG_IS_ENABLED(FSL_ESDHC_IMX) > +#if CONFIG_IS_ENABLED(ENV_IS_IN_MMC) || CONFIG_IS_ENABLED(ENV_IS_NOWHERE) > +int board_mmc_get_env_dev(int devno) > +{ > + int dev_env = 0; > + (void)(devno); Why? Just drop this ' (void)(devno);' line. I tested it successfully, so: Tested-by: Fabio Estevam festevam@gmail.com

Hi Benjamin,
[Please do not top-post]
On Sun, Nov 19, 2023 at 6:08 PM Szőke Kálmán Benjamin egyszeregy@freemail.hu wrote:
(void)(devno); is need because devno arguments is an unused variable, need to use this solution to suppress any potential warnings.
No, devno is a function parameter. There is no warning if '(void)(devno)' is removed.

It will warn, if warning levels is set correctly. I will do not remove it.https://stackoverflow.com/questions/3599160/how-can-i-suppress-unused-parame... for "top-post" i am using an e-mail servicer which is not prepared to following the 1990s styles which is need for Linux and U-boot developing processes still in 2023. Probably, It would be time to improve the communication platform as well, and it would be better to use GitLab or GitHub PRs.-------- Eredeti levél --------Feladó: Fabio Estevam festevam@gmail.comDátum: 2023 november 19 22:28:31Tárgy: Re: [PATCH 1/1] pico-imx7d: add baseboard SD card boot detectCímzett: Szőke Kálmán Benjamin egyszeregy@freemail.huHi Benjamin, [Please do not top-post] On Sun, Nov 19, 2023 at 6:08 PM Szőke Kálmán Benjamin egyszeregy@freemail.hu wrote: > (void)(devno); is need because devno arguments is an unused variable, need to use this solution to suppress any potential warnings. No, devno is a function parameter. There is no warning if '(void)(devno)' is removed.

On Sun, Nov 19, 2023 at 8:47 PM Szőke Kálmán Benjamin egyszeregy@freemail.hu wrote:
It will warn, if warning levels is set correctly. I will do not remove it.
How can it happen if U-Boot uses warning-1 := -Wextra -Wunused -Wno-unused-parameter ?

It can happen when will -Wall be enabled as in others SW projects. My patches are final, ready and works. I will not remove this "supression", it must be a part of it if the target is to provide code in good quality. If you have any further whishes you can edit my patch and you can be a co-author.-------- Eredeti levél --------Feladó: Fabio Estevam festevam@gmail.comDátum: 2023 november 20 01:18:24Tárgy: Re: [PATCH 1/1] pico-imx7d: add baseboard SD card boot detectCímzett: Szőke Kálmán Benjamin egyszeregy@freemail.huOn Sun, Nov 19, 2023 at 8:47 PM Szőke Kálmán Benjamin egyszeregy@freemail.hu wrote: > > It will warn, if warning levels is set correctly. I will do not remove it. How can it happen if U-Boot uses warning-1 := -Wextra -Wunused -Wno-unused-parameter ?

Hi Benjamin,
On Sun, Nov 26, 2023 at 8:17 PM Szőke Kálmán Benjamin egyszeregy@freemail.hu wrote:
It can happen when will -Wall be enabled as in others SW projects. My patches are final, ready and works. I will not remove this "supression", it must be a part of it if the target is to provide code in good quality. If you have any further whishes you can edit my patch and you can be a co-author.
Sorry, but this makes no sense.
You are going in the opposite direction of good code quality.
Both U-Boot and kernel pass -Wno-unused-parameter.
It is common to write codes for stub functions like this:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/includ...
No (void)parameter is passed as you did in your patch. Like I said, it is unnecessary.

Unused function parameters should be removedhttps://rules.sonarsource.com/c/tag/based-on-misra/RSPEC-1172/Quaility means the full SW has no any functions with unused paramteres. Unfortunatelly it seems u-boot and kernel source code are not best, it is time to improve it. You can see, i did it, so if you do not like it and you would like to keep the bad and historical solution you can change it in my patch yourself as a maintaner. I am not planning to submit any new patch version and my patch is done in my point of view.-------- Eredeti levél --------Feladó: Fabio Estevam festevam@gmail.comDátum: 2023 november 27 01:44:16Tárgy: Re: [PATCH 1/1] pico-imx7d: add baseboard SD card boot detectCímzett: Szőke Kálmán Benjamin egyszeregy@freemail.huHi Benjamin, On Sun, Nov 26, 2023 at 8:17 PM Szőke Kálmán Benjamin egyszeregy@freemail.hu wrote: > > It can happen when will -Wall be enabled as in others SW projects. My patches are final, ready and works. I will not remove this "supression", it must be a part of it if the target is to provide code in good quality. If you have any further whishes you can edit my patch and you can be a co-author. Sorry, but this makes no sense. You are going in the opposite direction of good code quality. Both U-Boot and kernel pass -Wno-unused-parameter. It is common to write codes for stub functions like this: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/includ... No (void)parameter is passed as you did in your patch. Like I said, it is unnecessary.

On Mon, Nov 27, 2023 at 4:55 PM Szőke Kálmán Benjamin egyszeregy@freemail.hu wrote:
Unused function parameters should be removed https://rules.sonarsource.com/c/tag/based-on-misra/RSPEC-1172/
From this same URL:
"Exceptions There are some cases when you want to have an unused parameter (usually because the function has to conform to a fixed prototype"
which is the case here with your patch, where you need to conform to: int board_mmc_get_env_dev(int devno)

It was absolutely conform, i supressed the potentional warning. Once again i say, i will not remove it, if you do not liket it you can remoce as a maintainer. My patch is ready and final. Let's do something to improve i.MX family as a maintainer. I am realy sad to see in last 2-3 years there was no any significats new features for boards since their initial commits.-------- Eredeti levél --------Feladó: Fabio Estevam festevam@gmail.comDátum: 2023 november 27 21:39:19Tárgy: Re: [PATCH 1/1] pico-imx7d: add baseboard SD card boot detectCímzett: Szőke Kálmán Benjamin egyszeregy@freemail.huOn Mon, Nov 27, 2023 at 4:55 PM Szőke Kálmán Benjamin egyszeregy@freemail.hu wrote: > > Unused function parameters should be removed > https://rules.sonarsource.com/c/tag/based-on-misra/RSPEC-1172/ From this same URL: "Exceptions There are some cases when you want to have an unused parameter (usually because the function has to conform to a fixed prototype" which is the case here with your patch, where you need to conform to: int board_mmc_get_env_dev(int devno)

On Mon, 27 Nov 2023 23:26:08 +0000 (GMT) Szőke Kálmán Benjamin egyszeregy@freemail.hu wrote:
It was absolutely conform, i supressed the potentional warning. Once again i say, i will not remove it, if you do not liket it you can remoce as a maintainer. My patch is ready and final. Let's do something to improve i.MX family as a maintainer. I am realy sad to see in last 2-3 years there was no any significats new features for boards since their initial commits.-------- Eredeti levél --------Feladó: Fabio Estevam festevam@gmail.comDátum: 2023 november 27 21:39:19Tárgy: Re: [PATCH 1/1] pico-imx7d: add baseboard SD card boot detectCímzett: Szőke Kálmán Benjamin egyszeregy@freemail.huOn Mon, Nov 27, 2023 at 4:55 PM Szőke Kálmán Benjamin egyszeregy@freemail.hu wrote: > > Unused function parameters should be removed >
https://rules.sonarsource.com/c/tag/based-on-misra/RSPEC-1172/ From this same URL: "Exceptions There are some cases when you want to have an unused parameter (usually because the function has to conform to a fixed prototype" which is the case here with your patch, where you need to conform to: int board_mmc_get_env_dev(int devno)
Hi, please fix your mailer to wrap lines properly.
Hugo Villeneuve.

Sorry i can not fix it, this is an average e-mail service provider that provides the expected tech level in 2023.Please upgrade your u-boot list website engine to able to support e-mail formats/technologies from 2020s ages. I suggest to use similar what Yocto project has: https://lists.yoctoproject.org/g/main-------- Eredeti levél --------Feladó: Hugo Villeneuve hugo@hugovil.comDátum: 2023 november 29 00:17:51Tárgy: Re: [PATCH 1/1] pico-imx7d: add baseboard SD card boot detectCímzett: Szőke Kálmán Benjamin egyszeregy@freemail.huOn Mon, 27 Nov 2023 23:26:08 +0000 (GMT) Szőke Kálmán Benjamin egyszeregy@freemail.hu wrote: > It was absolutely conform, i supressed the potentional warning. Once again i say, i will not remove it, if you do not liket it you can remoce as a maintainer. My patch is ready and final. Let's do something to improve i.MX family as a maintainer. I am realy sad to see in last 2-3 years there was no any significats new features for boards since their initial commits.-------- Eredeti levél --------Feladó: Fabio Estevam festevam@gmail.comDátum: 2023 november 27 21:39:19Tárgy: Re: [PATCH 1/1] pico-imx7d: add baseboard SD card boot detectCímzett: Szőke Kálmán Benjamin egyszeregy@freemail.huOn Mon, Nov 27, 2023 at 4:55 PM Szőke Kálmán Benjamin egyszeregy@freemail.hu wrote: > > Unused function parameters should be removed > https://rules.sonarsource.com/c/tag/based-on-misra/RSPEC-1172/ From this same URL: "Exceptions There are some cases when you want to have an unused parameter (usually because the function has to conform to a fixed prototype" which is the case here with your patch, where you need to conform to: int board_mmc_get_env_dev(int devno) Hi, please fix your mailer to wrap lines properly. Hugo Villeneuve.

On 2023-11-29 00:35, Szőke Kálmán Benjamin wrote:
Sorry i can not fix it, this is an average e-mail service provider that provides the expected tech level in 2023.Please upgrade your u-boot list website engine to able to support e-mail formats/technologies from 2020s ages. I suggest to use similar what Yocto project has: https://lists.yoctoproject.org/g/main--------
Well, it makes me wonder what are those modern email technologies? Is it HTML? Also, I'm getting "group does not exist" on the link above.
Eredeti levél --------Feladó: Hugo Villeneuve hugo@hugovil.comDátum: 2023 november 29 00:17:51Tárgy: Re: [PATCH 1/1] pico-imx7d: add baseboard SD card boot detectCímzett: Szőke Kálmán Benjamin egyszeregy@freemail.huOn Mon, 27 Nov 2023 23:26:08 +0000 (GMT) Szőke Kálmán Benjamin egyszeregy@freemail.hu wrote: > It was absolutely conform, i supressed the potentional warning. Once again i say, i will not remove it, if you do not liket it you can remoce as a maintainer. My patch is ready and final. Let's do something to improve i.MX family as a maintainer. I am realy sad to see in last 2-3 years there was no any significats new features for boards since their initial commits.-------- Eredeti levél --------Feladó: Fabio Estevam festevam@gmail.comDátum: 2023 november 27 21:39:19Tárgy: Re: [PATCH 1/1] pico-imx7d: add baseboard SD card boot detectCímzett: Szőke Kálmán Benjamin egyszeregy@freemail.huOn Mon, Nov 27, 2023 at 4:55 PM Szőke Kálmán Benjamin egyszeregy@freemail.hu wrote: > > Unused function parameters should be removed > https://rules.sonarsource.com/c/tag/based-on-misra/RSPEC-1172/ From this same URL: "Exceptions There are some cases when you want to have an unused parameter (usually because the function has to conform to a fixed prototype" which is the case here with your patch, where you need to conform to: int board_mmc_get_env_dev(int devno) Hi, please fix your mailer to wrap lines properly. Hugo Villeneuve.

https://lists.yoctoproject.org/g/main%C2%A0-------- Eredeti levél --------Feladó: Dragan Simic dsimic@manjaro.orgDátum: 2023 november 29 05:47:55Tárgy: Re: [PATCH 1/1] pico-imx7d: add baseboard SD card boot detectCímzett: Szőke Kálmán Benjamin egyszeregy@freemail.huOn 2023-11-29 00:35, Szőke Kálmán Benjamin wrote: > Sorry i can not fix it, this is an average e-mail service provider > that provides the expected tech level in 2023.Please upgrade your > u-boot list website engine to able to support e-mail > formats/technologies from 2020s ages. I suggest to use similar what > Yocto project has: https://lists.yoctoproject.org/g/main-------- Well, it makes me wonder what are those modern email technologies? Is it HTML? Also, I'm getting "group does not exist" on the link above. > Eredeti levél --------Feladó: Hugo Villeneuve hugo@hugovil.comDátum: > 2023 november 29 00:17:51Tárgy: Re: [PATCH 1/1] pico-imx7d: add > baseboard SD card boot detectCímzett: Szőke Kálmán Benjamin > egyszeregy@freemail.huOn Mon, 27 Nov 2023 23:26:08 +0000 (GMT) Szőke > Kálmán Benjamin egyszeregy@freemail.hu wrote: > It was absolutely > conform, i supressed the potentional warning. Once again i say, i will > not remove it, if you do not liket it you can remoce as a maintainer. > My patch is ready and final. Let's do something to improve i.MX family > as a maintainer. I am realy sad to see in last 2-3 years there was no > any significats new features for boards since their initial > commits.-------- Eredeti levél --------Feladó: Fabio Estevam > festevam@gmail.comDátum: 2023 november 27 21:39:19Tárgy: Re: [PATCH > 1/1] pico-imx7d: add baseboard SD card boot detectCímzett: Szőke > Kálmán Benjamin egyszeregy@freemail.huOn Mon, Nov 27, 2023 at > 4:55 PM Szőke Kálmán Benjamin egyszeregy@freemail.hu wrote: > > > Unused function parameters should be removed > > https://rules.sonarsource.com/c/tag/based-on-misra/RSPEC-1172/ From > this same URL: "Exceptions There are some cases when you want to have > an unused parameter (usually because the function has to conform to a > fixed prototype" which is the case here with your patch, where you > need to conform to: int board_mmc_get_env_dev(int devno) Hi, please > fix your mailer to wrap lines properly. Hugo Villeneuve.

On 2023-11-29 22:12, Szőke Kálmán Benjamin wrote:
Ah, I already used the same mailing list system. I saw no benefits, though.
-------- Eredeti levél --------
Feladó: Dragan Simic dsimic@manjaro.org
Dátum: 2023 november 29 05:47:55
Tárgy: Re: [PATCH 1/1] pico-imx7d: add baseboard SD card boot detect
Címzett: Szőke Kálmán Benjamin egyszeregy@freemail.hu
On 2023-11-29 00:35, Szőke Kálmán Benjamin wrote:
Sorry i can not fix it, this is an average e-mail service provider
that provides the expected tech level in 2023.Please upgrade your
u-boot list website engine to able to support e-mail
formats/technologies from 2020s ages. I suggest to use similar
what
Yocto project has: https://lists.yoctoproject.org/g/main--------
Well, it makes me wonder what are those modern email technologies? Is
it HTML? Also, I'm getting "group does not exist" on the link above.
Eredeti levél --------Feladó: Hugo Villeneuve
hugo@hugovil.comDátum:
2023 november 29 00:17:51Tárgy: Re: [PATCH 1/1] pico-imx7d: add
baseboard SD card boot detectCímzett: Szőke Kálmán Benjamin
egyszeregy@freemail.huOn Mon, 27 Nov 2023 23:26:08 +0000 (GMT)
Szőke
Kálmán Benjamin egyszeregy@freemail.hu wrote: > It was
absolutely
conform, i supressed the potentional warning. Once again i say, i
will
not remove it, if you do not liket it you can remoce as a
maintainer.
My patch is ready and final. Let's do something to improve i.MX
family
as a maintainer. I am realy sad to see in last 2-3 years there was
no
any significats new features for boards since their initial
commits.-------- Eredeti levél --------Feladó: Fabio Estevam
festevam@gmail.comDátum: 2023 november 27 21:39:19Tárgy: Re:
[PATCH
1/1] pico-imx7d: add baseboard SD card boot detectCímzett: Szőke
Kálmán Benjamin egyszeregy@freemail.huOn Mon, Nov 27, 2023 at
4:55 PM Szőke Kálmán Benjamin egyszeregy@freemail.hu wrote:
Unused function parameters should be removed >
https://rules.sonarsource.com/c/tag/based-on-misra/RSPEC-1172/
From
this same URL: "Exceptions There are some cases when you want to
have
an unused parameter (usually because the function has to conform
to a
fixed prototype" which is the case here with your patch, where you
need to conform to: int board_mmc_get_env_dev(int devno) Hi,
please
fix your mailer to wrap lines properly. Hugo Villeneuve.

https://wiki.yoctoproject.org/wiki/GroupsMigrationIt seems to me, you should take little more time to understand the benefits. In Yocto wiki site there is an overview about why was they migrate mailing list to Groups.io some years ago from legacy and outdated Mailman.-------- Eredeti levél --------Feladó: Dragan Simic dsimic@manjaro.orgDátum: 2023 november 29 22:34:25Tárgy: Re: [PATCH 1/1] pico-imx7d: add baseboard SD card boot detectCímzett: Szőke Kálmán Benjamin egyszeregy@freemail.huOn 2023-11-29 22:12, Szőke Kálmán Benjamin wrote: > https://lists.yoctoproject.org/g/main Ah, I already used the same mailing list system. I saw no benefits, though. >> -------- Eredeti levél -------- >> >> Feladó: Dragan Simic dsimic@manjaro.org >> >> Dátum: 2023 november 29 05:47:55 >> >> Tárgy: Re: [PATCH 1/1] pico-imx7d: add baseboard SD card boot >> detect >> >> Címzett: Szőke Kálmán Benjamin egyszeregy@freemail.hu >> >> On 2023-11-29 00:35, Szőke Kálmán Benjamin wrote: >> >>> Sorry i can not fix it, this is an average e-mail service provider >> >> >>> that provides the expected tech level in 2023.Please upgrade your >> >>> u-boot list website engine to able to support e-mail >> >>> formats/technologies from 2020s ages. I suggest to use similar >> what >> >>> Yocto project has: https://lists.yoctoproject.org/g/main-------- >> >> Well, it makes me wonder what are those modern email technologies? >> Is >> >> it HTML? Also, I'm getting "group does not exist" on the link above. >> >> >>> Eredeti levél --------Feladó: Hugo Villeneuve >> hugo@hugovil.comDátum: >> >>> 2023 november 29 00:17:51Tárgy: Re: [PATCH 1/1] pico-imx7d: add >> >>> baseboard SD card boot detectCímzett: Szőke Kálmán Benjamin >> >>> egyszeregy@freemail.huOn Mon, 27 Nov 2023 23:26:08 +0000 (GMT) >> Szőke >> >>> Kálmán Benjamin egyszeregy@freemail.hu wrote: > It was >> absolutely >> >>> conform, i supressed the potentional warning. Once again i say, i >> will >> >>> not remove it, if you do not liket it you can remoce as a >> maintainer. >> >>> My patch is ready and final. Let's do something to improve i.MX >> family >> >>> as a maintainer. I am realy sad to see in last 2-3 years there was >> no >> >>> any significats new features for boards since their initial >> >>> commits.-------- Eredeti levél --------Feladó: Fabio Estevam >> >>> festevam@gmail.comDátum: 2023 november 27 21:39:19Tárgy: Re: >> [PATCH >> >>> 1/1] pico-imx7d: add baseboard SD card boot detectCímzett: Szőke >> >> >>> Kálmán Benjamin egyszeregy@freemail.huOn Mon, Nov 27, 2023 at >> >>> 4:55 PM Szőke Kálmán Benjamin egyszeregy@freemail.hu wrote: >>>> >> >>> Unused function parameters should be removed > >> >>> https://rules.sonarsource.com/c/tag/based-on-misra/RSPEC-1172/ >> From >> >>> this same URL: "Exceptions There are some cases when you want to >> have >> >>> an unused parameter (usually because the function has to conform >> to a >> >>> fixed prototype" which is the case here with your patch, where you >> >> >>> need to conform to: int board_mmc_get_env_dev(int devno) Hi, >> please >> >>> fix your mailer to wrap lines properly. Hugo Villeneuve.

On 2023-11-29 23:13, Szőke Kálmán Benjamin wrote:
https://wiki.yoctoproject.org/wiki/GroupsMigration
It seems to me, you should take little more time to understand the benefits. In Yocto wiki site there is an overview about why was they migrate mailing list to Groups.io some years ago from legacy and outdated Mailman.
I do understand your position, but please understand that many people, myself included, simply avoid using a web browser, and live in the CLI instead, so to speak. For example, Groups.io offers integration with GitHub, Slack, and Trello, but I simply don't like using any of these services, especially the web- or app-based chats, because clicking around much simply isn't my thing.
Groups.io also offers muting threads, which is admittedly a rather neat feature, but the same functionality can already be achieved with procmail, [1][2] even with much greater flexibility, so that's actually nothing new. We also already have searchable archives of the mailing list, and even better, we have a public inbox. [3][4]
[1] https://linux.die.net/man/1/procmail [2] https://linux.die.net/man/5/procmailex [3] https://lore.kernel.org/u-boot/_/text/help/ [4] https://lore.kernel.org/u-boot/
-------- Eredeti levél --------
Feladó: Dragan Simic dsimic@manjaro.org
Dátum: 2023 november 29 22:34:25
Tárgy: Re: [PATCH 1/1] pico-imx7d: add baseboard SD card boot detect
Címzett: Szőke Kálmán Benjamin egyszeregy@freemail.hu
On 2023-11-29 22:12, Szőke Kálmán Benjamin wrote:
Ah, I already used the same mailing list system. I saw no benefits,
though.
-------- Eredeti levél --------
Feladó: Dragan Simic dsimic@manjaro.org
Dátum: 2023 november 29 05:47:55
Tárgy: Re: [PATCH 1/1] pico-imx7d: add baseboard SD card boot
detect
Címzett: Szőke Kálmán Benjamin egyszeregy@freemail.hu
On 2023-11-29 00:35, Szőke Kálmán Benjamin wrote:
Sorry i can not fix it, this is an average e-mail service
provider
that provides the expected tech level in 2023.Please upgrade
your
u-boot list website engine to able to support e-mail
formats/technologies from 2020s ages. I suggest to use similar
what
Yocto project has: https://lists.yoctoproject.org/g/main--------
Well, it makes me wonder what are those modern email
technologies?
Is
it HTML? Also, I'm getting "group does not exist" on the link
above.
Eredeti levél --------Feladó: Hugo Villeneuve
hugo@hugovil.comDátum:
2023 november 29 00:17:51Tárgy: Re: [PATCH 1/1] pico-imx7d: add
baseboard SD card boot detectCímzett: Szőke Kálmán Benjamin
egyszeregy@freemail.huOn Mon, 27 Nov 2023 23:26:08 +0000 (GMT)
Szőke
Kálmán Benjamin egyszeregy@freemail.hu wrote: > It was
absolutely
conform, i supressed the potentional warning. Once again i say,
i
will
not remove it, if you do not liket it you can remoce as a
maintainer.
My patch is ready and final. Let's do something to improve i.MX
family
as a maintainer. I am realy sad to see in last 2-3 years there
was
no
any significats new features for boards since their initial
commits.-------- Eredeti levél --------Feladó: Fabio Estevam
festevam@gmail.comDátum: 2023 november 27 21:39:19Tárgy: Re:
[PATCH
1/1] pico-imx7d: add baseboard SD card boot detectCímzett:
Szőke

On Tue, Nov 7, 2023 at 7:16 PM egyszeregy@freemail.hu wrote:
From: Benjamin Szőke egyszeregy@freemail.hu
Technexion PICO-IMX7 SoM is supporting USDHC3 (eMMC or micro SD on SoM) and USDHC1 (SD on carrier board) to use on any carrier board like PICO-NYMPH. Based on the U-Boot version from Technexion it adds baseboard SD card boot detect to able to boot from selected USDHC1 or USDHC3 boot devices.
- Add baseboard SD card boot detect from Technexion's U-Boot. - Implement board_mmc_get_env_dev() for pico-imx7d SoM. - Implement mmc_map_to_kernel_blk() for pico-imx7d SoM. - Add board_late_mmc_env_init() to use from common freescale functions to able to provide "mmcdev" and "mmcroot" variables in environment of U-boot. - Add "mmc1" alias to use for usdhc1 in imx7d-pico-pi-u-boot.dtsi. - In default environment set "mmcautodetect=yes" to use boot detection.
Signed-off-by: Benjamin Szőke egyszeregy@freemail.hu
Adjusted commit log, removed (void)(devno), and applied itto u-boot-imx next, thanks.
participants (5)
-
Dragan Simic
-
egyszeregy@freemail.hu
-
Fabio Estevam
-
Hugo Villeneuve
-
Szőke Kálmán Benjamin