WSL2-Linux-Kernel/drivers
Chen-Yu Tsai de2a3eaea5 nvmem: sunxi_sid: Optimize register read-out method
SID cells are 32-bit aligned, and a multiple of 32 bits in length. The
only outlier is the thermal sensor calibration data, which is 16 bits
per sensor. However a whole 64 bits is allocated for this purpose, so
we could consider it conforming to the rule above.

Also, the register read-out method assumes native endian, unlike the
direct MMIO method, which assumes big endian. Thus no endian conversion
is involved.

Under these assumptions, the register read-out method can be slightly
optimized. Instead of reading one word then discarding 3 bytes, read
the whole word directly into the buffer. However, for reads under 4
bytes or trailing bytes, we still use a scratch buffer to extract the
requested bytes.

We could go one step further if .word_size was 4, but changing that
would affect the sysfs interface's behavior.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-25 19:43:11 +02:00
..
accessibility
acpi libnvdimm fixes v5.1-rc6 2019-04-15 16:48:51 -07:00
amba
android
ata
atm
auxdisplay
base mm/memory_hotplug: do not unlock after failing to take the device_hotplug_lock 2019-04-19 09:46:04 -07:00
bcma
block virtio-blk: limit number of hw queues by nr_cpu_ids 2019-04-10 08:18:24 -06:00
bluetooth Bluetooth: btusb: request wake pin with NOAUTOEN 2019-04-09 17:38:24 -10:00
bus
cdrom
char Merge 5.1-rc6 into char-misc-next 2019-04-21 23:14:47 +02:00
clk clk: imx: Fix PLL_1416X not rounding rates 2019-04-12 14:21:43 -07:00
clocksource clocksource/drivers/timer-ti-dm: Remove omap_dm_timer_set_load_start 2019-04-16 14:26:54 +02:00
connector
cpufreq
cpuidle
crypto
dax
dca
devfreq
dio
dma
dma-buf
edac
eisa
extcon extcon: ptn5150: fix COMPILE_TEST dependencies 2019-04-05 10:08:37 +09:00
firewire
firmware
fmc
fpga
fsi
gnss
gpio
gpu Merge branch 'drm-fixes-5.1' of git://people.freedesktop.org/~agd5f/linux into drm-fixes 2019-04-18 06:56:35 +10:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2019-04-19 10:28:27 -07:00
hsi
hv
hwmon
hwspinlock
hwtracing
i2c i2c: imx: don't leak the i2c adapter on error 2019-04-06 17:54:28 +02:00
i3c i3c: dw: Fix dw_i3c_master_disable controller by using correct mask 2019-04-10 12:46:20 +02:00
ide
idle
iio
infiniband coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping 2019-04-19 09:46:05 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2019-04-19 10:28:27 -07:00
interconnect interconnect: convert to DEFINE_SHOW_ATTRIBUTE 2019-04-06 22:03:03 +07:00
iommu iommu/amd: Set exclusion range correctly 2019-04-12 12:59:45 +02:00
ipack
irqchip irqchip/irq-ls1x: Missing error code in ls1x_intc_of_init() 2019-04-05 14:37:56 +02:00
isdn mISDN: Check address length before reading address family 2019-04-12 10:25:03 -07:00
leds
lightnvm lightnvm: pblk: fix crash in pblk_end_partial_read due to multipage bvecs 2019-04-10 12:17:01 -06:00
macintosh
mailbox
mcb
md dm integrity: fix deadlock with overlapping I/O 2019-04-05 18:49:08 -04:00
media
memory
memstick
message
mfd
misc mei: expose device state in sysfs 2019-04-25 19:33:34 +02:00
mmc mmc: sdhci-omap: Don't finish_mrq() on a command error during tuning 2019-04-11 12:40:32 +02:00
mtd mtd: cfi: fix deadloop in cfi_cmdset_0002.c do_write_buffer 2019-04-05 00:39:19 +02:00
mux
net ocelot: Clean up stats update deferred work 2019-04-16 21:43:53 -07:00
nfc
ntb
nubus
nvdimm libnvdimm/pmem: fix a possible OOB access when read and write pmem 2019-04-07 14:36:04 -07:00
nvme nvmet: fix discover log page when offsets are used 2019-04-11 17:28:30 +02:00
nvmem nvmem: sunxi_sid: Optimize register read-out method 2019-04-25 19:43:11 +02:00
of
opp
oprofile
parisc Revert: parisc: Use F_EXTEND() macro in iosapic code 2019-04-06 19:07:55 +02:00
parport parport: ieee1284: mark expected switch fall-through 2019-04-25 19:41:47 +02:00
pci PCI: pciehp: Ignore Link State Changes after powering off a slot 2019-04-10 16:06:43 -05:00
pcmcia
perf
phy
pinctrl
platform Here's more than a handful of clk driver fixes for changes that came in 2019-04-13 14:33:56 -07:00
pnp
power drivers: power: supply: goldfish_battery: Fix bogus SPDX identifier 2019-04-15 11:16:31 +02:00
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc
s390 s390 update with bug fixes for 5.1-rc6 2019-04-18 08:15:06 -07:00
sbus
scsi SCSI fixes on 20190420 2019-04-20 12:52:23 -07:00
sfi
sh
siox
slimbus
sn
soc
soundwire
spi
spmi
ssb
staging staging: comedi: ni_usb6501: Fix possible double-free of ->usb_rx_buf 2019-04-17 11:59:24 +02:00
target
tc
tee
thermal
thunderbolt
tty sc16is7xx: put err_spi and err_i2c into correct #ifdef 2019-04-19 14:09:23 +02:00
uio
usb
uwb
vfio vfio/type1: Limit DMA mappings per container 2019-04-03 12:43:05 -06:00
vhost vhost: reject zero size iova range 2019-04-10 22:45:38 -07:00
video
virt
virtio virtio: Honour 'may_reduce_num' in vring_create_virtqueue 2019-04-08 17:05:52 -04:00
visorbus
vlynq
vme
w1 w1: ds2408: reset on output_write retry with readback 2019-04-25 19:41:27 +02:00
watchdog
xen xen: fixes for 5.1-rc4 2019-04-07 06:12:10 -10:00
zorro
Kconfig
Makefile