06 Apr, 2014

2 commits

  • Pull ARM SoC driver changes from Arnd Bergmann:
    "These changes are mostly for ARM specific device drivers that either
    don't have an upstream maintainer, or that had the maintainer ask us
    to pick up the changes to avoid conflicts.

    A large chunk of this are clock drivers (bcm281xx, exynos, versatile,
    shmobile), aside from that, reset controllers for STi as well as a
    large rework of the Marvell Orion/EBU watchdog driver are notable"

    * tag 'drivers-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (99 commits)
    Revert "dts: socfpga: Add DTS entry for adding the stmmac glue layer for stmmac."
    Revert "net: stmmac: Add SOCFPGA glue driver"
    ARM: shmobile: r8a7791: Fix SCIFA3-5 clocks
    ARM: STi: Add reset controller support to mach-sti Kconfig
    drivers: reset: stih416: add softreset controller
    drivers: reset: stih415: add softreset controller
    drivers: reset: Reset controller driver for STiH416
    drivers: reset: Reset controller driver for STiH415
    drivers: reset: STi SoC system configuration reset controller support
    dts: socfpga: Add sysmgr node so the gmac can use to reference
    dts: socfpga: Add support for SD/MMC on the SOCFPGA platform
    reset: Add optional resets and stubs
    ARM: shmobile: r7s72100: fix bus clock calculation
    Power: Reset: Generalize qnap-poweroff to work on Synology devices.
    dts: socfpga: Update clock entry to support multiple parents
    ARM: socfpga: Update socfpga_defconfig
    dts: socfpga: Add DTS entry for adding the stmmac glue layer for stmmac.
    net: stmmac: Add SOCFPGA glue driver
    watchdog: orion_wdt: Use %pa to print 'phys_addr_t'
    drivers: cci: Export CCI PMU revision
    ...

    Linus Torvalds
     
  • Pull ARM SoC cleanups from Arnd Bergmann:
    "These cleanup patches are mainly move stuff around and should all be
    harmless. They are mainly split out so that other branches can be
    based on top to avoid conflicts.

    Notable changes are:

    - We finally remove all mach/timex.h, after CLOCK_TICK_RATE is no
    longer used (Uwe Kleine-König)
    - The Qualcomm MSM platform is split out into legacy mach-msm and
    new-style mach-qcom, to allow easier maintainance of the new
    hardware support without regressions (Kumar Gala)
    - A rework of some of the Kconfig logic to simplify multiplatform
    support (Rob Herring)
    - Samsung Exynos gets closer to supporting multiplatform (Sachin
    Kamat and others)
    - mach-bcm3528 gets merged into mach-bcm (Stephen Warren)
    - at91 gains some common clock framework support (Alexandre Belloni,
    Jean-Jacques Hiblot and other French people)"

    * tag 'cleanup-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (89 commits)
    ARM: hisi: select HAVE_ARM_SCU only for SMP
    ARM: efm32: allow uncompress debug output
    ARM: prima2: build reset code standalone
    ARM: at91: add PWM clock
    ARM: at91: move sam9261 SoC to common clk
    ARM: at91: prepare common clk transition for sam9261 SoC
    ARM: at91: updated the at91_dt_defconfig with support for the ADS7846
    ARM: at91: dt: sam9261: Device Tree support for the at91sam9261ek
    ARM: at91: dt: defconfig: Added the sam9261 to the list of DT-enabled SOCs
    ARM: at91: dt: Add at91sam9261 dt SoC support
    ARM: at91: switch sam9rl to common clock framework
    ARM: at91/dt: define main clk frequency of at91sam9rlek
    ARM: at91/dt: define at91sam9rl clocks
    ARM: at91: prepare common clk transition for sam9rl SoCs
    ARM: at91: prepare sam9 dt boards transition to common clk
    ARM: at91: dt: sam9rl: Device Tree for the at91sam9rlek
    ARM: at91/defconfig: Add the sam9rl to the list of DT-enabled SOCs
    ARM: at91: Add at91sam9rl DT SoC support
    ARM: at91: prepare at91sam9rl DT transition
    ARM: at91/defconfig: refresh at91sam9260_9g20_defconfig
    ...

    Linus Torvalds
     

04 Apr, 2014

38 commits

  • The patch "rtc: verify a critical argument to rtc_update_irq() before
    using it" introduces validation for rtc_device in the RTC core, so there
    are no need to check this argument for rtc_update_irq() from the
    drivers.

    This patch removes such check for the existing rtc_update_irq() users.

    Signed-off-by: Alexander Shiyan
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Shiyan
     
  • NO_IRQ may be defined as '(unsigned int) -1' in some architectures (arm,
    sh ...), and either may not be defined in some architectures (arm64) which
    can enable RTC_DRV_S3C.

    Also since platform_get_irq returns err-code in case of any error, we do
    not need to intialize s3c_rtc_alarmno and s3c_rtc_tickno.

    Signed-off-by: Pankaj Dubey
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pankaj Dubey
     
  • Using platform_get_irq_byname() to retrieve the IRQ number returns the
    VIRQ number rather than the local IRQ number for the device. Passing that
    value then into regmap_irq_get_virq() causes a failure because the
    function is expecting the local IRQ number (e.g. 0, 1, 2, 3, etc).

    This patch removes use of regmap_irq_get_virq() to prevent this failure
    from happening

    Signed-off-by: Adam Thomson
    Cc: Alessandro Zummo
    Cc: Dmitry Torokhov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adam Thomson
     
  • RTC drivers must not return an error after device registration.

    Signed-off-by: Gregory Hermant
    Acked-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gregory Hermant
     
  • Add support for maxim dallas rtc ds1347

    Signed-off-by: Raghavendra Chandra Ganiga
    Acked-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Raghavendra Ganiga
     
  • RTC drivers must not return an error after device registration. This
    patch makes RTC registration as the last action.

    Signed-off-by: Alexander Shiyan
    Acked-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Shiyan
     
  • Setup wakeup capability before rtc_register to ensure the rtc class core
    properly sets up our 'wakealarm' sysfs attribute.

    Signed-off-by: Josh Cartwright
    Reviewed-by: Stephen Boyd
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josh Cartwright
     
  • Add support for describing the PM8921/PM8058 RTC in device tree.

    Additionally:
    - drop support for describing the RTC using platform data,
    as there are no current in tree users who do so.
    - make allow_set_time a device-specific flag, instead of mucking
    with the rtc_ops

    Signed-off-by: Josh Cartwright
    Reviewed-by: Stephen Boyd
    Acked-by: Lee Jones
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josh Cartwright
     
  • Make use of the devm_* variant of request_any_context_irq to allow for
    elimination of remove().

    Signed-off-by: Josh Cartwright
    Reviewed-by: Stephen Boyd
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josh Cartwright
     
  • Now that the parent mfd driver has been made to work again, and has been
    reworked to create a regmap instance intended for its children to use,
    rework the pm8xxx driver to use the regmap API for its register
    accesses.

    Signed-off-by: Josh Cartwright
    Reviewed-by: Stephen Boyd
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josh Cartwright
     
  • This patchset is based on Stephen Boyd's PM8921 modernization/cleanups
    (http://lkml.kernel.org/g/1393441166-32692-1-git-send-email-sboyd@codeaurora.org),
    and allows for this RTC driver to be usable again.

    This patch (of 6):

    Before performing additional cleanups to this driver, do the easy cleanups
    first.

    Signed-off-by: Josh Cartwright
    Reviewed-by: Stephen Boyd
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josh Cartwright
     
  • This small addition to the core simplifies code in the drivers and makes
    them more robust when handling shared IRQs.

    Signed-off-by: Alessandro Zummo
    Cc: Alexander Shiyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alessandro Zummo
     
  • Add suspend/resume and device_init_wakeup to enable ds3232 as wakeup
    source, /sys/class/rtc/rtcX/wakealarm for set wakeup alarm.

    Signed-off-by: Wang Dongsheng
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wang Dongsheng
     
  • Use SIMPLE_DEV_PM_OPS macro in order to make the code simpler.

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Use SIMPLE_DEV_PM_OPS macro in order to make the code simpler.

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • CONFIG_PM will be set also if only CONFIG_PM_RUNTIME is set which causes
    the compiler to emit following warning:

    drivers/rtc/rtc-cmos.c:845:12: warning: =E2=80=98cmos_resume=E2=80=99 defined but not used [-Wunused-function]

    Fix this by using CONFIG_PM_SLEEP instead of CONFIG_PM and removing it
    from the driver pm ops as this has been taken care by
    SIMPLE_DEV_PM_OPS() already.

    Signed-off-by: Mika Westerberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mika Westerberg
     
  • It's possible to have RTC irq shared with other device (e.g. t4240qds
    board shares ds3232irq with phy one). Handle this in driver.

    Signed-off-by: Bharat Bhushan
    Cc: Scott Wood
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bharat Bhushan
     
  • The Allwinner A10 compatibles were following a slightly different
    compatible patterns than the rest of the SoCs for historical reasons.
    Change the compatibles to match the other pattern in the RTC driver for
    consistency.

    Signed-off-by: Maxime Ripard
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Maxime Ripard
     
  • Remove unnecessary locks when reading the time and make the read
    operation until the values of day matched between reading the seconds,
    it will make the mc13xxx_rtc_read_time() procedure more readable.
    Additionally, patch introduced a "seconds in a day" definition.

    Signed-off-by: Alexander Shiyan
    Cc: Uwe Kleine-König
    Cc: Sascha Hauer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Shiyan
     
  • Datasheet says: "When the VSRTC voltage drops to the range of 0.9 - 0.8V,
    the RTCPORB reset signal is generated and the contents of the RTC will
    be reset. . To inform the processor that the contents of the RTC
    are no longer valid due to the reset, a timer reset interrupt function
    is implemented with the RTCRSTI bit." This patch makes the RTC valid by
    default until RTCRST interrupt occurs.

    Signed-off-by: Alexander Shiyan
    Cc: Uwe Kleine-König
    Cc: Sascha Hauer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Shiyan
     
  • 1Hz interrupt is never unmasked, so no interrupts appears. This patch
    fix this issue.

    Signed-off-by: Alexander Shiyan
    Cc: Uwe Kleine-König
    Cc: Sascha Hauer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Shiyan
     
  • This patch removes excess layer for alarm_irq_enable() function.

    Signed-off-by: Alexander Shiyan
    Cc: Uwe Kleine-König
    Cc: Sascha Hauer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Shiyan
     
  • Interrupts can appear after request_irq and interrupt handlers can use
    the RTC device, but currently we register RTC after IRQs. This patch
    changes this order and simplify error path a bit.

    Signed-off-by: Alexander Shiyan
    Cc: Uwe Kleine-König
    Cc: Sascha Hauer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Shiyan
     
  • Since we no longer allow building without hotplug, the
    mc13xxx_rtc_remove() function is always present and we should not use
    __exit_p() to refer to it.

    Signed-off-by: Alexander Shiyan
    Cc: Uwe Kleine-König
    Cc: Sascha Hauer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Shiyan
     
  • Add alarm support for the Microchip RTC devices MCP794xx. Note that two
    programmable alarms are provided by the chip but only one is used by the
    driver.

    Signed-off-by: Simon Guinot
    Cc: Jason Cooper
    Cc: Andrew Lunn
    Cc: Gregory Clement
    Cc: Sebastian Hesselbarth
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Simon Guinot
     
  • In order to allow the creation of the sysfs attribute wakealarm, this
    patch moves the device_set_wakeup_capable() call above the RTC device
    registration.

    Signed-off-by: Simon Guinot
    Cc: Jason Cooper
    Cc: Andrew Lunn
    Cc: Gregory Clement
    Cc: Sebastian Hesselbarth
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Simon Guinot
     
  • RTC settings will be lost if power supply is cut off after hibernation
    finished, but the current "restore" function does not restore RTC related
    settings, this causes rtc_read_time failure and kernel panic:

    rtc rtc0: **** DPM device timeout ****
    Stack trace:
    unwind_backtrace+0x0/0xf4
    show_stack+0x10/0x14
    dpm_wd_handler+0x24/0x28
    call_timer_fn.isra.33+0x24/0x88
    run_timer_softirq+0x178/0x1f0
    __do_softirq+0x120/0x200
    do_softirq+0x54/0x5c
    irq_exit+0x9c/0xd0
    handle_IRQ+0x44/0x90
    __irq_svc+0x40/0x70
    _raw_spin_unlock_irqrestore+0x10/0x48
    sirfsoc_rtc_iobrg_readl+0x34/0x3c
    sirfsoc_rtc_read_time+0x24/0x48
    __rtc_read_time.isra.3+0x48/0x5c
    rtc_read_time+0x30/0x44
    rtc_resume.part.9+0x20/0x104
    rtc_resume+0x5c/0x64
    dpm_run_callback.isra.4+0x2c/0x74
    device_resume+0x9c/0x144
    dpm_resume+0x100/0x224
    hibernation_snapshot+0x170/0x398
    hibernate+0x13c/0x1d8
    state_store+0xb4/0xb8
    kobj_attr_store+0x14/0x20
    sysfs_write_file+0x160/0x190
    vfs_write+0xb4/0x194
    SyS_write+0x3c/0x78

    this patch uses SIMPLE_DEV_PM_OPS() to make restore() execute the
    existing resume() function which will restore the set of RTC.

    Signed-off-by: Xianglong Du
    Signed-off-by: Barry Song
    Cc: Grant Likely
    Cc: Rob Herring
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Xianglong Du
     
  • Remove redundant irq field in private rtc structure.

    Signed-off-by: Anthony Olech
    Acked-by: David Dajun Chen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anthony Olech
     
  • linux/rtc.h was included twice.

    Signed-off-by: Sachin Kamat
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sachin Kamat
     
  • Use devm_ioremap_resource() in order to make the code simpler, and move
    'struct resource *mem' from 'struct jz4740_rtc' to jz4740_rtc_probe()
    because the 'mem' variable is used only in jz4740_rtc_probe(). Also the
    redundant return value check of platform_get_resource() is removed,
    because the value is checked by devm_ioremap_resource().

    Signed-off-by: Jingoo Han
    Cc: Lars-Peter Clausen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Use devm_ioremap_resource() in order to make the code simpler, and move
    'struct resource *res' from 'struct vt8500_rtc' to vt8500_rtc_probe()
    because the 'res' variable is used only in vt8500_rtc_probe().

    Signed-off-by: Jingoo Han
    Cc: Tony Prisk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Use devm_ioremap_resource() in order to make the code simpler, and
    remove redundant return value check of platform_get_resource() because
    the value is checked by devm_ioremap_resource().

    Signed-off-by: Jingoo Han
    Cc: Kevin Hilman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Use devm_ioremap_resource() in order to make the code simpler, and
    remove redundant return value check of platform_get_resource() because
    the value is checked by devm_ioremap_resource().

    Signed-off-by: Jingoo Han
    Acked-by: Linus Walleij
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • The site-specific OOM messages are unnecessary, because they duplicate
    the MM subsystem generic OOM message.

    Signed-off-by: Jingoo Han
    Acked-by: Viresh Kumar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • The site-specific OOM messages are unnecessary, because they duplicate
    the MM subsystem generic OOM message.

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • The site-specific OOM messages are unnecessary, because they duplicate
    the MM subsystem generic OOM message.

    Signed-off-by: Jingoo Han
    Acked-by: Barry Song
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • The site-specific OOM messages are unnecessary, because they duplicate
    the MM subsystem generic OOM message.

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • The site-specific OOM messages are unnecessary, because they duplicate
    the MM subsystem generic OOM message.

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han