08 Oct, 2016
1 commit
-
Pull ARM SoC driver updates from Arnd Bergmann:
"Driver updates for ARM SoCs, including a couple of newly added
drivers:- The Qualcomm external bus interface 2 (EBI2), used in some of their
mobile phone chips for connecting flash memory, LCD displays or
other peripherals- Secure monitor firmware for Amlogic SoCs, and an NVMEM driver for
the EFUSE based on that firmware interface.- Perf support for the AppliedMicro X-Gene performance monitor unit
- Reset driver for STMicroelectronics STM32
- Reset driver for SocioNext UniPhier SoCs
Aside from these, there are minor updates to SoC-specific bus,
clocksource, firmware, pinctrl, reset, rtc and pmic drivers"* tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (50 commits)
bus: qcom-ebi2: depend on HAS_IOMEM
pinctrl: mvebu: orion5x: Generalise mv88f5181l support for 88f5181
clk: mvebu: Add clk support for the orion5x SoC mv88f5181
dt-bindings: EXYNOS: Add Exynos5433 PMU compatible
clocksource: exynos_mct: Add the support for ARM64
perf: xgene: Add APM X-Gene SoC Performance Monitoring Unit driver
Documentation: Add documentation for APM X-Gene SoC PMU DTS binding
MAINTAINERS: Add entry for APM X-Gene SoC PMU driver
bus: qcom: add EBI2 driver
bus: qcom: add EBI2 device tree bindings
rtc: rtc-pm8xxx: Add support for pm8018 rtc
nvmem: amlogic: Add Amlogic Meson EFUSE driver
firmware: Amlogic: Add secure monitor driver
soc: qcom: smd: Reset rx tail rather than tx
memory: atmel-sdramc: fix a possible NULL dereference
reset: hi6220: allow to compile test driver on other architectures
reset: zynq: add driver Kconfig option
reset: sunxi: add driver Kconfig option
reset: stm32: add driver Kconfig option
reset: socfpga: add driver Kconfig option
...
02 Sep, 2016
2 commits
-
1) the efuse timing of rk3399 is different from earlier SoCs.
2) rk3399-efuse is organized as 32bits by 32 one-time programmable
electrical fuses, the efuse of earlier SoCs is organized as 32bits
by 8 one-time programmable electrical fuses with random access interface.This patch adds a new read function for rk3399-efuse.
Signed-off-by: Finley Xiao
Reviewed-by: Heiko Stuebner
Reviewed-by: Douglas Anderson
Signed-off-by: Srinivas Kandagatla
Signed-off-by: Greg Kroah-Hartman -
Add Amlogic EFUSE driver to access hardware data like ethernet address,
serial number or IDs.Acked-by: Srinivas Kandagatla
Signed-off-by: Carlo Caione
Signed-off-by: Kevin Hilman
25 Jun, 2016
5 commits
-
This patch fixes below error if the driver is compiled with 64 bit
machine configuration."drivers/nvmem/imx-ocotp.c:102:14: warning: assignment makes integer
from pointer without a cast"Signed-off-by: Srinivas Kandagatla
Acked-by: Philipp Zabel
Signed-off-by: Greg Kroah-Hartman -
This patch add COMPILE_TEST to imx-ocotp driver so that it can be
compile tested on other platforms with zero day testing.
Also adds HAS_IOMEM dependancy as the users of devm_ioremap_resource()
which are compile-testable should depend on HAS_IOMEM.Signed-off-by: Srinivas Kandagatla
Acked-by: Philipp Zabel
Signed-off-by: Greg Kroah-Hartman -
Before access ocotp nvmem area, the clock should be enabled.
Or, `hexdump nvmem` will hang the system. So, use such flow:
"
1. clock_enable_prepare
2. read nvmem ocotp area
3. clock_disable_unprepare
"Signed-off-by: Peng Fan
Cc: Srinivas Kandagatla
Cc: Maxime Ripard
Cc: Shawn Guo
Signed-off-by: Srinivas Kandagatla
Signed-off-by: Greg Kroah-Hartman -
Regmap raw accessors are bus specific implementations, using regmap raw
apis in nvmem breaks nvmem providers based on regmap mmio.
This patch moves to nvmem support in the driver to use callback
instead of regmap, which is what the nvmem core supports now.Signed-off-by: Srinivas Kandagatla
Acked-by: Stefan Wahren
Signed-off-by: Greg Kroah-Hartman -
Regmap raw accessors are bus specific implementations, using regmap raw
apis in nvmem breaks nvmem providers based on regmap mmio.
This patch moves to nvmem support in the driver to use callback
instead of regmap, which is what the nvmem core supports now.Signed-off-by: Srinivas Kandagatla
Signed-off-by: Greg Kroah-Hartman
28 May, 2016
1 commit
-
Most users of IS_ERR_VALUE() in the kernel are wrong, as they
pass an 'int' into a function that takes an 'unsigned long'
argument. This happens to work because the type is sign-extended
on 64-bit architectures before it gets converted into an
unsigned type.However, anything that passes an 'unsigned short' or 'unsigned int'
argument into IS_ERR_VALUE() is guaranteed to be broken, as are
8-bit integers and types that are wider than 'unsigned long'.Andrzej Hajda has already fixed a lot of the worst abusers that
were causing actual bugs, but it would be nice to prevent any
users that are not passing 'unsigned long' arguments.This patch changes all users of IS_ERR_VALUE() that I could find
on 32-bit ARM randconfig builds and x86 allmodconfig. For the
moment, this doesn't change the definition of IS_ERR_VALUE()
because there are probably still architecture specific users
elsewhere.Almost all the warnings I got are for files that are better off
using 'if (err)' or 'if (err < 0)'.
The only legitimate user I could find that we get a warning for
is the (32-bit only) freescale fman driver, so I did not remove
the IS_ERR_VALUE() there but changed the type to 'unsigned long'.
For 9pfs, I just worked around one user whose calling conventions
are so obscure that I did not dare change the behavior.I was using this definition for testing:
#define IS_ERR_VALUE(x) ((unsigned long*)NULL == (typeof (x)*)NULL && \
unlikely((unsigned long long)(x) >= (unsigned long long)(typeof(x))-MAX_ERRNO))which ends up making all 16-bit or wider types work correctly with
the most plausible interpretation of what IS_ERR_VALUE() was supposed
to return according to its users, but also causes a compile-time
warning for any users that do not pass an 'unsigned long' argument.I suggested this approach earlier this year, but back then we ended
up deciding to just fix the users that are obviously broken. After
the initial warning that caused me to get involved in the discussion
(fs/gfs2/dir.c) showed up again in the mainline kernel, Linus
asked me to send the whole thing again.[ Updated the 9p parts as per Al Viro - Linus ]
Signed-off-by: Arnd Bergmann
Cc: Andrzej Hajda
Cc: Andrew Morton
Link: https://lkml.org/lkml/2016/1/7/363
Link: https://lkml.org/lkml/2016/5/27/486
Acked-by: Srinivas Kandagatla # For nvmem part
Signed-off-by: Linus Torvalds
09 May, 2016
1 commit
-
This resolves a merge issue with drivers/hv/ring_buffer.c
Signed-off-by: Greg Kroah-Hartman
02 May, 2016
9 commits
-
This patch fixes the issue where the mxs_ocotp_read is reading
the ocotp in reg_size steps but decrements the remaining size
by 1. The number of iterations is thus four times higher,
overwriting the area behind the output buffer.Fixes: c01e9a11ab6f ("nvmem: add driver for ocotp in i.MX23 and i.MX28")
Tested-by: Stefan Wahren
Signed-off-by: Stanislav Meduna
Signed-off-by: Srinivas Kandagatla
Cc: stable
Signed-off-by: Greg Kroah-Hartman -
This patch moves to nvmem support in the driver to use callback
instead of regmap.Signed-off-by: Srinivas Kandagatla
Signed-off-by: Greg Kroah-Hartman -
This patch moves to nvmem support in the driver to use callback
instead of regmap.Signed-off-by: Srinivas Kandagatla
Signed-off-by: Greg Kroah-Hartman -
This patch moves to nvmem support in the driver to use callback
instead of regmap.Signed-off-by: Srinivas Kandagatla
Signed-off-by: Greg Kroah-Hartman -
This patch moves to nvmem support in the driver to use callback
instead of regmap.Signed-off-by: Srinivas Kandagatla
Signed-off-by: Greg Kroah-Hartman -
This patch moves to nvmem support in the driver to use callback
instead of regmap.Signed-off-by: Srinivas Kandagatla
Acked-by: Sanchayan Maity
Signed-off-by: Greg Kroah-Hartman -
This patch moves to nvmem support in the driver to use callback instead of
regmap.Reported-by: Rajendra Nayak
Signed-off-by: Srinivas Kandagatla
Signed-off-by: Greg Kroah-Hartman -
nvmem uses regmap_raw_read/write apis to read/write data from providers,
regmap raw apis stopped working with recent kernels which removed raw
accessors on mmio bus. This resulted in broken nvmem for providers
which are based on regmap mmio bus. This issue can be fixed temporarly
by moving to other regmap apis, but we might hit same issue in future.
Moving to interfaces based on read/write callbacks from providers would
be more robust.This patch removes regmap dependency from nvmem and introduces
read/write callbacks from the providers.Without this patch nvmem providers like qfprom based on regmap mmio
bus would not work.Reported-by: Rajendra Nayak
Signed-off-by: Srinivas Kandagatla
Signed-off-by: Greg Kroah-Hartman -
The devres.o gets linked if HAS_IOMEM is present so on ARCH=um
allyesconfig (COMPILE_TEST) failed on many files with:drivers/built-in.o: In function `mtk_thermal_probe':
mtk_thermal.c:(.text+0x394618): undefined reference to `devm_ioremap_resource'The users of devm_ioremap_resource() which are compile-testable should
depend on HAS_IOMEM.Signed-off-by: Krzysztof Kozlowski
Signed-off-by: Srinivas Kandagatla
Signed-off-by: Greg Kroah-Hartman
06 Mar, 2016
3 commits
-
Possibly, provider driver initialization is later than
consumer driver. Use function subsys_initcall to initialize
NVMEM provider early to ensure NVMEM consumer doesn't need
to -EPROBE_DEFER.Signed-off-by: Andrew-CT Chen
Signed-off-by: Srinivas Kandagatla
Signed-off-by: Greg Kroah-Hartman -
imx_ocotp_read() should return 0 on success.
Signed-off-by: Axel Lin
Signed-off-by: Srinivas Kandagatla
Signed-off-by: Greg Kroah-Hartman -
Not every arch has io memory.
So, unbreak the build by fixing the dependencies.Signed-off-by: Richard Weinberger
Signed-off-by: Srinivas Kandagatla
Signed-off-by: Greg Kroah-Hartman
02 Mar, 2016
2 commits
-
Older drivers made an 'eeprom' file available in the /sys device
directory. Have the NVMEM core provide this to retain backwards
compatibility.Signed-off-by: Andrew Lunn
Acked-by: Srinivas Kandagatla
Signed-off-by: Greg Kroah-Hartman -
Legacy AT24, AT25 EEPROMs are exported in sys so that only root can
read the contents. The EEPROMs may contain sensitive information. Add
a flag so the provide can indicate that NVMEM should also restrict
access to root only.Signed-off-by: Andrew Lunn
Acked-by: Srinivas Kandagatla
Signed-off-by: Greg Kroah-Hartman
15 Feb, 2016
1 commit
-
We want those fixes in here as well.
Signed-off-by: Greg Kroah-Hartman
12 Feb, 2016
1 commit
-
The current code fails to nvmem_cell_drop(cells[0]) - even worse, if
the loop above fails already at i==0, we'll enter an essentially
infinite loop doing nvmem_cell_drop on cells[-1], cells[-2], ... which
is unlikely to end well.Also, we're not freeing the temporary backing array cells on the error
path.Signed-off-by: Rasmus Villemoes
Signed-off-by: Greg Kroah-Hartman
08 Feb, 2016
7 commits
-
The qfprom is a little endian device, but so far we've been
relying on the regmap mmio bus handling this for us without
explicitly stating that fact. After commit 4a98da2164cf
(regmap-mmio: Use native endianness for read/write, 2015-10-29),
the regmap mmio bus will read/write with the __raw_*() IO
accessors, instead of using the readl/writel() APIs that do
proper byte swapping for little endian devices.So if we're running on a big endian processor and haven't
specified the endianness explicitly in the regmap config or in
DT, we're going to switch from doing little endian byte swapping
to big endian accesses without byte swapping, leading to some
confusing results. Specify the endianness explicitly so that the
regmap core properly byte swaps the accesses for us.Cc: Rajendra Nayak
Cc: Kevin Hilman
Cc: Tyler Baker
Cc: Simon Arlott
Cc: Mark Brown
Signed-off-by: Stephen Boyd
Signed-off-by: Srinivas Kandagatla
Signed-off-by: Greg Kroah-Hartman -
nvmem providers have restrictions on register strides, so return error
when users attempt to read/write buffers with sizes which are less
than word size.Without this patch the userspace would continue to try as it does not
get any error from the nvmem core, resulting in a hang or endless loop
in userspace.Reported-by: Ariel D'Alessandro
Signed-off-by: Srinivas Kandagatla
Signed-off-by: Greg Kroah-Hartman -
1) Make the include file to sort from order
2) clean up the driver to make more readabilityLet's clean up such trivial details.
Signed-off-by: Caesar Wang
Signed-off-by: Srinivas Kandagatla
Signed-off-by: Greg Kroah-Hartman -
this pacthset try to fix the code style for sunxi.
Signed-off-by: Caesar Wang
Signed-off-by: Srinivas Kandagatla
Signed-off-by: Greg Kroah-Hartman -
nvmem providers have restrictions on register strides, so return error
when users attempt to read/write buffers with sizes which are less
than word size.Without this patch the userspace would continue to try as it does not
get any error from the nvmem core, resulting in a hang or endless loop
in userspace.Reported-by: Ariel D'Alessandro
Signed-off-by: Srinivas Kandagatla
Signed-off-by: Greg Kroah-Hartman -
Add Mediatek EFUSE driver to access hardware data like
thermal sensor calibration or HDMI impedance.Signed-off-by: Andrew-CT Chen
Reviewed-by: Sascha Hauer
Signed-off-by: Srinivas Kandagatla
Signed-off-by: Greg Kroah-Hartman -
This commit adds support for NXP LPC18xx EEPROM memory found in NXP
LPC185x/3x and LPC435x/3x/2x/1x devices.EEPROM size is 16384 bytes and it can be entirely read and
written/erased with 1 word (4 bytes) granularity. The last page
(128 bytes) contains the EEPROM initialization data and is not writable.Erase/program time is less than 3ms. The EEPROM device requires a
~1500 kHz clock (min 800 kHz, max 1600 kHz) that is generated dividing
the system bus clock by the division factor, contained in the divider
register (minus 1 encoded).EEPROM will be kept in Power Down mode except during read/write calls.
Signed-off-by: Ariel D'Alessandro
Acked-by: Stefan Wahren
Signed-off-by: Srinivas Kandagatla
Signed-off-by: Greg Kroah-Hartman
13 Oct, 2015
1 commit
-
We want the fixes in here as well.
Signed-off-by: Greg Kroah-Hartman
04 Oct, 2015
6 commits
-
The sunxi_sid driver doesn't check for kmalloc return status before
derefencing the returned pointer, which could lead to a NULL pointer
dereference if kmalloc failed. Check for its return code to make sure it
deosn't happen.Reported-by: Dan Carpenter
Signed-off-by: Maxime Ripard
Signed-off-by: Greg Kroah-Hartman -
A tmp buffer is allocated if cell->bit_offset || cell->nbits.
So the tmp buffer needs to be freed at the same condition to avoid leak.Signed-off-by: Axel Lin
Signed-off-by: Srinivas Kandagatla
Signed-off-by: Greg Kroah-Hartman -
It's pointless to test (cell->bit_offset || cell->bit_offset).
nvmem_shift_read_buffer_in_place() should be called when
(cell->bit_offset || cell->nbits).Signed-off-by: Axel Lin
Signed-off-by: Srinivas Kandagatla
Signed-off-by: Greg Kroah-Hartman -
The position to read/write must be less than max
register size.Signed-off-by: ZhengShunQian
Acked-by: Srinivas Kandagatla
Signed-off-by: Srinivas Kandagatla
Signed-off-by: Greg Kroah-Hartman -
Signed-off-by: Fengguang Wu
Acked-by: Srinivas Kandagatla
Signed-off-by: Greg Kroah-Hartman -
There are some SoC specified values store in eFuse,
such as the cpu_leakage and cpu_version,
this driver can expose these values to /sys base on nvmem.Signed-off-by: Caesar Wang
Signed-off-by: ZhengShunQian
Acked-by: Srinivas Kandagatla
Signed-off-by: Srinivas Kandagatla
Signed-off-by: Greg Kroah-Hartman