From: Ken Ma <m...@marvell.com> - Add mvebu scsi driver which is based on scsi uclass so that scsi command can work when driver model is enabled for scsi; - Mvebu scsi is serial attached scsi and act as an add-on host bus adapter.
Signed-off-by: Ken Ma <m...@marvell.com> Cc: Simon Glass <s...@chromium.org> Cc: Stefan Roese <s...@denx.de> Cc: Michal Simek <michal.si...@xilinx.com> Reviewed-on: http://vgitil04.il.marvell.com:8080/35301 Reviewed-by: Omri Itach <om...@marvell.com> Reviewed-by: Kostya Porotchkin <kos...@marvell.com> Tested-by: iSoC Platform CI <ykj...@marvell.com> --- drivers/block/Kconfig | 10 ++++++++++ drivers/block/Makefile | 1 + drivers/block/mvebu_scsi.c | 31 +++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 drivers/block/mvebu_scsi.c diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig index 88e66e2..bb27a7f 100644 --- a/drivers/block/Kconfig +++ b/drivers/block/Kconfig @@ -28,6 +28,16 @@ config DM_SCSI (IDs/LUNs) a block device is created with RAW read/write and filesystem support. +config MVEBU_SCSI + bool "Marvell MVEBU SCSI driver" + depends on DM_SCSI + default n + help + Say yes here to support Marvell MVEBU SCSI. + Marvell MVEBU SCSI supports serial attached SCSI(SAS), + which offers backward compatibility with SATA, versions 2 and later. + It allows for SATA drives to be connected to SAS backplanes. + config BLOCK_CACHE bool "Use block device cache" default n diff --git a/drivers/block/Makefile b/drivers/block/Makefile index a72feec..88fe17d 100644 --- a/drivers/block/Makefile +++ b/drivers/block/Makefile @@ -29,5 +29,6 @@ obj-$(CONFIG_SATA_SIL) += sata_sil.o obj-$(CONFIG_IDE_SIL680) += sil680.o obj-$(CONFIG_SANDBOX) += sandbox.o sandbox_scsi.o sata_sandbox.o obj-$(CONFIG_SCSI_SYM53C8XX) += sym53c8xx.o +obj-$(CONFIG_MVEBU_SCSI) += mvebu_scsi.o obj-$(CONFIG_SYSTEMACE) += systemace.o obj-$(CONFIG_BLOCK_CACHE) += blkcache.o diff --git a/drivers/block/mvebu_scsi.c b/drivers/block/mvebu_scsi.c new file mode 100644 index 0000000..0151edcb --- /dev/null +++ b/drivers/block/mvebu_scsi.c @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2016 Marvell International Ltd. + * + * SPDX-License-Identifier: GPL-2.0 + * https://spdx.org/licenses + */ + +#include <common.h> +#include <scsi.h> +#include <dm.h> + +DECLARE_GLOBAL_DATA_PTR; + +static int mvebu_scsi_probe(struct udevice *bus) +{ + /* Do nothing */ + return 0; +} + +static const struct udevice_id mvebu_scsi_ids[] = { + { .compatible = "marvell,mvebu-scsi" }, + { } +}; + +U_BOOT_DRIVER(scsi_mvebu_drv) = { + .name = "scsi_mvebu", + .id = UCLASS_SCSI, + .of_match = mvebu_scsi_ids, + .probe = mvebu_scsi_probe, +}; + -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot