linux/drivers
Serge Semin d6bbd1193f
spi: dw: Add DWC SSI capability
Currently DWC SSI core is supported by means of setting up the
core-specific update_cr0() callback. It isn't suitable for multiple
reasons. First of all having exported several methods doing the same thing
but for different chips makes the code harder to maintain. Secondly the
spi-dw-core driver exports the methods, then the spi-dw-mmio driver sets
the private data callback with one of them so to be called by the core
driver again. That makes the code logic too complicated. Thirdly using
callbacks for just updating the CR0 register is problematic, since in case
if the register needed to be updated from different parts of the code,
we'd have to create another callback (for instance the SPI device-specific
parameters don't need to be calculated each time the SPI transfer is
submitted, so it's better to pre-calculate the CR0 data at the SPI-device
setup stage).

So keeping all the above in mind let's discard the update_cr0() callbacks,
define a generic and static dw_spi_update_cr0() method and create the
DW_SPI_CAP_DWC_SSI capability, which when enabled would activate the
alternative CR0 register layout.

While at it add the comments to the code path of the normal DW APB SSI
controller setup to make the dw_spi_update_cr0() method looking coherent.

Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Link: https://lore.kernel.org/r/20201007235511.4935-3-Sergey.Semin@baikalelectronics.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-10-08 23:00:06 +01:00
..
accessibility Char/Misc driver fixes for 5.9-rc3 2020-08-26 10:50:50 -07:00
acpi Merge branch 'acpi-mm' 2020-08-28 21:17:56 +02:00
amba
android
ata libata-5.9-2020-09-04 2020-09-04 13:19:19 -07:00
atm Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-09-03 18:50:48 -07:00
auxdisplay A trivial patch for auxdisplay: 2020-09-05 14:22:46 -07:00
base Device properties framework fix for 5.9-rc3 2020-08-28 13:23:31 -07:00
bcma
block block-5.9-2020-08-28 2020-08-28 16:38:29 -07:00
bluetooth
bus treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
cdrom
char Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2020-08-30 15:53:44 -07:00
clk More ACPI updates for 5.9-rc1 2020-08-15 08:18:22 -07:00
clocksource treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
connector
counter
cpufreq cpufreq: intel_pstate: Fix intel_pstate_get_hwp_max() for turbo disabled 2020-09-01 21:15:00 +02:00
cpuidle cpuidle: Make CPUIDLE_FLAG_TLB_FLUSHED generic 2020-08-26 12:41:53 +02:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2020-08-30 15:53:44 -07:00
dax xen: branch for v5.9-rc4 2020-09-06 09:59:27 -07:00
dca
devfreq
dio
dma dmaengine fixes for v5.9-rc4 2020-09-04 12:12:39 -07:00
dma-buf A set of locking fixes and updates: 2020-08-10 19:07:44 -07:00
edac A fix to properly clear ghes_edac driver state on driver remove so that 2020-08-30 10:47:23 -07:00
eisa
extcon
firewire treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
firmware A set of fixes for interrupt chip drivers: 2020-08-30 11:56:54 -07:00
fpga
fsi
gnss
gpio treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
gpu xen: branch for v5.9-rc4 2020-09-06 09:59:27 -07:00
greybus
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid 2020-09-02 12:55:46 -07:00
hsi treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
hv hyperv-fixes for 5.9-rc3 2020-08-26 10:44:15 -07:00
hwmon hwmon fixes for v5.9-rc3 2020-08-29 12:37:00 -07:00
hwspinlock
hwtracing treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
i2c Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2020-08-29 13:13:44 -07:00
i3c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ide treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
idle cpuidle: Make CPUIDLE_FLAG_TLB_FLUSHED generic 2020-08-26 12:41:53 +02:00
iio iio: dpot-dac: fix code comment in dpot_dac_read_raw() 2020-08-26 14:02:24 -05:00
infiniband treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
input treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
interconnect Char/Misc driver patches for 5.9-rc1 2020-08-05 11:43:47 -07:00
iommu iommu/vt-d: Handle 36bit addressing for x86-32 2020-09-04 12:14:28 +02:00
ipack
irqchip A set of fixes for interrupt chip drivers: 2020-08-30 11:56:54 -07:00
isdn treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
leds LEDs changes for 5.9-rc1. 2020-08-05 19:24:27 -07:00
lightnvm treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
macintosh treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
mailbox iomap: constify ioreadX() iomem argument (as in generic implementation) 2020-08-14 19:56:57 -07:00
mcb
md dm thin metadata: Fix use-after-free in dm_bm_set_read_only 2020-09-02 13:38:40 -04:00
media media fixes for v5.9-rc4 2020-09-03 08:22:16 -07:00
memory treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
memstick treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
message treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
mfd - Bug Fixes 2020-08-28 10:15:33 -07:00
misc Char/Misc driver fixes for 5.9-rc3 2020-08-26 10:50:50 -07:00
mmc MMC host: 2020-08-31 11:22:57 -07:00
most
mtd This pull request contains changes for JFFS2, UBI and UBIFS 2020-08-10 18:20:04 -07:00
mux treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-09-03 18:50:48 -07:00
nfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-09-03 18:50:48 -07:00
ntb treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
nubus
nvdimm libnvdimm: KASAN: global-out-of-bounds Read in internal_create_group 2020-08-17 14:47:38 -06:00
nvme block-5.9-2020-09-04 2020-09-04 13:04:51 -07:00
nvmem
of of: address: Work around missing device_type property in pcie nodes 2020-08-19 16:30:57 -06:00
opp Merge branch 'opp/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm 2020-09-01 19:44:20 +02:00
oprofile
parisc Merge branch 'parisc-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux 2020-08-12 12:41:15 -07:00
parport treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
pci treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
pcmcia treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
perf treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
phy treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
pinctrl This is the bulk of the pin control changes for the v5.9 2020-08-09 12:52:28 -07:00
platform treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
pnp
power treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
powercap This tree adds the sched_set_fifo*() encapsulation APIs to remove 2020-08-06 11:55:43 -07:00
pps
ps3 treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ptp ptp: ptp_clockmatrix: use i2c_master_send for i2c write 2020-08-19 16:23:22 -07:00
pwm pwm: Changes for v5.9-rc1 2020-08-14 16:00:09 -07:00
rapidio treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ras
regulator treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
remoteproc treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
reset treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
rpmsg treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
rtc treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
s390 treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
sbus
scsi SCSI fixes on 20200901 2020-09-01 14:12:44 -07:00
sfi
sh iomap: constify ioreadX() iomem argument (as in generic implementation) 2020-08-14 19:56:57 -07:00
siox
slimbus
soc treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
soundwire
spi spi: dw: Add DWC SSI capability 2020-10-08 23:00:06 +01:00
spmi
ssb treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
staging media fixes for v5.9-rc4 2020-09-03 08:22:16 -07:00
target treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
tc
tee
thermal - Fix bogus thermal shutdowns for omap4430 where bogus values 2020-09-04 12:49:03 -07:00
thunderbolt treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
tty TTY/Serial fixes for 5.9-rc3 2020-08-26 10:58:20 -07:00
uio
usb USB fixes for 5.9-rc3 - take 2 2020-08-30 10:51:03 -07:00
vdpa vdpa/mlx5: Avoid warnings about shifts on 32-bit platforms 2020-08-26 08:13:59 -04:00
vfio treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
vhost Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-09-03 18:50:48 -07:00
video powerpc fixes for 5.9 #4 2020-08-30 10:56:12 -07:00
virt
virtio virtio: pci: constify ioreadX() iomem argument (as in generic implementation) 2020-08-14 19:56:57 -07:00
visorbus
vlynq
vme
w1
watchdog treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
xen xen: branch for v5.9-rc4 2020-09-06 09:59:27 -07:00
zorro
Kconfig
Makefile