Skip to content

Commit dd11376

Browse files
bvanasschemartinkpetersen
authored andcommitted
scsi: ufs: Split the drivers/scsi/ufs directory
Split the drivers/scsi/ufs directory into 'core' and 'host' directories under the drivers/ufs/ directory. Move shared header files into the include/ufs/ directory. This separation makes it clear which header files UFS drivers are allowed to include (include/ufs/*.h) and which header files UFS drivers are not allowed to include (drivers/ufs/core/*.h). Update the MAINTAINERS file. Add myself as a UFS reviewer. Link: https://lore.kernel.org/r/[email protected] Cc: Adrian Hunter <[email protected]> Cc: Avri Altman <[email protected]> Cc: Bean Huo <[email protected]> Cc: Bjorn Andersson <[email protected]> Cc: Keoseong Park <[email protected]> Tested-by: Bean Huo <[email protected]> Tested-by: Adrian Hunter <[email protected]> Reviewed-by: Bean Huo <[email protected]> Acked-by: Avri Altman <[email protected]> Acked-by: Adrian Hunter <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent c10ba0c commit dd11376

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+156
-133
lines changed

MAINTAINERS

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2547,7 +2547,7 @@ F: drivers/pci/controller/dwc/pcie-qcom.c
25472547
F: drivers/phy/qualcomm/
25482548
F: drivers/power/*/msm*
25492549
F: drivers/reset/reset-qcom-*
2550-
F: drivers/scsi/ufs/ufs-qcom*
2550+
F: drivers/ufs/host/ufs-qcom*
25512551
F: drivers/spi/spi-geni-qcom.c
25522552
F: drivers/spi/spi-qcom-qspi.c
25532553
F: drivers/spi/spi-qup.c
@@ -17558,6 +17558,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
1755817558
T: git git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
1755917559
F: Documentation/devicetree/bindings/scsi/
1756017560
F: drivers/scsi/
17561+
F: drivers/ufs/
1756117562
F: include/scsi/
1756217563

1756317564
SCSI TAPE DRIVER
@@ -20199,24 +20200,25 @@ F: include/linux/visorbus.h
2019920200
UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER
2020020201
R: Alim Akhtar <[email protected]>
2020120202
R: Avri Altman <[email protected]>
20203+
R: Bart Van Assche <[email protected]>
2020220204
2020320205
S: Supported
2020420206
F: Documentation/devicetree/bindings/ufs/
2020520207
F: Documentation/scsi/ufs.rst
20206-
F: drivers/scsi/ufs/
20208+
F: drivers/ufs/core/
2020720209

2020820210
UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER DWC HOOKS
2020920211
M: Pedro Sousa <[email protected]>
2021020212
2021120213
S: Supported
20212-
F: drivers/scsi/ufs/*dwc*
20214+
F: drivers/ufs/host/*dwc*
2021320215

2021420216
UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER MEDIATEK HOOKS
2021520217
M: Stanley Chu <[email protected]>
2021620218
2021720219
L: [email protected] (moderated for non-subscribers)
2021820220
S: Maintained
20219-
F: drivers/scsi/ufs/ufs-mediatek*
20221+
F: drivers/ufs/host/ufs-mediatek*
2022020222

2022120223
UNSORTED BLOCK IMAGES (UBI)
2022220224
M: Richard Weinberger <[email protected]>

drivers/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ source "drivers/usb/Kconfig"
107107

108108
source "drivers/mmc/Kconfig"
109109

110+
source "drivers/ufs/Kconfig"
111+
110112
source "drivers/memstick/Kconfig"
111113

112114
source "drivers/leds/Kconfig"

drivers/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ obj-$(CONFIG_PM_OPP) += opp/
128128
obj-$(CONFIG_CPU_FREQ) += cpufreq/
129129
obj-$(CONFIG_CPU_IDLE) += cpuidle/
130130
obj-y += mmc/
131+
obj-y += ufs/
131132
obj-$(CONFIG_MEMSTICK) += memstick/
132133
obj-$(CONFIG_NEW_LEDS) += leds/
133134
obj-$(CONFIG_INFINIBAND) += infiniband/

drivers/scsi/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,6 @@ source "drivers/scsi/megaraid/Kconfig.megaraid"
500500
source "drivers/scsi/mpt3sas/Kconfig"
501501
source "drivers/scsi/mpi3mr/Kconfig"
502502
source "drivers/scsi/smartpqi/Kconfig"
503-
source "drivers/scsi/ufs/Kconfig"
504503

505504
config SCSI_HPTIOP
506505
tristate "HighPoint RocketRAID 3xxx/4xxx Controller support"

drivers/scsi/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ obj-$(CONFIG_MEGARAID_NEWGEN) += megaraid/
101101
obj-$(CONFIG_MEGARAID_SAS) += megaraid/
102102
obj-$(CONFIG_SCSI_MPT3SAS) += mpt3sas/
103103
obj-$(CONFIG_SCSI_MPI3MR) += mpi3mr/
104-
obj-$(CONFIG_SCSI_UFSHCD) += ufs/
105104
obj-$(CONFIG_SCSI_ACARD) += atp870u.o
106105
obj-$(CONFIG_SCSI_SUNESP) += esp_scsi.o sun_esp.o
107106
obj-$(CONFIG_SCSI_INITIO) += initio.o

drivers/ufs/Kconfig

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
#
3+
# UFS subsystem configuration
4+
#
5+
6+
menuconfig SCSI_UFSHCD
7+
tristate "Universal Flash Storage Controller"
8+
depends on SCSI && SCSI_DMA
9+
select PM_DEVFREQ
10+
select DEVFREQ_GOV_SIMPLE_ONDEMAND
11+
select NLS
12+
help
13+
Enables support for UFS (Universal Flash Storage) host controllers.
14+
A UFS host controller is an electronic component that is able to
15+
communicate with a UFS card. UFS host controllers occur in
16+
smartphones, laptops, digital cameras and also in cars.
17+
The kernel module will be called ufshcd.
18+
19+
To compile this driver as a module, choose M here and read
20+
<file:Documentation/scsi/ufs.rst>.
21+
However, do not compile this as a module if your root file system
22+
(the one containing the directory /) is located on a UFS device.
23+
24+
if SCSI_UFSHCD
25+
26+
source "drivers/ufs/core/Kconfig"
27+
28+
source "drivers/ufs/host/Kconfig"
29+
30+
endif

drivers/ufs/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
3+
# The link order is important here. ufshcd-core must initialize
4+
# before vendor drivers.
5+
obj-$(CONFIG_SCSI_UFSHCD) += core/ host/

drivers/ufs/core/Kconfig

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# SPDX-License-Identifier: GPL-2.0+
2+
#
3+
# Kernel configuration file for the UFS Host Controller core.
4+
#
5+
# Copyright (C) 2011-2013 Samsung India Software Operations
6+
#
7+
# Authors:
8+
# Santosh Yaraganavi <[email protected]>
9+
# Vinayak Holikatti <[email protected]>
10+
11+
config SCSI_UFS_BSG
12+
bool "Universal Flash Storage BSG device node"
13+
select BLK_DEV_BSGLIB
14+
help
15+
Universal Flash Storage (UFS) is SCSI transport specification for
16+
accessing flash storage on digital cameras, mobile phones and
17+
consumer electronic devices.
18+
A UFS controller communicates with a UFS device by exchanging
19+
UFS Protocol Information Units (UPIUs).
20+
UPIUs can not only be used as a transport layer for the SCSI protocol
21+
but are also used by the UFS native command set.
22+
This transport driver supports exchanging UFS protocol information units
23+
with a UFS device. See also the ufshcd driver, which is a SCSI driver
24+
that supports UFS devices.
25+
26+
Select this if you need a bsg device node for your UFS controller.
27+
If unsure, say N.
28+
29+
config SCSI_UFS_CRYPTO
30+
bool "UFS Crypto Engine Support"
31+
depends on BLK_INLINE_ENCRYPTION
32+
help
33+
Enable Crypto Engine Support in UFS.
34+
Enabling this makes it possible for the kernel to use the crypto
35+
capabilities of the UFS device (if present) to perform crypto
36+
operations on data being transferred to/from the device.
37+
38+
config SCSI_UFS_HPB
39+
bool "Support UFS Host Performance Booster"
40+
help
41+
The UFS HPB feature improves random read performance. It caches
42+
L2P (logical to physical) map of UFS to host DRAM. The driver uses HPB
43+
read command by piggybacking physical page number for bypassing FTL (flash
44+
translation layer)'s L2P address translation.
45+
46+
config SCSI_UFS_FAULT_INJECTION
47+
bool "UFS Fault Injection Support"
48+
depends on FAULT_INJECTION
49+
help
50+
Enable fault injection support in the UFS driver. This makes it easier
51+
to test the UFS error handler and abort handler.
52+
53+
config SCSI_UFS_HWMON
54+
bool "UFS Temperature Notification"
55+
depends on SCSI_UFSHCD=HWMON || HWMON=y
56+
help
57+
This provides support for UFS hardware monitoring. If enabled,
58+
a hardware monitoring device will be created for the UFS device.
59+
60+
If unsure, say N.

drivers/ufs/core/Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
3+
obj-$(CONFIG_SCSI_UFSHCD) += ufshcd-core.o
4+
ufshcd-core-y += ufshcd.o ufs-sysfs.o
5+
ufshcd-core-$(CONFIG_DEBUG_FS) += ufs-debugfs.o
6+
ufshcd-core-$(CONFIG_SCSI_UFS_BSG) += ufs_bsg.o
7+
ufshcd-core-$(CONFIG_SCSI_UFS_CRYPTO) += ufshcd-crypto.o
8+
ufshcd-core-$(CONFIG_SCSI_UFS_HPB) += ufshpb.o
9+
ufshcd-core-$(CONFIG_SCSI_UFS_FAULT_INJECTION) += ufs-fault-injection.o
10+
ufshcd-core-$(CONFIG_SCSI_UFS_HWMON) += ufs-hwmon.o

drivers/scsi/ufs/ufs-debugfs.c renamed to drivers/ufs/core/ufs-debugfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <linux/debugfs.h>
55

66
#include "ufs-debugfs.h"
7-
#include "ufshcd.h"
7+
#include <ufs/ufshcd.h>
88
#include "ufshcd-priv.h"
99

1010
static struct dentry *ufs_debugfs_root;

0 commit comments

Comments
 (0)