linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: thomas.petazzoni@free-electrons.com (Thomas Petazzoni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 08/18] watchdog: orion: Make RSTOUT register a separate resource
Date: Sun, 26 Jan 2014 09:17:53 +0100	[thread overview]
Message-ID: <20140126091753.2910a39f@skate> (raw)
In-Reply-To: <1390431915-5115-9-git-send-email-ezequiel.garcia@free-electrons.com>

Dear Ezequiel Garcia,

On Wed, 22 Jan 2014 20:05:05 -0300, Ezequiel Garcia wrote:

> +/* RSTOUT mask register physical address for Orion5x, Kirkwood and Dove */
> +#define ORION_RSTOUT_MASK_OFFSET	0x20108
> +
> +/* Internal registers can be configured at any 1 MiB aligned address */
> +#define INTERNAL_REGS_MASK		~(SZ_1M - 1)

I'm not a big fan of hardcoding the internal register window size in a
driver. I would have preferred to have used the offset between the
watchdog registers and the rstout register, but since this one is
*before* the watchdog registers, it would have to be a negative offset.
Not sure how to handle this.

> +/*
> + * The original devicetree binding for this driver specified only
> + * one memory resource, so in order to keep DT backwards compatibility
> + * we try to fallback to a hardcoded register address, if the resource
> + * is missing from the devicetree.
> + */
> +static void __iomem *try_rstout_ioremap(struct platform_device *pdev,
> +					phys_addr_t internal_regs)

Why is it called "try" ? It actually does the mapping. So I would
prefer the function to be named:

	orion_wdt_ioremap_rstout()

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  parent reply	other threads:[~2014-01-26  8:17 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-22 23:04 [PATCH v4 00/18] Armada 370/XP watchdog support Ezequiel Garcia
2014-01-22 23:04 ` [PATCH v4 01/18] ARM: Introduce atomic MMIO modify Ezequiel Garcia
2014-01-25 20:32   ` Jason Cooper
2014-01-22 23:04 ` [PATCH v4 02/18] clocksource: orion: Use atomic access for shared registers Ezequiel Garcia
2014-01-22 23:05 ` [PATCH v4 03/18] watchdog: orion: Add clock error handling Ezequiel Garcia
2014-01-25 18:12   ` Guenter Roeck
2014-01-22 23:05 ` [PATCH v4 04/18] watchdog: orion: Use atomic access for shared registers Ezequiel Garcia
2014-01-25 18:12   ` Guenter Roeck
2014-01-22 23:05 ` [PATCH v4 05/18] watchdog: orion: Remove unused macros Ezequiel Garcia
2014-01-25 18:13   ` Guenter Roeck
2014-01-22 23:05 ` [PATCH v4 06/18] watchdog: orion: Make sure the watchdog is initially stopped Ezequiel Garcia
2014-01-25 18:13   ` Guenter Roeck
2014-01-22 23:05 ` [PATCH v4 07/18] watchdog: orion: Handle IRQ Ezequiel Garcia
2014-01-25 18:15   ` Guenter Roeck
2014-01-26  8:04   ` Thomas Petazzoni
2014-01-26 13:14     ` Ezequiel Garcia
2014-01-26 14:57       ` Thomas Petazzoni
2014-01-22 23:05 ` [PATCH v4 08/18] watchdog: orion: Make RSTOUT register a separate resource Ezequiel Garcia
2014-01-25 18:19   ` Guenter Roeck
2014-01-26 13:20     ` Ezequiel Garcia
2014-01-26  8:17   ` Thomas Petazzoni [this message]
2014-01-26 13:18     ` Ezequiel Garcia
2014-01-22 23:05 ` [PATCH v4 09/18] watchdog: orion: Remove unneeded BRIDGE_CAUSE clear Ezequiel Garcia
2014-01-25 18:20   ` Guenter Roeck
2014-01-22 23:05 ` [PATCH v4 10/18] watchdog: orion: Introduce an orion_watchdog device structure Ezequiel Garcia
2014-01-25 18:21   ` Guenter Roeck
2014-01-22 23:05 ` [PATCH v4 11/18] watchdog: orion: Introduce per-compatible of_device_id data Ezequiel Garcia
2014-01-25 18:23   ` Guenter Roeck
2014-01-22 23:05 ` [PATCH v4 12/18] watchdog: orion: Add per-compatible clock initialization Ezequiel Garcia
2014-01-25 18:24   ` Guenter Roeck
2014-01-22 23:05 ` [PATCH v4 13/18] watchdog: orion: Add per-compatible watchdog start implementation Ezequiel Garcia
2014-01-25 18:24   ` Guenter Roeck
2014-01-22 23:05 ` [PATCH v4 14/18] watchdog: orion: Add support for Armada 370 and Armada XP SoC Ezequiel Garcia
2014-01-25 18:25   ` Guenter Roeck
2014-01-22 23:05 ` [PATCH v4 15/18] ARM: mvebu: Enable Armada 370/XP watchdog in the devicetree Ezequiel Garcia
2014-01-22 23:05 ` [PATCH v4 16/18] ARM: kirkwood: Add RSTOUT 'reg' entry to devicetree Ezequiel Garcia
2014-01-22 23:05 ` [PATCH v4 17/18] watchdog: orion: Enable the build on ARCH_MVEBU Ezequiel Garcia
2014-01-22 23:05 ` [PATCH v4 18/18] ARM: mvebu: Enable watchdog support in defconfig Ezequiel Garcia
2014-01-23 22:40 ` [PATCH v4 00/18] Armada 370/XP watchdog support Sebastian Hesselbarth
2014-01-25 17:09   ` Ezequiel Garcia
2014-01-27 14:49   ` Ezequiel Garcia
2014-01-25 16:57 ` Ezequiel Garcia

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=20140126091753.2910a39f@skate \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).