Re: [PATCH 4/7] mmc: sdhci-of: fix build on non-powerpc platforms

2010-11-16 Thread Wolfram Sang
On Tue, Nov 16, 2010 at 02:33:52PM -0600, Rob Herring wrote:
 From: Rob Herring rob.herr...@calxeda.com
 
 Explicitly include err.h, of_address.h and of_irq.h.
 Make use of machine_is() conditional on PPC.
 
 Signed-off-by: Rob Herring rob.herr...@calxeda.com

Hmm, sins of the past :/ I wonder if we can get away with less #ifdeffery, will
think about it...

 ---
  drivers/mmc/host/sdhci-of-core.c |9 +
  1 files changed, 9 insertions(+), 0 deletions(-)
 
 diff --git a/drivers/mmc/host/sdhci-of-core.c 
 b/drivers/mmc/host/sdhci-of-core.c
 index fa19d84..dd84124 100644
 --- a/drivers/mmc/host/sdhci-of-core.c
 +++ b/drivers/mmc/host/sdhci-of-core.c
 @@ -13,6 +13,7 @@
   * your option) any later version.
   */
  
 +#include linux/err.h
  #include linux/module.h
  #include linux/init.h
  #include linux/io.h
 @@ -20,8 +21,12 @@
  #include linux/delay.h
  #include linux/of.h
  #include linux/of_platform.h
 +#include linux/of_address.h
 +#include linux/of_irq.h
  #include linux/mmc/host.h
 +#ifdef CONFIG_PPC
  #include asm/machdep.h
 +#endif
  #include sdhci-of.h
  #include sdhci.h
  
 @@ -112,7 +117,11 @@ static bool __devinit sdhci_of_wp_inverted(struct 
 device_node *np)
   return true;
  
   /* Old device trees don't have the wp-inverted property. */
 +#ifdef CONFIG_PPC
   return machine_is(mpc837x_rdb) || machine_is(mpc837x_mds);
 +#else
 + return false;
 +#endif
  }
  
  static int __devinit sdhci_of_probe(struct platform_device *ofdev,
 -- 
 1.7.1
 
 ___
 devicetree-discuss mailing list
 devicetree-disc...@lists.ozlabs.org
 https://lists.ozlabs.org/listinfo/devicetree-discuss

-- 
Pengutronix e.K.   | Wolfram Sang|
Industrial Linux Solutions | http://www.pengutronix.de/  |


signature.asc
Description: Digital signature


Re: [PATCH 4/7] mmc: sdhci-of: fix build on non-powerpc platforms

2010-11-16 Thread Grant Likely
On Tue, Nov 16, 2010 at 04:34:56PM -0600, Rob Herring wrote:
 On 11/16/2010 03:44 PM, Wolfram Sang wrote:
 On Tue, Nov 16, 2010 at 02:33:52PM -0600, Rob Herring wrote:
 From: Rob Herringrob.herr...@calxeda.com
 
 Explicitly include err.h, of_address.h and of_irq.h.
 Make use of machine_is() conditional on PPC.
 
 Signed-off-by: Rob Herringrob.herr...@calxeda.com
 
 Hmm, sins of the past :/ I wonder if we can get away with less #ifdeffery, 
 will
 think about it...
 
 
 I don't want to start a long debate, but is updating a kernel
 without updating the dtb really something to worry about?

Yes, once a .dtb is merged we try very hard not to break it.  It may
need to be updated to enable more features, but the goal is to not
regress.  One of the reason being that firmware may provide a default,
but old, dtb and it is important to still be able to boot on those
systems, even if the dtb is immediately going to be updated.

That's one of the reasons why it is so important to document and
review bindings up front and make sure they make sense before we
commit to them.

That being said, there are other ways to deal with old dtbs, like
fixing up the data at platform setup time.

 Isn't a year enough of a transition period.

No.

g.

--
To unsubscribe from this list: send the line unsubscribe linux-mmc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html