Re: [PATCH 3/3] soc: fsl: FSL_MC_DPIO selects directly FSL_GUTS

From: Roy Pledge
Date: Fri Aug 16 2019 - 10:57:27 EST


On 8/15/2019 7:09 PM, Li Yang wrote:
> On Wed, Jul 3, 2019 at 9:58 AM Ioana Ciornei <ioana.ciornei@xxxxxxx> wrote:
>> Make FSL_MC_DPIO select directly FSL_GUTS. Without this change we could
>> be in a situation where both FSL_MC_DPIO and SOC_BUS are enabled but
>> FSL_GUTS is not.
>>
>> Signed-off-by: Ioana Ciornei <ioana.ciornei@xxxxxxx>
>> ---
>> drivers/soc/fsl/Kconfig | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/soc/fsl/Kconfig b/drivers/soc/fsl/Kconfig
>> index b6804c04e96f..7e62c1d0aee7 100644
>> --- a/drivers/soc/fsl/Kconfig
>> +++ b/drivers/soc/fsl/Kconfig
>> @@ -22,7 +22,7 @@ config FSL_GUTS
>> config FSL_MC_DPIO
>> tristate "QorIQ DPAA2 DPIO driver"
>> depends on FSL_MC_BUS
>> - select SOC_BUS
>> + select FSL_GUTS
> NACK. Although DPIO only exists on SoCs with the GUTS block for now.
> There is no direct dependency between the two IPs. I don't think we
There isn't a hardware dependency but the DPIO driver does call
soc_device_match(). If FSL_GUTS isn't present we can't distinguish
which SoC is being used and the driver isn't able to setup the correct
stashing destinations. Is there another mechanism we should be using to
get this information?
> should add this dependency to make FSL_GUTS not configurable. Here is
> some explaination from kernel documentation:
>
> select should be used with care. select will force
> a symbol to a value without visiting the dependencies.
> By abusing select you are able to select a symbol FOO even
> if FOO depends on BAR that is not set.
> In general use select only for non-visible symbols
> (no prompts anywhere) and for symbols with no dependencies.
> That will limit the usefulness but on the other hand avoid
> the illegal configurations all over.
>
> We probably shouldn't let it select SOC_BUS either from the beginning,
> as the basic feature of DPIO should still work without defining
> SOC_BUS.
>
> Regards,
> Leo
>
>> help
>> Driver for the DPAA2 DPIO object. A DPIO provides queue and
>> buffer management facilities for software to interact with
>> --
>> 1.9.1
>>