From: Stephen Warren <swarren@wwwdotorg.org>
To: Lubomir Rintel <lkundrak@v3.sk>
Cc: linux-kernel@vger.kernel.org, Wim Van Sebroeck <wim@iguana.be>,
Guenter Roeck <linux@roeck-us.net>,
linux-rpi-kernel@lists.infradead.org,
linux-watchdog@vger.kernel.org
Subject: Re: [PATCH v3] watchdog: Add Broadcom BCM2835 watchdog timer driver
Date: Tue, 26 Mar 2013 21:40:49 -0600 [thread overview]
Message-ID: <51526A41.5090703@wwwdotorg.org> (raw)
In-Reply-To: <1364320200-23569-1-git-send-email-lkundrak@v3.sk>
On 03/26/2013 11:50 AM, Lubomir Rintel wrote:
> This adds a driver for watchdog timer hardware present on Broadcom BCM2835 SoC,
> used in Raspberry Pi and Roku 2 devices.
Since this patch defines a new DT binding, you should send it to
devicetree-discuss@lists.ozlabs.org too.
> diff --git a/drivers/watchdog/bcm2835_wdt.c b/drivers/watchdog/bcm2835_wdt.c
> +/*
> + * Watchdog driver for Broadcom BCM2835
> + *
> + * Interface to the Broadcom BCM2835 watchdog timer hardware is based on
> + * "bcm2708_wdog" driver written by Luke Diamand that was obtained from branch
> + * "rpi-3.6.y" of git://github.com/raspberrypi/linux.git
I see that the patch isn't S-o-b Luke in the downstream kernel. However,
it is S-o-b Dom Cobley (popcornmix), and they both work for Broadcom, so
I think that's OK.
> +static int bcm2835_wdt_probe(struct platform_device *pdev)
> +{
> + struct device *dev = &pdev->dev;
> + struct device_node *np = dev->of_node;
> + struct bcm2835_wdt *wdt;
> + int err;
> +
> + wdt = devm_kzalloc(dev, sizeof(struct bcm2835_wdt), GFP_KERNEL);
> + if (!wdt) {
> + dev_err(dev, "Failed to allocate memory for watchdog device");
> + return -ENOMEM;
> + }
> +
> + spin_lock_init(&wdt->lock);
> +
> + wdt->base = of_iomap(np, 0);
> + if (!wdt->base) {
> + dev_err(dev, "Failed to remap watchdog regs");
> + return -ENODEV;
> + }
> +
> + platform_set_drvdata(pdev, wdt);
> + watchdog_set_drvdata(&bcm2835_wdt_wdd, wdt);
Do you really need both of those? I would have thought just one would
have been enough.
I'd be tempted to put the platform_set_drvdata() call right after the
devm_kzalloc() of wdt, but it's not a big deal either way.
next prev parent reply other threads:[~2013-03-27 3:40 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-22 12:55 [PATCH] watchdog: Add Broadcom BCM2708 watchdog timer driver Lubomir Rintel
2013-03-22 13:56 ` Guenter Roeck
2013-03-24 14:06 ` Lubomir Rintel
2013-03-24 15:36 ` Guenter Roeck
2013-03-22 18:46 ` [PATCH] " Arend van Spriel
2013-03-24 14:08 ` Lubomir Rintel
2013-03-23 2:24 ` Stephen Warren
2013-03-24 14:12 ` Lubomir Rintel
2013-03-27 3:26 ` Stephen Warren
2013-03-27 3:33 ` Stephen Warren
2013-03-24 14:22 ` [PATCH v2] watchdog: Add Broadcom BCM2835 " Lubomir Rintel
2013-03-24 14:25 ` [PATCH v2] arm: Add Broadcom BCM2835 watchdog timer driver to bcm2835_defconfig Lubomir Rintel
2013-03-26 17:48 ` [PATCH v2] bcm2835: Add Broadcom BCM2835 RNG to the device tree Lubomir Rintel
2013-03-26 17:50 ` Lubomir Rintel
2013-03-26 17:50 ` [PATCH v3] watchdog: Add Broadcom BCM2835 watchdog timer driver Lubomir Rintel
2013-03-26 21:03 ` Guenter Roeck
2013-03-27 16:39 ` Lubomir Rintel
2013-03-27 3:40 ` Stephen Warren [this message]
2013-03-27 16:36 ` Lubomir Rintel
2013-03-27 3:49 ` Stephen Warren
2013-03-27 16:40 ` [PATCH v4] " Lubomir Rintel
2013-03-27 19:52 ` Guenter Roeck
2013-03-28 3:00 ` Stephen Warren
2013-03-28 3:50 ` Guenter Roeck
2013-05-26 14:22 ` Wim Van Sebroeck
2013-06-18 16:50 ` Lubomir Rintel
2013-06-18 17:10 ` Stephen Warren
2013-06-18 17:44 ` [PATCH v5] " Lubomir Rintel
2013-06-18 18:24 ` Guenter Roeck
2013-06-27 20:25 ` Wim Van Sebroeck
2013-05-17 2:59 ` [PATCH v4] " Stephen Warren
2013-03-24 16:12 ` [PATCH v2] " Guenter Roeck
2013-03-26 17:47 ` Lubomir Rintel
2013-03-26 19:47 ` Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51526A41.5090703@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=lkundrak@v3.sk \
--cc=wim@iguana.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox