mirror of
https://xff.cz/git/u-boot/
synced 2025-09-26 21:11:18 +02:00
ahci: Add a disk-controller uclass
Add a uclass ID for a disk controller. This can be used by AHCI/SATA or other controller types. There are no operations and no interface so far, but it is possible to probe a SATA device. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
config DISK
|
||||||
|
bool "Support disk controllers with driver model"
|
||||||
|
depends on DM
|
||||||
|
default y if DM
|
||||||
|
help
|
||||||
|
This enables a uclass for disk controllers in U-Boot. Various driver
|
||||||
|
types can use this, such as AHCI/SATA. It does not provide any standard
|
||||||
|
operations at present. The block device interface has not been converted
|
||||||
|
to driver model.
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0+
|
# SPDX-License-Identifier: GPL-2.0+
|
||||||
#
|
#
|
||||||
|
|
||||||
|
obj-$(CONFIG_DISK) += disk-uclass.o
|
||||||
obj-$(CONFIG_SCSI_AHCI) += ahci.o
|
obj-$(CONFIG_SCSI_AHCI) += ahci.o
|
||||||
obj-$(CONFIG_DWC_AHSATA) += dwc_ahsata.o
|
obj-$(CONFIG_DWC_AHSATA) += dwc_ahsata.o
|
||||||
obj-$(CONFIG_FSL_SATA) += fsl_sata.o
|
obj-$(CONFIG_FSL_SATA) += fsl_sata.o
|
||||||
|
14
drivers/block/disk-uclass.c
Normal file
14
drivers/block/disk-uclass.c
Normal file
@@ -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(disk) = {
|
||||||
|
.id = UCLASS_DISK,
|
||||||
|
.name = "disk",
|
||||||
|
};
|
@@ -29,6 +29,7 @@ enum uclass_id {
|
|||||||
UCLASS_CLK, /* Clock source, e.g. used by peripherals */
|
UCLASS_CLK, /* Clock source, e.g. used by peripherals */
|
||||||
UCLASS_CPU, /* CPU, typically part of an SoC */
|
UCLASS_CPU, /* CPU, typically part of an SoC */
|
||||||
UCLASS_CROS_EC, /* Chrome OS EC */
|
UCLASS_CROS_EC, /* Chrome OS EC */
|
||||||
|
UCLASS_DISK, /* Disk controller, e.g. SATA */
|
||||||
UCLASS_DISPLAY, /* Display (e.g. DisplayPort, HDMI) */
|
UCLASS_DISPLAY, /* Display (e.g. DisplayPort, HDMI) */
|
||||||
UCLASS_RAM, /* RAM controller */
|
UCLASS_RAM, /* RAM controller */
|
||||||
UCLASS_ETH, /* Ethernet device */
|
UCLASS_ETH, /* Ethernet device */
|
||||||
|
Reference in New Issue
Block a user