aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-09-09Merge branch 'drivers/reset' into next/lateKevin Hilman24-20/+768
* drivers/reset: reset: ath79: Fix missing spin_lock_init reset: Add (devm_)reset_control_get stub functions reset: reset-zynq: Adding support for Xilinx Zynq reset controller. docs: dts: Added documentation for Xilinx Zynq Reset Controller bindings. MIPS: ath79: Add the reset controller to the AR9132 dtsi reset: Add a driver for the reset controller on the AR71XX/AR9XXX devicetree: Add bindings for the ATH79 reset controller reset: socfpga: Update reset-socfpga to read the altr,modrst-offset property doc: dt: add documentation for lpc1850-rgu reset driver reset: add driver for lpc18xx rgu reset: sti: constify of_device_id array ARM: STi: DT: Move reset controller constants into common location MAINTAINERS: add include/dt-bindings/reset path to reset controller entry
2015-09-09Merge tag 'reset-for-4.3-fixes' of git://git.pengutronix.de/git/pza/linux ↵Kevin Hilman2-0/+15
into drivers/reset Merge "Reset controller fixes for v4.3" from Philipp Zabel: Reset controller fixes for v4.3 - added stubs to avoid build breakage in COMPILE_TEST configurations with RESET_CONTROLLER disabled - fixed missing spinlock initialization in ath79 driver * tag 'reset-for-4.3-fixes' of git://git.pengutronix.de/git/pza/linux: reset: ath79: Fix missing spin_lock_init reset: Add (devm_)reset_control_get stub functions
2015-09-09net: ipv6: use common fib_default_rule_prefPhil Sutter7-19/+3
This switches IPv6 policy routing to use the shared fib_default_rule_pref() function of IPv4 and DECnet. It is also used in multicast routing for IPv4 as well as IPv6. The motivation for this patch is a complaint about iproute2 behaving inconsistent between IPv4 and IPv6 when adding policy rules: Formerly, IPv6 rules were assigned a fixed priority of 0x3FFF whereas for IPv4 the assigned priority value was decreased with each rule added. Since then all users of the default_pref field have been converted to assign the generic function fib_default_rule_pref(), fib_nl_newrule() may just use it directly instead. Therefore get rid of the function pointer altogether and make fib_default_rule_pref() static, as it's not used outside fib_rules.c anymore. Signed-off-by: Phil Sutter <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2015-09-09net: ethoc: Remove unnecessary #ifdef CONFIG_OFTobias Klauser1-6/+1
For !CONFIG_OF of_get_property() is defined to always return NULL. Thus there's no need to protect the call to of_get_property() with #ifdef CONFIG_OF. Signed-off-by: Tobias Klauser <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2015-09-09net: dsa: bcm_sf2: Fix 64-bits register writesFlorian Fainelli1-2/+2
The macro to write 64-bits quantities to the 32-bits register swapped the value and offsets arguments, we want to preserve the ordering of the arguments with respect to how writel() is implemented for instance: value first, offset/base second. Fixes: 246d7f773c13 ("net: dsa: add Broadcom SF2 switch driver") Signed-off-by: Florian Fainelli <[email protected]> Reviewed-by: Vivien Didelot <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2015-09-09bpf: fix out of bounds access in verifier logAlexei Starovoitov1-2/+2
when the verifier log is enabled the print_bpf_insn() is doing bpf_alu_string[BPF_OP(insn->code) >> 4] and bpf_jmp_string[BPF_OP(insn->code) >> 4] where BPF_OP is a 4-bit instruction opcode. Malformed insns can cause out of bounds access. Fix it by sizing arrays appropriately. The bug was found by clang address sanitizer with libfuzzer. Reported-by: Yonghong Song <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Acked-by: Daniel Borkmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2015-09-09ipv6: fix multipath route replace error recoveryRoopa Prabhu1-26/+175
Problem: The ecmp route replace support for ipv6 in the kernel, deletes the existing ecmp route too early, ie when it installs the first nexthop. If there is an error in installing the subsequent nexthops, its too late to recover the already deleted existing route leaving the fib in an inconsistent state. This patch reduces the possibility of this by doing the following: a) Changes the existing multipath route add code to a two stage process: build rt6_infos + insert them ip6_route_add rt6_info creation code is moved into ip6_route_info_create. b) This ensures that most errors are caught during building rt6_infos and we fail early c) Separates multipath add and del code. Because add needs the special two stage mode in a) and delete essentially does not care. d) In any event if the code fails during inserting a route again, a warning is printed (This should be unlikely) Before the patch: $ip -6 route show 3000:1000:1000:1000::2 via fe80::202:ff:fe00:b dev swp49s0 metric 1024 3000:1000:1000:1000::2 via fe80::202:ff:fe00:d dev swp49s1 metric 1024 3000:1000:1000:1000::2 via fe80::202:ff:fe00:f dev swp49s2 metric 1024 /* Try replacing the route with a duplicate nexthop */ $ip -6 route change 3000:1000:1000:1000::2/128 nexthop via fe80::202:ff:fe00:b dev swp49s0 nexthop via fe80::202:ff:fe00:d dev swp49s1 nexthop via fe80::202:ff:fe00:d dev swp49s1 RTNETLINK answers: File exists $ip -6 route show /* previously added ecmp route 3000:1000:1000:1000::2 dissappears from * kernel */ After the patch: $ip -6 route show 3000:1000:1000:1000::2 via fe80::202:ff:fe00:b dev swp49s0 metric 1024 3000:1000:1000:1000::2 via fe80::202:ff:fe00:d dev swp49s1 metric 1024 3000:1000:1000:1000::2 via fe80::202:ff:fe00:f dev swp49s2 metric 1024 /* Try replacing the route with a duplicate nexthop */ $ip -6 route change 3000:1000:1000:1000::2/128 nexthop via fe80::202:ff:fe00:b dev swp49s0 nexthop via fe80::202:ff:fe00:d dev swp49s1 nexthop via fe80::202:ff:fe00:d dev swp49s1 RTNETLINK answers: File exists $ip -6 route show 3000:1000:1000:1000::2 via fe80::202:ff:fe00:b dev swp49s0 metric 1024 3000:1000:1000:1000::2 via fe80::202:ff:fe00:d dev swp49s1 metric 1024 3000:1000:1000:1000::2 via fe80::202:ff:fe00:f dev swp49s2 metric 1024 Fixes: 27596472473a ("ipv6: fix ECMP route replacement") Signed-off-by: Roopa Prabhu <[email protected]> Reviewed-by: Nikolay Aleksandrov <[email protected]> Acked-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2015-09-09soc: qcom: smd: Correct fBLOCKREADINTR handlingBjorn Andersson1-3/+3
fBLOCKREADINTR is masking the notification from the remote and should hence be cleared while we're waiting the tx fifo to drain. Also change the reset state to mask the notification, as send is the only use case where we're interested in it. Signed-off-by: Bjorn Andersson <[email protected]> Signed-off-by: Andy Gross <[email protected]>
2015-09-09soc: qcom: smd: Use correct remote processor IDAndy Gross2-4/+18
This patch fixes SMEM addressing issues when remote processors need to use secure SMEM partitions. Signed-off-by: Andy Gross <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]>
2015-09-09soc: qcom: smem: Fix errant private accessAndy Gross1-12/+6
This patch corrects private partition item access. Instead of falling back to global for instances where we have an actual host and remote partition existing, return the results of the private lookup. Signed-off-by: Andy Gross <[email protected]>
2015-09-09Merge tag 'qcom-soc-for-4.3' into v4.2-rc2Andy Gross10-0/+2660
Qualcomm ARM Based SoC Updates for 4.3 * Add SMEM driver * Add SMD driver * Add RPM over SMD driver * Select QCOM_SCM by default
2015-09-09intel_pstate: fix PCT_TO_HWP macroKristen Carlson Accardi1-7/+14
PCT_TO_HWP does not take the actual range of pstates exported by HWP_CAPABILITIES in account, and is broken on most platforms. Remove the macro and set the min and max pstate for hwp by determining the range and adjusting by the min and max percent limits values. Signed-off-by: Kristen Carlson Accardi <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2015-09-09intel_pstate: Fix user input of min/max to legal policy regionChen Yu1-3/+14
In current code, max_perf_pct might be smaller than min_perf_pct by improper user input: $ grep . /sys/devices/system/cpu/intel_pstate/m*_perf_pct /sys/devices/system/cpu/intel_pstate/max_perf_pct:100 /sys/devices/system/cpu/intel_pstate/min_perf_pct:100 $ echo 80 > /sys/devices/system/cpu/intel_pstate/max_perf_pct $ grep . /sys/devices/system/cpu/intel_pstate/m*_perf_pct /sys/devices/system/cpu/intel_pstate/max_perf_pct:80 /sys/devices/system/cpu/intel_pstate/min_perf_pct:100 Fix this problem by 2 steps: 1. Normalize the user input to [min_policy, max_policy]. 2. Make sure max_perf_pct>=min_perf_pct, suggested by Seiichi Ikarashi. Signed-off-by: Chen Yu <[email protected]> Acked-by: Kristen Carlson Accardi <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2015-09-09PM / OPP: Return suspend_opp only if it is enabledViresh Kumar1-7/+5
There is no point returning suspend_opp, if it is disabled by the core. As we can't use it at all. Fix it. Fixes: 4eafbd15b6c8 ("PM / OPP: add dev_pm_opp_get_suspend_opp() helper") Signed-off-by: Viresh Kumar <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2015-09-09ARM: dts: qcom: msm8974-sony-xperia-honami: Use stdout-pathStephen Boyd1-0/+8
Use stdout-path so that we don't have to put the console on the kernel command line. Cc: Tim Bird <[email protected]> Cc: Bjorn Andersson <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
2015-09-09ARM: dts: qcom: msm8960-cdp: Use stdout-pathStephen Boyd1-0/+8
Use stdout-path so that we don't have to put the console on the kernel command line. Signed-off-by: Stephen Boyd <[email protected]>
2015-09-09ARM: dts: qcom: msm8660-surf: Use stdout-pathStephen Boyd1-0/+8
Use stdout-path so that we don't have to put the console on the kernel command line. Signed-off-by: Stephen Boyd <[email protected]>
2015-09-09ARM: dts: qcom: ipq8064-ap148: Use stdout-pathStephen Boyd1-0/+8
Use stdout-path so that we don't have to put the console on the kernel command line. Cc: Mathieu Olivari <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
2015-09-09ARM: dts: qcom: apq8084-mtp: Use stdout-pathStephen Boyd1-0/+8
Use stdout-path so that we don't have to put the console on the kernel command line. Signed-off-by: Stephen Boyd <[email protected]>
2015-09-09ARM: dts: qcom: apq8084-ifc6540: Use stdout-pathStephen Boyd1-0/+8
Use stdout-path so that we don't have to put the console on the kernel command line. Signed-off-by: Stephen Boyd <[email protected]>
2015-09-09ARM: dts: qcom: apq8074-dragonboard: Use stdout-pathStephen Boyd1-0/+8
Use stdout-path so that we don't have to put the console on the kernel command line. Signed-off-by: Stephen Boyd <[email protected]>
2015-09-09ARM: dts: qcom: apq8064-ifc6410: Use stdout-pathStephen Boyd1-0/+4
Use stdout-path so that we don't have to put the console on the kernel command line. Signed-off-by: Stephen Boyd <[email protected]>
2015-09-09ARM: dts: qcom: apq8064-cm-qs600: Use stdout-pathStephen Boyd1-0/+8
Use stdout-path so that we don't have to put the console on the kernel command line. Cc: Mike Rapoport <[email protected]> Cc: Igor Grinberg <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
2015-09-09ARM: dts: qcom: Label serial nodes for aliasing and stdout-pathStephen Boyd5-5/+5
Add a label to the serial nodes that are being used for the console. Signed-off-by: Stephen Boyd <[email protected]>
2015-09-09Merge tag 'qcom-dt-for-4.3' into v4.2-rc2Andy Gross7-22/+523
Qualcomm ARM Based Device Tree Updates for v4.3 * Switch to use pinctrl compatible for GPIOs * Add RPM regulators for MSM8960 * Add SPI Ethernet support on MSM8960 CDP * Add SMEM support along with dependencies * Add PM8921 support for GPIO and MPP * Fix GSBI cell index * Switch to use real regulators on APQ8064 w/ SDCC
2015-09-09ebpf: fix fd refcount leaks related to maps in bpf syscallDaniel Borkmann1-4/+8
We may already have gotten a proper fd struct through fdget(), so whenever we return at the end of an map operation, we need to call fdput(). However, each map operation from syscall side first probes CHECK_ATTR() to verify that unused fields in the bpf_attr union are zero. In case of malformed input, we return with error, but the lookup to the map_fd was already performed at that time, so that we return without an corresponding fdput(). Fix it by performing an fdget() only right before bpf_map_get(). The fdget() invocation on maps in the verifier is not affected. Fixes: db20fd2b0108 ("bpf: add lookup/update/delete/iterate methods to BPF maps") Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Alexei Starovoitov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2015-09-09Watchdog: Fix parent of watchdog_devicesPratyush Anand37-0/+37
/sys/class/watchdog/watchdogn/device/modalias can help to identify the driver/module for a given watchdog node. However, many wdt devices do not set their parent and so, we do not see an entry for device in sysfs for such devices. This patch fixes parent of watchdog_device so that /sys/class/watchdog/watchdogn/device is populated. Exceptions: booke, diag288, octeon, softdog and w83627hf -- They do not have any parent. Not sure, how we can identify driver for these devices. Signed-off-by: Pratyush Anand <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Acked-by: Guenter Roeck <[email protected]> Acked-by: H Hartley Sweeten <[email protected]> Acked-by: Lee Jones <[email protected]> Acked-by: Lubomir Rintel <[email protected]> Acked-by: Maxime Coquelin <[email protected]> Acked-by: Thierry Reding <[email protected]> Acked-by: Viresh Kumar <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2015-09-09watchdog: at91rm9200: Correct check for syscon_node_to_regmap() errorsBjorn Andersson1-1/+1
syscon_node_to_regmap() returns a regmap or an ERR_PTR(). Signed-off-by: Bjorn Andersson <[email protected]> Acked-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2015-09-09watchdog: at91sam9: get and use slow clockAlexandre Belloni1-2/+20
Commit dca1a4b5ff6e ("clk: at91: keep slow clk enabled to prevent system hang") added a workaround for the slow clock as it is not properly handled by its users. Get and use the slow clock as it is necessary for the at91sam9 watchdog. Signed-off-by: Alexandre Belloni <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2015-09-09Documentation: dt: binding: atmel-sama5d4-wdt: for SAMA5D4 watchdog driverWenyou Yang1-0/+35
The compatible "atmel,sama5d4-wdt" supports the SAMA5D4 watchdog driver and the watchdog's WDT_MR register can be written more than once. Signed-off-by: Wenyou Yang <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2015-09-09RDS: verify the underlying transport exists before creating a connectionSasha Levin1-0/+6
There was no verification that an underlying transport exists when creating a connection, this would cause dereferencing a NULL ptr. It might happen on sockets that weren't properly bound before attempting to send a message, which will cause a NULL ptr deref: [135546.047719] kasan: GPF could be caused by NULL-ptr deref or user memory accessgeneral protection fault: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC KASAN [135546.051270] Modules linked in: [135546.051781] CPU: 4 PID: 15650 Comm: trinity-c4 Not tainted 4.2.0-next-20150902-sasha-00041-gbaa1222-dirty #2527 [135546.053217] task: ffff8800835bc000 ti: ffff8800bc708000 task.ti: ffff8800bc708000 [135546.054291] RIP: __rds_conn_create (net/rds/connection.c:194) [135546.055666] RSP: 0018:ffff8800bc70fab0 EFLAGS: 00010202 [135546.056457] RAX: dffffc0000000000 RBX: 0000000000000f2c RCX: ffff8800835bc000 [135546.057494] RDX: 0000000000000007 RSI: ffff8800835bccd8 RDI: 0000000000000038 [135546.058530] RBP: ffff8800bc70fb18 R08: 0000000000000001 R09: 0000000000000000 [135546.059556] R10: ffffed014d7a3a23 R11: ffffed014d7a3a21 R12: 0000000000000000 [135546.060614] R13: 0000000000000001 R14: ffff8801ec3d0000 R15: 0000000000000000 [135546.061668] FS: 00007faad4ffb700(0000) GS:ffff880252000000(0000) knlGS:0000000000000000 [135546.062836] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b [135546.063682] CR2: 000000000000846a CR3: 000000009d137000 CR4: 00000000000006a0 [135546.064723] Stack: [135546.065048] ffffffffafe2055c ffffffffafe23fc1 ffffed00493097bf ffff8801ec3d0008 [135546.066247] 0000000000000000 00000000000000d0 0000000000000000 ac194a24c0586342 [135546.067438] 1ffff100178e1f78 ffff880320581b00 ffff8800bc70fdd0 ffff880320581b00 [135546.068629] Call Trace: [135546.069028] ? __rds_conn_create (include/linux/rcupdate.h:856 net/rds/connection.c:134) [135546.069989] ? rds_message_copy_from_user (net/rds/message.c:298) [135546.071021] rds_conn_create_outgoing (net/rds/connection.c:278) [135546.071981] rds_sendmsg (net/rds/send.c:1058) [135546.072858] ? perf_trace_lock (include/trace/events/lock.h:38) [135546.073744] ? lockdep_init (kernel/locking/lockdep.c:3298) [135546.074577] ? rds_send_drop_to (net/rds/send.c:976) [135546.075508] ? __might_fault (./arch/x86/include/asm/current.h:14 mm/memory.c:3795) [135546.076349] ? __might_fault (mm/memory.c:3795) [135546.077179] ? rds_send_drop_to (net/rds/send.c:976) [135546.078114] sock_sendmsg (net/socket.c:611 net/socket.c:620) [135546.078856] SYSC_sendto (net/socket.c:1657) [135546.079596] ? SYSC_connect (net/socket.c:1628) [135546.080510] ? trace_dump_stack (kernel/trace/trace.c:1926) [135546.081397] ? ring_buffer_unlock_commit (kernel/trace/ring_buffer.c:2479 kernel/trace/ring_buffer.c:2558 kernel/trace/ring_buffer.c:2674) [135546.082390] ? trace_buffer_unlock_commit (kernel/trace/trace.c:1749) [135546.083410] ? trace_event_raw_event_sys_enter (include/trace/events/syscalls.h:16) [135546.084481] ? do_audit_syscall_entry (include/trace/events/syscalls.h:16) [135546.085438] ? trace_buffer_unlock_commit (kernel/trace/trace.c:1749) [135546.085515] rds_ib_laddr_check(): addr 36.74.25.172 ret -99 node type -1 Acked-by: Santosh Shilimkar <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2015-09-09watchdog: add a driver to support SAMA5D4 watchdog timerWenyou Yang4-0/+292
From SAMA5D4, the watchdog timer is upgrated with a new feature, which is describled as in the datasheet, "WDT_MR can be written until a LOCKMR command is issued in WDT_CR". That is to say, as long as the bootstrap and u-boot don't issue a LOCKMR command, WDT_MR can be written more than once in the driver. So the SAMA5D4 watchdog driver's implementation is different from the at91sam9260 watchdog driver implemented in file at91sam9_wdt.c. The user application open the device file to enable the watchdog timer hardware, and close to disable it, and set the watchdog timer timeout by seting WDV and WDD fields of WDT_MR register, and ping the watchdog by issuing WDRSTT command to WDT_CR register with hard-coded key. Signed-off-by: Wenyou Yang <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2015-09-09watchdog: mpc8xxx: allow to compile for MPC512xUwe Kleine-König1-1/+1
The MPC5125 processor features a watchdog device that is identical to the MPC8610 one. So allow to enable the driver for MPC512x kernel configurations. Signed-off-by: Uwe Kleine-König <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2015-09-09watchdog: mpc8xxx: use better error code when watchdog cannot be enabledUwe Kleine-König1-1/+1
checkpatch warns about ENOSYS, telling "ENOSYS means 'invalid syscall nr' and nothing else". So use ENODEV instead. Signed-off-by: Uwe Kleine-König <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2015-09-09watchdog: mpc8xxx: use dynamic memory for device specific dataUwe Kleine-König1-35/+53
Instead of relying on global static memory dynamically allocate the needed data. This has the benefit of some saved bytes if the driver is not in use and making it possible to bind more than one device (even though this has no known use case). Signed-off-by: Uwe Kleine-König <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2015-09-09watchdog: mpc8xxx: use devm_ioremap_resource to map memoryUwe Kleine-König1-12/+7
This simplifies the error paths and device unbinding. Signed-off-by: Uwe Kleine-König <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2015-09-09watchdog: mpc8xxx: make use of of_device_get_match_dataUwe Kleine-König1-4/+2
This function is new in v4.2-rc1 and makes a forward declaration of the match table superfluous which can so be removed. Signed-off-by: Uwe Kleine-König <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2015-09-09watchdog: mpc8xxx: simplify registrationUwe Kleine-König1-31/+7
Since commit ef90174f8210 ("watchdog: watchdog_core: Add watchdog registration deferral mechanism") there is no need to delay the call to watchdog_register_device any more. So simplify the registration code accordingly. Resetting wd_base to NULL can the also be dropped because nothing depends on it being NULL to signal probe failure any more. (The matching wd_base = NULL in .remove was missing, too.) Signed-off-by: Uwe Kleine-König <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2015-09-09watchdog: mpc8xxx: remove dead codeUwe Kleine-König1-13/+2
Signed-off-by: Uwe Kleine-König <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2015-09-09watchdog: lpc18xx_wdt_get_timeleft() can be staticFengguang Wu1-1/+1
Signed-off-by: Fengguang Wu <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2015-09-09DT: watchdog: Add NXP LPC18xx Watchdog Timer binding documentationAriel D'Alessandro1-0/+19
Add the devicetree binding document for NXP LPC18xx Watchdog Timer. Signed-off-by: Ariel D'Alessandro <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2015-09-09watchdog: NXP LPC18xx Watchdog Timer DriverAriel D'Alessandro3-0/+352
This commit adds support for the watchdog timer found in NXP LPC SoCs family, which includes LPC18xx/LPC43xx. Other SoCs in that family may share the same watchdog hardware. Watchdog driver registers a restart handler that will restart the system by performing an incorrect feed after ensuring the watchdog is enabled in reset mode. As watchdog cannot be disabled in hardware, driver's stop routine will regularly send a keepalive ping using a timer. Signed-off-by: Ariel D'Alessandro <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2015-09-09watchdog: gpio-wdt: ping already at startup for always running devicesUwe Kleine-König1-30/+30
During probe for an always-running watchdog a timer is setup to constantly ping the watchdog while the device is not open. The gpio to ping the watchdog is setup to inactive. For a watchdog with hw_algo = "toggle" this results in a ping depending on the initial state of the gpio, for hw_algo = "level" no ping is generated. Make sure that the first automatic ping is sent immediately and not only when the timer expires the first time. This makes the machine survive in case more than half of the watchdog timeout is already elapsed. (Which is very probable for the chip I'm faced with that has a timeout of one second.) Signed-off-by: Uwe Kleine-König <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2015-09-09watchdog: gpio-wdt: be more strict about hw_algo matchingUwe Kleine-König1-2/+2
strncmp(algo, "toggle", 6) doesn't compare the trailing '\0' byte, so using hw_algo = "toggleboggle" is recognized the same way as hw_algo = "toggle" . While this doesn't introduce any problems for a device tree that sticks to the documented settings it's still ugly. Fix this by using strcmp to only match on "toggle" and "level". Signed-off-by: Uwe Kleine-König <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2015-09-09Documentation: watchdog: at91sam9_wdt: add clocks propertyAlexandre Belloni1-0/+2
The watchdog has an input clock, the slow clock. It is required as it will not function without it. Signed-off-by: Alexandre Belloni <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2015-09-09xen-netback: require fewer guest Rx slots when not using GSODavid Vrabel2-17/+16
Commit f48da8b14d04ca87ffcffe68829afd45f926ec6a (xen-netback: fix unlimited guest Rx internal queue and carrier flapping) introduced a regression. The PV frontend in IPXE only places 4 requests on the guest Rx ring. Since netback required at least (MAX_SKB_FRAGS + 1) slots, IPXE could not receive any packets. a) If GSO is not enabled on the VIF, fewer guest Rx slots are required for the largest possible packet. Calculate the required slots based on the maximum GSO size or the MTU. This calculation of the number of required slots relies on 1650d5455bd2 (xen-netback: always fully coalesce guest Rx packets) which present in 4.0-rc1 and later. b) Reduce the Rx stall detection to checking for at least one available Rx request. This is fine since we're predominately concerned with detecting interfaces which are down and thus have zero available Rx requests. Signed-off-by: David Vrabel <[email protected]> Reviewed-by: Wei Liu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2015-09-09watchdog: booke_wdt: Use infrastructure to check timeout limitsGuenter Roeck1-3/+1
The watchdog infrastructure checks the maximum timeout for us. Use it. Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2015-09-09watchdog: (nv_tco) add support for MCP79Vivien Didelot1-0/+2
Tested on the Nvidia chipset with an SMBus controller PCI ID 0x0AA2 (as shown in the PCI listing during the boot sequence). Signed-off-by: Vivien Didelot <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2015-09-09watchdog: sunxi: fix activation of system resetFrancesco Lavra1-1/+1
Commit f2147de33470 ("watchdog: sunxi: support parameterized compatible strings") introduced a regression in sunxi_wdt_start(), by which the system reset function of the watchdog is not enabled upon starting the watchdog. As a result, the system is not reset when the watchdog expires. Fix it. Fixes: f2147de33470 ("watchdog: sunxi: support parameterized compatible strings") Signed-off-by: Francesco Lavra <[email protected]> Acked-by: Maxime Ripard <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]> Cc: [email protected]
2015-09-09watchdog: mtk_wdt: add wdt shutdown callback to disable wdt if enabledGreta Zhang1-0/+9
Without .shutdown(), watchdog might reset the system during power off. For example, if watchdog's timeout is set to 30s, then it is reset to zero by mtk_wdt_ping(). During power off, no app will ping watchdog, but watchdog is still running and may trigger reset. Signed-off-by: Greta Zhang <[email protected]> Signed-off-by: Eddie Huang <[email protected]> Acked-by: Matthias Brugger <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>