]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
Merge commit 'v2.6.35-rc6' into devicetree/next
authorGrant Likely <grant.likely@secretlab.ca>
Sat, 24 Jul 2010 15:49:13 +0000 (09:49 -0600)
committerGrant Likely <grant.likely@secretlab.ca>
Sat, 24 Jul 2010 15:49:13 +0000 (09:49 -0600)
Conflicts:
arch/sparc/kernel/prom_64.c

1  2 
arch/microblaze/Kconfig
arch/powerpc/Kconfig
arch/powerpc/include/asm/irq.h
arch/powerpc/kernel/irq.c
arch/sparc/Kconfig
arch/sparc/kernel/prom_64.c
drivers/i2c/i2c-core.c
drivers/serial/sunsu.c

diff --combined arch/microblaze/Kconfig
index 6c4fee5eaf0bc76179dc5db59981f8e9d938cf34,505a08592423dbd17b7168a2782247c2d401f52e..206222a13a23fbb655a9a4d52f5b12db3d210cfe
@@@ -5,7 -5,7 +5,7 @@@ mainmenu "Linux/Microblaze Kernel Confi
  
  config MICROBLAZE
        def_bool y
-       select HAVE_LMB
+       select HAVE_MEMBLOCK
        select HAVE_FUNCTION_TRACER
        select HAVE_FUNCTION_TRACE_MCOUNT_TEST
        select HAVE_FUNCTION_GRAPH_TRACER
@@@ -17,8 -17,6 +17,8 @@@
        select HAVE_DMA_ATTRS
        select HAVE_DMA_API_DEBUG
        select TRACING_SUPPORT
 +      select OF
 +      select OF_FLATTREE
  
  config SWAP
        def_bool n
@@@ -77,6 -75,9 +77,6 @@@ config LOCKDEP_SUPPOR
  config HAVE_LATENCYTOP_SUPPORT
        def_bool y
  
 -config DTC
 -      def_bool y
 -
  source "init/Kconfig"
  
  source "kernel/Kconfig.freezer"
@@@ -123,6 -124,18 +123,6 @@@ config CMDLINE_FORC
          Set this to have arguments from the default kernel command string
          override those passed by the boot loader.
  
 -config OF
 -      def_bool y
 -      select OF_FLATTREE
 -
 -config PROC_DEVICETREE
 -      bool "Support for device tree in /proc"
 -      depends on PROC_FS
 -      help
 -        This option adds a device-tree directory under /proc which contains
 -        an image of the device tree that the kernel copies from Open
 -        Firmware or other boot firmware. If unsure, say Y here.
 -
  endmenu
  
  menu "Advanced setup"
diff --combined arch/powerpc/Kconfig
index c9ae321a06f9b84f4e9d30cffcea668c9dd75417,2031a2846865e51bb3889742fe3fc60125532a4c..5bf34019bd667bbb28c4fa1bc6966c34df5cbb87
@@@ -120,8 -120,6 +120,8 @@@ config ARCH_NO_VIRT_TO_BU
  config PPC
        bool
        default y
 +      select OF
 +      select OF_FLATTREE
        select HAVE_FTRACE_MCOUNT_RECORD
        select HAVE_DYNAMIC_FTRACE
        select HAVE_FUNCTION_TRACER
        select HAVE_ARCH_KGDB
        select HAVE_KRETPROBES
        select HAVE_ARCH_TRACEHOOK
-       select HAVE_LMB
+       select HAVE_MEMBLOCK
        select HAVE_DMA_ATTRS
        select HAVE_DMA_API_DEBUG
        select USE_GENERIC_SMP_HELPERS if SMP
@@@ -174,6 -172,10 +174,6 @@@ config ARCH_MAY_HAVE_PC_FD
  config PPC_OF
        def_bool y
  
 -config OF
 -      def_bool y
 -      select OF_FLATTREE
 -
  config PPC_UDBG_16550
        bool
        default n
@@@ -196,6 -198,10 +196,6 @@@ config SYS_SUPPORTS_APM_EMULATIO
        default y if PMAC_APM_EMU
        bool
  
 -config DTC
 -       bool
 -       default y
 -
  config DEFAULT_UIMAGE
        bool
        help
@@@ -394,7 -400,7 +394,7 @@@ config IRQ_ALL_CPU
  
  config SPARSE_IRQ
        bool "Support sparse irq numbering"
-       default y
+       default n
        help
          This enables support for sparse irqs. This is useful for distro
          kernels that want to define a high CONFIG_NR_CPUS value but still
          ( Sparse IRQs can also be beneficial on NUMA boxes, as they spread
            out the irq_desc[] array in a more NUMA-friendly way. )
  
-         If you don't know what to do here, say Y.
+         If you don't know what to do here, say N.
  
  config NUMA
        bool "NUMA support"
@@@ -572,6 -578,14 +572,6 @@@ config SCHED_SM
          when dealing with POWER5 cpus at a cost of slightly increased
          overhead in some places. If unsure say N here.
  
 -config PROC_DEVICETREE
 -      bool "Support for device tree in /proc"
 -      depends on PROC_FS
 -      help
 -        This option adds a device-tree directory under /proc which contains
 -        an image of the device tree that the kernel copies from Open
 -        Firmware or other boot firmware. If unsure, say Y here.
 -
  config CMDLINE_BOOL
        bool "Default bootloader kernel arguments"
  
index 4e3051595b2b0fa39eea60192e98c2985de1149a,ecba37a91749a1e869ed26afff90563b85813cb6..67ab5fb7d153690fd4af621c493f2c294895077c
@@@ -300,6 -300,34 +300,6 @@@ extern unsigned int irq_alloc_virt(stru
   */
  extern void irq_free_virt(unsigned int virq, unsigned int count);
  
 -
 -/* -- OF helpers -- */
 -
 -/**
 - * irq_create_of_mapping - Map a hardware interrupt into linux virq space
 - * @controller: Device node of the interrupt controller
 - * @inspec: Interrupt specifier from the device-tree
 - * @intsize: Size of the interrupt specifier from the device-tree
 - *
 - * This function is identical to irq_create_mapping except that it takes
 - * as input informations straight from the device-tree (typically the results
 - * of the of_irq_map_*() functions.
 - */
 -extern unsigned int irq_create_of_mapping(struct device_node *controller,
 -                                        const u32 *intspec, unsigned int intsize);
 -
 -/**
 - * irq_of_parse_and_map - Parse and Map an interrupt into linux virq space
 - * @device: Device node of the device whose interrupt is to be mapped
 - * @index: Index of the interrupt to map
 - *
 - * This function is a wrapper that chains of_irq_map_one() and
 - * irq_create_of_mapping() to make things easier to callers
 - */
 -extern unsigned int irq_of_parse_and_map(struct device_node *dev, int index);
 -
 -/* -- End OF helpers -- */
 -
  /**
   * irq_early_init - Init irq remapping subsystem
   */
@@@ -330,7 -358,6 +330,6 @@@ extern void exc_lvl_ctx_init(void)
  #define exc_lvl_ctx_init()
  #endif
  
- #ifdef CONFIG_IRQSTACKS
  /*
   * Per-cpu stacks for handling hard and soft interrupts.
   */
@@@ -341,11 -368,6 +340,6 @@@ extern void irq_ctx_init(void)
  extern void call_do_softirq(struct thread_info *tp);
  extern int call_handle_irq(int irq, void *p1,
                           struct thread_info *tp, void *func);
- #else
- #define irq_ctx_init()
- #endif /* CONFIG_IRQSTACKS */
  extern void do_IRQ(struct pt_regs *regs);
  
  #endif /* _ASM_IRQ_H */
index 2676ef288bf5eefe49e545f73dd580b74c04b074,77be3d058a658fa447a2235a8441d320be245d20..60d39b7414c075ccff202de676e46d2555638664
@@@ -53,8 -53,6 +53,8 @@@
  #include <linux/bootmem.h>
  #include <linux/pci.h>
  #include <linux/debugfs.h>
 +#include <linux/of.h>
 +#include <linux/of_irq.h>
  
  #include <asm/uaccess.h>
  #include <asm/system.h>
@@@ -297,7 -295,10 +297,10 @@@ void fixup_irqs(const struct cpumask *m
  
        for_each_irq(irq) {
                desc = irq_to_desc(irq);
-               if (desc && desc->status & IRQ_PER_CPU)
+               if (!desc)
+                       continue;
+               if (desc->status & IRQ_PER_CPU)
                        continue;
  
                cpumask_and(mask, desc->affinity, map);
  }
  #endif
  
- #ifdef CONFIG_IRQSTACKS
  static inline void handle_one_irq(unsigned int irq)
  {
        struct thread_info *curtp, *irqtp;
        if (irqtp->flags)
                set_bits(irqtp->flags, &curtp->flags);
  }
- #else
- static inline void handle_one_irq(unsigned int irq)
- {
-       generic_handle_irq(irq);
- }
- #endif
  
  static inline void check_stack_overflow(void)
  {
@@@ -457,7 -451,6 +453,6 @@@ void exc_lvl_ctx_init(void
  }
  #endif
  
- #ifdef CONFIG_IRQSTACKS
  struct thread_info *softirq_ctx[NR_CPUS] __read_mostly;
  struct thread_info *hardirq_ctx[NR_CPUS] __read_mostly;
  
@@@ -494,10 -487,6 +489,6 @@@ static inline void do_softirq_onstack(v
        irqtp->task = NULL;
  }
  
- #else
- #define do_softirq_onstack()  __do_softirq()
- #endif /* CONFIG_IRQSTACKS */
  void do_softirq(void)
  {
        unsigned long flags;
@@@ -815,6 -804,18 +806,6 @@@ unsigned int irq_create_of_mapping(stru
  }
  EXPORT_SYMBOL_GPL(irq_create_of_mapping);
  
 -unsigned int irq_of_parse_and_map(struct device_node *dev, int index)
 -{
 -      struct of_irq oirq;
 -
 -      if (of_irq_map_one(dev, index, &oirq))
 -              return NO_IRQ;
 -
 -      return irq_create_of_mapping(oirq.controller, oirq.specifier,
 -                                   oirq.size);
 -}
 -EXPORT_SYMBOL_GPL(irq_of_parse_and_map);
 -
  void irq_dispose_mapping(unsigned int virq)
  {
        struct irq_host *host;
diff --combined arch/sparc/Kconfig
index 13a9f2f8738cfa55a4ccfb72ec63e0c18796c86e,c0015db247ba46ed787b4b16b47f402a3de1152a..ba068c833e5d83f4399cb229e687fe553d5e33fc
@@@ -18,7 -18,6 +18,7 @@@ config 64BI
  config SPARC
        bool
        default y
 +      select OF
        select HAVE_IDE
        select HAVE_OPROFILE
        select HAVE_ARCH_KGDB if !SMP || SPARC64
@@@ -43,7 -42,7 +43,7 @@@ config SPARC6
        select HAVE_FUNCTION_TRACE_MCOUNT_TEST
        select HAVE_KRETPROBES
        select HAVE_KPROBES
-       select HAVE_LMB
+       select HAVE_MEMBLOCK
        select HAVE_SYSCALL_WRAPPERS
        select HAVE_DYNAMIC_FTRACE
        select HAVE_FTRACE_MCOUNT_RECORD
@@@ -149,6 -148,9 +149,6 @@@ config GENERIC_GPI
  config ARCH_NO_VIRT_TO_BUS
        def_bool y
  
 -config OF
 -      def_bool y
 -
  config ARCH_SUPPORTS_DEBUG_PAGEALLOC
        def_bool y if SPARC64
  
index 0bffafdee35070e2dad9d1b746e5554be78b9526,466a32763ea82fbe0bd644fb5468459a7fe4196f..86597d9867fd3768dcca56ec3a9263db1deed6fc
@@@ -20,8 -20,8 +20,8 @@@
  #include <linux/string.h>
  #include <linux/mm.h>
  #include <linux/module.h>
- #include <linux/lmb.h>
+ #include <linux/memblock.h>
 -#include <linux/of_device.h>
 +#include <linux/of.h>
  
  #include <asm/prom.h>
  #include <asm/oplib.h>
@@@ -34,7 -34,7 +34,7 @@@
  
  void * __init prom_early_alloc(unsigned long size)
  {
-       unsigned long paddr = lmb_alloc(size, SMP_CACHE_BYTES);
+       unsigned long paddr = memblock_alloc(size, SMP_CACHE_BYTES);
        void *ret;
  
        if (!paddr) {
@@@ -81,7 -81,7 +81,7 @@@ static void __init sun4v_path_component
                return;
  
        regs = rprop->value;
 -      if (!is_root_node(dp->parent)) {
 +      if (!of_node_is_root(dp->parent)) {
                sprintf(tmp_buf, "%s@%x,%x",
                        dp->name,
                        (unsigned int) (regs->phys_addr >> 32UL),
@@@ -121,7 -121,7 +121,7 @@@ static void __init sun4u_path_component
                return;
  
        regs = prop->value;
 -      if (!is_root_node(dp->parent)) {
 +      if (!of_node_is_root(dp->parent)) {
                sprintf(tmp_buf, "%s@%x,%x",
                        dp->name,
                        (unsigned int) (regs->phys_addr >> 32UL),
diff --combined drivers/i2c/i2c-core.c
index 5588ac1fb8ad0cd97ed017b18cacafc7a95367de,0815e10da7c6da3b5ed4974cdb505fc848c43d87..df937df845ebf3b50b3941c9aea569ef3bb7f22b
@@@ -30,8 -30,6 +30,8 @@@
  #include <linux/init.h>
  #include <linux/idr.h>
  #include <linux/mutex.h>
 +#include <linux/of_i2c.h>
 +#include <linux/of_device.h>
  #include <linux/completion.h>
  #include <linux/hardirq.h>
  #include <linux/irqflags.h>
@@@ -72,10 -70,6 +72,10 @@@ static int i2c_device_match(struct devi
        if (!client)
                return 0;
  
 +      /* Attempt an OF style match */
 +      if (of_driver_match_device(dev, drv))
 +              return 1;
 +
        driver = to_i2c_driver(drv);
        /* match on an id table if there is one */
        if (driver->id_table)
@@@ -796,9 -790,6 +796,9 @@@ static int i2c_register_adapter(struct 
        if (adap->nr < __i2c_first_dynamic_bus_num)
                i2c_scan_static_board_info(adap);
  
 +      /* Register devices from the device tree */
 +      of_i2c_register_devices(adap);
 +
        /* Notify drivers */
        mutex_lock(&core_lock);
        dummy = bus_for_each_drv(&i2c_bus_type, NULL, adap,
@@@ -1437,13 -1428,12 +1437,12 @@@ static int i2c_detect(struct i2c_adapte
        if (!(adapter->class & driver->class))
                goto exit_free;
  
-       /* Stop here if we can't use SMBUS_QUICK */
-       if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_QUICK)) {
+       /* Stop here if the bus doesn't support probing */
+       if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_READ_BYTE)) {
                if (address_list[0] == I2C_CLIENT_END)
                        goto exit_free;
  
-               dev_warn(&adapter->dev, "SMBus Quick command not supported, "
-                        "can't probe for chips\n");
+               dev_warn(&adapter->dev, "Probing not supported\n");
                err = -EOPNOTSUPP;
                goto exit_free;
        }
diff --combined drivers/serial/sunsu.c
index 56d891acf29e5dbad5792ef469b42a11749d7116,ffbf4553f6651966269b1be1bc57b43b37b34b98..5deafc8180b5ad69d6cc741b4081ab224ef94d2d
@@@ -1443,7 -1443,7 +1443,7 @@@ static int __devinit su_probe(struct of
                return -ENOMEM;
        }
  
 -      up->port.irq = op->irqs[0];
 +      up->port.irq = op->archdata.irqs[0];
  
        up->port.dev = &op->dev;
  
@@@ -1500,20 -1500,25 +1500,25 @@@ out_unmap
  static int __devexit su_remove(struct of_device *op)
  {
        struct uart_sunsu_port *up = dev_get_drvdata(&op->dev);
+       bool kbdms = false;
  
        if (up->su_type == SU_PORT_MS ||
-           up->su_type == SU_PORT_KBD) {
+           up->su_type == SU_PORT_KBD)
+               kbdms = true;
+       if (kbdms) {
  #ifdef CONFIG_SERIO
                serio_unregister_port(&up->serio);
  #endif
-               kfree(up);
-       } else if (up->port.type != PORT_UNKNOWN) {
+       } else if (up->port.type != PORT_UNKNOWN)
                uart_remove_one_port(&sunsu_reg, &up->port);
-       }
  
        if (up->port.membase)
                of_iounmap(&op->resource[0], up->port.membase, up->reg_size);
  
+       if (kbdms)
+               kfree(up);
        dev_set_drvdata(&op->dev, NULL);
  
        return 0;