All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olof Johansson <olof@lixom.net>
To: Andy Fleming <afleming@freescale.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH v2.6.26] powerpc: Add 8568 PHY workarounds to board code
Date: Fri, 2 May 2008 18:49:29 -0500	[thread overview]
Message-ID: <20080502234927.GC28587@lixom.net> (raw)
In-Reply-To: <1209751422-25634-1-git-send-email-afleming@freescale.com>

Hi,

On Fri, May 02, 2008 at 01:03:42PM -0500, Andy Fleming wrote:
> +static int __init board_fixups(void)
> +{
> +	char phy_id[BUS_ID_SIZE];
> +	char *compstrs[2] = {"fsl,gianfar-mdio", "fsl,ucc-mdio"};
> +	struct device_node *mdio;
> +	struct resource res;
> +	int i;
> +
> +	for (i = 0; i < ARRAY_SIZE(compstrs); i++) {
> +		mdio = of_find_compatible_node(NULL, NULL, compstrs[i]);
> +
> +		of_address_to_resource(mdio, 0, &res);
> +		snprintf(phy_id, BUS_ID_SIZE, "%x:%02x", res.start, 1);
> +
> +		phy_register_fixup_for_id(phy_id, mpc8568_fixup_125_clock);
> +		phy_register_fixup_for_id(phy_id, mpc8568_mds_phy_fixups);
> +
> +		/* Register a workaround for errata */
> +		snprintf(phy_id, BUS_ID_SIZE, "%x:%02x", res.start, 7);
> +		phy_register_fixup_for_id(phy_id, mpc8568_mds_phy_fixups);
> +
> +		of_node_put(mdio);
> +	}
> +
> +	return 0;
> +}
> +arch_initcall(board_fixups);

Are you sure you want to run this workaround on all boards that happen
to be built-in?  I.e. shouldn't you be checked for what board you are
running on, since the compatible strings you match on seem generic?


-Olof

  reply	other threads:[~2008-05-02 23:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-02 18:03 [PATCH v2.6.26] powerpc: Add 8568 PHY workarounds to board code Andy Fleming
2008-05-02 23:49 ` Olof Johansson [this message]
2008-05-02 23:43   ` Andy Fleming

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=20080502234927.GC28587@lixom.net \
    --to=olof@lixom.net \
    --cc=afleming@freescale.com \
    --cc=linuxppc-dev@ozlabs.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 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.