Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 14 Jan 2012 21:05:21 +0000 (13:05 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 14 Jan 2012 21:05:21 +0000 (13:05 -0800)
* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (119 commits)
  MIPS: Delete unused function add_temporary_entry.
  MIPS: Set default pci cache line size.
  MIPS: Flush huge TLB
  MIPS: Octeon: Remove SYS_SUPPORTS_HIGHMEM.
  MIPS: Octeon: Add support for OCTEON II PCIe
  MIPS: Octeon: Update PCI Latency timer and enable more error reporting.
  MIPS: Alchemy: Update cpu-feature-overrides
  MIPS: Alchemy: db1200: Improve PB1200 detection.
  MIPS: Alchemy: merge Au1000 and Au1300-style IRQ controller code.
  MIPS: Alchemy: chain IRQ controllers to MIPS IRQ controller
  MIPS: Alchemy: irq: register pm at irq init time
  MIPS: Alchemy: Touchscreen support on DB1100
  MIPS: Alchemy: Hook up IrDA on DB1000/DB1100
  net/irda: convert au1k_ir to platform driver.
  MIPS: Alchemy: remove unused board headers
  MTD: nand: make au1550nd.c a platform_driver
  MIPS: Netlogic: Mark Netlogic chips as SMT capable
  MIPS: Netlogic: Add support for XLP 3XX cores
  MIPS: Netlogic: Merge some of XLR/XLP wakup code
  MIPS: Netlogic: Add default XLP config.
  ...

Fix up trivial conflicts in arch/mips/kernel/{perf_event_mipsxx.c,
traps.c} and drivers/tty/serial/Makefile

13 files changed:
1  2 
arch/mips/Kconfig
arch/mips/bcm63xx/boards/board_bcm963xx.c
arch/mips/kernel/perf_event_mipsxx.c
arch/mips/kernel/setup.c
arch/mips/kernel/traps.c
arch/mips/pci/pci.c
drivers/spi/Kconfig
drivers/tty/serial/Kconfig
drivers/tty/serial/Makefile
drivers/usb/host/Kconfig
drivers/usb/host/ohci-au1xxx.c
include/linux/serial_core.h
sound/soc/au1x/db1200.c

diff --combined arch/mips/Kconfig
index 29d92187ff3019914c5fea55f317108dc5745958,0c55582a49c3aadef7dfeaaca4fe321980a277e9..c4c1312473fbf6cd9104cc3d206846bcd38b1b4b
@@@ -16,7 -16,6 +16,7 @@@ config MIP
        select HAVE_FUNCTION_GRAPH_TRACER
        select HAVE_KPROBES
        select HAVE_KRETPROBES
 +      select ARCH_BINFMT_ELF_RANDOMIZE_PIE
        select RTC_LIB if !MACH_LOONGSON
        select GENERIC_ATOMIC64 if !64BIT
        select HAVE_DMA_ATTRS
@@@ -26,9 -25,6 +26,9 @@@
        select GENERIC_IRQ_SHOW
        select HAVE_ARCH_JUMP_LABEL
        select IRQ_FORCED_THREADING
 +      select HAVE_MEMBLOCK
 +      select HAVE_MEMBLOCK_NODE_MAP
 +      select ARCH_DISCARD_MEMBLOCK
  
  menu "Machine selection"
  
@@@ -69,6 -65,7 +69,6 @@@ config AR
        select SYS_SUPPORTS_LITTLE_ENDIAN
        select SYS_SUPPORTS_ZBOOT_UART16550
        select ARCH_REQUIRE_GPIOLIB
 -      select GCD
        select VLYNQ
        help
          Support for the Texas Instruments AR7 System-on-a-Chip
@@@ -719,7 -716,6 +719,6 @@@ config CAVIUM_OCTEON_SIMULATO
        select DMA_COHERENT
        select SYS_SUPPORTS_64BIT_KERNEL
        select SYS_SUPPORTS_BIG_ENDIAN
-       select SYS_SUPPORTS_HIGHMEM
        select SYS_SUPPORTS_HOTPLUG_CPU
        select SYS_HAS_CPU_CAVIUM_OCTEON
        select HOLES_IN_ZONE
@@@ -735,7 -731,6 +734,6 @@@ config CAVIUM_OCTEON_REFERENCE_BOAR
        select DMA_COHERENT
        select SYS_SUPPORTS_64BIT_KERNEL
        select SYS_SUPPORTS_BIG_ENDIAN
-       select SYS_SUPPORTS_HIGHMEM
        select SYS_SUPPORTS_HOTPLUG_CPU
        select SYS_HAS_EARLY_PRINTK
        select SYS_HAS_CPU_CAVIUM_OCTEON
@@@ -764,7 -759,6 +762,6 @@@ config NLM_XLR_BOAR
        depends on EXPERIMENTAL
        select BOOT_ELF32
        select NLM_COMMON
-       select NLM_XLR
        select SYS_HAS_CPU_XLR
        select SYS_SUPPORTS_SMP
        select HW_HAS_PCI
        select CEVT_R4K
        select CSRC_R4K
        select IRQ_CPU
+       select ARCH_SUPPORTS_MSI
        select ZONE_DMA if 64BIT
        select SYNC_R4K
        select SYS_HAS_EARLY_PRINTK
          Support for systems based on Netlogic XLR and XLS processors.
          Say Y here if you have a XLR or XLS based board.
  
+ config NLM_XLP_BOARD
+       bool "Netlogic XLP based systems"
+       depends on EXPERIMENTAL
+       select BOOT_ELF32
+       select NLM_COMMON
+       select SYS_HAS_CPU_XLP
+       select SYS_SUPPORTS_SMP
+       select HW_HAS_PCI
+       select SWAP_IO_SPACE
+       select SYS_SUPPORTS_32BIT_KERNEL
+       select SYS_SUPPORTS_64BIT_KERNEL
+       select 64BIT_PHYS_ADDR
+       select SYS_SUPPORTS_BIG_ENDIAN
+       select SYS_SUPPORTS_LITTLE_ENDIAN
+       select SYS_SUPPORTS_HIGHMEM
+       select DMA_COHERENT
+       select NR_CPUS_DEFAULT_32
+       select CEVT_R4K
+       select CSRC_R4K
+       select IRQ_CPU
+       select ZONE_DMA if 64BIT
+       select SYNC_R4K
+       select SYS_HAS_EARLY_PRINTK
+       help
+         This board is based on Netlogic XLP Processor.
+         Say Y here if you have a XLP based board.
  endchoice
  
  source "arch/mips/alchemy/Kconfig"
@@@ -1416,51 -1438,36 +1441,36 @@@ config CPU_CAVIUM_OCTEO
  config CPU_BMIPS3300
        bool "BMIPS3300"
        depends on SYS_HAS_CPU_BMIPS3300
-       select DMA_NONCOHERENT
-       select IRQ_CPU
-       select SWAP_IO_SPACE
-       select SYS_SUPPORTS_32BIT_KERNEL
-       select WEAK_ORDERING
+       select CPU_BMIPS
        help
          Broadcom BMIPS3300 processors.
  
  config CPU_BMIPS4350
        bool "BMIPS4350"
        depends on SYS_HAS_CPU_BMIPS4350
-       select CPU_SUPPORTS_32BIT_KERNEL
-       select DMA_NONCOHERENT
-       select IRQ_CPU
-       select SWAP_IO_SPACE
+       select CPU_BMIPS
        select SYS_SUPPORTS_SMP
        select SYS_SUPPORTS_HOTPLUG_CPU
-       select WEAK_ORDERING
        help
          Broadcom BMIPS4350 ("VIPER") processors.
  
  config CPU_BMIPS4380
        bool "BMIPS4380"
        depends on SYS_HAS_CPU_BMIPS4380
-       select CPU_SUPPORTS_32BIT_KERNEL
-       select DMA_NONCOHERENT
-       select IRQ_CPU
-       select SWAP_IO_SPACE
+       select CPU_BMIPS
        select SYS_SUPPORTS_SMP
        select SYS_SUPPORTS_HOTPLUG_CPU
-       select WEAK_ORDERING
        help
          Broadcom BMIPS4380 processors.
  
  config CPU_BMIPS5000
        bool "BMIPS5000"
        depends on SYS_HAS_CPU_BMIPS5000
-       select CPU_SUPPORTS_32BIT_KERNEL
+       select CPU_BMIPS
        select CPU_SUPPORTS_HIGHMEM
-       select DMA_NONCOHERENT
-       select IRQ_CPU
-       select SWAP_IO_SPACE
+       select MIPS_CPU_SCACHE
        select SYS_SUPPORTS_SMP
        select SYS_SUPPORTS_HOTPLUG_CPU
-       select WEAK_ORDERING
        help
          Broadcom BMIPS5000 processors.
  
@@@ -1475,6 -1482,19 +1485,19 @@@ config CPU_XL
        select CPU_SUPPORTS_HUGEPAGES
        help
          Netlogic Microsystems XLR/XLS processors.
+ config CPU_XLP
+       bool "Netlogic XLP SoC"
+       depends on SYS_HAS_CPU_XLP
+       select CPU_SUPPORTS_32BIT_KERNEL
+       select CPU_SUPPORTS_64BIT_KERNEL
+       select CPU_SUPPORTS_HIGHMEM
+       select CPU_HAS_LLSC
+       select WEAK_ORDERING
+       select WEAK_REORDERING_BEYOND_LLSC
+       select CPU_HAS_PREFETCH
+       help
+         Netlogic Microsystems XLP processors.
  endchoice
  
  if CPU_LOONGSON2F
@@@ -1521,6 -1541,15 +1544,15 @@@ config CPU_LOONGSON
        select CPU_SUPPORTS_64BIT_KERNEL
        select CPU_SUPPORTS_HIGHMEM
  
+ config CPU_BMIPS
+       bool
+       select CPU_MIPS32
+       select CPU_SUPPORTS_32BIT_KERNEL
+       select DMA_NONCOHERENT
+       select IRQ_CPU
+       select SWAP_IO_SPACE
+       select WEAK_ORDERING
  config SYS_HAS_CPU_LOONGSON2E
        bool
  
@@@ -1608,6 -1637,9 +1640,9 @@@ config SYS_HAS_CPU_BMIPS500
  config SYS_HAS_CPU_XLR
        bool
  
+ config SYS_HAS_CPU_XLP
+       bool
  #
  # CPU may reorder R->R, R->W, W->R, W->W
  # Reordering beyond LL and SC is handled in WEAK_REORDERING_BEYOND_LLSC
@@@ -1995,6 -2027,9 +2030,9 @@@ config CPU_HAS_SMARTMIP
  config CPU_HAS_WB
        bool
  
+ config XKS01
+       bool
  #
  # Vectored interrupt mode is an R2 feature
  #
@@@ -2067,6 -2102,9 +2105,6 @@@ config ARCH_DISCONTIGMEM_ENABL
          or have huge holes in the physical address space for other reasons.
          See <file:Documentation/vm/numa> for more.
  
 -config ARCH_POPULATES_NODE_MAP
 -      def_bool y
 -
  config ARCH_SPARSEMEM_ENABLE
        bool
        select SPARSEMEM_STATIC
@@@ -2317,7 -2355,6 +2355,7 @@@ config PC
        bool "Support for PCI controller"
        depends on HW_HAS_PCI
        select PCI_DOMAINS
 +      select GENERIC_PCI_IOMAP
        help
          Find out whether you have a PCI motherboard. PCI is the name of a
          bus system, i.e. the way the CPU talks to the other stuff inside
@@@ -2370,6 -2407,10 +2408,6 @@@ config T
          Linux driver support status is documented at:
          <http://www.linux-mips.org/wiki/DECstation>
  
 -#config ACCESSBUS
 -#     bool "Access.Bus support"
 -#     depends on TC
 -
  config MMU
        bool
        default y
index c22385400fc979cbeb1d6d9d249f2cab3404f48b,e62461f817d7c10e3d0881a08451afc7f02aeac4..2f1773f3fb7a5594872ddc8b604be143f3127a38
@@@ -709,15 -709,9 +709,9 @@@ void __init board_prom_init(void
        char cfe_version[32];
        u32 val;
  
-       /* read base address of boot chip select (0)
-        * 6345 does not have MPI but boots from standard
-        * MIPS Flash address */
-       if (BCMCPU_IS_6345())
-               val = 0x1fc00000;
-       else {
-               val = bcm_mpi_readl(MPI_CSBASE_REG(0));
-               val &= MPI_CSBASE_BASE_MASK;
-       }
+       /* read base address of boot chip select (0) */
+       val = bcm_mpi_readl(MPI_CSBASE_REG(0));
+       val &= MPI_CSBASE_BASE_MASK;
        boot_addr = (u8 *)KSEG1ADDR(val);
  
        /* dump cfe version */
        }
  
        bcm_gpio_writel(val, GPIO_MODE_REG);
-       /* Generate MAC address for WLAN and
-        * register our SPROM */
- #ifdef CONFIG_SSB_PCIHOST
-       if (!board_get_mac_address(bcm63xx_sprom.il0mac)) {
-               memcpy(bcm63xx_sprom.et0mac, bcm63xx_sprom.il0mac, ETH_ALEN);
-               memcpy(bcm63xx_sprom.et1mac, bcm63xx_sprom.il0mac, ETH_ALEN);
-               if (ssb_arch_register_fallback_sprom(
-                               &bcm63xx_get_fallback_sprom) < 0)
-                       printk(KERN_ERR PFX "failed to register fallback SPROM\n");
-       }
- #endif
  }
  
  /*
@@@ -834,13 -816,10 +816,13 @@@ static struct mtd_partition mtd_partiti
        }
  };
  
 +static const char *bcm63xx_part_types[] = { "bcm63xxpart", NULL };
 +
  static struct physmap_flash_data flash_data = {
        .width                  = 2,
        .nr_parts               = ARRAY_SIZE(mtd_partitions),
        .parts                  = mtd_partitions,
 +      .part_probe_types       = bcm63xx_part_types,
  };
  
  static struct resource mtd_resources[] = {
@@@ -895,13 -874,23 +877,23 @@@ int __init board_register_devices(void
        if (board.has_dsp)
                bcm63xx_dsp_register(&board.dsp);
  
-       /* read base address of boot chip select (0) */
-       if (BCMCPU_IS_6345())
-               val = 0x1fc00000;
-       else {
-               val = bcm_mpi_readl(MPI_CSBASE_REG(0));
-               val &= MPI_CSBASE_BASE_MASK;
+       /* Generate MAC address for WLAN and register our SPROM,
+        * do this after registering enet devices
+        */
+ #ifdef CONFIG_SSB_PCIHOST
+       if (!board_get_mac_address(bcm63xx_sprom.il0mac)) {
+               memcpy(bcm63xx_sprom.et0mac, bcm63xx_sprom.il0mac, ETH_ALEN);
+               memcpy(bcm63xx_sprom.et1mac, bcm63xx_sprom.il0mac, ETH_ALEN);
+               if (ssb_arch_register_fallback_sprom(
+                               &bcm63xx_get_fallback_sprom) < 0)
+                       pr_err(PFX "failed to register fallback SPROM\n");
        }
+ #endif
+       /* read base address of boot chip select (0) */
+       val = bcm_mpi_readl(MPI_CSBASE_REG(0));
+       val &= MPI_CSBASE_BASE_MASK;
        mtd_resources[0].start = val;
        mtd_resources[0].end = 0x1FFFFFFF;
  
index 315fc0b250f8fe3373684f12f5c0437fd3d0b7b1,bda4bc9e6988bcab40f6b5513748c861d7a0adec..e3b897acfbc04b3db1cbd29a37a423ccca4df815
@@@ -621,11 -621,6 +621,6 @@@ static int mipspmu_event_init(struct pe
                return -ENODEV;
  
        if (!atomic_inc_not_zero(&active_events)) {
-               if (atomic_read(&active_events) > MIPS_MAX_HWEVENTS) {
-                       atomic_dec(&active_events);
-                       return -EINVAL;
-               }
                mutex_lock(&pmu_reserve_mutex);
                if (atomic_read(&active_events) == 0)
                        err = mipspmu_get_irq();
        if (err)
                return err;
  
-       err = __hw_perf_event_init(event);
-       if (err)
-               hw_perf_event_destroy(event);
-       return err;
+       return __hw_perf_event_init(event);
  }
  
  static struct pmu pmu = {
@@@ -712,18 -703,6 +703,6 @@@ static const struct mips_perf_event *mi
  
  }
  
- static int validate_event(struct cpu_hw_events *cpuc,
-              struct perf_event *event)
- {
-       struct hw_perf_event fake_hwc = event->hw;
-       /* Allow mixed event group. So return 1 to pass validation. */
-       if (event->pmu != &pmu || event->state <= PERF_EVENT_STATE_OFF)
-               return 1;
-       return mipsxx_pmu_alloc_counter(cpuc, &fake_hwc) >= 0;
- }
  static int validate_group(struct perf_event *event)
  {
        struct perf_event *sibling, *leader = event->group_leader;
  
        memset(&fake_cpuc, 0, sizeof(fake_cpuc));
  
-       if (!validate_event(&fake_cpuc, leader))
+       if (mipsxx_pmu_alloc_counter(&fake_cpuc, &leader->hw) < 0)
 -              return -ENOSPC;
 +              return -EINVAL;
  
        list_for_each_entry(sibling, &leader->sibling_list, group_entry) {
-               if (!validate_event(&fake_cpuc, sibling))
+               if (mipsxx_pmu_alloc_counter(&fake_cpuc, &sibling->hw) < 0)
 -                      return -ENOSPC;
 +                      return -EINVAL;
        }
  
-       if (!validate_event(&fake_cpuc, event))
+       if (mipsxx_pmu_alloc_counter(&fake_cpuc, &event->hw) < 0)
 -              return -ENOSPC;
 +              return -EINVAL;
  
        return 0;
  }
@@@ -1279,13 -1258,14 +1258,14 @@@ static int __hw_perf_event_init(struct 
        }
  
        err = 0;
-       if (event->group_leader != event) {
+       if (event->group_leader != event)
                err = validate_group(event);
-               if (err)
-                       return -EINVAL;
-       }
  
        event->destroy = hw_perf_event_destroy;
+       if (err)
+               event->destroy(event);
        return err;
  }
  
@@@ -1380,20 -1360,10 +1360,10 @@@ static irqreturn_t mipsxx_pmu_handle_ir
  }
  
  /* 24K */
- #define IS_UNSUPPORTED_24K_EVENT(r, b)                                        \
-       ((b) == 12 || (r) == 151 || (r) == 152 || (b) == 26 ||          \
-        (b) == 27 || (r) == 28 || (r) == 158 || (b) == 31 ||           \
-        (b) == 32 || (b) == 34 || (b) == 36 || (r) == 168 ||           \
-        (r) == 172 || (b) == 47 || ((b) >= 56 && (b) <= 63) ||         \
-        ((b) >= 68 && (b) <= 127))
  #define IS_BOTH_COUNTERS_24K_EVENT(b)                                 \
        ((b) == 0 || (b) == 1 || (b) == 11)
  
  /* 34K */
- #define IS_UNSUPPORTED_34K_EVENT(r, b)                                        \
-       ((b) == 12 || (r) == 27 || (r) == 158 || (b) == 36 ||           \
-        (b) == 38 || (r) == 175 || ((b) >= 56 && (b) <= 63) ||         \
-        ((b) >= 68 && (b) <= 127))
  #define IS_BOTH_COUNTERS_34K_EVENT(b)                                 \
        ((b) == 0 || (b) == 1 || (b) == 11)
  #ifdef CONFIG_MIPS_MT_SMP
  #endif
  
  /* 74K */
- #define IS_UNSUPPORTED_74K_EVENT(r, b)                                        \
-       ((r) == 5 || ((r) >= 135 && (r) <= 137) ||                      \
-        ((b) >= 10 && (b) <= 12) || (b) == 22 || (b) == 27 ||          \
-        (b) == 33 || (b) == 34 || ((b) >= 47 && (b) <= 49) ||          \
-        (r) == 178 || (b) == 55 || (b) == 57 || (b) == 60 ||           \
-        (b) == 61 || (r) == 62 || (r) == 191 ||                        \
-        ((b) >= 64 && (b) <= 127))
  #define IS_BOTH_COUNTERS_74K_EVENT(b)                                 \
        ((b) == 0 || (b) == 1)
  
  /* 1004K */
- #define IS_UNSUPPORTED_1004K_EVENT(r, b)                              \
-       ((b) == 12 || (r) == 27 || (r) == 158 || (b) == 38 ||           \
-        (r) == 175 || (b) == 63 || ((b) >= 68 && (b) <= 127))
  #define IS_BOTH_COUNTERS_1004K_EVENT(b)                                       \
        ((b) == 0 || (b) == 1 || (b) == 11)
  #ifdef CONFIG_MIPS_MT_SMP
@@@ -1445,11 -1405,10 +1405,10 @@@ static const struct mips_perf_event *mi
        unsigned int raw_id = config & 0xff;
        unsigned int base_id = raw_id & 0x7f;
  
+       raw_event.event_id = base_id;
        switch (current_cpu_type()) {
        case CPU_24K:
-               if (IS_UNSUPPORTED_24K_EVENT(raw_id, base_id))
-                       return ERR_PTR(-EOPNOTSUPP);
-               raw_event.event_id = base_id;
                if (IS_BOTH_COUNTERS_24K_EVENT(base_id))
                        raw_event.cntr_mask = CNTR_EVEN | CNTR_ODD;
                else
  #endif
                break;
        case CPU_34K:
-               if (IS_UNSUPPORTED_34K_EVENT(raw_id, base_id))
-                       return ERR_PTR(-EOPNOTSUPP);
-               raw_event.event_id = base_id;
                if (IS_BOTH_COUNTERS_34K_EVENT(base_id))
                        raw_event.cntr_mask = CNTR_EVEN | CNTR_ODD;
                else
  #endif
                break;
        case CPU_74K:
-               if (IS_UNSUPPORTED_74K_EVENT(raw_id, base_id))
-                       return ERR_PTR(-EOPNOTSUPP);
-               raw_event.event_id = base_id;
                if (IS_BOTH_COUNTERS_74K_EVENT(base_id))
                        raw_event.cntr_mask = CNTR_EVEN | CNTR_ODD;
                else
  #endif
                break;
        case CPU_1004K:
-               if (IS_UNSUPPORTED_1004K_EVENT(raw_id, base_id))
-                       return ERR_PTR(-EOPNOTSUPP);
-               raw_event.event_id = base_id;
                if (IS_BOTH_COUNTERS_1004K_EVENT(base_id))
                        raw_event.cntr_mask = CNTR_EVEN | CNTR_ODD;
                else
diff --combined arch/mips/kernel/setup.c
index b1cb8f87d7b438186d50bd82ed955a20a165b6a8,e86c2cf554aa5815623b6b870e5b4e853630cb8f..058e964e730344dc51adc3ed9737c97d0b4fc51f
@@@ -14,7 -14,6 +14,7 @@@
  #include <linux/ioport.h>
  #include <linux/export.h>
  #include <linux/screen_info.h>
 +#include <linux/memblock.h>
  #include <linux/bootmem.h>
  #include <linux/initrd.h>
  #include <linux/root_dev.h>
@@@ -122,6 -121,9 +122,9 @@@ static void __init print_memory_map(voi
                case BOOT_MEM_RAM:
                        printk(KERN_CONT "(usable)\n");
                        break;
+               case BOOT_MEM_INIT_RAM:
+                       printk(KERN_CONT "(usable after init)\n");
+                       break;
                case BOOT_MEM_ROM_DATA:
                        printk(KERN_CONT "(ROM data)\n");
                        break;
@@@ -353,7 -355,7 +356,7 @@@ static void __init bootmem_init(void
                        continue;
  #endif
  
 -              add_active_range(0, start, end);
 +              memblock_add_node(PFN_PHYS(start), PFN_PHYS(end - start), 0);
        }
  
        /*
        for (i = 0; i < boot_mem_map.nr_map; i++) {
                unsigned long start, end, size;
  
+               start = PFN_UP(boot_mem_map.map[i].addr);
+               end   = PFN_DOWN(boot_mem_map.map[i].addr
+                                   + boot_mem_map.map[i].size);
                /*
                 * Reserve usable memory.
                 */
-               if (boot_mem_map.map[i].type != BOOT_MEM_RAM)
+               switch (boot_mem_map.map[i].type) {
+               case BOOT_MEM_RAM:
+                       break;
+               case BOOT_MEM_INIT_RAM:
+                       memory_present(0, start, end);
                        continue;
+               default:
+                       /* Not usable memory */
+                       continue;
+               }
  
-               start = PFN_UP(boot_mem_map.map[i].addr);
-               end   = PFN_DOWN(boot_mem_map.map[i].addr
-                                   + boot_mem_map.map[i].size);
                /*
                 * We are rounding up the start address of usable memory
                 * and at the end of the usable range downwards.
@@@ -456,11 -467,33 +468,33 @@@ early_param("mem", early_parse_mem)
  
  static void __init arch_mem_init(char **cmdline_p)
  {
+       phys_t init_mem, init_end, init_size;
        extern void plat_mem_setup(void);
  
        /* call board setup routine */
        plat_mem_setup();
  
+       init_mem = PFN_UP(__pa_symbol(&__init_begin)) << PAGE_SHIFT;
+       init_end = PFN_DOWN(__pa_symbol(&__init_end)) << PAGE_SHIFT;
+       init_size = init_end - init_mem;
+       if (init_size) {
+               /* Make sure it is in the boot_mem_map */
+               int i, found;
+               found = 0;
+               for (i = 0; i < boot_mem_map.nr_map; i++) {
+                       if (init_mem >= boot_mem_map.map[i].addr &&
+                           init_mem < (boot_mem_map.map[i].addr +
+                                       boot_mem_map.map[i].size)) {
+                               found = 1;
+                               break;
+                       }
+               }
+               if (!found)
+                       add_memory_region(init_mem, init_size,
+                                         BOOT_MEM_INIT_RAM);
+       }
        pr_info("Determined physical RAM map:\n");
        print_memory_map();
  
@@@ -524,6 -557,7 +558,7 @@@ static void __init resource_init(void
                res = alloc_bootmem(sizeof(struct resource));
                switch (boot_mem_map.map[i].type) {
                case BOOT_MEM_RAM:
+               case BOOT_MEM_INIT_RAM:
                case BOOT_MEM_ROM_DATA:
                        res->name = "System RAM";
                        break;
diff --combined arch/mips/kernel/traps.c
index bbddb86c1fa159bc50dc9275b38a1754353ede43,48240fd8c29716f1ad3581b46788b3ae762dd15d..cc4a3f120f54d6f036e66812cf47e5c35e7dbff9
@@@ -91,6 -91,7 +91,7 @@@ int (*board_be_handler)(struct pt_regs 
  void (*board_nmi_handler_setup)(void);
  void (*board_ejtag_handler_setup)(void);
  void (*board_bind_eic_interrupt)(int irq, int regset);
+ void (*board_ebase_setup)(void);
  
  
  static void show_raw_backtrace(unsigned long reg29)
@@@ -400,7 -401,7 +401,7 @@@ void __noreturn die(const char *str, st
                panic("Fatal exception in interrupt");
  
        if (panic_on_oops) {
-               printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n");
+               printk(KERN_EMERG "Fatal exception: panic in 5 seconds");
                ssleep(5);
                panic("Fatal exception");
        }
@@@ -1150,7 -1151,7 +1151,7 @@@ asmlinkage void do_mt(struct pt_regs *r
  asmlinkage void do_dsp(struct pt_regs *regs)
  {
        if (cpu_has_dsp)
-               panic("Unexpected DSP exception\n");
+               panic("Unexpected DSP exception");
  
        force_sig(SIGILL, current);
  }
@@@ -1339,9 -1340,18 +1340,18 @@@ void ejtag_exception_handler(struct pt_
  
  /*
   * NMI exception handler.
+  * No lock; only written during early bootup by CPU 0.
   */
 -NORET_TYPE void ATTRIB_NORET nmi_exception_handler(struct pt_regs *regs)
+ static RAW_NOTIFIER_HEAD(nmi_chain);
+ int register_nmi_notifier(struct notifier_block *nb)
+ {
+       return raw_notifier_chain_register(&nmi_chain, nb);
+ }
 +void __noreturn nmi_exception_handler(struct pt_regs *regs)
  {
+       raw_notifier_call_chain(&nmi_chain, 0, regs);
        bust_spinlocks(1);
        printk("NMI taken!!!!\n");
        die("NMI", regs);
@@@ -1682,6 -1692,8 +1692,8 @@@ void __init trap_init(void
                        ebase += (read_c0_ebase() & 0x3ffff000);
        }
  
+       if (board_ebase_setup)
+               board_ebase_setup();
        per_cpu_trap_init();
  
        /*
diff --combined arch/mips/pci/pci.c
index fa8e378413b1640ed1e2efaf17894efde23925da,8ac0d484185281df1238091a018a2f7709b3622c..aec2b111d35b0131f805e736bd80c2ca19d59cbf
@@@ -4,8 -4,11 +4,11 @@@
   * Free Software Foundation;  either version 2 of the  License, or (at your
   * option) any later version.
   *
-  * Copyright (C) 2003, 04 Ralf Baechle (ralf@linux-mips.org)
+  * Copyright (C) 2003, 04, 11 Ralf Baechle (ralf@linux-mips.org)
+  * Copyright (C) 2011 Wind River Systems,
+  *   written by Ralf Baechle (ralf@linux-mips.org)
   */
+ #include <linux/bug.h>
  #include <linux/kernel.h>
  #include <linux/mm.h>
  #include <linux/bootmem.h>
@@@ -14,6 -17,8 +17,8 @@@
  #include <linux/types.h>
  #include <linux/pci.h>
  
+ #include <asm/cpu-info.h>
  /*
   * Indicate whether we respect the PCI setup left by the firmware.
   *
@@@ -81,7 -86,6 +86,7 @@@ static void __devinit pcibios_scanbus(s
  {
        static int next_busno;
        static int need_domain_info;
 +      LIST_HEAD(resources);
        struct pci_bus *bus;
  
        if (!hose->iommu)
        if (hose->get_busno && pci_probe_only)
                next_busno = (*hose->get_busno)();
  
 -      bus = pci_scan_bus(next_busno, hose->pci_ops, hose);
 +      pci_add_resource(&resources, hose->mem_resource);
 +      pci_add_resource(&resources, hose->io_resource);
 +      bus = pci_scan_root_bus(NULL, next_busno, hose->pci_ops, hose,
 +                              &resources);
 +      if (!bus)
 +              pci_free_resource_list(&resources);
 +
        hose->bus = bus;
  
        need_domain_info = need_domain_info || hose->index;
@@@ -157,10 -155,32 +162,32 @@@ out
               "Skipping PCI bus scan due to resource conflict\n");
  }
  
+ static void __init pcibios_set_cache_line_size(void)
+ {
+       struct cpuinfo_mips *c = &current_cpu_data;
+       unsigned int lsize;
+       /*
+        * Set PCI cacheline size to that of the highest level in the
+        * cache hierarchy.
+        */
+       lsize = c->dcache.linesz;
+       lsize = c->scache.linesz ? : lsize;
+       lsize = c->tcache.linesz ? : lsize;
+       BUG_ON(!lsize);
+       pci_dfl_cache_line_size = lsize >> 2;
+       pr_debug("PCI: pci_cache_line_size set to %d bytes\n", lsize);
+ }
  static int __init pcibios_init(void)
  {
        struct pci_controller *hose;
  
+       pcibios_set_cache_line_size();
        /* Scan all of the recorded PCI controllers.  */
        for (hose = hose_head; hose; hose = hose->next)
                pcibios_scanbus(hose);
@@@ -212,6 -232,27 +239,6 @@@ static int pcibios_enable_resources(str
        return 0;
  }
  
 -/*
 - *  If we set up a device for bus mastering, we need to check the latency
 - *  timer as certain crappy BIOSes forget to set it properly.
 - */
 -static unsigned int pcibios_max_latency = 255;
 -
 -void pcibios_set_master(struct pci_dev *dev)
 -{
 -      u8 lat;
 -      pci_read_config_byte(dev, PCI_LATENCY_TIMER, &lat);
 -      if (lat < 16)
 -              lat = (64 <= pcibios_max_latency) ? 64 : pcibios_max_latency;
 -      else if (lat > pcibios_max_latency)
 -              lat = pcibios_max_latency;
 -      else
 -              return;
 -      printk(KERN_DEBUG "PCI: Setting latency timer of device %s to %d\n",
 -             pci_name(dev), lat);
 -      pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat);
 -}
 -
  unsigned int pcibios_assign_all_busses(void)
  {
        return (pci_probe & PCI_ASSIGN_ALL_BUSSES) ? 1 : 0;
@@@ -252,11 -293,15 +279,11 @@@ void __devinit pcibios_fixup_bus(struc
  {
        /* Propagate hose info into the subordinate devices.  */
  
 -      struct pci_controller *hose = bus->sysdata;
        struct list_head *ln;
        struct pci_dev *dev = bus->self;
  
 -      if (!dev) {
 -              bus->resource[0] = hose->io_resource;
 -              bus->resource[1] = hose->mem_resource;
 -      } else if (pci_probe_only &&
 -                 (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) {
 +      if (pci_probe_only && dev &&
 +          (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) {
                pci_read_bridge_bases(bus);
                pcibios_fixup_device_resources(dev, bus);
        }
diff --combined drivers/spi/Kconfig
index 56abf55e49da28178c8048f72aeb60187c0e6fe7,369e092bf3d5484054057562b624b35346e61c2f..561a832417b8968195638aba58edbfe3edd988e7
@@@ -87,12 -87,12 +87,12 @@@ config SPI_BFIN_SPOR
          Enable support for a SPI bus via the Blackfin SPORT peripheral.
  
  config SPI_AU1550
-       tristate "Au1550/Au12x0 SPI Controller"
+       tristate "Au1550/Au1200/Au1300 SPI Controller"
        depends on MIPS_ALCHEMY && EXPERIMENTAL
        select SPI_BITBANG
        help
          If you say yes to this option, support will be included for the
-         Au1550 SPI controller (may also work with Au1200,Au1210,Au1250).
+         PSC SPI controller found on Au1550, Au1200 and Au1300 series.
  
  config SPI_BITBANG
        tristate "Utilities for Bitbanging SPI masters"
@@@ -174,7 -174,8 +174,7 @@@ config SPI_LM70_LL
  
  config SPI_MPC52xx
        tristate "Freescale MPC52xx SPI (non-PSC) controller support"
 -      depends on PPC_MPC52xx && SPI
 -      select SPI_MASTER_OF
 +      depends on PPC_MPC52xx
        help
          This drivers supports the MPC52xx SPI controller in master SPI
          mode.
@@@ -198,7 -199,7 +198,7 @@@ config SPI_FSL_LI
        depends on FSL_SOC
  
  config SPI_FSL_SPI
 -      tristate "Freescale SPI controller"
 +      bool "Freescale SPI controller"
        depends on FSL_SOC
        select SPI_FSL_LIB
        help
          MPC8569 uses the controller in QE mode, MPC8610 in cpu mode.
  
  config SPI_FSL_ESPI
 -      tristate "Freescale eSPI controller"
 +      bool "Freescale eSPI controller"
        depends on FSL_SOC
        select SPI_FSL_LIB
        help
@@@ -345,14 -346,14 +345,14 @@@ config SPI_TI_SS
          serial port.
  
  config SPI_TOPCLIFF_PCH
 -      tristate "Intel EG20T PCH/OKI SEMICONDUCTOR ML7213 IOH SPI controller"
 +      tristate "Intel EG20T PCH/LAPIS Semicon IOH(ML7213/ML7223/ML7831) SPI"
        depends on PCI
        help
          SPI driver for the Topcliff PCH (Platform Controller Hub) SPI bus
          used in some x86 embedded processors.
  
 -        This driver also supports the ML7213, a companion chip for the
 -        Atom E6xx series and compatible with the Intel EG20T PCH.
 +        This driver also supports the ML7213/ML7223/ML7831, a companion chip
 +        for the Atom E6xx series and compatible with the Intel EG20T PCH.
  
  config SPI_TXX9
        tristate "Toshiba TXx9 SPI controller"
index f32a2ea701007f7b4aa4234bcbd9dd68d7b79d4b,95a0f5fe7d4222495074c76efa23f882212b4d70..aca2386c5ef10261e74bfb66b2461546c8206150
@@@ -97,11 -97,6 +97,11 @@@ config SERIAL_8250_PN
          This builds standard PNP serial support. You may be able to
          disable this feature if you only need legacy serial support.
  
 +config SERIAL_8250_FSL
 +      bool
 +      depends on SERIAL_8250_CONSOLE && PPC_UDBG_16550
 +      default PPC
 +
  config SERIAL_8250_HP300
        tristate
        depends on SERIAL_8250 && HP300
@@@ -462,7 -457,7 +462,7 @@@ config SERIAL_SAMSUN
  config SERIAL_SAMSUNG_UARTS_4
        bool
        depends on ARM && PLAT_SAMSUNG
 -      default y if CPU_S3C2443
 +      default y if !(CPU_S3C2410 || SERIAL_S3C2412 || CPU_S3C2440 || CPU_S3C2442)
        help
          Internal node for the common case of 4 Samsung compatible UARTs
  
@@@ -470,7 -465,7 +470,7 @@@ config SERIAL_SAMSUNG_UART
        int
        depends on ARM && PLAT_SAMSUNG
        default 6 if ARCH_S5P6450
 -      default 4 if SERIAL_SAMSUNG_UARTS_4
 +      default 4 if SERIAL_SAMSUNG_UARTS_4 || CPU_S3C2416
        default 3
        help
          Select the number of available UART ports for the Samsung S3C
@@@ -500,27 -495,46 +500,27 @@@ config SERIAL_SAMSUNG_CONSOL
          your boot loader about how to pass options to the kernel at
          boot time.)
  
 -config SERIAL_S3C2410
 -      tristate "Samsung S3C2410 Serial port support"
 -      depends on SERIAL_SAMSUNG && CPU_S3C2410
 -      default y if CPU_S3C2410
 -      help
 -        Serial port support for the Samsung S3C2410 SoC
 -
 -config SERIAL_S3C2412
 -      tristate "Samsung S3C2412/S3C2413 Serial port support"
 -      depends on SERIAL_SAMSUNG && CPU_S3C2412
 -      default y if CPU_S3C2412
 -      help
 -        Serial port support for the Samsung S3C2412 and S3C2413 SoC
 -
 -config SERIAL_S3C2440
 -      tristate "Samsung S3C2440/S3C2442/S3C2416 Serial port support"
 -      depends on SERIAL_SAMSUNG && (CPU_S3C2440 || CPU_S3C2442 || CPU_S3C2416)
 -      default y if CPU_S3C2440
 -      default y if CPU_S3C2442
 -      select SERIAL_SAMSUNG_UARTS_4 if CPU_S3C2416
 -      help
 -        Serial port support for the Samsung S3C2440, S3C2416 and S3C2442 SoC
 -
 -config SERIAL_S3C6400
 -      tristate "Samsung S3C6400/S3C6410/S5P6440/S5P6450/S5PC100 Serial port support"
 -      depends on SERIAL_SAMSUNG && (CPU_S3C6400 || CPU_S3C6410 || CPU_S5P6440 || CPU_S5P6450 || CPU_S5PC100)
 -      select SERIAL_SAMSUNG_UARTS_4
 -      default y
 -      help
 -        Serial port support for the Samsung S3C6400, S3C6410, S5P6440, S5P6450
 -        and S5PC100 SoCs
 -
 -config SERIAL_S5PV210
 -      tristate "Samsung S5PV210 Serial port support"
 -      depends on SERIAL_SAMSUNG && (CPU_S5PV210 || CPU_EXYNOS4210 || SOC_EXYNOS4212)
 -      select SERIAL_SAMSUNG_UARTS_4 if (CPU_S5PV210 || CPU_EXYNOS4210 || SOC_EXYNOS4212)
 -      default y
 -      help
 -        Serial port support for Samsung's S5P Family of SoC's
 -
 +config SERIAL_SIRFSOC
 +        tristate "SiRF SoC Platform Serial port support"
 +        depends on ARM && ARCH_PRIMA2
 +        select SERIAL_CORE
 +        help
 +          Support for the on-chip UART on the CSR SiRFprimaII series,
 +          providing /dev/ttySiRF0, 1 and 2 (note, some machines may not
 +          provide all of these ports, depending on how the serial port
 +          pins are configured).
 +
 +config SERIAL_SIRFSOC_CONSOLE
 +        bool "Support for console on SiRF SoC serial port"
 +        depends on SERIAL_SIRFSOC=y
 +        select SERIAL_CORE_CONSOLE
 +        help
 +          Even if you say Y here, the currently visible virtual console
 +          (/dev/tty0) will still be used as the system console by default, but
 +          you can alter that using a kernel command line option such as
 +          "console=ttySiRFx". (Try "man bootparam" or see the documentation of
 +          your boot loader about how to pass options to the kernel at
 +          boot time.)
  
  config SERIAL_MAX3100
        tristate "MAX3100 support"
@@@ -794,7 -808,7 +794,7 @@@ config BFIN_UART3_CTSRT
  
  config SERIAL_IMX
        bool "IMX serial port support"
 -      depends on ARM && (ARCH_IMX || ARCH_MXC)
 +      depends on ARCH_MXC
        select SERIAL_CORE
        select RATIONAL
        help
@@@ -1310,7 -1324,7 +1310,7 @@@ config SERIAL_OF_PLATFOR
  
  config SERIAL_OMAP
        tristate "OMAP serial port support"
 -      depends on ARCH_OMAP2 || ARCH_OMAP3 || ARCH_OMAP4
 +      depends on ARCH_OMAP2PLUS
        select SERIAL_CORE
        help
          If you have a machine based on an Texas Instruments OMAP CPU you
@@@ -1561,15 -1575,6 +1561,15 @@@ config SERIAL_PCH_UAR
          ML7213/ML7223/ML7831 is companion chip for Intel Atom E6xx series.
          ML7213/ML7223/ML7831 is completely compatible for Intel EG20T PCH.
  
 +config SERIAL_PCH_UART_CONSOLE
 +      bool "Support for console on Intel EG20T PCH UART/OKI SEMICONDUCTOR ML7213 IOH"
 +      depends on SERIAL_PCH_UART=y
 +      select SERIAL_CORE_CONSOLE
 +      help
 +        Say Y here if you wish to use the PCH UART as the system console
 +        (the system  console is the device which receives all kernel messages and
 +        warnings and which allows logins in single user mode).
 +
  config SERIAL_MSM_SMD
        bool "Enable tty device interface for some SMD ports"
        default n
@@@ -1605,4 -1610,27 +1605,27 @@@ config SERIAL_XILINX_PS_UART_CONSOL
        help
          Enable a Xilinx PS UART port to be the system console.
  
+ config SERIAL_AR933X
+       bool "AR933X serial port support"
+       depends on SOC_AR933X
+       select SERIAL_CORE
+       help
+         If you have an Atheros AR933X SOC based board and want to use the
+         built-in UART of the SoC, say Y to this option.
+ config SERIAL_AR933X_CONSOLE
+       bool "Console on AR933X serial port"
+       depends on SERIAL_AR933X=y
+       select SERIAL_CORE_CONSOLE
+       help
+         Enable a built-in UART port of the AR933X to be the system console.
+ config SERIAL_AR933X_NR_UARTS
+       int "Maximum number of AR933X serial ports"
+       depends on SERIAL_AR933X
+       default "2"
+       help
+         Set this to the number of serial ports you want the driver
+         to support.
  endmenu
index 07e0494c68307b25406fb753c4369456c1d031e3,76811cc58591d98fc830663371c2441e03a5c87a..f5b01f2ce525da8df92d1972529fefb70c98ae23
@@@ -28,7 -28,6 +28,7 @@@ obj-$(CONFIG_SERIAL_8250_BOCA) += 8250_
  obj-$(CONFIG_SERIAL_8250_EXAR_ST16C554) += 8250_exar_st16c554.o
  obj-$(CONFIG_SERIAL_8250_HUB6) += 8250_hub6.o
  obj-$(CONFIG_SERIAL_8250_MCA) += 8250_mca.o
 +obj-$(CONFIG_SERIAL_8250_FSL) += 8250_fsl.o
  obj-$(CONFIG_SERIAL_8250_DW) += 8250_dw.o
  obj-$(CONFIG_SERIAL_AMBA_PL010) += amba-pl010.o
  obj-$(CONFIG_SERIAL_AMBA_PL011) += amba-pl011.o
@@@ -40,6 -39,11 +40,6 @@@ obj-$(CONFIG_SERIAL_BCM63XX) += bcm63xx
  obj-$(CONFIG_SERIAL_BFIN) += bfin_uart.o
  obj-$(CONFIG_SERIAL_BFIN_SPORT) += bfin_sport_uart.o
  obj-$(CONFIG_SERIAL_SAMSUNG) += samsung.o
 -obj-$(CONFIG_SERIAL_S3C2410) += s3c2410.o
 -obj-$(CONFIG_SERIAL_S3C2412) += s3c2412.o
 -obj-$(CONFIG_SERIAL_S3C2440) += s3c2440.o
 -obj-$(CONFIG_SERIAL_S3C6400) += s3c6400.o
 -obj-$(CONFIG_SERIAL_S5PV210) += s5pv210.o
  obj-$(CONFIG_SERIAL_MAX3100) += max3100.o
  obj-$(CONFIG_SERIAL_MAX3107) += max3107.o
  obj-$(CONFIG_SERIAL_MAX3107_AAVA) += max3107-aava.o
@@@ -90,4 -94,4 +90,5 @@@ obj-$(CONFIG_SERIAL_MSM_SMD)  += msm_smd
  obj-$(CONFIG_SERIAL_MXS_AUART) += mxs-auart.o
  obj-$(CONFIG_SERIAL_LANTIQ)   += lantiq.o
  obj-$(CONFIG_SERIAL_XILINX_PS_UART) += xilinx_uartps.o
 +obj-$(CONFIG_SERIAL_SIRFSOC) += sirfsoc_uart.o
+ obj-$(CONFIG_SERIAL_AR933X)   += ar933x_uart.o
diff --combined drivers/usb/host/Kconfig
index 4c0c9734251d20b463b46dbac9515a358303eb0e,8b094b4f6531cb9d1d44560d7e157bb7ba1e0710..91413cac97beec3d17c20aff307c4236f2a5a192
@@@ -194,15 -194,6 +194,15 @@@ config USB_EHCI_S5
         help
         Enable support for the S5P SOC's on-chip EHCI controller.
  
 +config USB_EHCI_MV
 +      bool "EHCI support for Marvell on-chip controller"
 +      depends on USB_EHCI_HCD
 +      select USB_EHCI_ROOT_HUB_TT
 +      ---help---
 +        Enables support for Marvell (including PXA and MMP series) on-chip
 +        USB SPH and OTG controller. SPH is a single port host, and it can
 +        only be EHCI host. OTG is controller that can switch to host mode.
 +
  config USB_W90X900_EHCI
        bool "W90X900(W90P910) EHCI support"
        depends on USB_EHCI_HCD && ARCH_W90X900
@@@ -219,7 -210,7 +219,7 @@@ config USB_CNS3XXX_EHC
  
  config USB_EHCI_ATH79
        bool "EHCI support for AR7XXX/AR9XXX SoCs"
-       depends on USB_EHCI_HCD && (SOC_AR71XX || SOC_AR724X || SOC_AR913X)
+       depends on USB_EHCI_HCD && (SOC_AR71XX || SOC_AR724X || SOC_AR913X || SOC_AR933X)
        select USB_EHCI_ROOT_HUB_TT
        default y
        ---help---
@@@ -380,12 -371,6 +380,12 @@@ config USB_OHCI_S
          Enables support for the on-chip OHCI controller on the SuperH.
          If you use the PCI OHCI controller, this option is not necessary.
  
 +config USB_OHCI_EXYNOS
 +      boolean "OHCI support for Samsung EXYNOS SoC Series"
 +      depends on USB_OHCI_HCD && ARCH_EXYNOS
 +      help
 +       Enable support for the Samsung Exynos SOC's on-chip OHCI controller.
 +
  config USB_CNS3XXX_OHCI
        bool "Cavium CNS3XXX OHCI Module"
        depends on USB_OHCI_HCD && ARCH_CNS3XXX
index 40d886adff536374a3c81808532199f3be8eb524,95d1a71dccad45862c7b6b94d115c8193debe173..4ea63b2cac422cf20d706d6899e85520145388d3
@@@ -89,7 -89,7 +89,7 @@@ static const struct hc_driver ohci_au1x
  
  static int ohci_hcd_au1xxx_drv_probe(struct platform_device *pdev)
  {
-       int ret;
+       int ret, unit;
        struct usb_hcd *hcd;
  
        if (usb_disabled())
                goto err2;
        }
  
-       if (alchemy_usb_control(ALCHEMY_USB_OHCI0, 1)) {
+       unit = (hcd->rsrc_start == AU1300_USB_OHCI1_PHYS_ADDR) ?
+                       ALCHEMY_USB_OHCI1 : ALCHEMY_USB_OHCI0;
+       if (alchemy_usb_control(unit, 1)) {
                printk(KERN_INFO "%s: controller init failed!\n", pdev->name);
                ret = -ENODEV;
                goto err3;
                return ret;
        }
  
-       alchemy_usb_control(ALCHEMY_USB_OHCI0, 0);
+       alchemy_usb_control(unit, 0);
  err3:
        iounmap(hcd->regs);
  err2:
@@@ -148,9 -150,12 +150,12 @@@ err1
  static int ohci_hcd_au1xxx_drv_remove(struct platform_device *pdev)
  {
        struct usb_hcd *hcd = platform_get_drvdata(pdev);
+       int unit;
  
+       unit = (hcd->rsrc_start == AU1300_USB_OHCI1_PHYS_ADDR) ?
+                       ALCHEMY_USB_OHCI1 : ALCHEMY_USB_OHCI0;
        usb_remove_hcd(hcd);
-       alchemy_usb_control(ALCHEMY_USB_OHCI0, 0);
+       alchemy_usb_control(unit, 0);
        iounmap(hcd->regs);
        release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
        usb_put_hcd(hcd);
@@@ -173,9 -178,12 +178,9 @@@ static int ohci_hcd_au1xxx_drv_suspend(
         * mark HW unaccessible, bail out if RH has been resumed. Use
         * the spinlock to properly synchronize with possible pending
         * RH suspend or resume activity.
 -       *
 -       * This is still racy as hcd->state is manipulated outside of
 -       * any locks =P But that will be a different fix.
         */
        spin_lock_irqsave(&ohci->lock, flags);
 -      if (hcd->state != HC_STATE_SUSPENDED) {
 +      if (ohci->rh_state != OHCI_RH_SUSPENDED) {
                rc = -EINVAL;
                goto bail;
        }
index b67305e3ad57a5078b79fec8bca9f060739e08e1,3c35fb2f688fa6fcf1fcf93f616213b65ebb2026..c91ace70c21d5c282f4b8b860f6fabefc2368d47
  /* Xilinx PSS UART */
  #define PORT_XUARTPS  98
  
+ /* Atheros AR933X SoC */
+ #define PORT_AR933X   99
  #ifdef __KERNEL__
  
  #include <linux/compiler.h>
@@@ -351,7 -355,6 +355,7 @@@ struct uart_port 
  #define UPF_CONS_FLOW         ((__force upf_t) (1 << 23))
  #define UPF_SHARE_IRQ         ((__force upf_t) (1 << 24))
  #define UPF_EXAR_EFR          ((__force upf_t) (1 << 25))
 +#define UPF_IIR_ONCE          ((__force upf_t) (1 << 26))
  /* The exact UART type is known and should not be probed.  */
  #define UPF_FIXED_TYPE                ((__force upf_t) (1 << 27))
  #define UPF_BOOT_AUTOCONF     ((__force upf_t) (1 << 28))
@@@ -484,19 -487,10 +488,19 @@@ static inline int uart_tx_stopped(struc
  /*
   * The following are helper functions for the low level drivers.
   */
 +
 +extern void uart_handle_dcd_change(struct uart_port *uport,
 +              unsigned int status);
 +extern void uart_handle_cts_change(struct uart_port *uport,
 +              unsigned int status);
 +
 +extern void uart_insert_char(struct uart_port *port, unsigned int status,
 +               unsigned int overrun, unsigned int ch, unsigned int flag);
 +
 +#ifdef SUPPORT_SYSRQ
  static inline int
  uart_handle_sysrq_char(struct uart_port *port, unsigned int ch)
  {
 -#ifdef SUPPORT_SYSRQ
        if (port->sysrq) {
                if (ch && time_before(jiffies, port->sysrq)) {
                        handle_sysrq(ch);
                }
                port->sysrq = 0;
        }
 -#endif
        return 0;
  }
 -#ifndef SUPPORT_SYSRQ
 -#define uart_handle_sysrq_char(port,ch) uart_handle_sysrq_char(port, 0)
 +#else
 +#define uart_handle_sysrq_char(port,ch) ({ (void)port; 0; })
  #endif
  
  /*
@@@ -531,6 -526,89 +535,6 @@@ static inline int uart_handle_break(str
        return 0;
  }
  
 -/**
 - *    uart_handle_dcd_change - handle a change of carrier detect state
 - *    @uport: uart_port structure for the open port
 - *    @status: new carrier detect status, nonzero if active
 - */
 -static inline void
 -uart_handle_dcd_change(struct uart_port *uport, unsigned int status)
 -{
 -      struct uart_state *state = uport->state;
 -      struct tty_port *port = &state->port;
 -      struct tty_ldisc *ld = tty_ldisc_ref(port->tty);
 -      struct pps_event_time ts;
 -
 -      if (ld && ld->ops->dcd_change)
 -              pps_get_ts(&ts);
 -
 -      uport->icount.dcd++;
 -#ifdef CONFIG_HARD_PPS
 -      if ((uport->flags & UPF_HARDPPS_CD) && status)
 -              hardpps();
 -#endif
 -
 -      if (port->flags & ASYNC_CHECK_CD) {
 -              if (status)
 -                      wake_up_interruptible(&port->open_wait);
 -              else if (port->tty)
 -                      tty_hangup(port->tty);
 -      }
 -
 -      if (ld && ld->ops->dcd_change)
 -              ld->ops->dcd_change(port->tty, status, &ts);
 -      if (ld)
 -              tty_ldisc_deref(ld);
 -}
 -
 -/**
 - *    uart_handle_cts_change - handle a change of clear-to-send state
 - *    @uport: uart_port structure for the open port
 - *    @status: new clear to send status, nonzero if active
 - */
 -static inline void
 -uart_handle_cts_change(struct uart_port *uport, unsigned int status)
 -{
 -      struct tty_port *port = &uport->state->port;
 -      struct tty_struct *tty = port->tty;
 -
 -      uport->icount.cts++;
 -
 -      if (port->flags & ASYNC_CTS_FLOW) {
 -              if (tty->hw_stopped) {
 -                      if (status) {
 -                              tty->hw_stopped = 0;
 -                              uport->ops->start_tx(uport);
 -                              uart_write_wakeup(uport);
 -                      }
 -              } else {
 -                      if (!status) {
 -                              tty->hw_stopped = 1;
 -                              uport->ops->stop_tx(uport);
 -                      }
 -              }
 -      }
 -}
 -
 -#include <linux/tty_flip.h>
 -
 -static inline void
 -uart_insert_char(struct uart_port *port, unsigned int status,
 -               unsigned int overrun, unsigned int ch, unsigned int flag)
 -{
 -      struct tty_struct *tty = port->state->port.tty;
 -
 -      if ((status & port->ignore_status_mask & ~overrun) == 0)
 -              tty_insert_flip_char(tty, ch, flag);
 -
 -      /*
 -       * Overrun is special.  Since it's reported immediately,
 -       * it doesn't affect the current character.
 -       */
 -      if (status & ~port->ignore_status_mask & overrun)
 -              tty_insert_flip_char(tty, 0, TTY_OVERRUN);
 -}
 -
  /*
   *    UART_ENABLE_MS - determine if port should enable modem status irqs
   */
diff --combined sound/soc/au1x/db1200.c
index 1c629393df782b5d866241ec9c2eded166df2bfe,44ad118273644b32f7110132cbd409a182f53c26..30ea513d81d730cefa1027be46726a1c69e8df5f
@@@ -1,5 -1,5 +1,5 @@@
  /*
-  * DB1200 ASoC audio fabric support code.
+  * DB1200/DB1300/DB1550 ASoC audio fabric support code.
   *
   * (c) 2008-2011 Manuel Lauss <manuel.lauss@googlemail.com>
   *
@@@ -28,6 -28,18 +28,18 @@@ static struct platform_device_id db1200
        }, {
                .name           = "db1200-i2s",
                .driver_data    = 1,
+       }, {
+               .name           = "db1300-ac97",
+               .driver_data    = 2,
+       }, {
+               .name           = "db1300-i2s",
+               .driver_data    = 3,
+       }, {
+               .name           = "db1550-ac97",
+               .driver_data    = 4,
+       }, {
+               .name           = "db1550-i2s",
+               .driver_data    = 5,
        },
        {},
  };
@@@ -45,11 -57,31 +57,32 @@@ static struct snd_soc_dai_link db1200_a
  
  static struct snd_soc_card db1200_ac97_machine = {
        .name           = "DB1200_AC97",
 +      .owner          = THIS_MODULE,
        .dai_link       = &db1200_ac97_dai,
        .num_links      = 1,
  };
  
+ static struct snd_soc_dai_link db1300_ac97_dai = {
+       .name           = "AC97",
+       .stream_name    = "AC97 HiFi",
+       .codec_dai_name = "wm9712-hifi",
+       .cpu_dai_name   = "au1xpsc_ac97.1",
+       .platform_name  = "au1xpsc-pcm.1",
+       .codec_name     = "wm9712-codec.1",
+ };
+ static struct snd_soc_card db1300_ac97_machine = {
+       .name           = "DB1300_AC97",
+       .dai_link       = &db1300_ac97_dai,
+       .num_links      = 1,
+ };
+ static struct snd_soc_card db1550_ac97_machine = {
+       .name           = "DB1550_AC97",
+       .dai_link       = &db1200_ac97_dai,
+       .num_links      = 1,
+ };
  /*-------------------------  I2S PART  ---------------------------*/
  
  static int db1200_i2s_startup(struct snd_pcm_substream *substream)
@@@ -95,16 -127,51 +128,52 @@@ static struct snd_soc_dai_link db1200_i
  
  static struct snd_soc_card db1200_i2s_machine = {
        .name           = "DB1200_I2S",
 +      .owner          = THIS_MODULE,
        .dai_link       = &db1200_i2s_dai,
        .num_links      = 1,
  };
  
+ static struct snd_soc_dai_link db1300_i2s_dai = {
+       .name           = "WM8731",
+       .stream_name    = "WM8731 PCM",
+       .codec_dai_name = "wm8731-hifi",
+       .cpu_dai_name   = "au1xpsc_i2s.2",
+       .platform_name  = "au1xpsc-pcm.2",
+       .codec_name     = "wm8731.0-001b",
+       .ops            = &db1200_i2s_wm8731_ops,
+ };
+ static struct snd_soc_card db1300_i2s_machine = {
+       .name           = "DB1300_I2S",
+       .dai_link       = &db1300_i2s_dai,
+       .num_links      = 1,
+ };
+ static struct snd_soc_dai_link db1550_i2s_dai = {
+       .name           = "WM8731",
+       .stream_name    = "WM8731 PCM",
+       .codec_dai_name = "wm8731-hifi",
+       .cpu_dai_name   = "au1xpsc_i2s.3",
+       .platform_name  = "au1xpsc-pcm.3",
+       .codec_name     = "wm8731.0-001b",
+       .ops            = &db1200_i2s_wm8731_ops,
+ };
+ static struct snd_soc_card db1550_i2s_machine = {
+       .name           = "DB1550_I2S",
+       .dai_link       = &db1550_i2s_dai,
+       .num_links      = 1,
+ };
  /*-------------------------  COMMON PART  ---------------------------*/
  
  static struct snd_soc_card *db1200_cards[] __devinitdata = {
        &db1200_ac97_machine,
        &db1200_i2s_machine,
+       &db1300_ac97_machine,
+       &db1300_i2s_machine,
+       &db1550_ac97_machine,
+       &db1550_i2s_machine,
  };
  
  static int __devinit db1200_audio_probe(struct platform_device *pdev)
@@@ -135,8 -202,19 +204,8 @@@ static struct platform_driver db1200_au
        .remove         = __devexit_p(db1200_audio_remove),
  };
  
 -static int __init db1200_audio_load(void)
 -{
 -      return platform_driver_register(&db1200_audio_driver);
 -}
 -
 -static void __exit db1200_audio_unload(void)
 -{
 -      platform_driver_unregister(&db1200_audio_driver);
 -}
 -
 -module_init(db1200_audio_load);
 -module_exit(db1200_audio_unload);
 +module_platform_driver(db1200_audio_driver);
  
  MODULE_LICENSE("GPL");
- MODULE_DESCRIPTION("DB1200 ASoC audio support");
+ MODULE_DESCRIPTION("DB1200/DB1300/DB1550 ASoC audio support");
  MODULE_AUTHOR("Manuel Lauss");