]> Git Repo - linux.git/commitdiff
Merge branch 'fixes' into for-linus
authorRussell King <[email protected]>
Wed, 15 Oct 2008 22:16:07 +0000 (23:16 +0100)
committerRussell King <[email protected]>
Wed, 15 Oct 2008 22:16:07 +0000 (23:16 +0100)
Conflicts:

arch/arm/mach-versatile/core.c

1  2 
arch/arm/plat-omap/devices.c
drivers/serial/8250.c

index ed94dee326cad426a09bb32ba5b183ccc4d4b4fd,97187fa0ae52b529a1f51453a29d2f2577c0605a..0cb2b22388e93454a7fe78b69e465fee6a519379
  #include <asm/mach/map.h>
  
  #include <mach/tc.h>
 +#include <mach/control.h>
  #include <mach/board.h>
  #include <mach/mmc.h>
  #include <mach/mux.h>
  #include <mach/gpio.h>
  #include <mach/menelaus.h>
  #include <mach/mcbsp.h>
 +#include <mach/dsp_common.h>
  
  #if   defined(CONFIG_OMAP_DSP) || defined(CONFIG_OMAP_DSP_MODULE)
  
 -#include "../plat-omap/dsp/dsp_common.h"
 -
  static struct dsp_platform_data dsp_pdata = {
        .kdev_list = LIST_HEAD_INIT(dsp_pdata.kdev_list),
  };
@@@ -76,7 -76,7 +76,7 @@@ int dsp_kfunc_device_register(struct ds
  {
        static DEFINE_MUTEX(dsp_pdata_lock);
  
 -      mutex_init(&kdev->lock);
 +      spin_lock_init(&kdev->lock);
  
        mutex_lock(&dsp_pdata_lock);
        list_add_tail(&kdev->entry, &dsp_pdata.kdev_list);
@@@ -95,10 -95,6 +95,10 @@@ static inline void omap_init_dsp(void) 
  
  static void omap_init_kp(void)
  {
 +      /* 2430 and 34xx keypad is on TWL4030 */
 +      if (cpu_is_omap2430() || cpu_is_omap34xx())
 +              return;
 +
        if (machine_is_omap_h2() || machine_is_omap_h3()) {
                omap_cfg_reg(F18_1610_KBC0);
                omap_cfg_reg(D20_1610_KBC1);
@@@ -160,6 -156,13 +160,6 @@@ void omap_mcbsp_register_board_cfg(stru
  {
        int i;
  
 -      if (size > OMAP_MAX_MCBSP_COUNT) {
 -              printk(KERN_WARNING "Registered too many McBSPs platform_data."
 -                      " Using maximum (%d) available.\n",
 -                      OMAP_MAX_MCBSP_COUNT);
 -              size = OMAP_MAX_MCBSP_COUNT;
 -      }
 -
        omap_mcbsp_devices = kzalloc(size * sizeof(struct platform_device *),
                                     GFP_KERNEL);
        if (!omap_mcbsp_devices) {
@@@ -438,16 -441,8 +438,8 @@@ static inline void omap_init_uwire(void
  
  #if   defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE)
  
- #ifdef CONFIG_ARCH_OMAP24XX
- #define       OMAP_WDT_BASE           0x48022000
- #else
- #define       OMAP_WDT_BASE           0xfffeb000
- #endif
  static struct resource wdt_resources[] = {
        {
-               .start          = OMAP_WDT_BASE,
-               .end            = OMAP_WDT_BASE + 0x4f,
                .flags          = IORESOURCE_MEM,
        },
  };
@@@ -461,6 -456,19 +453,19 @@@ static struct platform_device omap_wdt_
  
  static void omap_init_wdt(void)
  {
+       if (cpu_is_omap16xx())
+               wdt_resources[0].start = 0xfffeb000;
+       else if (cpu_is_omap2420())
+               wdt_resources[0].start = 0x48022000; /* WDT2 */
+       else if (cpu_is_omap2430())
+               wdt_resources[0].start = 0x49016000; /* WDT2 */
+       else if (cpu_is_omap343x())
+               wdt_resources[0].start = 0x48314000; /* WDT2 */
+       else
+               return;
+       wdt_resources[0].end = wdt_resources[0].start + 0x4f;
        (void) platform_device_register(&omap_wdt_device);
  }
  #else
@@@ -522,6 -530,10 +527,6 @@@ static inline void omap_init_rng(void) 
   */
  static int __init omap_init_devices(void)
  {
 -/*
 - * Need to enable relevant once for 2430 SDP
 - */
 -#ifndef CONFIG_MACH_OMAP_2430SDP
        /* please keep these calls, and their implementations above,
         * in alphabetical order so they're easier to sort through.
         */
        omap_init_uwire();
        omap_init_wdt();
        omap_init_rng();
 -#endif
        return 0;
  }
  arch_initcall(omap_init_devices);
diff --combined drivers/serial/8250.c
index 8058533f84180a22d6629c04668cbff00e8435ad,d4104a3bbe87cd7400a68f083369c41da3396d5b..ec39203b879d323d772b130fc680481cfadb85d0
  
  #include "8250.h"
  
+ #ifdef CONFIG_SPARC
+ #include "suncore.h"
+ #endif
  /*
   * Configuration:
   *   share_irqs - whether we pass IRQF_SHARED to request_irq().  This option
@@@ -53,6 -57,13 +57,13 @@@ static unsigned int share_irqs = SERIAL
  
  static unsigned int nr_uarts = CONFIG_SERIAL_8250_RUNTIME_UARTS;
  
+ static struct uart_driver serial8250_reg;
+ static int serial_index(struct uart_port *port)
+ {
+       return (serial8250_reg.minor - 64) + port->line;
+ }
  /*
   * Debugging.
   */
@@@ -536,7 -547,7 +547,7 @@@ static unsigned int serial_icr_read(str
  /*
   * FIFO support.
   */
- static inline void serial8250_clear_fifos(struct uart_8250_port *p)
+ static void serial8250_clear_fifos(struct uart_8250_port *p)
  {
        if (p->capabilities & UART_CAP_FIFO) {
                serial_outp(p, UART_FCR, UART_FCR_ENABLE_FIFO);
   * capability" bit enabled.  Note that on XR16C850s, we need to
   * reset LCR to write to IER.
   */
- static inline void serial8250_set_sleep(struct uart_8250_port *p, int sleep)
+ static void serial8250_set_sleep(struct uart_8250_port *p, int sleep)
  {
        if (p->capabilities & UART_CAP_SLEEP) {
                if (p->capabilities & UART_CAP_EFR) {
@@@ -993,7 -1004,7 +1004,7 @@@ static void autoconfig(struct uart_8250
                return;
  
        DEBUG_AUTOCONF("ttyS%d: autoconf (0x%04x, 0x%p): ",
-                       up->port.line, up->port.iobase, up->port.membase);
+                      serial_index(&up->port), up->port.iobase, up->port.membase);
  
        /*
         * We really do need global IRQs disabled here - we're going to
        if (up->capabilities != uart_config[up->port.type].flags) {
                printk(KERN_WARNING
                       "ttyS%d: detected caps %08x should be %08x\n",
-                       up->port.line, up->capabilities,
-                       uart_config[up->port.type].flags);
+                      serial_index(&up->port), up->capabilities,
+                      uart_config[up->port.type].flags);
        }
  
        up->port.fifosize = uart_config[up->port.type].fifo_size;
@@@ -1424,8 -1435,7 +1435,7 @@@ static unsigned int check_modem_status(
  /*
   * This handles the interrupt from one port.
   */
- static inline void
- serial8250_handle_port(struct uart_8250_port *up)
+ static void serial8250_handle_port(struct uart_8250_port *up)
  {
        unsigned int status;
        unsigned long flags;
@@@ -1719,7 -1729,7 +1729,7 @@@ static void serial8250_break_ctl(struc
  /*
   *    Wait for transmitter & holding register to empty
   */
- static inline void wait_for_xmitr(struct uart_8250_port *up, int bits)
+ static void wait_for_xmitr(struct uart_8250_port *up, int bits)
  {
        unsigned int status, tmout = 10000;
  
@@@ -1854,7 -1864,8 +1864,8 @@@ static int serial8250_startup(struct ua
         */
        if (!(up->port.flags & UPF_BUGGY_UART) &&
            (serial_inp(up, UART_LSR) == 0xff)) {
-               printk("ttyS%d: LSR safety check engaged!\n", up->port.line);
+               printk(KERN_INFO "ttyS%d: LSR safety check engaged!\n",
+                      serial_index(&up->port));
                return -ENODEV;
        }
  
                 */
                if (!(iir1 & UART_IIR_NO_INT) && (iir & UART_IIR_NO_INT)) {
                        up->bugs |= UART_BUG_THRE;
-                       pr_debug("ttyS%d - using backup timer\n", port->line);
+                       pr_debug("ttyS%d - using backup timer\n",
+                                serial_index(port));
                }
        }
  
                if (!(up->bugs & UART_BUG_TXEN)) {
                        up->bugs |= UART_BUG_TXEN;
                        pr_debug("ttyS%d - enabling bad tx status workarounds\n",
-                                port->line);
+                                serial_index(port));
                }
        } else {
                up->bugs &= ~UART_BUG_TXEN;
@@@ -2211,9 -2223,9 +2223,9 @@@ serial8250_set_termios(struct uart_por
                serial_outp(up, UART_EFR, efr);
        }
  
 -#ifdef CONFIG_ARCH_OMAP15XX
 +#ifdef CONFIG_ARCH_OMAP
        /* Workaround to enable 115200 baud on OMAP1510 internal ports */
 -      if (cpu_is_omap1510() && is_omap_port((unsigned int)up->port.membase)) {
 +      if (cpu_is_omap1510() && is_omap_port(up)) {
                if (baud == 115200) {
                        quot = 1;
                        serial_out(up, UART_OMAP_OSC_12M_SEL, 1);
@@@ -2266,27 -2278,18 +2278,27 @@@ serial8250_pm(struct uart_port *port, u
                p->pm(port, state, oldstate);
  }
  
 +static unsigned int serial8250_port_size(struct uart_8250_port *pt)
 +{
 +      if (pt->port.iotype == UPIO_AU)
 +              return 0x100000;
 +#ifdef CONFIG_ARCH_OMAP
 +      if (is_omap_port(pt))
 +              return 0x16 << pt->port.regshift;
 +#endif
 +      return 8 << pt->port.regshift;
 +}
 +
  /*
   * Resource handling.
   */
  static int serial8250_request_std_resource(struct uart_8250_port *up)
  {
 -      unsigned int size = 8 << up->port.regshift;
 +      unsigned int size = serial8250_port_size(up);
        int ret = 0;
  
        switch (up->port.iotype) {
        case UPIO_AU:
 -              size = 0x100000;
 -              /* fall thru */
        case UPIO_TSI:
        case UPIO_MEM32:
        case UPIO_MEM:
  
  static void serial8250_release_std_resource(struct uart_8250_port *up)
  {
 -      unsigned int size = 8 << up->port.regshift;
 +      unsigned int size = serial8250_port_size(up);
  
        switch (up->port.iotype) {
        case UPIO_AU:
 -              size = 0x100000;
 -              /* fall thru */
        case UPIO_TSI:
        case UPIO_MEM32:
        case UPIO_MEM:
@@@ -2637,7 -2642,6 +2649,6 @@@ static int serial8250_console_early_set
        return serial8250_find_port_for_earlycon();
  }
  
- static struct uart_driver serial8250_reg;
  static struct console serial8250_console = {
        .name           = "ttyS",
        .write          = serial8250_console_write,
@@@ -2684,7 -2688,6 +2695,6 @@@ static struct uart_driver serial8250_re
        .dev_name               = "ttyS",
        .major                  = TTY_MAJOR,
        .minor                  = 64,
-       .nr                     = UART_NR,
        .cons                   = SERIAL8250_CONSOLE,
  };
  
@@@ -2966,10 -2969,12 +2976,12 @@@ static int __init serial8250_init(void
                "%d ports, IRQ sharing %sabled\n", nr_uarts,
                share_irqs ? "en" : "dis");
  
-       for (i = 0; i < NR_IRQS; i++)
-               spin_lock_init(&irq_lists[i].lock);
+ #ifdef CONFIG_SPARC
+       ret = sunserial_register_minors(&serial8250_reg, UART_NR);
+ #else
+       serial8250_reg.nr = UART_NR;
        ret = uart_register_driver(&serial8250_reg);
+ #endif
        if (ret)
                goto out;
  
   put_dev:
        platform_device_put(serial8250_isa_devs);
   unreg_uart_drv:
+ #ifdef CONFIG_SPARC
+       sunserial_unregister_minors(&serial8250_reg, UART_NR);
+ #else
        uart_unregister_driver(&serial8250_reg);
+ #endif
   out:
        return ret;
  }
@@@ -3013,7 -3022,11 +3029,11 @@@ static void __exit serial8250_exit(void
        platform_driver_unregister(&serial8250_isa_driver);
        platform_device_unregister(isa_dev);
  
+ #ifdef CONFIG_SPARC
+       sunserial_unregister_minors(&serial8250_reg, UART_NR);
+ #else
        uart_unregister_driver(&serial8250_reg);
+ #endif
  }
  
  module_init(serial8250_init);
This page took 0.076388 seconds and 4 git commands to generate.