Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
authorLinus Torvalds <torvalds@g5.osdl.org>
Fri, 30 Jun 2006 22:40:35 +0000 (15:40 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 30 Jun 2006 22:40:35 +0000 (15:40 -0700)
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Kill sun4v virtual device layer.
  [SERIAL] sunhv: Convert to of_driver layer.
  [SPARC64]: Mask out top 8-bits in physical address when building resources.
  [SERIAL] sunsu: Missing return statement in su_probe().

1  2 
arch/sparc64/kernel/devices.c
drivers/serial/sunsu.c

@@@ -4,6 -4,7 +4,6 @@@
   * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
   */
  
 -#include <linux/config.h>
  #include <linux/kernel.h>
  #include <linux/threads.h>
  #include <linux/init.h>
@@@ -20,8 -21,6 +20,6 @@@
  #include <asm/spitfire.h>
  #include <asm/timer.h>
  #include <asm/cpudata.h>
- #include <asm/vdev.h>
- #include <asm/irq.h>
  
  /* Used to synchronize acceses to NatSemi SUPER I/O chip configure
   * operations in asm/ns87303.h
@@@ -31,100 -30,6 +29,6 @@@ DEFINE_SPINLOCK(ns87303_lock)
  extern void cpu_probe(void);
  extern void central_probe(void);
  
- u32 sun4v_vdev_devhandle;
- struct device_node *sun4v_vdev_root;
- struct vdev_intmap {
-       unsigned int phys;
-       unsigned int irq;
-       unsigned int cnode;
-       unsigned int cinterrupt;
- };
- struct vdev_intmask {
-       unsigned int phys;
-       unsigned int interrupt;
-       unsigned int __unused;
- };
- static struct vdev_intmap *vdev_intmap;
- static int vdev_num_intmap;
- static struct vdev_intmask *vdev_intmask;
- static void __init sun4v_virtual_device_probe(void)
- {
-       struct linux_prom64_registers *regs;
-       struct property *prop;
-       struct device_node *dp;
-       int sz;
-       if (tlb_type != hypervisor)
-               return;
-       dp = of_find_node_by_name(NULL, "virtual-devices");
-       if (!dp) {
-               prom_printf("SUN4V: Fatal error, no virtual-devices node.\n");
-               prom_halt();
-       }
-       sun4v_vdev_root = dp;
-       prop = of_find_property(dp, "reg", NULL);
-       regs = prop->value;
-       sun4v_vdev_devhandle = (regs[0].phys_addr >> 32UL) & 0x0fffffff;
-       prop = of_find_property(dp, "interrupt-map", &sz);
-       vdev_intmap = prop->value;
-       vdev_num_intmap = sz / sizeof(struct vdev_intmap);
-       prop = of_find_property(dp, "interrupt-map-mask", NULL);
-       vdev_intmask = prop->value;
-       printk("%s: Virtual Device Bus devhandle[%x]\n",
-              dp->full_name, sun4v_vdev_devhandle);
- }
- unsigned int sun4v_vdev_device_interrupt(struct device_node *dev_node)
- {
-       struct property *prop;
-       unsigned int irq, reg;
-       int i;
-       prop = of_find_property(dev_node, "interrupts", NULL);
-       if (!prop) {
-               printk("VDEV: Cannot get \"interrupts\" "
-                      "property for OBP node %s\n",
-                      dev_node->full_name);
-               return 0;
-       }
-       irq = *(unsigned int *) prop->value;
-       prop = of_find_property(dev_node, "reg", NULL);
-       if (!prop) {
-               printk("VDEV: Cannot get \"reg\" "
-                      "property for OBP node %s\n",
-                      dev_node->full_name);
-               return 0;
-       }
-       reg = *(unsigned int *) prop->value;
-       for (i = 0; i < vdev_num_intmap; i++) {
-               if (vdev_intmap[i].phys == (reg & vdev_intmask->phys) &&
-                   vdev_intmap[i].irq == (irq & vdev_intmask->interrupt)) {
-                       irq = vdev_intmap[i].cinterrupt;
-                       break;
-               }
-       }
-       if (i == vdev_num_intmap) {
-               printk("VDEV: No matching interrupt map entry "
-                      "for OBP node %s\n", dev_node->full_name);
-               return 0;
-       }
-       return sun4v_build_irq(sun4v_vdev_devhandle, irq);
- }
  static const char *cpu_mid_prop(void)
  {
        if (tlb_type == spitfire)
@@@ -289,7 -194,6 +193,6 @@@ void __init device_scan(void
        }
  #endif
  
-       sun4v_virtual_device_probe();
        central_probe();
  
        cpu_probe();
diff --combined drivers/serial/sunsu.c
@@@ -15,6 -15,7 +15,6 @@@
   *   David S. Miller (davem@davemloft.net), 2002-Jul-29
   */
  
 -#include <linux/config.h>
  #include <linux/module.h>
  #include <linux/kernel.h>
  #include <linux/sched.h>
@@@ -1438,6 -1439,8 +1438,8 @@@ static int __devinit su_probe(struct of
                err = sunsu_kbd_ms_init(up);
                if (err)
                        goto out_unmap;
+               return 0;
        }
  
        up->port.flags |= UPF_BOOT_AUTOCONF;