All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Felipe Balbi <balbi@ti.com>
Cc: 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 03:59:20 -0700	[thread overview]
Message-ID: <20110715105920.GU5783@atomide.com> (raw)
In-Reply-To: <20110715083103.GF2611@legolas.emea.dhcp.ti.com>

* Felipe Balbi <balbi@ti.com> [110715 01:25]:
> 
> possibly something like this (still missing MACHINE_START a few more
> things):

Yes and it would be better to initialize data in the .init_machine
to avoid adding machine_is tests in multiple places.
 
> 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);

So we sould have panda_common_init() and then omap4_panda_init()
and omap4_phycore_init() or something like that. No need for machine_is
tests then as the .machine_init already takes care of that test.

Regards,

Tony

WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: OMAP4: PCM049: remove vusim regulator
Date: Fri, 15 Jul 2011 03:59:20 -0700	[thread overview]
Message-ID: <20110715105920.GU5783@atomide.com> (raw)
In-Reply-To: <20110715083103.GF2611@legolas.emea.dhcp.ti.com>

* Felipe Balbi <balbi@ti.com> [110715 01:25]:
> 
> possibly something like this (still missing MACHINE_START a few more
> things):

Yes and it would be better to initialize data in the .init_machine
to avoid adding machine_is tests in multiple places.
 
> 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);

So we sould have panda_common_init() and then omap4_panda_init()
and omap4_phycore_init() or something like that. No need for machine_is
tests then as the .machine_init already takes care of that test.

Regards,

Tony

  reply	other threads:[~2011-07-15 10:59 UTC|newest]

Thread overview: 59+ 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 ` Jan Weitzel
2011-07-08 10:04 ` [PATCH 1/3] ARM: OMAP4: Add pcm049 to Kconfig/Makefile Jan Weitzel
2011-07-08 10:04   ` Jan Weitzel
2011-07-08 11:49   ` Sergei Shtylyov
2011-07-08 11:49     ` Sergei Shtylyov
2011-07-08 11:55     ` Tony Lindgren
2011-07-08 11:55       ` Tony Lindgren
2011-07-08 11:58       ` Felipe Balbi
2011-07-08 11:58         ` Felipe Balbi
2011-07-14  7:27         ` Tony Lindgren
2011-07-14  7:27           ` Tony Lindgren
2011-07-14  7:47           ` 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-08 12:21         ` Jan Weitzel
2011-07-13  8:03         ` Tony Lindgren
2011-07-13  8:03           ` Tony Lindgren
2011-07-13 10:58           ` Jan Weitzel
2011-07-13 10:58             ` Jan Weitzel
2011-07-13 10:59             ` [PATCH] ARM: OMAP4: PCM049: remove vusim regulator Jan Weitzel
2011-07-13 10:59               ` Jan Weitzel
2011-07-13 12:13               ` Sergei Shtylyov
2011-07-13 12:13                 ` Sergei Shtylyov
2011-07-13 12:54                 ` [PATCH v2] " Jan Weitzel
2011-07-13 12:54                   ` Jan Weitzel
2011-07-13 12:56                 ` [PATCH] " Jan Weitzel
2011-07-13 12:56                   ` Jan Weitzel
2011-07-14  7:34                   ` Tony Lindgren
2011-07-14  7:34                     ` Tony Lindgren
2011-07-14  8:39                     ` Jan Weitzel
2011-07-14  8:39                       ` Jan Weitzel
2011-07-15  7:50                       ` Tony Lindgren
2011-07-15  7:50                         ` Tony Lindgren
2011-07-15  7:58                         ` Felipe Balbi
2011-07-15  7:58                           ` Felipe Balbi
2011-07-15  8:20                           ` Tony Lindgren
2011-07-15  8:20                             ` Tony Lindgren
2011-07-15  8:31                             ` Felipe Balbi
2011-07-15  8:31                               ` Felipe Balbi
2011-07-15 10:59                               ` Tony Lindgren [this message]
2011-07-15 10:59                                 ` Tony Lindgren
2011-07-15  9:47                         ` Jan Weitzel
2011-07-15  9:47                           ` Jan Weitzel
2011-07-15 10:55                           ` Tony Lindgren
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   ` Jan Weitzel
2011-07-08 10:04 ` [PATCH 3/3] ARM: OMAP4: platformcode board-omap4pcm049.c Jan Weitzel
2011-07-08 10:04   ` 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=20110715105920.GU5783@atomide.com \
    --to=tony@atomide.com \
    --cc=J.Weitzel@phytec.de \
    --cc=balbi@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=sshtylyov@mvista.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 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.