diff mbox series

[U-Boot,v4,1/4] include: reset: check CONFIG_SPL_RESET_SUPPORT

Message ID 1527842722-15593-2-git-send-email-ley.foon.tan@intel.com
State Changes Requested
Delegated to: Tom Rini
Headers show
Series drivers: Add reset ctrl to drivers | expand

Commit Message

Ley Foon Tan June 1, 2018, 8:45 a.m. UTC
Add checking for CONFIG_SPL_RESET_SUPPORT to fix compilation error when
CONFIG_DM_RESET is enabled but CONFIG_SPL_RESET_SUPPORT is disabled in SPL
build.

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
---
 include/reset.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Simon Glass June 1, 2018, 2:26 p.m. UTC | #1
Hi,

On 1 June 2018 at 02:45, Ley Foon Tan <ley.foon.tan@intel.com> wrote:
> Add checking for CONFIG_SPL_RESET_SUPPORT to fix compilation error when
> CONFIG_DM_RESET is enabled but CONFIG_SPL_RESET_SUPPORT is disabled in SPL
> build.
>
> Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
> ---
>  include/reset.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/include/reset.h b/include/reset.h
> index 201bafc..0ac0a47 100644
> --- a/include/reset.h
> +++ b/include/reset.h
> @@ -77,7 +77,8 @@ struct reset_ctl_bulk {
>         unsigned int count;
>  };
>
> -#ifdef CONFIG_DM_RESET
> +#if (!defined(CONFIG_SPL_BUILD) && defined(CONFIG_DM_RESET)) ||        \
> +    (defined(CONFIG_SPL_RESET_SUPPORT) && defined(CONFIG_DM_RESET))

CONFIG_SPL_RESET_SUPPORT should move to Kconfig

Also it should be renamed to CONFIG_SPL_DM_RESET

so that you can use:

#if CONFIG_IS_ENABLED(DM_RESET)

>  /**
>   * reset_get_by_index - Get/request a reset signal by integer index.
>   *
> --
> 2.2.2
>

Regards,
Simon
Ley Foon Tan June 4, 2018, 5:42 a.m. UTC | #2
On Fri, Jun 1, 2018 at 10:26 PM, Simon Glass <sjg@chromium.org> wrote:
> Hi,
>
> On 1 June 2018 at 02:45, Ley Foon Tan <ley.foon.tan@intel.com> wrote:
>> Add checking for CONFIG_SPL_RESET_SUPPORT to fix compilation error when
>> CONFIG_DM_RESET is enabled but CONFIG_SPL_RESET_SUPPORT is disabled in SPL
>> build.
>>
>> Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
>> ---
>>  include/reset.h | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/reset.h b/include/reset.h
>> index 201bafc..0ac0a47 100644
>> --- a/include/reset.h
>> +++ b/include/reset.h
>> @@ -77,7 +77,8 @@ struct reset_ctl_bulk {
>>         unsigned int count;
>>  };
>>
>> -#ifdef CONFIG_DM_RESET
>> +#if (!defined(CONFIG_SPL_BUILD) && defined(CONFIG_DM_RESET)) ||        \
>> +    (defined(CONFIG_SPL_RESET_SUPPORT) && defined(CONFIG_DM_RESET))
>
> CONFIG_SPL_RESET_SUPPORT should move to Kconfig
This config is in Kconfig already.
>
> Also it should be renamed to CONFIG_SPL_DM_RESET
Okay.
>
> so that you can use:
>
> #if CONFIG_IS_ENABLED(DM_RESET)
Okay, will send new patch for this.

Regards
Ley Foon
diff mbox series

Patch

diff --git a/include/reset.h b/include/reset.h
index 201bafc..0ac0a47 100644
--- a/include/reset.h
+++ b/include/reset.h
@@ -77,7 +77,8 @@  struct reset_ctl_bulk {
 	unsigned int count;
 };
 
-#ifdef CONFIG_DM_RESET
+#if (!defined(CONFIG_SPL_BUILD) && defined(CONFIG_DM_RESET)) ||	\
+    (defined(CONFIG_SPL_RESET_SUPPORT) && defined(CONFIG_DM_RESET))
 /**
  * reset_get_by_index - Get/request a reset signal by integer index.
  *