Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 10 Jan 2011 16:57:03 +0000 (08:57 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 10 Jan 2011 16:57:03 +0000 (08:57 -0800)
* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6: (29 commits)
  of/flattree: forward declare struct device_node in of_fdt.h
  ipmi: explicitly include of_address.h and of_irq.h
  sparc: explicitly cast negative phandle checks to s32
  powerpc/405: Fix missing #{address,size}-cells in i2c node
  powerpc/5200: dts: refactor dts files
  powerpc/5200: dts: Change combatible strings on localbus
  powerpc/5200: dts: remove unused properties
  powerpc/5200: dts: rename nodes to prepare for refactoring dts files
  of/flattree: Update dtc to current mainline.
  of/device: Don't register disabled devices
  powerpc/dts: fix syntax bugs in bluestone.dts
  of: Fixes for OF probing on little endian systems
  of: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
  of/flattree: Add of_flat_dt_match() helper function
  of_serial: explicitly include of_irq.h
  of/flattree: Refactor unflatten_device_tree and add fdt_unflatten_tree
  of/flattree: Reorder unflatten_dt_node
  of/flattree: Refactor unflatten_dt_node
  of/flattree: Add non-boottime device tree functions
  of/flattree: Add Kconfig for EARLY_FLATTREE
  ...

Fix up trivial conflict in arch/sparc/prom/tree_32.c as per Grant.

1  2 
arch/sparc/prom/init_64.c
arch/sparc/prom/tree_32.c
drivers/net/gianfar.c
drivers/net/xilinx_emaclite.c
drivers/serial/Kconfig

@@@ -18,7 -18,7 +18,7 @@@
  char prom_version[80];
  
  /* The root node of the prom device tree. */
 -int prom_stdin, prom_stdout;
 +int prom_stdout;
  phandle prom_chosen_node;
  
  /* You must call prom_init() before you attempt to use any of the
@@@ -35,13 -35,14 +35,13 @@@ void __init prom_init(void *cif_handler
        prom_cif_init(cif_handler, cif_stack);
  
        prom_chosen_node = prom_finddevice(prom_chosen_path);
-       if (!prom_chosen_node || prom_chosen_node == -1)
+       if (!prom_chosen_node || (s32)prom_chosen_node == -1)
                prom_halt();
  
 -      prom_stdin = prom_getint(prom_chosen_node, "stdin");
        prom_stdout = prom_getint(prom_chosen_node, "stdout");
  
        node = prom_finddevice("/openprom");
-       if (!node || node == -1)
+       if (!node || (s32)node == -1)
                prom_halt();
  
        prom_getstring(node, "version", prom_version, sizeof(prom_version));
@@@ -20,7 -20,7 +20,7 @@@ extern void restore_current(void)
  static char promlib_buf[128];
  
  /* Internal version of prom_getchild that does not alter return values. */
 -phandle __prom_getchild(phandle node)
 +static phandle __prom_getchild(phandle node)
  {
        unsigned long flags;
        phandle cnode;
@@@ -40,11 -40,11 +40,11 @@@ phandle prom_getchild(phandle node
  {
        phandle cnode;
  
-       if (node == -1)
+       if ((s32)node == -1)
                return 0;
  
        cnode = __prom_getchild(node);
-       if (cnode == 0 || cnode == -1)
+       if (cnode == 0 || (s32)cnode == -1)
                return 0;
  
        return cnode;
@@@ -52,7 -52,7 +52,7 @@@
  EXPORT_SYMBOL(prom_getchild);
  
  /* Internal version of prom_getsibling that does not alter return values. */
 -phandle __prom_getsibling(phandle node)
 +static phandle __prom_getsibling(phandle node)
  {
        unsigned long flags;
        phandle cnode;
@@@ -72,11 -72,11 +72,11 @@@ phandle prom_getsibling(phandle node
  {
        phandle sibnode;
  
-       if (node == -1)
+       if ((s32)node == -1)
                return 0;
  
        sibnode = __prom_getsibling(node);
-       if (sibnode == 0 || sibnode == -1)
+       if (sibnode == 0 || (s32)sibnode == -1)
                return 0;
  
        return sibnode;
@@@ -177,6 -177,20 +177,6 @@@ void prom_getstring(phandle node, char 
  EXPORT_SYMBOL(prom_getstring);
  
  
 -/* Does the device at node 'node' have name 'name'?
 - * YES = 1   NO = 0
 - */
 -int prom_nodematch(phandle node, char *name)
 -{
 -      int error;
 -
 -      static char namebuf[128];
 -      error = prom_getproperty(node, "name", namebuf, sizeof(namebuf));
 -      if (error == -1) return 0;
 -      if(strcmp(namebuf, name) == 0) return 1;
 -      return 0;
 -}
 -
  /* Search siblings at 'node_start' for a node with name
   * 'nodename'.  Return node if successful, zero if not.
   */
@@@ -200,7 -214,7 +200,7 @@@ phandle prom_searchsiblings(phandle nod
  EXPORT_SYMBOL(prom_searchsiblings);
  
  /* Interal version of nextprop that does not alter return values. */
 -char *__prom_nextprop(phandle node, char * oprop)
 +static char *__prom_nextprop(phandle node, char * oprop)
  {
        unsigned long flags;
        char *prop;
        return prop;
  }
  
 -/* Return the first property name for node 'node'. */
 -/* buffer is unused argument, but as v9 uses it, we need to have the same interface */
 -char *prom_firstprop(phandle node, char *bufer)
 -{
 -      if (node == 0 || (s32)node == -1)
 -              return "";
 -
 -      return __prom_nextprop(node, "");
 -}
 -EXPORT_SYMBOL(prom_firstprop);
 -
  /* Return the property type string after property type 'oprop'
   * at node 'node' .  Returns empty string if no more
   * property types for this node.
   */
  char *prom_nextprop(phandle node, char *oprop, char *buffer)
  {
-       if (node == 0 || node == -1)
+       if (node == 0 || (s32)node == -1)
                return "";
  
        return __prom_nextprop(node, oprop);
@@@ -253,7 -278,7 +253,7 @@@ phandle prom_finddevice(char *name
                                if (d != s + 3 && (!*d || *d == '/')
                                    && d <= s + 3 + 8) {
                                        node2 = node;
-                                       while (node2 && node2 != -1) {
+                                       while (node2 && (s32)node2 != -1) {
                                                if (prom_getproperty (node2, "reg", (char *)reg, sizeof (reg)) > 0) {
                                                        if (which_io == reg[0].which_io && phys_addr == reg[0].phys_addr) {
                                                                node = node2;
                                                        }
                                                }
                                                node2 = prom_getsibling(node2);
-                                               if (!node2 || node2 == -1)
+                                               if (!node2 || (s32)node2 == -1)
                                                        break;
                                                node2 = prom_searchsiblings(prom_getsibling(node2), nbuf);
                                        }
  }
  EXPORT_SYMBOL(prom_finddevice);
  
 -int prom_node_has_property(phandle node, char *prop)
 -{
 -      char *current_property = "";
 -
 -      do {
 -              current_property = prom_nextprop(node, current_property, NULL);
 -              if(!strcmp(current_property, prop))
 -                 return 1;
 -      } while (*current_property);
 -      return 0;
 -}
 -EXPORT_SYMBOL(prom_node_has_property);
 -
  /* Set property 'pname' at node 'node' to value 'value' which has a length
   * of 'size' bytes.  Return the number of bytes the prom accepted.
   */
@@@ -282,10 -320,8 +282,10 @@@ int prom_setprop(phandle node, const ch
        unsigned long flags;
        int ret;
  
 -      if(size == 0) return 0;
 -      if((pname == 0) || (value == 0)) return 0;
 +      if (size == 0)
 +              return 0;
 +      if ((pname == NULL) || (value == NULL))
 +              return 0;
        spin_lock_irqsave(&prom_lock, flags);
        ret = prom_nodeops->no_setprop(node, pname, value, size);
        restore_current();
@@@ -303,6 -339,7 +303,7 @@@ phandle prom_inst2pkg(int inst
        node = (*romvec->pv_v2devops.v2_inst2pkg)(inst);
        restore_current();
        spin_unlock_irqrestore(&prom_lock, flags);
-       if (node == -1) return 0;
+       if ((s32)node == -1)
+               return 0;
        return node;
  }
diff --combined drivers/net/gianfar.c
@@@ -95,6 -95,7 +95,7 @@@
  #include <linux/phy.h>
  #include <linux/phy_fixed.h>
  #include <linux/of.h>
+ #include <linux/of_net.h>
  
  #include "gianfar.h"
  #include "fsl_pq_mdio.h"
@@@ -143,8 -144,7 +144,8 @@@ void gfar_halt(struct net_device *dev)
  static void gfar_halt_nodisable(struct net_device *dev);
  void gfar_start(struct net_device *dev);
  static void gfar_clear_exact_match(struct net_device *dev);
 -static void gfar_set_mac_for_addr(struct net_device *dev, int num, u8 *addr);
 +static void gfar_set_mac_for_addr(struct net_device *dev, int num,
 +                                const u8 *addr);
  static int gfar_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
  
  MODULE_AUTHOR("Freescale Semiconductor, Inc");
@@@ -3095,10 -3095,10 +3096,10 @@@ static void gfar_set_multi(struct net_d
  static void gfar_clear_exact_match(struct net_device *dev)
  {
        int idx;
 -      u8 zero_arr[MAC_ADDR_LEN] = {0,0,0,0,0,0};
 +      static const u8 zero_arr[MAC_ADDR_LEN] = {0, 0, 0, 0, 0, 0};
  
        for(idx = 1;idx < GFAR_EM_NUM + 1;idx++)
 -              gfar_set_mac_for_addr(dev, idx, (u8 *)zero_arr);
 +              gfar_set_mac_for_addr(dev, idx, zero_arr);
  }
  
  /* Set the appropriate hash bit for the given addr */
@@@ -3133,8 -3133,7 +3134,8 @@@ static void gfar_set_hash_for_addr(stru
  /* There are multiple MAC Address register pairs on some controllers
   * This function sets the numth pair to a given address
   */
 -static void gfar_set_mac_for_addr(struct net_device *dev, int num, u8 *addr)
 +static void gfar_set_mac_for_addr(struct net_device *dev, int num,
 +                                const u8 *addr)
  {
        struct gfar_private *priv = netdev_priv(dev);
        struct gfar __iomem *regs = priv->gfargrp[0].regs;
@@@ -24,6 -24,7 +24,7 @@@
  #include <linux/of_device.h>
  #include <linux/of_platform.h>
  #include <linux/of_mdio.h>
+ #include <linux/of_net.h>
  #include <linux/phy.h>
  
  #define DRIVER_NAME "xilinx_emaclite"
@@@ -515,7 -516,7 +516,7 @@@ static void xemaclite_update_address(st
   */
  static int xemaclite_set_mac_address(struct net_device *dev, void *address)
  {
 -      struct net_local *lp = (struct net_local *) netdev_priv(dev);
 +      struct net_local *lp = netdev_priv(dev);
        struct sockaddr *addr = address;
  
        if (netif_running(dev))
   */
  static void xemaclite_tx_timeout(struct net_device *dev)
  {
 -      struct net_local *lp = (struct net_local *) netdev_priv(dev);
 +      struct net_local *lp = netdev_priv(dev);
        unsigned long flags;
  
        dev_err(&lp->ndev->dev, "Exceeded transmit timeout of %lu ms\n",
   */
  static void xemaclite_tx_handler(struct net_device *dev)
  {
 -      struct net_local *lp = (struct net_local *) netdev_priv(dev);
 +      struct net_local *lp = netdev_priv(dev);
  
        dev->stats.tx_packets++;
        if (lp->deferred_skb) {
   */
  static void xemaclite_rx_handler(struct net_device *dev)
  {
 -      struct net_local *lp = (struct net_local *) netdev_priv(dev);
 +      struct net_local *lp = netdev_priv(dev);
        struct sk_buff *skb;
        unsigned int align;
        u32 len;
@@@ -661,7 -662,7 +662,7 @@@ static irqreturn_t xemaclite_interrupt(
  {
        bool tx_complete = 0;
        struct net_device *dev = dev_id;
 -      struct net_local *lp = (struct net_local *) netdev_priv(dev);
 +      struct net_local *lp = netdev_priv(dev);
        void __iomem *base_addr = lp->base_addr;
        u32 tx_status;
  
@@@ -918,7 -919,7 +919,7 @@@ void xemaclite_adjust_link(struct net_d
   */
  static int xemaclite_open(struct net_device *dev)
  {
 -      struct net_local *lp = (struct net_local *) netdev_priv(dev);
 +      struct net_local *lp = netdev_priv(dev);
        int retval;
  
        /* Just to be safe, stop the device first */
   */
  static int xemaclite_close(struct net_device *dev)
  {
 -      struct net_local *lp = (struct net_local *) netdev_priv(dev);
 +      struct net_local *lp = netdev_priv(dev);
  
        netif_stop_queue(dev);
        xemaclite_disable_interrupts(lp);
        return 0;
  }
  
 -/**
 - * xemaclite_get_stats - Get the stats for the net_device
 - * @dev:      Pointer to the network device
 - *
 - * This function returns the address of the 'net_device_stats' structure for the
 - * given network device. This structure holds usage statistics for the network
 - * device.
 - *
 - * Return:    Pointer to the net_device_stats structure.
 - */
 -static struct net_device_stats *xemaclite_get_stats(struct net_device *dev)
 -{
 -      return &dev->stats;
 -}
 -
  /**
   * xemaclite_send - Transmit a frame
   * @orig_skb: Pointer to the socket buffer to be transmitted
   */
  static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev)
  {
 -      struct net_local *lp = (struct net_local *) netdev_priv(dev);
 +      struct net_local *lp = netdev_priv(dev);
        struct sk_buff *new_skb;
        unsigned int len;
        unsigned long flags;
  static void xemaclite_remove_ndev(struct net_device *ndev)
  {
        if (ndev) {
 -              struct net_local *lp = (struct net_local *) netdev_priv(ndev);
 +              struct net_local *lp = netdev_priv(ndev);
  
                if (lp->base_addr)
                        iounmap((void __iomem __force *) (lp->base_addr));
@@@ -1230,7 -1246,7 +1231,7 @@@ static int __devexit xemaclite_of_remov
        struct device *dev = &of_dev->dev;
        struct net_device *ndev = dev_get_drvdata(dev);
  
 -      struct net_local *lp = (struct net_local *) netdev_priv(ndev);
 +      struct net_local *lp = netdev_priv(ndev);
  
        /* Un-register the mii_bus, if configured */
        if (lp->has_mdio) {
@@@ -1270,6 -1286,7 +1271,6 @@@ static struct net_device_ops xemaclite_
        .ndo_start_xmit         = xemaclite_send,
        .ndo_set_mac_address    = xemaclite_set_mac_address,
        .ndo_tx_timeout         = xemaclite_tx_timeout,
 -      .ndo_get_stats          = xemaclite_get_stats,
  #ifdef CONFIG_NET_POLL_CONTROLLER
        .ndo_poll_controller = xemaclite_poll_controller,
  #endif
diff --combined drivers/serial/Kconfig
@@@ -1381,16 -1381,6 +1381,16 @@@ config SERIAL_MSM_CONSOL
        depends on SERIAL_MSM=y
        select SERIAL_CORE_CONSOLE
  
 +config SERIAL_VT8500
 +      bool "VIA VT8500 on-chip serial port support"
 +      depends on ARM && ARCH_VT8500
 +      select SERIAL_CORE
 +
 +config SERIAL_VT8500_CONSOLE
 +      bool "VIA VT8500 serial console support"
 +      depends on SERIAL_VT8500=y
 +      select SERIAL_CORE_CONSOLE
 +
  config SERIAL_NETX
        tristate "NetX serial port support"
        depends on ARM && ARCH_NETX
@@@ -1412,7 -1402,7 +1412,7 @@@ config SERIAL_NETX_CONSOL
  
  config SERIAL_OF_PLATFORM
        tristate "Serial port on Open Firmware platform bus"
-       depends on PPC_OF || MICROBLAZE
+       depends on OF
        depends on SERIAL_8250 || SERIAL_OF_PLATFORM_NWPSERIAL
        help
          If you have a PowerPC based system that has serial ports
@@@ -1642,19 -1632,4 +1642,19 @@@ config SERIAL_ALTERA_UART_CONSOL
        help
          Enable a Altera UART port to be the system console.
  
 +config SERIAL_IFX6X60
 +        tristate "SPI protocol driver for Infineon 6x60 modem (EXPERIMENTAL)"
 +      depends on GPIOLIB && SPI && EXPERIMENTAL
 +      help
 +        Support for the IFX6x60 modem devices on Intel MID platforms.
 +
 +config SERIAL_PCH_UART
 +      tristate "Intel EG20T PCH UART"
 +      depends on PCI && DMADEVICES
 +      select SERIAL_CORE
 +      select PCH_DMA
 +      help
 +        This driver is for PCH(Platform controller Hub) UART of Intel EG20T
 +        which is an IOH(Input/Output Hub) for x86 embedded processor.
 +        Enabling PCH_DMA, this PCH UART works as DMA mode.
  endmenu