All of lore.kernel.org
 help / color / mirror / Atom feed
From: Beniamino Galvani <b.galvani@gmail.com>
To: Romain Perier <romain.perier@gmail.com>
Cc: davem@davemloft.net, heiko@sntech.de, max.schwarz@online.de,
	eric.dumazet@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH 2/2] ethernet: arc: Add support for Rockchip SoC glue layer device tree bindings
Date: Fri, 8 Aug 2014 22:28:30 +0200	[thread overview]
Message-ID: <20140808202830.GA25105@gmail.com> (raw)
In-Reply-To: <1407500875-23851-2-git-send-email-romain.perier@gmail.com>

On Fri, Aug 08, 2014 at 12:27:55PM +0000, Romain Perier wrote:
> This patch defines a platform glue layer for Rockchip SoCs which support
> arc-emac driver. It ensures that regulator for the rmii is on before trying
> to connect to the ethernet controller. It applies right speed and mode changes
> to the grf when ethernet settings changes.
> 
> Signed-off-by: Romain Perier <romain.perier@gmail.com>

(...)

> +struct rockchip_priv_data {
> +	struct regmap *grf;
> +	unsigned int grf_offset;
> +	int interface;
> +	struct regulator *regulator;
> +};
> +
> +static const unsigned int rockchip_emac_soc_grf_offset[] = {
> +	0x154, /* rk3066 */
> +	0x0a4, /* rk3188 */
> +};
> +
> +static const struct of_device_id rockchip_emac_dt_ids[] = {
> +	{ .compatible = "rockchip,rk3066-emac", .data = (void *)rockchip_emac_soc_grf_offset },
> +	{ .compatible = "rockchip,rk3188-emac", .data = (void *)rockchip_emac_soc_grf_offset + 1 },

Hi Romain,

I think you need parenthesis around "rockchip_emac_soc_grf_offset + 1"
because the cast has higher precedence. Anyway, wouldn't it be simpler
to avoid the indirection and pass the offset directly in the data field?

Beniamino

  parent reply	other threads:[~2014-08-08 20:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-08 12:27 [PATCH 1/2] ethernet: arc: Add support for specific SoC glue layer device tree bindings Romain Perier
2014-08-08 12:27 ` [PATCH 2/2] ethernet: arc: Add support for Rockchip " Romain Perier
2014-08-08 12:37   ` Varka Bhadram
2014-08-08 16:25   ` Heiko Stübner
2014-08-09  9:23     ` Romain Perier
2014-08-08 20:28   ` Beniamino Galvani [this message]
2014-08-09  3:21     ` Florian Fainelli
2014-08-10 12:03 ` [PATCH 1/2] ethernet: arc: Add support for specific " Heiko Stübner
2014-08-10 16:14   ` Romain Perier
2014-08-10 16:23     ` Romain Perier

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=20140808202830.GA25105@gmail.com \
    --to=b.galvani@gmail.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=heiko@sntech.de \
    --cc=max.schwarz@online.de \
    --cc=netdev@vger.kernel.org \
    --cc=romain.perier@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.