aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-06-14 21:28:27 -0600
committerSimon Glass <sjg@chromium.org>2017-07-11 10:08:19 -0600
commit0fcd48fe00e8fb2d433c1bf5ebe586b19228f027 (patch)
tree1b46752f2c58f79c96c7b2e7f05b2228af2d59dd
parentf2105c61821b67bc1d572304d901518e88ee007b (diff)
downloadu-boot-0fcd48fe00e8fb2d433c1bf5ebe586b19228f027.zip
u-boot-0fcd48fe00e8fb2d433c1bf5ebe586b19228f027.tar.gz
u-boot-0fcd48fe00e8fb2d433c1bf5ebe586b19228f027.tar.bz2
scsi: Move drivers into new drivers/scsi directory
At present we have the SCSI drivers in the drivers/block and common/ directories. It is better to split them out into their own place. Use drivers/scsi which is what Linux does. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
-rw-r--r--common/Makefile4
-rw-r--r--drivers/Kconfig2
-rw-r--r--drivers/Makefile3
-rw-r--r--drivers/block/Kconfig18
-rw-r--r--drivers/block/Makefile2
-rw-r--r--drivers/scsi/Kconfig17
-rw-r--r--drivers/scsi/Makefile20
-rw-r--r--drivers/scsi/sandbox_scsi.c (renamed from drivers/block/sandbox_scsi.c)0
-rw-r--r--drivers/scsi/scsi-uclass.c (renamed from drivers/block/scsi-uclass.c)0
-rw-r--r--drivers/scsi/scsi.c (renamed from common/scsi.c)0
10 files changed, 42 insertions, 24 deletions
diff --git a/common/Makefile b/common/Makefile
index f04ddc8..17a92ea 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -79,7 +79,6 @@ obj-$(CONFIG_LCD_ROTATION) += lcd_console_rotation.o
obj-$(CONFIG_LCD_DT_SIMPLEFB) += lcd_simplefb.o
obj-$(CONFIG_LYNXKDI) += lynxkdi.o
obj-$(CONFIG_MENU) += menu.o
-obj-$(CONFIG_SCSI) += scsi.o
obj-$(CONFIG_UPDATE_TFTP) += update.o
obj-$(CONFIG_DFU_TFTP) += update.o
obj-$(CONFIG_USB_KEYBOARD) += usb_kbd.o
@@ -121,9 +120,6 @@ obj-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o
obj-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o
obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
endif
-ifdef CONFIG_SPL_SATA_SUPPORT
-obj-$(CONFIG_SCSI) += scsi.o
-endif
endif
#environment
obj-y += env_common.o
diff --git a/drivers/Kconfig b/drivers/Kconfig
index 63e4034..2e03133 100644
--- a/drivers/Kconfig
+++ b/drivers/Kconfig
@@ -72,6 +72,8 @@ source "drivers/reset/Kconfig"
source "drivers/rtc/Kconfig"
+source "drivers/scsi/Kconfig"
+
source "drivers/serial/Kconfig"
source "drivers/sound/Kconfig"
diff --git a/drivers/Makefile b/drivers/Makefile
index 9bbcc7b..8624bd8 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -45,7 +45,7 @@ obj-$(CONFIG_SPL_DFU_SUPPORT) += dfu/
obj-$(CONFIG_SPL_WATCHDOG_SUPPORT) += watchdog/
obj-$(CONFIG_SPL_USB_HOST_SUPPORT) += usb/host/
obj-$(CONFIG_OMAP_USB_PHY) += usb/phy/
-obj-$(CONFIG_SPL_SATA_SUPPORT) += ata/
+obj-$(CONFIG_SPL_SATA_SUPPORT) += ata/ scsi/
obj-$(CONFIG_SPL_USB_HOST_SUPPORT) += block/
obj-$(CONFIG_SPL_MMC_SUPPORT) += block/
endif
@@ -82,6 +82,7 @@ obj-y += dfu/
obj-$(CONFIG_X86) += pch/
obj-y += phy/marvell/
obj-y += rtc/
+obj-y += scsi/
obj-y += sound/
obj-y += spmi/
obj-y += sysreset/
diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
index 1ddd650..ca7692d 100644
--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
@@ -10,24 +10,6 @@ config BLK
be partitioned into several areas, called 'partitions' in U-Boot.
A filesystem can be placed in each partition.
-config SCSI
- bool "Support SCSI controllers"
- help
- This enables support for SCSI (Small Computer System Interface),
- a parallel interface widely used with storage peripherals such as
- hard drives and optical drives. The SCSI standards define physical
- interfaces as well as protocols for controlling devices and
- tranferring data.
-
-config DM_SCSI
- bool "Support SCSI controllers with driver model"
- depends on BLK
- help
- This option enables the SCSI (Small Computer System Interface) uclass
- which supports SCSI and SATA HDDs. For every device configuration
- (IDs/LUNs) a block device is created with RAW read/write and
- filesystem support.
-
config BLOCK_CACHE
bool "Use block device cache"
default n
diff --git a/drivers/block/Makefile b/drivers/block/Makefile
index 064c76f..a5e7307 100644
--- a/drivers/block/Makefile
+++ b/drivers/block/Makefile
@@ -13,6 +13,6 @@ endif
obj-$(CONFIG_IDE) += ide.o
obj-$(CONFIG_IDE_FTIDE020) += ftide020.o
-obj-$(CONFIG_SANDBOX) += sandbox.o sandbox_scsi.o
+obj-$(CONFIG_SANDBOX) += sandbox.o
obj-$(CONFIG_SYSTEMACE) += systemace.o
obj-$(CONFIG_BLOCK_CACHE) += blkcache.o
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
new file mode 100644
index 0000000..db1606e
--- /dev/null
+++ b/drivers/scsi/Kconfig
@@ -0,0 +1,17 @@
+config SCSI
+ bool "Support SCSI controllers"
+ help
+ This enables support for SCSI (Small Computer System Interface),
+ a parallel interface widely used with storage peripherals such as
+ hard drives and optical drives. The SCSI standards define physical
+ interfaces as well as protocols for controlling devices and
+ tranferring data.
+
+config DM_SCSI
+ bool "Support SCSI controllers with driver model"
+ depends on BLK
+ help
+ This option enables the SCSI (Small Computer System Interface) uclass
+ which supports SCSI and SATA HDDs. For every device configuration
+ (IDs/LUNs) a block device is created with RAW read/write and
+ filesystem support.
diff --git a/drivers/scsi/Makefile b/drivers/scsi/Makefile
new file mode 100644
index 0000000..9e23699
--- /dev/null
+++ b/drivers/scsi/Makefile
@@ -0,0 +1,20 @@
+#
+# (C) Copyright 2000-2007
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+ifndef CONFIG_SPL_BUILD
+obj-$(CONFIG_DM_SCSI) += scsi-uclass.o
+obj-$(CONFIG_SCSI) += scsi.o
+endif
+
+ifdef CONFIG_SPL_BUILD
+ifdef CONFIG_SPL_SATA_SUPPORT
+obj-$(CONFIG_DM_SCSI) += scsi-uclass.o
+obj-$(CONFIG_SCSI) += scsi.o
+endif
+endif
+
+obj-$(CONFIG_SANDBOX) += sandbox_scsi.o
diff --git a/drivers/block/sandbox_scsi.c b/drivers/scsi/sandbox_scsi.c
index f4004a3..f4004a3 100644
--- a/drivers/block/sandbox_scsi.c
+++ b/drivers/scsi/sandbox_scsi.c
diff --git a/drivers/block/scsi-uclass.c b/drivers/scsi/scsi-uclass.c
index 05da6cd..05da6cd 100644
--- a/drivers/block/scsi-uclass.c
+++ b/drivers/scsi/scsi-uclass.c
diff --git a/common/scsi.c b/drivers/scsi/scsi.c
index 6175e50..6175e50 100644
--- a/common/scsi.c
+++ b/drivers/scsi/scsi.c