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
    ...

    Linus Torvalds
     

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

    Finley Xiao
     
  • 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

    Carlo Caione
     

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

    Srinivas Kandagatla
     
  • 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

    Srinivas Kandagatla
     
  • 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

    Peng Fan
     
  • 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

    Srinivas Kandagatla
     
  • 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

    Srinivas Kandagatla
     

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

    Arnd Bergmann
     

09 May, 2016

1 commit


02 May, 2016

9 commits


06 Mar, 2016

3 commits


02 Mar, 2016

2 commits


15 Feb, 2016

1 commit


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

    Rasmus Villemoes
     

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

    Stephen Boyd
     
  • 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

    Srinivas Kandagatla
     
  • 1) Make the include file to sort from order
    2) clean up the driver to make more readability

    Let's clean up such trivial details.

    Signed-off-by: Caesar Wang
    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: Greg Kroah-Hartman

    Caesar Wang
     
  • 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

    Caesar Wang
     
  • 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

    Srinivas Kandagatla
     
  • 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

    Andrew-CT Chen
     
  • 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

    Ariel D'Alessandro
     

13 Oct, 2015

1 commit


04 Oct, 2015

6 commits