lkml.org 
[lkml]   [2015]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] watchdog: bcm2835: Add poweroff code for the Raspberry Pi
Hi Noralf,

Am 09.06.2015 um 12:21 schrieb Noralf Trønnes:
> This adds a new poweroff function to the watchdog driver for the
> Raspberry Pi. Currently poweroff/halt results in a reboot.
>
> [...]
>
> +static void rpi_power_off(void)
> +{
> + struct device_node *np =
> + of_find_compatible_node(NULL, NULL, "brcm,raspberrypi-pm-wdt");
> + struct platform_device *pdev = of_find_device_by_node(np);
> + struct bcm2835_wdt *wdt = platform_get_drvdata(pdev);
> + u32 val;
> +
> + val = readl_relaxed(wdt->base + PM_RSTS);

do you think it's safe here to assume wdt could never be NULL?

May be it's necessary to send the series to the watchdog / bcm2835
maintainers to get more feedback.

Regards
Stefan



\
 
 \ /
  Last update: 2015-06-12 14:01    [W:3.757 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site