mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM: i.MX6 Phytec phyFLEX: Fix imx6_bbu_nand_register_handler usage
@ 2014-11-10 17:46 Andrey Smirnov
  2014-11-11 14:06 ` Sascha Hauer
  0 siblings, 1 reply; 3+ messages in thread
From: Andrey Smirnov @ 2014-11-10 17:46 UTC (permalink / raw)
  To: barebox; +Cc: andrew.smirnov, cconley

imx6_bbu_nand_register_handler is not availible if
CONFIG_BAREBOX_UPDATE_IMX6_NAND is not selected. Fix this by wrapping
it's usage in preprocessor statements.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 arch/arm/boards/phytec-phyflex-imx6/board.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boards/phytec-phyflex-imx6/board.c b/arch/arm/boards/phytec-phyflex-imx6/board.c
index 09a5c79..9acbd7a 100644
--- a/arch/arm/boards/phytec-phyflex-imx6/board.c
+++ b/arch/arm/boards/phytec-phyflex-imx6/board.c
@@ -81,8 +81,9 @@ static int phytec_pfla02_init(void)
 
 	phy_register_fixup_for_uid(PHY_ID_KSZ9031, MICREL_PHY_ID_MASK,
 					   ksz9031rn_phy_fixup);
-
+#ifdef CONFIG_BAREBOX_UPDATE_IMX6_NAND
 	imx6_bbu_nand_register_handler("nand", BBU_HANDLER_FLAG_DEFAULT);
+#endif
 
 	switch (bootsource_get()) {
 	case BOOTSOURCE_MMC:
-- 
1.9.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ARM: i.MX6 Phytec phyFLEX: Fix imx6_bbu_nand_register_handler usage
  2014-11-10 17:46 [PATCH] ARM: i.MX6 Phytec phyFLEX: Fix imx6_bbu_nand_register_handler usage Andrey Smirnov
@ 2014-11-11 14:06 ` Sascha Hauer
  2014-11-11 21:16   ` Andrey Smirnov
  0 siblings, 1 reply; 3+ messages in thread
From: Sascha Hauer @ 2014-11-11 14:06 UTC (permalink / raw)
  To: Andrey Smirnov; +Cc: barebox, cconley

On Mon, Nov 10, 2014 at 09:46:10AM -0800, Andrey Smirnov wrote:
> imx6_bbu_nand_register_handler is not availible if
> CONFIG_BAREBOX_UPDATE_IMX6_NAND is not selected. Fix this by wrapping
> it's usage in preprocessor statements.
> 
> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
> ---
>  arch/arm/boards/phytec-phyflex-imx6/board.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boards/phytec-phyflex-imx6/board.c b/arch/arm/boards/phytec-phyflex-imx6/board.c
> index 09a5c79..9acbd7a 100644
> --- a/arch/arm/boards/phytec-phyflex-imx6/board.c
> +++ b/arch/arm/boards/phytec-phyflex-imx6/board.c
> @@ -81,8 +81,9 @@ static int phytec_pfla02_init(void)
>  
>  	phy_register_fixup_for_uid(PHY_ID_KSZ9031, MICREL_PHY_ID_MASK,
>  					   ksz9031rn_phy_fixup);
> -
> +#ifdef CONFIG_BAREBOX_UPDATE_IMX6_NAND
>  	imx6_bbu_nand_register_handler("nand", BBU_HANDLER_FLAG_DEFAULT);
> +#endif

the bbu handler register functions normally have a static inline wrapper
if disabled. imx6_bbu_nand_register_handler is a static inline when
CONFIG_BAREBOX_UPDATE is disabled. Maybe this should rather be under
CONFIG_BAREBOX_UPDATE_IMX6_NAND instead. Could you update the patch
accordingly?

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ARM: i.MX6 Phytec phyFLEX: Fix imx6_bbu_nand_register_handler usage
  2014-11-11 14:06 ` Sascha Hauer
@ 2014-11-11 21:16   ` Andrey Smirnov
  0 siblings, 0 replies; 3+ messages in thread
From: Andrey Smirnov @ 2014-11-11 21:16 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox, cconley

Sure. Will post the patch in a separate thread.

On Tue, Nov 11, 2014 at 6:06 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> On Mon, Nov 10, 2014 at 09:46:10AM -0800, Andrey Smirnov wrote:
>> imx6_bbu_nand_register_handler is not availible if
>> CONFIG_BAREBOX_UPDATE_IMX6_NAND is not selected. Fix this by wrapping
>> it's usage in preprocessor statements.
>>
>> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
>> ---
>>  arch/arm/boards/phytec-phyflex-imx6/board.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/boards/phytec-phyflex-imx6/board.c b/arch/arm/boards/phytec-phyflex-imx6/board.c
>> index 09a5c79..9acbd7a 100644
>> --- a/arch/arm/boards/phytec-phyflex-imx6/board.c
>> +++ b/arch/arm/boards/phytec-phyflex-imx6/board.c
>> @@ -81,8 +81,9 @@ static int phytec_pfla02_init(void)
>>
>>       phy_register_fixup_for_uid(PHY_ID_KSZ9031, MICREL_PHY_ID_MASK,
>>                                          ksz9031rn_phy_fixup);
>> -
>> +#ifdef CONFIG_BAREBOX_UPDATE_IMX6_NAND
>>       imx6_bbu_nand_register_handler("nand", BBU_HANDLER_FLAG_DEFAULT);
>> +#endif
>
> the bbu handler register functions normally have a static inline wrapper
> if disabled. imx6_bbu_nand_register_handler is a static inline when
> CONFIG_BAREBOX_UPDATE is disabled. Maybe this should rather be under
> CONFIG_BAREBOX_UPDATE_IMX6_NAND instead. Could you update the patch
> accordingly?
>
> Sascha
>
>
> --
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-11 21:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-10 17:46 [PATCH] ARM: i.MX6 Phytec phyFLEX: Fix imx6_bbu_nand_register_handler usage Andrey Smirnov
2014-11-11 14:06 ` Sascha Hauer
2014-11-11 21:16   ` Andrey Smirnov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox