1. 06 9月, 2015 12 次提交
    • J
      rtc: s5m: fix to update ctrl register · ff02c044
      Joonyoung Shim 提交于
      According to datasheet, the S2MPS13X and S2MPS14X should update write
      buffer via setting WUDR bit to high after ctrl register is written.
      
      If not, ALARM interrupt of rtc-s5m doesn't happen first time when i use
      tools/testing/selftests/timers/rtctest.c test program and hour format is
      used to 12 hour mode in Odroid-XU3 board.
      
      One more issue is the RTC doesn't keep time on Odroid-XU3 board when i
      turn on board after power off even if RTC battery is connected. It can
      be solved as setting WUDR & RUDR bits to high at the same time after
      RTC_CTRL register is written. It's same with condition of only writing
      ALARM registers, so this is for only S2MPS14 and we should set WUDR &
      A_UDR bits to high on S2MPS13.
      
      I can't find any reasonable description about this like fix from
      datasheet, but can find similar codes from rtc driver source of
      hardkernel kernel and vendor kernel.
      Signed-off-by: NJoonyoung Shim <jy0922.shim@samsung.com>
      Cc: <stable@vger.kernel.org> # v3.16
      Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Tested-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
      ff02c044
    • S
      rtc: add xilinx zynqmp rtc driver · 11143c19
      Suneel Garapati 提交于
      Add support for RTC controller found on Xilinx Zynq Ultrascale+ MPSoC
      platform.
      Signed-off-by: NSuneel Garapati <suneel.garapati@xilinx.com>
      Acked-by: NMoritz Fischer <moritz.fischer@ettus.com>
      Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
      11143c19
    • S
      devicetree: bindings: rtc: add bindings for xilinx zynqmp rtc · 12ece40d
      Suneel Garapati 提交于
      adds file for description on device node bindings for RTC
      found on Xilinx Zynq Ultrascale+ MPSoC.
      Signed-off-by: NSuneel Garapati <suneel.garapati@xilinx.com>
      Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
      12ece40d
    • B
      rtc: as3722: correct month value · a038c3aa
      Bibek Basu 提交于
      The RTC month value is 1-indexed, but the kernel assumes it is 0-indexed.
      This may result in the RTC not rolling over correctly.
      Signed-off-by: NBibek Basu <bbasu@nvidia.com>
      Signed-off-by: NFelix Janda <felix.janda@posteo.de>
      Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
      a038c3aa
    • R
      ARM: config: Switch PXA27x platforms to use PXA RTC driver · e66ce07a
      Rob Herring 提交于
      With the SA1100 and PXA RTC drivers be mutually exclusive and no
      longer sharing hardware, PXA27x/PXA3xx platforms must use the PXA RTC
      driver as the SA1100 platform device is no longer registered.
      
      This change should be almost transparent to userspace. Former users of
      pxa-rtc should be aware that 2 RTCs will be available on their kernels,
      rtc0 being sa1100-rtc and rtc1 being pxa-rtc. Any userspace relying on
      the fact that rtc0 was pxa-rtc should be fixed.
      
      As a consequence:
       - the first reboot after the switch will have the wrong time,
       - on dual boot platform where the other OS programs some logic into the
         sa1100 rtc IP, a lack of fix in userspace, ie. a kernel changing
         sa1100-rtc thinking it is pxa-rtc could have dire consequence, such
         as wiping the other OS data partition.
      
      (Thanks to Robert Jarmik for help on the above commit text.)
      Signed-off-by: NRob Herring <robh@kernel.org>
      Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr>
      Cc: Daniel Mack <daniel@zonque.org>
      Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
      Cc: Sergey Lapin <slapin@ossfans.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Mike Rapoport <mike@compulab.co.il>
      Cc: Philipp Zabel <philipp.zabel@gmail.com>
      Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
      e66ce07a
    • R
      ARM: mmp: remove unused RTC register definitions · 7b758ef4
      Rob Herring 提交于
      Now that register definitions have been moved to the driver, regs-rtc.h is
      no longer used and can be removed.
      Signed-off-by: NRob Herring <robh@kernel.org>
      Cc: Eric Miao <eric.y.miao@gmail.com>
      Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: linux-arm-kernel@lists.infradead.org
      Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
      7b758ef4
    • R
      ARM: sa1100: remove unused RTC register definitions · d6679c48
      Rob Herring 提交于
      Now that register definitions have been moved to the driver, we can remove
      them from machine specific code.
      Signed-off-by: NRob Herring <robh@kernel.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: linux-arm-kernel@lists.infradead.org
      Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
      d6679c48
    • R
      rtc: sa1100/pxa: convert to run-time register mapping · 90d0ae8e
      Rob Herring 提交于
      SA1100 and PXA differ only in register offsets which are currently
      hardcoded in a machine specific header. Some arm64 platforms (PXA1928)
      have this RTC block as well (and not the PXA270 variant).
      
      Convert the driver to use ioremap and set the register offsets dynamically.
      Since we are touching all the register accesses, convert them all to
      readl_relaxed/writel_relaxed.
      Signed-off-by: NRob Herring <robh@kernel.org>
      Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
      Cc: rtc-linux@googlegroups.com
      Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
      90d0ae8e
    • R
      ARM: pxa: add memory resource to SA1100 RTC device · 2c4fabec
      Rob Herring 提交于
      The drivers for the SA1100 and PXA RTCs are now mutually exclusive, so
      add the memory resource for the sa1100-rtc device. Since the memory
      resource is already present in the pxa_rtc_resources, that makes
      sa1100_rtc_resources and pxa_rtc_resources equivalent, so use
      pxa_rtc_resources for both devices and remove the duplicate
      sa1100_rtc_resources.
      Signed-off-by: NRob Herring <robh@kernel.org>
      Cc: Daniel Mack <daniel@zonque.org>
      Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
      Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: linux-arm-kernel@lists.infradead.org
      Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
      2c4fabec
    • R
      rtc: pxa: convert to use shared sa1100 functions · 3cdf4ad9
      Rob Herring 提交于
      Currently, the rtc-sa1100 and rtc-pxa drivers co-exist as rtc-pxa has a
      superset of functionality. Having 2 drivers sharing the same memory
      resource is not allowed by the driver model if resources are properly
      declared. This problem was avoided by not adding memory resources to the
      SA1100 RTC driver, but that prevents clean-up of the SA1100 driver.
      
      This commit converts the PXA RTC to use the exported SA1100 RTC
      functions. Now the sa1100-rtc and pxa-rtc devices are mutually
      exclusive, so we must remove the sa1100-rtc from pxa27x and pxa3xx.
      Signed-off-by: NRob Herring <robh@kernel.org>
      Cc: Daniel Mack <daniel@zonque.org>
      Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
      Cc: Robert Jarzmik <robert.jarzmik@free.fr>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: rtc-linux@googlegroups.com
      Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
      3cdf4ad9
    • R
      rtc: sa1100: prepare to share sa1100_rtc_ops · 8c0961ba
      Rob Herring 提交于
      Factor out the RTC initialization from the platform device specific
      parts in order to share the RTC device ops with other drivers.
      Specifically, it will be shared with rtc-pxa driver.
      Signed-off-by: NRob Herring <robh@kernel.org>
      Cc: Robert Jarzmik <robert.jarzmik@free.fr>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
      Cc: rtc-linux@googlegroups.com
      Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
      8c0961ba
    • W
      rtc: ds3232: fix WARNING trace in resume function · dc2280eb
      Wang Dongsheng 提交于
      If ds3232 work on some platform that is not implementing
      irq_set_wake, ds3232 will get a WARNING trace in resume.
      So fix ds3232->suspended state to false when irq_set_irq_wake
      return error.
      
      WARNING: CPU: 0 PID: 729 at kernel/irq/manage.c:604 irq_set_irq_wake+0x4b/0x8c()
      Unbalanced IRQ 201 wake disable
      Modules linked in:
      CPU: 0 PID: 729 Comm: sh Not tainted 3.12.19-rt30+ #25
      [<800107d9>] (unwind_backtrace+0x1/0x88) from [<8000e4ef>] (show_stack+0xb/0xc)
      [<8000e4ef>] (show_stack+0xb/0xc) from [<802b5fa9>] (dump_stack+0x4d/0x60)
      [<802b5fa9>] (dump_stack+0x4d/0x60) from [<800186dd>] (warn_slowpath_common+0x45/0x64)
      [<800186dd>] (warn_slowpath_common+0x45/0x64) from [<80018717>] (warn_slowpath_fmt+0x1b/0x24)
      [<80018717>] (warn_slowpath_fmt+0x1b/0x24) from [<8003a8d3>] (irq_set_irq_wake+0x4b/0x8c)
      [<8003a8d3>] (irq_set_irq_wake+0x4b/0x8c) from [<80204fcb>] (ds3232_resume+0x2d/0x36)
      [<80204fcb>] (ds3232_resume+0x2d/0x36) from [<801954c7>] (dpm_run_callback.isra.13+0xb/0x28)
      [<801954c7>] (dpm_run_callback.isra.13+0xb/0x28) from [<80195b1b>] (device_resume+0x7b/0xa2)
      [<80195b1b>] (device_resume+0x7b/0xa2) from [<80195f0f>] (dpm_resume+0xbb/0x19c)
      [<80195f0f>] (dpm_resume+0xbb/0x19c) from [<801960d9>] (dpm_resume_end+0x9/0x12)
      [<801960d9>] (dpm_resume_end+0x9/0x12) from [<80037e1d>] (suspend_devices_and_enter+0x17d/0x1d0)
      [<80037e1d>] (suspend_devices_and_enter+0x17d/0x1d0) from [<80037ee1>] (pm_suspend+0x71/0x128)
      [<80037ee1>] (pm_suspend+0x71/0x128) from [<80037449>] (state_store+0x6d/0x80)
      [<80037449>] (state_store+0x6d/0x80) from [<800af4d5>] (sysfs_write_file+0x9f/0xde)
      [<800af4d5>] (sysfs_write_file+0x9f/0xde) from [<8007a437>] (vfs_write+0x7b/0x104)
      [<8007a437>] (vfs_write+0x7b/0x104) from [<8007a7f7>] (SyS_write+0x27/0x48)
      [<8007a7f7>] (SyS_write+0x27/0x48) from [<8000c121>] (ret_fast_syscall+0x1/0x44)
      Signed-off-by: NWang Dongsheng <dongsheng.wang@freescale.com>
      Signed-off-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com>
      dc2280eb
  2. 05 9月, 2015 28 次提交