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: 977612 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6F8VBDO022149 for ; Fri, 15 Jul 2011 08:31:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965189Ab1GOIbK (ORCPT ); Fri, 15 Jul 2011 04:31:10 -0400 Received: from na3sys009aog120.obsmtp.com ([74.125.149.140]:51039 "EHLO na3sys009aog120.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965146Ab1GOIbI (ORCPT ); Fri, 15 Jul 2011 04:31:08 -0400 Received: from mail-gw0-f53.google.com ([74.125.83.53]) (using TLSv1) by na3sys009aob120.postini.com ([74.125.148.12]) with SMTP ID DSNKTh/6y0zhLEude9IVy33EjwaM0G4/rBxH@postini.com; Fri, 15 Jul 2011 01:31:08 PDT Received: by mail-gw0-f53.google.com with SMTP id 20so547496gwj.26 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 Cc: Felipe Balbi , Jan Weitzel , linux-omap@vger.kernel.org, Sergei Shtylyov , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] ARM: OMAP4: PCM049: remove vusim regulator Message-ID: <20110715083103.GF2611@legolas.emea.dhcp.ti.com> Reply-To: balbi@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 Content-Disposition: inline In-Reply-To: <20110715082012.GR5783@atomide.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 15 Jul 2011 08:31:12 +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);