All of lore.kernel.org
 help / color / mirror / Atom feed
From: thomas.petazzoni@free-electrons.com (Thomas Petazzoni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] ARM: mxs: dt: Add the Crystalfontz CFA-10055 device tree
Date: Sun, 16 Jun 2013 13:51:08 +0200	[thread overview]
Message-ID: <20130616135108.229d216e@skate> (raw)
In-Reply-To: <1371131025-12200-4-git-send-email-maxime.ripard@free-electrons.com>

Dear Maxime Ripard,

Some nitpicking below.

On Thu, 13 Jun 2013 15:43:44 +0200, Maxime Ripard wrote:

> -static void __init cfa10049_init(void)
> -{
> -	update_fec_mac_prop(OUI_CRYSTALFONTZ);
> -}
> -
> -static void __init cfa10037_init(void)
> +static void __init crystalfontz_init(void)
>  {
>  	update_fec_mac_prop(OUI_CRYSTALFONTZ);
>  }
> @@ -368,10 +363,10 @@ static void __init mxs_machine_init(void)
>  		imx28_evk_init();
>  	else if (of_machine_is_compatible("bluegiga,apx4devkit"))
>  		apx4devkit_init();
> -	else if (of_machine_is_compatible("crystalfontz,cfa10037"))
> -		cfa10037_init();
> -	else if (of_machine_is_compatible("crystalfontz,cfa10049"))
> -		cfa10049_init();
> +	else if (of_machine_is_compatible("crystalfontz,cfa10037") ||
> +		 of_machine_is_compatible("crystalfontz,cfa10049") ||
> +		 of_machine_is_compatible("crystalfontz,cfa10055"))
> +		crystalfontz_init();

Maybe this could be something like:

	else if (of_machine_is_compatible("crystalfontz,cfa10036"))
		crystalfontz_init();

with crystalfontz_init() something like:

	if (mac0 has status = "okay")
		update_fec_mac_prop(OUI_CRYSTALFONTZ);

This way, for all Crystalfontz boards that have an Ethernet interface,
it would call update_fec_mac_prop() without having to update mach-mxs.c
every time.

(Of course, this is based on the assumption that all Crystalfontz .dts
files have "crystalfontz,cfa10036" in their compatible string list)

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

WARNING: multiple messages have this Message-ID (diff)
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Shawn Guo <shawn.guo@linaro.org>,
	Brian Lilly <brian@crystalfontz.com>,
	Alexandre Belloni <alexandre.belloni@free-electrons.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 3/4] ARM: mxs: dt: Add the Crystalfontz CFA-10055 device tree
Date: Sun, 16 Jun 2013 13:51:08 +0200	[thread overview]
Message-ID: <20130616135108.229d216e@skate> (raw)
In-Reply-To: <1371131025-12200-4-git-send-email-maxime.ripard@free-electrons.com>

Dear Maxime Ripard,

Some nitpicking below.

On Thu, 13 Jun 2013 15:43:44 +0200, Maxime Ripard wrote:

> -static void __init cfa10049_init(void)
> -{
> -	update_fec_mac_prop(OUI_CRYSTALFONTZ);
> -}
> -
> -static void __init cfa10037_init(void)
> +static void __init crystalfontz_init(void)
>  {
>  	update_fec_mac_prop(OUI_CRYSTALFONTZ);
>  }
> @@ -368,10 +363,10 @@ static void __init mxs_machine_init(void)
>  		imx28_evk_init();
>  	else if (of_machine_is_compatible("bluegiga,apx4devkit"))
>  		apx4devkit_init();
> -	else if (of_machine_is_compatible("crystalfontz,cfa10037"))
> -		cfa10037_init();
> -	else if (of_machine_is_compatible("crystalfontz,cfa10049"))
> -		cfa10049_init();
> +	else if (of_machine_is_compatible("crystalfontz,cfa10037") ||
> +		 of_machine_is_compatible("crystalfontz,cfa10049") ||
> +		 of_machine_is_compatible("crystalfontz,cfa10055"))
> +		crystalfontz_init();

Maybe this could be something like:

	else if (of_machine_is_compatible("crystalfontz,cfa10036"))
		crystalfontz_init();

with crystalfontz_init() something like:

	if (mac0 has status = "okay")
		update_fec_mac_prop(OUI_CRYSTALFONTZ);

This way, for all Crystalfontz boards that have an Ethernet interface,
it would call update_fec_mac_prop() without having to update mach-mxs.c
every time.

(Of course, this is based on the assumption that all Crystalfontz .dts
files have "crystalfontz,cfa10036" in their compatible string list)

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

  reply	other threads:[~2013-06-16 11:51 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-13 13:43 [PATCH 0/4] ARM: mxs: Various Crystalfontz DT additions Maxime Ripard
2013-06-13 13:43 ` Maxime Ripard
2013-06-13 13:43 ` [PATCH 1/4] ARM: cfa10036: Add USB0 OTG port Maxime Ripard
2013-06-13 13:43   ` Maxime Ripard
2013-06-13 22:06   ` Arnd Bergmann
2013-06-13 22:06     ` Arnd Bergmann
2013-06-14  6:30     ` Shawn Guo
2013-06-14  6:30       ` Shawn Guo
2013-06-14  6:39       ` Shawn Guo
2013-06-14  6:39         ` Shawn Guo
2013-06-14 11:02     ` Maxime Ripard
2013-06-14 11:02       ` Maxime Ripard
2013-06-13 13:43 ` [PATCH 2/4] ARM: cfa10049: Switch the chip select pin of the LCD controller Maxime Ripard
2013-06-13 13:43   ` Maxime Ripard
2013-06-13 13:43 ` [PATCH 3/4] ARM: mxs: dt: Add the Crystalfontz CFA-10055 device tree Maxime Ripard
2013-06-13 13:43   ` Maxime Ripard
2013-06-16 11:51   ` Thomas Petazzoni [this message]
2013-06-16 11:51     ` Thomas Petazzoni
2013-06-13 13:43 ` [PATCH 4/4] ARM: mxs: dt: Add Crystalfontz CFA-10057 " Maxime Ripard
2013-06-13 13:43   ` Maxime Ripard
2013-06-14  6:51 ` [PATCH 0/4] ARM: mxs: Various Crystalfontz DT additions Shawn Guo
2013-06-14  6:51   ` Shawn Guo

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=20130616135108.229d216e@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 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.