linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Tony Lindgren <tony@atomide.com>
Cc: Felipe Balbi <balbi@ti.com>, Jan Weitzel <J.Weitzel@phytec.de>,
	linux-omap@vger.kernel.org,
	Sergei Shtylyov <sshtylyov@mvista.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ARM: OMAP4: PCM049: remove vusim regulator
Date: Fri, 15 Jul 2011 11:31:04 +0300	[thread overview]
Message-ID: <20110715083103.GF2611@legolas.emea.dhcp.ti.com> (raw)
In-Reply-To: <20110715082012.GR5783@atomide.com>

[-- Attachment #1: Type: text/plain, Size: 3594 bytes --]

Hi,

On Fri, Jul 15, 2011 at 01:20:12AM -0700, Tony Lindgren wrote:
> * Felipe Balbi <balbi@ti.com> [110715 00:53]:
> > Hi,
> > 
> > On Fri, Jul 15, 2011 at 12:50:24AM -0700, Tony Lindgren wrote:
> > > * Jan Weitzel <J.Weitzel@phytec.de> [110714 01:34]:
> > > > Am Donnerstag, den 14.07.2011, 00:34 -0700 schrieb Tony Lindgren:
> > > > > * Jan Weitzel <J.Weitzel@phytec.de> [110713 05:51]:
> > > > > > Am Mittwoch, den 13.07.2011, 16:13 +0400 schrieb Sergei Shtylyov:
> > > > > > 
> > > > > > > 
> > > > > > >     Have you added that 'i' at the end intentionally?
> > > > > > > 
> > > > > > Thank you. It was a tribute to vim.
> > > > > 
> > > > > :i)
> > > > > 
> > > > > I'll fold the fixed patch into your original patch. Will also
> > > > > keep the new board files in testing-board because of the code
> > > > > coalescing and device tree conversion effort.
> > > > 
> > > > So there is no way to get the board mainline yet?
> > > 
> > > Well we can add it even before device tree support if it makes
> > > sense from code coalescing point of view. In this case it would
> > > mean creating board-panda-common.c or similar so the code can
> > > be shared amongst the panda variants.
> > > 
> > > It seems that some GPIO pins are different and there are some
> > > difference in devices connected, but big parts of the code can be
> > > shared.
> > 
> > isn't it easier than to just add a few if (machine_is_xxxx()) checks and
> > another MACHINE_START() to board-omap4panda.c rather than creating a new
> > file, shuffling code around and then adding a new board file ??
> 
> That works too if the init_machine does not get too complicated.

possibly something like this (still missing MACHINE_START a few more
things):

diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 0cfe200..dff174c 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -681,20 +681,44 @@ void omap4_panda_display_init(void)
        omap_display_init(&omap4_panda_dss_data);
 }
 
+static struct omap_smsc911x_platform_data board_smsc911x_data __initdata = {
+       .cs             = OMAP4_SMSC911X_ETH_CS,
+       .gpio_irq       = OMAP4_SMSC911X_ETH_GPIO_IRQ,
+       .gpio_reset     = -EINVAL,
+       .flags          = SMSC911X_USE_16BIT,
+};
+
+static void __init omap4_panda_smsc91xx_init(void)
+{
+       if (!machine_is_pcm049())
+               return;
+
+       omap_mux_init_gpio(OMAP4_PCM049_ETH_GPIO_IRQ, OMAP_PIN_INPUT);
+       gpmc_smsc911x_init(&board_smsc911x_data);
+}
+
 static void __init omap4_panda_init(void)
 {
        int package = OMAP_PACKAGE_CBS;
 
        if (omap_rev() == OMAP4430_REV_ES1_0)
                package = OMAP_PACKAGE_CBL;
+
        omap4_mux_init(board_mux, NULL, package);
 
-       if (wl12xx_set_platform_data(&omap_panda_wlan_data))
-               pr_err("error setting wl12xx data\n");
+       if (machine_is_omap4panda()) {
+               int             ret;
+
+               ret = wl12xx_set_platform_data(&omap_panda_wlan_data);
+               if (ret)
+                       pr_err("error setting wl12xx data\n");
+
+               platform_device_register(&omap_vwlan_device);
+       }
 
+       omap4_panda_smsc91xx_init();
        omap4_panda_i2c_init();
        platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices));
-       platform_device_register(&omap_vwlan_device);
        board_serial_init();
        omap4_twl6030_hsmmc_init(mmc);

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

  reply	other threads:[~2011-07-15  8:31 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-08 10:04 [PATCH 0/3] ARM:OMAP4 add Phytec phyCORE-OMAP4 board Jan Weitzel
2011-07-08 10:04 ` [PATCH 1/3] ARM: OMAP4: Add pcm049 to Kconfig/Makefile Jan Weitzel
2011-07-08 11:49   ` Sergei Shtylyov
2011-07-08 11:55     ` Tony Lindgren
2011-07-08 11:58       ` Felipe Balbi
2011-07-14  7:27         ` Tony Lindgren
2011-07-14  7:47           ` Tony Lindgren
2011-07-08 12:21       ` [PATCH v2] ARM:OMAP4 add Phytec phyCORE-OMAP4 board Jan Weitzel
2011-07-13  8:03         ` Tony Lindgren
2011-07-13 10:58           ` Jan Weitzel
2011-07-13 10:59             ` [PATCH] ARM: OMAP4: PCM049: remove vusim regulator Jan Weitzel
2011-07-13 12:13               ` Sergei Shtylyov
2011-07-13 12:54                 ` [PATCH v2] " Jan Weitzel
2011-07-13 12:56                 ` [PATCH] " Jan Weitzel
2011-07-14  7:34                   ` Tony Lindgren
2011-07-14  8:39                     ` Jan Weitzel
2011-07-15  7:50                       ` Tony Lindgren
2011-07-15  7:58                         ` Felipe Balbi
2011-07-15  8:20                           ` Tony Lindgren
2011-07-15  8:31                             ` Felipe Balbi [this message]
2011-07-15 10:59                               ` Tony Lindgren
2011-07-15  9:47                         ` Jan Weitzel
2011-07-15 10:55                           ` Tony Lindgren
2011-07-15 16:06                             ` [RFC 0/2] join omap4panda and pcm049 Jan Weitzel
2011-07-18  8:42                               ` Tony Lindgren
2011-07-19 11:45                                 ` [RFC 0/2 v2] " Jan Weitzel
2011-07-19 11:45                                 ` [RFC 1/2] omap4: board-omap4panda: prepare for join Jan Weitzel
2011-07-21  7:25                                   ` Tony Lindgren
2011-07-19 11:45                                 ` [RFC 2/2] omap4: board-omap4pcm049: add Phytec phyCORE-OMAP4 Jan Weitzel
2011-07-21  7:38                                   ` Tony Lindgren
2011-07-15 16:06                             ` [PATCH 1/2] omap4: board-omap4panda: prepare for join Jan Weitzel
2011-07-15 16:06                             ` [PATCH 2/2] omap4: board-omap4panda: join Phytec phyCORE-OMAP4 Jan Weitzel
2011-07-08 10:04 ` [PATCH 2/3] ARM: OMAP4: add pcm049 DEBUGLL Jan Weitzel
2011-07-08 10:04 ` [PATCH 3/3] ARM: OMAP4: platformcode board-omap4pcm049.c Jan Weitzel

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=20110715083103.GF2611@legolas.emea.dhcp.ti.com \
    --to=balbi@ti.com \
    --cc=J.Weitzel@phytec.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=sshtylyov@mvista.com \
    --cc=tony@atomide.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 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).