Commit graph

1842 commits

Author SHA1 Message Date
Pavel Machek 5a6e7599d3 drivers/rtc/rtc-bq32k.c: fix register value
Fix register value in bq32000 trickle charging.

Mike reported that I'm using wrong value in one trickle-charging case,
and after checking docs, I must admit he's right.

Signed-off-by: Pavel Machek <pavel@denx.de>
Reported-by: Mike Bremford <mike@bfo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-29 16:33:14 -07:00
Marek Szyprowski eaf3a65908 drivers/rtc/rtc-s3c.c: fix initialization failure without rtc source clock
Fix unconditional initialization failure on non-exynos3250 SoCs.

Commit df9e26d093 ("rtc: s3c: add support for RTC of Exynos3250 SoC")
introduced rtc source clock support, but also added initialization
failure on SoCs, which doesn't need such clock.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-29 16:33:14 -07:00
Stanimir Varbanov c8d523a4b0 drivers/rtc/rtc-pm8xxx.c: rework to support pm8941 rtc
Adds support for RTC device inside PM8941 PMIC.  The RTC in this PMIC
have two register spaces.  Thus the rtc-pm8xxx is slightly reworked to
reflect these differences.

The register set for different PMIC chips are selected on DT compatible
string base.

[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: simplify and fix locking in pm8xxx_rtc_set_time()]
Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Josh Cartwright <joshc@codeaurora.org>
Cc: Stanimir Varbanov <svarbanov@mm-sol.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-29 16:33:14 -07:00
Linus Torvalds 8c81f48e16 Merge branch 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 EFI updates from Peter Anvin:
 "This patchset falls under the "maintainers that grovel" clause in the
  v3.18-rc1 announcement.  We had intended to push it late in the merge
  window since we got it into the -tip tree relatively late.

  Many of these are relatively simple things, but there are a couple of
  key bits, especially Ard's and Matt's patches"

* 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits)
  rtc: Disable EFI rtc for x86
  efi: rtc-efi: Export platform:rtc-efi as module alias
  efi: Delete the in_nmi() conditional runtime locking
  efi: Provide a non-blocking SetVariable() operation
  x86/efi: Adding efi_printks on memory allocationa and pci.reads
  x86/efi: Mark initialization code as such
  x86/efi: Update comment regarding required phys mapped EFI services
  x86/efi: Unexport add_efi_memmap variable
  x86/efi: Remove unused efi_call* macros
  efi: Resolve some shadow warnings
  arm64: efi: Format EFI memory type & attrs with efi_md_typeattr_format()
  ia64: efi: Format EFI memory type & attrs with efi_md_typeattr_format()
  x86: efi: Format EFI memory type & attrs with efi_md_typeattr_format()
  efi: Introduce efi_md_typeattr_format()
  efi: Add macro for EFI_MEMORY_UCE memory attribute
  x86/efi: Clear EFI_RUNTIME_SERVICES if failing to enter virtual mode
  arm64/efi: Do not enter virtual mode if booting with efi=noruntime or noefi
  arm64/efi: uefi_init error handling fix
  efi: Add kernel param efi=noruntime
  lib: Add a generic cmdline parse function parse_option_str
  ...
2014-10-23 14:45:09 -07:00
Daniel Glöckner a882b14fe8 rtc-cmos: fix wakeup from S5 without CONFIG_PM_SLEEP
Commit b5ada4600d ("drivers/rtc/rtc-cmos.c: fix compilation warning
when !CONFIG_PM_SLEEP") broke wakeup from S5 by making cmos_poweroff a
nop unless CONFIG_PM_SLEEP was defined.

Fix this by restricting the #ifdef to cmos_resume and restoring the old
dependency on CONFIG_PM for cmos_suspend and cmos_poweroff.

Signed-off-by: Daniel Glöckner <daniel-gl@gmx.net>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14 02:18:19 +02:00
Chen Gang 706b632d04 drivers/rtc/Kconfig: Let several drivers depend on HAS_IOMEM to avoid compiling issue
Some drivers need 'devm_ioremap_resource' or 'devm_ioremap' which need
HAS_IOMEM, so let them depend on it.

The related error (with allmodconfig under score):

    MODPOST 1365 modules
  ERROR: "devm_ioremap_resource" [drivers/rtc/rtc-xgene.ko] undefined!
  ERROR: "devm_ioremap_resource" [drivers/rtc/rtc-stk17ta8.ko] undefined!
  ERROR: "devm_ioremap_resource" [drivers/rtc/rtc-ds1742.ko] undefined!
  ERROR: "devm_ioremap_resource" [drivers/rtc/rtc-ds1553.ko] undefined!
  ERROR: "devm_ioremap_resource" [drivers/rtc/rtc-ds1511.ko] undefined!
  ERROR: "devm_ioremap_resource" [drivers/rtc/rtc-ds1286.ko] undefined!
  ERROR: "devm_ioremap" [drivers/rtc/rtc-rp5c01.ko] undefined!
  ERROR: "devm_ioremap" [drivers/rtc/rtc-msm6242.ko] undefined!
  ERROR: "devm_ioremap" [drivers/rtc/rtc-m48t59.ko] undefined!
  ERROR: "devm_ioremap" [drivers/rtc/rtc-m48t35.ko] undefined!
  ERROR: "devm_ioremap" [drivers/rtc/rtc-bq4802.ko] undefined!

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14 02:18:19 +02:00
Andy Shevchenko b513e522cb drivers/rtc/rtc-rs5c372.c: use %*ph to dump small buffers
Instead of pushing each byte let's reduce stack usage by using %*ph specifier.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14 02:18:19 +02:00
Arnd Bergmann 3ff38237f1 drivers/rtc/rtc-pcf8563.c: fix pcf8563_irq() error return value
As pointed out by Sergei Shtylyov, the pcf8563_irq function contains a
bug in the error handling: an interrupt handler is not supposed to
return an errno value but an 'enum irqreturn'.

Let's fix this by returning IRQ_NONE in case of a communication error.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14 02:18:19 +02:00
Arnd Bergmann e698a51239 drivers/rtc/rtc-pcf8563.c: fix uninitialized use warning
gcc-4.9 found a potential condition under which the 'pending' variable
may be used uninitialized:

  drivers/rtc/rtc-pcf8563.c: In function 'pcf8563_irq':
  drivers/rtc/rtc-pcf8563.c:173:5: warning: 'pending' may be used uninitialized in this function [-Wmaybe-uninitialized]

This is because in the pcf8563_get_alarm_mode() function, we check any
nonzero return of pcf8563_read_block_data, but in the irq function we
only check for negative values, so a possible positive value does not
get detected if the compiler chooses not to inline the entire call
chain.

Checking for any non-zero value in the interrupt handler as well is just
as correct and lets the compiler know what we are doing, without needing
a bogus initialization.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14 02:18:19 +02:00
Javier Martinez Canillas a4d4121ba7 rtc: add driver for Maxim 77802 PMIC Real-Time-Clock
The MAX7802 PMIC has a Real-Time-Clock (RTC) with two alarms.  This
patch adds support for the RTC and is based on a driver added by Simon
Glass to the Chrome OS kernel 3.8 tree.

[akpm@linux-foundation.org: add comment clarifying ffs() use]
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Doug Anderson <dianders@chromium.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Olof Johansson <olof@lixom.net>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14 02:18:19 +02:00
Javier Martinez Canillas a20cd88e20 rtc: max77686: Use ffs() to calculate tm_wday
max77686_rtc_calculate_wday() is used to calculate the day of the week
to be filled in struct rtc_time but that function only calculates the
number of bits shifted.  So the ffs() function can be used to find the
first bit set instead of a special function.

[akpm@linux-foundation.org: add comment clarifying ffs() use]
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14 02:18:19 +02:00
Javier Martinez Canillas ea33c31b62 rtc: max77686: remove unneeded info log
If devm_rtc_device_register() fails a dev_err() is already reported so
there is no need to do an additional dev_info().

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Cc: Doug Anderson <dianders@chromium.org>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Olof Johansson <olof@lixom.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14 02:18:19 +02:00
Javier Martinez Canillas 1745d6d3bc rtc: max77686: fail to probe if no RTC regmap irqchip is set
The max77686 mfd driver adds a regmap IRQ chip which creates an IRQ
domain that is used to map the virtual RTC alarm1 interrupt.

The RTC driver assumes that this will always be true since the PMIC IRQ
is a required property according to the max77686 DT binding doc.  If an
"interrupts" property is not defined for a max77686 PMIC, then the mfd
probe function will fail and the RTC platform driver will never be
probed.

But even when it is not possible to probe the rtc-max77686 driver
without a regmap IRQ chip, it's better to explicitly check if the IRQ
chip data is not NULL and gracefully fail instead of getting an OOPS.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Reported-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Doug Anderson <dianders@chromium.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Olof Johansson <olof@lixom.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14 02:18:19 +02:00
Javier Martinez Canillas 6b50fac5dd rtc: max77686: remove dead code for SMPL and WTSR
The MAX77686 RTC chip has two features called SMPL (Sudden Momentary
Power Loss) and WTSR (Watchdog Timeout and Software Resets).  Support
for these features seems to be implemented in the driver but compilation
is disabled using a C pre-processor conditional.

This code has been disabled since the driver was original merged in
commit fca1dd031a ("rtc: max77686: add Maxim 77686 driver").

So, since this code has never been built, let's just remove it.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Doug Anderson <dianders@chromium.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Olof Johansson <olof@lixom.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14 02:18:18 +02:00
Doug Anderson e7f7fc7369 rtc: max77686: Allow the max77686 rtc to wakeup the system
This series add support for the Real Time clock present in the Maxim 77802
Power Managment IC.  The version number is quite high because it
previously was part of a bigger series [0] that aimed to add support for
all the devices in the max77802 PMIC.  But now that the max77802
dependencies were already merged for 3.17, the series were split but I
kept the version numbering.

While working on the max77802 rtc support a lot of feedback was given and
the issues pointed out also apply to a driver for a similar PMIC RTC
(max77686).  So patches 01/06 to 05/06 in the series are cleanups for the
max77686 driver and patch 06/06 adds the support for the max77802 RTC.

The series were tested on an Exynos5250 Snow (max77686) and
Exynos5420 Peach Pit (max77802) machines.

This patch (of 6):

The max77686 includes an RTC that keeps power during suspend.  It's
convenient to be able to use it as a wakeup source.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Olof Johansson <olof@lixom.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14 02:18:18 +02:00
Pavel Machek 765a98a6b9 rtc: bq32000: add trickle charger option, with device tree binding
BQ32000 devices have "trickle chargers".  Introduce a code to enable the
charger, based on device tree.

Without charger, RTC does not keep time after power off.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Pavel Machek <pavel@denx.de>
Cc: Jason Cooper <jason@lakedameon.net>
Cc: Matti Vaittinen <matti.vaittinen@nsn.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14 02:18:18 +02:00
Matti Vaittinen 33b04b7b7c rtc: ds1307: add trickle charger device tree binding
Some DS13XX devices have "trickle chargers".  Introduce a device tree
binding for specifying the trickle charger configuration for ds1339.

Only ds1339 dt binding is supported because this is the only chip I have.
I _assume_ the code would have worked on other allready supported chips.
However I cannot check the resistor values for the other chips or test
them.  For other chips the driver code works as earlier Eg.  it does not
check the dt bindings at all

Signed-off-by: Matti Vaittinen <matti.vaittinen@nsn.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Pavel Machek <pavel@denx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14 02:18:18 +02:00
Chris Zhong 3ca1e326f5 RTC: RK808: add RTC driver for RK808
This is the initial version of the RK808 PMIC.  This is a power management
IC for multimedia products.  It provides regulators that are able to
supply power to processor cores and other components.  The chip provides
other modules including RTC, Clockout.

Add RTC driver for supporting RTC device present inside RK808 PMIC.

[akpm@linux-foundation.org: make tm_def static]
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Zhang Qing <zhangqing@rock-chips.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Samuel Ortiz <sameo@linux.intel.com> says:
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Olof Johansson <olof@lixom.net>
Cc: Dmitry Torokhov <dtor@chromium.org>
Cc: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Cc: Kever Yang <kever.yang@rock-chips.com>
Cc: Li Zhong <zhong@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14 02:18:18 +02:00
Uwe Kleine-König a28885bc75 rtc: make of_device_ids const
of_device_ids (i.e. compatible strings and the respective data) are not
supposed to change at runtime.  All functions working with of_device_ids
provided by <linux/of.h> work with const of_device_ids.  This allows to
mark all struct of_device_id below drivers/rtc const, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14 02:18:17 +02:00
Chanwoo Choi df9e26d093 rtc: s3c: add support for RTC of Exynos3250 SoC
Add support for RTC of Exynos3250 SoC.  The Exynos3250 needs source
clock(32.768KHz) for RTC block.  If source clock of RTC is registerd on
clock list of common clk framework, Exynos RTC drvier have to control
this clock.

Clock list for s3c-rtc device:
- rtc : CLK_RTC of CLK_GATE_IP_PERIR is gate clock for RTC.
- rtc_src : XrtcXTI is 32.768.kHz source clock for RTC.
 (XRTCXTI: Specifies a clock from 32.768 kHz crystal pad with XRTCXTI and
 XRTCXTO pins. RTC uses this clock as the source of a real-time clock.)

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14 02:18:17 +02:00
Chanwoo Choi ae05c95074 rtc: s3c: add s3c_rtc_data structure to use variant data instead of s3c_cpu_type
Add s3c_rtc_data structure to variant data according to SoC type.  The
s3c_rtc_data structure includes some functions to control RTC operation
and specific data dependent on SoC type.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14 02:18:17 +02:00
Chanwoo Choi d67288da51 rtc: s3c: remove warning message when checking coding style with checkpatch script
Remove warning message when checking codeing style with checkpatch script
and reduce un-necessary i2c read operation on s3c_rtc_enable.

    WARNING: line over 80 characters
    #406: FILE: drivers/rtc/rtc-s3c.c:406:
    +		if ((readw(info->base + S3C2410_RTCCON) & S3C2410_RTCCON_RTCEN) == 0) {

    WARNING: line over 80 characters
    #414: FILE: drivers/rtc/rtc-s3c.c:414:
    +		if ((readw(info->base + S3C2410_RTCCON) & S3C2410_RTCCON_CNTSEL)) {

    WARNING: line over 80 characters
    #422: FILE: drivers/rtc/rtc-s3c.c:422:
    +		if ((readw(info->base + S3C2410_RTCCON) & S3C2410_RTCCON_CLKRST)) {

    WARNING: Missing a blank line after declarations
    #451: FILE: drivers/rtc/rtc-s3c.c:451:
    +	struct s3c_rtc_drv_data *data;
    +	if (pdev->dev.of_node) {

    WARNING: Missing a blank line after declarations
    #453: FILE: drivers/rtc/rtc-s3c.c:453:
    +		const struct of_device_id *match;
    +		match = of_match_node(s3c_rtc_dt_match, pdev->dev.of_node);

    WARNING: DT compatible string "samsung,s3c2416-rtc" appears un-documented -- check ./Documentation/devicetree/bindings/
    #650: FILE: drivers/rtc/rtc-s3c.c:650:
    +		.compatible = "samsung,s3c2416-rtc",

    WARNING: DT compatible string "samsung,s3c2443-rtc" appears un-documented -- check ./Documentation/devicetree/bindings/
    #653: FILE: drivers/rtc/rtc-s3c.c:653:
    +		.compatible = "samsung,s3c2443-rtc",

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14 02:18:17 +02:00
Chanwoo Choi 19be09f51d rtc: s3c: define s3c_rtc structure to remove global variables.
Define s3c_rtc structure including necessary variables for S3C RTC device
instead of global variables.  This patch improves the readability by
removing global variables.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14 02:18:17 +02:00
Julia Lawall 473b864512 rtc: use c99 initializers in structures
Use c99 initializers for structures.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@decl@
identifier i1,fld;
type T;
field list[n] fs;
@@

struct i1 {
 fs
 T fld;
 ...};

@bad@
identifier decl.i1,i2;
expression e;
initializer list[decl.n] is;
@@

struct i1 i2 = { is,
+ .fld = e
- e
 ,...};
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-14 02:18:17 +02:00
Linus Torvalds 8b45bc892e ARM: SoC driver updates for 3.18
These are changes for drivers that are intimately tied to some SoC
 and for some reason could not get merged through the respective
 subsystem maintainer tree.
 
 Most of the new code is for the Keystone Navigator driver, which is
 new base support that is going to be needed for their hardware
 accelerated network driver and other units.
 
 Most of the commits are for moving old code around from at91 and omap
 for things that are done in device drivers nowadays.
 
 - at91: move reset, poweroff, memory and clocksource code into drivers
   directories
 - socfpga: add edac driver (through arm-soc, as requested by Boris)
 - omap: move omap-intc code to drivers/irqchip
 - sunxi: added an RTC driver for sun6i
 - omap: mailbox driver related changes
 - keystone: support for the "Navigator" component
 - versatile: new reboot, led and soc drivers
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIVAwUAVDWWQGCrR//JCVInAQKX7Q//bDkoseKCZsGaXN7vfQ2YhT3SAc52mROV
 YQKdNmtMUrHqDgngATZTx5ogOh1hInnqueFjGGhfMYsHQO1Vj8+odj0r+4jhjuUY
 3YfY+qZ+91tq33JlUOhKn+mfVMdxJc8XarGgR6MSWYkqWVYCtLtBluum7hKm2UJ6
 /e4hd2zzImX5ATwj/LXWLx5eTf1qAVFGWzNUph1DrW+1V5lOu58X4gKwk1QOCVEh
 Pa0GV9oRTkjoswwz9drzjeFtie2yofQ2mygj6QKxg5NsosIF0+B8kJ61Sxwg56Ak
 tF+qn1hGtB2cDQkpxK4o2cZgCELhkh5Aqgol/vZUS1DMBSUEGCV9PPp2eOW83r3B
 0zsTgsShyVcTh7khdpQmHNRigvcc7e69LaAGC4o/RxaZpCU/LUNCQ+/iqVExSE8A
 VNEXr+JNxGxhj3m9KUHuEktdWx1oNvaYR8Rr4RPr6EWR8R6emJ04I7kXInvzhJZL
 HOGh75vSuAU83FrsP8fFRLadoHNVDXylAs38BPfGEMngVpjvwJLgQ3+729CwW+Q4
 +xQXAKSwKfr8xA8eg6wBSbFcwnEW4QwRqFqQ5XPw7zTZkCZbiLtvn3JpI5bH5A5Q
 /d2D+M2vFbB7VbWJBM4etO95eNS/pfhqJhcQh4t0DjXjoW6WqLiHCxhEx8Ogfvop
 /4ckyGvtEOI=
 =POJD
 -----END PGP SIGNATURE-----

Merge tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC driver updates from Arnd Bergmann:
 "These are changes for drivers that are intimately tied to some SoC and
  for some reason could not get merged through the respective subsystem
  maintainer tree.

  Most of the new code is for the Keystone Navigator driver, which is
  new base support that is going to be needed for their hardware
  accelerated network driver and other units.

  Most of the commits are for moving old code around from at91 and omap
  for things that are done in device drivers nowadays.

   - at91: move reset, poweroff, memory and clocksource code into
     drivers directories
   - socfpga: add edac driver (through arm-soc, as requested by Boris)
   - omap: move omap-intc code to drivers/irqchip
   - sunxi: added an RTC driver for sun6i
   - omap: mailbox driver related changes
   - keystone: support for the "Navigator" component
   - versatile: new reboot, led and soc drivers"

* tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (92 commits)
  bus: arm-ccn: Fix spurious warning message
  leds: add device tree bindings for register bit LEDs
  soc: add driver for the ARM RealView
  power: reset: driver for the Versatile syscon reboot
  leds: add a driver for syscon-based LEDs
  drivers/soc: ti: fix build break with modules
  MAINTAINERS: Add Keystone Multicore Navigator drivers entry
  soc: ti: add Keystone Navigator DMA support
  Documentation: dt: soc: add Keystone Navigator DMA bindings
  soc: ti: add Keystone Navigator QMSS driver
  Documentation: dt: soc: add Keystone Navigator QMSS bindings
  rtc: sunxi: Depend on platforms sun4i/sun7i that actually have the rtc
  rtc: sun6i: Add sun6i RTC driver
  irqchip: omap-intc: remove unnecessary comments
  irqchip: omap-intc: correct maximum number or MIR registers
  irqchip: omap-intc: enable TURBO idle mode
  irqchip: omap-intc: enable IP protection
  irqchip: omap-intc: remove unnecesary of_address_to_resource() call
  irqchip: omap-intc: comment style cleanup
  irqchip: omap-intc: minor improvement to omap_irq_pending()
  ...
2014-10-08 17:37:16 -04:00
Linus Torvalds 4a4743e840 ARM: SoC non-critical bug fixes for 3.18
These are bug fixes for harmless problems that were not important
 enough to get fixed in 3.17. The majority of these are OMAP specific,
 but there are also a couple for Marvell mvebu, cns3xxx, and others,
 as well as some updates for the MAINTAINERS file.
 
 In particular, Robert Jarzmik and Daniel Mack now volunteered to help
 out maintaining the PXA platform, Krzysztof Halasa took over the
 cns3xxx platform, Carlo Caione is the maintainer for the new Amlogic
 meson platform, and Matthias Brugger is now listed for the mediatek
 platform he recently contributed.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIVAwUAVDWVUmCrR//JCVInAQLm9hAAmXeBRbFFSP5mhGcWW08ME0bparXsYzdB
 dHOpgsc/+sYiwv0UjQlMB16vfUsfzZEh0y5FY2fq8FeFuWcQloeEdPh3pKkC0SOz
 n6qhBMYERajZysQV+zj3ngFoSIDRDrpbyLMpXZCzLgjrO7zz2sqO8oglPYIyJ5mZ
 9YMES5KazmWpVzp2Y0O/ou5x9Gx9y7Mhq+8uhL/ACzkZCqfIm0PuAaZ5Tq72h2GG
 ibjwpGJ6d1dcINOKhsJzGb24wXtjd+mzONVnTTa0wOUzUsixB8kZJEmyQSNaet3P
 Cf/g+YoQaoJkbSR1QQUU+TxvJSC30APiy6B6KeCjl+rO6j28FbWfssi5plCp/24H
 fRfw6MLzYOjfVYZ87dXGAKmO8KYaJz0vvOgKBqfzFIZDJtYnWFsMZPu/Ml20wGOC
 A84sfsAyJI3lPf02XWBv7VBKPyTP9WlaiKzrlLzquNVLZhSkPd6SBSJGCb29WlzH
 h4vfSj2sK3+8UC0HB5ZBWwggdESqaloAjAHAdHk8dkCAkfjyUvjzorSTwaUmy8uc
 PU5Fifl7Pf18pZkj2rJ4mBuVUrxtlW33oXerf9iSaYVhJH/d0xfXca1mwcuKUWFv
 /pOe9c+XNZYzIZ6PWux/SqTSoe6Q6vi3KVBXjP+45cUHa0/uwgufO9vf+zCAfxV/
 +yg7aMWHJP8=
 =Smzi
 -----END PGP SIGNATURE-----

Merge tag 'fixes-nc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC non-critical bug fixes from Arnd Bergmann:
 "These are bug fixes for harmless problems that were not important
  enough to get fixed in 3.17.  The majority of these are OMAP specific,
  but there are also a couple for Marvell mvebu, cns3xxx, and others, as
  well as some updates for the MAINTAINERS file.

  In particular, Robert Jarzmik and Daniel Mack now volunteered to help
  out maintaining the PXA platform, Krzysztof Halasa took over the
  cns3xxx platform, Carlo Caione is the maintainer for the new Amlogic
  meson platform, and Matthias Brugger is now listed for the mediatek
  platform he recently contributed"

* tag 'fixes-nc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (42 commits)
  MAINTAINERS: update Shawn's email address
  MAINTAINERS: condense some Tegra related entries
  MAINTAINERS: add Alexandre Courbot for Tegra
  MAINTAINERS: CNS3xxx and IXP4xx update.
  MAINTAINERS: Add maintainers entry for Mediatek SoCs
  arm, vt8500, LLVMLlinux: Use mcr instead of mcr% for mach-vt8500
  MAINTAINERS: add a third maintainer to mach-bcm
  CNS3xxx: Fix PCIe read size limit.
  CNS3xxx: Fix logical PCIe topology.
  CNS3xxx: Fix debug UART.
  MAINTAINERS: Add entry for the Amlogic MesonX SoCs
  MAINTAINERS: update ARM pxa maintainers
  ARM: at91/PMC: don't forget to write PMC_PCDR register to disable clocks
  ARM: at91: fix at91sam9263ek DT mmc pinmuxing settings
  ARM: mvebu: Netgear RN102: Use Hardware BCH ECC
  ARM: Kirkwood: Fix DT based DSA.
  ARM: OMAP2+: make of_device_ids const
  ARM: omap2: make arrays containing machine compatible strings const
  ARM: LPC32xx: Fix reset function
  ARM: mvebu: Netgear RN2120: Use Hardware BCH ECC
  ...
2014-10-08 17:03:09 -04:00
Matt Fleming 75b128573b Merge branch 'next' into efi-next-merge
Conflicts:
	arch/x86/boot/compressed/eboot.c
2014-10-03 22:15:56 +01:00
Matt Fleming 7efe665903 rtc: Disable EFI rtc for x86
commit da167ad763 ("rtc: ia64: allow other architectures to use EFI
RTC") inadvertently introduced a regression for x86 because we've been
careful not to enable the EFI rtc driver due to the generally buggy
implementations of the time-related EFI runtime services.

In fact, since the above commit was merged we've seen reports of crashes
on 32-bit tablets,

  https://bugzilla.kernel.org/show_bug.cgi?id=84241#c21

Disable it explicitly for x86 so that we don't give users false hope
that this driver will work - it won't, and your machine is likely to
crash.

Acked-by: Mark Salter <msalter@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: <stable@vger.kernel.org> # v3.17
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2014-10-03 21:24:17 +01:00
Ard Biesheuvel 3f71f6da77 efi: rtc-efi: Export platform:rtc-efi as module alias
When the rtc-efi driver is built as a module, we already register the
EFI rtc as a platform device if UEFI Runtime Services are enabled.
To wire it up to udev, and let the module be loaded automatically, we
need to export the 'platform:rtc-efi' alias from the module.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Mark Salter <msalter@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2014-10-03 18:41:04 +01:00
Pali Rohár 451ff6d409 drivers/rtc/rtc-efi.c: add missing module alias
Without proper alias kernel module is not loaded for rtc-efi driver.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Cc: dann frazier <dannf@dannf.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-09-26 08:10:35 -07:00
Arnd Bergmann 8a87f1a6c8 Allwinner drivers additions for 3.18
Nothing major, just handling the RTC driver changes needed for the A31/A23.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJUHeMwAAoJEBx+YmzsjxAg9SkQAKDnwNzCaE7X4xWaWFSwsQWG
 57W79GuFBCQ5s4JLrEtzcR+z8BoiXTwc24fV9iJT9Ax8FJL+aDduLXc6wvWhyJhZ
 PhT7noZewWrBQxaHWlFhT4rS/jhM4FLaFayXqogS5N/ZJD/youanxfk9b1oR+OOs
 SG0DBpMf3n48YPQJIroE/zY4uKuMCHYpWNadyGulEtLw7Zpp3zLWGyxjLO5tZLUk
 al3WkcASDp2ad+vDm02X8VKhtr1EG0TbaZPw3HXDa5rW3BR2LBABcDE9U69YCn/4
 CtFpBbQ7h4oWId5/OdmbJaPdO9cVyiV8ClddG6IsGp9gC+bHZKPRz74E72B/eN3Q
 e5wT8j2p/JE8mqEK9IUdosIDOc26I/7RQMgg3nqzlTQciwa1VUfS3IqHhdkSzuYk
 pwEQFD0DAs0se01E4oyGH3zgcJtj978qsUz55ke1CBEGz6zz9sTfFAjH4M2NYYFl
 CxlkHwP5l+yeoFVBjeHivlbrKYtN9x6VSwy3L7EPonr++xkNTuc5thQVt3ldkfkr
 0lh64cuAujs0rKETr/QrY03TaqS23srycPO6oBdrwIXuI6EqHuzjSrR+sfLzpDbe
 iFkaiHQWCm9esQO6vEz7lsLUauGLuwPhWsmRXRGDbxQLjuMhutEIU3/9QGFr7KCj
 FFF7ndKUF8dcpJkWozKP
 =kOAE
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-drivers-for-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into next/drivers

Pull "Allwinner drivers additions for 3.18" from Maxime Ripard:

Nothing major, just handling the RTC driver changes needed for the A31/A23.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

* tag 'sunxi-drivers-for-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux:
  rtc: sunxi: Depend on platforms sun4i/sun7i that actually have the rtc
  rtc: sun6i: Add sun6i RTC driver
2014-09-25 18:15:34 +02:00
Olof Johansson 422d9abf99 mvebu fixes for v3.17
- kirkwood
     - final driver cleanup of ARCH_KIRKWOOD removal
     - fix DT based DSA
 
  - mvebu
     - use BCH ECC for the RN2120 and RN104/2 nand chips
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJUFVCDAAoJEP45WPkGe8ZnEYcP/1M3SDwvSk4lwXbvJnZQUo+H
 NS32Ve0O85ZAVgdV8KiETBq2DJS1rioYrJ4QK5t5NhTFBkNpLZ8R3H7TBbobohaq
 hVLEidOx8RoV/igsGzx1fCsmWSQN/v+qvaQxvmHUrvAcha9QkcluIJ7gIZ3Oe8iD
 L/VFCcJDInmXGNw9pmcz00NR4OUIkOuaYibgz6ZgpfeeZJ/rWtSJkYR9DmzzwwU7
 yj8CU8ErcrgAeqe8o3fCAENZmQmnG14B3fPfBvJU02GZzfLGUSbVNe6hP2DuKnP6
 xpx2CCA1tJaovD9AVu70/vbH/E2sOqaydV7CYXLGwKA3E5X2XAnVMzS9pWVwMFMk
 ed+31urGaLm74y4XBcGtGCqVTzP/xXEX0dsKhxqiEGyz/jf/E6LrcBIuEnTm4iYl
 p0tGlqwZb97hXORZDitry5hUrgJ7Yu6tGUAEeZ6hvvaLhCADMctoNeaavthmSI+w
 YsdvAMM31XxyRgvgERvZfk+eNraV+X5EXyBQzJ8880279aV640nq/LjDcrq3kOZz
 3FcdrRnX1fSyhUStbs+5h+T7vQ5zJd07xtvK0xsdl1g7DaqURCKgla/VZ2xJuNrf
 eK8NTERF0Y/nwUXeq37ETDx25Kd4wTGgitzNAW8gkVp3gIvxGDpjDBQvwY1Bc6Fz
 NQN0g0pX4TSgcXJywEoX
 =D/As
 -----END PGP SIGNATURE-----

Merge tag 'mvebu-fixes-3.17' of git://git.infradead.org/linux-mvebu into next/fixes-non-critical

Merge "mvebu fixes for v3.17" from Jason Cooper:

 - kirkwood
    - final driver cleanup of ARCH_KIRKWOOD removal
    - fix DT based DSA

 - mvebu
    - use BCH ECC for the RN2120 and RN104/2 nand chips

* tag 'mvebu-fixes-3.17' of git://git.infradead.org/linux-mvebu:
  ARM: mvebu: Netgear RN102: Use Hardware BCH ECC
  ARM: Kirkwood: Fix DT based DSA.
  ARM: mvebu: Netgear RN2120: Use Hardware BCH ECC
  ARM: mvebu: Netgear RN104: Use Hardware BCH ECC
  cpufreq: Remove ARCH_KIRKWOOD dependency
  watchdog: Remove ARCH_KIRKWOOD dependency
  rtc: Remove ARCH_KIRKWOOD dependency
  leds: Remove ARCH_KIRKWOOD dependency
  thermal: Remove ARCH_KIRKWOOD dependency
  ata: Remove ARCH_KIRKWOOD dependency
  cpuidle: kirkwood: Remove ARCH_KIRKWOOD dependency
2014-09-23 22:29:09 -07:00
Chen-Yu Tsai 64a1925c00 rtc: sunxi: Depend on platforms sun4i/sun7i that actually have the rtc
Now that we have Kconfig options for individual sunxi platforms, let
the rtc-sunxi driver depend on the platforms that actually have this
hardware, sun4i and sun7i.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2014-09-19 12:39:30 +02:00
Chen-Yu Tsai 9765d2d943 rtc: sun6i: Add sun6i RTC driver
This patch introduces the driver for the RTC in the Allwinner A31 and
A23 SoCs.

Unlike the RTC found in A10/A20 SoCs, which was part of the timer, the
RTC in A31/A23 are a separate hardware block, which also contain a few
controls for the RTC block hardware (a regulator and RTC block GPIO pin
latches), while also having separate interrupts for the alarms.

The hardware is different enough to make a different driver for it.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Varka Bhadram <varkabhadram@gmail.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2014-09-19 12:39:19 +02:00
Andrew Lunn ace2c0205b rtc: Remove ARCH_KIRKWOOD dependency
mach-kirkwood has been removed, now that kirkwood lives in mach-mvebu.
ARCH_MVEBU is sufficient.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: rtc-linux@googlegroups.com
Link: https://lkml.kernel.org/r/1409417172-6846-6-git-send-email-andrew@lunn.ch
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-09-09 14:40:03 +00:00
Bartlomiej Zolnierkiewicz b7d5b9a968 drivers/rtc/rtc-s5m.c: re-add support for devices without irq specified
The rtc-s5m driver used to support devices without irq specified in the
past.  Re-add this support.

The patch fixes boot for Insignal's Exynos4412 based Origen board.

Error messages before the patch:

  ...
  Unable to handle kernel NULL pointer dereference at virtual address 00000094
  pgd = c0004000
  [00000094] *pgd=00000000
  Internal error: Oops: 5 [#1] PREEMPT SMP ARM
  Modules linked in:
  CPU: 1 PID: 1 Comm: swapper/0 Not tainted 3.16.0-next-20140804-00008-ga59480f-dirty #701
  task: ea80f000 ti: ea882000 task.ti: ea882000
  PC is at regmap_irq_get_virq+0x0/0x28
  LR is at s5m_rtc_probe+0xdc/0x310
  pc : [<c02574fc>]    lr : [<c02de75c>]    psr: 80000153
  sp : ea883e48  ip : 00000000  fp : 00000000
  r10: 0000000c  r9 : c05de7ac  r8 : eaabc600
  r7 : eaa6b4d0  r6 : c0439e8c  r5 : eaabc610  r4 : eab30e50
  r3 : 00000000  r2 : 00000000  r1 : 0000000c  r0 : 00000000
  Flags: Nzcv  IRQs on  FIQs off  Mode SVC_32  ISA ARM  Segment kernel
  Control: 10c5387d  Table: 4000404a  DAC: 00000015
  Process swapper/0 (pid: 1, stack limit = 0xea882240)
  Backtrace:
    regmap_irq_get_virq
    s5m_rtc_probe
    platform_drv_probe
    driver_probe_device
    __driver_attach
    bus_for_each_dev
    bus_add_driver
    driver_register
    do_one_initcall
    kernel_init_freeable
    kernel_init
  ---[ end trace a954d7f019122700 ]---
  Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
  ...

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-29 16:28:16 -07:00
Linus Torvalds 8065be8d03 Merge branch 'akpm' (second patchbomb from Andrew Morton)
Merge more incoming from Andrew Morton:
 "Two new syscalls:

     memfd_create in "shm: add memfd_create() syscall"
     kexec_file_load in "kexec: implementation of new syscall kexec_file_load"

  And:

   - Most (all?) of the rest of MM

   - Lots of the usual misc bits

   - fs/autofs4

   - drivers/rtc

   - fs/nilfs

   - procfs

   - fork.c, exec.c

   - more in lib/

   - rapidio

   - Janitorial work in filesystems: fs/ufs, fs/reiserfs, fs/adfs,
     fs/cramfs, fs/romfs, fs/qnx6.

   - initrd/initramfs work

   - "file sealing" and the memfd_create() syscall, in tmpfs

   - add pci_zalloc_consistent, use it in lots of places

   - MAINTAINERS maintenance

   - kexec feature work"

* emailed patches from Andrew Morton <akpm@linux-foundation.org: (193 commits)
  MAINTAINERS: update nomadik patterns
  MAINTAINERS: update usb/gadget patterns
  MAINTAINERS: update DMA BUFFER SHARING patterns
  kexec: verify the signature of signed PE bzImage
  kexec: support kexec/kdump on EFI systems
  kexec: support for kexec on panic using new system call
  kexec-bzImage64: support for loading bzImage using 64bit entry
  kexec: load and relocate purgatory at kernel load time
  purgatory: core purgatory functionality
  purgatory/sha256: provide implementation of sha256 in purgaotory context
  kexec: implementation of new syscall kexec_file_load
  kexec: new syscall kexec_file_load() declaration
  kexec: make kexec_segment user buffer pointer a union
  resource: provide new functions to walk through resources
  kexec: use common function for kimage_normal_alloc() and kimage_crash_alloc()
  kexec: move segment verification code in a separate function
  kexec: rename unusebale_pages to unusable_pages
  kernel: build bin2c based on config option CONFIG_BUILD_BIN2C
  bin2c: move bin2c in scripts/basic
  shm: wait for pins to be released when sealing
  ...
2014-08-08 15:57:47 -07:00
Thierry Reding 9f7d7a1d0f drivers/rtc/rtc-tps65910.c: fix potential NULL-pointer dereference
The interrupt handler gets the driver data associated with the RTC
device and doesn't check it for validity.  This can cause a NULL pointer
being dereferenced when and interrupt fires before the driver data was
properly set up.

Fix this by setting the driver data earlier (before the interrupt is
requested).

Signed-off-by: Thierry Reding <treding@nvidia.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08 15:57:20 -07:00
Hyogi Gim e1d60093ca driver/rtc/class.c: check the error after rtc_read_time()
In rtc_suspend() and rtc_resume(), the error after rtc_read_time() is not
checked.  If rtc device fail to read time, we cannot guarantee the
following process.

Add the verification code for returned rtc_read_time() error.

Signed-off-by: Hyogi Gim <hyogi.gim@lge.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08 15:57:20 -07:00
Søren Andersen 796b7abb33 rtc: add pcf85063 support
Add support for the pcf85063 rtc chip.

[akpm@linux-foundation.org: fix comment typo, tweak conding style]
Signed-off-by: Soeren Andersen <san@rosetechnology.dk>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08 15:57:20 -07:00
Stuart Longland db04d6284e drivers/rtc/rtc-isl12022.c: device tree support
Add support for configuring the ISL12022 real-time clock via the Device
tree framework.  This is based on what I've seen in the related ISL12057
driver, it has been tested and works on a Technologic Systems TS-7670
device which uses a ISL12020 RTC device, my device tree looks like this:

	apbx@80040000 {
		i2c0: i2c@80058000 {
			pinctrl-names = "default";
			pinctrl-0 = <&i2c0_pins_a>;
			clock-frequency = <400000>;
			status = "okay";

			isl12022@0x6f {
				compatible = "isl,isl12022";
				reg = <0x6f>;
			};
		};
		... etc
	};

Signed-off-by: Stuart Longland <stuartl@vrt.com.au>
Cc: Roman Fietze <roman.fietze@telemotive.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08 15:57:20 -07:00
Vincent Donnefort ede3e9d47c drivers/rtc/rtc-pcf8563.c: add alarm support
This patch adds alarm support for the NXP PCF8563 chip.

Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Cc: Simon Guinot <simon.guinot@sequanux.org>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08 15:57:20 -07:00
Vincent Donnefort 2784366c67 drivers/rtc/rtc-pcf8563.c: introduce read|write_block_data
This functions allow to factorize I2C I/O operations.

Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
Cc: Simon Guinot <simon.guinot@sequanux.org>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08 15:57:19 -07:00
Mark Salter da167ad763 rtc: ia64: allow other architectures to use EFI RTC
Currently, the rtc-efi driver is restricted to ia64 only.  Newer
architectures with EFI support may want to also use that driver.  This
patch moves the platform device setup from ia64 into drivers/rtc and
allow any architecture with CONFIG_EFI=y to use the rtc-efi driver.

Signed-off-by: Mark Salter <msalter@redhat.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08 15:57:19 -07:00
Hyogi Gim ca6dc2dab9 drivers/rtc/interface.c: check the error after __rtc_read_time()
In __rtc_set_alarm(), the error after __rtc_read_time() is not checked.
If rtc device fail to read time, we cannot guarantee the following
process.

Add the verification code for returned __rtc_read_time() error.

Signed-off-by: Hyogi Gim <hyogi.gim@lge.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08 15:57:19 -07:00
Jan Beulich 6e85bab6bc drivers/rtc/rtc-efi.c: check for invalid data coming back from UEFI
In particular seeing zero in eft->month is problematic, as it results in
-1 (converted to unsigned int, i.e.  yielding 0xffffffff) getting passed
to rtc_year_days(), where the value gets used as an array index
(normally resulting in a crash).  This was observed with the driver
enabled on x86 on some Fujitsu system (with possibly not up to date
firmware, but anyway).

Perhaps efi_read_alarm() should not fail if neither enabled nor pending
are set, but the returned time is invalid?

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reported-by: Raymund Will <rw@suse.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Jingoo Han <jg1.han@samsung.com>
Acked-by: Lee, Chun-Yi <jlee@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08 15:57:19 -07:00
Alexander Shiyan 3710f597ac drivers/rtc/rtc-ds1742.c: revert "drivers/rtc/rtc-ds1742.c: remove redundant of_match_ptr() helper"
Commit 5516f09717 ("drivers/rtc/rtc-ds1742.c: remove redundant
of_match_ptr() helper") has description as: "'ds1742_rtc_of_match' is
always compiled in.  Hence the helper macro is not needed".

It is not true, of_match_ptr() macro makes of_device_id parameter unused
and this constant is declared with __maybe_unused attribute, so normally
this variable should be discarded by linker.  This patch revers this
commit, since there are no reason to compile of_device_id constant for
non-DT systems.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08 15:57:19 -07:00
Jean Delvare 441fb76847 drivers/rtc/Kconfig: add hardware dependency to rtc-moxart
The rtc-moxart driver is only useful on MOXA ART systems so it should
depend on ARCH_MOXART as all other MOXA ART drivers already do.  Add
COMPILE_TEST as an alternative to allow for build testing on other
systems.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Jonas Jensen <jonas.jensen@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08 15:57:19 -07:00
Jean Delvare ad0200f72d drivers/rtc/Kconfig: move DS2404 entry where it belongs
Move the DS2404 entry together with the other Dallas entries, and add
Maxim so that it looks nicer (and more correct, too.)

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Sven Schnelle <svens@stackframe.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08 15:57:19 -07:00
Raghavendra Ganiga 571eb88390 drivers/rtc/rtc-ds1343.c: add support of nvram for maxim dallas rtc ds1343
This is a patch to add support of nvram for maxim dallas rtc ds1343.

Signed-off-by: Raghavendra Chandra Ganiga <ravi23ganiga@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08 15:57:19 -07:00