Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 7 Jan 2011 03:13:58 +0000 (19:13 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 7 Jan 2011 03:13:58 +0000 (19:13 -0800)
* 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (243 commits)
  omap2: Make OMAP2PLUS select OMAP_DM_TIMER
  OMAP4: hwmod data: Fix alignment and end of line in structurefields
  OMAP4: hwmod data: Move the DMA structures
  OMAP4: hwmod data: Move the smartreflex structures
  OMAP4: hwmod data: Fix missing SIDLE_SMART_WKUP in smartreflexsysc
  arm: omap: tusb6010: add name for MUSB IRQ
  arm: omap: craneboard: Add USB EHCI support
  omap2+: Initialize serial port for dynamic remuxing for n8x0
  omap2+: Add struct omap_board_data and use it for platform level serial init
  omap2+: Allow hwmod state changes to mux pads based on the state changes
  omap2+: Add support for hwmod specific muxing of devices
  omap2+: Add omap_mux_get_by_name
  OMAP2: PM: fix compile error when !CONFIG_SUSPEND
  MAINTAINERS: OMAP: hwmod: update hwmod code, data maintainership
  OMAP4: Smartreflex framework extensions
  OMAP4: hwmod: Add inital data for smartreflex modules.
  OMAP4: PM: Program correct init voltages for scalable VDDs
  OMAP4: Adding voltage driver support
  OMAP4: Register voltage PMIC parameters with the voltage layer
  OMAP3: PM: Program correct init voltages for VDD1 and VDD2
  ...

Fix up trivial conflict in arch/arm/plat-omap/Kconfig

1  2 
MAINTAINERS
arch/arm/mach-omap1/time.c
arch/arm/mach-omap2/board-omap3pandora.c
arch/arm/mach-omap2/dpll3xxx.c
arch/arm/mach-omap2/include/mach/entry-macro.S
arch/arm/mach-omap2/omap4-common.c
arch/arm/mach-omap2/timer-gp.c
arch/arm/plat-omap/Kconfig
arch/arm/plat-omap/include/plat/clkdev_omap.h

diff --combined MAINTAINERS
@@@ -166,8 -166,9 +166,8 @@@ F: drivers/serial/8250
  F:    include/linux/serial_8250.h
  
  8390 NETWORK DRIVERS [WD80x3/SMC-ELITE, SMC-ULTRA, NE2000, 3C503, etc.]
 -M:    Paul Gortmaker <p_gortmaker@yahoo.com>
  L:    netdev@vger.kernel.org
 -S:    Maintained
 +S:    Orphan / Obsolete
  F:    drivers/net/*8390*
  F:    drivers/net/ax88796.c
  
@@@ -404,7 -405,7 +404,7 @@@ S: Supporte
  F:    drivers/usb/gadget/amd5536udc.*
  
  AMD GEODE PROCESSOR/CHIPSET SUPPORT
 -P:    Jordan Crouse
 +P:    Andres Salomon <dilinger@queued.net>
  L:    linux-geode@lists.infradead.org (moderated for non-subscribers)
  W:    http://www.amd.com/us-en/ConnectivitySolutions/TechnicalResources/0,,50_2334_2452_11363,00.html
  S:    Supported
@@@ -791,14 -792,11 +791,14 @@@ S:      Maintaine
  
  ARM/NOMADIK ARCHITECTURE
  M:    Alessandro Rubini <rubini@unipv.it>
 +M:    Linus Walleij <linus.walleij@stericsson.com>
  M:    STEricsson <STEricsson_nomadik_linux@list.st.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  F:    arch/arm/mach-nomadik/
  F:    arch/arm/plat-nomadik/
 +F:    drivers/i2c/busses/i2c-nomadik.c
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git
  
  ARM/OPENMOKO NEO FREERUNNER (GTA02) MACHINE SUPPORT
  M:    Nelson Castillo <arhuaco@freaks-unidos.net>
@@@ -1000,24 -998,12 +1000,24 @@@ F:    drivers/i2c/busses/i2c-stu300.
  F:    drivers/rtc/rtc-coh901331.c
  F:    drivers/watchdog/coh901327_wdt.c
  F:    drivers/dma/coh901318*
 +F:    drivers/mfd/ab3100*
 +F:    drivers/rtc/rtc-ab3100.c
 +F:    drivers/rtc/rtc-coh901331.c
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git
  
 -ARM/U8500 ARM ARCHITECTURE
 +ARM/Ux500 ARM ARCHITECTURE
  M:    Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
 +M:    Linus Walleij <linus.walleij@stericsson.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  F:    arch/arm/mach-ux500/
 +F:    drivers/dma/ste_dma40*
 +F:    drivers/mfd/ab3550*
 +F:    drivers/mfd/abx500*
 +F:    drivers/mfd/ab8500*
 +F:    drivers/mfd/stmpe*
 +F:    drivers/rtc/rtc-ab8500.c
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git
  
  ARM/VFP SUPPORT
  M:    Russell King <linux@arm.linux.org.uk>
@@@ -1094,12 -1080,6 +1094,12 @@@ S:    Supporte
  F:    Documentation/aoe/
  F:    drivers/block/aoe/
  
 +ATHEROS ATH GENERIC UTILITIES
 +M:    "Luis R. Rodriguez" <lrodriguez@atheros.com>
 +L:    linux-wireless@vger.kernel.org
 +S:    Supported
 +F:    drivers/net/wireless/ath/*
 +
  ATHEROS ATH5K WIRELESS DRIVER
  M:    Jiri Slaby <jirislaby@gmail.com>
  M:    Nick Kossifidis <mickflemm@gmail.com>
@@@ -1278,15 -1258,6 +1278,15 @@@ S:    Maintaine
  F:    drivers/video/backlight/
  F:    include/linux/backlight.h
  
 +BATMAN ADVANCED
 +M:    Marek Lindner <lindner_marek@yahoo.de>
 +M:    Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
 +M:    Sven Eckelmann <sven@narfation.org>
 +L:    b.a.t.m.a.n@lists.open-mesh.org
 +W:    http://www.open-mesh.org/
 +S:    Maintained
 +F:    net/batman-adv/
 +
  BAYCOM/HDLCDRV DRIVERS FOR AX.25
  M:    Thomas Sailer <t.sailer@alumni.ethz.ch>
  L:    linux-hams@vger.kernel.org
@@@ -2826,10 -2797,6 +2826,10 @@@ M:    Thomas Gleixner <tglx@linutronix.de
  S:    Maintained
  F:    Documentation/timers/
  F:    kernel/hrtimer.c
 +F:    kernel/time/clockevents.c
 +F:    kernel/time/tick*.*
 +F:    kernel/time/timer_*.c
 +F     include/linux/clockevents.h
  F:    include/linux/hrtimer.h
  
  HIGH-SPEED SCC DRIVER FOR AX.25
@@@ -3153,8 -3120,6 +3153,8 @@@ M:      Alex Duyck <alexander.h.duyck@intel.
  M:    John Ronciak <john.ronciak@intel.com>
  L:    e1000-devel@lists.sourceforge.net
  W:    http://e1000.sourceforge.net/
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-2.6.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next-2.6.git
  S:    Supported
  F:    Documentation/networking/e100.txt
  F:    Documentation/networking/e1000.txt
@@@ -4363,6 -4328,20 +4363,20 @@@ M:    Deepak Saxena <dsaxena@plexity.net
  S:    Maintained
  F:    drivers/char/hw_random/omap-rng.c
  
+ OMAP HWMOD SUPPORT
+ M:    Benoît Cousson <b-cousson@ti.com>
+ M:    Paul Walmsley <paul@pwsan.com>
+ L:    linux-omap@vger.kernel.org
+ S:    Maintained
+ F:    arch/arm/mach-omap2/omap_hwmod.c
+ F:    arch/arm/plat-omap/include/plat/omap_hwmod.h
+ OMAP HWMOD DATA FOR OMAP4-BASED DEVICES
+ M:    Benoît Cousson <b-cousson@ti.com>
+ L:    linux-omap@vger.kernel.org
+ S:    Maintained
+ F:    arch/arm/mach-omap2/omap_hwmod_44xx_data.c
  OMAP USB SUPPORT
  M:    Felipe Balbi <balbi@ti.com>
  M:    David Brownell <dbrownell@users.sourceforge.net>
@@@ -4625,7 -4604,7 +4639,7 @@@ F:      drivers/pcmcia
  F:    include/pcmcia/
  
  PCNET32 NETWORK DRIVER
 -M:    Don Fry <pcnet32@verizon.net>
 +M:    Don Fry <pcnet32@frontier.com>
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    drivers/net/pcnet32.c
@@@ -4647,7 -4626,7 +4661,7 @@@ PERFORMANCE EVENTS SUBSYSTE
  M:    Peter Zijlstra <a.p.zijlstra@chello.nl>
  M:    Paul Mackerras <paulus@samba.org>
  M:    Ingo Molnar <mingo@elte.hu>
 -M:    Arnaldo Carvalho de Melo <acme@redhat.com>
 +M:    Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
  S:    Supported
  F:    kernel/perf_event*.c
  F:    include/linux/perf_event.h
@@@ -5072,7 -5051,7 +5086,7 @@@ L:      linux-wireless@vger.kernel.or
  W:    http://linuxwireless.org/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
  S:    Maintained
 -F:    drivers/net/wireless/rtl818x/rtl8180*
 +F:    drivers/net/wireless/rtl818x/rtl8180/
  
  RTL8187 WIRELESS DRIVER
  M:    Herton Ronaldo Krzesinski <herton@mandriva.com.br>
@@@ -5082,17 -5061,7 +5096,17 @@@ L:    linux-wireless@vger.kernel.or
  W:    http://linuxwireless.org/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
  S:    Maintained
 -F:    drivers/net/wireless/rtl818x/rtl8187*
 +F:    drivers/net/wireless/rtl818x/rtl8187/
 +
 +RTL8192CE WIRELESS DRIVER
 +M:    Larry Finger <Larry.Finger@lwfinger.net>
 +M:    Chaoming Li <chaoming_li@realsil.com.cn>
 +L:    linux-wireless@vger.kernel.org
 +W:    http://linuxwireless.org/
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
 +S:    Maintained
 +F:    drivers/net/wireless/rtlwifi/
 +F:    drivers/net/wireless/rtlwifi/rtl8192ce/
  
  S3 SAVAGE FRAMEBUFFER DRIVER
  M:    Antonino Daplas <adaplas@gmail.com>
@@@ -5172,18 -5141,6 +5186,18 @@@ L:    alsa-devel@alsa-project.org (moderat
  S:    Supported
  F:    sound/soc/s3c24xx
  
 +TIMEKEEPING, NTP
 +M:    John Stultz <johnstul@us.ibm.com>
 +M:    Thomas Gleixner <tglx@linutronix.de>
 +S:    Supported
 +F:    include/linux/clocksource.h
 +F:    include/linux/time.h
 +F:    include/linux/timex.h
 +F:    include/linux/timekeeping.h
 +F:    kernel/time/clocksource.c
 +F:    kernel/time/time*.c
 +F:    kernel/time/ntp.c
 +
  TLG2300 VIDEO4LINUX-2 DRIVER
  M:    Huang Shijie <shijie8@gmail.com>
  M:    Kang Yong <kangyong@telegent.com>
@@@ -5754,6 -5711,12 +5768,6 @@@ M:     Ion Badulescu <ionut@badula.org
  S:    Odd Fixes
  F:    drivers/net/starfire*
  
 -STRADIS MPEG-2 DECODER DRIVER
 -M:    Nathan Laredo <laredo@gnu.org>
 -W:    http://www.stradis.com/
 -S:    Maintained
 -F:    drivers/media/video/stradis.c
 -
  SUN3/3X
  M:    Sam Creasey <sammy@sammy.net>
  W:    http://sammy.net/sun3/
@@@ -52,6 -52,7 +52,7 @@@
  #include <asm/mach/irq.h>
  #include <asm/mach/time.h>
  
+ #include <plat/common.h>
  
  #define OMAP_MPU_TIMER_BASE           OMAP_MPU_TIMER1_BASE
  #define OMAP_MPU_TIMER_OFFSET         0x100
@@@ -208,6 -209,7 +209,6 @@@ static struct clocksource clocksource_m
        .rating         = 300,
        .read           = mpu_read,
        .mask           = CLOCKSOURCE_MASK(32),
 -      .shift          = 24,
        .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
  };
  
@@@ -216,10 -218,13 +217,10 @@@ static void __init omap_init_clocksourc
        static char err[] __initdata = KERN_ERR
                        "%s: can't register clocksource!\n";
  
 -      clocksource_mpu.mult
 -              = clocksource_khz2mult(rate/1000, clocksource_mpu.shift);
 -
        setup_irq(INT_TIMER2, &omap_mpu_timer2_irq);
        omap_mpu_timer_start(1, ~0, 1);
  
 -      if (clocksource_register(&clocksource_mpu))
 +      if (clocksource_register_hz(&clocksource_mpu, rate))
                printk(err, clocksource_mpu.name);
  }
  
@@@ -293,7 -293,7 +293,7 @@@ static struct omap2_hsmmc_info omap3pan
        },
        {
                .mmc            = 3,
-               .caps           = MMC_CAP_4_BIT_DATA,
+               .caps           = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
                .gpio_cd        = -EINVAL,
                .gpio_wp        = -EINVAL,
                .init_card      = pandora_wl1251_init_card,
@@@ -636,19 -636,37 +636,19 @@@ static struct spi_board_info omap3pando
  
  static void __init omap3pandora_init_irq(void)
  {
-       omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
-                            mt46h32m32lf6_sdrc_params);
+       omap2_init_common_infrastructure();
+       omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
+                                 mt46h32m32lf6_sdrc_params);
        omap_init_irq();
-       omap_gpio_init();
  }
  
 -static void pandora_wl1251_set_power(bool enable)
 -{
 -      /*
 -       * Keep power always on until wl1251_sdio driver learns to re-init
 -       * the chip after powering it down and back up.
 -       */
 -}
 -
 -static struct wl12xx_platform_data pandora_wl1251_pdata = {
 -      .set_power      = pandora_wl1251_set_power,
 -      .use_eeprom     = true,
 -};
 -
 -static struct platform_device pandora_wl1251_data = {
 -      .name           = "wl1251_data",
 -      .id             = -1,
 -      .dev            = {
 -              .platform_data  = &pandora_wl1251_pdata,
 -      },
 -};
 -
 -static void pandora_wl1251_init(void)
 +static void __init pandora_wl1251_init(void)
  {
 +      struct wl12xx_platform_data pandora_wl1251_pdata;
        int ret;
  
 +      memset(&pandora_wl1251_pdata, 0, sizeof(pandora_wl1251_pdata));
 +
        ret = gpio_request(PANDORA_WIFI_IRQ_GPIO, "wl1251 irq");
        if (ret < 0)
                goto fail;
        if (pandora_wl1251_pdata.irq < 0)
                goto fail_irq;
  
 +      pandora_wl1251_pdata.use_eeprom = true;
 +      ret = wl12xx_set_platform_data(&pandora_wl1251_pdata);
 +      if (ret < 0)
 +              goto fail_irq;
 +
        return;
  
  fail_irq:
@@@ -678,6 -691,7 +678,6 @@@ static struct platform_device *omap3pan
        &pandora_leds_gpio,
        &pandora_keys_gpio,
        &pandora_dss_device,
 -      &pandora_wl1251_data,
        &pandora_vwlan_device,
  };
  
@@@ -697,8 -711,6 +697,6 @@@ static const struct ehci_hcd_omap_platf
  static struct omap_board_mux board_mux[] __initdata = {
        { .reg_offset = OMAP_MUX_TERMINATOR },
  };
- #else
- #define board_mux     NULL
  #endif
  
  static struct omap_musb_board_data musb_board_data = {
  #include <linux/clk.h>
  #include <linux/io.h>
  #include <linux/bitops.h>
 +#include <linux/clkdev.h>
  
  #include <plat/cpu.h>
  #include <plat/clock.h>
 -#include <asm/clkdev.h>
  
  #include "clock.h"
- #include "prm.h"
- #include "prm-regbits-34xx.h"
- #include "cm.h"
+ #include "cm2xxx_3xxx.h"
  #include "cm-regbits-34xx.h"
  
  /* CM_AUTOIDLE_PLL*.AUTO_* bit values */
@@@ -225,10 -223,9 +223,9 @@@ static int _omap3_noncore_dpll_stop(str
  }
  
  /**
-  * lookup_dco_sddiv -  Set j-type DPLL4 compensation variables
+  * _lookup_dco - Lookup DCO used by j-type DPLL
   * @clk: pointer to a DPLL struct clk
   * @dco: digital control oscillator selector
-  * @sd_div: target sigma-delta divider
   * @m: DPLL multiplier to set
   * @n: DPLL divider to set
   *
   * XXX This code is not needed for 3430/AM35xx; can it be optimized
   * out in non-multi-OMAP builds for those chips?
   */
- static void lookup_dco_sddiv(struct clk *clk, u8 *dco, u8 *sd_div, u16 m,
-                            u8 n)
+ static void _lookup_dco(struct clk *clk, u8 *dco, u16 m, u8 n)
  {
-       unsigned long fint, clkinp, sd; /* watch out for overflow */
-       int mod1, mod2;
+       unsigned long fint, clkinp; /* watch out for overflow */
  
        clkinp = clk->parent->rate;
        fint = (clkinp / n) * m;
                *dco = 2;
        else
                *dco = 4;
+ }
+ /**
+  * _lookup_sddiv - Calculate sigma delta divider for j-type DPLL
+  * @clk: pointer to a DPLL struct clk
+  * @sd_div: target sigma-delta divider
+  * @m: DPLL multiplier to set
+  * @n: DPLL divider to set
+  *
+  * See 36xx TRM section 3.5.3.3.3.2 "Type B DPLL (Low-Jitter)"
+  *
+  * XXX This code is not needed for 3430/AM35xx; can it be optimized
+  * out in non-multi-OMAP builds for those chips?
+  */
+ static void _lookup_sddiv(struct clk *clk, u8 *sd_div, u16 m, u8 n)
+ {
+       unsigned long clkinp, sd; /* watch out for overflow */
+       int mod1, mod2;
+       clkinp = clk->parent->rate;
        /*
         * target sigma-delta to near 250MHz
         * sd = ceil[(m/(n+1)) * (clkinp_MHz / 250)]
  static int omap3_noncore_dpll_program(struct clk *clk, u16 m, u8 n, u16 freqsel)
  {
        struct dpll_data *dd = clk->dpll_data;
+       u8 dco, sd_div;
        u32 v;
  
        /* 3430 ES2 TRM: 4.7.6.9 DPLL Programming Sequence */
        v |= m << __ffs(dd->mult_mask);
        v |= (n - 1) << __ffs(dd->div1_mask);
  
-       /*
-        * XXX This code is not needed for 3430/AM35XX; can it be optimized
-        * out in non-multi-OMAP builds for those chips?
-        */
-       if ((dd->flags & DPLL_J_TYPE) && !(dd->flags & DPLL_NO_DCO_SEL)) {
-               u8 dco, sd_div;
-               lookup_dco_sddiv(clk, &dco, &sd_div, m, n);
-               /* XXX This probably will need revision for OMAP4 */
-               v &= ~(OMAP3630_PERIPH_DPLL_DCO_SEL_MASK
-                       | OMAP3630_PERIPH_DPLL_SD_DIV_MASK);
-               v |= dco << __ffs(OMAP3630_PERIPH_DPLL_DCO_SEL_MASK);
-               v |= sd_div << __ffs(OMAP3630_PERIPH_DPLL_SD_DIV_MASK);
+       /* Configure dco and sd_div for dplls that have these fields */
+       if (dd->dco_mask) {
+               _lookup_dco(clk, &dco, m, n);
+               v &= ~(dd->dco_mask);
+               v |= dco << __ffs(dd->dco_mask);
+       }
+       if (dd->sddiv_mask) {
+               _lookup_sddiv(clk, &sd_div, m, n);
+               v &= ~(dd->sddiv_mask);
+               v |= sd_div << __ffs(dd->sddiv_mask);
        }
  
        __raw_writel(v, dd->mult_div1_reg);
   */
  
  #ifdef MULTI_OMAP2
+ /*
+  * We use __glue to avoid errors with multiple definitions of
+  * .globl omap_irq_base as it's included from entry-armv.S but not
+  * from entry-common.S.
+  */
+ #ifdef __glue
                .pushsection .data
- omap_irq_base:        .word   0
+               .globl  omap_irq_base
+ omap_irq_base:
+               .word   0
                .popsection
+ #endif
  
-               /* Configure the interrupt base on the first interrupt */
+               /*
+                * Configure the interrupt base on the first interrupt.
+                * See also omap_irq_base_init for setting omap_irq_base.
+                */
                .macro  get_irqnr_preamble, base, tmp
- 9:
                ldr     \base, =omap_irq_base   @ irq base address
                ldr     \base, [\base, #0]      @ irq base value
-               cmp     \base, #0               @ already configured?
-               bne     9997f                   @ nothing to do
-               mrc     p15, 0, \tmp, c0, c0, 0 @ get processor revision
-               and     \tmp, \tmp, #0x000f0000 @ only check architecture
-               cmp     \tmp, #0x00070000       @ is v6?
-               beq     2400f                   @ found v6 so it's omap24xx
-               mrc     p15, 0, \tmp, c0, c0, 0 @ get processor revision
-               and     \tmp, \tmp, #0x000000f0 @ check cortex 8 or 9
-               cmp     \tmp, #0x00000080       @ cortex A-8?
-               beq     3400f                   @ found A-8 so it's omap34xx
-               cmp     \tmp, #0x00000090       @ cortex A-9?
-               beq     4400f                   @ found A-9 so it's omap44xx
- 2400:         ldr     \base, =OMAP2_IRQ_BASE
-               ldr     \tmp, =omap_irq_base
-               str     \base, [\tmp, #0]
-               b       9b
- 3400:         ldr     \base, =OMAP3_IRQ_BASE
-               ldr     \tmp, =omap_irq_base
-               str     \base, [\tmp, #0]
-               b       9b
- 4400:         ldr     \base, =OMAP4_IRQ_BASE
-               ldr     \tmp, =omap_irq_base
-               str     \base, [\tmp, #0]
-               b       9b
- 9997:
                .endm
  
                /* Check the pending interrupts. Note that base already set */
  9999:
                .endm
  
 +#ifdef CONFIG_SMP
 +              /* We assume that irqstat (the raw value of the IRQ acknowledge
 +               * register) is preserved from the macro above.
 +               * If there is an IPI, we immediately signal end of interrupt
 +               * on the controller, since this requires the original irqstat
 +               * value which we won't easily be able to recreate later.
 +               */
 +
 +              .macro test_for_ipi, irqnr, irqstat, base, tmp
 +              bic     \irqnr, \irqstat, #0x1c00
 +              cmp     \irqnr, #16
 +              it      cc
 +              strcc   \irqstat, [\base, #GIC_CPU_EOI]
 +              it      cs
 +              cmpcs   \irqnr, \irqnr
 +              .endm
 +
 +              /* As above, this assumes that irqstat and base are preserved */
 +
 +              .macro test_for_ltirq, irqnr, irqstat, base, tmp
 +              bic     \irqnr, \irqstat, #0x1c00
 +              mov     \tmp, #0
 +              cmp     \irqnr, #29
 +              itt     eq
 +              moveq   \tmp, #1
 +              streq   \irqstat, [\base, #GIC_CPU_EOI]
 +              cmp     \tmp, #0
 +              .endm
 +#endif        /* CONFIG_SMP */
  
  #else /* MULTI_OMAP2 */
  
  
  
  #ifdef CONFIG_ARCH_OMAP4
 +#define HAVE_GET_IRQNR_PREAMBLE
 +#include <asm/hardware/entry-macro-gic.S>
  
                .macro  get_irqnr_preamble, base, tmp
                ldr     \base, =OMAP4_IRQ_BASE
                .endm
  
 -              /*
 -               * The interrupt numbering scheme is defined in the
 -               * interrupt controller spec.  To wit:
 -               *
 -               * Interrupts 0-15 are IPI
 -               * 16-28 are reserved
 -               * 29-31 are local.  We allow 30 to be used for the watchdog.
 -               * 32-1020 are global
 -               * 1021-1022 are reserved
 -               * 1023 is "spurious" (no interrupt)
 -               *
 -               * For now, we ignore all local interrupts so only return an
 -               * interrupt if it's between 30 and 1020.  The test_for_ipi
 -               * routine below will pick up on IPIs.
 -               * A simple read from the controller will tell us the number
 -               * of the highest priority enabled interrupt.
 -               * We then just need to check whether it is in the
 -               * valid range for an IRQ (30-1020 inclusive).
 -               */
 -              .macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
 -              ldr     \irqstat, [\base, #GIC_CPU_INTACK]
 -
 -              ldr     \tmp, =1021
 -
 -              bic     \irqnr, \irqstat, #0x1c00
 -
 -              cmp     \irqnr, #29
 -              cmpcc   \irqnr, \irqnr
 -              cmpne   \irqnr, \tmp
 -              cmpcs   \irqnr, \irqnr
 -              .endm
  #endif
 -#endif        /* MULTI_OMAP2 */
 -
 -#ifdef CONFIG_SMP
 -              /* We assume that irqstat (the raw value of the IRQ acknowledge
 -               * register) is preserved from the macro above.
 -               * If there is an IPI, we immediately signal end of interrupt
 -               * on the controller, since this requires the original irqstat
 -               * value which we won't easily be able to recreate later.
 -               */
 -
 -              .macro test_for_ipi, irqnr, irqstat, base, tmp
 -              bic     \irqnr, \irqstat, #0x1c00
 -              cmp     \irqnr, #16
 -              it      cc
 -              strcc   \irqstat, [\base, #GIC_CPU_EOI]
 -              it      cs
 -              cmpcs   \irqnr, \irqnr
 -              .endm
  
 -              /* As above, this assumes that irqstat and base are preserved */
 -
 -              .macro test_for_ltirq, irqnr, irqstat, base, tmp
 -              bic     \irqnr, \irqstat, #0x1c00
 -              mov     \tmp, #0
 -              cmp     \irqnr, #29
 -              itt     eq
 -              moveq   \tmp, #1
 -              streq   \irqstat, [\base, #GIC_CPU_EOI]
 -              cmp     \tmp, #0
 -              .endm
 -#endif        /* CONFIG_SMP */
 +#endif        /* MULTI_OMAP2 */
  
                .macro  irq_prio_table
                .endm
  void __iomem *l2cache_base;
  #endif
  
 -void __iomem *gic_cpu_base_addr;
  void __iomem *gic_dist_base_addr;
  
  
  void __init gic_init_irq(void)
  {
 +      void __iomem *gic_cpu_base;
 +
        /* Static mapping, never released */
        gic_dist_base_addr = ioremap(OMAP44XX_GIC_DIST_BASE, SZ_4K);
        BUG_ON(!gic_dist_base_addr);
 -      gic_dist_init(0, gic_dist_base_addr, 29);
  
        /* Static mapping, never released */
 -      gic_cpu_base_addr = ioremap(OMAP44XX_GIC_CPU_BASE, SZ_512);
 -      BUG_ON(!gic_cpu_base_addr);
 -      gic_cpu_init(0, gic_cpu_base_addr);
 +      gic_cpu_base = ioremap(OMAP44XX_GIC_CPU_BASE, SZ_512);
 +      BUG_ON(!gic_cpu_base);
 +
 +      gic_init(0, 29, gic_dist_base_addr, gic_cpu_base);
  }
  
  #ifdef CONFIG_CACHE_L2X0
@@@ -54,6 -53,8 +54,8 @@@ static void omap4_l2x0_disable(void
  
  static int __init omap_l2_cache_init(void)
  {
+       u32 aux_ctrl = 0;
        /*
         * To avoid code running on other OMAPs in
         * multi-omap builds
        l2cache_base = ioremap(OMAP44XX_L2CACHE_BASE, SZ_4K);
        BUG_ON(!l2cache_base);
  
-       /* Enable PL310 L2 Cache controller */
-       omap_smc1(0x102, 0x1);
        /*
         * 16-way associativity, parity disabled
         * Way size - 32KB (es1.0)
         * Way size - 64KB (es2.0 +)
         */
-       if (omap_rev() == OMAP4430_REV_ES1_0)
-               l2x0_init(l2cache_base, 0x0e050000, 0xc0000fff);
-       else
-               l2x0_init(l2cache_base, 0x0e070000, 0xc0000fff);
+       aux_ctrl = ((1 << L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT) |
+                       (0x1 << 25) |
+                       (0x1 << L2X0_AUX_CTRL_NS_LOCKDOWN_SHIFT) |
+                       (0x1 << L2X0_AUX_CTRL_NS_INT_CTRL_SHIFT));
+       if (omap_rev() == OMAP4430_REV_ES1_0) {
+               aux_ctrl |= 0x2 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT;
+       } else {
+               aux_ctrl |= ((0x3 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT) |
+                       (1 << L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT) |
+                       (1 << L2X0_AUX_CTRL_DATA_PREFETCH_SHIFT) |
+                       (1 << L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT) |
+                       (1 << L2X0_AUX_CTRL_EARLY_BRESP_SHIFT));
+       }
+       if (omap_rev() != OMAP4430_REV_ES1_0)
+               omap_smc1(0x109, aux_ctrl);
+       /* Enable PL310 L2 Cache controller */
+       omap_smc1(0x102, 0x1);
+       l2x0_init(l2cache_base, aux_ctrl, L2X0_AUX_CTRL_MASK);
  
        /*
         * Override default outer_cache.disable with a OMAP4
@@@ -195,6 -195,7 +195,6 @@@ static struct clocksource clocksource_g
        .rating         = 300,
        .read           = clocksource_read_cycles,
        .mask           = CLOCKSOURCE_MASK(32),
 -      .shift          = 24,
        .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
  };
  
  static void __init omap2_gp_clocksource_init(void)
  {
        static struct omap_dm_timer *gpt;
-       u32 tick_rate, tick_period;
+       u32 tick_rate;
        static char err1[] __initdata = KERN_ERR
                "%s: failed to request dm-timer\n";
        static char err2[] __initdata = KERN_ERR
  
        omap_dm_timer_set_source(gpt, OMAP_TIMER_SRC_SYS_CLK);
        tick_rate = clk_get_rate(omap_dm_timer_get_fclk(gpt));
-       tick_period = (tick_rate / HZ) - 1;
  
        omap_dm_timer_set_load_start(gpt, 1, 0);
  
 -      clocksource_gpt.mult =
 -              clocksource_khz2mult(tick_rate/1000, clocksource_gpt.shift);
 -      if (clocksource_register(&clocksource_gpt))
 +      if (clocksource_register_hz(&clocksource_gpt, tick_rate))
                printk(err2, clocksource_gpt.name);
  }
  #endif
@@@ -11,13 -11,14 +11,14 @@@ choic
  
  config ARCH_OMAP1
        bool "TI OMAP1"
 -      select COMMON_CLKDEV
 +      select CLKDEV_LOOKUP
        help
          "Systems based on omap7xx, omap15xx or omap16xx"
  
  config ARCH_OMAP2PLUS
        bool "TI OMAP2/3/4"
 -      select COMMON_CLKDEV
 +      select CLKDEV_LOOKUP
+       select OMAP_DM_TIMER
        help
          "Systems based on OMAP2, OMAP3 or OMAP4"
  
@@@ -35,6 -36,37 +36,37 @@@ config OMAP_DEBUG_LED
        depends on OMAP_DEBUG_DEVICES
        default y if LEDS_CLASS
  
+ config OMAP_SMARTREFLEX
+       bool "SmartReflex support"
+       depends on (ARCH_OMAP3 || ARCH_OMAP4) && PM
+       help
+         Say Y if you want to enable SmartReflex.
+         SmartReflex can perform continuous dynamic voltage
+         scaling around the nominal operating point voltage
+         according to silicon characteristics and operating
+         conditions. Enabling SmartReflex reduces power
+         consumption.
+         Please note, that by default SmartReflex is only
+         initialized. To enable the automatic voltage
+         compensation for vdd mpu  and vdd core from user space,
+         user must write 1 to
+               /debug/voltage/vdd_<X>/smartreflex/autocomp,
+         where X is mpu or core for OMAP3.
+         Optionallly autocompensation can be enabled in the kernel
+         by default during system init via the enable_on_init flag
+         which an be passed as platform data to the smartreflex driver.
+ config OMAP_SMARTREFLEX_CLASS3
+       bool "Class 3 mode of Smartreflex Implementation"
+       depends on OMAP_SMARTREFLEX && TWL4030_CORE
+       help
+         Say Y to enable Class 3 implementation of Smartreflex
+         Class 3 implementation of Smartreflex employs continuous hardware
+         voltage calibration.
  config OMAP_RESET_CLOCKS
        bool "Reset unused clocks during boot"
        depends on ARCH_OMAP
@@@ -109,6 -141,9 +141,9 @@@ config OMAP_IOMMU_DEBU
  
           Say N unless you know you need this.
  
+ config OMAP_IOMMU_IVA2
+       bool
  choice
        prompt "System timer"
        default OMAP_32K_TIMER if !ARCH_OMAP15XX
@@@ -8,7 -8,7 +8,7 @@@
  #ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_CLKDEV_OMAP_H
  #define __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_CLKDEV_OMAP_H
  
 -#include <asm/clkdev.h>
 +#include <linux/clkdev.h>
  
  struct omap_clk {
        u16                             cpu;
  #define CK_1510               (1 << 2)
  #define CK_16XX               (1 << 3)        /* 16xx, 17xx, 5912 */
  #define CK_242X               (1 << 4)
- #define CK_243X               (1 << 5)
- #define CK_3XXX               (1 << 6)        /* OMAP3 + AM3 common clocks*/
- #define CK_343X               (1 << 7)        /* OMAP34xx common clocks */
- #define CK_3430ES1    (1 << 8)        /* 34xxES1 only */
- #define CK_3430ES2    (1 << 9)        /* 34xxES2, ES3, non-Sitara 35xx only */
- #define CK_3505               (1 << 10)
- #define CK_3517               (1 << 11)
- #define CK_36XX               (1 << 12)       /* OMAP36xx/37xx-specific clocks */
- #define CK_443X               (1 << 13)
+ #define CK_243X               (1 << 5)        /* 243x, 253x */
+ #define CK_3430ES1    (1 << 6)        /* 34xxES1 only */
+ #define CK_3430ES2PLUS        (1 << 7)        /* 34xxES2, ES3, non-Sitara 35xx only */
+ #define CK_3505               (1 << 8)
+ #define CK_3517               (1 << 9)
+ #define CK_36XX               (1 << 10)       /* 36xx/37xx-specific clocks */
+ #define CK_443X               (1 << 11)
  
- #define CK_AM35XX     (CK_3505 | CK_3517)     /* all Sitara AM35xx */
  
+ #define CK_34XX               (CK_3430ES1 | CK_3430ES2PLUS)
+ #define CK_AM35XX     (CK_3505 | CK_3517)     /* all Sitara AM35xx */
+ #define CK_3XXX               (CK_34XX | CK_AM35XX | CK_36XX)
  
  
  #endif