Re: [RFC PATCH v3 1/5] imx8m: drop env_get_location for imx8mn and imx8mp
On Tue, Jan 11, 2022 at 09:35:54AM +, Teresa Remmet wrote: > Hello Tommaso, > > Am Samstag, dem 08.01.2022 um 20:08 +0100 schrieb Tommaso Merciai: > > On Tue, Jan 04, 2022 at 11:04:10AM +, Teresa Remmet wrote: > > > Hello Tommaso, > > > > > > Am Samstag, dem 25.12.2021 um 21:25 +0100 schrieb Tommaso Merciai: > > > > This function defined for two architecture is not really generic > > > > and can generate problem when people add a new board. > > > > > > > > Signed-off-by: Tommaso Merciai > > > > --- > > > > arch/arm/mach-imx/imx8m/soc.c | 39 --- > > > > > > > > > > > > 1 file changed, 39 deletions(-) > > > > > > > > diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach- > > > > imx/imx8m/soc.c > > > > index 863508776d..f0030a557a 100644 > > > > --- a/arch/arm/mach-imx/imx8m/soc.c > > > > +++ b/arch/arm/mach-imx/imx8m/soc.c > > > > @@ -1313,45 +1313,6 @@ void do_error(struct pt_regs *pt_regs, > > > > unsigned int esr) > > > > #endif > > > > > > > > #if defined(CONFIG_IMX8MN) || defined(CONFIG_IMX8MP) > > > > -enum env_location env_get_location(enum env_operation op, int > > > > prio) > > > > -{ > > > > - enum boot_device dev = get_boot_device(); > > > > - enum env_location env_loc = ENVL_UNKNOWN; > > > > - > > > > - if (prio) > > > > - return env_loc; > > > > - > > > > - switch (dev) { > > > > -#ifdef CONFIG_ENV_IS_IN_SPI_FLASH > > > > - case QSPI_BOOT: > > > > - env_loc = ENVL_SPI_FLASH; > > > > - break; > > > > -#endif > > > > -#ifdef CONFIG_ENV_IS_IN_NAND > > > > - case NAND_BOOT: > > > > - env_loc = ENVL_NAND; > > > > - break; > > > > -#endif > > > > -#ifdef CONFIG_ENV_IS_IN_MMC > > > > - case SD1_BOOT: > > > > - case SD2_BOOT: > > > > - case SD3_BOOT: > > > > - case MMC1_BOOT: > > > > - case MMC2_BOOT: > > > > - case MMC3_BOOT: > > > > - env_loc = ENVL_MMC; > > > > - break; > > > > -#endif > > > > - default: > > > > -#if defined(CONFIG_ENV_IS_NOWHERE) > > > > - env_loc = ENVL_NOWHERE; > > > > -#endif > > > > - break; > > > > - } > > > > - > > > > - return env_loc; > > > > -} > > > > - > > > > #ifndef ENV_IS_EMBEDDED > > > > long long env_get_offset(long long defautl_offset) > > > > > > would it not make sense to move also env_get_offset() to board > > > level? > > > > Hi Teresa, > > I think is better to put this function at board level. In this way > > others boards that use i.MX8MN/i.MX8MM SOC can customize > > env_get_location > > function. For example: maybe one user want store U-Boot env on a > > device > > other than the boot device. > > Michael send a patch to remove the function. Which I missed. See: > https://lore.kernel.org/u-boot/2027143456.34441-1-mich...@amarulasolutions.com/ > > So everything is fine then. > > Thanks, > Teresa Hi Teresa, Perfect. Thanks, Tommaso > > > > > Tommaso > > > Regards, > > > Teresa > > > > > > > > > > { > > > -- > > > PHYTEC Messtechnik GmbH | Robert-Koch-Str. 39 | 55129 Mainz, > > > Germany > > > > > > Geschäftsführer: Dipl.-Ing. Michael Mitezki, Dipl.-Ing. Bodo Huber > > > | > > > Handelsregister Mainz HRB 4656 | Finanzamt Mainz | St.Nr. > > > 266500608, DE > > > 149059855 > -- > PHYTEC Messtechnik GmbH | Robert-Koch-Str. 39 | 55129 Mainz, Germany > > Geschäftsführer: Dipl.-Ing. Michael Mitezki, Dipl.-Ing. Bodo Huber | > Handelsregister Mainz HRB 4656 | Finanzamt Mainz | St.Nr. 266500608, DE > 149059855
Re: [RFC PATCH v3 1/5] imx8m: drop env_get_location for imx8mn and imx8mp
Hello Tommaso, Am Samstag, dem 08.01.2022 um 20:08 +0100 schrieb Tommaso Merciai: > On Tue, Jan 04, 2022 at 11:04:10AM +, Teresa Remmet wrote: > > Hello Tommaso, > > > > Am Samstag, dem 25.12.2021 um 21:25 +0100 schrieb Tommaso Merciai: > > > This function defined for two architecture is not really generic > > > and can generate problem when people add a new board. > > > > > > Signed-off-by: Tommaso Merciai > > > --- > > > arch/arm/mach-imx/imx8m/soc.c | 39 --- > > > > > > > > > 1 file changed, 39 deletions(-) > > > > > > diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach- > > > imx/imx8m/soc.c > > > index 863508776d..f0030a557a 100644 > > > --- a/arch/arm/mach-imx/imx8m/soc.c > > > +++ b/arch/arm/mach-imx/imx8m/soc.c > > > @@ -1313,45 +1313,6 @@ void do_error(struct pt_regs *pt_regs, > > > unsigned int esr) > > > #endif > > > > > > #if defined(CONFIG_IMX8MN) || defined(CONFIG_IMX8MP) > > > -enum env_location env_get_location(enum env_operation op, int > > > prio) > > > -{ > > > - enum boot_device dev = get_boot_device(); > > > - enum env_location env_loc = ENVL_UNKNOWN; > > > - > > > - if (prio) > > > - return env_loc; > > > - > > > - switch (dev) { > > > -#ifdef CONFIG_ENV_IS_IN_SPI_FLASH > > > - case QSPI_BOOT: > > > - env_loc = ENVL_SPI_FLASH; > > > - break; > > > -#endif > > > -#ifdef CONFIG_ENV_IS_IN_NAND > > > - case NAND_BOOT: > > > - env_loc = ENVL_NAND; > > > - break; > > > -#endif > > > -#ifdef CONFIG_ENV_IS_IN_MMC > > > - case SD1_BOOT: > > > - case SD2_BOOT: > > > - case SD3_BOOT: > > > - case MMC1_BOOT: > > > - case MMC2_BOOT: > > > - case MMC3_BOOT: > > > - env_loc = ENVL_MMC; > > > - break; > > > -#endif > > > - default: > > > -#if defined(CONFIG_ENV_IS_NOWHERE) > > > - env_loc = ENVL_NOWHERE; > > > -#endif > > > - break; > > > - } > > > - > > > - return env_loc; > > > -} > > > - > > > #ifndef ENV_IS_EMBEDDED > > > long long env_get_offset(long long defautl_offset) > > > > would it not make sense to move also env_get_offset() to board > > level? > > Hi Teresa, > I think is better to put this function at board level. In this way > others boards that use i.MX8MN/i.MX8MM SOC can customize > env_get_location > function. For example: maybe one user want store U-Boot env on a > device > other than the boot device. Michael send a patch to remove the function. Which I missed. See: https://lore.kernel.org/u-boot/2027143456.34441-1-mich...@amarulasolutions.com/ So everything is fine then. Thanks, Teresa > > Tommaso > > Regards, > > Teresa > > > > > > > { > > -- > > PHYTEC Messtechnik GmbH | Robert-Koch-Str. 39 | 55129 Mainz, > > Germany > > > > Geschäftsführer: Dipl.-Ing. Michael Mitezki, Dipl.-Ing. Bodo Huber > > | > > Handelsregister Mainz HRB 4656 | Finanzamt Mainz | St.Nr. > > 266500608, DE > > 149059855 -- PHYTEC Messtechnik GmbH | Robert-Koch-Str. 39 | 55129 Mainz, Germany Geschäftsführer: Dipl.-Ing. Michael Mitezki, Dipl.-Ing. Bodo Huber | Handelsregister Mainz HRB 4656 | Finanzamt Mainz | St.Nr. 266500608, DE 149059855
Re: [RFC PATCH v3 1/5] imx8m: drop env_get_location for imx8mn and imx8mp
On Tue, Jan 04, 2022 at 11:04:10AM +, Teresa Remmet wrote: > Hello Tommaso, > > Am Samstag, dem 25.12.2021 um 21:25 +0100 schrieb Tommaso Merciai: > > This function defined for two architecture is not really generic > > and can generate problem when people add a new board. > > > > Signed-off-by: Tommaso Merciai > > --- > > arch/arm/mach-imx/imx8m/soc.c | 39 --- > > > > 1 file changed, 39 deletions(-) > > > > diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach- > > imx/imx8m/soc.c > > index 863508776d..f0030a557a 100644 > > --- a/arch/arm/mach-imx/imx8m/soc.c > > +++ b/arch/arm/mach-imx/imx8m/soc.c > > @@ -1313,45 +1313,6 @@ void do_error(struct pt_regs *pt_regs, > > unsigned int esr) > > #endif > > > > #if defined(CONFIG_IMX8MN) || defined(CONFIG_IMX8MP) > > -enum env_location env_get_location(enum env_operation op, int prio) > > -{ > > - enum boot_device dev = get_boot_device(); > > - enum env_location env_loc = ENVL_UNKNOWN; > > - > > - if (prio) > > - return env_loc; > > - > > - switch (dev) { > > -#ifdef CONFIG_ENV_IS_IN_SPI_FLASH > > - case QSPI_BOOT: > > - env_loc = ENVL_SPI_FLASH; > > - break; > > -#endif > > -#ifdef CONFIG_ENV_IS_IN_NAND > > - case NAND_BOOT: > > - env_loc = ENVL_NAND; > > - break; > > -#endif > > -#ifdef CONFIG_ENV_IS_IN_MMC > > - case SD1_BOOT: > > - case SD2_BOOT: > > - case SD3_BOOT: > > - case MMC1_BOOT: > > - case MMC2_BOOT: > > - case MMC3_BOOT: > > - env_loc = ENVL_MMC; > > - break; > > -#endif > > - default: > > -#if defined(CONFIG_ENV_IS_NOWHERE) > > - env_loc = ENVL_NOWHERE; > > -#endif > > - break; > > - } > > - > > - return env_loc; > > -} > > - > > #ifndef ENV_IS_EMBEDDED > > long long env_get_offset(long long defautl_offset) > > would it not make sense to move also env_get_offset() to board level? Hi Teresa, I think is better to put this function at board level. In this way others boards that use i.MX8MN/i.MX8MM SOC can customize env_get_location function. For example: maybe one user want store U-Boot env on a device other than the boot device. Tommaso > > Regards, > Teresa > > > > { > -- > PHYTEC Messtechnik GmbH | Robert-Koch-Str. 39 | 55129 Mainz, Germany > > Geschäftsführer: Dipl.-Ing. Michael Mitezki, Dipl.-Ing. Bodo Huber | > Handelsregister Mainz HRB 4656 | Finanzamt Mainz | St.Nr. 266500608, DE > 149059855
Re: [RFC PATCH v3 1/5] imx8m: drop env_get_location for imx8mn and imx8mp
Hello Michael, Am Dienstag, dem 04.01.2022 um 12:06 +0100 schrieb Michael Nazzareno Trimarchi: > Hi Teresa > > On Tue, Jan 4, 2022 at 12:04 PM Teresa Remmet > wrote: > > Hello Tommaso, > > > > Am Samstag, dem 25.12.2021 um 21:25 +0100 schrieb Tommaso Merciai: > > > This function defined for two architecture is not really generic > > > and can generate problem when people add a new board. > > > > > > Signed-off-by: Tommaso Merciai > > > --- > > > arch/arm/mach-imx/imx8m/soc.c | 39 --- > > > > > > > > > 1 file changed, 39 deletions(-) > > > > > > diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach- > > > imx/imx8m/soc.c > > > index 863508776d..f0030a557a 100644 > > > --- a/arch/arm/mach-imx/imx8m/soc.c > > > +++ b/arch/arm/mach-imx/imx8m/soc.c > > > @@ -1313,45 +1313,6 @@ void do_error(struct pt_regs *pt_regs, > > > unsigned int esr) > > > #endif > > > > > > #if defined(CONFIG_IMX8MN) || defined(CONFIG_IMX8MP) > > > -enum env_location env_get_location(enum env_operation op, int > > > prio) > > > -{ > > > - enum boot_device dev = get_boot_device(); > > > - enum env_location env_loc = ENVL_UNKNOWN; > > > - > > > - if (prio) > > > - return env_loc; > > > - > > > - switch (dev) { > > > -#ifdef CONFIG_ENV_IS_IN_SPI_FLASH > > > - case QSPI_BOOT: > > > - env_loc = ENVL_SPI_FLASH; > > > - break; > > > -#endif > > > -#ifdef CONFIG_ENV_IS_IN_NAND > > > - case NAND_BOOT: > > > - env_loc = ENVL_NAND; > > > - break; > > > -#endif > > > -#ifdef CONFIG_ENV_IS_IN_MMC > > > - case SD1_BOOT: > > > - case SD2_BOOT: > > > - case SD3_BOOT: > > > - case MMC1_BOOT: > > > - case MMC2_BOOT: > > > - case MMC3_BOOT: > > > - env_loc = ENVL_MMC; > > > - break; > > > -#endif > > > - default: > > > -#if defined(CONFIG_ENV_IS_NOWHERE) > > > - env_loc = ENVL_NOWHERE; > > > -#endif > > > - break; > > > - } > > > - > > > - return env_loc; > > > -} > > > - > > > #ifndef ENV_IS_EMBEDDED > > > long long env_get_offset(long long defautl_offset) > > > > would it not make sense to move also env_get_offset() to board > > level? > > > > Drop it in another patch. This is not reference in uboot Ah thanks! Teresa > > Michael > > > Regards, > > Teresa > > > > > > > { > > -- > > PHYTEC Messtechnik GmbH | Robert-Koch-Str. 39 | 55129 Mainz, > > Germany > > > > Geschäftsführer: Dipl.-Ing. Michael Mitezki, Dipl.-Ing. Bodo Huber > > | > > Handelsregister Mainz HRB 4656 | Finanzamt Mainz | St.Nr. > > 266500608, DE > > 149059855 > > -- PHYTEC Messtechnik GmbH | Robert-Koch-Str. 39 | 55129 Mainz, Germany Geschäftsführer: Dipl.-Ing. Michael Mitezki, Dipl.-Ing. Bodo Huber | Handelsregister Mainz HRB 4656 | Finanzamt Mainz | St.Nr. 266500608, DE 149059855
Re: [RFC PATCH v3 1/5] imx8m: drop env_get_location for imx8mn and imx8mp
Hi Teresa On Tue, Jan 4, 2022 at 12:04 PM Teresa Remmet wrote: > > Hello Tommaso, > > Am Samstag, dem 25.12.2021 um 21:25 +0100 schrieb Tommaso Merciai: > > This function defined for two architecture is not really generic > > and can generate problem when people add a new board. > > > > Signed-off-by: Tommaso Merciai > > --- > > arch/arm/mach-imx/imx8m/soc.c | 39 --- > > > > 1 file changed, 39 deletions(-) > > > > diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach- > > imx/imx8m/soc.c > > index 863508776d..f0030a557a 100644 > > --- a/arch/arm/mach-imx/imx8m/soc.c > > +++ b/arch/arm/mach-imx/imx8m/soc.c > > @@ -1313,45 +1313,6 @@ void do_error(struct pt_regs *pt_regs, > > unsigned int esr) > > #endif > > > > #if defined(CONFIG_IMX8MN) || defined(CONFIG_IMX8MP) > > -enum env_location env_get_location(enum env_operation op, int prio) > > -{ > > - enum boot_device dev = get_boot_device(); > > - enum env_location env_loc = ENVL_UNKNOWN; > > - > > - if (prio) > > - return env_loc; > > - > > - switch (dev) { > > -#ifdef CONFIG_ENV_IS_IN_SPI_FLASH > > - case QSPI_BOOT: > > - env_loc = ENVL_SPI_FLASH; > > - break; > > -#endif > > -#ifdef CONFIG_ENV_IS_IN_NAND > > - case NAND_BOOT: > > - env_loc = ENVL_NAND; > > - break; > > -#endif > > -#ifdef CONFIG_ENV_IS_IN_MMC > > - case SD1_BOOT: > > - case SD2_BOOT: > > - case SD3_BOOT: > > - case MMC1_BOOT: > > - case MMC2_BOOT: > > - case MMC3_BOOT: > > - env_loc = ENVL_MMC; > > - break; > > -#endif > > - default: > > -#if defined(CONFIG_ENV_IS_NOWHERE) > > - env_loc = ENVL_NOWHERE; > > -#endif > > - break; > > - } > > - > > - return env_loc; > > -} > > - > > #ifndef ENV_IS_EMBEDDED > > long long env_get_offset(long long defautl_offset) > > would it not make sense to move also env_get_offset() to board level? > Drop it in another patch. This is not reference in uboot Michael > Regards, > Teresa > > > > { > -- > PHYTEC Messtechnik GmbH | Robert-Koch-Str. 39 | 55129 Mainz, Germany > > Geschäftsführer: Dipl.-Ing. Michael Mitezki, Dipl.-Ing. Bodo Huber | > Handelsregister Mainz HRB 4656 | Finanzamt Mainz | St.Nr. 266500608, DE > 149059855 -- Michael Nazzareno Trimarchi Co-Founder & Chief Executive Officer M. +39 347 913 2170 mich...@amarulasolutions.com __ Amarula Solutions BV Joop Geesinkweg 125, 1114 AB, Amsterdam, NL T. +31 (0)85 111 9172 i...@amarulasolutions.com www.amarulasolutions.com
Re: [RFC PATCH v3 1/5] imx8m: drop env_get_location for imx8mn and imx8mp
Hello Tommaso, Am Samstag, dem 25.12.2021 um 21:25 +0100 schrieb Tommaso Merciai: > This function defined for two architecture is not really generic > and can generate problem when people add a new board. > > Signed-off-by: Tommaso Merciai > --- > arch/arm/mach-imx/imx8m/soc.c | 39 --- > > 1 file changed, 39 deletions(-) > > diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach- > imx/imx8m/soc.c > index 863508776d..f0030a557a 100644 > --- a/arch/arm/mach-imx/imx8m/soc.c > +++ b/arch/arm/mach-imx/imx8m/soc.c > @@ -1313,45 +1313,6 @@ void do_error(struct pt_regs *pt_regs, > unsigned int esr) > #endif > > #if defined(CONFIG_IMX8MN) || defined(CONFIG_IMX8MP) > -enum env_location env_get_location(enum env_operation op, int prio) > -{ > - enum boot_device dev = get_boot_device(); > - enum env_location env_loc = ENVL_UNKNOWN; > - > - if (prio) > - return env_loc; > - > - switch (dev) { > -#ifdef CONFIG_ENV_IS_IN_SPI_FLASH > - case QSPI_BOOT: > - env_loc = ENVL_SPI_FLASH; > - break; > -#endif > -#ifdef CONFIG_ENV_IS_IN_NAND > - case NAND_BOOT: > - env_loc = ENVL_NAND; > - break; > -#endif > -#ifdef CONFIG_ENV_IS_IN_MMC > - case SD1_BOOT: > - case SD2_BOOT: > - case SD3_BOOT: > - case MMC1_BOOT: > - case MMC2_BOOT: > - case MMC3_BOOT: > - env_loc = ENVL_MMC; > - break; > -#endif > - default: > -#if defined(CONFIG_ENV_IS_NOWHERE) > - env_loc = ENVL_NOWHERE; > -#endif > - break; > - } > - > - return env_loc; > -} > - > #ifndef ENV_IS_EMBEDDED > long long env_get_offset(long long defautl_offset) would it not make sense to move also env_get_offset() to board level? Regards, Teresa > { -- PHYTEC Messtechnik GmbH | Robert-Koch-Str. 39 | 55129 Mainz, Germany Geschäftsführer: Dipl.-Ing. Michael Mitezki, Dipl.-Ing. Bodo Huber | Handelsregister Mainz HRB 4656 | Finanzamt Mainz | St.Nr. 266500608, DE 149059855
[RFC PATCH v3 1/5] imx8m: drop env_get_location for imx8mn and imx8mp
This function defined for two architecture is not really generic and can generate problem when people add a new board. Signed-off-by: Tommaso Merciai --- arch/arm/mach-imx/imx8m/soc.c | 39 --- 1 file changed, 39 deletions(-) diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c index 863508776d..f0030a557a 100644 --- a/arch/arm/mach-imx/imx8m/soc.c +++ b/arch/arm/mach-imx/imx8m/soc.c @@ -1313,45 +1313,6 @@ void do_error(struct pt_regs *pt_regs, unsigned int esr) #endif #if defined(CONFIG_IMX8MN) || defined(CONFIG_IMX8MP) -enum env_location env_get_location(enum env_operation op, int prio) -{ - enum boot_device dev = get_boot_device(); - enum env_location env_loc = ENVL_UNKNOWN; - - if (prio) - return env_loc; - - switch (dev) { -#ifdef CONFIG_ENV_IS_IN_SPI_FLASH - case QSPI_BOOT: - env_loc = ENVL_SPI_FLASH; - break; -#endif -#ifdef CONFIG_ENV_IS_IN_NAND - case NAND_BOOT: - env_loc = ENVL_NAND; - break; -#endif -#ifdef CONFIG_ENV_IS_IN_MMC - case SD1_BOOT: - case SD2_BOOT: - case SD3_BOOT: - case MMC1_BOOT: - case MMC2_BOOT: - case MMC3_BOOT: - env_loc = ENVL_MMC; - break; -#endif - default: -#if defined(CONFIG_ENV_IS_NOWHERE) - env_loc = ENVL_NOWHERE; -#endif - break; - } - - return env_loc; -} - #ifndef ENV_IS_EMBEDDED long long env_get_offset(long long defautl_offset) { -- 2.25.1