[U-Boot] [PATCH 4/4] Makefile: Correct logic for DM_SCSI + unconverted drivers check
Tom Rini
trini at konsulko.com
Mon Mar 11 14:09:37 UTC 2019
On Mon, Mar 11, 2019 at 01:29:23PM +0100, Stefan Roese wrote:
> When checking for boards that are enabling a SATA driver that isn't
> converted to DM yet we need to be sure to not also trip over boards that
> do set CONFIG_AHCI & CONFIG_BLK by itself, as that is not a bug.
>
> This was detected when converting the Armada XP SATA driver sata_mv.c
> to DM with AHCI & BLK support. This warning is still printed without
> this patch applied here.
>
> Signed-off-by: Stefan Roese <sr at denx.de>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Tom Rini <trini at konsulko.com>
> ---
> Makefile | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index 26db4e7b59..896e0c3350 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -940,6 +940,7 @@ endif
> endif
> ifeq ($(CONFIG_LIBATA)$(CONFIG_MVSATA_IDE),y)
> ifneq ($(CONFIG_DM_SCSI),y)
> +ifneq ($(CONFIG_BLK)$(CONFIG_AHCI),yy)
> @echo >&2 "===================== WARNING ======================"
> @echo >&2 "This board does not use CONFIG_DM_SCSI. Please update"
> @echo >&2 "the storage controller to use CONFIG_DM_SCSI before the v2019.07 release."
OK, I think we need to properly clarify the logic, and perhaps I was
being too clever trying to catch all of the cases under drivers/ata that
aren't converted yet. We have, after your patches, afaict:
- MVSATA_IDE
- DWC_AHSATA
- FSL_SATA
- SATA_SIL
- SATA_SIL3114
Of these, MVSATA_IDE has no further deps. Everything else depends on
LIBATA. Before SATA_MV was converted, everything that was converted
depends on DM_SCSI and AHCI. So I made my messages / logic like the
above. But perhaps the right answer really is:
1) MVSATA_IDE alone.
2) LIBATA && !AHCI
So... we can just re-work the second part of the check logic to be what
you added, as all converted drivers under drivers/ata will be both
BLK&&AHCI enabled.
And also as you note, it's not quite AHCI as the controller in question
here isn't AHCI-compatible, but is SATA, so a fixup / rename of some
CONFIG checks in code / Kconfig is in order, somewhere, but perhaps
after conversion? Also, probably some re-organization of drivers/block,
drivers/ide, drivers/ata, drivers/nvme (and common/usb_storage.c) too,
to be more consistent.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190311/cec30cdf/attachment.sig>
More information about the U-Boot
mailing list