
Hi Simon,
On Tue, Dec 8, 2015 at 11:38 AM, Simon Glass sjg@chromium.org wrote:
Add a uclass ID for AHCI/SATA. There are no operations and no interface so far, but it is possible to probe a SATA device.
I think we should create an ATA or disk controller uclass, instead of AHCI class. AHCI should be a specific driver scope of this uclass.
Signed-off-by: Simon Glass sjg@chromium.org
drivers/block/Makefile | 2 +- drivers/block/ahci-uclass.c | 14 ++++++++++++++ include/dm/uclass-id.h | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 drivers/block/ahci-uclass.c
diff --git a/drivers/block/Makefile b/drivers/block/Makefile index f161c01..b75c75d 100644 --- a/drivers/block/Makefile +++ b/drivers/block/Makefile @@ -5,7 +5,7 @@ # SPDX-License-Identifier: GPL-2.0+ #
-obj-$(CONFIG_SCSI_AHCI) += ahci.o +obj-$(CONFIG_SCSI_AHCI) += ahci.o ahci-uclass.o obj-$(CONFIG_DWC_AHSATA) += dwc_ahsata.o obj-$(CONFIG_FSL_SATA) += fsl_sata.o obj-$(CONFIG_IDE_FTIDE020) += ftide020.o diff --git a/drivers/block/ahci-uclass.c b/drivers/block/ahci-uclass.c new file mode 100644 index 0000000..7b8c326 --- /dev/null +++ b/drivers/block/ahci-uclass.c @@ -0,0 +1,14 @@ +/*
- Copyright (c) 2015 Google, Inc
- Written by Simon Glass sjg@chromium.org
- SPDX-License-Identifier: GPL-2.0+
- */
+#include <common.h> +#include <dm.h>
+UCLASS_DRIVER(ahci) = {
.id = UCLASS_AHCI,
.name = "ahci",
+}; diff --git a/include/dm/uclass-id.h b/include/dm/uclass-id.h index 4a6827b..c74601a 100644 --- a/include/dm/uclass-id.h +++ b/include/dm/uclass-id.h @@ -26,6 +26,7 @@ enum uclass_id {
/* U-Boot uclasses start here - in alphabetical order */ UCLASS_ADC, /* Analog-to-digital converter */
UCLASS_AHCI, /* AHCI / SATA controller */ UCLASS_CLK, /* Clock source, e.g. used by peripherals */ UCLASS_CPU, /* CPU, typically part of an SoC */ UCLASS_CROS_EC, /* Chrome OS EC */
--
Regards, Bin