From patchwork Fri Jul 15 08:31:04 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 977622 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p6F8VRbU005602 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 15 Jul 2011 08:31:49 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qhdno-0003dJ-Sp; Fri, 15 Jul 2011 08:31:17 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Qhdno-0003HK-Gb; Fri, 15 Jul 2011 08:31:16 +0000 Received: from na3sys009aog105.obsmtp.com ([74.125.149.75]) by canuck.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qhdni-0003H0-Jz for linux-arm-kernel@lists.infradead.org; Fri, 15 Jul 2011 08:31:14 +0000 Received: from mail-gx0-f176.google.com ([209.85.161.176]) (using TLSv1) by na3sys009aob105.postini.com ([74.125.148.12]) with SMTP ID DSNKTh/6y0zhLEude9IVy33EjwaM0G4/rBxH@postini.com; Fri, 15 Jul 2011 01:31:10 PDT Received: by mail-gx0-f176.google.com with SMTP id 7so610251gxk.21 for ; Fri, 15 Jul 2011 01:31:07 -0700 (PDT) Received: by 10.236.175.232 with SMTP id z68mr2818209yhl.46.1310718667445; Fri, 15 Jul 2011 01:31:07 -0700 (PDT) Received: from localhost (dragon.ti.com [192.94.94.33]) by mx.google.com with ESMTPS id p50sm985016yhj.28.2011.07.15.01.31.04 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 15 Jul 2011 01:31:06 -0700 (PDT) Date: Fri, 15 Jul 2011 11:31:04 +0300 From: Felipe Balbi To: Tony Lindgren Subject: Re: [PATCH] ARM: OMAP4: PCM049: remove vusim regulator Message-ID: <20110715083103.GF2611@legolas.emea.dhcp.ti.com> References: <1310554738.18446.12.camel@lws-weitzel> <1310554762-10743-1-git-send-email-j.weitzel@phytec.de> <4E1D8BCD.5060901@ru.mvista.com> <1310561772.18446.14.camel@lws-weitzel> <20110714073445.GL5783@atomide.com> <1310632792.4008.3.camel@lws-weitzel> <20110715075024.GO5783@atomide.com> <20110715075825.GB2611@legolas.emea.dhcp.ti.com> <20110715082012.GR5783@atomide.com> MIME-Version: 1.0 In-Reply-To: <20110715082012.GR5783@atomide.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110715_043110_982715_C3419116 X-CRM114-Status: GOOD ( 31.34 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [74.125.149.75 listed in list.dnswl.org] Cc: linux-arm-kernel@lists.infradead.org, Jan Weitzel , linux-omap@vger.kernel.org, Sergei Shtylyov , Felipe Balbi X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: balbi@ti.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 15 Jul 2011 08:31:49 +0000 (UTC) Hi, On Fri, Jul 15, 2011 at 01:20:12AM -0700, Tony Lindgren wrote: > * Felipe Balbi [110715 00:53]: > > Hi, > > > > On Fri, Jul 15, 2011 at 12:50:24AM -0700, Tony Lindgren wrote: > > > * Jan Weitzel [110714 01:34]: > > > > Am Donnerstag, den 14.07.2011, 00:34 -0700 schrieb Tony Lindgren: > > > > > * Jan Weitzel [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);