diff mbox series

[4/9] nand: Kconfig: Change dependency for NAND_ARASAN

Message ID f58dcaaf8fae74dc9ce506b2f5f333b56aab710e.1597826658.git.michal.simek@xilinx.com
State New
Delegated to: Michal Simek
Headers show
Series Incorrect Kconfig dependencies | expand

Commit Message

Michal Simek Aug. 19, 2020, 8:44 a.m. UTC
NAND_ARASAN selecting DM_MTD uunconditionally. Driver can be enabled with
!DM that's why Kconfig it showing it as error:

WARNING: unmet direct dependencies detected for DM_MTD
  Depends on [n]: DM [=n]
  Selected by [y]:
  - NAND_ARASAN [=y] && MTD_RAW_NAND [=y]

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 drivers/mtd/nand/raw/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini Aug. 19, 2020, 12:31 p.m. UTC | #1
On Wed, Aug 19, 2020 at 10:44:18AM +0200, Michal Simek wrote:

> NAND_ARASAN selecting DM_MTD uunconditionally. Driver can be enabled with
> !DM that's why Kconfig it showing it as error:
> 
> WARNING: unmet direct dependencies detected for DM_MTD
>   Depends on [n]: DM [=n]
>   Selected by [y]:
>   - NAND_ARASAN [=y] && MTD_RAW_NAND [=y]
> 
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
> 
>  drivers/mtd/nand/raw/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
> index 06b2ff972cad..df4cbd52cf5c 100644
> --- a/drivers/mtd/nand/raw/Kconfig
> +++ b/drivers/mtd/nand/raw/Kconfig
> @@ -233,7 +233,7 @@ endif
>  config NAND_ARASAN
>  	bool "Configure Arasan Nand"
>  	select SYS_NAND_SELF_INIT
> -	select DM_MTD
> +	depends on DM_MTD
>  	imply CMD_NAND
>  	help
>  	  This enables Nand driver support for Arasan nand flash

If we can use the driver without DM then we can't depend nor select
DM_MTD.  Is someone using the driver still without DM_MTD?
Michal Simek Aug. 19, 2020, 12:36 p.m. UTC | #2
On 19. 08. 20 14:31, Tom Rini wrote:
> On Wed, Aug 19, 2020 at 10:44:18AM +0200, Michal Simek wrote:
> 
>> NAND_ARASAN selecting DM_MTD uunconditionally. Driver can be enabled with
>> !DM that's why Kconfig it showing it as error:
>>
>> WARNING: unmet direct dependencies detected for DM_MTD
>>   Depends on [n]: DM [=n]
>>   Selected by [y]:
>>   - NAND_ARASAN [=y] && MTD_RAW_NAND [=y]
>>
>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>> ---
>>
>>  drivers/mtd/nand/raw/Kconfig | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
>> index 06b2ff972cad..df4cbd52cf5c 100644
>> --- a/drivers/mtd/nand/raw/Kconfig
>> +++ b/drivers/mtd/nand/raw/Kconfig
>> @@ -233,7 +233,7 @@ endif
>>  config NAND_ARASAN
>>  	bool "Configure Arasan Nand"
>>  	select SYS_NAND_SELF_INIT
>> -	select DM_MTD
>> +	depends on DM_MTD
>>  	imply CMD_NAND
>>  	help
>>  	  This enables Nand driver support for Arasan nand flash
> 
> If we can use the driver without DM then we can't depend nor select
> DM_MTD.  Is someone using the driver still without DM_MTD?
> 

Driver has been converted to DM already. It is used by ZynqMP platforms.
And it can't be used without DM_MTD.

commit b014b833bd627d27542b50e71df9cf0628f241e7
Author:     Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
AuthorDate: Thu Dec 19 02:27:42 2019 -0700
Commit:     Michal Simek <michal.simek@xilinx.com>
CommitDate: Tue Jan 14 09:05:52 2020 +0100

    mtd: nand: Move arasan nand driver to driver model

    Make changes to arasan nand driver to move it to driver model.
    Select DM_MTD if arasan nand driver is selected.

    Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
    Signed-off-by: Michal Simek <michal.simek@xilinx.com>

Thanks,
Michal
Tom Rini Aug. 19, 2020, 12:43 p.m. UTC | #3
On Wed, Aug 19, 2020 at 02:36:20PM +0200, Michal Simek wrote:
> On 19. 08. 20 14:31, Tom Rini wrote:
> > On Wed, Aug 19, 2020 at 10:44:18AM +0200, Michal Simek wrote:
> > 
> >> NAND_ARASAN selecting DM_MTD uunconditionally. Driver can be enabled with
> >> !DM that's why Kconfig it showing it as error:
> >>
> >> WARNING: unmet direct dependencies detected for DM_MTD
> >>   Depends on [n]: DM [=n]
> >>   Selected by [y]:
> >>   - NAND_ARASAN [=y] && MTD_RAW_NAND [=y]
> >>
> >> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> >> ---
> >>
> >>  drivers/mtd/nand/raw/Kconfig | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
> >> index 06b2ff972cad..df4cbd52cf5c 100644
> >> --- a/drivers/mtd/nand/raw/Kconfig
> >> +++ b/drivers/mtd/nand/raw/Kconfig
> >> @@ -233,7 +233,7 @@ endif
> >>  config NAND_ARASAN
> >>  	bool "Configure Arasan Nand"
> >>  	select SYS_NAND_SELF_INIT
> >> -	select DM_MTD
> >> +	depends on DM_MTD
> >>  	imply CMD_NAND
> >>  	help
> >>  	  This enables Nand driver support for Arasan nand flash
> > 
> > If we can use the driver without DM then we can't depend nor select
> > DM_MTD.  Is someone using the driver still without DM_MTD?
> > 
> 
> Driver has been converted to DM already. It is used by ZynqMP platforms.
> And it can't be used without DM_MTD.
> 
> commit b014b833bd627d27542b50e71df9cf0628f241e7
> Author:     Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
> AuthorDate: Thu Dec 19 02:27:42 2019 -0700
> Commit:     Michal Simek <michal.simek@xilinx.com>
> CommitDate: Tue Jan 14 09:05:52 2020 +0100
> 
>     mtd: nand: Move arasan nand driver to driver model
> 
>     Make changes to arasan nand driver to move it to driver model.
>     Select DM_MTD if arasan nand driver is selected.
> 
>     Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
>     Signed-off-by: Michal Simek <michal.simek@xilinx.com>

Ah, I misunderstood the comment, sorry.  Yes, this is right then,
thanks.

Reviewed-by: Tom Rini <trini@konsulko.com>
Michal Simek Aug. 19, 2020, 12:52 p.m. UTC | #4
On 19. 08. 20 14:43, Tom Rini wrote:
> On Wed, Aug 19, 2020 at 02:36:20PM +0200, Michal Simek wrote:
>> On 19. 08. 20 14:31, Tom Rini wrote:
>>> On Wed, Aug 19, 2020 at 10:44:18AM +0200, Michal Simek wrote:
>>>
>>>> NAND_ARASAN selecting DM_MTD uunconditionally. Driver can be enabled with
>>>> !DM that's why Kconfig it showing it as error:
>>>>
>>>> WARNING: unmet direct dependencies detected for DM_MTD
>>>>   Depends on [n]: DM [=n]
>>>>   Selected by [y]:
>>>>   - NAND_ARASAN [=y] && MTD_RAW_NAND [=y]
>>>>
>>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>>>> ---
>>>>
>>>>  drivers/mtd/nand/raw/Kconfig | 2 +-
>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
>>>> index 06b2ff972cad..df4cbd52cf5c 100644
>>>> --- a/drivers/mtd/nand/raw/Kconfig
>>>> +++ b/drivers/mtd/nand/raw/Kconfig
>>>> @@ -233,7 +233,7 @@ endif
>>>>  config NAND_ARASAN
>>>>  	bool "Configure Arasan Nand"
>>>>  	select SYS_NAND_SELF_INIT
>>>> -	select DM_MTD
>>>> +	depends on DM_MTD
>>>>  	imply CMD_NAND
>>>>  	help
>>>>  	  This enables Nand driver support for Arasan nand flash
>>>
>>> If we can use the driver without DM then we can't depend nor select
>>> DM_MTD.  Is someone using the driver still without DM_MTD?
>>>
>>
>> Driver has been converted to DM already. It is used by ZynqMP platforms.
>> And it can't be used without DM_MTD.
>>
>> commit b014b833bd627d27542b50e71df9cf0628f241e7
>> Author:     Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
>> AuthorDate: Thu Dec 19 02:27:42 2019 -0700
>> Commit:     Michal Simek <michal.simek@xilinx.com>
>> CommitDate: Tue Jan 14 09:05:52 2020 +0100
>>
>>     mtd: nand: Move arasan nand driver to driver model
>>
>>     Make changes to arasan nand driver to move it to driver model.
>>     Select DM_MTD if arasan nand driver is selected.
>>
>>     Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
>>     Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> 
> Ah, I misunderstood the comment, sorry.  Yes, this is right then,
> thanks.
> 
> Reviewed-by: Tom Rini <trini@konsulko.com>
> 

ok. I just need to enable this symbol for zynqmp platforms.

Thanks,
Michal
Tom Rini Aug. 19, 2020, 1:15 p.m. UTC | #5
On Wed, Aug 19, 2020 at 02:52:11PM +0200, Michal Simek wrote:
> 
> 
> On 19. 08. 20 14:43, Tom Rini wrote:
> > On Wed, Aug 19, 2020 at 02:36:20PM +0200, Michal Simek wrote:
> >> On 19. 08. 20 14:31, Tom Rini wrote:
> >>> On Wed, Aug 19, 2020 at 10:44:18AM +0200, Michal Simek wrote:
> >>>
> >>>> NAND_ARASAN selecting DM_MTD uunconditionally. Driver can be enabled with
> >>>> !DM that's why Kconfig it showing it as error:
> >>>>
> >>>> WARNING: unmet direct dependencies detected for DM_MTD
> >>>>   Depends on [n]: DM [=n]
> >>>>   Selected by [y]:
> >>>>   - NAND_ARASAN [=y] && MTD_RAW_NAND [=y]
> >>>>
> >>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> >>>> ---
> >>>>
> >>>>  drivers/mtd/nand/raw/Kconfig | 2 +-
> >>>>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>>>
> >>>> diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
> >>>> index 06b2ff972cad..df4cbd52cf5c 100644
> >>>> --- a/drivers/mtd/nand/raw/Kconfig
> >>>> +++ b/drivers/mtd/nand/raw/Kconfig
> >>>> @@ -233,7 +233,7 @@ endif
> >>>>  config NAND_ARASAN
> >>>>  	bool "Configure Arasan Nand"
> >>>>  	select SYS_NAND_SELF_INIT
> >>>> -	select DM_MTD
> >>>> +	depends on DM_MTD
> >>>>  	imply CMD_NAND
> >>>>  	help
> >>>>  	  This enables Nand driver support for Arasan nand flash
> >>>
> >>> If we can use the driver without DM then we can't depend nor select
> >>> DM_MTD.  Is someone using the driver still without DM_MTD?
> >>>
> >>
> >> Driver has been converted to DM already. It is used by ZynqMP platforms.
> >> And it can't be used without DM_MTD.
> >>
> >> commit b014b833bd627d27542b50e71df9cf0628f241e7
> >> Author:     Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
> >> AuthorDate: Thu Dec 19 02:27:42 2019 -0700
> >> Commit:     Michal Simek <michal.simek@xilinx.com>
> >> CommitDate: Tue Jan 14 09:05:52 2020 +0100
> >>
> >>     mtd: nand: Move arasan nand driver to driver model
> >>
> >>     Make changes to arasan nand driver to move it to driver model.
> >>     Select DM_MTD if arasan nand driver is selected.
> >>
> >>     Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
> >>     Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> > 
> > Ah, I misunderstood the comment, sorry.  Yes, this is right then,
> > thanks.
> > 
> > Reviewed-by: Tom Rini <trini@konsulko.com>
> > 
> 
> ok. I just need to enable this symbol for zynqmp platforms.

That is the hard part about all of these patches, when you go from
"select X" to "depends on X", you also need to run a script and make
sure that every config that enables the main symbol (NAND_ARASAN) also
enables the now depended on symbol (DM_MTD) and sync the configs after
the change.
Michal Simek Aug. 19, 2020, 1:21 p.m. UTC | #6
On 19. 08. 20 15:15, Tom Rini wrote:
> On Wed, Aug 19, 2020 at 02:52:11PM +0200, Michal Simek wrote:
>>
>>
>> On 19. 08. 20 14:43, Tom Rini wrote:
>>> On Wed, Aug 19, 2020 at 02:36:20PM +0200, Michal Simek wrote:
>>>> On 19. 08. 20 14:31, Tom Rini wrote:
>>>>> On Wed, Aug 19, 2020 at 10:44:18AM +0200, Michal Simek wrote:
>>>>>
>>>>>> NAND_ARASAN selecting DM_MTD uunconditionally. Driver can be enabled with
>>>>>> !DM that's why Kconfig it showing it as error:
>>>>>>
>>>>>> WARNING: unmet direct dependencies detected for DM_MTD
>>>>>>   Depends on [n]: DM [=n]
>>>>>>   Selected by [y]:
>>>>>>   - NAND_ARASAN [=y] && MTD_RAW_NAND [=y]
>>>>>>
>>>>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>>>>>> ---
>>>>>>
>>>>>>  drivers/mtd/nand/raw/Kconfig | 2 +-
>>>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>>
>>>>>> diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
>>>>>> index 06b2ff972cad..df4cbd52cf5c 100644
>>>>>> --- a/drivers/mtd/nand/raw/Kconfig
>>>>>> +++ b/drivers/mtd/nand/raw/Kconfig
>>>>>> @@ -233,7 +233,7 @@ endif
>>>>>>  config NAND_ARASAN
>>>>>>  	bool "Configure Arasan Nand"
>>>>>>  	select SYS_NAND_SELF_INIT
>>>>>> -	select DM_MTD
>>>>>> +	depends on DM_MTD
>>>>>>  	imply CMD_NAND
>>>>>>  	help
>>>>>>  	  This enables Nand driver support for Arasan nand flash
>>>>>
>>>>> If we can use the driver without DM then we can't depend nor select
>>>>> DM_MTD.  Is someone using the driver still without DM_MTD?
>>>>>
>>>>
>>>> Driver has been converted to DM already. It is used by ZynqMP platforms.
>>>> And it can't be used without DM_MTD.
>>>>
>>>> commit b014b833bd627d27542b50e71df9cf0628f241e7
>>>> Author:     Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
>>>> AuthorDate: Thu Dec 19 02:27:42 2019 -0700
>>>> Commit:     Michal Simek <michal.simek@xilinx.com>
>>>> CommitDate: Tue Jan 14 09:05:52 2020 +0100
>>>>
>>>>     mtd: nand: Move arasan nand driver to driver model
>>>>
>>>>     Make changes to arasan nand driver to move it to driver model.
>>>>     Select DM_MTD if arasan nand driver is selected.
>>>>
>>>>     Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
>>>>     Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>>>
>>> Ah, I misunderstood the comment, sorry.  Yes, this is right then,
>>> thanks.
>>>
>>> Reviewed-by: Tom Rini <trini@konsulko.com>
>>>
>>
>> ok. I just need to enable this symbol for zynqmp platforms.
> 
> That is the hard part about all of these patches, when you go from
> "select X" to "depends on X", you also need to run a script and make
> sure that every config that enables the main symbol (NAND_ARASAN) also
> enables the now depended on symbol (DM_MTD) and sync the configs after
> the change.

This one is easy but others can be problematic.
But there is serious issue with these symbols. When you run make
randconfig you see unfortunately a lot of issues reported.

Do you use any tool/script for defconfig update when Kconfig layout has
changed?

Thanks,
Michal
Michal Simek Sept. 23, 2020, 12:07 p.m. UTC | #7
st 19. 8. 2020 v 10:44 odesílatel Michal Simek <michal.simek@xilinx.com> napsal:
>
> NAND_ARASAN selecting DM_MTD uunconditionally. Driver can be enabled with
> !DM that's why Kconfig it showing it as error:
>
> WARNING: unmet direct dependencies detected for DM_MTD
>   Depends on [n]: DM [=n]
>   Selected by [y]:
>   - NAND_ARASAN [=y] && MTD_RAW_NAND [=y]
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
>  drivers/mtd/nand/raw/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
> index 06b2ff972cad..df4cbd52cf5c 100644
> --- a/drivers/mtd/nand/raw/Kconfig
> +++ b/drivers/mtd/nand/raw/Kconfig
> @@ -233,7 +233,7 @@ endif
>  config NAND_ARASAN
>         bool "Configure Arasan Nand"
>         select SYS_NAND_SELF_INIT
> -       select DM_MTD
> +       depends on DM_MTD
>         imply CMD_NAND
>         help
>           This enables Nand driver support for Arasan nand flash
> --
> 2.28.0
>

Applied just this one patch with defconfig sync.
M
diff mbox series

Patch

diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
index 06b2ff972cad..df4cbd52cf5c 100644
--- a/drivers/mtd/nand/raw/Kconfig
+++ b/drivers/mtd/nand/raw/Kconfig
@@ -233,7 +233,7 @@  endif
 config NAND_ARASAN
 	bool "Configure Arasan Nand"
 	select SYS_NAND_SELF_INIT
-	select DM_MTD
+	depends on DM_MTD
 	imply CMD_NAND
 	help
 	  This enables Nand driver support for Arasan nand flash