Merge branch 'for-arm-soc-next' of git://git.linaro.org/people/ljones/linux-3.0-ux500...
Olof Johansson [Sun, 23 Sep 2012 05:20:37 +0000 (22:20 -0700)]
* 'for-arm-soc-next' of git://git.linaro.org/people/ljones/linux-3.0-ux500:
  ARM: ux500: Fix SSP register address format
  ARM: ux500: Apply tc3589x's GPIO/IRQ properties to HREF's DT
  ARM: ux500: Remove redundant #gpio-cell properties from Snowball DT
  ARM: ux500: Add all encompassing sound node to the HREF Device Tree
  ARM: ux500: Add nodes for the MSP into the HREF Device Tree
  ARM: ux500: Add all known I2C sub-device nodes to the HREF DT
  ARM: ux500: Stop registering I2C sub-devices for HREF when DT is enabled
  ARM: ux500: Stop registering Audio devices for HREF when DT is enabled
  ARM: ux500: Add all encompassing sound node to the Snowball Device Tree
  ARM: ux500: Add nodes for the MSP into Device Tree
  ARM: ux500: Rename MSP board file to something more meaningful
  ARM: ux500: Remove platform registration of MSP devices
  ARM: ux500: Stop registering the MOP500 Audio driver from platform code
  ARM: ux500: Pass MSP DMA platform data though AUXDATA
  ARM: ux500: Fork MSP platform registration for step-by-step DT enablement
  ARM: ux500: Add AB8500 CODEC node to DB8500 Device Tree
  ARM: ux500: Clean-up MSP platform code
  ARM: ux500: Pass SDI DMA information though AUX_DATA to MMCI
  ARM: ux500: Add UART support to the HREF Device Tree
  ARM: ux500: Add skeleton Device Tree for the HREF reference board
  ...
  + sync to v3.6-rc6

14 files changed:
1  2 
arch/arm/mach-omap2/Kconfig
arch/arm/mach-omap2/clock33xx_data.c
arch/arm/mach-omap2/omap-wakeupgen.c
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
arch/arm/mach-omap2/omap_hwmod_44xx_data.c
arch/arm/mach-omap2/timer.c
arch/arm/mach-ux500/Makefile
arch/arm/mach-ux500/board-mop500.c
arch/arm/plat-omap/sram.c
drivers/mfd/db8500-prcmu.c
drivers/tty/serial/imx.c
drivers/usb/gadget/u_serial.c
drivers/usb/serial/ftdi_sio.c

@@@ -18,7 -18,6 +18,7 @@@ config ARCH_OMAP2PLUS_TYPICA
        select TWL4030_CORE if ARCH_OMAP3 || ARCH_OMAP4
        select TWL4030_POWER if ARCH_OMAP3 || ARCH_OMAP4
        select HIGHMEM
 +      select PINCTRL
        help
          Compile a kernel suitable for booting most boards
  
@@@ -233,10 -232,11 +233,11 @@@ config MACH_OMAP3_PANDOR
        select OMAP_PACKAGE_CBB
        select REGULATOR_FIXED_VOLTAGE if REGULATOR
  
- config MACH_OMAP3_TOUCHBOOK
+ config MACH_TOUCHBOOK
        bool "OMAP3 Touch Book"
        depends on ARCH_OMAP3
        default y
+       select OMAP_PACKAGE_CBB
  
  config MACH_OMAP_3430SDP
        bool "OMAP 3430 SDP board"
@@@ -18,8 -18,8 +18,8 @@@
  #include <linux/list.h>
  #include <linux/clk.h>
  #include <plat/clkdev_omap.h>
 -#include <plat/am33xx.h>
  
 +#include "am33xx.h"
  #include "iomap.h"
  #include "control.h"
  #include "clock.h"
@@@ -1036,13 -1036,13 +1036,13 @@@ static struct omap_clk am33xx_clks[] = 
        CLK(NULL,       "mmu_fck",              &mmu_fck,       CK_AM33XX),
        CLK(NULL,       "smartreflex0_fck",     &smartreflex0_fck,      CK_AM33XX),
        CLK(NULL,       "smartreflex1_fck",     &smartreflex1_fck,      CK_AM33XX),
-       CLK(NULL,       "gpt1_fck",             &timer1_fck,    CK_AM33XX),
-       CLK(NULL,       "gpt2_fck",             &timer2_fck,    CK_AM33XX),
-       CLK(NULL,       "gpt3_fck",             &timer3_fck,    CK_AM33XX),
-       CLK(NULL,       "gpt4_fck",             &timer4_fck,    CK_AM33XX),
-       CLK(NULL,       "gpt5_fck",             &timer5_fck,    CK_AM33XX),
-       CLK(NULL,       "gpt6_fck",             &timer6_fck,    CK_AM33XX),
-       CLK(NULL,       "gpt7_fck",             &timer7_fck,    CK_AM33XX),
+       CLK(NULL,       "timer1_fck",           &timer1_fck,    CK_AM33XX),
+       CLK(NULL,       "timer2_fck",           &timer2_fck,    CK_AM33XX),
+       CLK(NULL,       "timer3_fck",           &timer3_fck,    CK_AM33XX),
+       CLK(NULL,       "timer4_fck",           &timer4_fck,    CK_AM33XX),
+       CLK(NULL,       "timer5_fck",           &timer5_fck,    CK_AM33XX),
+       CLK(NULL,       "timer6_fck",           &timer6_fck,    CK_AM33XX),
+       CLK(NULL,       "timer7_fck",           &timer7_fck,    CK_AM33XX),
        CLK(NULL,       "usbotg_fck",           &usbotg_fck,    CK_AM33XX),
        CLK(NULL,       "ieee5000_fck",         &ieee5000_fck,  CK_AM33XX),
        CLK(NULL,       "wdt1_fck",             &wdt1_fck,      CK_AM33XX),
@@@ -30,7 -30,6 +30,7 @@@
  #include <mach/omap-wakeupgen.h>
  #include <mach/omap-secure.h>
  
 +#include "soc.h"
  #include "omap4-sar-layout.h"
  #include "common.h"
  
@@@ -47,7 -46,7 +47,7 @@@
  static void __iomem *wakeupgen_base;
  static void __iomem *sar_base;
  static DEFINE_SPINLOCK(wakeupgen_lock);
- static unsigned int irq_target_cpu[NR_IRQS];
+ static unsigned int irq_target_cpu[MAX_IRQS];
  static unsigned int irq_banks = MAX_NR_REG_BANKS;
  static unsigned int max_irqs = MAX_IRQS;
  static unsigned int omap_secure_apis;
  #include <linux/slab.h>
  #include <linux/bootmem.h>
  
 -#include "common.h"
 -#include <plat/cpu.h>
 -#include "clockdomain.h"
 -#include "powerdomain.h"
  #include <plat/clock.h>
  #include <plat/omap_hwmod.h>
  #include <plat/prcm.h>
  
 +#include "soc.h"
 +#include "common.h"
 +#include "clockdomain.h"
 +#include "powerdomain.h"
  #include "cm2xxx_3xxx.h"
  #include "cminst44xx.h"
  #include "prm2xxx_3xxx.h"
@@@ -1889,6 -1889,7 +1889,7 @@@ static int _enable(struct omap_hwmod *o
                        _enable_sysc(oh);
                }
        } else {
+               _omap4_disable_module(oh);
                _disable_clocks(oh);
                pr_debug("omap_hwmod: %s: _wait_target_ready: %d\n",
                         oh->name, r);
@@@ -3158,33 -3159,6 +3159,33 @@@ int omap_hwmod_fill_resources(struct om
  }
  
  /**
 + * omap_hwmod_fill_dma_resources - fill struct resource array with dma data
 + * @oh: struct omap_hwmod *
 + * @res: pointer to the array of struct resource to fill
 + *
 + * Fill the struct resource array @res with dma resource data from the
 + * omap_hwmod @oh.  Intended to be called by code that registers
 + * omap_devices.  See also omap_hwmod_count_resources().  Returns the
 + * number of array elements filled.
 + */
 +int omap_hwmod_fill_dma_resources(struct omap_hwmod *oh, struct resource *res)
 +{
 +      int i, sdma_reqs_cnt;
 +      int r = 0;
 +
 +      sdma_reqs_cnt = _count_sdma_reqs(oh);
 +      for (i = 0; i < sdma_reqs_cnt; i++) {
 +              (res + r)->name = (oh->sdma_reqs + i)->name;
 +              (res + r)->start = (oh->sdma_reqs + i)->dma_req;
 +              (res + r)->end = (oh->sdma_reqs + i)->dma_req;
 +              (res + r)->flags = IORESOURCE_DMA;
 +              r++;
 +      }
 +
 +      return r;
 +}
 +
 +/**
   * omap_hwmod_get_resource_byname - fetch IP block integration data by name
   * @oh: struct omap_hwmod * to operate on
   * @type: one of the IORESOURCE_* constants from include/linux/ioport.h
   * XXX these should be marked initdata for multi-OMAP kernels
   */
  #include <linux/power/smartreflex.h>
 +#include <linux/platform_data/gpio-omap.h>
  
  #include <plat/omap_hwmod.h>
 -#include <mach/irqs.h>
 -#include <plat/cpu.h>
  #include <plat/dma.h>
  #include <plat/serial.h>
  #include <plat/l3_3xxx.h>
  #include <plat/l4_3xxx.h>
  #include <plat/i2c.h>
 -#include <plat/gpio.h>
  #include <plat/mmc.h>
  #include <plat/mcbsp.h>
  #include <plat/mcspi.h>
  #include <plat/dmtimer.h>
  
 +#include <mach/am35xx.h>
 +
 +#include "soc.h"
  #include "omap_hwmod_common_data.h"
  #include "prm-regbits-34xx.h"
  #include "cm-regbits-34xx.h"
  #include "wd_timer.h"
 -#include <mach/am35xx.h>
  
  /*
   * OMAP3xxx hardware module integration data
@@@ -51,9 -51,9 +51,9 @@@
  
  /* L3 */
  static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = {
 -      { .irq = INT_34XX_L3_DBG_IRQ },
 -      { .irq = INT_34XX_L3_APP_IRQ },
 -      { .irq = -1 }
 +      { .irq = 9 + OMAP_INTC_START, },
 +      { .irq = 10 + OMAP_INTC_START, },
 +      { .irq = -1 },
  };
  
  static struct omap_hwmod omap3xxx_l3_main_hwmod = {
@@@ -100,9 -100,9 +100,9 @@@ static struct omap_hwmod omap3xxx_mpu_h
  
  /* IVA2 (IVA2) */
  static struct omap_hwmod_rst_info omap3xxx_iva_resets[] = {
-       { .name = "logic", .rst_shift = 0 },
-       { .name = "seq0", .rst_shift = 1 },
-       { .name = "seq1", .rst_shift = 2 },
+       { .name = "logic", .rst_shift = 0, .st_shift = 8 },
+       { .name = "seq0", .rst_shift = 1, .st_shift = 9 },
+       { .name = "seq1", .rst_shift = 2, .st_shift = 10 },
  };
  
  static struct omap_hwmod omap3xxx_iva_hwmod = {
        .rst_lines      = omap3xxx_iva_resets,
        .rst_lines_cnt  = ARRAY_SIZE(omap3xxx_iva_resets),
        .main_clk       = "iva2_ck",
+       .prcm = {
+               .omap2 = {
+                       .module_offs = OMAP3430_IVA2_MOD,
+                       .prcm_reg_id = 1,
+                       .module_bit = OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_SHIFT,
+                       .idlest_reg_id = 1,
+                       .idlest_idle_bit = OMAP3430_ST_IVA2_SHIFT,
+               }
+       },
  };
  
  /* timer class */
@@@ -355,8 -364,8 +364,8 @@@ static struct omap_hwmod omap3xxx_timer
  
  /* timer12 */
  static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = {
 -      { .irq = 95, },
 -      { .irq = -1 }
 +      { .irq = 95 + OMAP_INTC_START, },
 +      { .irq = -1 },
  };
  
  static struct omap_hwmod omap3xxx_timer12_hwmod = {
@@@ -490,8 -499,8 +499,8 @@@ static struct omap_hwmod omap3xxx_uart3
  
  /* UART4 */
  static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
 -      { .irq = INT_36XX_UART4_IRQ, },
 -      { .irq = -1 }
 +      { .irq = 80 + OMAP_INTC_START, },
 +      { .irq = -1 },
  };
  
  static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
@@@ -518,8 -527,8 +527,8 @@@ static struct omap_hwmod omap36xx_uart4
  };
  
  static struct omap_hwmod_irq_info am35xx_uart4_mpu_irqs[] = {
 -      { .irq = INT_35XX_UART4_IRQ, },
 -      { .irq = -1 }
 +      { .irq = 84 + OMAP_INTC_START, },
 +      { .irq = -1 },
  };
  
  static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = {
@@@ -674,8 -683,8 +683,8 @@@ static struct omap_hwmod_class omap3xxx
  };
  
  static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = {
 -      { .irq = 25 },
 -      { .irq = -1 }
 +      { .irq = 25 + OMAP_INTC_START, },
 +      { .irq = -1 },
  };
  
  /* dss_dsi1 */
@@@ -804,8 -813,8 +813,8 @@@ static struct omap_i2c_dev_attr i2c3_de
  };
  
  static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
 -      { .irq = INT_34XX_I2C3_IRQ, },
 -      { .irq = -1 }
 +      { .irq = 61 + OMAP_INTC_START, },
 +      { .irq = -1 },
  };
  
  static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
@@@ -963,8 -972,8 +972,8 @@@ static struct omap_hwmod omap3xxx_gpio4
  
  /* gpio5 */
  static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
 -      { .irq = 33 }, /* INT_34XX_GPIO_BANK5 */
 -      { .irq = -1 }
 +      { .irq = 33 + OMAP_INTC_START, }, /* INT_34XX_GPIO_BANK5 */
 +      { .irq = -1 },
  };
  
  static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
@@@ -993,8 -1002,8 +1002,8 @@@ static struct omap_hwmod omap3xxx_gpio5
  
  /* gpio6 */
  static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
 -      { .irq = 34 }, /* INT_34XX_GPIO_BANK6 */
 -      { .irq = -1 }
 +      { .irq = 34 + OMAP_INTC_START, }, /* INT_34XX_GPIO_BANK6 */
 +      { .irq = -1 },
  };
  
  static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
@@@ -1098,10 -1107,10 +1107,10 @@@ static struct omap_hwmod_opt_clk mcbsp2
  
  /* mcbsp1 */
  static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = {
 -      { .name = "common", .irq = 16 },
 -      { .name = "tx", .irq = 59 },
 -      { .name = "rx", .irq = 60 },
 -      { .irq = -1 }
 +      { .name = "common", .irq = 16 + OMAP_INTC_START, },
 +      { .name = "tx", .irq = 59 + OMAP_INTC_START, },
 +      { .name = "rx", .irq = 60 + OMAP_INTC_START, },
 +      { .irq = -1 },
  };
  
  static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
  
  /* mcbsp2 */
  static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = {
 -      { .name = "common", .irq = 17 },
 -      { .name = "tx", .irq = 62 },
 -      { .name = "rx", .irq = 63 },
 -      { .irq = -1 }
 +      { .name = "common", .irq = 17 + OMAP_INTC_START, },
 +      { .name = "tx", .irq = 62 + OMAP_INTC_START, },
 +      { .name = "rx", .irq = 63 + OMAP_INTC_START, },
 +      { .irq = -1 },
  };
  
  static struct omap_mcbsp_dev_attr omap34xx_mcbsp2_dev_attr = {
@@@ -1157,10 -1166,10 +1166,10 @@@ static struct omap_hwmod omap3xxx_mcbsp
  
  /* mcbsp3 */
  static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = {
 -      { .name = "common", .irq = 22 },
 -      { .name = "tx", .irq = 89 },
 -      { .name = "rx", .irq = 90 },
 -      { .irq = -1 }
 +      { .name = "common", .irq = 22 + OMAP_INTC_START, },
 +      { .name = "tx", .irq = 89 + OMAP_INTC_START, },
 +      { .name = "rx", .irq = 90 + OMAP_INTC_START, },
 +      { .irq = -1 },
  };
  
  static struct omap_mcbsp_dev_attr omap34xx_mcbsp3_dev_attr = {
@@@ -1189,10 -1198,10 +1198,10 @@@ static struct omap_hwmod omap3xxx_mcbsp
  
  /* mcbsp4 */
  static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = {
 -      { .name = "common", .irq = 23 },
 -      { .name = "tx", .irq = 54 },
 -      { .name = "rx", .irq = 55 },
 -      { .irq = -1 }
 +      { .name = "common", .irq = 23 + OMAP_INTC_START, },
 +      { .name = "tx", .irq = 54 + OMAP_INTC_START, },
 +      { .name = "rx", .irq = 55 + OMAP_INTC_START, },
 +      { .irq = -1 },
  };
  
  static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = {
@@@ -1222,10 -1231,10 +1231,10 @@@ static struct omap_hwmod omap3xxx_mcbsp
  
  /* mcbsp5 */
  static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = {
 -      { .name = "common", .irq = 27 },
 -      { .name = "tx", .irq = 81 },
 -      { .name = "rx", .irq = 82 },
 -      { .irq = -1 }
 +      { .name = "common", .irq = 27 + OMAP_INTC_START, },
 +      { .name = "tx", .irq = 81 + OMAP_INTC_START, },
 +      { .name = "rx", .irq = 82 + OMAP_INTC_START, },
 +      { .irq = -1 },
  };
  
  static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = {
@@@ -1267,8 -1276,8 +1276,8 @@@ static struct omap_hwmod_class omap3xxx
  
  /* mcbsp2_sidetone */
  static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = {
 -      { .name = "irq", .irq = 4 },
 -      { .irq = -1 }
 +      { .name = "irq", .irq = 4 + OMAP_INTC_START, },
 +      { .irq = -1 },
  };
  
  static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
  
  /* mcbsp3_sidetone */
  static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = {
 -      { .name = "irq", .irq = 5 },
 -      { .irq = -1 }
 +      { .name = "irq", .irq = 5 + OMAP_INTC_START, },
 +      { .irq = -1 },
  };
  
  static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
@@@ -1352,8 -1361,8 +1361,8 @@@ static struct omap_smartreflex_dev_att
  };
  
  static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = {
 -      { .irq = 18 },
 -      { .irq = -1 }
 +      { .irq = 18 + OMAP_INTC_START, },
 +      { .irq = -1 },
  };
  
  static struct omap_hwmod omap34xx_sr1_hwmod = {
@@@ -1397,8 -1406,8 +1406,8 @@@ static struct omap_smartreflex_dev_att
  };
  
  static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = {
 -      { .irq = 19 },
 -      { .irq = -1 }
 +      { .irq = 19 + OMAP_INTC_START, },
 +      { .irq = -1 },
  };
  
  static struct omap_hwmod omap34xx_sr2_hwmod = {
@@@ -1458,8 -1467,8 +1467,8 @@@ static struct omap_hwmod_class omap3xxx
  };
  
  static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
 -      { .irq = 26 },
 -      { .irq = -1 }
 +      { .irq = 26 + OMAP_INTC_START, },
 +      { .irq = -1 },
  };
  
  static struct omap_hwmod omap3xxx_mailbox_hwmod = {
@@@ -1549,8 -1558,8 +1558,8 @@@ static struct omap_hwmod omap34xx_mcspi
  
  /* mcspi3 */
  static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = {
 -      { .name = "irq", .irq = 91 }, /* 91 */
 -      { .irq = -1 }
 +      { .name = "irq", .irq = 91 + OMAP_INTC_START, }, /* 91 */
 +      { .irq = -1 },
  };
  
  static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
@@@ -1585,8 -1594,8 +1594,8 @@@ static struct omap_hwmod omap34xx_mcspi
  
  /* mcspi4 */
  static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
 -      { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */
 -      { .irq = -1 }
 +      { .name = "irq", .irq = 48 + OMAP_INTC_START, },
 +      { .irq = -1 },
  };
  
  static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
@@@ -1638,9 -1647,9 +1647,9 @@@ static struct omap_hwmod_class usbotg_c
  /* usb_otg_hs */
  static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
  
 -      { .name = "mc", .irq = 92 },
 -      { .name = "dma", .irq = 93 },
 -      { .irq = -1 }
 +      { .name = "mc", .irq = 92 + OMAP_INTC_START, },
 +      { .name = "dma", .irq = 93 + OMAP_INTC_START, },
 +      { .irq = -1 },
  };
  
  static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
  
  /* usb_otg_hs */
  static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = {
 -      { .name = "mc", .irq = 71 },
 -      { .irq = -1 }
 +      { .name = "mc", .irq = 71 + OMAP_INTC_START, },
 +      { .irq = -1 },
  };
  
  static struct omap_hwmod_class am35xx_usbotg_class = {
@@@ -1706,8 -1715,8 +1715,8 @@@ static struct omap_hwmod_class omap34xx
  /* MMC/SD/SDIO1 */
  
  static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = {
 -      { .irq = 83, },
 -      { .irq = -1 }
 +      { .irq = 83 + OMAP_INTC_START, },
 +      { .irq = -1 },
  };
  
  static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = {
@@@ -1773,8 -1782,8 +1782,8 @@@ static struct omap_hwmod omap3xxx_es3pl
  /* MMC/SD/SDIO2 */
  
  static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = {
 -      { .irq = INT_24XX_MMC2_IRQ, },
 -      { .irq = -1 }
 +      { .irq = 86 + OMAP_INTC_START, },
 +      { .irq = -1 },
  };
  
  static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = {
@@@ -1834,8 -1843,8 +1843,8 @@@ static struct omap_hwmod omap3xxx_es3pl
  /* MMC/SD/SDIO3 */
  
  static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = {
 -      { .irq = 94, },
 -      { .irq = -1 }
 +      { .irq = 94 + OMAP_INTC_START, },
 +      { .irq = -1 },
  };
  
  static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = {
@@@ -1893,9 -1902,9 +1902,9 @@@ static struct omap_hwmod_opt_clk omap3x
  };
  
  static struct omap_hwmod_irq_info omap3xxx_usb_host_hs_irqs[] = {
 -      { .name = "ohci-irq", .irq = 76 },
 -      { .name = "ehci-irq", .irq = 77 },
 -      { .irq = -1 }
 +      { .name = "ohci-irq", .irq = 76 + OMAP_INTC_START, },
 +      { .name = "ehci-irq", .irq = 77 + OMAP_INTC_START, },
 +      { .irq = -1 },
  };
  
  static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = {
@@@ -1987,8 -1996,8 +1996,8 @@@ static struct omap_hwmod_class omap3xxx
  };
  
  static struct omap_hwmod_irq_info omap3xxx_usb_tll_hs_irqs[] = {
 -      { .name = "tll-irq", .irq = 78 },
 -      { .irq = -1 }
 +      { .name = "tll-irq", .irq = 78 + OMAP_INTC_START, },
 +      { .irq = -1 },
  };
  
  static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = {
@@@ -3214,11 -3223,11 +3223,11 @@@ static struct omap_hwmod_ocp_if am35xx_
  };
  
  static struct omap_hwmod_irq_info am35xx_emac_mpu_irqs[] = {
 -      { .name = "rxthresh",   .irq = INT_35XX_EMAC_C0_RXTHRESH_IRQ },
 -      { .name = "rx_pulse",   .irq = INT_35XX_EMAC_C0_RX_PULSE_IRQ },
 -      { .name = "tx_pulse",   .irq = INT_35XX_EMAC_C0_TX_PULSE_IRQ },
 -      { .name = "misc_pulse", .irq = INT_35XX_EMAC_C0_MISC_PULSE_IRQ },
 -      { .irq = -1 }
 +      { .name = "rxthresh",   .irq = 67 + OMAP_INTC_START, },
 +      { .name = "rx_pulse",   .irq = 68 + OMAP_INTC_START, },
 +      { .name = "tx_pulse",   .irq = 69 + OMAP_INTC_START },
 +      { .name = "misc_pulse", .irq = 70 + OMAP_INTC_START },
 +      { .irq = -1 },
  };
  
  static struct omap_hwmod_class am35xx_emac_class = {
   */
  
  #include <linux/io.h>
 +#include <linux/platform_data/gpio-omap.h>
  #include <linux/power/smartreflex.h>
  
  #include <plat/omap_hwmod.h>
 -#include <plat/cpu.h>
  #include <plat/i2c.h>
 -#include <plat/gpio.h>
  #include <plat/dma.h>
  #include <plat/mcspi.h>
  #include <plat/mcbsp.h>
@@@ -4209,7 -4210,7 +4209,7 @@@ static struct omap_hwmod_ocp_if omap44x
  };
  
  /* dsp -> sl2if */
- static struct omap_hwmod_ocp_if omap44xx_dsp__sl2if = {
+ static struct omap_hwmod_ocp_if __maybe_unused omap44xx_dsp__sl2if = {
        .master         = &omap44xx_dsp_hwmod,
        .slave          = &omap44xx_sl2if_hwmod,
        .clk            = "dpll_iva_m5x2_ck",
@@@ -4827,7 -4828,7 +4827,7 @@@ static struct omap_hwmod_ocp_if omap44x
  };
  
  /* iva -> sl2if */
- static struct omap_hwmod_ocp_if omap44xx_iva__sl2if = {
+ static struct omap_hwmod_ocp_if __maybe_unused omap44xx_iva__sl2if = {
        .master         = &omap44xx_iva_hwmod,
        .slave          = &omap44xx_sl2if_hwmod,
        .clk            = "dpll_iva_m5x2_ck",
@@@ -5361,7 -5362,7 +5361,7 @@@ static struct omap_hwmod_ocp_if omap44x
  };
  
  /* l3_main_2 -> sl2if */
- static struct omap_hwmod_ocp_if omap44xx_l3_main_2__sl2if = {
+ static struct omap_hwmod_ocp_if __maybe_unused omap44xx_l3_main_2__sl2if = {
        .master         = &omap44xx_l3_main_2_hwmod,
        .slave          = &omap44xx_sl2if_hwmod,
        .clk            = "l3_div_ck",
@@@ -6031,7 -6032,7 +6031,7 @@@ static struct omap_hwmod_ocp_if *omap44
        &omap44xx_l4_abe__dmic,
        &omap44xx_l4_abe__dmic_dma,
        &omap44xx_dsp__iva,
-       &omap44xx_dsp__sl2if,
+       /* &omap44xx_dsp__sl2if, */
        &omap44xx_l4_cfg__dsp,
        &omap44xx_l3_main_2__dss,
        &omap44xx_l4_per__dss,
        &omap44xx_l4_per__i2c4,
        &omap44xx_l3_main_2__ipu,
        &omap44xx_l3_main_2__iss,
-       &omap44xx_iva__sl2if,
+       /* &omap44xx_iva__sl2if, */
        &omap44xx_l3_main_2__iva,
        &omap44xx_l4_wkup__kbd,
        &omap44xx_l4_cfg__mailbox,
        &omap44xx_l4_cfg__cm_core,
        &omap44xx_l4_wkup__prm,
        &omap44xx_l4_wkup__scrm,
-       &omap44xx_l3_main_2__sl2if,
+       /* &omap44xx_l3_main_2__sl2if, */
        &omap44xx_l4_abe__slimbus1,
        &omap44xx_l4_abe__slimbus1_dma,
        &omap44xx_l4_per__slimbus2,
  #include <linux/clocksource.h>
  #include <linux/clockchips.h>
  #include <linux/slab.h>
 +#include <linux/of.h>
  
  #include <asm/mach/time.h>
 -#include <plat/dmtimer.h>
  #include <asm/smp_twd.h>
  #include <asm/sched_clock.h>
 -#include "common.h"
 +
  #include <plat/omap_hwmod.h>
  #include <plat/omap_device.h>
 +#include <plat/dmtimer.h>
  #include <plat/omap-pm.h>
  
 +#include "soc.h"
 +#include "common.h"
  #include "powerdomain.h"
  
  /* Parent clocks, eventually these will come from the clock framework */
@@@ -263,6 -260,7 +263,7 @@@ static u32 notrace dmtimer_read_sched_c
        return 0;
  }
  
+ #ifdef CONFIG_OMAP_32K_TIMER
  /* Setup free-running counter for clocksource */
  static int __init omap2_sync32k_clocksource_init(void)
  {
  
        return ret;
  }
+ #else
+ static inline int omap2_sync32k_clocksource_init(void)
+ {
+       return -ENODEV;
+ }
+ #endif
  
  static void __init omap2_gptimer_clocksource_init(int gptimer_id,
                                                const char *fck_source)
@@@ -376,7 -380,8 +383,7 @@@ OMAP_SYS_TIMER(3_am33xx
  #ifdef CONFIG_ARCH_OMAP4
  #ifdef CONFIG_LOCAL_TIMERS
  static DEFINE_TWD_LOCAL_TIMER(twd_local_timer,
 -                            OMAP44XX_LOCAL_TWD_BASE,
 -                            OMAP44XX_IRQ_LOCALTIMER);
 +                            OMAP44XX_LOCAL_TWD_BASE, 29 + OMAP_INTC_START);
  #endif
  
  static void __init omap4_timer_init(void)
        if (omap_rev() != OMAP4430_REV_ES1_0) {
                int err;
  
 +              if (of_have_populated_dt()) {
 +                      twd_local_timer_of_register();
 +                      return;
 +              }
 +
                err = twd_local_timer_register(&twd_local_timer);
                if (err)
                        pr_err("twd_local_timer_register failed %d\n", err);
@@@ -2,7 -2,7 +2,7 @@@
  # Makefile for the linux kernel, U8500 machine.
  #
  
 -obj-y                         := clock.o cpu.o devices.o devices-common.o \
 +obj-y                         := cpu.o devices.o devices-common.o \
                                   id.o usb.o timer.o
  obj-$(CONFIG_CPU_IDLE)          += cpuidle.o
  obj-$(CONFIG_CACHE_L2X0)      += cache-l2x0.o
@@@ -12,6 -12,6 +12,6 @@@ obj-$(CONFIG_MACH_MOP500)     += board-mop5
                                board-mop500-uib.o board-mop500-stuib.o \
                                board-mop500-u8500uib.o \
                                board-mop500-pins.o \
-                               board-mop500-msp.o
+                               board-mop500-audio.o
  obj-$(CONFIG_SMP)             += platsmp.o headsmp.o
  obj-$(CONFIG_HOTPLUG_CPU)     += hotplug.o
@@@ -54,7 -54,6 +54,6 @@@
  #include "devices-db8500.h"
  #include "board-mop500.h"
  #include "board-mop500-regulators.h"
- #include "board-mop500-msp.h"
  
  static struct gpio_led snowball_led_array[] = {
        {
@@@ -524,12 -523,33 +523,12 @@@ static struct stedma40_chan_cfg uart2_d
  };
  #endif
  
 -#define PRCC_K_SOFTRST_SET      0x18
 -#define PRCC_K_SOFTRST_CLEAR    0x1C
 -static void ux500_uart0_reset(void)
 -{
 -      void __iomem *prcc_rst_set, *prcc_rst_clr;
 -
 -      prcc_rst_set = (void __iomem *)IO_ADDRESS(U8500_CLKRST1_BASE +
 -                      PRCC_K_SOFTRST_SET);
 -      prcc_rst_clr = (void __iomem *)IO_ADDRESS(U8500_CLKRST1_BASE +
 -                      PRCC_K_SOFTRST_CLEAR);
 -
 -      /* Activate soft reset PRCC_K_SOFTRST_CLEAR */
 -      writel((readl(prcc_rst_clr) | 0x1), prcc_rst_clr);
 -      udelay(1);
 -
 -      /* Release soft reset PRCC_K_SOFTRST_SET */
 -      writel((readl(prcc_rst_set) | 0x1), prcc_rst_set);
 -      udelay(1);
 -}
 -
  static struct amba_pl011_data uart0_plat = {
  #ifdef CONFIG_STE_DMA40
        .dma_filter = stedma40_filter,
        .dma_rx_param = &uart0_dma_cfg_rx,
        .dma_tx_param = &uart0_dma_cfg_tx,
  #endif
 -      .reset = ux500_uart0_reset,
  };
  
  static struct amba_pl011_data uart1_plat = {
@@@ -587,7 -607,7 +586,7 @@@ static void __init mop500_init_machine(
        mop500_i2c_init(parent);
        mop500_sdi_init(parent);
        mop500_spi_init(parent);
-       mop500_msp_init(parent);
+       mop500_audio_init(parent);
        mop500_uart_init(parent);
  
        u8500_cryp1_hash1_init(parent);
@@@ -621,7 -641,7 +620,7 @@@ static void __init snowball_init_machin
        mop500_i2c_init(parent);
        snowball_sdi_init(parent);
        mop500_spi_init(parent);
-       mop500_msp_init(parent);
+       mop500_audio_init(parent);
        mop500_uart_init(parent);
  
        /* This board has full regulator constraints */
@@@ -653,7 -673,7 +652,7 @@@ static void __init hrefv60_init_machine
        mop500_i2c_init(parent);
        hrefv60_sdi_init(parent);
        mop500_spi_init(parent);
-       mop500_msp_init(parent);
+       mop500_audio_init(parent);
        mop500_uart_init(parent);
  
        i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
@@@ -705,12 -725,9 +704,9 @@@ MACHINE_EN
  
  #ifdef CONFIG_MACH_UX500_DT
  
- static struct platform_device *snowball_of_platform_devs[] __initdata = {
-       &snowball_led_dev,
-       &snowball_key_dev,
- };
  struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
+       /* Requires call-back bindings. */
+       OF_DEV_AUXDATA("arm,cortex-a9-pmu", 0, "arm-pmu", &db8500_pmu_platdata),
        /* Requires DMA and call-back bindings. */
        OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", &uart0_plat),
        OF_DEV_AUXDATA("arm,pl011", 0x80121000, "uart1", &uart1_plat),
        /* Requires DMA bindings. */
        OF_DEV_AUXDATA("arm,pl022", 0x80002000, "ssp0",  &ssp0_plat),
        OF_DEV_AUXDATA("arm,pl18x", 0x80126000, "sdi0",  &mop500_sdi0_data),
+       OF_DEV_AUXDATA("arm,pl18x", 0x80118000, "sdi1",  &mop500_sdi1_data),
+       OF_DEV_AUXDATA("arm,pl18x", 0x80005000, "sdi2",  &mop500_sdi2_data),
        OF_DEV_AUXDATA("arm,pl18x", 0x80114000, "sdi4",  &mop500_sdi4_data),
        /* Requires clock name bindings. */
        OF_DEV_AUXDATA("st,nomadik-gpio", 0x8012e000, "gpio.0", NULL),
        OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL),
        /* Requires device name bindings. */
        OF_DEV_AUXDATA("stericsson,nmk_pinctrl", 0, "pinctrl-db8500", NULL),
+       /* Requires clock name and DMA bindings. */
+       OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000,
+               "ux500-msp-i2s.0", &msp0_platform_data),
+       OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80124000,
+               "ux500-msp-i2s.1", &msp1_platform_data),
+       OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80117000,
+               "ux500-msp-i2s.2", &msp2_platform_data),
+       OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80125000,
+               "ux500-msp-i2s.3", &msp3_platform_data),
        {},
  };
  
@@@ -776,7 -804,7 +783,7 @@@ static void __init u8500_init_machine(v
                                ARRAY_SIZE(mop500_platform_devs));
  
                mop500_sdi_init(parent);
-               mop500_msp_init(parent);
+               mop500_audio_init(parent);
                i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
                i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
                i2c_register_board_info(2, mop500_i2c2_devices,
                mop500_uib_init();
  
        } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) {
-               mop500_msp_init(parent);
+               mop500_of_audio_init(parent);
        } else if (of_machine_is_compatible("st-ericsson,hrefv60+")) {
                /*
                 * The HREFv60 board removed a GPIO expander and routed
                platform_add_devices(mop500_platform_devs,
                                ARRAY_SIZE(mop500_platform_devs));
  
-               hrefv60_sdi_init(parent);
-               mop500_msp_init(parent);
-               i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
-               i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES;
-               i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
-               i2c_register_board_info(2, mop500_i2c2_devices,
-                                       ARRAY_SIZE(mop500_i2c2_devices));
                mop500_uib_init();
        }
  
@@@ -26,6 -26,7 +26,6 @@@
  #include <asm/mach/map.h>
  
  #include <plat/sram.h>
 -#include <plat/board.h>
  #include <plat/cpu.h>
  
  #include "sram.h"
@@@ -67,6 -68,7 +67,7 @@@
  
  static unsigned long omap_sram_start;
  static void __iomem *omap_sram_base;
+ static unsigned long omap_sram_skip;
  static unsigned long omap_sram_size;
  static void __iomem *omap_sram_ceil;
  
@@@ -105,6 -107,7 +106,7 @@@ static int is_sram_locked(void
   */
  static void __init omap_detect_sram(void)
  {
+       omap_sram_skip = SRAM_BOOTLOADER_SZ;
        if (cpu_class_is_omap2()) {
                if (is_sram_locked()) {
                        if (cpu_is_omap34xx()) {
                                if ((omap_type() == OMAP2_DEVICE_TYPE_EMU) ||
                                    (omap_type() == OMAP2_DEVICE_TYPE_SEC)) {
                                        omap_sram_size = 0x7000; /* 28K */
+                                       omap_sram_skip += SZ_16K;
                                } else {
                                        omap_sram_size = 0x8000; /* 32K */
                                }
@@@ -174,8 -178,10 +177,10 @@@ static void __init omap_map_sram(void
                return;
  
  #ifdef CONFIG_OMAP4_ERRATA_I688
+       if (cpu_is_omap44xx()) {
                omap_sram_start += PAGE_SIZE;
                omap_sram_size -= SZ_16K;
+       }
  #endif
        if (cpu_is_omap34xx()) {
                /*
         * Looks like we need to preserve some bootloader code at the
         * beginning of SRAM for jumping to flash for reboot to work...
         */
-       memset_io(omap_sram_base + SRAM_BOOTLOADER_SZ, 0,
-                 omap_sram_size - SRAM_BOOTLOADER_SZ);
+       memset_io(omap_sram_base + omap_sram_skip, 0,
+                 omap_sram_size - omap_sram_skip);
  }
  
  /*
@@@ -217,7 -223,7 +222,7 @@@ void *omap_sram_push_address(unsigned l
  {
        unsigned long available, new_ceil = (unsigned long)omap_sram_ceil;
  
-       available = omap_sram_ceil - (omap_sram_base + SRAM_BOOTLOADER_SZ);
+       available = omap_sram_ceil - (omap_sram_base + omap_sram_skip);
  
        if (size > available) {
                pr_err("Not enough space in SRAM\n");
@@@ -418,9 -418,6 +418,9 @@@ static struct 
  
  static atomic_t ac_wake_req_state = ATOMIC_INIT(0);
  
 +/* Functions definition */
 +static void compute_armss_rate(void);
 +
  /* Spinlocks */
  static DEFINE_SPINLOCK(prcmu_lock);
  static DEFINE_SPINLOCK(clkout_lock);
@@@ -520,7 -517,6 +520,7 @@@ static struct dsiescclk dsiescclk[3] = 
        }
  };
  
 +
  /*
  * Used by MCDE to setup all necessary PRCMU registers
  */
@@@ -1017,7 -1013,6 +1017,7 @@@ int db8500_prcmu_set_arm_opp(u8 opp
                (mb1_transfer.ack.arm_opp != opp))
                r = -EIO;
  
 +      compute_armss_rate();
        mutex_unlock(&mb1_transfer.lock);
  
        return r;
@@@ -1617,7 -1612,6 +1617,7 @@@ static unsigned long pll_rate(void __io
        if ((branch == PLL_FIX) || ((branch == PLL_DIV) &&
                (val & PRCM_PLL_FREQ_DIV2EN) &&
                ((reg == PRCM_PLLSOC0_FREQ) ||
 +               (reg == PRCM_PLLARM_FREQ) ||
                 (reg == PRCM_PLLDDR_FREQ))))
                div *= 2;
  
@@@ -1667,39 -1661,6 +1667,39 @@@ static unsigned long clock_rate(u8 cloc
        else
                return 0;
  }
 +static unsigned long latest_armss_rate;
 +static unsigned long armss_rate(void)
 +{
 +      return latest_armss_rate;
 +}
 +
 +static void compute_armss_rate(void)
 +{
 +      u32 r;
 +      unsigned long rate;
 +
 +      r = readl(PRCM_ARM_CHGCLKREQ);
 +
 +      if (r & PRCM_ARM_CHGCLKREQ_PRCM_ARM_CHGCLKREQ) {
 +              /* External ARMCLKFIX clock */
 +
 +              rate = pll_rate(PRCM_PLLDDR_FREQ, ROOT_CLOCK_RATE, PLL_FIX);
 +
 +              /* Check PRCM_ARM_CHGCLKREQ divider */
 +              if (!(r & PRCM_ARM_CHGCLKREQ_PRCM_ARM_DIVSEL))
 +                      rate /= 2;
 +
 +              /* Check PRCM_ARMCLKFIX_MGT divider */
 +              r = readl(PRCM_ARMCLKFIX_MGT);
 +              r &= PRCM_CLK_MGT_CLKPLLDIV_MASK;
 +              rate /= r;
 +
 +      } else {/* ARM PLL */
 +              rate = pll_rate(PRCM_PLLARM_FREQ, ROOT_CLOCK_RATE, PLL_DIV);
 +      }
 +
 +      latest_armss_rate = rate;
 +}
  
  static unsigned long dsiclk_rate(u8 n)
  {
@@@ -1746,8 -1707,6 +1746,8 @@@ unsigned long prcmu_clock_rate(u8 clock
                return pll_rate(PRCM_PLLSOC0_FREQ, ROOT_CLOCK_RATE, PLL_RAW);
        else if (clock == PRCMU_PLLSOC1)
                return pll_rate(PRCM_PLLSOC1_FREQ, ROOT_CLOCK_RATE, PLL_RAW);
 +      else if (clock == PRCMU_ARMSS)
 +              return armss_rate();
        else if (clock == PRCMU_PLLDDR)
                return pll_rate(PRCM_PLLDDR_FREQ, ROOT_CLOCK_RATE, PLL_RAW);
        else if (clock == PRCMU_PLLDSI)
@@@ -2734,7 -2693,6 +2734,7 @@@ void __init db8500_prcmu_early_init(voi
                                         handle_simple_irq);
                set_irq_flags(irq, IRQF_VALID);
        }
 +      compute_armss_rate();
  }
  
  static void __init init_prcm_registers(void)
@@@ -3052,7 -3010,7 +3052,7 @@@ static int __devinit db8500_prcmu_probe
                prcmu_config_esram0_deep_sleep(ESRAM0_DEEP_SLEEP_STATE_RET);
  
        err = mfd_add_devices(&pdev->dev, 0, db8500_prcmu_devs,
-                       ARRAY_SIZE(db8500_prcmu_devs), NULL, 0);
+                             ARRAY_SIZE(db8500_prcmu_devs), NULL, 0, NULL);
        if (err) {
                pr_err("prcmu: Failed to add subdevices\n");
                return err;
diff --combined drivers/tty/serial/imx.c
  #define  UCR4_OREN     (1<<1)  /* Receiver overrun interrupt enable */
  #define  UCR4_DREN     (1<<0)  /* Recv data ready interrupt enable */
  #define  UFCR_RXTL_SHF   0       /* Receiver trigger level shift */
+ #define  UFCR_DCEDTE   (1<<6)  /* DCE/DTE mode select */
  #define  UFCR_RFDIV      (7<<7)  /* Reference freq divider mask */
  #define  UFCR_RFDIV_REG(x)    (((x) < 7 ? 6 - (x) : 6) << 7)
  #define  UFCR_TXTL_SHF   10      /* Transmitter trigger level shift */
@@@ -206,7 -207,7 +207,7 @@@ struct imx_port 
        unsigned short          trcv_delay; /* transceiver delay */
        struct clk              *clk_ipg;
        struct clk              *clk_per;
 -      struct imx_uart_data    *devdata;
 +      const struct imx_uart_data *devdata;
  };
  
  struct imx_port_ucrs {
@@@ -667,22 -668,11 +668,11 @@@ static void imx_break_ctl(struct uart_p
  static int imx_setup_ufcr(struct imx_port *sport, unsigned int mode)
  {
        unsigned int val;
-       unsigned int ufcr_rfdiv;
-       /* set receiver / transmitter trigger level.
-        * RFDIV is set such way to satisfy requested uartclk value
-        */
-       val = TXTL << 10 | RXTL;
-       ufcr_rfdiv = (clk_get_rate(sport->clk_per) + sport->port.uartclk / 2)
-                       / sport->port.uartclk;
-       if(!ufcr_rfdiv)
-               ufcr_rfdiv = 1;
-       val |= UFCR_RFDIV_REG(ufcr_rfdiv);
  
+       /* set receiver / transmitter trigger level */
+       val = readl(sport->port.membase + UFCR) & (UFCR_RFDIV | UFCR_DCEDTE);
+       val |= TXTL << UFCR_TXTL_SHF | RXTL;
        writel(val, sport->port.membase + UFCR);
        return 0;
  }
  
@@@ -754,6 -744,7 +744,7 @@@ static int imx_startup(struct uart_por
                }
        }
  
+       spin_lock_irqsave(&sport->port.lock, flags);
        /*
         * Finally, clear and enable interrupts
         */
        /*
         * Enable modem status interrupts
         */
-       spin_lock_irqsave(&sport->port.lock,flags);
        imx_enable_ms(&sport->port);
        spin_unlock_irqrestore(&sport->port.lock,flags);
  
@@@ -837,10 -827,13 +827,13 @@@ static void imx_shutdown(struct uart_po
  {
        struct imx_port *sport = (struct imx_port *)port;
        unsigned long temp;
+       unsigned long flags;
  
+       spin_lock_irqsave(&sport->port.lock, flags);
        temp = readl(sport->port.membase + UCR2);
        temp &= ~(UCR2_TXEN);
        writel(temp, sport->port.membase + UCR2);
+       spin_unlock_irqrestore(&sport->port.lock, flags);
  
        if (USE_IRDA(sport)) {
                struct imxuart_platform_data *pdata;
         * Disable all interrupts, port and break condition.
         */
  
+       spin_lock_irqsave(&sport->port.lock, flags);
        temp = readl(sport->port.membase + UCR1);
        temp &= ~(UCR1_TXMPTYEN | UCR1_RRDYEN | UCR1_RTSDEN | UCR1_UARTEN);
        if (USE_IRDA(sport))
                temp &= ~(UCR1_IREN);
  
        writel(temp, sport->port.membase + UCR1);
+       spin_unlock_irqrestore(&sport->port.lock, flags);
  }
  
  static void
@@@ -1217,6 -1212,9 +1212,9 @@@ imx_console_write(struct console *co, c
        struct imx_port *sport = imx_ports[co->index];
        struct imx_port_ucrs old_ucr;
        unsigned int ucr1;
+       unsigned long flags;
+       spin_lock_irqsave(&sport->port.lock, flags);
  
        /*
         *      First, save UCR1/2/3 and then disable interrupts
        while (!(readl(sport->port.membase + USR2) & USR2_TXDC));
  
        imx_port_ucrs_restore(&sport->port, &old_ucr);
+       spin_unlock_irqrestore(&sport->port.lock, flags);
  }
  
  /*
@@@ -1505,21 -1505,18 +1505,21 @@@ static int serial_imx_probe(struct plat
        pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
        if (IS_ERR(pinctrl)) {
                ret = PTR_ERR(pinctrl);
 +              dev_err(&pdev->dev, "failed to get default pinctrl: %d\n", ret);
                goto unmap;
        }
  
        sport->clk_ipg = devm_clk_get(&pdev->dev, "ipg");
        if (IS_ERR(sport->clk_ipg)) {
                ret = PTR_ERR(sport->clk_ipg);
 +              dev_err(&pdev->dev, "failed to get ipg clk: %d\n", ret);
                goto unmap;
        }
  
        sport->clk_per = devm_clk_get(&pdev->dev, "per");
        if (IS_ERR(sport->clk_per)) {
                ret = PTR_ERR(sport->clk_per);
 +              dev_err(&pdev->dev, "failed to get per clk: %d\n", ret);
                goto unmap;
        }
  
@@@ -132,11 -132,15 +132,15 @@@ static unsigned n_ports
  
  
  #ifdef VERBOSE_DEBUG
+ #ifndef pr_vdebug
  #define pr_vdebug(fmt, arg...) \
        pr_debug(fmt, ##arg)
+ #endif /* pr_vdebug */
  #else
+ #ifndef pr_vdebig
  #define pr_vdebug(fmt, arg...) \
        ({ if (0) pr_debug(fmt, ##arg); })
+ #endif /* pr_vdebug */
  #endif
  
  /*-------------------------------------------------------------------------*/
@@@ -1129,8 -1133,7 +1133,8 @@@ int gserial_setup(struct usb_gadget *g
        for (i = 0; i < count; i++) {
                struct device   *tty_dev;
  
 -              tty_dev = tty_register_device(gs_tty_driver, i, &g->dev);
 +              tty_dev = tty_port_register_device(&ports[i].port->port,
 +                              gs_tty_driver, i, &g->dev);
                if (IS_ERR(tty_dev))
                        pr_warning("%s: no classdev for port %d, err %ld\n",
                                __func__, i, PTR_ERR(tty_dev));
@@@ -704,6 -704,7 +704,7 @@@ static struct usb_device_id id_table_co
        { USB_DEVICE(FTDI_VID, FTDI_PCDJ_DAC2_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_RRCIRKITS_LOCOBUFFER_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_ASK_RDR400_PID) },
+       { USB_DEVICE(FTDI_VID, FTDI_NZR_SEM_USB_PID) },
        { USB_DEVICE(ICOM_VID, ICOM_ID_1_PID) },
        { USB_DEVICE(ICOM_VID, ICOM_OPC_U_UC_PID) },
        { USB_DEVICE(ICOM_VID, ICOM_ID_RP2C1_PID) },
                .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
        { USB_DEVICE(ADI_VID, ADI_GNICEPLUS_PID),
                .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
-       { USB_DEVICE(MICROCHIP_VID, MICROCHIP_USB_BOARD_PID) },
+       { USB_DEVICE_AND_INTERFACE_INFO(MICROCHIP_VID, MICROCHIP_USB_BOARD_PID,
+                                       USB_CLASS_VENDOR_SPEC,
+                                       USB_SUBCLASS_VENDOR_SPEC, 0x00) },
        { USB_DEVICE(JETI_VID, JETI_SPC1201_PID) },
        { USB_DEVICE(MARVELL_VID, MARVELL_SHEEVAPLUG_PID),
                .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
        { USB_DEVICE(LARSENBRUSGAARD_VID, LB_ALTITRACK_PID) },
        { USB_DEVICE(GN_OTOMETRICS_VID, AURICAL_USB_PID) },
+       { USB_DEVICE(FTDI_VID, PI_C865_PID) },
+       { USB_DEVICE(FTDI_VID, PI_C857_PID) },
+       { USB_DEVICE(PI_VID, PI_C866_PID) },
+       { USB_DEVICE(PI_VID, PI_C663_PID) },
+       { USB_DEVICE(PI_VID, PI_C725_PID) },
+       { USB_DEVICE(PI_VID, PI_E517_PID) },
+       { USB_DEVICE(PI_VID, PI_C863_PID) },
        { USB_DEVICE(PI_VID, PI_E861_PID) },
+       { USB_DEVICE(PI_VID, PI_C867_PID) },
+       { USB_DEVICE(PI_VID, PI_E609_PID) },
+       { USB_DEVICE(PI_VID, PI_E709_PID) },
+       { USB_DEVICE(PI_VID, PI_100F_PID) },
+       { USB_DEVICE(PI_VID, PI_1011_PID) },
+       { USB_DEVICE(PI_VID, PI_1012_PID) },
+       { USB_DEVICE(PI_VID, PI_1013_PID) },
+       { USB_DEVICE(PI_VID, PI_1014_PID) },
+       { USB_DEVICE(PI_VID, PI_1015_PID) },
+       { USB_DEVICE(PI_VID, PI_1016_PID) },
        { USB_DEVICE(KONDO_VID, KONDO_USB_SERIAL_PID) },
        { USB_DEVICE(BAYER_VID, BAYER_CONTOUR_CABLE_PID) },
        { USB_DEVICE(FTDI_VID, MARVELL_OPENRD_PID),
@@@ -2082,7 -2102,7 +2102,7 @@@ static void ftdi_set_termios(struct tty
  {
        struct usb_device *dev = port->serial->dev;
        struct ftdi_private *priv = usb_get_serial_port_data(port);
 -      struct ktermios *termios = tty->termios;
 +      struct ktermios *termios = &tty->termios;
        unsigned int cflag = termios->c_cflag;
        __u16 urb_value; /* will hold the new flags */