Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind...
Linus Torvalds [Fri, 18 Mar 2011 02:28:15 +0000 (19:28 -0700)]
* 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (258 commits)
  omap: zoom: host should not pull up wl1271's irq line
  arm: plat-omap: iommu: fix request_mem_region() error path
  OMAP2+: Common CPU DIE ID reading code reads wrong registers for OMAP4430
  omap4: mux: Remove duplicate mux modes
  omap: iovmm: don't check 'da' to set IOVMF_DA_FIXED flag
  omap: iovmm: disallow mapping NULL address when IOVMF_DA_ANON is set
  omap2+: mux: Fix compile when CONFIG_OMAP_MUX is not selected
  omap4: board-omap4panda: Initialise the serial pads
  omap3: board-3430sdp: Initialise the serial pads
  omap4: board-4430sdp: Initialise the serial pads
  omap2+: mux: Add macro for configuring static with omap_hwmod_mux_init
  omap2+: mux: Remove the use of IDLE flag
  omap2+: Add separate list for dynamic pads to mux
  perf: add OMAP support for the new power events
  OMAP4: Add IVA OPP enteries.
  OMAP4: Update Voltage Rail Values for MPU, IVA and CORE
  OMAP4: Enable 800 MHz and 1 GHz MPU-OPP
  OMAP3+: OPP: Replace voltage values with Macros
  OMAP3: wdtimer: Fix CORE idle transition
  Watchdog: omap_wdt: add fine grain runtime-pm
  ...

Fix up various conflicts in
 - arch/arm/mach-omap2/board-omap3evm.c
 - arch/arm/mach-omap2/clock3xxx_data.c
 - arch/arm/mach-omap2/usb-musb.c
 - arch/arm/plat-omap/include/plat/usb.h
 - drivers/usb/musb/musb_core.h

225 files changed:
Documentation/hwspinlock.txt [new file with mode: 0644]
MAINTAINERS
arch/arm/configs/omap2plus_defconfig
arch/arm/mach-omap1/Makefile
arch/arm/mach-omap1/board-ams-delta.c
arch/arm/mach-omap1/board-fsample.c
arch/arm/mach-omap1/board-h2.c
arch/arm/mach-omap1/board-h3.c
arch/arm/mach-omap1/board-htcherald.c
arch/arm/mach-omap1/board-innovator.c
arch/arm/mach-omap1/board-nokia770.c
arch/arm/mach-omap1/board-palmte.c
arch/arm/mach-omap1/board-voiceblue.c
arch/arm/mach-omap1/mcbsp.c
arch/arm/mach-omap1/reset.c [new file with mode: 0644]
arch/arm/mach-omap2/Kconfig
arch/arm/mach-omap2/Makefile
arch/arm/mach-omap2/board-2430sdp.c
arch/arm/mach-omap2/board-3430sdp.c
arch/arm/mach-omap2/board-3630sdp.c
arch/arm/mach-omap2/board-4430sdp.c
arch/arm/mach-omap2/board-am3517crane.c
arch/arm/mach-omap2/board-am3517evm.c
arch/arm/mach-omap2/board-apollon.c
arch/arm/mach-omap2/board-cm-t35.c
arch/arm/mach-omap2/board-cm-t3517.c
arch/arm/mach-omap2/board-devkit8000.c
arch/arm/mach-omap2/board-flash.c
arch/arm/mach-omap2/board-flash.h
arch/arm/mach-omap2/board-generic.c
arch/arm/mach-omap2/board-h4.c
arch/arm/mach-omap2/board-igep0020.c
arch/arm/mach-omap2/board-igep0030.c
arch/arm/mach-omap2/board-ldp.c
arch/arm/mach-omap2/board-n8x0.c
arch/arm/mach-omap2/board-omap3beagle.c
arch/arm/mach-omap2/board-omap3evm.c
arch/arm/mach-omap2/board-omap3logic.c
arch/arm/mach-omap2/board-omap3pandora.c
arch/arm/mach-omap2/board-omap3stalker.c
arch/arm/mach-omap2/board-omap3touchbook.c
arch/arm/mach-omap2/board-omap4panda.c
arch/arm/mach-omap2/board-overo.c
arch/arm/mach-omap2/board-rm680.c
arch/arm/mach-omap2/board-rx51-peripherals.c
arch/arm/mach-omap2/board-rx51-video.c
arch/arm/mach-omap2/board-rx51.c
arch/arm/mach-omap2/board-ti8168evm.c [new file with mode: 0644]
arch/arm/mach-omap2/board-zoom-display.c
arch/arm/mach-omap2/board-zoom-peripherals.c
arch/arm/mach-omap2/board-zoom.c
arch/arm/mach-omap2/clkt2xxx_apll.c
arch/arm/mach-omap2/clkt2xxx_dpll.c [new file with mode: 0644]
arch/arm/mach-omap2/clkt2xxx_osc.c
arch/arm/mach-omap2/clkt_clksel.c
arch/arm/mach-omap2/clkt_dpll.c
arch/arm/mach-omap2/clkt_iclk.c [new file with mode: 0644]
arch/arm/mach-omap2/clock.c
arch/arm/mach-omap2/clock.h
arch/arm/mach-omap2/clock2420_data.c
arch/arm/mach-omap2/clock2430_data.c
arch/arm/mach-omap2/clock2xxx.h
arch/arm/mach-omap2/clock34xx.c
arch/arm/mach-omap2/clock34xx.h
arch/arm/mach-omap2/clock3517.c
arch/arm/mach-omap2/clock3xxx.c
arch/arm/mach-omap2/clock3xxx_data.c
arch/arm/mach-omap2/clock44xx_data.c
arch/arm/mach-omap2/clock_common_data.c
arch/arm/mach-omap2/clockdomain.c
arch/arm/mach-omap2/clockdomain.h
arch/arm/mach-omap2/clockdomain2xxx_3xxx.c [new file with mode: 0644]
arch/arm/mach-omap2/clockdomain44xx.c [new file with mode: 0644]
arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c
arch/arm/mach-omap2/clockdomains44xx_data.c
arch/arm/mach-omap2/cm-regbits-24xx.h
arch/arm/mach-omap2/cm2xxx_3xxx.c
arch/arm/mach-omap2/cm2xxx_3xxx.h
arch/arm/mach-omap2/cm44xx.h
arch/arm/mach-omap2/cminst44xx.c
arch/arm/mach-omap2/cminst44xx.h
arch/arm/mach-omap2/common.c
arch/arm/mach-omap2/control.h
arch/arm/mach-omap2/cpuidle34xx.c
arch/arm/mach-omap2/devices.c
arch/arm/mach-omap2/display.c [new file with mode: 0644]
arch/arm/mach-omap2/dpll44xx.c [new file with mode: 0644]
arch/arm/mach-omap2/gpmc-nand.c
arch/arm/mach-omap2/gpmc-onenand.c
arch/arm/mach-omap2/gpmc.c
arch/arm/mach-omap2/hsmmc.c
arch/arm/mach-omap2/hwspinlock.c [new file with mode: 0644]
arch/arm/mach-omap2/id.c
arch/arm/mach-omap2/include/mach/debug-macro.S
arch/arm/mach-omap2/include/mach/entry-macro.S
arch/arm/mach-omap2/include/mach/omap4-common.h
arch/arm/mach-omap2/io.c
arch/arm/mach-omap2/iommu2.c
arch/arm/mach-omap2/irq.c
arch/arm/mach-omap2/mailbox.c
arch/arm/mach-omap2/mcbsp.c
arch/arm/mach-omap2/mux.c
arch/arm/mach-omap2/mux.h
arch/arm/mach-omap2/mux44xx.c
arch/arm/mach-omap2/omap-headsmp.S
arch/arm/mach-omap2/omap44xx-smc.S
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/mach-omap2/omap_hwmod_2420_data.c
arch/arm/mach-omap2/omap_hwmod_2430_data.c
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
arch/arm/mach-omap2/omap_hwmod_44xx_data.c
arch/arm/mach-omap2/omap_l3_noc.c [new file with mode: 0644]
arch/arm/mach-omap2/omap_l3_noc.h [new file with mode: 0644]
arch/arm/mach-omap2/omap_l3_smx.c [new file with mode: 0644]
arch/arm/mach-omap2/omap_l3_smx.h [new file with mode: 0644]
arch/arm/mach-omap2/omap_opp_data.h
arch/arm/mach-omap2/omap_phy_internal.c
arch/arm/mach-omap2/omap_twl.c
arch/arm/mach-omap2/opp2xxx.h
arch/arm/mach-omap2/opp3xxx_data.c
arch/arm/mach-omap2/opp4xxx_data.c
arch/arm/mach-omap2/pm.c
arch/arm/mach-omap2/pm.h
arch/arm/mach-omap2/pm24xx.c
arch/arm/mach-omap2/pm34xx.c
arch/arm/mach-omap2/powerdomain.c
arch/arm/mach-omap2/powerdomain.h
arch/arm/mach-omap2/powerdomains2xxx_3xxx_data.c
arch/arm/mach-omap2/powerdomains2xxx_data.c
arch/arm/mach-omap2/powerdomains3xxx_data.c
arch/arm/mach-omap2/powerdomains44xx_data.c
arch/arm/mach-omap2/prcm-common.h
arch/arm/mach-omap2/prcm.c
arch/arm/mach-omap2/prcm_mpu44xx.h
arch/arm/mach-omap2/prm2xxx_3xxx.c
arch/arm/mach-omap2/prm2xxx_3xxx.h
arch/arm/mach-omap2/serial.c
arch/arm/mach-omap2/sleep34xx.S
arch/arm/mach-omap2/smartreflex-class3.c
arch/arm/mach-omap2/smartreflex.c
arch/arm/mach-omap2/smartreflex.h [moved from arch/arm/plat-omap/include/plat/smartreflex.h with 99% similarity]
arch/arm/mach-omap2/sr_device.c
arch/arm/mach-omap2/sram34xx.S
arch/arm/mach-omap2/timer-gp.c
arch/arm/mach-omap2/usb-musb.c
arch/arm/mach-omap2/vc.h [new file with mode: 0644]
arch/arm/mach-omap2/vc3xxx_data.c [new file with mode: 0644]
arch/arm/mach-omap2/vc44xx_data.c [new file with mode: 0644]
arch/arm/mach-omap2/voltage.c
arch/arm/mach-omap2/voltage.h [moved from arch/arm/plat-omap/include/plat/voltage.h with 63% similarity]
arch/arm/mach-omap2/voltagedomains3xxx_data.c [new file with mode: 0644]
arch/arm/mach-omap2/voltagedomains44xx_data.c [new file with mode: 0644]
arch/arm/mach-omap2/vp.h [new file with mode: 0644]
arch/arm/mach-omap2/vp3xxx_data.c [new file with mode: 0644]
arch/arm/mach-omap2/vp44xx_data.c [new file with mode: 0644]
arch/arm/plat-omap/clock.c
arch/arm/plat-omap/common.c
arch/arm/plat-omap/counter_32k.c
arch/arm/plat-omap/cpu-omap.c
arch/arm/plat-omap/devices.c
arch/arm/plat-omap/dma.c
arch/arm/plat-omap/dmtimer.c
arch/arm/plat-omap/i2c.c
arch/arm/plat-omap/include/plat/board.h
arch/arm/plat-omap/include/plat/clkdev_omap.h
arch/arm/plat-omap/include/plat/clock.h
arch/arm/plat-omap/include/plat/common.h
arch/arm/plat-omap/include/plat/cpu.h
arch/arm/plat-omap/include/plat/display.h
arch/arm/plat-omap/include/plat/dmtimer.h
arch/arm/plat-omap/include/plat/fpga.h
arch/arm/plat-omap/include/plat/gpmc.h
arch/arm/plat-omap/include/plat/hardware.h
arch/arm/plat-omap/include/plat/io.h
arch/arm/plat-omap/include/plat/iommu.h
arch/arm/plat-omap/include/plat/iovmm.h
arch/arm/plat-omap/include/plat/irqs.h
arch/arm/plat-omap/include/plat/l3_2xxx.h [new file with mode: 0644]
arch/arm/plat-omap/include/plat/l3_3xxx.h [new file with mode: 0644]
arch/arm/plat-omap/include/plat/l4_2xxx.h [new file with mode: 0644]
arch/arm/plat-omap/include/plat/l4_3xxx.h
arch/arm/plat-omap/include/plat/mcbsp.h
arch/arm/plat-omap/include/plat/mcspi.h
arch/arm/plat-omap/include/plat/mmc.h
arch/arm/plat-omap/include/plat/multi.h
arch/arm/plat-omap/include/plat/nand.h
arch/arm/plat-omap/include/plat/omap_hwmod.h
arch/arm/plat-omap/include/plat/onenand.h
arch/arm/plat-omap/include/plat/prcm.h
arch/arm/plat-omap/include/plat/sdrc.h
arch/arm/plat-omap/include/plat/serial.h
arch/arm/plat-omap/include/plat/system.h
arch/arm/plat-omap/include/plat/ti816x.h [new file with mode: 0644]
arch/arm/plat-omap/include/plat/uncompress.h
arch/arm/plat-omap/include/plat/usb.h
arch/arm/plat-omap/io.c
arch/arm/plat-omap/iommu.c
arch/arm/plat-omap/iovmm.c
arch/arm/plat-omap/mcbsp.c
arch/arm/plat-omap/omap_device.c
arch/arm/plat-omap/sram.c
drivers/Kconfig
drivers/Makefile
drivers/hwspinlock/Kconfig [new file with mode: 0644]
drivers/hwspinlock/Makefile [new file with mode: 0644]
drivers/hwspinlock/hwspinlock_core.c [new file with mode: 0644]
drivers/hwspinlock/hwspinlock_internal.h [new file with mode: 0644]
drivers/hwspinlock/omap_hwspinlock.c [new file with mode: 0644]
drivers/mmc/host/Kconfig
drivers/mmc/host/omap_hsmmc.c
drivers/mtd/nand/Kconfig
drivers/mtd/nand/omap2.c
drivers/mtd/onenand/omap2.c
drivers/spi/omap2_mcspi.c
drivers/usb/musb/musb_core.c
drivers/usb/musb/musb_core.h
drivers/usb/musb/musbhsdma.h
drivers/usb/otg/isp1301_omap.c
drivers/w1/masters/Kconfig
drivers/watchdog/omap_wdt.c
include/linux/hwspinlock.h [new file with mode: 0644]
include/linux/i2c/twl.h
include/linux/mtd/onenand_regs.h
sound/soc/omap/omap-mcbsp.c
sound/soc/omap/omap-mcbsp.h

diff --git a/Documentation/hwspinlock.txt b/Documentation/hwspinlock.txt
new file mode 100644 (file)
index 0000000..7dcd1a4
--- /dev/null
@@ -0,0 +1,293 @@
+Hardware Spinlock Framework
+
+1. Introduction
+
+Hardware spinlock modules provide hardware assistance for synchronization
+and mutual exclusion between heterogeneous processors and those not operating
+under a single, shared operating system.
+
+For example, OMAP4 has dual Cortex-A9, dual Cortex-M3 and a C64x+ DSP,
+each of which is running a different Operating System (the master, A9,
+is usually running Linux and the slave processors, the M3 and the DSP,
+are running some flavor of RTOS).
+
+A generic hwspinlock framework allows platform-independent drivers to use
+the hwspinlock device in order to access data structures that are shared
+between remote processors, that otherwise have no alternative mechanism
+to accomplish synchronization and mutual exclusion operations.
+
+This is necessary, for example, for Inter-processor communications:
+on OMAP4, cpu-intensive multimedia tasks are offloaded by the host to the
+remote M3 and/or C64x+ slave processors (by an IPC subsystem called Syslink).
+
+To achieve fast message-based communications, a minimal kernel support
+is needed to deliver messages arriving from a remote processor to the
+appropriate user process.
+
+This communication is based on simple data structures that is shared between
+the remote processors, and access to it is synchronized using the hwspinlock
+module (remote processor directly places new messages in this shared data
+structure).
+
+A common hwspinlock interface makes it possible to have generic, platform-
+independent, drivers.
+
+2. User API
+
+  struct hwspinlock *hwspin_lock_request(void);
+   - dynamically assign an hwspinlock and return its address, or NULL
+     in case an unused hwspinlock isn't available. Users of this
+     API will usually want to communicate the lock's id to the remote core
+     before it can be used to achieve synchronization.
+     Can be called from an atomic context (this function will not sleep) but
+     not from within interrupt context.
+
+  struct hwspinlock *hwspin_lock_request_specific(unsigned int id);
+   - assign a specific hwspinlock id and return its address, or NULL
+     if that hwspinlock is already in use. Usually board code will
+     be calling this function in order to reserve specific hwspinlock
+     ids for predefined purposes.
+     Can be called from an atomic context (this function will not sleep) but
+     not from within interrupt context.
+
+  int hwspin_lock_free(struct hwspinlock *hwlock);
+   - free a previously-assigned hwspinlock; returns 0 on success, or an
+     appropriate error code on failure (e.g. -EINVAL if the hwspinlock
+     is already free).
+     Can be called from an atomic context (this function will not sleep) but
+     not from within interrupt context.
+
+  int hwspin_lock_timeout(struct hwspinlock *hwlock, unsigned int timeout);
+   - lock a previously-assigned hwspinlock with a timeout limit (specified in
+     msecs). If the hwspinlock is already taken, the function will busy loop
+     waiting for it to be released, but give up when the timeout elapses.
+     Upon a successful return from this function, preemption is disabled so
+     the caller must not sleep, and is advised to release the hwspinlock as
+     soon as possible, in order to minimize remote cores polling on the
+     hardware interconnect.
+     Returns 0 when successful and an appropriate error code otherwise (most
+     notably -ETIMEDOUT if the hwspinlock is still busy after timeout msecs).
+     The function will never sleep.
+
+  int hwspin_lock_timeout_irq(struct hwspinlock *hwlock, unsigned int timeout);
+   - lock a previously-assigned hwspinlock with a timeout limit (specified in
+     msecs). If the hwspinlock is already taken, the function will busy loop
+     waiting for it to be released, but give up when the timeout elapses.
+     Upon a successful return from this function, preemption and the local
+     interrupts are disabled, so the caller must not sleep, and is advised to
+     release the hwspinlock as soon as possible.
+     Returns 0 when successful and an appropriate error code otherwise (most
+     notably -ETIMEDOUT if the hwspinlock is still busy after timeout msecs).
+     The function will never sleep.
+
+  int hwspin_lock_timeout_irqsave(struct hwspinlock *hwlock, unsigned int to,
+                                                       unsigned long *flags);
+   - lock a previously-assigned hwspinlock with a timeout limit (specified in
+     msecs). If the hwspinlock is already taken, the function will busy loop
+     waiting for it to be released, but give up when the timeout elapses.
+     Upon a successful return from this function, preemption is disabled,
+     local interrupts are disabled and their previous state is saved at the
+     given flags placeholder. The caller must not sleep, and is advised to
+     release the hwspinlock as soon as possible.
+     Returns 0 when successful and an appropriate error code otherwise (most
+     notably -ETIMEDOUT if the hwspinlock is still busy after timeout msecs).
+     The function will never sleep.
+
+  int hwspin_trylock(struct hwspinlock *hwlock);
+   - attempt to lock a previously-assigned hwspinlock, but immediately fail if
+     it is already taken.
+     Upon a successful return from this function, preemption is disabled so
+     caller must not sleep, and is advised to release the hwspinlock as soon as
+     possible, in order to minimize remote cores polling on the hardware
+     interconnect.
+     Returns 0 on success and an appropriate error code otherwise (most
+     notably -EBUSY if the hwspinlock was already taken).
+     The function will never sleep.
+
+  int hwspin_trylock_irq(struct hwspinlock *hwlock);
+   - attempt to lock a previously-assigned hwspinlock, but immediately fail if
+     it is already taken.
+     Upon a successful return from this function, preemption and the local
+     interrupts are disabled so caller must not sleep, and is advised to
+     release the hwspinlock as soon as possible.
+     Returns 0 on success and an appropriate error code otherwise (most
+     notably -EBUSY if the hwspinlock was already taken).
+     The function will never sleep.
+
+  int hwspin_trylock_irqsave(struct hwspinlock *hwlock, unsigned long *flags);
+   - attempt to lock a previously-assigned hwspinlock, but immediately fail if
+     it is already taken.
+     Upon a successful return from this function, preemption is disabled,
+     the local interrupts are disabled and their previous state is saved
+     at the given flags placeholder. The caller must not sleep, and is advised
+     to release the hwspinlock as soon as possible.
+     Returns 0 on success and an appropriate error code otherwise (most
+     notably -EBUSY if the hwspinlock was already taken).
+     The function will never sleep.
+
+  void hwspin_unlock(struct hwspinlock *hwlock);
+   - unlock a previously-locked hwspinlock. Always succeed, and can be called
+     from any context (the function never sleeps). Note: code should _never_
+     unlock an hwspinlock which is already unlocked (there is no protection
+     against this).
+
+  void hwspin_unlock_irq(struct hwspinlock *hwlock);
+   - unlock a previously-locked hwspinlock and enable local interrupts.
+     The caller should _never_ unlock an hwspinlock which is already unlocked.
+     Doing so is considered a bug (there is no protection against this).
+     Upon a successful return from this function, preemption and local
+     interrupts are enabled. This function will never sleep.
+
+  void
+  hwspin_unlock_irqrestore(struct hwspinlock *hwlock, unsigned long *flags);
+   - unlock a previously-locked hwspinlock.
+     The caller should _never_ unlock an hwspinlock which is already unlocked.
+     Doing so is considered a bug (there is no protection against this).
+     Upon a successful return from this function, preemption is reenabled,
+     and the state of the local interrupts is restored to the state saved at
+     the given flags. This function will never sleep.
+
+  int hwspin_lock_get_id(struct hwspinlock *hwlock);
+   - retrieve id number of a given hwspinlock. This is needed when an
+     hwspinlock is dynamically assigned: before it can be used to achieve
+     mutual exclusion with a remote cpu, the id number should be communicated
+     to the remote task with which we want to synchronize.
+     Returns the hwspinlock id number, or -EINVAL if hwlock is null.
+
+3. Typical usage
+
+#include <linux/hwspinlock.h>
+#include <linux/err.h>
+
+int hwspinlock_example1(void)
+{
+       struct hwspinlock *hwlock;
+       int ret;
+
+       /* dynamically assign a hwspinlock */
+       hwlock = hwspin_lock_request();
+       if (!hwlock)
+               ...
+
+       id = hwspin_lock_get_id(hwlock);
+       /* probably need to communicate id to a remote processor now */
+
+       /* take the lock, spin for 1 sec if it's already taken */
+       ret = hwspin_lock_timeout(hwlock, 1000);
+       if (ret)
+               ...
+
+       /*
+        * we took the lock, do our thing now, but do NOT sleep
+        */
+
+       /* release the lock */
+       hwspin_unlock(hwlock);
+
+       /* free the lock */
+       ret = hwspin_lock_free(hwlock);
+       if (ret)
+               ...
+
+       return ret;
+}
+
+int hwspinlock_example2(void)
+{
+       struct hwspinlock *hwlock;
+       int ret;
+
+       /*
+        * assign a specific hwspinlock id - this should be called early
+        * by board init code.
+        */
+       hwlock = hwspin_lock_request_specific(PREDEFINED_LOCK_ID);
+       if (!hwlock)
+               ...
+
+       /* try to take it, but don't spin on it */
+       ret = hwspin_trylock(hwlock);
+       if (!ret) {
+               pr_info("lock is already taken\n");
+               return -EBUSY;
+       }
+
+       /*
+        * we took the lock, do our thing now, but do NOT sleep
+        */
+
+       /* release the lock */
+       hwspin_unlock(hwlock);
+
+       /* free the lock */
+       ret = hwspin_lock_free(hwlock);
+       if (ret)
+               ...
+
+       return ret;
+}
+
+
+4. API for implementors
+
+  int hwspin_lock_register(struct hwspinlock *hwlock);
+   - to be called from the underlying platform-specific implementation, in
+     order to register a new hwspinlock instance. Can be called from an atomic
+     context (this function will not sleep) but not from within interrupt
+     context. Returns 0 on success, or appropriate error code on failure.
+
+  struct hwspinlock *hwspin_lock_unregister(unsigned int id);
+   - to be called from the underlying vendor-specific implementation, in order
+     to unregister an existing (and unused) hwspinlock instance.
+     Can be called from an atomic context (will not sleep) but not from
+     within interrupt context.
+     Returns the address of hwspinlock on success, or NULL on error (e.g.
+     if the hwspinlock is sill in use).
+
+5. struct hwspinlock
+
+This struct represents an hwspinlock instance. It is registered by the
+underlying hwspinlock implementation using the hwspin_lock_register() API.
+
+/**
+ * struct hwspinlock - vendor-specific hwspinlock implementation
+ *
+ * @dev: underlying device, will be used with runtime PM api
+ * @ops: vendor-specific hwspinlock handlers
+ * @id: a global, unique, system-wide, index of the lock.
+ * @lock: initialized and used by hwspinlock core
+ * @owner: underlying implementation module, used to maintain module ref count
+ */
+struct hwspinlock {
+       struct device *dev;
+       const struct hwspinlock_ops *ops;
+       int id;
+       spinlock_t lock;
+       struct module *owner;
+};
+
+The underlying implementation is responsible to assign the dev, ops, id and
+owner members. The lock member, OTOH, is initialized and used by the hwspinlock
+core.
+
+6. Implementation callbacks
+
+There are three possible callbacks defined in 'struct hwspinlock_ops':
+
+struct hwspinlock_ops {
+       int (*trylock)(struct hwspinlock *lock);
+       void (*unlock)(struct hwspinlock *lock);
+       void (*relax)(struct hwspinlock *lock);
+};
+
+The first two callbacks are mandatory:
+
+The ->trylock() callback should make a single attempt to take the lock, and
+return 0 on failure and 1 on success. This callback may _not_ sleep.
+
+The ->unlock() callback releases the lock. It always succeed, and it, too,
+may _not_ sleep.
+
+The ->relax() callback is optional. It is called by hwspinlock core while
+spinning on a lock, and can be used by the underlying implementation to force
+a delay between two successive invocations of ->trylock(). It may _not_ sleep.
index 391d57e..6e696bd 100644 (file)
@@ -4510,11 +4510,21 @@ S:      Maintained
 F:     arch/arm/*omap*/*clock*
 
 OMAP POWER MANAGEMENT SUPPORT
-M:     Kevin Hilman <khilman@deeprootsystems.com>
+M:     Kevin Hilman <khilman@ti.com>
 L:     linux-omap@vger.kernel.org
 S:     Maintained
 F:     arch/arm/*omap*/*pm*
 
+OMAP POWERDOMAIN/CLOCKDOMAIN SOC ADAPTATION LAYER SUPPORT
+M:     Rajendra Nayak <rnayak@ti.com>
+M:     Paul Walmsley <paul@pwsan.com>
+L:     linux-omap@vger.kernel.org
+S:     Maintained
+F:     arch/arm/mach-omap2/powerdomain2xxx_3xxx.c
+F:     arch/arm/mach-omap2/powerdomain44xx.c
+F:     arch/arm/mach-omap2/clockdomain2xxx_3xxx.c
+F:     arch/arm/mach-omap2/clockdomain44xx.c
+
 OMAP AUDIO SUPPORT
 M:     Jarkko Nikula <jhnikula@gmail.com>
 L:     alsa-devel@alsa-project.org (subscribers-only)
index ae890ca..019fb7c 100644 (file)
@@ -58,6 +58,7 @@ CONFIG_ARM_ERRATA_411920=y
 CONFIG_NO_HZ=y
 CONFIG_HIGH_RES_TIMERS=y
 CONFIG_SMP=y
+CONFIG_NR_CPUS=2
 # CONFIG_LOCAL_TIMERS is not set
 CONFIG_AEABI=y
 CONFIG_LEDS=y
index ba6009f..af98117 100644 (file)
@@ -4,7 +4,7 @@
 
 # Common support
 obj-y := io.o id.o sram.o time.o irq.o mux.o flash.o serial.o devices.o dma.o
-obj-y += clock.o clock_data.o opp_data.o
+obj-y += clock.o clock_data.o opp_data.o reset.o
 
 obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
 
index 22cc8c8..de88c92 100644 (file)
@@ -165,7 +165,7 @@ static struct map_desc ams_delta_io_desc[] __initdata = {
        }
 };
 
-static struct omap_lcd_config ams_delta_lcd_config __initdata = {
+static struct omap_lcd_config ams_delta_lcd_config = {
        .ctrl_name      = "internal",
 };
 
@@ -175,7 +175,7 @@ static struct omap_usb_config ams_delta_usb_config __initdata = {
        .pins[0]        = 2,
 };
 
-static struct omap_board_config_kernel ams_delta_config[] = {
+static struct omap_board_config_kernel ams_delta_config[] __initdata = {
        { OMAP_TAG_LCD,         &ams_delta_lcd_config },
 };
 
@@ -208,14 +208,14 @@ static const struct matrix_keymap_data ams_delta_keymap_data = {
        .keymap_size    = ARRAY_SIZE(ams_delta_keymap),
 };
 
-static struct omap_kp_platform_data ams_delta_kp_data = {
+static struct omap_kp_platform_data ams_delta_kp_data __initdata = {
        .rows           = 8,
        .cols           = 8,
        .keymap_data    = &ams_delta_keymap_data,
        .delay          = 9,
 };
 
-static struct platform_device ams_delta_kp_device = {
+static struct platform_device ams_delta_kp_device __initdata = {
        .name           = "omap-keypad",
        .id             = -1,
        .dev            = {
@@ -225,12 +225,12 @@ static struct platform_device ams_delta_kp_device = {
        .resource       = ams_delta_kp_resources,
 };
 
-static struct platform_device ams_delta_lcd_device = {
+static struct platform_device ams_delta_lcd_device __initdata = {
        .name   = "lcd_ams_delta",
        .id     = -1,
 };
 
-static struct platform_device ams_delta_led_device = {
+static struct platform_device ams_delta_led_device __initdata = {
        .name   = "ams-delta-led",
        .id     = -1
 };
@@ -259,7 +259,7 @@ static int ams_delta_camera_power(struct device *dev, int power)
 #define ams_delta_camera_power NULL
 #endif
 
-static struct soc_camera_link __initdata ams_delta_iclink = {
+static struct soc_camera_link ams_delta_iclink = {
        .bus_id         = 0,    /* OMAP1 SoC camera bus */
        .i2c_adapter_id = 1,
        .board_info     = &ams_delta_camera_board_info[0],
@@ -267,7 +267,7 @@ static struct soc_camera_link __initdata ams_delta_iclink = {
        .power          = ams_delta_camera_power,
 };
 
-static struct platform_device ams_delta_camera_device = {
+static struct platform_device ams_delta_camera_device __initdata = {
        .name   = "soc-camera-pdrv",
        .id     = 0,
        .dev    = {
index 0efb9db..87f173d 100644 (file)
@@ -287,11 +287,11 @@ static struct platform_device *devices[] __initdata = {
        &lcd_device,
 };
 
-static struct omap_lcd_config fsample_lcd_config __initdata = {
+static struct omap_lcd_config fsample_lcd_config = {
        .ctrl_name      = "internal",
 };
 
-static struct omap_board_config_kernel fsample_config[] = {
+static struct omap_board_config_kernel fsample_config[] __initdata = {
        { OMAP_TAG_LCD,         &fsample_lcd_config },
 };
 
index 28b84aa..ba3bd09 100644 (file)
@@ -202,7 +202,7 @@ static int h2_nand_dev_ready(struct mtd_info *mtd)
 
 static const char *h2_part_probes[] = { "cmdlinepart", NULL };
 
-struct platform_nand_data h2_nand_platdata = {
+static struct platform_nand_data h2_nand_platdata = {
        .chip   = {
                .nr_chips               = 1,
                .chip_offset            = 0,
index dbc8b8d..ac48677 100644 (file)
@@ -204,7 +204,7 @@ static int nand_dev_ready(struct mtd_info *mtd)
 
 static const char *part_probes[] = { "cmdlinepart", NULL };
 
-struct platform_nand_data nand_platdata = {
+static struct platform_nand_data nand_platdata = {
        .chip   = {
                .nr_chips               = 1,
                .chip_offset            = 0,
index f2c5c58..ba05a51 100644 (file)
@@ -331,7 +331,7 @@ static struct resource htcpld_resources[] = {
        },
 };
 
-struct htcpld_chip_platform_data htcpld_chips[] = {
+static struct htcpld_chip_platform_data htcpld_chips[] = {
        [0] = {
                .addr           = 0x03,
                .reset          = 0x04,
@@ -366,7 +366,7 @@ struct htcpld_chip_platform_data htcpld_chips[] = {
        },
 };
 
-struct htcpld_core_platform_data htcpld_pfdata = {
+static struct htcpld_core_platform_data htcpld_pfdata = {
        .int_reset_gpio_hi = HTCPLD_GPIO_INT_RESET_HI,
        .int_reset_gpio_lo = HTCPLD_GPIO_INT_RESET_LO,
        .i2c_adapter_id    = 1,
index a36e674..2d9b8cb 100644 (file)
@@ -365,7 +365,7 @@ static struct omap_mmc_platform_data mmc1_data = {
 
 static struct omap_mmc_platform_data *mmc_data[OMAP16XX_NR_MMC];
 
-void __init innovator_mmc_init(void)
+static void __init innovator_mmc_init(void)
 {
        mmc_data[0] = &mmc1_data;
        omap1_init_mmc(mmc_data, OMAP15XX_NR_MMC);
index d21f09d..cfd0849 100644 (file)
@@ -115,7 +115,7 @@ static struct mipid_platform_data nokia770_mipid_platform_data = {
        .shutdown = mipid_shutdown,
 };
 
-static void mipid_dev_init(void)
+static void __init mipid_dev_init(void)
 {
        const struct omap_lcd_config *conf;
 
@@ -126,7 +126,7 @@ static void mipid_dev_init(void)
        }
 }
 
-static void ads7846_dev_init(void)
+static void __init ads7846_dev_init(void)
 {
        if (gpio_request(ADS7846_PENDOWN_GPIO, "ADS7846 pendown") < 0)
                printk(KERN_ERR "can't get ads7846 pen down GPIO\n");
@@ -170,7 +170,7 @@ static struct hwa742_platform_data nokia770_hwa742_platform_data = {
        .te_connected           = 1,
 };
 
-static void hwa742_dev_init(void)
+static void __init hwa742_dev_init(void)
 {
        clk_add_alias("hwa_sys_ck", NULL, "bclk", NULL);
        omapfb_set_ctrl_platform_data(&nokia770_hwa742_platform_data);
index fb51ce6..c9d38f4 100644 (file)
@@ -230,19 +230,6 @@ static struct spi_board_info palmte_spi_info[] __initdata = {
        },
 };
 
-static void palmte_headphones_detect(void *data, int state)
-{
-       if (state) {
-               /* Headphones connected, disable speaker */
-               gpio_set_value(PALMTE_SPEAKER_GPIO, 0);
-               printk(KERN_INFO "PM: speaker off\n");
-       } else {
-               /* Headphones unplugged, re-enable speaker */
-               gpio_set_value(PALMTE_SPEAKER_GPIO, 1);
-               printk(KERN_INFO "PM: speaker on\n");
-       }
-}
-
 static void __init palmte_misc_gpio_setup(void)
 {
        /* Set TSC2102 PINTDAV pin as input (used by TSC2102 driver) */
index 815a69c..bdc0ac8 100644 (file)
 #include <linux/smc91x.h>
 
 #include <mach/hardware.h>
+#include <mach/system.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
+#include <plat/board-voiceblue.h>
 #include <plat/common.h>
 #include <mach/gpio.h>
 #include <plat/flash.h>
@@ -163,52 +165,6 @@ static void __init voiceblue_init_irq(void)
        omap_init_irq();
 }
 
-static void __init voiceblue_init(void)
-{
-       /* mux pins for uarts */
-       omap_cfg_reg(UART1_TX);
-       omap_cfg_reg(UART1_RTS);
-       omap_cfg_reg(UART2_TX);
-       omap_cfg_reg(UART2_RTS);
-       omap_cfg_reg(UART3_TX);
-       omap_cfg_reg(UART3_RX);
-
-       /* Watchdog */
-       gpio_request(0, "Watchdog");
-       /* smc91x reset */
-       gpio_request(7, "SMC91x reset");
-       gpio_direction_output(7, 1);
-       udelay(2);      /* wait at least 100ns */
-       gpio_set_value(7, 0);
-       mdelay(50);     /* 50ms until PHY ready */
-       /* smc91x interrupt pin */
-       gpio_request(8, "SMC91x irq");
-       /* 16C554 reset*/
-       gpio_request(6, "16C554 reset");
-       gpio_direction_output(6, 0);
-       /* 16C554 interrupt pins */
-       gpio_request(12, "16C554 irq");
-       gpio_request(13, "16C554 irq");
-       gpio_request(14, "16C554 irq");
-       gpio_request(15, "16C554 irq");
-       set_irq_type(gpio_to_irq(12), IRQ_TYPE_EDGE_RISING);
-       set_irq_type(gpio_to_irq(13), IRQ_TYPE_EDGE_RISING);
-       set_irq_type(gpio_to_irq(14), IRQ_TYPE_EDGE_RISING);
-       set_irq_type(gpio_to_irq(15), IRQ_TYPE_EDGE_RISING);
-
-       platform_add_devices(voiceblue_devices, ARRAY_SIZE(voiceblue_devices));
-       omap_board_config = voiceblue_config;
-       omap_board_config_size = ARRAY_SIZE(voiceblue_config);
-       omap_serial_init();
-       omap1_usb_init(&voiceblue_usb_config);
-       omap_register_i2c_bus(1, 100, NULL, 0);
-
-       /* There is a good chance board is going up, so enable power LED
-        * (it is connected through invertor) */
-       omap_writeb(0x00, OMAP_LPG1_LCR);
-       omap_writeb(0x00, OMAP_LPG1_PMR);       /* Disable clock */
-}
-
 static void __init voiceblue_map_io(void)
 {
        omap1_map_common_io();
@@ -275,8 +231,17 @@ void voiceblue_wdt_ping(void)
        gpio_set_value(0, wdt_gpio_state);
 }
 
-void voiceblue_reset(void)
+static void voiceblue_reset(char mode, const char *cmd)
 {
+       /*
+        * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
+        * "Global Software Reset Affects Traffic Controller Frequency".
+        */
+       if (cpu_is_omap5912()) {
+               omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4), DPLL_CTL);
+               omap_writew(0x8, ARM_RSTCT1);
+       }
+
        set_bit(MACHINE_REBOOT, &machine_state);
        voiceblue_wdt_enable();
        while (1) ;
@@ -286,6 +251,54 @@ EXPORT_SYMBOL(voiceblue_wdt_enable);
 EXPORT_SYMBOL(voiceblue_wdt_disable);
 EXPORT_SYMBOL(voiceblue_wdt_ping);
 
+static void __init voiceblue_init(void)
+{
+       /* mux pins for uarts */
+       omap_cfg_reg(UART1_TX);
+       omap_cfg_reg(UART1_RTS);
+       omap_cfg_reg(UART2_TX);
+       omap_cfg_reg(UART2_RTS);
+       omap_cfg_reg(UART3_TX);
+       omap_cfg_reg(UART3_RX);
+
+       /* Watchdog */
+       gpio_request(0, "Watchdog");
+       /* smc91x reset */
+       gpio_request(7, "SMC91x reset");
+       gpio_direction_output(7, 1);
+       udelay(2);      /* wait at least 100ns */
+       gpio_set_value(7, 0);
+       mdelay(50);     /* 50ms until PHY ready */
+       /* smc91x interrupt pin */
+       gpio_request(8, "SMC91x irq");
+       /* 16C554 reset*/
+       gpio_request(6, "16C554 reset");
+       gpio_direction_output(6, 0);
+       /* 16C554 interrupt pins */
+       gpio_request(12, "16C554 irq");
+       gpio_request(13, "16C554 irq");
+       gpio_request(14, "16C554 irq");
+       gpio_request(15, "16C554 irq");
+       set_irq_type(gpio_to_irq(12), IRQ_TYPE_EDGE_RISING);
+       set_irq_type(gpio_to_irq(13), IRQ_TYPE_EDGE_RISING);
+       set_irq_type(gpio_to_irq(14), IRQ_TYPE_EDGE_RISING);
+       set_irq_type(gpio_to_irq(15), IRQ_TYPE_EDGE_RISING);
+
+       platform_add_devices(voiceblue_devices, ARRAY_SIZE(voiceblue_devices));
+       omap_board_config = voiceblue_config;
+       omap_board_config_size = ARRAY_SIZE(voiceblue_config);
+       omap_serial_init();
+       omap1_usb_init(&voiceblue_usb_config);
+       omap_register_i2c_bus(1, 100, NULL, 0);
+
+       /* There is a good chance board is going up, so enable power LED
+        * (it is connected through invertor) */
+       omap_writeb(0x00, OMAP_LPG1_LCR);
+       omap_writeb(0x00, OMAP_LPG1_PMR);       /* Disable clock */
+
+       arch_reset = voiceblue_reset;
+}
+
 MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910")
        /* Maintainer: Ladislav Michl <michl@2n.cz> */
        .boot_params    = 0x10000100,
index 8209736..d9af981 100644 (file)
@@ -10,6 +10,7 @@
  *
  * Multichannel mode not supported.
  */
+#include <linux/ioport.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/clk.h>
@@ -78,100 +79,294 @@ static struct omap_mcbsp_ops omap1_mcbsp_ops = {
 };
 
 #if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
+struct resource omap7xx_mcbsp_res[][6] = {
+       {
+               {
+                       .start = OMAP7XX_MCBSP1_BASE,
+                       .end   = OMAP7XX_MCBSP1_BASE + SZ_256,
+                       .flags = IORESOURCE_MEM,
+               },
+               {
+                       .name  = "rx",
+                       .start = INT_7XX_McBSP1RX,
+                       .flags = IORESOURCE_IRQ,
+               },
+               {
+                       .name  = "tx",
+                       .start = INT_7XX_McBSP1TX,
+                       .flags = IORESOURCE_IRQ,
+               },
+               {
+                       .name  = "rx",
+                       .start = OMAP_DMA_MCBSP1_RX,
+                       .flags = IORESOURCE_DMA,
+               },
+               {
+                       .name  = "tx",
+                       .start = OMAP_DMA_MCBSP1_TX,
+                       .flags = IORESOURCE_DMA,
+               },
+       },
+       {
+               {
+                       .start = OMAP7XX_MCBSP2_BASE,
+                       .end   = OMAP7XX_MCBSP2_BASE + SZ_256,
+                       .flags = IORESOURCE_MEM,
+               },
+               {
+                       .name  = "rx",
+                       .start = INT_7XX_McBSP2RX,
+                       .flags = IORESOURCE_IRQ,
+               },
+               {
+                       .name  = "tx",
+                       .start = INT_7XX_McBSP2TX,
+                       .flags = IORESOURCE_IRQ,
+               },
+               {
+                       .name  = "rx",
+                       .start = OMAP_DMA_MCBSP3_RX,
+                       .flags = IORESOURCE_DMA,
+               },
+               {
+                       .name  = "tx",
+                       .start = OMAP_DMA_MCBSP3_TX,
+                       .flags = IORESOURCE_DMA,
+               },
+       },
+};
+
+#define omap7xx_mcbsp_res_0            omap7xx_mcbsp_res[0]
+
 static struct omap_mcbsp_platform_data omap7xx_mcbsp_pdata[] = {
        {
-               .phys_base      = OMAP7XX_MCBSP1_BASE,
-               .dma_rx_sync    = OMAP_DMA_MCBSP1_RX,
-               .dma_tx_sync    = OMAP_DMA_MCBSP1_TX,
-               .rx_irq         = INT_7XX_McBSP1RX,
-               .tx_irq         = INT_7XX_McBSP1TX,
                .ops            = &omap1_mcbsp_ops,
        },
        {
-               .phys_base      = OMAP7XX_MCBSP2_BASE,
-               .dma_rx_sync    = OMAP_DMA_MCBSP3_RX,
-               .dma_tx_sync    = OMAP_DMA_MCBSP3_TX,
-               .rx_irq         = INT_7XX_McBSP2RX,
-               .tx_irq         = INT_7XX_McBSP2TX,
                .ops            = &omap1_mcbsp_ops,
        },
 };
-#define OMAP7XX_MCBSP_PDATA_SZ         ARRAY_SIZE(omap7xx_mcbsp_pdata)
-#define OMAP7XX_MCBSP_REG_NUM          (OMAP_MCBSP_REG_XCERH / sizeof(u16) + 1)
+#define OMAP7XX_MCBSP_RES_SZ           ARRAY_SIZE(omap7xx_mcbsp_res[1])
+#define OMAP7XX_MCBSP_COUNT            ARRAY_SIZE(omap7xx_mcbsp_res)
 #else
+#define omap7xx_mcbsp_res_0            NULL
 #define omap7xx_mcbsp_pdata            NULL
-#define OMAP7XX_MCBSP_PDATA_SZ         0
-#define OMAP7XX_MCBSP_REG_NUM          0
+#define OMAP7XX_MCBSP_RES_SZ           0
+#define OMAP7XX_MCBSP_COUNT            0
 #endif
 
 #ifdef CONFIG_ARCH_OMAP15XX
+struct resource omap15xx_mcbsp_res[][6] = {
+       {
+               {
+                       .start = OMAP1510_MCBSP1_BASE,
+                       .end   = OMAP1510_MCBSP1_BASE + SZ_256,
+                       .flags = IORESOURCE_MEM,
+               },
+               {
+                       .name  = "rx",
+                       .start = INT_McBSP1RX,
+                       .flags = IORESOURCE_IRQ,
+               },
+               {
+                       .name  = "tx",
+                       .start = INT_McBSP1TX,
+                       .flags = IORESOURCE_IRQ,
+               },
+               {
+                       .name  = "rx",
+                       .start = OMAP_DMA_MCBSP1_RX,
+                       .flags = IORESOURCE_DMA,
+               },
+               {
+                       .name  = "tx",
+                       .start = OMAP_DMA_MCBSP1_TX,
+                       .flags = IORESOURCE_DMA,
+               },
+       },
+       {
+               {
+                       .start = OMAP1510_MCBSP2_BASE,
+                       .end   = OMAP1510_MCBSP2_BASE + SZ_256,
+                       .flags = IORESOURCE_MEM,
+               },
+               {
+                       .name  = "rx",
+                       .start = INT_1510_SPI_RX,
+                       .flags = IORESOURCE_IRQ,
+               },
+               {
+                       .name  = "tx",
+                       .start = INT_1510_SPI_TX,
+                       .flags = IORESOURCE_IRQ,
+               },
+               {
+                       .name  = "rx",
+                       .start = OMAP_DMA_MCBSP2_RX,
+                       .flags = IORESOURCE_DMA,
+               },
+               {
+                       .name  = "tx",
+                       .start = OMAP_DMA_MCBSP2_TX,
+                       .flags = IORESOURCE_DMA,
+               },
+       },
+       {
+               {
+                       .start = OMAP1510_MCBSP3_BASE,
+                       .end   = OMAP1510_MCBSP3_BASE + SZ_256,
+                       .flags = IORESOURCE_MEM,
+               },
+               {
+                       .name  = "rx",
+                       .start = INT_McBSP3RX,
+                       .flags = IORESOURCE_IRQ,
+               },
+               {
+                       .name  = "tx",
+                       .start = INT_McBSP3TX,
+                       .flags = IORESOURCE_IRQ,
+               },
+               {
+                       .name  = "rx",
+                       .start = OMAP_DMA_MCBSP3_RX,
+                       .flags = IORESOURCE_DMA,
+               },
+               {
+                       .name  = "tx",
+                       .start = OMAP_DMA_MCBSP3_TX,
+                       .flags = IORESOURCE_DMA,
+               },
+       },
+};
+
+#define omap15xx_mcbsp_res_0           omap15xx_mcbsp_res[0]
+
 static struct omap_mcbsp_platform_data omap15xx_mcbsp_pdata[] = {
        {
-               .phys_base      = OMAP1510_MCBSP1_BASE,
-               .dma_rx_sync    = OMAP_DMA_MCBSP1_RX,
-               .dma_tx_sync    = OMAP_DMA_MCBSP1_TX,
-               .rx_irq         = INT_McBSP1RX,
-               .tx_irq         = INT_McBSP1TX,
                .ops            = &omap1_mcbsp_ops,
        },
        {
-               .phys_base      = OMAP1510_MCBSP2_BASE,
-               .dma_rx_sync    = OMAP_DMA_MCBSP2_RX,
-               .dma_tx_sync    = OMAP_DMA_MCBSP2_TX,
-               .rx_irq         = INT_1510_SPI_RX,
-               .tx_irq         = INT_1510_SPI_TX,
                .ops            = &omap1_mcbsp_ops,
        },
        {
-               .phys_base      = OMAP1510_MCBSP3_BASE,
-               .dma_rx_sync    = OMAP_DMA_MCBSP3_RX,
-               .dma_tx_sync    = OMAP_DMA_MCBSP3_TX,
-               .rx_irq         = INT_McBSP3RX,
-               .tx_irq         = INT_McBSP3TX,
                .ops            = &omap1_mcbsp_ops,
        },
 };
-#define OMAP15XX_MCBSP_PDATA_SZ                ARRAY_SIZE(omap15xx_mcbsp_pdata)
-#define OMAP15XX_MCBSP_REG_NUM         (OMAP_MCBSP_REG_XCERH / sizeof(u16) + 1)
+#define OMAP15XX_MCBSP_RES_SZ          ARRAY_SIZE(omap15xx_mcbsp_res[1])
+#define OMAP15XX_MCBSP_COUNT           ARRAY_SIZE(omap15xx_mcbsp_res)
 #else
+#define omap15xx_mcbsp_res_0           NULL
 #define omap15xx_mcbsp_pdata           NULL
-#define OMAP15XX_MCBSP_PDATA_SZ                0
-#define OMAP15XX_MCBSP_REG_NUM         0
+#define OMAP15XX_MCBSP_RES_SZ          0
+#define OMAP15XX_MCBSP_COUNT           0
 #endif
 
 #ifdef CONFIG_ARCH_OMAP16XX
+struct resource omap16xx_mcbsp_res[][6] = {
+       {
+               {
+                       .start = OMAP1610_MCBSP1_BASE,
+                       .end   = OMAP1610_MCBSP1_BASE + SZ_256,
+                       .flags = IORESOURCE_MEM,
+               },
+               {
+                       .name  = "rx",
+                       .start = INT_McBSP1RX,
+                       .flags = IORESOURCE_IRQ,
+               },
+               {
+                       .name  = "tx",
+                       .start = INT_McBSP1TX,
+                       .flags = IORESOURCE_IRQ,
+               },
+               {
+                       .name  = "rx",
+                       .start = OMAP_DMA_MCBSP1_RX,
+                       .flags = IORESOURCE_DMA,
+               },
+               {
+                       .name  = "tx",
+                       .start = OMAP_DMA_MCBSP1_TX,
+                       .flags = IORESOURCE_DMA,
+               },
+       },
+       {
+               {
+                       .start = OMAP1610_MCBSP2_BASE,
+                       .end   = OMAP1610_MCBSP2_BASE + SZ_256,
+                       .flags = IORESOURCE_MEM,
+               },
+               {
+                       .name  = "rx",
+                       .start = INT_1610_McBSP2_RX,
+                       .flags = IORESOURCE_IRQ,
+               },
+               {
+                       .name  = "tx",
+                       .start = INT_1610_McBSP2_TX,
+                       .flags = IORESOURCE_IRQ,
+               },
+               {
+                       .name  = "rx",
+                       .start = OMAP_DMA_MCBSP2_RX,
+                       .flags = IORESOURCE_DMA,
+               },
+               {
+                       .name  = "tx",
+                       .start = OMAP_DMA_MCBSP2_TX,
+                       .flags = IORESOURCE_DMA,
+               },
+       },
+       {
+               {
+                       .start = OMAP1610_MCBSP3_BASE,
+                       .end   = OMAP1610_MCBSP3_BASE + SZ_256,
+                       .flags = IORESOURCE_MEM,
+               },
+               {
+                       .name  = "rx",
+                       .start = INT_McBSP3RX,
+                       .flags = IORESOURCE_IRQ,
+               },
+               {
+                       .name  = "tx",
+                       .start = INT_McBSP3TX,
+                       .flags = IORESOURCE_IRQ,
+               },
+               {
+                       .name  = "rx",
+                       .start = OMAP_DMA_MCBSP3_RX,
+                       .flags = IORESOURCE_DMA,
+               },
+               {
+                       .name  = "tx",
+                       .start = OMAP_DMA_MCBSP3_TX,
+                       .flags = IORESOURCE_DMA,
+               },
+       },
+};
+
+#define omap16xx_mcbsp_res_0           omap16xx_mcbsp_res[0]
+
 static struct omap_mcbsp_platform_data omap16xx_mcbsp_pdata[] = {
        {
-               .phys_base      = OMAP1610_MCBSP1_BASE,
-               .dma_rx_sync    = OMAP_DMA_MCBSP1_RX,
-               .dma_tx_sync    = OMAP_DMA_MCBSP1_TX,
-               .rx_irq         = INT_McBSP1RX,
-               .tx_irq         = INT_McBSP1TX,
                .ops            = &omap1_mcbsp_ops,
        },
        {
-               .phys_base      = OMAP1610_MCBSP2_BASE,
-               .dma_rx_sync    = OMAP_DMA_MCBSP2_RX,
-               .dma_tx_sync    = OMAP_DMA_MCBSP2_TX,
-               .rx_irq         = INT_1610_McBSP2_RX,
-               .tx_irq         = INT_1610_McBSP2_TX,
                .ops            = &omap1_mcbsp_ops,
        },
        {
-               .phys_base      = OMAP1610_MCBSP3_BASE,
-               .dma_rx_sync    = OMAP_DMA_MCBSP3_RX,
-               .dma_tx_sync    = OMAP_DMA_MCBSP3_TX,
-               .rx_irq         = INT_McBSP3RX,
-               .tx_irq         = INT_McBSP3TX,
                .ops            = &omap1_mcbsp_ops,
        },
 };
-#define OMAP16XX_MCBSP_PDATA_SZ                ARRAY_SIZE(omap16xx_mcbsp_pdata)
-#define OMAP16XX_MCBSP_REG_NUM         (OMAP_MCBSP_REG_XCERH / sizeof(u16) + 1)
+#define OMAP16XX_MCBSP_RES_SZ          ARRAY_SIZE(omap16xx_mcbsp_res[1])
+#define OMAP16XX_MCBSP_COUNT           ARRAY_SIZE(omap16xx_mcbsp_res)
 #else
+#define omap16xx_mcbsp_res_0           NULL
 #define omap16xx_mcbsp_pdata           NULL
-#define OMAP16XX_MCBSP_PDATA_SZ                0
-#define OMAP16XX_MCBSP_REG_NUM         0
+#define OMAP16XX_MCBSP_RES_SZ          0
+#define OMAP16XX_MCBSP_COUNT           0
 #endif
 
 static int __init omap1_mcbsp_init(void)
@@ -179,16 +374,12 @@ static int __init omap1_mcbsp_init(void)
        if (!cpu_class_is_omap1())
                return -ENODEV;
 
-       if (cpu_is_omap7xx()) {
-               omap_mcbsp_count = OMAP7XX_MCBSP_PDATA_SZ;
-               omap_mcbsp_cache_size = OMAP7XX_MCBSP_REG_NUM * sizeof(u16);
-       } else if (cpu_is_omap15xx()) {
-               omap_mcbsp_count = OMAP15XX_MCBSP_PDATA_SZ;
-               omap_mcbsp_cache_size = OMAP15XX_MCBSP_REG_NUM * sizeof(u16);
-       } else if (cpu_is_omap16xx()) {
-               omap_mcbsp_count = OMAP16XX_MCBSP_PDATA_SZ;
-               omap_mcbsp_cache_size = OMAP16XX_MCBSP_REG_NUM * sizeof(u16);
-       }
+       if (cpu_is_omap7xx())
+               omap_mcbsp_count = OMAP7XX_MCBSP_COUNT;
+       else if (cpu_is_omap15xx())
+               omap_mcbsp_count = OMAP15XX_MCBSP_COUNT;
+       else if (cpu_is_omap16xx())
+               omap_mcbsp_count = OMAP16XX_MCBSP_COUNT;
 
        mcbsp_ptr = kzalloc(omap_mcbsp_count * sizeof(struct omap_mcbsp *),
                                                                GFP_KERNEL);
@@ -196,16 +387,22 @@ static int __init omap1_mcbsp_init(void)
                return -ENOMEM;
 
        if (cpu_is_omap7xx())
-               omap_mcbsp_register_board_cfg(omap7xx_mcbsp_pdata,
-                                               OMAP7XX_MCBSP_PDATA_SZ);
+               omap_mcbsp_register_board_cfg(omap7xx_mcbsp_res_0,
+                                       OMAP7XX_MCBSP_RES_SZ,
+                                       omap7xx_mcbsp_pdata,
+                                       OMAP7XX_MCBSP_COUNT);
 
        if (cpu_is_omap15xx())
-               omap_mcbsp_register_board_cfg(omap15xx_mcbsp_pdata,
-                                               OMAP15XX_MCBSP_PDATA_SZ);
+               omap_mcbsp_register_board_cfg(omap15xx_mcbsp_res_0,
+                                       OMAP15XX_MCBSP_RES_SZ,
+                                       omap15xx_mcbsp_pdata,
+                                       OMAP15XX_MCBSP_COUNT);
 
        if (cpu_is_omap16xx())
-               omap_mcbsp_register_board_cfg(omap16xx_mcbsp_pdata,
-                                               OMAP16XX_MCBSP_PDATA_SZ);
+               omap_mcbsp_register_board_cfg(omap16xx_mcbsp_res_0,
+                                       OMAP16XX_MCBSP_RES_SZ,
+                                       omap16xx_mcbsp_pdata,
+                                       OMAP16XX_MCBSP_COUNT);
 
        return omap_mcbsp_init();
 }
diff --git a/arch/arm/mach-omap1/reset.c b/arch/arm/mach-omap1/reset.c
new file mode 100644 (file)
index 0000000..ad951ee
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * OMAP1 reset support
+ */
+#include <linux/kernel.h>
+#include <linux/io.h>
+
+#include <mach/hardware.h>
+#include <mach/system.h>
+#include <plat/prcm.h>
+
+void omap1_arch_reset(char mode, const char *cmd)
+{
+       /*
+        * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
+        * "Global Software Reset Affects Traffic Controller Frequency".
+        */
+       if (cpu_is_omap5912()) {
+               omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4), DPLL_CTL);
+               omap_writew(0x8, ARM_RSTCT1);
+       }
+
+       omap_writew(1, ARM_RSTCT1);
+}
+
+void (*arch_reset)(char, const char *) = omap1_arch_reset;
index b69fa0a..eeab35d 100644 (file)
@@ -54,25 +54,30 @@ config ARCH_OMAP4
 comment "OMAP Core Type"
        depends on ARCH_OMAP2
 
-config ARCH_OMAP2420
+config SOC_OMAP2420
        bool "OMAP2420 support"
        depends on ARCH_OMAP2
        default y
        select OMAP_DM_TIMER
        select ARCH_OMAP_OTG
 
-config ARCH_OMAP2430
+config SOC_OMAP2430
        bool "OMAP2430 support"
        depends on ARCH_OMAP2
        default y
        select ARCH_OMAP_OTG
 
-config ARCH_OMAP3430
+config SOC_OMAP3430
        bool "OMAP3430 support"
        depends on ARCH_OMAP3
        default y
        select ARCH_OMAP_OTG
 
+config SOC_OMAPTI816X
+       bool "TI816X support"
+       depends on ARCH_OMAP3
+       default y
+
 config OMAP_PACKAGE_ZAF
        bool
 
@@ -107,25 +112,25 @@ config MACH_OMAP_GENERIC
 
 config MACH_OMAP2_TUSB6010
        bool
-       depends on ARCH_OMAP2 && ARCH_OMAP2420
+       depends on ARCH_OMAP2 && SOC_OMAP2420
        default y if MACH_NOKIA_N8X0
 
 config MACH_OMAP_H4
        bool "OMAP 2420 H4 board"
-       depends on ARCH_OMAP2420
+       depends on SOC_OMAP2420
        default y
        select OMAP_PACKAGE_ZAF
        select OMAP_DEBUG_DEVICES
 
 config MACH_OMAP_APOLLON
        bool "OMAP 2420 Apollon board"
-       depends on ARCH_OMAP2420
+       depends on SOC_OMAP2420
        default y
        select OMAP_PACKAGE_ZAC
 
 config MACH_OMAP_2430SDP
        bool "OMAP 2430 SDP board"
-       depends on ARCH_OMAP2430
+       depends on SOC_OMAP2430
        default y
        select OMAP_PACKAGE_ZAC
 
@@ -220,7 +225,7 @@ config MACH_NOKIA_N810_WIMAX
 
 config MACH_NOKIA_N8X0
        bool "Nokia N800/N810"
-       depends on ARCH_OMAP2420
+       depends on SOC_OMAP2420
        default y
        select OMAP_PACKAGE_ZAC
        select MACH_NOKIA_N800
@@ -295,12 +300,18 @@ config MACH_OMAP_3630SDP
        default y
        select OMAP_PACKAGE_CBP
 
+config MACH_TI8168EVM
+       bool "TI8168 Evaluation Module"
+       depends on SOC_OMAPTI816X
+       default y
+
 config MACH_OMAP_4430SDP
        bool "OMAP 4430 SDP board"
        default y
        depends on ARCH_OMAP4
        select OMAP_PACKAGE_CBL
        select OMAP_PACKAGE_CBS
+       select REGULATOR_FIXED_VOLTAGE
 
 config MACH_OMAP4_PANDA
        bool "OMAP4 Panda Board"
@@ -308,6 +319,7 @@ config MACH_OMAP4_PANDA
        depends on ARCH_OMAP4
        select OMAP_PACKAGE_CBL
        select OMAP_PACKAGE_CBS
+       select REGULATOR_FIXED_VOLTAGE
 
 config OMAP3_EMU
        bool "OMAP3 debugging peripherals"
index 64dc417..a45cd64 100644 (file)
@@ -31,8 +31,8 @@ AFLAGS_omap-headsmp.o                 :=-Wa,-march=armv7-a$(plus_sec)
 AFLAGS_omap44xx-smc.o                  :=-Wa,-march=armv7-a$(plus_sec)
 
 # Functions loaded to SRAM
-obj-$(CONFIG_ARCH_OMAP2420)            += sram242x.o
-obj-$(CONFIG_ARCH_OMAP2430)            += sram243x.o
+obj-$(CONFIG_SOC_OMAP2420)             += sram242x.o
+obj-$(CONFIG_SOC_OMAP2430)             += sram243x.o
 obj-$(CONFIG_ARCH_OMAP3)               += sram34xx.o
 
 AFLAGS_sram242x.o                      :=-Wa,-march=armv6
@@ -40,8 +40,8 @@ AFLAGS_sram243x.o                     :=-Wa,-march=armv6
 AFLAGS_sram34xx.o                      :=-Wa,-march=armv7-a
 
 # Pin multiplexing
-obj-$(CONFIG_ARCH_OMAP2420)            += mux2420.o
-obj-$(CONFIG_ARCH_OMAP2430)            += mux2430.o
+obj-$(CONFIG_SOC_OMAP2420)             += mux2420.o
+obj-$(CONFIG_SOC_OMAP2430)             += mux2430.o
 obj-$(CONFIG_ARCH_OMAP3)               += mux34xx.o
 obj-$(CONFIG_ARCH_OMAP4)               += mux44xx.o
 
@@ -59,10 +59,10 @@ endif
 # Power Management
 ifeq ($(CONFIG_PM),y)
 obj-$(CONFIG_ARCH_OMAP2)               += pm24xx.o
-obj-$(CONFIG_ARCH_OMAP2)               += sleep24xx.o pm_bus.o voltage.o
-obj-$(CONFIG_ARCH_OMAP3)               += pm34xx.o sleep34xx.o voltage.o \
+obj-$(CONFIG_ARCH_OMAP2)               += sleep24xx.o pm_bus.o
+obj-$(CONFIG_ARCH_OMAP3)               += pm34xx.o sleep34xx.o \
                                           cpuidle34xx.o pm_bus.o
-obj-$(CONFIG_ARCH_OMAP4)               += pm44xx.o voltage.o pm_bus.o
+obj-$(CONFIG_ARCH_OMAP4)               += pm44xx.o pm_bus.o
 obj-$(CONFIG_PM_DEBUG)                 += pm-debug.o
 obj-$(CONFIG_OMAP_SMARTREFLEX)          += sr_device.o smartreflex.o
 obj-$(CONFIG_OMAP_SMARTREFLEX_CLASS3)  += smartreflex-class3.o
@@ -78,13 +78,25 @@ endif
 
 # PRCM
 obj-$(CONFIG_ARCH_OMAP2)               += prcm.o cm2xxx_3xxx.o prm2xxx_3xxx.o
-obj-$(CONFIG_ARCH_OMAP3)               += prcm.o cm2xxx_3xxx.o prm2xxx_3xxx.o
+obj-$(CONFIG_ARCH_OMAP3)               += prcm.o cm2xxx_3xxx.o prm2xxx_3xxx.o \
+                                          vc3xxx_data.o vp3xxx_data.o
 # XXX The presence of cm2xxx_3xxx.o on the line below is temporary and
 # will be removed once the OMAP4 part of the codebase is converted to
 # use OMAP4-specific PRCM functions.
 obj-$(CONFIG_ARCH_OMAP4)               += prcm.o cm2xxx_3xxx.o cminst44xx.o \
                                           cm44xx.o prcm_mpu44xx.o \
-                                          prminst44xx.o
+                                          prminst44xx.o vc44xx_data.o \
+                                          vp44xx_data.o
+
+# OMAP voltage domains
+ifeq ($(CONFIG_PM),y)
+voltagedomain-common                   := voltage.o
+obj-$(CONFIG_ARCH_OMAP2)               += $(voltagedomain-common)
+obj-$(CONFIG_ARCH_OMAP3)               += $(voltagedomain-common) \
+                                          voltagedomains3xxx_data.o
+obj-$(CONFIG_ARCH_OMAP4)               += $(voltagedomain-common) \
+                                          voltagedomains44xx_data.o
+endif
 
 # OMAP powerdomain framework
 powerdomain-common                     += powerdomain.o powerdomain-common.o
@@ -102,39 +114,49 @@ obj-$(CONFIG_ARCH_OMAP4)          += $(powerdomain-common) \
 
 # PRCM clockdomain control
 obj-$(CONFIG_ARCH_OMAP2)               += clockdomain.o \
+                                          clockdomain2xxx_3xxx.o \
                                           clockdomains2xxx_3xxx_data.o
 obj-$(CONFIG_ARCH_OMAP3)               += clockdomain.o \
+                                          clockdomain2xxx_3xxx.o \
                                           clockdomains2xxx_3xxx_data.o
 obj-$(CONFIG_ARCH_OMAP4)               += clockdomain.o \
+                                          clockdomain44xx.o \
                                           clockdomains44xx_data.o
+
 # Clock framework
 obj-$(CONFIG_ARCH_OMAP2)               += $(clock-common) clock2xxx.o \
                                           clkt2xxx_sys.o \
                                           clkt2xxx_dpllcore.o \
                                           clkt2xxx_virt_prcm_set.o \
-                                          clkt2xxx_apll.o clkt2xxx_osc.o
-obj-$(CONFIG_ARCH_OMAP2420)            += clock2420_data.o
-obj-$(CONFIG_ARCH_OMAP2430)            += clock2430.o clock2430_data.o
+                                          clkt2xxx_apll.o clkt2xxx_osc.o \
+                                          clkt2xxx_dpll.o clkt_iclk.o
+obj-$(CONFIG_SOC_OMAP2420)             += clock2420_data.o
+obj-$(CONFIG_SOC_OMAP2430)             += clock2430.o clock2430_data.o
 obj-$(CONFIG_ARCH_OMAP3)               += $(clock-common) clock3xxx.o \
                                           clock34xx.o clkt34xx_dpll3m2.o \
                                           clock3517.o clock36xx.o \
-                                          dpll3xxx.o clock3xxx_data.o
+                                          dpll3xxx.o clock3xxx_data.o \
+                                          clkt_iclk.o
 obj-$(CONFIG_ARCH_OMAP4)               += $(clock-common) clock44xx_data.o \
-                                          dpll3xxx.o
+                                          dpll3xxx.o dpll44xx.o
 
 # OMAP2 clock rate set data (old "OPP" data)
-obj-$(CONFIG_ARCH_OMAP2420)            += opp2420_data.o
-obj-$(CONFIG_ARCH_OMAP2430)            += opp2430_data.o
+obj-$(CONFIG_SOC_OMAP2420)             += opp2420_data.o
+obj-$(CONFIG_SOC_OMAP2430)             += opp2430_data.o
 
 # hwmod data
-obj-$(CONFIG_ARCH_OMAP2420)            += omap_hwmod_2420_data.o
-obj-$(CONFIG_ARCH_OMAP2430)            += omap_hwmod_2430_data.o
+obj-$(CONFIG_SOC_OMAP2420)             += omap_hwmod_2420_data.o
+obj-$(CONFIG_SOC_OMAP2430)             += omap_hwmod_2430_data.o
 obj-$(CONFIG_ARCH_OMAP3)               += omap_hwmod_3xxx_data.o
 obj-$(CONFIG_ARCH_OMAP4)               += omap_hwmod_44xx_data.o
 
 # EMU peripherals
 obj-$(CONFIG_OMAP3_EMU)                        += emu.o
 
+# L3 interconnect
+obj-$(CONFIG_ARCH_OMAP3)               += omap_l3_smx.o
+obj-$(CONFIG_ARCH_OMAP4)               += omap_l3_noc.o
+
 obj-$(CONFIG_OMAP_MBOX_FWK)            += mailbox_mach.o
 mailbox_mach-objs                      := mailbox.o
 
@@ -218,12 +240,14 @@ obj-$(CONFIG_MACH_OMAP4_PANDA)            += board-omap4panda.o \
                                           hsmmc.o \
                                           omap_phy_internal.o
 
-obj-$(CONFIG_MACH_OMAP3517EVM)         += board-am3517evm.o
+obj-$(CONFIG_MACH_OMAP3517EVM)         += board-am3517evm.o \
+                                          omap_phy_internal.o \
 
 obj-$(CONFIG_MACH_CRANEBOARD)          += board-am3517crane.o
 
 obj-$(CONFIG_MACH_SBC3530)             += board-omap3stalker.o \
                                           hsmmc.o
+obj-$(CONFIG_MACH_TI8168EVM)           += board-ti8168evm.o
 # Platform specific device init code
 usbfs-$(CONFIG_ARCH_OMAP_OTG)          := usb-fs.o
 obj-y                                  += $(usbfs-m) $(usbfs-y)
@@ -242,3 +266,7 @@ obj-y                                       += $(smc91x-m) $(smc91x-y)
 
 smsc911x-$(CONFIG_SMSC911X)            := gpmc-smsc911x.o
 obj-y                                  += $(smsc911x-m) $(smsc911x-y)
+obj-$(CONFIG_ARCH_OMAP4)               += hwspinlock.o
+
+disp-$(CONFIG_OMAP2_DSS)               := display.o
+obj-y                                  += $(disp-m) $(disp-y)
index e066177..1fa6bb8 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/mmc/host.h>
 #include <linux/delay.h>
 #include <linux/i2c/twl.h>
+#include <linux/regulator/machine.h>
 #include <linux/err.h>
 #include <linux/clk.h>
 #include <linux/io.h>
@@ -139,15 +140,31 @@ static struct omap_board_config_kernel sdp2430_config[] __initdata = {
        {OMAP_TAG_LCD, &sdp2430_lcd_config},
 };
 
-static void __init omap_2430sdp_init_irq(void)
+static void __init omap_2430sdp_init_early(void)
 {
-       omap_board_config = sdp2430_config;
-       omap_board_config_size = ARRAY_SIZE(sdp2430_config);
        omap2_init_common_infrastructure();
        omap2_init_common_devices(NULL, NULL);
-       omap_init_irq();
 }
 
+static struct regulator_consumer_supply sdp2430_vmmc1_supplies[] = {
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
+};
+
+/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
+static struct regulator_init_data sdp2430_vmmc1 = {
+       .constraints = {
+               .min_uV                 = 1850000,
+               .max_uV                 = 3150000,
+               .valid_modes_mask       = REGULATOR_MODE_NORMAL
+                                       | REGULATOR_MODE_STANDBY,
+               .valid_ops_mask         = REGULATOR_CHANGE_VOLTAGE
+                                       | REGULATOR_CHANGE_MODE
+                                       | REGULATOR_CHANGE_STATUS,
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(sdp2430_vmmc1_supplies),
+       .consumer_supplies      = &sdp2430_vmmc1_supplies[0],
+};
+
 static struct twl4030_gpio_platform_data sdp2430_gpio_data = {
        .gpio_base      = OMAP_MAX_GPIO_LINES,
        .irq_base       = TWL4030_GPIO_IRQ_BASE,
@@ -160,6 +177,7 @@ static struct twl4030_platform_data sdp2430_twldata = {
 
        /* platform_data for children goes here */
        .gpio           = &sdp2430_gpio_data,
+       .vmmc1          = &sdp2430_vmmc1,
 };
 
 static struct i2c_board_info __initdata sdp2430_i2c_boardinfo[] = {
@@ -226,6 +244,9 @@ static void __init omap_2430sdp_init(void)
 
        omap2430_mux_init(board_mux, OMAP_PACKAGE_ZAC);
 
+       omap_board_config = sdp2430_config;
+       omap_board_config_size = ARRAY_SIZE(sdp2430_config);
+
        omap2430_i2c_init();
 
        platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices));
@@ -253,9 +274,10 @@ static void __init omap_2430sdp_map_io(void)
 MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")
        /* Maintainer: Syed Khasim - Texas Instruments Inc */
        .boot_params    = 0x80000100,
-       .map_io         = omap_2430sdp_map_io,
        .reserve        = omap_reserve,
-       .init_irq       = omap_2430sdp_init_irq,
+       .map_io         = omap_2430sdp_map_io,
+       .init_early     = omap_2430sdp_init_early,
+       .init_irq       = omap_init_irq,
        .init_machine   = omap_2430sdp_init,
        .timer          = &omap_timer,
 MACHINE_END
index 7542ba5..c06eb42 100644 (file)
@@ -307,34 +307,16 @@ static struct omap_dss_board_info sdp3430_dss_data = {
        .default_device = &sdp3430_lcd_device,
 };
 
-static struct platform_device sdp3430_dss_device = {
-       .name           = "omapdss",
-       .id             = -1,
-       .dev            = {
-               .platform_data = &sdp3430_dss_data,
-       },
-};
-
-static struct regulator_consumer_supply sdp3430_vdda_dac_supply = {
-       .supply         = "vdda_dac",
-       .dev            = &sdp3430_dss_device.dev,
-};
-
-static struct platform_device *sdp3430_devices[] __initdata = {
-       &sdp3430_dss_device,
-};
+static struct regulator_consumer_supply sdp3430_vdda_dac_supply =
+       REGULATOR_SUPPLY("vdda_dac", "omapdss");
 
 static struct omap_board_config_kernel sdp3430_config[] __initdata = {
 };
 
-static void __init omap_3430sdp_init_irq(void)
+static void __init omap_3430sdp_init_early(void)
 {
-       omap_board_config = sdp3430_config;
-       omap_board_config_size = ARRAY_SIZE(sdp3430_config);
-       omap3_pm_init_cpuidle(omap3_cpuidle_params_table);
        omap2_init_common_infrastructure();
        omap2_init_common_devices(hyb18m512160af6_sdrc_params, NULL);
-       omap_init_irq();
 }
 
 static int sdp3430_batt_table[] = {
@@ -370,18 +352,6 @@ static struct omap2_hsmmc_info mmc[] = {
        {}      /* Terminator */
 };
 
-static struct regulator_consumer_supply sdp3430_vmmc1_supply = {
-       .supply                 = "vmmc",
-};
-
-static struct regulator_consumer_supply sdp3430_vsim_supply = {
-       .supply                 = "vmmc_aux",
-};
-
-static struct regulator_consumer_supply sdp3430_vmmc2_supply = {
-       .supply                 = "vmmc",
-};
-
 static int sdp3430_twl_gpio_setup(struct device *dev,
                unsigned gpio, unsigned ngpio)
 {
@@ -392,13 +362,6 @@ static int sdp3430_twl_gpio_setup(struct device *dev,
        mmc[1].gpio_cd = gpio + 1;
        omap2_hsmmc_init(mmc);
 
-       /* link regulators to MMC adapters ... we "know" the
-        * regulators will be set up only *after* we return.
-        */
-       sdp3430_vmmc1_supply.dev = mmc[0].dev;
-       sdp3430_vsim_supply.dev = mmc[0].dev;
-       sdp3430_vmmc2_supply.dev = mmc[1].dev;
-
        /* gpio + 7 is "sub_lcd_en_bkl" (output/PWM1) */
        gpio_request(gpio + 7, "sub_lcd_en_bkl");
        gpio_direction_output(gpio + 7, 0);
@@ -427,6 +390,34 @@ static struct twl4030_madc_platform_data sdp3430_madc_data = {
        .irq_line       = 1,
 };
 
+/* regulator consumer mappings */
+
+/* ads7846 on SPI */
+static struct regulator_consumer_supply sdp3430_vaux3_supplies[] = {
+       REGULATOR_SUPPLY("vcc", "spi1.0"),
+};
+
+static struct regulator_consumer_supply sdp3430_vdda_dac_supplies[] = {
+       REGULATOR_SUPPLY("vdda_dac", "omapdss"),
+};
+
+/* VPLL2 for digital video outputs */
+static struct regulator_consumer_supply sdp3430_vpll2_supplies[] = {
+       REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
+};
+
+static struct regulator_consumer_supply sdp3430_vmmc1_supplies[] = {
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
+};
+
+static struct regulator_consumer_supply sdp3430_vsim_supplies[] = {
+       REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
+};
+
+static struct regulator_consumer_supply sdp3430_vmmc2_supplies[] = {
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
+};
+
 /*
  * Apply all the fixed voltages since most versions of U-Boot
  * don't bother with that initialization.
@@ -469,6 +460,8 @@ static struct regulator_init_data sdp3430_vaux3 = {
                .valid_ops_mask         = REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
+       .num_consumer_supplies          = ARRAY_SIZE(sdp3430_vaux3_supplies),
+       .consumer_supplies              = sdp3430_vaux3_supplies,
 };
 
 /* VAUX4 for OMAP VDD_CSI2 (camera) */
@@ -495,8 +488,8 @@ static struct regulator_init_data sdp3430_vmmc1 = {
                                        | REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &sdp3430_vmmc1_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(sdp3430_vmmc1_supplies),
+       .consumer_supplies      = sdp3430_vmmc1_supplies,
 };
 
 /* VMMC2 for MMC2 card */
@@ -510,8 +503,8 @@ static struct regulator_init_data sdp3430_vmmc2 = {
                .valid_ops_mask         = REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &sdp3430_vmmc2_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(sdp3430_vmmc2_supplies),
+       .consumer_supplies      = sdp3430_vmmc2_supplies,
 };
 
 /* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */
@@ -525,8 +518,8 @@ static struct regulator_init_data sdp3430_vsim = {
                                        | REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &sdp3430_vsim_supply,
+       .num_consumer_supplies  = ARRAY_SIZE(sdp3430_vsim_supplies),
+       .consumer_supplies      = sdp3430_vsim_supplies,
 };
 
 /* VDAC for DSS driving S-Video */
@@ -540,16 +533,8 @@ static struct regulator_init_data sdp3430_vdac = {
                .valid_ops_mask         = REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
-       .num_consumer_supplies  = 1,
-       .consumer_supplies      = &sdp3430_vdda_dac_supply,
-};
-
-/* VPLL2 for digital video outputs */
-static struct regulator_consumer_supply sdp3430_vpll2_supplies[] = {
-       {
-               .supply         = "vdds_dsi",
-               .dev            = &sdp3430_dss_device.dev,
-       }
+       .num_consumer_supplies  = ARRAY_SIZE(sdp3430_vdda_dac_supplies),
+       .consumer_supplies      = sdp3430_vdda_dac_supplies,
 };
 
 static struct regulator_init_data sdp3430_vpll2 = {
@@ -567,9 +552,7 @@ static struct regulator_init_data sdp3430_vpll2 = {
        .consumer_supplies      = sdp3430_vpll2_supplies,
 };
 
-static struct twl4030_codec_audio_data sdp3430_audio = {
-       .audio_mclk = 26000000,
-};
+static struct twl4030_codec_audio_data sdp3430_audio;
 
 static struct twl4030_codec_data sdp3430_codec = {
        .audio_mclk = 26000000,
@@ -669,6 +652,106 @@ static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
 static struct omap_board_mux board_mux[] __initdata = {
        { .reg_offset = OMAP_MUX_TERMINATOR },
 };
+
+static struct omap_device_pad serial1_pads[] __initdata = {
+       /*
+        * Note that off output enable is an active low
+        * signal. So setting this means pin is a
+        * input enabled in off mode
+        */
+       OMAP_MUX_STATIC("uart1_cts.uart1_cts",
+                        OMAP_PIN_INPUT |
+                        OMAP_PIN_OFF_INPUT_PULLDOWN |
+                        OMAP_OFFOUT_EN |
+                        OMAP_MUX_MODE0),
+       OMAP_MUX_STATIC("uart1_rts.uart1_rts",
+                        OMAP_PIN_OUTPUT |
+                        OMAP_OFF_EN |
+                        OMAP_MUX_MODE0),
+       OMAP_MUX_STATIC("uart1_rx.uart1_rx",
+                        OMAP_PIN_INPUT |
+                        OMAP_PIN_OFF_INPUT_PULLDOWN |
+                        OMAP_OFFOUT_EN |
+                        OMAP_MUX_MODE0),
+       OMAP_MUX_STATIC("uart1_tx.uart1_tx",
+                        OMAP_PIN_OUTPUT |
+                        OMAP_OFF_EN |
+                        OMAP_MUX_MODE0),
+};
+
+static struct omap_device_pad serial2_pads[] __initdata = {
+       OMAP_MUX_STATIC("uart2_cts.uart2_cts",
+                        OMAP_PIN_INPUT_PULLUP |
+                        OMAP_PIN_OFF_INPUT_PULLDOWN |
+                        OMAP_OFFOUT_EN |
+                        OMAP_MUX_MODE0),
+       OMAP_MUX_STATIC("uart2_rts.uart2_rts",
+                        OMAP_PIN_OUTPUT |
+                        OMAP_OFF_EN |
+                        OMAP_MUX_MODE0),
+       OMAP_MUX_STATIC("uart2_rx.uart2_rx",
+                        OMAP_PIN_INPUT |
+                        OMAP_PIN_OFF_INPUT_PULLDOWN |
+                        OMAP_OFFOUT_EN |
+                        OMAP_MUX_MODE0),
+       OMAP_MUX_STATIC("uart2_tx.uart2_tx",
+                        OMAP_PIN_OUTPUT |
+                        OMAP_OFF_EN |
+                        OMAP_MUX_MODE0),
+};
+
+static struct omap_device_pad serial3_pads[] __initdata = {
+       OMAP_MUX_STATIC("uart3_cts_rctx.uart3_cts_rctx",
+                        OMAP_PIN_INPUT_PULLDOWN |
+                        OMAP_PIN_OFF_INPUT_PULLDOWN |
+                        OMAP_OFFOUT_EN |
+                        OMAP_MUX_MODE0),
+       OMAP_MUX_STATIC("uart3_rts_sd.uart3_rts_sd",
+                        OMAP_PIN_OUTPUT |
+                        OMAP_OFF_EN |
+                        OMAP_MUX_MODE0),
+       OMAP_MUX_STATIC("uart3_rx_irrx.uart3_rx_irrx",
+                        OMAP_PIN_INPUT |
+                        OMAP_PIN_OFF_INPUT_PULLDOWN |
+                        OMAP_OFFOUT_EN |
+                        OMAP_MUX_MODE0),
+       OMAP_MUX_STATIC("uart3_tx_irtx.uart3_tx_irtx",
+                        OMAP_PIN_OUTPUT |
+                        OMAP_OFF_EN |
+                        OMAP_MUX_MODE0),
+};
+
+static struct omap_board_data serial1_data = {
+       .id             = 0,
+       .pads           = serial1_pads,
+       .pads_cnt       = ARRAY_SIZE(serial1_pads),
+};
+
+static struct omap_board_data serial2_data = {
+       .id             = 1,
+       .pads           = serial2_pads,
+       .pads_cnt       = ARRAY_SIZE(serial2_pads),
+};
+
+static struct omap_board_data serial3_data = {
+       .id             = 2,
+       .pads           = serial3_pads,
+       .pads_cnt       = ARRAY_SIZE(serial3_pads),
+};
+
+static inline void board_serial_init(void)
+{
+       omap_serial_init_port(&serial1_data);
+       omap_serial_init_port(&serial2_data);
+       omap_serial_init_port(&serial3_data);
+}
+#else
+#define board_mux      NULL
+
+static inline void board_serial_init(void)
+{
+       omap_serial_init();
+}
 #endif
 
 /*
@@ -800,8 +883,11 @@ static struct omap_musb_board_data musb_board_data = {
 static void __init omap_3430sdp_init(void)
 {
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
+       omap_board_config = sdp3430_config;
+       omap_board_config_size = ARRAY_SIZE(sdp3430_config);
+       omap3_pm_init_cpuidle(omap3_cpuidle_params_table);
        omap3430_i2c_init();
-       platform_add_devices(sdp3430_devices, ARRAY_SIZE(sdp3430_devices));
+       omap_display_init(&sdp3430_dss_data);
        if (omap_rev() > OMAP3430_REV_ES1_0)
                ts_gpio = SDP3430_TS_GPIO_IRQ_SDPV2;
        else
@@ -810,10 +896,10 @@ static void __init omap_3430sdp_init(void)
        spi_register_board_info(sdp3430_spi_board_info,
                                ARRAY_SIZE(sdp3430_spi_board_info));
        ads7846_dev_init();
-       omap_serial_init();
+       board_serial_init();
        usb_musb_init(&musb_board_data);
        board_smc91x_init();
-       board_flash_init(sdp_flash_partitions, chip_sel_3430);
+       board_flash_init(sdp_flash_partitions, chip_sel_3430, 0);
        sdp3430_display_init();
        enable_board_wakeup_source();
        usbhs_init(&usbhs_bdata);
@@ -822,9 +908,10 @@ static void __init omap_3430sdp_init(void)
 MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")
        /* Maintainer: Syed Khasim - Texas Instruments Inc */
        .boot_params    = 0x80000100,
-       .map_io         = omap3_map_io,
        .reserve        = omap_reserve,
-       .init_irq       = omap_3430sdp_init_irq,
+       .map_io         = omap3_map_io,
+       .init_early     = omap_3430sdp_init_early,
+       .init_irq       = omap_init_irq,
        .init_machine   = omap_3430sdp_init,
        .timer          = &omap_timer,
 MACHINE_END
index deed2db..a5933cc 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/platform_device.h>
 #include <linux/input.h>
 #include <linux/gpio.h>
+#include <linux/mtd/nand.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -69,14 +70,11 @@ static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
 static struct omap_board_config_kernel sdp_config[] __initdata = {
 };
 
-static void __init omap_sdp_init_irq(void)
+static void __init omap_sdp_init_early(void)
 {
-       omap_board_config = sdp_config;
-       omap_board_config_size = ARRAY_SIZE(sdp_config);
        omap2_init_common_infrastructure();
        omap2_init_common_devices(h8mbx00u0mer0em_sdrc_params,
                                  h8mbx00u0mer0em_sdrc_params);
-       omap_init_irq();
 }
 
 #ifdef CONFIG_OMAP_MUX
@@ -206,19 +204,22 @@ static struct flash_partitions sdp_flash_partitions[] = {
 static void __init omap_sdp_init(void)
 {
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
+       omap_board_config = sdp_config;
+       omap_board_config_size = ARRAY_SIZE(sdp_config);
        zoom_peripherals_init();
        zoom_display_init();
        board_smc91x_init();
-       board_flash_init(sdp_flash_partitions, chip_sel_sdp);
+       board_flash_init(sdp_flash_partitions, chip_sel_sdp, NAND_BUSWIDTH_16);
        enable_board_wakeup_source();
        usbhs_init(&usbhs_bdata);
 }
 
 MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board")
        .boot_params    = 0x80000100,
-       .map_io         = omap3_map_io,
        .reserve        = omap_reserve,
-       .init_irq       = omap_sdp_init_irq,
+       .map_io         = omap3_map_io,
+       .init_early     = omap_sdp_init_early,
+       .init_irq       = omap_init_irq,
        .init_machine   = omap_sdp_init,
        .timer          = &omap_timer,
 MACHINE_END
index f603f3b..333ceb2 100644 (file)
@@ -35,6 +35,7 @@
 #include <plat/common.h>
 #include <plat/usb.h>
 #include <plat/mmc.h>
+#include <plat/omap4-keypad.h>
 
 #include "mux.h"
 #include "hsmmc.h"
 #define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO       184
 #define OMAP4_SFH7741_ENABLE_GPIO              188
 
+static const int sdp4430_keymap[] = {
+       KEY(0, 0, KEY_E),
+       KEY(0, 1, KEY_R),
+       KEY(0, 2, KEY_T),
+       KEY(0, 3, KEY_HOME),
+       KEY(0, 4, KEY_F5),
+       KEY(0, 5, KEY_UNKNOWN),
+       KEY(0, 6, KEY_I),
+       KEY(0, 7, KEY_LEFTSHIFT),
+
+       KEY(1, 0, KEY_D),
+       KEY(1, 1, KEY_F),
+       KEY(1, 2, KEY_G),
+       KEY(1, 3, KEY_SEND),
+       KEY(1, 4, KEY_F6),
+       KEY(1, 5, KEY_UNKNOWN),
+       KEY(1, 6, KEY_K),
+       KEY(1, 7, KEY_ENTER),
+
+       KEY(2, 0, KEY_X),
+       KEY(2, 1, KEY_C),
+       KEY(2, 2, KEY_V),
+       KEY(2, 3, KEY_END),
+       KEY(2, 4, KEY_F7),
+       KEY(2, 5, KEY_UNKNOWN),
+       KEY(2, 6, KEY_DOT),
+       KEY(2, 7, KEY_CAPSLOCK),
+
+       KEY(3, 0, KEY_Z),
+       KEY(3, 1, KEY_KPPLUS),
+       KEY(3, 2, KEY_B),
+       KEY(3, 3, KEY_F1),
+       KEY(3, 4, KEY_F8),
+       KEY(3, 5, KEY_UNKNOWN),
+       KEY(3, 6, KEY_O),
+       KEY(3, 7, KEY_SPACE),
+
+       KEY(4, 0, KEY_W),
+       KEY(4, 1, KEY_Y),
+       KEY(4, 2, KEY_U),
+       KEY(4, 3, KEY_F2),
+       KEY(4, 4, KEY_VOLUMEUP),
+       KEY(4, 5, KEY_UNKNOWN),
+       KEY(4, 6, KEY_L),
+       KEY(4, 7, KEY_LEFT),
+
+       KEY(5, 0, KEY_S),
+       KEY(5, 1, KEY_H),
+       KEY(5, 2, KEY_J),
+       KEY(5, 3, KEY_F3),
+       KEY(5, 4, KEY_F9),
+       KEY(5, 5, KEY_VOLUMEDOWN),
+       KEY(5, 6, KEY_M),
+       KEY(5, 7, KEY_RIGHT),
+
+       KEY(6, 0, KEY_Q),
+       KEY(6, 1, KEY_A),
+       KEY(6, 2, KEY_N),
+       KEY(6, 3, KEY_BACK),
+       KEY(6, 4, KEY_BACKSPACE),
+       KEY(6, 5, KEY_UNKNOWN),
+       KEY(6, 6, KEY_P),
+       KEY(6, 7, KEY_UP),
+
+       KEY(7, 0, KEY_PROG1),
+       KEY(7, 1, KEY_PROG2),
+       KEY(7, 2, KEY_PROG3),
+       KEY(7, 3, KEY_PROG4),
+       KEY(7, 4, KEY_F4),
+       KEY(7, 5, KEY_UNKNOWN),
+       KEY(7, 6, KEY_OK),
+       KEY(7, 7, KEY_DOWN),
+};
+
+static struct matrix_keymap_data sdp4430_keymap_data = {
+       .keymap                 = sdp4430_keymap,
+       .keymap_size            = ARRAY_SIZE(sdp4430_keymap),
+};
+
+static struct omap4_keypad_platform_data sdp4430_keypad_data = {
+       .keymap_data            = &sdp4430_keymap_data,
+       .rows                   = 8,
+       .cols                   = 8,
+};
 static struct gpio_led sdp4430_gpio_leds[] = {
        {
                .name   = "omap4:green:debug0",
@@ -238,16 +323,13 @@ static struct omap_board_config_kernel sdp4430_config[] __initdata = {
        { OMAP_TAG_LCD,         &sdp4430_lcd_config },
 };
 
-static void __init omap_4430sdp_init_irq(void)
+static void __init omap_4430sdp_init_early(void)
 {
-       omap_board_config = sdp4430_config;
-       omap_board_config_size = ARRAY_SIZE(sdp4430_config);
        omap2_init_common_infrastructure();
        omap2_init_common_devices(NULL, NULL);
 #ifdef CONFIG_OMAP_32K_TIMER
        omap2_gp_clockevent_set_gptimer(1);
 #endif
-       gic_init_irq();
 }
 
 static struct omap_musb_board_data musb_board_data = {
@@ -266,11 +348,6 @@ static struct twl4030_usb_data omap4_usbphy_data = {
 
 static struct omap2_hsmmc_info mmc[] = {
        {
-               .mmc            = 1,
-               .caps           = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
-               .gpio_wp        = -EINVAL,
-       },
-       {
                .mmc            = 2,
                .caps           =  MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
                .gpio_cd        = -EINVAL,
@@ -278,19 +355,24 @@ static struct omap2_hsmmc_info mmc[] = {
                .nonremovable   = true,
                .ocr_mask       = MMC_VDD_29_30,
        },
+       {
+               .mmc            = 1,
+               .caps           = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
+               .gpio_wp        = -EINVAL,
+       },
        {}      /* Terminator */
 };
 
 static struct regulator_consumer_supply sdp4430_vaux_supply[] = {
        {
                .supply = "vmmc",
-               .dev_name = "mmci-omap-hs.1",
+               .dev_name = "omap_hsmmc.1",
        },
 };
 static struct regulator_consumer_supply sdp4430_vmmc_supply[] = {
        {
                .supply = "vmmc",
-               .dev_name = "mmci-omap-hs.0",
+               .dev_name = "omap_hsmmc.0",
        },
 };
 
@@ -424,7 +506,6 @@ static struct regulator_init_data sdp4430_vana = {
        .constraints = {
                .min_uV                 = 2100000,
                .max_uV                 = 2100000,
-               .apply_uV               = true,
                .valid_modes_mask       = REGULATOR_MODE_NORMAL
                                        | REGULATOR_MODE_STANDBY,
                .valid_ops_mask  = REGULATOR_CHANGE_MODE
@@ -436,7 +517,6 @@ static struct regulator_init_data sdp4430_vcxio = {
        .constraints = {
                .min_uV                 = 1800000,
                .max_uV                 = 1800000,
-               .apply_uV               = true,
                .valid_modes_mask       = REGULATOR_MODE_NORMAL
                                        | REGULATOR_MODE_STANDBY,
                .valid_ops_mask  = REGULATOR_CHANGE_MODE
@@ -448,7 +528,6 @@ static struct regulator_init_data sdp4430_vdac = {
        .constraints = {
                .min_uV                 = 1800000,
                .max_uV                 = 1800000,
-               .apply_uV               = true,
                .valid_modes_mask       = REGULATOR_MODE_NORMAL
                                        | REGULATOR_MODE_STANDBY,
                .valid_ops_mask  = REGULATOR_CHANGE_MODE
@@ -547,9 +626,76 @@ static struct omap_board_mux board_mux[] __initdata = {
        OMAP4_MUX(USBB2_ULPITLL_CLK, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
        { .reg_offset = OMAP_MUX_TERMINATOR },
 };
+
+static struct omap_device_pad serial2_pads[] __initdata = {
+       OMAP_MUX_STATIC("uart2_cts.uart2_cts",
+                        OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0),
+       OMAP_MUX_STATIC("uart2_rts.uart2_rts",
+                        OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
+       OMAP_MUX_STATIC("uart2_rx.uart2_rx",
+                        OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0),
+       OMAP_MUX_STATIC("uart2_tx.uart2_tx",
+                        OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
+};
+
+static struct omap_device_pad serial3_pads[] __initdata = {
+       OMAP_MUX_STATIC("uart3_cts_rctx.uart3_cts_rctx",
+                        OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0),
+       OMAP_MUX_STATIC("uart3_rts_sd.uart3_rts_sd",
+                        OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
+       OMAP_MUX_STATIC("uart3_rx_irrx.uart3_rx_irrx",
+                        OMAP_PIN_INPUT | OMAP_MUX_MODE0),
+       OMAP_MUX_STATIC("uart3_tx_irtx.uart3_tx_irtx",
+                        OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
+};
+
+static struct omap_device_pad serial4_pads[] __initdata = {
+       OMAP_MUX_STATIC("uart4_rx.uart4_rx",
+                        OMAP_PIN_INPUT | OMAP_MUX_MODE0),
+       OMAP_MUX_STATIC("uart4_tx.uart4_tx",
+                        OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
+};
+
+static struct omap_board_data serial2_data = {
+       .id             = 1,
+       .pads           = serial2_pads,
+       .pads_cnt       = ARRAY_SIZE(serial2_pads),
+};
+
+static struct omap_board_data serial3_data = {
+       .id             = 2,
+       .pads           = serial3_pads,
+       .pads_cnt       = ARRAY_SIZE(serial3_pads),
+};
+
+static struct omap_board_data serial4_data = {
+       .id             = 3,
+       .pads           = serial4_pads,
+       .pads_cnt       = ARRAY_SIZE(serial4_pads),
+};
+
+static inline void board_serial_init(void)
+{
+       struct omap_board_data bdata;
+       bdata.flags     = 0;
+       bdata.pads      = NULL;
+       bdata.pads_cnt  = 0;
+       bdata.id        = 0;
+       /* pass dummy data for UART1 */
+       omap_serial_init_port(&bdata);
+
+       omap_serial_init_port(&serial2_data);
+       omap_serial_init_port(&serial3_data);
+       omap_serial_init_port(&serial4_data);
+}
 #else
 #define board_mux      NULL
-#endif
+
+static inline void board_serial_init(void)
+{
+       omap_serial_init();
+}
+ #endif
 
 static void __init omap_4430sdp_init(void)
 {
@@ -560,10 +706,13 @@ static void __init omap_4430sdp_init(void)
                package = OMAP_PACKAGE_CBL;
        omap4_mux_init(board_mux, package);
 
+       omap_board_config = sdp4430_config;
+       omap_board_config_size = ARRAY_SIZE(sdp4430_config);
+
        omap4_i2c_init();
        omap_sfh7741prox_init();
        platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
-       omap_serial_init();
+       board_serial_init();
        omap4_twl6030_hsmmc_init(mmc);
 
        usb_musb_init(&musb_board_data);
@@ -576,6 +725,10 @@ static void __init omap_4430sdp_init(void)
                spi_register_board_info(sdp4430_spi_board_info,
                                ARRAY_SIZE(sdp4430_spi_board_info));
        }
+
+       status = omap4_keyboard_init(&sdp4430_keypad_data);
+       if (status)
+               pr_err("Keypad initialization failed: %d\n", status);
 }
 
 static void __init omap_4430sdp_map_io(void)
@@ -587,9 +740,10 @@ static void __init omap_4430sdp_map_io(void)
 MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
        /* Maintainer: Santosh Shilimkar - Texas Instruments Inc */
        .boot_params    = 0x80000100,
-       .map_io         = omap_4430sdp_map_io,
        .reserve        = omap_reserve,
-       .init_irq       = omap_4430sdp_init_irq,
+       .map_io         = omap_4430sdp_map_io,
+       .init_early     = omap_4430sdp_init_early,
+       .init_irq       = gic_init_irq,
        .init_machine   = omap_4430sdp_init,
        .timer          = &omap_timer,
 MACHINE_END
index e3a194f..a890d24 100644 (file)
@@ -49,14 +49,10 @@ static struct omap_board_mux board_mux[] __initdata = {
 #define board_mux      NULL
 #endif
 
-static void __init am3517_crane_init_irq(void)
+static void __init am3517_crane_init_early(void)
 {
-       omap_board_config = am3517_crane_config;
-       omap_board_config_size = ARRAY_SIZE(am3517_crane_config);
-
        omap2_init_common_infrastructure();
        omap2_init_common_devices(NULL, NULL);
-       omap_init_irq();
 }
 
 static struct usbhs_omap_board_data usbhs_bdata __initdata = {
@@ -77,6 +73,9 @@ static void __init am3517_crane_init(void)
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
        omap_serial_init();
 
+       omap_board_config = am3517_crane_config;
+       omap_board_config_size = ARRAY_SIZE(am3517_crane_config);
+
        /* Configure GPIO for EHCI port */
        if (omap_mux_init_gpio(GPIO_USB_NRESET, OMAP_PIN_OUTPUT)) {
                pr_err("Can not configure mux for GPIO_USB_NRESET %d\n",
@@ -108,9 +107,10 @@ static void __init am3517_crane_init(void)
 
 MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD")
        .boot_params    = 0x80000100,
-       .map_io         = omap3_map_io,
        .reserve        = omap_reserve,
-       .init_irq       = am3517_crane_init_irq,
+       .map_io         = omap3_map_io,
+       .init_early     = am3517_crane_init_early,
+       .init_irq       = omap_init_irq,
        .init_machine   = am3517_crane_init,
        .timer          = &omap_timer,
 MACHINE_END
index 913538a..ce7d5e6 100644 (file)
@@ -200,6 +200,9 @@ static struct pca953x_platform_data am3517evm_gpio_expander_info_0 = {
 };
 static struct i2c_board_info __initdata am3517evm_i2c2_boardinfo[] = {
        {
+               I2C_BOARD_INFO("tlv320aic23", 0x1A),
+       },
+       {
                I2C_BOARD_INFO("tca6416", 0x21),
                .platform_data = &am3517evm_gpio_expander_info_0,
        },
@@ -378,37 +381,23 @@ static struct omap_dss_board_info am3517_evm_dss_data = {
        .default_device = &am3517_evm_lcd_device,
 };
 
-static struct platform_device am3517_evm_dss_device = {
-       .name           = "omapdss",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = &am3517_evm_dss_data,
-       },
-};
-
 /*
  * Board initialization
  */
-static struct omap_board_config_kernel am3517_evm_config[] __initdata = {
-};
-
-static struct platform_device *am3517_evm_devices[] __initdata = {
-       &am3517_evm_dss_device,
-};
-
-static void __init am3517_evm_init_irq(void)
+static void __init am3517_evm_init_early(void)
 {
-       omap_board_config = am3517_evm_config;
-       omap_board_config_size = ARRAY_SIZE(am3517_evm_config);
        omap2_init_common_infrastructure();
        omap2_init_common_devices(NULL, NULL);
-       omap_init_irq();
 }
 
 static struct omap_musb_board_data musb_board_data = {
        .interface_type         = MUSB_INTERFACE_ULPI,
        .mode                   = MUSB_OTG,
        .power                  = 500,
+       .set_phy_power          = am35x_musb_phy_power,
+       .clear_irq              = am35x_musb_clear_irq,
+       .set_mode               = am35x_musb_set_mode,
+       .reset                  = am35x_musb_reset,
 };
 
 static __init void am3517_evm_musb_init(void)
@@ -490,14 +479,17 @@ static void am3517_evm_hecc_init(struct ti_hecc_platform_data *pdata)
        platform_device_register(&am3517_hecc_device);
 }
 
+static struct omap_board_config_kernel am3517_evm_config[] __initdata = {
+};
+
 static void __init am3517_evm_init(void)
 {
+       omap_board_config = am3517_evm_config;
+       omap_board_config_size = ARRAY_SIZE(am3517_evm_config);
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
 
        am3517_evm_i2c_init();
-       platform_add_devices(am3517_evm_devices,
-                               ARRAY_SIZE(am3517_evm_devices));
-
+       omap_display_init(&am3517_evm_dss_data);
        omap_serial_init();
 
        /* Configure GPIO for EHCI port */
@@ -521,9 +513,10 @@ static void __init am3517_evm_init(void)
 
 MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM")
        .boot_params    = 0x80000100,
-       .map_io         = omap3_map_io,
        .reserve        = omap_reserve,
-       .init_irq       = am3517_evm_init_irq,
+       .map_io         = omap3_map_io,
+       .init_early     = am3517_evm_init_early,
+       .init_irq       = omap_init_irq,
        .init_machine   = am3517_evm_init,
        .timer          = &omap_timer,
 MACHINE_END
index 9f55b68..f4f8374 100644 (file)
@@ -274,13 +274,10 @@ static struct omap_board_config_kernel apollon_config[] __initdata = {
        { OMAP_TAG_LCD,         &apollon_lcd_config },
 };
 
-static void __init omap_apollon_init_irq(void)
+static void __init omap_apollon_init_early(void)
 {
-       omap_board_config = apollon_config;
-       omap_board_config_size = ARRAY_SIZE(apollon_config);
        omap2_init_common_infrastructure();
        omap2_init_common_devices(NULL, NULL);
-       omap_init_irq();
 }
 
 static void __init apollon_led_init(void)
@@ -320,6 +317,8 @@ static void __init omap_apollon_init(void)
        u32 v;
 
        omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAC);
+       omap_board_config = apollon_config;
+       omap_board_config_size = ARRAY_SIZE(apollon_config);
 
        apollon_init_smc91x();
        apollon_led_init();
@@ -355,9 +354,10 @@ static void __init omap_apollon_map_io(void)
 MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon")
        /* Maintainer: Kyungmin Park <kyungmin.park@samsung.com> */
        .boot_params    = 0x80000100,
-       .map_io         = omap_apollon_map_io,
        .reserve        = omap_reserve,
-       .init_irq       = omap_apollon_init_irq,
+       .map_io         = omap_apollon_map_io,
+       .init_early     = omap_apollon_init_early,
+       .init_irq       = omap_init_irq,
        .init_machine   = omap_apollon_init,
        .timer          = &omap_timer,
 MACHINE_END
index 9be7289..7b56479 100644 (file)
@@ -401,14 +401,6 @@ static struct omap_dss_board_info cm_t35_dss_data = {
        .default_device = &cm_t35_dvi_device,
 };
 
-static struct platform_device cm_t35_dss_device = {
-       .name           = "omapdss",
-       .id             = -1,
-       .dev            = {
-               .platform_data = &cm_t35_dss_data,
-       },
-};
-
 static struct omap2_mcspi_device_config tdo24m_mcspi_config = {
        .turbo_mode     = 0,
        .single_channel = 1,    /* 0: slave, 1: master */
@@ -468,7 +460,7 @@ static void __init cm_t35_init_display(void)
        msleep(50);
        gpio_set_value(lcd_en_gpio, 1);
 
-       err = platform_device_register(&cm_t35_dss_device);
+       err = omap_display_init(&cm_t35_dss_data);
        if (err) {
                pr_err("CM-T35: failed to register DSS device\n");
                goto err_dev_reg;
@@ -495,15 +487,11 @@ static struct regulator_consumer_supply cm_t35_vsim_supply = {
        .supply                 = "vmmc_aux",
 };
 
-static struct regulator_consumer_supply cm_t35_vdac_supply = {
-       .supply         = "vdda_dac",
-       .dev            = &cm_t35_dss_device.dev,
-};
+static struct regulator_consumer_supply cm_t35_vdac_supply =
+       REGULATOR_SUPPLY("vdda_dac", "omapdss");
 
-static struct regulator_consumer_supply cm_t35_vdvi_supply = {
-       .supply         = "vdvi",
-       .dev            = &cm_t35_dss_device.dev,
-};
+static struct regulator_consumer_supply cm_t35_vdvi_supply =
+       REGULATOR_SUPPLY("vdvi", "omapdss");
 
 /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
 static struct regulator_init_data cm_t35_vmmc1 = {
@@ -680,20 +668,14 @@ static void __init cm_t35_init_i2c(void)
                              ARRAY_SIZE(cm_t35_i2c_boardinfo));
 }
 
-static struct omap_board_config_kernel cm_t35_config[] __initdata = {
-};
-
-static void __init cm_t35_init_irq(void)
+static void __init cm_t35_init_early(void)
 {
-       omap_board_config = cm_t35_config;
-       omap_board_config_size = ARRAY_SIZE(cm_t35_config);
-
        omap2_init_common_infrastructure();
        omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
                             mt46h32m32lf6_sdrc_params);
-       omap_init_irq();
 }
 
+#ifdef CONFIG_OMAP_MUX
 static struct omap_board_mux board_mux[] __initdata = {
        /* nCS and IRQ for CM-T35 ethernet */
        OMAP3_MUX(GPMC_NCS5, OMAP_MUX_MODE0),
@@ -791,6 +773,7 @@ static struct omap_board_mux board_mux[] __initdata = {
 
        { .reg_offset = OMAP_MUX_TERMINATOR },
 };
+#endif
 
 static struct omap_musb_board_data musb_board_data = {
        .interface_type         = MUSB_INTERFACE_ULPI,
@@ -798,8 +781,13 @@ static struct omap_musb_board_data musb_board_data = {
        .power                  = 100,
 };
 
+static struct omap_board_config_kernel cm_t35_config[] __initdata = {
+};
+
 static void __init cm_t35_init(void)
 {
+       omap_board_config = cm_t35_config;
+       omap_board_config_size = ARRAY_SIZE(cm_t35_config);
        omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
        omap_serial_init();
        cm_t35_init_i2c();
@@ -815,9 +803,10 @@ static void __init cm_t35_init(void)
 
 MACHINE_START(CM_T35, "Compulab CM-T35")
        .boot_params    = 0x80000100,
-       .map_io         = omap3_map_io,
        .reserve        = omap_reserve,
-       .init_irq       = cm_t35_init_irq,
+       .map_io         = omap3_map_io,
+       .init_early     = cm_t35_init_early,
+       .init_irq       = omap_init_irq,
        .init_machine   = cm_t35_init,
        .timer          = &omap_timer,
 MACHINE_END
index 8e18dc7..a27e3ee 100644 (file)
@@ -254,16 +254,13 @@ static inline void cm_t3517_init_nand(void) {}
 static struct omap_board_config_kernel cm_t3517_config[] __initdata = {
 };
 
-static void __init cm_t3517_init_irq(void)
+static void __init cm_t3517_init_early(void)
 {
-       omap_board_config = cm_t3517_config;
-       omap_board_config_size = ARRAY_SIZE(cm_t3517_config);
-
        omap2_init_common_infrastructure();
        omap2_init_common_devices(NULL, NULL);
-       omap_init_irq();
 }
 
+#ifdef CONFIG_OMAP_MUX
 static struct omap_board_mux board_mux[] __initdata = {
        /* GPIO186 - Green LED */
        OMAP3_MUX(SYS_CLKOUT2, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
@@ -289,11 +286,14 @@ static struct omap_board_mux board_mux[] __initdata = {
 
        { .reg_offset = OMAP_MUX_TERMINATOR },
 };
+#endif
 
 static void __init cm_t3517_init(void)
 {
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
        omap_serial_init();
+       omap_board_config = cm_t3517_config;
+       omap_board_config_size = ARRAY_SIZE(cm_t3517_config);
        cm_t3517_init_leds();
        cm_t3517_init_nand();
        cm_t3517_init_rtc();
@@ -303,9 +303,10 @@ static void __init cm_t3517_init(void)
 
 MACHINE_START(CM_T3517, "Compulab CM-T3517")
        .boot_params    = 0x80000100,
-       .map_io         = omap3_map_io,
        .reserve        = omap_reserve,
-       .init_irq       = cm_t3517_init_irq,
+       .map_io         = omap3_map_io,
+       .init_early     = cm_t3517_init_early,
+       .init_irq       = omap_init_irq,
        .init_machine   = cm_t3517_init,
        .timer          = &omap_timer,
 MACHINE_END
index bc0141b..aa27483 100644 (file)
@@ -140,7 +140,7 @@ static void devkit8000_panel_disable_dvi(struct omap_dss_device *dssdev)
 }
 
 static struct regulator_consumer_supply devkit8000_vmmc1_supply =
-       REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0");
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0");
 
 
 /* ads7846 on SPI */
@@ -195,14 +195,6 @@ static struct omap_dss_board_info devkit8000_dss_data = {
        .default_device = &devkit8000_lcd_device,
 };
 
-static struct platform_device devkit8000_dss_device = {
-       .name           = "omapdss",
-       .id             = -1,
-       .dev            = {
-               .platform_data = &devkit8000_dss_data,
-       },
-};
-
 static struct regulator_consumer_supply devkit8000_vdda_dac_supply =
        REGULATOR_SUPPLY("vdda_dac", "omapdss");
 
@@ -350,9 +342,7 @@ static struct twl4030_usb_data devkit8000_usb_data = {
        .usb_mode       = T2_USB_MODE_ULPI,
 };
 
-static struct twl4030_codec_audio_data devkit8000_audio_data = {
-       .audio_mclk = 26000000,
-};
+static struct twl4030_codec_audio_data devkit8000_audio_data;
 
 static struct twl4030_codec_data devkit8000_codec_data = {
        .audio_mclk = 26000000,
@@ -456,11 +446,15 @@ static struct platform_device keys_gpio = {
 };
 
 
-static void __init devkit8000_init_irq(void)
+static void __init devkit8000_init_early(void)
 {
        omap2_init_common_infrastructure();
        omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
                                  mt46h32m32lf6_sdrc_params);
+}
+
+static void __init devkit8000_init_irq(void)
+{
        omap_init_irq();
 #ifdef CONFIG_OMAP_32K_TIMER
        omap2_gp_clockevent_set_gptimer(12);
@@ -575,7 +569,6 @@ static void __init omap_dm9000_init(void)
 }
 
 static struct platform_device *devkit8000_devices[] __initdata = {
-       &devkit8000_dss_device,
        &leds_gpio,
        &keys_gpio,
        &omap_dm9000_dev,
@@ -632,6 +625,7 @@ static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
        .reset_gpio_port[2]  = -EINVAL
 };
 
+#ifdef CONFIG_OMAP_MUX
 static struct omap_board_mux board_mux[] __initdata = {
        /* nCS and IRQ for Devkit8000 ethernet */
        OMAP3_MUX(GPMC_NCS6, OMAP_MUX_MODE0),
@@ -785,6 +779,7 @@ static struct omap_board_mux board_mux[] __initdata = {
 
        { .reg_offset = OMAP_MUX_TERMINATOR },
 };
+#endif
 
 static void __init devkit8000_init(void)
 {
@@ -797,6 +792,7 @@ static void __init devkit8000_init(void)
        platform_add_devices(devkit8000_devices,
                        ARRAY_SIZE(devkit8000_devices));
 
+       omap_display_init(&devkit8000_dss_data);
        spi_register_board_info(devkit8000_spi_board_info,
        ARRAY_SIZE(devkit8000_spi_board_info));
 
@@ -813,8 +809,9 @@ static void __init devkit8000_init(void)
 
 MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000")
        .boot_params    = 0x80000100,
-       .map_io         = omap3_map_io,
        .reserve        = omap_reserve,
+       .map_io         = omap3_map_io,
+       .init_early     = devkit8000_init_early,
        .init_irq       = devkit8000_init_irq,
        .init_machine   = devkit8000_init,
        .timer          = &omap_timer,
index fd38c05..729892f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * board-sdp-flash.c
+ * board-flash.c
  * Modified from mach-omap2/board-3430sdp-flash.c
  *
  * Copyright (C) 2009 Nokia Corporation
@@ -16,6 +16,7 @@
 #include <linux/platform_device.h>
 #include <linux/mtd/physmap.h>
 #include <linux/io.h>
+#include <plat/irqs.h>
 
 #include <plat/gpmc.h>
 #include <plat/nand.h>
@@ -73,11 +74,11 @@ __init board_nor_init(struct mtd_partition *nor_parts, u8 nr_parts, u8 cs)
                                        + FLASH_SIZE_SDPV1 - 1;
        }
        if (err < 0) {
-               printk(KERN_ERR "NOR: Can't request GPMC CS\n");
+               pr_err("NOR: Can't request GPMC CS\n");
                return;
        }
        if (platform_device_register(&board_nor_device) < 0)
-               printk(KERN_ERR "Unable to register NOR device\n");
+               pr_err("Unable to register NOR device\n");
 }
 
 #if defined(CONFIG_MTD_ONENAND_OMAP2) || \
@@ -139,17 +140,21 @@ static struct omap_nand_platform_data board_nand_data = {
 };
 
 void
-__init board_nand_init(struct mtd_partition *nand_parts, u8 nr_parts, u8 cs)
+__init board_nand_init(struct mtd_partition *nand_parts,
+                       u8 nr_parts, u8 cs, int nand_type)
 {
        board_nand_data.cs              = cs;
        board_nand_data.parts           = nand_parts;
-       board_nand_data.nr_parts                = nr_parts;
+       board_nand_data.nr_parts        = nr_parts;
+       board_nand_data.devsize         = nand_type;
 
+       board_nand_data.ecc_opt = OMAP_ECC_HAMMING_CODE_DEFAULT;
+       board_nand_data.gpmc_irq = OMAP_GPMC_IRQ_BASE + cs;
        gpmc_nand_init(&board_nand_data);
 }
 #else
 void
-__init board_nand_init(struct mtd_partition *nand_parts, u8 nr_parts, u8 cs)
+__init board_nand_init(struct mtd_partition *nand_parts, u8 nr_parts, u8 cs, int nand_type)
 {
 }
 #endif /* CONFIG_MTD_NAND_OMAP2 || CONFIG_MTD_NAND_OMAP2_MODULE */
@@ -189,12 +194,12 @@ unmap:
 }
 
 /**
- * sdp3430_flash_init - Identify devices connected to GPMC and register.
+ * board_flash_init - Identify devices connected to GPMC and register.
  *
  * @return - void.
  */
 void board_flash_init(struct flash_partitions partition_info[],
-                                       char chip_sel_board[][GPMC_CS_NUM])
+                       char chip_sel_board[][GPMC_CS_NUM], int nand_type)
 {
        u8              cs = 0;
        u8              norcs = GPMC_CS_NUM + 1;
@@ -208,7 +213,7 @@ void board_flash_init(struct flash_partitions partition_info[],
         */
        idx = get_gpmc0_type();
        if (idx >= MAX_SUPPORTED_GPMC_CONFIG) {
-               printk(KERN_ERR "%s: Invalid chip select: %d\n", __func__, cs);
+               pr_err("%s: Invalid chip select: %d\n", __func__, cs);
                return;
        }
        config_sel = (unsigned char *)(chip_sel_board[idx]);
@@ -232,23 +237,20 @@ void board_flash_init(struct flash_partitions partition_info[],
        }
 
        if (norcs > GPMC_CS_NUM)
-               printk(KERN_INFO "NOR: Unable to find configuration "
-                               "in GPMC\n");
+               pr_err("NOR: Unable to find configuration in GPMC\n");
        else
                board_nor_init(partition_info[0].parts,
                                partition_info[0].nr_parts, norcs);
 
        if (onenandcs > GPMC_CS_NUM)
-               printk(KERN_INFO "OneNAND: Unable to find configuration "
-                               "in GPMC\n");
+               pr_err("OneNAND: Unable to find configuration in GPMC\n");
        else
                board_onenand_init(partition_info[1].parts,
                                        partition_info[1].nr_parts, onenandcs);
 
        if (nandcs > GPMC_CS_NUM)
-               printk(KERN_INFO "NAND: Unable to find configuration "
-                               "in GPMC\n");
+               pr_err("NAND: Unable to find configuration in GPMC\n");
        else
                board_nand_init(partition_info[2].parts,
-                               partition_info[2].nr_parts, nandcs);
+                       partition_info[2].nr_parts, nandcs, nand_type);
 }
index 69befe0..c240a3f 100644 (file)
@@ -25,6 +25,6 @@ struct flash_partitions {
 };
 
 extern void board_flash_init(struct flash_partitions [],
-                               char chip_sel[][GPMC_CS_NUM]);
+                               char chip_sel[][GPMC_CS_NUM], int nand_type);
 extern void board_nand_init(struct mtd_partition *nand_parts,
-                                       u8 nr_parts, u8 cs);
+                                       u8 nr_parts, u8 cs, int nand_type);
index 0e3d81e..73e3c31 100644 (file)
 static struct omap_board_config_kernel generic_config[] = {
 };
 
-static void __init omap_generic_init_irq(void)
+static void __init omap_generic_init_early(void)
 {
-       omap_board_config = generic_config;
-       omap_board_config_size = ARRAY_SIZE(generic_config);
        omap2_init_common_infrastructure();
        omap2_init_common_devices(NULL, NULL);
-       omap_init_irq();
 }
 
 static void __init omap_generic_init(void)
 {
        omap_serial_init();
+       omap_board_config = generic_config;
+       omap_board_config_size = ARRAY_SIZE(generic_config);
 }
 
 static void __init omap_generic_map_io(void)
@@ -68,9 +67,10 @@ static void __init omap_generic_map_io(void)
 MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
        /* Maintainer: Paul Mundt <paul.mundt@nokia.com> */
        .boot_params    = 0x80000100,
-       .map_io         = omap_generic_map_io,
        .reserve        = omap_reserve,
-       .init_irq       = omap_generic_init_irq,
+       .map_io         = omap_generic_map_io,
+       .init_early     = omap_generic_init_early,
+       .init_irq       = omap_init_irq,
        .init_machine   = omap_generic_init,
        .timer          = &omap_timer,
 MACHINE_END
index 25cc9da..bac7933 100644 (file)
@@ -290,14 +290,15 @@ static struct omap_board_config_kernel h4_config[] __initdata = {
        { OMAP_TAG_LCD,         &h4_lcd_config },
 };
 
-static void __init omap_h4_init_irq(void)
+static void __init omap_h4_init_early(void)
 {
-       omap_board_config = h4_config;
-       omap_board_config_size = ARRAY_SIZE(h4_config);
        omap2_init_common_infrastructure();
        omap2_init_common_devices(NULL, NULL);
+}
+
+static void __init omap_h4_init_irq(void)
+{
        omap_init_irq();
-       h4_init_flash();
 }
 
 static struct at24_platform_data m24c01 = {
@@ -330,6 +331,9 @@ static void __init omap_h4_init(void)
 {
        omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAF);
 
+       omap_board_config = h4_config;
+       omap_board_config_size = ARRAY_SIZE(h4_config);
+
        /*
         * Make sure the serial ports are muxed on at this point.
         * You have to mux them off in device drivers later on
@@ -367,6 +371,7 @@ static void __init omap_h4_init(void)
        platform_add_devices(h4_devices, ARRAY_SIZE(h4_devices));
        omap2_usbfs_init(&h4_usb_config);
        omap_serial_init();
+       h4_init_flash();
 }
 
 static void __init omap_h4_map_io(void)
@@ -378,8 +383,9 @@ static void __init omap_h4_map_io(void)
 MACHINE_START(OMAP_H4, "OMAP2420 H4 board")
        /* Maintainer: Paul Mundt <paul.mundt@nokia.com> */
        .boot_params    = 0x80000100,
-       .map_io         = omap_h4_map_io,
        .reserve        = omap_reserve,
+       .map_io         = omap_h4_map_io,
+       .init_early     = omap_h4_init_early,
        .init_irq       = omap_h4_init_irq,
        .init_machine   = omap_h4_init,
        .timer          = &omap_timer,
index f9f5344..d3199b4 100644 (file)
@@ -250,7 +250,7 @@ static inline void __init igep2_init_smsc911x(void) { }
 #endif
 
 static struct regulator_consumer_supply igep2_vmmc1_supply =
-       REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0");
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0");
 
 /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
 static struct regulator_init_data igep2_vmmc1 = {
@@ -268,7 +268,7 @@ static struct regulator_init_data igep2_vmmc1 = {
 };
 
 static struct regulator_consumer_supply igep2_vio_supply =
-       REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.1");
+       REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1");
 
 static struct regulator_init_data igep2_vio = {
        .constraints = {
@@ -286,7 +286,7 @@ static struct regulator_init_data igep2_vio = {
 };
 
 static struct regulator_consumer_supply igep2_vmmc2_supply =
-       REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1");
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
 
 static struct regulator_init_data igep2_vmmc2 = {
        .constraints            = {
@@ -485,18 +485,8 @@ static struct omap_dss_board_info igep2_dss_data = {
        .default_device = &igep2_dvi_device,
 };
 
-static struct platform_device igep2_dss_device = {
-       .name   = "omapdss",
-       .id     = -1,
-       .dev    = {
-               .platform_data = &igep2_dss_data,
-       },
-};
-
-static struct regulator_consumer_supply igep2_vpll2_supply = {
-       .supply = "vdds_dsi",
-       .dev    = &igep2_dss_device.dev,
-};
+static struct regulator_consumer_supply igep2_vpll2_supply =
+       REGULATOR_SUPPLY("vdds_dsi", "omapdss");
 
 static struct regulator_init_data igep2_vpll2 = {
        .constraints = {
@@ -521,21 +511,17 @@ static void __init igep2_display_init(void)
 }
 
 static struct platform_device *igep2_devices[] __initdata = {
-       &igep2_dss_device,
        &igep2_vwlan_device,
 };
 
-static void __init igep2_init_irq(void)
+static void __init igep2_init_early(void)
 {
        omap2_init_common_infrastructure();
        omap2_init_common_devices(m65kxxxxam_sdrc_params,
                                  m65kxxxxam_sdrc_params);
-       omap_init_irq();
 }
 
-static struct twl4030_codec_audio_data igep2_audio_data = {
-       .audio_mclk = 26000000,
-};
+static struct twl4030_codec_audio_data igep2_audio_data;
 
 static struct twl4030_codec_data igep2_codec_data = {
        .audio_mclk = 26000000,
@@ -697,6 +683,7 @@ static void __init igep2_init(void)
        /* Register I2C busses and drivers */
        igep2_i2c_init();
        platform_add_devices(igep2_devices, ARRAY_SIZE(igep2_devices));
+       omap_display_init(&igep2_dss_data);
        omap_serial_init();
        usb_musb_init(&musb_board_data);
        usbhs_init(&usbhs_bdata);
@@ -716,9 +703,10 @@ static void __init igep2_init(void)
 
 MACHINE_START(IGEP0020, "IGEP v2 board")
        .boot_params    = 0x80000100,
-       .map_io         = omap3_map_io,
        .reserve        = omap_reserve,
-       .init_irq       = igep2_init_irq,
+       .map_io         = omap3_map_io,
+       .init_early     = igep2_init_early,
+       .init_irq       = omap_init_irq,
        .init_machine   = igep2_init,
        .timer          = &omap_timer,
 MACHINE_END
index 579fc2d..b10db0e 100644 (file)
@@ -142,7 +142,7 @@ static void __init igep3_flash_init(void) {}
 #endif
 
 static struct regulator_consumer_supply igep3_vmmc1_supply =
-       REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0");
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0");
 
 /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
 static struct regulator_init_data igep3_vmmc1 = {
@@ -160,7 +160,7 @@ static struct regulator_init_data igep3_vmmc1 = {
 };
 
 static struct regulator_consumer_supply igep3_vio_supply =
-       REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.1");
+       REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1");
 
 static struct regulator_init_data igep3_vio = {
        .constraints = {
@@ -178,7 +178,7 @@ static struct regulator_init_data igep3_vio = {
 };
 
 static struct regulator_consumer_supply igep3_vmmc2_supply =
-       REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1");
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
 
 static struct regulator_init_data igep3_vmmc2 = {
        .constraints    = {
@@ -331,12 +331,11 @@ static struct platform_device *igep3_devices[] __initdata = {
        &igep3_vwlan_device,
 };
 
-static void __init igep3_init_irq(void)
+static void __init igep3_init_early(void)
 {
        omap2_init_common_infrastructure();
        omap2_init_common_devices(m65kxxxxam_sdrc_params,
                                  m65kxxxxam_sdrc_params);
-       omap_init_irq();
 }
 
 static struct twl4030_platform_data igep3_twl4030_pdata = {
@@ -452,7 +451,8 @@ MACHINE_START(IGEP0030, "IGEP OMAP3 module")
        .boot_params    = 0x80000100,
        .reserve        = omap_reserve,
        .map_io         = omap3_map_io,
-       .init_irq       = igep3_init_irq,
+       .init_early     = igep3_init_early,
+       .init_irq       = omap_init_irq,
        .init_machine   = igep3_init,
        .timer          = &omap_timer,
 MACHINE_END
index e5dc748..e2ba779 100644 (file)
@@ -288,13 +288,10 @@ static struct omap_board_config_kernel ldp_config[] __initdata = {
        { OMAP_TAG_LCD,         &ldp_lcd_config },
 };
 
-static void __init omap_ldp_init_irq(void)
+static void __init omap_ldp_init_early(void)
 {
-       omap_board_config = ldp_config;
-       omap_board_config_size = ARRAY_SIZE(ldp_config);
        omap2_init_common_infrastructure();
        omap2_init_common_devices(NULL, NULL);
-       omap_init_irq();
 }
 
 static struct twl4030_usb_data ldp_usb_data = {
@@ -330,6 +327,26 @@ static struct regulator_init_data ldp_vmmc1 = {
        .consumer_supplies      = &ldp_vmmc1_supply,
 };
 
+/* ads7846 on SPI */
+static struct regulator_consumer_supply ldp_vaux1_supplies[] = {
+       REGULATOR_SUPPLY("vcc", "spi1.0"),
+};
+
+/* VAUX1 */
+static struct regulator_init_data ldp_vaux1 = {
+       .constraints = {
+               .min_uV                 = 3000000,
+               .max_uV                 = 3000000,
+               .apply_uV               = true,
+               .valid_modes_mask       = REGULATOR_MODE_NORMAL
+                                       | REGULATOR_MODE_STANDBY,
+               .valid_ops_mask         = REGULATOR_CHANGE_MODE
+                                       | REGULATOR_CHANGE_STATUS,
+       },
+       .num_consumer_supplies          = ARRAY_SIZE(ldp_vaux1_supplies),
+       .consumer_supplies              = ldp_vaux1_supplies,
+};
+
 static struct twl4030_platform_data ldp_twldata = {
        .irq_base       = TWL4030_IRQ_BASE,
        .irq_end        = TWL4030_IRQ_END,
@@ -338,6 +355,7 @@ static struct twl4030_platform_data ldp_twldata = {
        .madc           = &ldp_madc_data,
        .usb            = &ldp_usb_data,
        .vmmc1          = &ldp_vmmc1,
+       .vaux1          = &ldp_vaux1,
        .gpio           = &ldp_gpio_data,
        .keypad         = &ldp_kp_twl4030_data,
 };
@@ -423,6 +441,8 @@ static struct mtd_partition ldp_nand_partitions[] = {
 static void __init omap_ldp_init(void)
 {
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
+       omap_board_config = ldp_config;
+       omap_board_config_size = ARRAY_SIZE(ldp_config);
        ldp_init_smsc911x();
        omap_i2c_init();
        platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices));
@@ -434,7 +454,7 @@ static void __init omap_ldp_init(void)
        omap_serial_init();
        usb_musb_init(&musb_board_data);
        board_nand_init(ldp_nand_partitions,
-               ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS);
+               ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS, 0);
 
        omap2_hsmmc_init(mmc);
        /* link regulators to MMC adapters */
@@ -443,9 +463,10 @@ static void __init omap_ldp_init(void)
 
 MACHINE_START(OMAP_LDP, "OMAP LDP board")
        .boot_params    = 0x80000100,
-       .map_io         = omap3_map_io,
        .reserve        = omap_reserve,
-       .init_irq       = omap_ldp_init_irq,
+       .map_io         = omap3_map_io,
+       .init_early     = omap_ldp_init_early,
+       .init_irq       = omap_init_irq,
        .init_machine   = omap_ldp_init,
        .timer          = &omap_timer,
 MACHINE_END
index f396756..e710cd9 100644 (file)
@@ -536,7 +536,7 @@ static void __init n8x0_mmc_init(void)
        }
 
        mmc_data[0] = &mmc1_data;
-       omap2_init_mmc(mmc_data, OMAP24XX_NR_MMC);
+       omap242x_init_mmc(mmc_data);
 }
 #else
 
@@ -628,11 +628,10 @@ static void __init n8x0_map_io(void)
        omap242x_map_common_io();
 }
 
-static void __init n8x0_init_irq(void)
+static void __init n8x0_init_early(void)
 {
        omap2_init_common_infrastructure();
        omap2_init_common_devices(NULL, NULL);
-       omap_init_irq();
 }
 
 #ifdef CONFIG_OMAP_MUX
@@ -703,27 +702,30 @@ static void __init n8x0_init_machine(void)
 
 MACHINE_START(NOKIA_N800, "Nokia N800")
        .boot_params    = 0x80000100,
-       .map_io         = n8x0_map_io,
        .reserve        = omap_reserve,
-       .init_irq       = n8x0_init_irq,
+       .map_io         = n8x0_map_io,
+       .init_early     = n8x0_init_early,
+       .init_irq       = omap_init_irq,
        .init_machine   = n8x0_init_machine,
        .timer          = &omap_timer,
 MACHINE_END
 
 MACHINE_START(NOKIA_N810, "Nokia N810")
        .boot_params    = 0x80000100,
-       .map_io         = n8x0_map_io,
        .reserve        = omap_reserve,
-       .init_irq       = n8x0_init_irq,
+       .map_io         = n8x0_map_io,
+       .init_early     = n8x0_init_early,
+       .init_irq       = omap_init_irq,
        .init_machine   = n8x0_init_machine,
        .timer          = &omap_timer,
 MACHINE_END
 
 MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
        .boot_params    = 0x80000100,
-       .map_io         = n8x0_map_io,
        .reserve        = omap_reserve,
-       .init_irq       = n8x0_init_irq,
+       .map_io         = n8x0_map_io,
+       .init_early     = n8x0_init_early,
+       .init_irq       = omap_init_irq,
        .init_machine   = n8x0_init_machine,
        .timer          = &omap_timer,
 MACHINE_END
index f0963b6..7640c05 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/gpio.h>
 #include <linux/input.h>
 #include <linux/gpio_keys.h>
+#include <linux/opp.h>
 
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <plat/gpmc.h>
 #include <plat/nand.h>
 #include <plat/usb.h>
+#include <plat/omap_device.h>
 
 #include "mux.h"
 #include "hsmmc.h"
 #include "timer-gp.h"
+#include "pm.h"
 
 #define NAND_BLOCK_SIZE                SZ_128K
 
@@ -228,14 +231,6 @@ static struct omap_dss_board_info beagle_dss_data = {
        .default_device = &beagle_dvi_device,
 };
 
-static struct platform_device beagle_dss_device = {
-       .name          = "omapdss",
-       .id            = -1,
-       .dev            = {
-               .platform_data = &beagle_dss_data,
-       },
-};
-
 static struct regulator_consumer_supply beagle_vdac_supply =
        REGULATOR_SUPPLY("vdda_dac", "omapdss");
 
@@ -435,9 +430,7 @@ static struct twl4030_usb_data beagle_usb_data = {
        .usb_mode       = T2_USB_MODE_ULPI,
 };
 
-static struct twl4030_codec_audio_data beagle_audio_data = {
-       .audio_mclk = 26000000,
-};
+static struct twl4030_codec_audio_data beagle_audio_data;
 
 static struct twl4030_codec_data beagle_codec_data = {
        .audio_mclk = 26000000,
@@ -536,11 +529,15 @@ static struct platform_device keys_gpio = {
        },
 };
 
-static void __init omap3_beagle_init_irq(void)
+static void __init omap3_beagle_init_early(void)
 {
        omap2_init_common_infrastructure();
        omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
                                  mt46h32m32lf6_sdrc_params);
+}
+
+static void __init omap3_beagle_init_irq(void)
+{
        omap_init_irq();
 #ifdef CONFIG_OMAP_32K_TIMER
        omap2_gp_clockevent_set_gptimer(12);
@@ -550,7 +547,6 @@ static void __init omap3_beagle_init_irq(void)
 static struct platform_device *omap3_beagle_devices[] __initdata = {
        &leds_gpio,
        &keys_gpio,
-       &beagle_dss_device,
 };
 
 static void __init omap3beagle_flash_init(void)
@@ -610,6 +606,52 @@ static struct omap_musb_board_data musb_board_data = {
        .power                  = 100,
 };
 
+static void __init beagle_opp_init(void)
+{
+       int r = 0;
+
+       /* Initialize the omap3 opp table */
+       if (omap3_opp_init()) {
+               pr_err("%s: opp default init failed\n", __func__);
+               return;
+       }
+
+       /* Custom OPP enabled for XM */
+       if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
+               struct omap_hwmod *mh = omap_hwmod_lookup("mpu");
+               struct omap_hwmod *dh = omap_hwmod_lookup("iva");
+               struct device *dev;
+
+               if (!mh || !dh) {
+                       pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n",
+                               __func__, mh, dh);
+                       return;
+               }
+               /* Enable MPU 1GHz and lower opps */
+               dev = &mh->od->pdev.dev;
+               r = opp_enable(dev, 800000000);
+               /* TODO: MPU 1GHz needs SR and ABB */
+
+               /* Enable IVA 800MHz and lower opps */
+               dev = &dh->od->pdev.dev;
+               r |= opp_enable(dev, 660000000);
+               /* TODO: DSP 800MHz needs SR and ABB */
+               if (r) {
+                       pr_err("%s: failed to enable higher opp %d\n",
+                               __func__, r);
+                       /*
+                        * Cleanup - disable the higher freqs - we dont care
+                        * about the results
+                        */
+                       dev = &mh->od->pdev.dev;
+                       opp_disable(dev, 800000000);
+                       dev = &dh->od->pdev.dev;
+                       opp_disable(dev, 660000000);
+               }
+       }
+       return;
+}
+
 static void __init omap3_beagle_init(void)
 {
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
@@ -617,6 +659,7 @@ static void __init omap3_beagle_init(void)
        omap3_beagle_i2c_init();
        platform_add_devices(omap3_beagle_devices,
                        ARRAY_SIZE(omap3_beagle_devices));
+       omap_display_init(&beagle_dss_data);
        omap_serial_init();
 
        omap_mux_init_gpio(170, OMAP_PIN_INPUT);
@@ -633,13 +676,15 @@ static void __init omap3_beagle_init(void)
        omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
 
        beagle_display_init();
+       beagle_opp_init();
 }
 
 MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
        /* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */
        .boot_params    = 0x80000100,
-       .map_io         = omap3_map_io,
        .reserve        = omap_reserve,
+       .map_io         = omap3_map_io,
+       .init_early     = omap3_beagle_init_early,
        .init_irq       = omap3_beagle_init_irq,
        .init_machine   = omap3_beagle_init,
        .timer          = &omap_timer,
index 38a2d91..0fa2c7b 100644 (file)
@@ -30,6 +30,8 @@
 #include <linux/usb/otg.h>
 #include <linux/smsc911x.h>
 
+#include <linux/wl12xx.h>
+#include <linux/regulator/fixed.h>
 #include <linux/regulator/machine.h>
 #include <linux/mmc/host.h>
 
 #define OMAP3EVM_ETHR_ID_REV   0x50
 #define OMAP3EVM_ETHR_GPIO_IRQ 176
 #define OMAP3EVM_SMSC911X_CS   5
+/*
+ * Eth Reset signal
+ *     64 = Generation 1 (<=RevD)
+ *     7 = Generation 2 (>=RevE)
+ */
+#define OMAP3EVM_GEN1_ETHR_GPIO_RST    64
+#define OMAP3EVM_GEN2_ETHR_GPIO_RST    7
 
 static u8 omap3_evm_version;
 
@@ -124,10 +133,15 @@ static struct platform_device omap3evm_smsc911x_device = {
 
 static inline void __init omap3evm_init_smsc911x(void)
 {
-       int eth_cs;
+       int eth_cs, eth_rst;
        struct clk *l3ck;
        unsigned int rate;
 
+       if (get_omap3_evm_rev() == OMAP3EVM_BOARD_GEN_1)
+               eth_rst = OMAP3EVM_GEN1_ETHR_GPIO_RST;
+       else
+               eth_rst = OMAP3EVM_GEN2_ETHR_GPIO_RST;
+
        eth_cs = OMAP3EVM_SMSC911X_CS;
 
        l3ck = clk_get(NULL, "l3_ck");
@@ -136,6 +150,27 @@ static inline void __init omap3evm_init_smsc911x(void)
        else
                rate = clk_get_rate(l3ck);
 
+       /* Configure ethernet controller reset gpio */
+       if (cpu_is_omap3430()) {
+               if (gpio_request(eth_rst, "SMSC911x gpio") < 0) {
+                       pr_err(KERN_ERR "Failed to request %d for smsc911x\n",
+                                       eth_rst);
+                       return;
+               }
+
+               if (gpio_direction_output(eth_rst, 1) < 0) {
+                       pr_err(KERN_ERR "Failed to set direction of %d for" \
+                                       " smsc911x\n", eth_rst);
+                       return;
+               }
+               /* reset pulse to ethernet controller*/
+               usleep_range(150, 220);
+               gpio_set_value(eth_rst, 0);
+               usleep_range(150, 220);
+               gpio_set_value(eth_rst, 1);
+               usleep_range(1, 2);
+       }
+
        if (gpio_request(OMAP3EVM_ETHR_GPIO_IRQ, "SMSC911x irq") < 0) {
                printk(KERN_ERR "Failed to request GPIO%d for smsc911x IRQ\n",
                        OMAP3EVM_ETHR_GPIO_IRQ);
@@ -235,9 +270,9 @@ static int omap3_evm_enable_lcd(struct omap_dss_device *dssdev)
        gpio_set_value(OMAP3EVM_LCD_PANEL_ENVDD, 0);
 
        if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2)
-               gpio_set_value(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0);
+               gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0);
        else
-               gpio_set_value(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1);
+               gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1);
 
        lcd_enabled = 1;
        return 0;
@@ -248,9 +283,9 @@ static void omap3_evm_disable_lcd(struct omap_dss_device *dssdev)
        gpio_set_value(OMAP3EVM_LCD_PANEL_ENVDD, 1);
 
        if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2)
-               gpio_set_value(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1);
+               gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1);
        else
-               gpio_set_value(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0);
+               gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0);
 
        lcd_enabled = 0;
 }
@@ -289,7 +324,7 @@ static int omap3_evm_enable_dvi(struct omap_dss_device *dssdev)
                return -EINVAL;
        }
 
-       gpio_set_value(OMAP3EVM_DVI_PANEL_EN_GPIO, 1);
+       gpio_set_value_cansleep(OMAP3EVM_DVI_PANEL_EN_GPIO, 1);
 
        dvi_enabled = 1;
        return 0;
@@ -297,7 +332,7 @@ static int omap3_evm_enable_dvi(struct omap_dss_device *dssdev)
 
 static void omap3_evm_disable_dvi(struct omap_dss_device *dssdev)
 {
-       gpio_set_value(OMAP3EVM_DVI_PANEL_EN_GPIO, 0);
+       gpio_set_value_cansleep(OMAP3EVM_DVI_PANEL_EN_GPIO, 0);
 
        dvi_enabled = 0;
 }
@@ -328,14 +363,6 @@ static struct omap_dss_board_info omap3_evm_dss_data = {
        .default_device = &omap3_evm_lcd_device,
 };
 
-static struct platform_device omap3_evm_dss_device = {
-       .name           = "omapdss",
-       .id             = -1,
-       .dev            = {
-               .platform_data = &omap3_evm_dss_data,
-       },
-};
-
 static struct regulator_consumer_supply omap3evm_vmmc1_supply = {
        .supply                 = "vmmc",
 };
@@ -381,6 +408,16 @@ static struct omap2_hsmmc_info mmc[] = {
                .gpio_cd        = -EINVAL,
                .gpio_wp        = 63,
        },
+#ifdef CONFIG_WL12XX_PLATFORM_DATA
+       {
+               .name           = "wl1271",
+               .mmc            = 2,
+               .caps           = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
+               .gpio_wp        = -EINVAL,
+               .gpio_cd        = -EINVAL,
+               .nonremovable   = true,
+       },
+#endif
        {}      /* Terminator */
 };
 
@@ -411,6 +448,8 @@ static struct platform_device leds_gpio = {
 static int omap3evm_twl_gpio_setup(struct device *dev,
                unsigned gpio, unsigned ngpio)
 {
+       int r;
+
        /* gpio + 0 is "mmc0_cd" (input/IRQ) */
        omap_mux_init_gpio(63, OMAP_PIN_INPUT);
        mmc[0].gpio_cd = gpio + 0;
@@ -426,8 +465,12 @@ static int omap3evm_twl_gpio_setup(struct device *dev,
         */
 
        /* TWL4030_GPIO_MAX + 0 == ledA, LCD Backlight control */
-       gpio_request(gpio + TWL4030_GPIO_MAX, "EN_LCD_BKL");
-       gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
+       r = gpio_request(gpio + TWL4030_GPIO_MAX, "EN_LCD_BKL");
+       if (!r)
+               r = gpio_direction_output(gpio + TWL4030_GPIO_MAX,
+                       (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) ? 1 : 0);
+       if (r)
+               printk(KERN_ERR "failed to get/set lcd_bkl gpio\n");
 
        /* gpio + 7 == DVI Enable */
        gpio_request(gpio + 7, "EN_DVI");
@@ -491,19 +534,15 @@ static struct twl4030_madc_platform_data omap3evm_madc_data = {
        .irq_line       = 1,
 };
 
-static struct twl4030_codec_audio_data omap3evm_audio_data = {
-       .audio_mclk = 26000000,
-};
+static struct twl4030_codec_audio_data omap3evm_audio_data;
 
 static struct twl4030_codec_data omap3evm_codec_data = {
        .audio_mclk = 26000000,
        .audio = &omap3evm_audio_data,
 };
 
-static struct regulator_consumer_supply omap3_evm_vdda_dac_supply = {
-       .supply         = "vdda_dac",
-       .dev            = &omap3_evm_dss_device.dev,
-};
+static struct regulator_consumer_supply omap3_evm_vdda_dac_supply =
+       REGULATOR_SUPPLY("vdda_dac", "omapdss");
 
 /* VDAC for DSS driving S-Video */
 static struct regulator_init_data omap3_evm_vdac = {
@@ -538,6 +577,66 @@ static struct regulator_init_data omap3_evm_vpll2 = {
        .consumer_supplies      = &omap3_evm_vpll2_supply,
 };
 
+/* ads7846 on SPI */
+static struct regulator_consumer_supply omap3evm_vio_supply =
+       REGULATOR_SUPPLY("vcc", "spi1.0");
+
+/* VIO for ads7846 */
+static struct regulator_init_data omap3evm_vio = {
+       .constraints = {
+               .min_uV                 = 1800000,
+               .max_uV                 = 1800000,
+               .apply_uV               = true,
+               .valid_modes_mask       = REGULATOR_MODE_NORMAL
+                                       | REGULATOR_MODE_STANDBY,
+               .valid_ops_mask         = REGULATOR_CHANGE_MODE
+                                       | REGULATOR_CHANGE_STATUS,
+       },
+       .num_consumer_supplies  = 1,
+       .consumer_supplies      = &omap3evm_vio_supply,
+};
+
+#ifdef CONFIG_WL12XX_PLATFORM_DATA
+
+#define OMAP3EVM_WLAN_PMENA_GPIO       (150)
+#define OMAP3EVM_WLAN_IRQ_GPIO         (149)
+
+static struct regulator_consumer_supply omap3evm_vmmc2_supply =
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
+
+/* VMMC2 for driving the WL12xx module */
+static struct regulator_init_data omap3evm_vmmc2 = {
+       .constraints = {
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+       },
+       .num_consumer_supplies  = 1,
+       .consumer_supplies = &omap3evm_vmmc2_supply,
+};
+
+static struct fixed_voltage_config omap3evm_vwlan = {
+       .supply_name            = "vwl1271",
+       .microvolts             = 1800000, /* 1.80V */
+       .gpio                   = OMAP3EVM_WLAN_PMENA_GPIO,
+       .startup_delay          = 70000, /* 70ms */
+       .enable_high            = 1,
+       .enabled_at_boot        = 0,
+       .init_data              = &omap3evm_vmmc2,
+};
+
+static struct platform_device omap3evm_wlan_regulator = {
+       .name           = "reg-fixed-voltage",
+       .id             = 1,
+       .dev = {
+               .platform_data  = &omap3evm_vwlan,
+       },
+};
+
+struct wl12xx_platform_data omap3evm_wlan_data __initdata = {
+       .irq = OMAP_GPIO_IRQ(OMAP3EVM_WLAN_IRQ_GPIO),
+       .board_ref_clock = WL12XX_REFCLOCK_38, /* 38.4 MHz */
+};
+#endif
+
 static struct twl4030_platform_data omap3evm_twldata = {
        .irq_base       = TWL4030_IRQ_BASE,
        .irq_end        = TWL4030_IRQ_END,
@@ -550,6 +649,7 @@ static struct twl4030_platform_data omap3evm_twldata = {
        .codec          = &omap3evm_codec_data,
        .vdac           = &omap3_evm_vdac,
        .vpll2          = &omap3_evm_vpll2,
+       .vio            = &omap3evm_vio,
 };
 
 static struct i2c_board_info __initdata omap3evm_i2c_boardinfo[] = {
@@ -625,19 +725,12 @@ static struct spi_board_info omap3evm_spi_board_info[] = {
 static struct omap_board_config_kernel omap3_evm_config[] __initdata = {
 };
 
-static void __init omap3_evm_init_irq(void)
+static void __init omap3_evm_init_early(void)
 {
-       omap_board_config = omap3_evm_config;
-       omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
        omap2_init_common_infrastructure();
        omap2_init_common_devices(mt46h32m32lf6_sdrc_params, NULL);
-       omap_init_irq();
 }
 
-static struct platform_device *omap3_evm_devices[] __initdata = {
-       &omap3_evm_dss_device,
-};
-
 static struct usbhs_omap_board_data usbhs_bdata __initdata = {
 
        .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
@@ -652,14 +745,76 @@ static struct usbhs_omap_board_data usbhs_bdata __initdata = {
 };
 
 #ifdef CONFIG_OMAP_MUX
-static struct omap_board_mux board_mux[] __initdata = {
+static struct omap_board_mux omap35x_board_mux[] __initdata = {
+       OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP |
+                               OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW |
+                               OMAP_PIN_OFF_WAKEUPENABLE),
+       OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
+                               OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW |
+                               OMAP_PIN_OFF_WAKEUPENABLE),
+       OMAP3_MUX(SYS_BOOT5, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
+                               OMAP_PIN_OFF_NONE),
+       OMAP3_MUX(GPMC_WAIT2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
+                               OMAP_PIN_OFF_NONE),
+#ifdef CONFIG_WL12XX_PLATFORM_DATA
+       /* WLAN IRQ - GPIO 149 */
+       OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
+
+       /* WLAN POWER ENABLE - GPIO 150 */
+       OMAP3_MUX(UART1_CTS, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
+
+       /* MMC2 SDIO pin muxes for WL12xx */
+       OMAP3_MUX(SDMMC2_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
+       OMAP3_MUX(SDMMC2_CMD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
+       OMAP3_MUX(SDMMC2_DAT0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
+       OMAP3_MUX(SDMMC2_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
+       OMAP3_MUX(SDMMC2_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
+       OMAP3_MUX(SDMMC2_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
+#endif
+       { .reg_offset = OMAP_MUX_TERMINATOR },
+};
+
+static struct omap_board_mux omap36x_board_mux[] __initdata = {
        OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP |
                                OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW |
                                OMAP_PIN_OFF_WAKEUPENABLE),
        OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
-                               OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW),
+                               OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW |
+                               OMAP_PIN_OFF_WAKEUPENABLE),
+       /* AM/DM37x EVM: DSS data bus muxed with sys_boot */
+       OMAP3_MUX(DSS_DATA18, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
+       OMAP3_MUX(DSS_DATA19, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
+       OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
+       OMAP3_MUX(DSS_DATA21, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
+       OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
+       OMAP3_MUX(DSS_DATA23, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
+       OMAP3_MUX(SYS_BOOT0, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
+       OMAP3_MUX(SYS_BOOT1, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
+       OMAP3_MUX(SYS_BOOT3, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
+       OMAP3_MUX(SYS_BOOT4, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
+       OMAP3_MUX(SYS_BOOT5, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
+       OMAP3_MUX(SYS_BOOT6, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
+#ifdef CONFIG_WL12XX_PLATFORM_DATA
+       /* WLAN IRQ - GPIO 149 */
+       OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
+
+       /* WLAN POWER ENABLE - GPIO 150 */
+       OMAP3_MUX(UART1_CTS, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
+
+       /* MMC2 SDIO pin muxes for WL12xx */
+       OMAP3_MUX(SDMMC2_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
+       OMAP3_MUX(SDMMC2_CMD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
+       OMAP3_MUX(SDMMC2_DAT0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
+       OMAP3_MUX(SDMMC2_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
+       OMAP3_MUX(SDMMC2_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
+       OMAP3_MUX(SDMMC2_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
+#endif
+
        { .reg_offset = OMAP_MUX_TERMINATOR },
 };
+#else
+#define omap35x_board_mux      NULL
+#define omap36x_board_mux      NULL
 #endif
 
 static struct omap_musb_board_data musb_board_data = {
@@ -671,11 +826,18 @@ static struct omap_musb_board_data musb_board_data = {
 static void __init omap3_evm_init(void)
 {
        omap3_evm_get_revision();
-       omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
+
+       if (cpu_is_omap3630())
+               omap3_mux_init(omap36x_board_mux, OMAP_PACKAGE_CBB);
+       else
+               omap3_mux_init(omap35x_board_mux, OMAP_PACKAGE_CBB);
+
+       omap_board_config = omap3_evm_config;
+       omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
 
        omap3_evm_i2c_init();
 
-       platform_add_devices(omap3_evm_devices, ARRAY_SIZE(omap3_evm_devices));
+       omap_display_init(&omap3_evm_dss_data);
 
        spi_register_board_info(omap3evm_spi_board_info,
                                ARRAY_SIZE(omap3evm_spi_board_info));
@@ -715,14 +877,22 @@ static void __init omap3_evm_init(void)
        ads7846_dev_init();
        omap3evm_init_smsc911x();
        omap3_evm_display_init();
+
+#ifdef CONFIG_WL12XX_PLATFORM_DATA
+       /* WL12xx WLAN Init */
+       if (wl12xx_set_platform_data(&omap3evm_wlan_data))
+               pr_err("error setting wl12xx data\n");
+       platform_device_register(&omap3evm_wlan_regulator);
+#endif
 }
 
 MACHINE_START(OMAP3EVM, "OMAP3 EVM")
        /* Maintainer: Syed Mohammed Khasim - Texas Instruments */
        .boot_params    = 0x80000100,
-       .map_io         = omap3_map_io,
        .reserve        = omap_reserve,
-       .init_irq       = omap3_evm_init_irq,
+       .map_io         = omap3_map_io,
+       .init_early     = omap3_evm_init_early,
+       .init_irq       = omap_init_irq,
        .init_machine   = omap3_evm_init,
        .timer          = &omap_timer,
 MACHINE_END
index 15e4b08..b726943 100644 (file)
@@ -195,11 +195,10 @@ static inline void __init board_smsc911x_init(void)
        gpmc_smsc911x_init(&board_smsc911x_data);
 }
 
-static void __init omap3logic_init_irq(void)
+static void __init omap3logic_init_early(void)
 {
        omap2_init_common_infrastructure();
        omap2_init_common_devices(NULL, NULL);
-       omap_init_irq();
 }
 
 #ifdef CONFIG_OMAP_MUX
@@ -225,7 +224,8 @@ static void __init omap3logic_init(void)
 MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board")
        .boot_params    = 0x80000100,
        .map_io         = omap3_map_io,
-       .init_irq       = omap3logic_init_irq,
+       .init_early     = omap3logic_init_early,
+       .init_irq       = omap_init_irq,
        .init_machine   = omap3logic_init,
        .timer          = &omap_timer,
 MACHINE_END
@@ -233,7 +233,8 @@ MACHINE_END
 MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board")
        .boot_params    = 0x80000100,
        .map_io         = omap3_map_io,
-       .init_irq       = omap3logic_init_irq,
+       .init_early     = omap3logic_init_early,
+       .init_irq       = omap_init_irq,
        .init_machine   = omap3logic_init,
        .timer          = &omap_timer,
 MACHINE_END
index aa05f2e..2e5dc21 100644 (file)
@@ -253,14 +253,6 @@ static struct omap_dss_board_info pandora_dss_data = {
        .default_device = &pandora_lcd_device,
 };
 
-static struct platform_device pandora_dss_device = {
-       .name           = "omapdss",
-       .id             = -1,
-       .dev            = {
-               .platform_data = &pandora_dss_data,
-       },
-};
-
 static void pandora_wl1251_init_card(struct mmc_card *card)
 {
        /*
@@ -341,13 +333,13 @@ static struct twl4030_gpio_platform_data omap3pandora_gpio_data = {
 };
 
 static struct regulator_consumer_supply pandora_vmmc1_supply =
-       REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0");
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0");
 
 static struct regulator_consumer_supply pandora_vmmc2_supply =
-       REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1");
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
 
 static struct regulator_consumer_supply pandora_vmmc3_supply =
-       REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.2");
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2");
 
 static struct regulator_consumer_supply pandora_vdda_dac_supply =
        REGULATOR_SUPPLY("vdda_dac", "omapdss");
@@ -524,9 +516,7 @@ static struct twl4030_usb_data omap3pandora_usb_data = {
        .usb_mode       = T2_USB_MODE_ULPI,
 };
 
-static struct twl4030_codec_audio_data omap3pandora_audio_data = {
-       .audio_mclk = 26000000,
-};
+static struct twl4030_codec_audio_data omap3pandora_audio_data;
 
 static struct twl4030_codec_data omap3pandora_codec_data = {
        .audio_mclk = 26000000,
@@ -634,12 +624,11 @@ static struct spi_board_info omap3pandora_spi_board_info[] __initdata = {
        }
 };
 
-static void __init omap3pandora_init_irq(void)
+static void __init omap3pandora_init_early(void)
 {
        omap2_init_common_infrastructure();
        omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
                                  mt46h32m32lf6_sdrc_params);
-       omap_init_irq();
 }
 
 static void __init pandora_wl1251_init(void)
@@ -677,7 +666,6 @@ fail:
 static struct platform_device *omap3pandora_devices[] __initdata = {
        &pandora_leds_gpio,
        &pandora_keys_gpio,
-       &pandora_dss_device,
        &pandora_vwlan_device,
 };
 
@@ -712,6 +700,7 @@ static void __init omap3pandora_init(void)
        pandora_wl1251_init();
        platform_add_devices(omap3pandora_devices,
                        ARRAY_SIZE(omap3pandora_devices));
+       omap_display_init(&pandora_dss_data);
        omap_serial_init();
        spi_register_board_info(omap3pandora_spi_board_info,
                        ARRAY_SIZE(omap3pandora_spi_board_info));
@@ -727,9 +716,10 @@ static void __init omap3pandora_init(void)
 
 MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console")
        .boot_params    = 0x80000100,
-       .map_io         = omap3_map_io,
        .reserve        = omap_reserve,
-       .init_irq       = omap3pandora_init_irq,
+       .map_io         = omap3_map_io,
+       .init_early     = omap3pandora_init_early,
+       .init_irq       = omap_init_irq,
        .init_machine   = omap3pandora_init,
        .timer          = &omap_timer,
 MACHINE_END
index f6c8778..8ebdbc3 100644 (file)
@@ -240,14 +240,6 @@ static struct omap_dss_board_info omap3_stalker_dss_data = {
        .default_device = &omap3_stalker_dvi_device,
 };
 
-static struct platform_device omap3_stalker_dss_device = {
-       .name   = "omapdss",
-       .id     = -1,
-       .dev    = {
-               .platform_data  = &omap3_stalker_dss_data,
-       },
-};
-
 static struct regulator_consumer_supply omap3stalker_vmmc1_supply = {
        .supply         = "vmmc",
 };
@@ -439,19 +431,15 @@ static struct twl4030_madc_platform_data omap3stalker_madc_data = {
        .irq_line       = 1,
 };
 
-static struct twl4030_codec_audio_data omap3stalker_audio_data = {
-       .audio_mclk     = 26000000,
-};
+static struct twl4030_codec_audio_data omap3stalker_audio_data;
 
 static struct twl4030_codec_data omap3stalker_codec_data = {
        .audio_mclk     = 26000000,
        .audio          = &omap3stalker_audio_data,
 };
 
-static struct regulator_consumer_supply omap3_stalker_vdda_dac_supply = {
-       .supply         = "vdda_dac",
-       .dev            = &omap3_stalker_dss_device.dev,
-};
+static struct regulator_consumer_supply omap3_stalker_vdda_dac_supply =
+       REGULATOR_SUPPLY("vdda_dac", "omapdss");
 
 /* VDAC for DSS driving S-Video */
 static struct regulator_init_data omap3_stalker_vdac = {
@@ -469,10 +457,8 @@ static struct regulator_init_data omap3_stalker_vdac = {
 };
 
 /* VPLL2 for digital video outputs */
-static struct regulator_consumer_supply omap3_stalker_vpll2_supply = {
-       .supply         = "vdds_dsi",
-       .dev            = &omap3_stalker_lcd_device.dev,
-};
+static struct regulator_consumer_supply omap3_stalker_vpll2_supply =
+       REGULATOR_SUPPLY("vdds_dsi", "omapdss");
 
 static struct regulator_init_data omap3_stalker_vpll2 = {
        .constraints            = {
@@ -591,12 +577,14 @@ static struct spi_board_info omap3stalker_spi_board_info[] = {
 static struct omap_board_config_kernel omap3_stalker_config[] __initdata = {
 };
 
-static void __init omap3_stalker_init_irq(void)
+static void __init omap3_stalker_init_early(void)
 {
-       omap_board_config = omap3_stalker_config;
-       omap_board_config_size = ARRAY_SIZE(omap3_stalker_config);
        omap2_init_common_infrastructure();
        omap2_init_common_devices(mt46h32m32lf6_sdrc_params, NULL);
+}
+
+static void __init omap3_stalker_init_irq(void)
+{
        omap_init_irq();
 #ifdef CONFIG_OMAP_32K_TIMER
        omap2_gp_clockevent_set_gptimer(12);
@@ -604,7 +592,6 @@ static void __init omap3_stalker_init_irq(void)
 }
 
 static struct platform_device *omap3_stalker_devices[] __initdata = {
-       &omap3_stalker_dss_device,
        &keys_gpio,
 };
 
@@ -638,12 +625,15 @@ static struct omap_musb_board_data musb_board_data = {
 static void __init omap3_stalker_init(void)
 {
        omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
+       omap_board_config = omap3_stalker_config;
+       omap_board_config_size = ARRAY_SIZE(omap3_stalker_config);
 
        omap3_stalker_i2c_init();
 
        platform_add_devices(omap3_stalker_devices,
                             ARRAY_SIZE(omap3_stalker_devices));
 
+       omap_display_init(&omap3_stalker_dss_data);
        spi_register_board_info(omap3stalker_spi_board_info,
                                ARRAY_SIZE(omap3stalker_spi_board_info));
 
@@ -666,6 +656,7 @@ MACHINE_START(SBC3530, "OMAP3 STALKER")
        /* Maintainer: Jason Lam -lzg@ema-tech.com */
        .boot_params            = 0x80000100,
        .map_io                 = omap3_map_io,
+       .init_early             = omap3_stalker_init_early,
        .init_irq               = omap3_stalker_init_irq,
        .init_machine           = omap3_stalker_init,
        .timer                  = &omap_timer,
index 84cfddb..127cb17 100644 (file)
@@ -252,9 +252,7 @@ static struct twl4030_usb_data touchbook_usb_data = {
        .usb_mode       = T2_USB_MODE_ULPI,
 };
 
-static struct twl4030_codec_audio_data touchbook_audio_data = {
-       .audio_mclk = 26000000,
-};
+static struct twl4030_codec_audio_data touchbook_audio_data;
 
 static struct twl4030_codec_data touchbook_codec_data = {
        .audio_mclk = 26000000,
@@ -415,14 +413,15 @@ static struct omap_board_mux board_mux[] __initdata = {
 };
 #endif
 
-static void __init omap3_touchbook_init_irq(void)
+static void __init omap3_touchbook_init_early(void)
 {
-       omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
-       omap_board_config = omap3_touchbook_config;
-       omap_board_config_size = ARRAY_SIZE(omap3_touchbook_config);
        omap2_init_common_infrastructure();
        omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
                                  mt46h32m32lf6_sdrc_params);
+}
+
+static void __init omap3_touchbook_init_irq(void)
+{
        omap_init_irq();
 #ifdef CONFIG_OMAP_32K_TIMER
        omap2_gp_clockevent_set_gptimer(12);
@@ -510,6 +509,10 @@ static struct omap_musb_board_data musb_board_data = {
 
 static void __init omap3_touchbook_init(void)
 {
+       omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
+       omap_board_config = omap3_touchbook_config;
+       omap_board_config_size = ARRAY_SIZE(omap3_touchbook_config);
+
        pm_power_off = omap3_touchbook_poweroff;
 
        omap3_touchbook_i2c_init();
@@ -538,8 +541,9 @@ static void __init omap3_touchbook_init(void)
 MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board")
        /* Maintainer: Gregoire Gentil - http://www.alwaysinnovating.com */
        .boot_params    = 0x80000100,
-       .map_io         = omap3_map_io,
        .reserve        = omap_reserve,
+       .map_io         = omap3_map_io,
+       .init_early     = omap3_touchbook_init_early,
        .init_irq       = omap3_touchbook_init_irq,
        .init_machine   = omap3_touchbook_init,
        .timer          = &omap_timer,
index ed61c1f..0f4d8a7 100644 (file)
@@ -26,6 +26,8 @@
 #include <linux/usb/otg.h>
 #include <linux/i2c/twl.h>
 #include <linux/regulator/machine.h>
+#include <linux/regulator/fixed.h>
+#include <linux/wl12xx.h>
 
 #include <mach/hardware.h>
 #include <mach/omap4-common.h>
 
 #define GPIO_HUB_POWER         1
 #define GPIO_HUB_NRESET                62
+#define GPIO_WIFI_PMENA                43
+#define GPIO_WIFI_IRQ          53
+
+/* wl127x BT, FM, GPS connectivity chip */
+static int wl1271_gpios[] = {46, -1, -1};
+static struct platform_device wl1271_device = {
+       .name   = "kim",
+       .id     = -1,
+       .dev    = {
+               .platform_data  = &wl1271_gpios,
+       },
+};
 
 static struct gpio_led gpio_leds[] = {
        {
@@ -74,13 +88,13 @@ static struct platform_device leds_gpio = {
 
 static struct platform_device *panda_devices[] __initdata = {
        &leds_gpio,
+       &wl1271_device,
 };
 
-static void __init omap4_panda_init_irq(void)
+static void __init omap4_panda_init_early(void)
 {
        omap2_init_common_infrastructure();
        omap2_init_common_devices(NULL, NULL);
-       gic_init_irq();
 }
 
 static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
@@ -163,16 +177,62 @@ static struct omap2_hsmmc_info mmc[] = {
                .gpio_wp        = -EINVAL,
                .gpio_cd        = -EINVAL,
        },
+       {
+               .name           = "wl1271",
+               .mmc            = 5,
+               .caps           = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
+               .gpio_wp        = -EINVAL,
+               .gpio_cd        = -EINVAL,
+               .ocr_mask       = MMC_VDD_165_195,
+               .nonremovable   = true,
+       },
        {}      /* Terminator */
 };
 
 static struct regulator_consumer_supply omap4_panda_vmmc_supply[] = {
        {
                .supply = "vmmc",
-               .dev_name = "mmci-omap-hs.0",
+               .dev_name = "omap_hsmmc.0",
        },
 };
 
+static struct regulator_consumer_supply omap4_panda_vmmc5_supply = {
+       .supply = "vmmc",
+       .dev_name = "omap_hsmmc.4",
+};
+
+static struct regulator_init_data panda_vmmc5 = {
+       .constraints = {
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+       },
+       .num_consumer_supplies = 1,
+       .consumer_supplies = &omap4_panda_vmmc5_supply,
+};
+
+static struct fixed_voltage_config panda_vwlan = {
+       .supply_name = "vwl1271",
+       .microvolts = 1800000, /* 1.8V */
+       .gpio = GPIO_WIFI_PMENA,
+       .startup_delay = 70000, /* 70msec */
+       .enable_high = 1,
+       .enabled_at_boot = 0,
+       .init_data = &panda_vmmc5,
+};
+
+static struct platform_device omap_vwlan_device = {
+       .name           = "reg-fixed-voltage",
+       .id             = 1,
+       .dev = {
+               .platform_data = &panda_vwlan,
+       },
+};
+
+struct wl12xx_platform_data omap_panda_wlan_data  __initdata = {
+       .irq = OMAP_GPIO_IRQ(GPIO_WIFI_IRQ),
+       /* PANDA ref clock is 38.4 MHz */
+       .board_ref_clock = 2,
+};
+
 static int omap4_twl6030_hsmmc_late_init(struct device *dev)
 {
        int ret = 0;
@@ -306,7 +366,6 @@ static struct regulator_init_data omap4_panda_vana = {
        .constraints = {
                .min_uV                 = 2100000,
                .max_uV                 = 2100000,
-               .apply_uV               = true,
                .valid_modes_mask       = REGULATOR_MODE_NORMAL
                                        | REGULATOR_MODE_STANDBY,
                .valid_ops_mask  = REGULATOR_CHANGE_MODE
@@ -318,7 +377,6 @@ static struct regulator_init_data omap4_panda_vcxio = {
        .constraints = {
                .min_uV                 = 1800000,
                .max_uV                 = 1800000,
-               .apply_uV               = true,
                .valid_modes_mask       = REGULATOR_MODE_NORMAL
                                        | REGULATOR_MODE_STANDBY,
                .valid_ops_mask  = REGULATOR_CHANGE_MODE
@@ -330,7 +388,6 @@ static struct regulator_init_data omap4_panda_vdac = {
        .constraints = {
                .min_uV                 = 1800000,
                .max_uV                 = 1800000,
-               .apply_uV               = true,
                .valid_modes_mask       = REGULATOR_MODE_NORMAL
                                        | REGULATOR_MODE_STANDBY,
                .valid_ops_mask  = REGULATOR_CHANGE_MODE
@@ -392,10 +449,90 @@ static int __init omap4_panda_i2c_init(void)
 
 #ifdef CONFIG_OMAP_MUX
 static struct omap_board_mux board_mux[] __initdata = {
+       /* WLAN IRQ - GPIO 53 */
+       OMAP4_MUX(GPMC_NCS3, OMAP_MUX_MODE3 | OMAP_PIN_INPUT),
+       /* WLAN POWER ENABLE - GPIO 43 */
+       OMAP4_MUX(GPMC_A19, OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT),
+       /* WLAN SDIO: MMC5 CMD */
+       OMAP4_MUX(SDMMC5_CMD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
+       /* WLAN SDIO: MMC5 CLK */
+       OMAP4_MUX(SDMMC5_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
+       /* WLAN SDIO: MMC5 DAT[0-3] */
+       OMAP4_MUX(SDMMC5_DAT0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
+       OMAP4_MUX(SDMMC5_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
+       OMAP4_MUX(SDMMC5_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
+       OMAP4_MUX(SDMMC5_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
        { .reg_offset = OMAP_MUX_TERMINATOR },
 };
+
+static struct omap_device_pad serial2_pads[] __initdata = {
+       OMAP_MUX_STATIC("uart2_cts.uart2_cts",
+                        OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0),
+       OMAP_MUX_STATIC("uart2_rts.uart2_rts",
+                        OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
+       OMAP_MUX_STATIC("uart2_rx.uart2_rx",
+                        OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0),
+       OMAP_MUX_STATIC("uart2_tx.uart2_tx",
+                        OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
+};
+
+static struct omap_device_pad serial3_pads[] __initdata = {
+       OMAP_MUX_STATIC("uart3_cts_rctx.uart3_cts_rctx",
+                        OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0),
+       OMAP_MUX_STATIC("uart3_rts_sd.uart3_rts_sd",
+                        OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
+       OMAP_MUX_STATIC("uart3_rx_irrx.uart3_rx_irrx",
+                        OMAP_PIN_INPUT | OMAP_MUX_MODE0),
+       OMAP_MUX_STATIC("uart3_tx_irtx.uart3_tx_irtx",
+                        OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
+};
+
+static struct omap_device_pad serial4_pads[] __initdata = {
+       OMAP_MUX_STATIC("uart4_rx.uart4_rx",
+                        OMAP_PIN_INPUT | OMAP_MUX_MODE0),
+       OMAP_MUX_STATIC("uart4_tx.uart4_tx",
+                        OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
+};
+
+static struct omap_board_data serial2_data = {
+       .id             = 1,
+       .pads           = serial2_pads,
+       .pads_cnt       = ARRAY_SIZE(serial2_pads),
+};
+
+static struct omap_board_data serial3_data = {
+       .id             = 2,
+       .pads           = serial3_pads,
+       .pads_cnt       = ARRAY_SIZE(serial3_pads),
+};
+
+static struct omap_board_data serial4_data = {
+       .id             = 3,
+       .pads           = serial4_pads,
+       .pads_cnt       = ARRAY_SIZE(serial4_pads),
+};
+
+static inline void board_serial_init(void)
+{
+       struct omap_board_data bdata;
+       bdata.flags     = 0;
+       bdata.pads      = NULL;
+       bdata.pads_cnt  = 0;
+       bdata.id        = 0;
+       /* pass dummy data for UART1 */
+       omap_serial_init_port(&bdata);
+
+       omap_serial_init_port(&serial2_data);
+       omap_serial_init_port(&serial3_data);
+       omap_serial_init_port(&serial4_data);
+}
 #else
 #define board_mux      NULL
+
+static inline void board_serial_init(void)
+{
+       omap_serial_init();
+}
 #endif
 
 static void __init omap4_panda_init(void)
@@ -406,9 +543,13 @@ static void __init omap4_panda_init(void)
                package = OMAP_PACKAGE_CBL;
        omap4_mux_init(board_mux, package);
 
+       if (wl12xx_set_platform_data(&omap_panda_wlan_data))
+               pr_err("error setting wl12xx data\n");
+
        omap4_panda_i2c_init();
        platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices));
-       omap_serial_init();
+       platform_device_register(&omap_vwlan_device);
+       board_serial_init();
        omap4_twl6030_hsmmc_init(mmc);
        omap4_ehci_init();
        usb_musb_init(&musb_board_data);
@@ -425,7 +566,8 @@ MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
        .boot_params    = 0x80000100,
        .reserve        = omap_reserve,
        .map_io         = omap4_panda_map_io,
-       .init_irq       = omap4_panda_init_irq,
+       .init_early     = omap4_panda_init_early,
+       .init_irq       = gic_init_irq,
        .init_machine   = omap4_panda_init,
        .timer          = &omap_timer,
 MACHINE_END
index 08770cc..d096194 100644 (file)
@@ -358,9 +358,7 @@ static struct regulator_init_data overo_vmmc1 = {
        .consumer_supplies      = &overo_vmmc1_supply,
 };
 
-static struct twl4030_codec_audio_data overo_audio_data = {
-       .audio_mclk = 26000000,
-};
+static struct twl4030_codec_audio_data overo_audio_data;
 
 static struct twl4030_codec_data overo_codec_data = {
        .audio_mclk = 26000000,
@@ -409,14 +407,11 @@ static struct omap_board_config_kernel overo_config[] __initdata = {
        { OMAP_TAG_LCD,         &overo_lcd_config },
 };
 
-static void __init overo_init_irq(void)
+static void __init overo_init_early(void)
 {
-       omap_board_config = overo_config;
-       omap_board_config_size = ARRAY_SIZE(overo_config);
        omap2_init_common_infrastructure();
        omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
                                  mt46h32m32lf6_sdrc_params);
-       omap_init_irq();
 }
 
 static struct platform_device *overo_devices[] __initdata = {
@@ -449,6 +444,8 @@ static struct omap_musb_board_data musb_board_data = {
 static void __init overo_init(void)
 {
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
+       omap_board_config = overo_config;
+       omap_board_config_size = ARRAY_SIZE(overo_config);
        overo_i2c_init();
        platform_add_devices(overo_devices, ARRAY_SIZE(overo_devices));
        omap_serial_init();
@@ -501,9 +498,10 @@ static void __init overo_init(void)
 
 MACHINE_START(OVERO, "Gumstix Overo")
        .boot_params    = 0x80000100,
-       .map_io         = omap3_map_io,
        .reserve        = omap_reserve,
-       .init_irq       = overo_init_irq,
+       .map_io         = omap3_map_io,
+       .init_early     = overo_init_early,
+       .init_irq       = omap_init_irq,
        .init_machine   = overo_init,
        .timer          = &omap_timer,
 MACHINE_END
index 39a71bb..2af8b05 100644 (file)
@@ -33,7 +33,7 @@
 #include "sdram-nokia.h"
 
 static struct regulator_consumer_supply rm680_vemmc_consumers[] = {
-       REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"),
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
 };
 
 /* Fixed regulator for internal eMMC */
@@ -138,14 +138,13 @@ static void __init rm680_peripherals_init(void)
        omap2_hsmmc_init(mmc);
 }
 
-static void __init rm680_init_irq(void)
+static void __init rm680_init_early(void)
 {
        struct omap_sdrc_params *sdrc_params;
 
        omap2_init_common_infrastructure();
        sdrc_params = nokia_get_sdram_timings();
        omap2_init_common_devices(sdrc_params, sdrc_params);
-       omap_init_irq();
 }
 
 #ifdef CONFIG_OMAP_MUX
@@ -176,9 +175,10 @@ static void __init rm680_map_io(void)
 
 MACHINE_START(NOKIA_RM680, "Nokia RM-680 board")
        .boot_params    = 0x80000100,
-       .map_io         = rm680_map_io,
        .reserve        = omap_reserve,
-       .init_irq       = rm680_init_irq,
+       .map_io         = rm680_map_io,
+       .init_early     = rm680_init_early,
+       .init_irq       = omap_init_irq,
        .init_machine   = rm680_init,
        .timer          = &omap_timer,
 MACHINE_END
index e75e240..5f1900c 100644 (file)
@@ -36,6 +36,8 @@
 
 #include <sound/tlv320aic3x.h>
 #include <sound/tpa6130a2-plat.h>
+#include <media/radio-si4713.h>
+#include <media/si4713.h>
 
 #include <../drivers/staging/iio/light/tsl2563.h>
 
@@ -47,6 +49,8 @@
 
 #define RX51_WL1251_POWER_GPIO         87
 #define RX51_WL1251_IRQ_GPIO           42
+#define RX51_FMTX_RESET_GPIO           163
+#define RX51_FMTX_IRQ                  53
 
 /* list all spi devices here */
 enum {
@@ -331,13 +335,13 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
 };
 
 static struct regulator_consumer_supply rx51_vmmc1_supply =
-       REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0");
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0");
 
 static struct regulator_consumer_supply rx51_vaux3_supply =
-       REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1");
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
 
 static struct regulator_consumer_supply rx51_vsim_supply =
-       REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.1");
+       REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1");
 
 static struct regulator_consumer_supply rx51_vmmc2_supplies[] = {
        /* tlv320aic3x analog supplies */
@@ -348,7 +352,7 @@ static struct regulator_consumer_supply rx51_vmmc2_supplies[] = {
        /* tpa6130a2 */
        REGULATOR_SUPPLY("Vdd", "2-0060"),
        /* Keep vmmc as last item. It is not iterated for newer boards */
-       REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"),
+       REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
 };
 
 static struct regulator_consumer_supply rx51_vio_supplies[] = {
@@ -357,10 +361,14 @@ static struct regulator_consumer_supply rx51_vio_supplies[] = {
        REGULATOR_SUPPLY("DVDD", "2-0018"),
        REGULATOR_SUPPLY("IOVDD", "2-0019"),
        REGULATOR_SUPPLY("DVDD", "2-0019"),
+       /* Si4713 IO supply */
+       REGULATOR_SUPPLY("vio", "2-0063"),
 };
 
 static struct regulator_consumer_supply rx51_vaux1_consumers[] = {
        REGULATOR_SUPPLY("vdds_sdi", "omapdss"),
+       /* Si4713 supply */
+       REGULATOR_SUPPLY("vdd", "2-0063"),
 };
 
 static struct regulator_consumer_supply rx51_vdac_supply[] = {
@@ -511,6 +519,41 @@ static struct regulator_init_data rx51_vio = {
        .consumer_supplies      = rx51_vio_supplies,
 };
 
+static struct si4713_platform_data rx51_si4713_i2c_data __initdata_or_module = {
+       .gpio_reset     = RX51_FMTX_RESET_GPIO,
+};
+
+static struct i2c_board_info rx51_si4713_board_info __initdata_or_module = {
+       I2C_BOARD_INFO("si4713", SI4713_I2C_ADDR_BUSEN_HIGH),
+       .platform_data  = &rx51_si4713_i2c_data,
+};
+
+static struct radio_si4713_platform_data rx51_si4713_data __initdata_or_module = {
+       .i2c_bus        = 2,
+       .subdev_board_info = &rx51_si4713_board_info,
+};
+
+static struct platform_device rx51_si4713_dev __initdata_or_module = {
+       .name   = "radio-si4713",
+       .id     = -1,
+       .dev    = {
+               .platform_data  = &rx51_si4713_data,
+       },
+};
+
+static __init void rx51_init_si4713(void)
+{
+       int err;
+
+       err = gpio_request_one(RX51_FMTX_IRQ, GPIOF_DIR_IN, "si4713 irq");
+       if (err) {
+               printk(KERN_ERR "Cannot request si4713 irq gpio. %d\n", err);
+               return;
+       }
+       rx51_si4713_board_info.irq = gpio_to_irq(RX51_FMTX_IRQ);
+       platform_device_register(&rx51_si4713_dev);
+}
+
 static int rx51_twlgpio_setup(struct device *dev, unsigned gpio, unsigned n)
 {
        /* FIXME this gpio setup is just a placeholder for now */
@@ -699,6 +742,14 @@ static struct twl4030_power_data rx51_t2scripts_data __initdata = {
        .resource_config = twl4030_rconfig,
 };
 
+struct twl4030_codec_vibra_data rx51_vibra_data __initdata = {
+       .coexist        = 0,
+};
+
+struct twl4030_codec_data rx51_codec_data __initdata = {
+       .audio_mclk     = 26000000,
+       .vibra          = &rx51_vibra_data,
+};
 
 static struct twl4030_platform_data rx51_twldata __initdata = {
        .irq_base               = TWL4030_IRQ_BASE,
@@ -710,6 +761,7 @@ static struct twl4030_platform_data rx51_twldata __initdata = {
        .madc                   = &rx51_madc_data,
        .usb                    = &rx51_usb_data,
        .power                  = &rx51_t2scripts_data,
+       .codec                  = &rx51_codec_data,
 
        .vaux1                  = &rx51_vaux1,
        .vaux2                  = &rx51_vaux2,
@@ -921,6 +973,7 @@ void __init rx51_peripherals_init(void)
        board_smc91x_init();
        rx51_add_gpio_keys();
        rx51_init_wl1251();
+       rx51_init_si4713();
        spi_register_board_info(rx51_peripherals_spi_board_info,
                                ARRAY_SIZE(rx51_peripherals_spi_board_info));
 
index acd6700..89a66db 100644 (file)
@@ -66,18 +66,6 @@ static struct omap_dss_board_info rx51_dss_board_info = {
        .default_device = &rx51_lcd_device,
 };
 
-struct platform_device rx51_display_device = {
-       .name   = "omapdss",
-       .id     = -1,
-       .dev    = {
-               .platform_data = &rx51_dss_board_info,
-       },
-};
-
-static struct platform_device *rx51_video_devices[] __initdata = {
-       &rx51_display_device,
-};
-
 static int __init rx51_video_init(void)
 {
        if (!machine_is_nokia_rx51())
@@ -95,8 +83,7 @@ static int __init rx51_video_init(void)
 
        gpio_direction_output(RX51_LCD_RESET_GPIO, 1);
 
-       platform_add_devices(rx51_video_devices,
-                               ARRAY_SIZE(rx51_video_devices));
+       omap_display_init(&rx51_dss_board_info);
        return 0;
 }
 
index f53fc55..e964895 100644 (file)
@@ -98,17 +98,13 @@ static struct omap_board_config_kernel rx51_config[] = {
        { OMAP_TAG_LCD,         &rx51_lcd_config },
 };
 
-static void __init rx51_init_irq(void)
+static void __init rx51_init_early(void)
 {
        struct omap_sdrc_params *sdrc_params;
 
-       omap_board_config = rx51_config;
-       omap_board_config_size = ARRAY_SIZE(rx51_config);
-       omap3_pm_init_cpuidle(rx51_cpuidle_params);
        omap2_init_common_infrastructure();
        sdrc_params = nokia_get_sdram_timings();
        omap2_init_common_devices(sdrc_params, sdrc_params);
-       omap_init_irq();
 }
 
 extern void __init rx51_peripherals_init(void);
@@ -128,6 +124,9 @@ static struct omap_musb_board_data musb_board_data = {
 static void __init rx51_init(void)
 {
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
+       omap_board_config = rx51_config;
+       omap_board_config_size = ARRAY_SIZE(rx51_config);
+       omap3_pm_init_cpuidle(rx51_cpuidle_params);
        omap_serial_init();
        usb_musb_init(&musb_board_data);
        rx51_peripherals_init();
@@ -149,9 +148,10 @@ static void __init rx51_map_io(void)
 MACHINE_START(NOKIA_RX51, "Nokia RX-51 board")
        /* Maintainer: Lauri Leukkunen <lauri.leukkunen@nokia.com> */
        .boot_params    = 0x80000100,
-       .map_io         = rx51_map_io,
        .reserve        = omap_reserve,
-       .init_irq       = rx51_init_irq,
+       .map_io         = rx51_map_io,
+       .init_early     = rx51_init_early,
+       .init_irq       = omap_init_irq,
        .init_machine   = rx51_init,
        .timer          = &omap_timer,
 MACHINE_END
diff --git a/arch/arm/mach-omap2/board-ti8168evm.c b/arch/arm/mach-omap2/board-ti8168evm.c
new file mode 100644 (file)
index 0000000..09fa7bf
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * Code for TI8168 EVM.
+ *
+ * Copyright (C) 2010 Texas Instruments, Inc. - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+#include <linux/kernel.h>
+#include <linux/init.h>
+
+#include <mach/hardware.h>
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+
+#include <plat/irqs.h>
+#include <plat/board.h>
+#include <plat/common.h>
+
+static struct omap_board_config_kernel ti8168_evm_config[] __initdata = {
+};
+
+static void __init ti8168_init_early(void)
+{
+       omap2_init_common_infrastructure();
+       omap2_init_common_devices(NULL, NULL);
+}
+
+static void __init ti8168_evm_init_irq(void)
+{
+       omap_init_irq();
+}
+
+static void __init ti8168_evm_init(void)
+{
+       omap_serial_init();
+       omap_board_config = ti8168_evm_config;
+       omap_board_config_size = ARRAY_SIZE(ti8168_evm_config);
+}
+
+static void __init ti8168_evm_map_io(void)
+{
+       omap2_set_globals_ti816x();
+       omapti816x_map_common_io();
+}
+
+MACHINE_START(TI8168EVM, "ti8168evm")
+       /* Maintainer: Texas Instruments */
+       .boot_params    = 0x80000100,
+       .map_io         = ti8168_evm_map_io,
+       .init_early     = ti8168_init_early,
+       .init_irq       = ti8168_evm_init_irq,
+       .timer          = &omap_timer,
+       .init_machine   = ti8168_evm_init,
+MACHINE_END
index 6bcd436..37b84c2 100644 (file)
@@ -130,14 +130,6 @@ static struct omap_dss_board_info zoom_dss_data = {
        .default_device         = &zoom_lcd_device,
 };
 
-static struct platform_device zoom_dss_device = {
-       .name                           = "omapdss",
-       .id                             = -1,
-       .dev                            = {
-               .platform_data          = &zoom_dss_data,
-       },
-};
-
 static struct omap2_mcspi_device_config dss_lcd_mcspi_config = {
        .turbo_mode             = 1,
        .single_channel = 1,  /* 0: slave, 1: master */
@@ -153,14 +145,9 @@ static struct spi_board_info nec_8048_spi_board_info[] __initdata = {
        },
 };
 
-static struct platform_device *zoom_display_devices[] __initdata = {
-       &zoom_dss_device,
-};
-
 void __init zoom_display_init(void)
 {
-       platform_add_devices(zoom_display_devices,
-                               ARRAY_SIZE(zoom_display_devices));
+       omap_display_init(&zoom_dss_data);
        spi_register_board_info(nec_8048_spi_board_info,
                                ARRAY_SIZE(nec_8048_spi_board_info));
        zoom_lcd_panel_init();
index e0e040f..448ab60 100644 (file)
@@ -118,7 +118,7 @@ static struct regulator_consumer_supply zoom_vmmc2_supply = {
 
 static struct regulator_consumer_supply zoom_vmmc3_supply = {
        .supply         = "vmmc",
-       .dev_name       = "mmci-omap-hs.2",
+       .dev_name       = "omap_hsmmc.2",
 };
 
 /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
@@ -322,9 +322,7 @@ static struct twl4030_madc_platform_data zoom_madc_data = {
        .irq_line       = 1,
 };
 
-static struct twl4030_codec_audio_data zoom_audio_data = {
-       .audio_mclk = 26000000,
-};
+static struct twl4030_codec_audio_data zoom_audio_data;
 
 static struct twl4030_codec_data zoom_codec_data = {
        .audio_mclk = 26000000,
index 1dd195a..4b133d7 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/input.h>
 #include <linux/gpio.h>
 #include <linux/i2c/twl.h>
+#include <linux/mtd/nand.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -33,7 +34,7 @@
 
 #define ZOOM3_EHCI_RESET_GPIO          64
 
-static void __init omap_zoom_init_irq(void)
+static void __init omap_zoom_init_early(void)
 {
        omap2_init_common_infrastructure();
        if (machine_is_omap_zoom2())
@@ -42,14 +43,12 @@ static void __init omap_zoom_init_irq(void)
        else if (machine_is_omap_zoom3())
                omap2_init_common_devices(h8mbx00u0mer0em_sdrc_params,
                                          h8mbx00u0mer0em_sdrc_params);
-
-       omap_init_irq();
 }
 
 #ifdef CONFIG_OMAP_MUX
 static struct omap_board_mux board_mux[] __initdata = {
        /* WLAN IRQ - GPIO 162 */
-       OMAP3_MUX(MCBSP1_CLKX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP),
+       OMAP3_MUX(MCBSP1_CLKX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
        /* WLAN POWER ENABLE - GPIO 101 */
        OMAP3_MUX(CAM_D2, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
        /* WLAN SDIO: MMC3 CMD */
@@ -126,8 +125,8 @@ static void __init omap_zoom_init(void)
                usbhs_init(&usbhs_bdata);
        }
 
-       board_nand_init(zoom_nand_partitions,
-                       ARRAY_SIZE(zoom_nand_partitions), ZOOM_NAND_CS);
+       board_nand_init(zoom_nand_partitions, ARRAY_SIZE(zoom_nand_partitions),
+                                               ZOOM_NAND_CS, NAND_BUSWIDTH_16);
        zoom_debugboard_init();
        zoom_peripherals_init();
        zoom_display_init();
@@ -135,18 +134,20 @@ static void __init omap_zoom_init(void)
 
 MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")
        .boot_params    = 0x80000100,
-       .map_io         = omap3_map_io,
        .reserve        = omap_reserve,
-       .init_irq       = omap_zoom_init_irq,
+       .map_io         = omap3_map_io,
+       .init_early     = omap_zoom_init_early,
+       .init_irq       = omap_init_irq,
        .init_machine   = omap_zoom_init,
        .timer          = &omap_timer,
 MACHINE_END
 
 MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
        .boot_params    = 0x80000100,
-       .map_io         = omap3_map_io,
        .reserve        = omap_reserve,
-       .init_irq       = omap_zoom_init_irq,
+       .map_io         = omap3_map_io,
+       .init_early     = omap_zoom_init_early,
+       .init_irq       = omap_init_irq,
        .init_machine   = omap_zoom_init,
        .timer          = &omap_timer,
 MACHINE_END
index f51cffd..b19a1f7 100644 (file)
@@ -78,6 +78,26 @@ static int omap2_clk_apll54_enable(struct clk *clk)
        return omap2_clk_apll_enable(clk, OMAP24XX_ST_54M_APLL_MASK);
 }
 
+static void _apll96_allow_idle(struct clk *clk)
+{
+       omap2xxx_cm_set_apll96_auto_low_power_stop();
+}
+
+static void _apll96_deny_idle(struct clk *clk)
+{
+       omap2xxx_cm_set_apll96_disable_autoidle();
+}
+
+static void _apll54_allow_idle(struct clk *clk)
+{
+       omap2xxx_cm_set_apll54_auto_low_power_stop();
+}
+
+static void _apll54_deny_idle(struct clk *clk)
+{
+       omap2xxx_cm_set_apll54_disable_autoidle();
+}
+
 /* Stop APLL */
 static void omap2_clk_apll_disable(struct clk *clk)
 {
@@ -93,11 +113,15 @@ static void omap2_clk_apll_disable(struct clk *clk)
 const struct clkops clkops_apll96 = {
        .enable         = omap2_clk_apll96_enable,
        .disable        = omap2_clk_apll_disable,
+       .allow_idle     = _apll96_allow_idle,
+       .deny_idle      = _apll96_deny_idle,
 };
 
 const struct clkops clkops_apll54 = {
        .enable         = omap2_clk_apll54_enable,
        .disable        = omap2_clk_apll_disable,
+       .allow_idle     = _apll54_allow_idle,
+       .deny_idle      = _apll54_deny_idle,
 };
 
 /* Public functions */
diff --git a/arch/arm/mach-omap2/clkt2xxx_dpll.c b/arch/arm/mach-omap2/clkt2xxx_dpll.c
new file mode 100644 (file)
index 0000000..1502a7b
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * OMAP2-specific DPLL control functions
+ *
+ * Copyright (C) 2011 Nokia Corporation
+ * Paul Walmsley
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/clk.h>
+#include <linux/io.h>
+
+#include <plat/clock.h>
+
+#include "clock.h"
+#include "cm2xxx_3xxx.h"
+#include "cm-regbits-24xx.h"
+
+/* Private functions */
+
+/**
+ * _allow_idle - enable DPLL autoidle bits
+ * @clk: struct clk * of the DPLL to operate on
+ *
+ * Enable DPLL automatic idle control.  The DPLL will enter low-power
+ * stop when its downstream clocks are gated.  No return value.
+ * REVISIT: DPLL can optionally enter low-power bypass by writing 0x1
+ * instead.  Add some mechanism to optionally enter this mode.
+ */
+static void _allow_idle(struct clk *clk)
+{
+       if (!clk || !clk->dpll_data)
+               return;
+
+       omap2xxx_cm_set_dpll_auto_low_power_stop();
+}
+
+/**
+ * _deny_idle - prevent DPLL from automatically idling
+ * @clk: struct clk * of the DPLL to operate on
+ *
+ * Disable DPLL automatic idle control.  No return value.
+ */
+static void _deny_idle(struct clk *clk)
+{
+       if (!clk || !clk->dpll_data)
+               return;
+
+       omap2xxx_cm_set_dpll_disable_autoidle();
+}
+
+
+/* Public data */
+
+const struct clkops clkops_omap2xxx_dpll_ops = {
+       .allow_idle     = _allow_idle,
+       .deny_idle      = _deny_idle,
+};
+
index df7b805..c346092 100644 (file)
 #include "prm2xxx_3xxx.h"
 #include "prm-regbits-24xx.h"
 
+/*
+ * XXX This does not actually enable the osc_ck, since the osc_ck must
+ * be running for this function to be called.  Instead, this function
+ * is used to disable an autoidle mode on the osc_ck.  The existing
+ * clk_enable/clk_disable()-based usecounting for osc_ck should be
+ * replaced with autoidle-based usecounting.
+ */
 static int omap2_enable_osc_ck(struct clk *clk)
 {
        u32 pcc;
@@ -41,6 +48,13 @@ static int omap2_enable_osc_ck(struct clk *clk)
        return 0;
 }
 
+/*
+ * XXX This does not actually disable the osc_ck, since doing so would
+ * immediately halt the system.  Instead, this function is used to
+ * enable an autoidle mode on the osc_ck.  The existing
+ * clk_enable/clk_disable()-based usecounting for osc_ck should be
+ * replaced with autoidle-based usecounting.
+ */
 static void omap2_disable_osc_ck(struct clk *clk)
 {
        u32 pcc;
index a781cd6..e25364d 100644 (file)
@@ -97,7 +97,7 @@ static u8 _get_div_and_fieldval(struct clk *src_clk, struct clk *clk,
                                u32 *field_val)
 {
        const struct clksel *clks;
-       const struct clksel_rate *clkr, *max_clkr;
+       const struct clksel_rate *clkr, *max_clkr = NULL;
        u8 max_div = 0;
 
        clks = _get_clksel_by_parent(clk, src_clk);
index acb7ae5..bcffee0 100644 (file)
@@ -178,12 +178,11 @@ void omap2_init_dpll_parent(struct clk *clk)
        if (!dd)
                return;
 
-       /* Return bypass rate if DPLL is bypassed */
        v = __raw_readl(dd->control_reg);
        v &= dd->enable_mask;
        v >>= __ffs(dd->enable_mask);
 
-       /* Reparent in case the dpll is in bypass */
+       /* Reparent the struct clk in case the dpll is in bypass */
        if (cpu_is_omap24xx()) {
                if (v == OMAP2XXX_EN_DPLL_LPBYPASS ||
                    v == OMAP2XXX_EN_DPLL_FRBYPASS)
@@ -260,50 +259,22 @@ u32 omap2_get_dpll_rate(struct clk *clk)
 /* DPLL rate rounding code */
 
 /**
- * omap2_dpll_set_rate_tolerance: set the error tolerance during rate rounding
- * @clk: struct clk * of the DPLL
- * @tolerance: maximum rate error tolerance
- *
- * Set the maximum DPLL rate error tolerance for the rate rounding
- * algorithm.  The rate tolerance is an attempt to balance DPLL power
- * saving (the least divider value "n") vs. rate fidelity (the least
- * difference between the desired DPLL target rate and the rounded
- * rate out of the algorithm).  So, increasing the tolerance is likely
- * to decrease DPLL power consumption and increase DPLL rate error.
- * Returns -EINVAL if provided a null clock ptr or a clk that is not a
- * DPLL; or 0 upon success.
- */
-int omap2_dpll_set_rate_tolerance(struct clk *clk, unsigned int tolerance)
-{
-       if (!clk || !clk->dpll_data)
-               return -EINVAL;
-
-       clk->dpll_data->rate_tolerance = tolerance;
-
-       return 0;
-}
-
-/**
  * omap2_dpll_round_rate - round a target rate for an OMAP DPLL
  * @clk: struct clk * for a DPLL
  * @target_rate: desired DPLL clock rate
  *
- * Given a DPLL, a desired target rate, and a rate tolerance, round
- * the target rate to a possible, programmable rate for this DPLL.
- * Rate tolerance is assumed to be set by the caller before this
- * function is called.  Attempts to select the minimum possible n
- * within the tolerance to reduce power consumption.  Stores the
- * computed (m, n) in the DPLL's dpll_data structure so set_rate()
- * will not need to call this (expensive) function again.  Returns ~0
- * if the target rate cannot be rounded, either because the rate is
- * too low or because the rate tolerance is set too tightly; or the
- * rounded rate upon success.
+ * Given a DPLL and a desired target rate, round the target rate to a
+ * possible, programmable rate for this DPLL.  Attempts to select the
+ * minimum possible n.  Stores the computed (m, n) in the DPLL's
+ * dpll_data structure so set_rate() will not need to call this
+ * (expensive) function again.  Returns ~0 if the target rate cannot
+ * be rounded, or the rounded rate upon success.
  */
 long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate)
 {
-       int m, n, r, e, scaled_max_m;
-       unsigned long scaled_rt_rp, new_rate;
-       int min_e = -1, min_e_m = -1, min_e_n = -1;
+       int m, n, r, scaled_max_m;
+       unsigned long scaled_rt_rp;
+       unsigned long new_rate = 0;
        struct dpll_data *dd;
 
        if (!clk || !clk->dpll_data)
@@ -311,8 +282,8 @@ long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate)
 
        dd = clk->dpll_data;
 
-       pr_debug("clock: starting DPLL round_rate for clock %s, target rate "
-                "%ld\n", clk->name, target_rate);
+       pr_debug("clock: %s: starting DPLL round_rate, target rate %ld\n",
+                clk->name, target_rate);
 
        scaled_rt_rp = target_rate / (dd->clk_ref->rate / DPLL_SCALE_FACTOR);
        scaled_max_m = dd->max_multiplier * DPLL_SCALE_FACTOR;
@@ -347,39 +318,23 @@ long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate)
                if (r == DPLL_MULT_UNDERFLOW)
                        continue;
 
-               e = target_rate - new_rate;
-               pr_debug("clock: n = %d: m = %d: rate error is %d "
-                        "(new_rate = %ld)\n", n, m, e, new_rate);
-
-               if (min_e == -1 ||
-                   min_e >= (int)(abs(e) - dd->rate_tolerance)) {
-                       min_e = e;
-                       min_e_m = m;
-                       min_e_n = n;
-
-                       pr_debug("clock: found new least error %d\n", min_e);
+               pr_debug("clock: %s: m = %d: n = %d: new_rate = %ld\n",
+                        clk->name, m, n, new_rate);
 
-                       /* We found good settings -- bail out now */
-                       if (min_e <= dd->rate_tolerance)
-                               break;
+               if (target_rate == new_rate) {
+                       dd->last_rounded_m = m;
+                       dd->last_rounded_n = n;
+                       dd->last_rounded_rate = target_rate;
+                       break;
                }
        }
 
-       if (min_e < 0) {
-               pr_debug("clock: error: target rate or tolerance too low\n");
+       if (target_rate != new_rate) {
+               pr_debug("clock: %s: cannot round to rate %ld\n", clk->name,
+                        target_rate);
                return ~0;
        }
 
-       dd->last_rounded_m = min_e_m;
-       dd->last_rounded_n = min_e_n;
-       dd->last_rounded_rate = _dpll_compute_new_rate(dd->clk_ref->rate,
-                                                      min_e_m,  min_e_n);
-
-       pr_debug("clock: final least error: e = %d, m = %d, n = %d\n",
-                min_e, min_e_m, min_e_n);
-       pr_debug("clock: final rate: %ld  (target rate: %ld)\n",
-                dd->last_rounded_rate, target_rate);
-
-       return dd->last_rounded_rate;
+       return target_rate;
 }
 
diff --git a/arch/arm/mach-omap2/clkt_iclk.c b/arch/arm/mach-omap2/clkt_iclk.c
new file mode 100644 (file)
index 0000000..3d43fba
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * OMAP2/3 interface clock control
+ *
+ * Copyright (C) 2011 Nokia Corporation
+ * Paul Walmsley
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#undef DEBUG
+
+#include <linux/kernel.h>
+#include <linux/clk.h>
+#include <linux/io.h>
+
+#include <plat/clock.h>
+#include <plat/prcm.h>
+
+#include "clock.h"
+#include "clock2xxx.h"
+#include "cm2xxx_3xxx.h"
+#include "cm-regbits-24xx.h"
+
+/* Private functions */
+
+/* XXX */
+void omap2_clkt_iclk_allow_idle(struct clk *clk)
+{
+       u32 v, r;
+
+       r = ((__force u32)clk->enable_reg ^ (CM_AUTOIDLE ^ CM_ICLKEN));
+
+       v = __raw_readl((__force void __iomem *)r);
+       v |= (1 << clk->enable_bit);
+       __raw_writel(v, (__force void __iomem *)r);
+}
+
+/* XXX */
+void omap2_clkt_iclk_deny_idle(struct clk *clk)
+{
+       u32 v, r;
+
+       r = ((__force u32)clk->enable_reg ^ (CM_AUTOIDLE ^ CM_ICLKEN));
+
+       v = __raw_readl((__force void __iomem *)r);
+       v &= ~(1 << clk->enable_bit);
+       __raw_writel(v, (__force void __iomem *)r);
+}
+
+/* Public data */
+
+const struct clkops clkops_omap2_iclk_dflt_wait = {
+       .enable         = omap2_dflt_clk_enable,
+       .disable        = omap2_dflt_clk_disable,
+       .find_companion = omap2_clk_dflt_find_companion,
+       .find_idlest    = omap2_clk_dflt_find_idlest,
+       .allow_idle     = omap2_clkt_iclk_allow_idle,
+       .deny_idle      = omap2_clkt_iclk_deny_idle,
+};
+
+const struct clkops clkops_omap2_iclk_dflt = {
+       .enable         = omap2_dflt_clk_enable,
+       .disable        = omap2_dflt_clk_disable,
+       .allow_idle     = omap2_clkt_iclk_allow_idle,
+       .deny_idle      = omap2_clkt_iclk_deny_idle,
+};
+
+const struct clkops clkops_omap2_iclk_idle_only = {
+       .allow_idle     = omap2_clkt_iclk_allow_idle,
+       .deny_idle      = omap2_clkt_iclk_deny_idle,
+};
+
+const struct clkops clkops_omap2_mdmclk_dflt_wait = {
+       .enable         = omap2_dflt_clk_enable,
+       .disable        = omap2_dflt_clk_disable,
+       .find_companion = omap2_clk_dflt_find_companion,
+       .find_idlest    = omap2_clk_dflt_find_idlest,
+       .allow_idle     = omap2_clkt_iclk_allow_idle,
+       .deny_idle      = omap2_clkt_iclk_deny_idle,
+};
+
index 2a2f152..180299e 100644 (file)
@@ -22,7 +22,9 @@
 #include <linux/clk.h>
 #include <linux/io.h>
 #include <linux/bitops.h>
+#include <trace/events/power.h>
 
+#include <asm/cpu.h>
 #include <plat/clock.h>
 #include "clockdomain.h"
 #include <plat/cpu.h>
@@ -261,10 +263,13 @@ void omap2_clk_disable(struct clk *clk)
 
        pr_debug("clock: %s: disabling in hardware\n", clk->name);
 
-       clk->ops->disable(clk);
+       if (clk->ops && clk->ops->disable) {
+               trace_clock_disable(clk->name, 0, smp_processor_id());
+               clk->ops->disable(clk);
+       }
 
        if (clk->clkdm)
-               omap2_clkdm_clk_disable(clk->clkdm, clk);
+               clkdm_clk_disable(clk->clkdm, clk);
 
        if (clk->parent)
                omap2_clk_disable(clk->parent);
@@ -304,7 +309,7 @@ int omap2_clk_enable(struct clk *clk)
        }
 
        if (clk->clkdm) {
-               ret = omap2_clkdm_clk_enable(clk->clkdm, clk);
+               ret = clkdm_clk_enable(clk->clkdm, clk);
                if (ret) {
                        WARN(1, "clock: %s: could not enable clockdomain %s: "
                             "%d\n", clk->name, clk->clkdm->name, ret);
@@ -312,17 +317,21 @@ int omap2_clk_enable(struct clk *clk)
                }
        }
 
-       ret = clk->ops->enable(clk);
-       if (ret) {
-               WARN(1, "clock: %s: could not enable: %d\n", clk->name, ret);
-               goto oce_err3;
+       if (clk->ops && clk->ops->enable) {
+               trace_clock_enable(clk->name, 1, smp_processor_id());
+               ret = clk->ops->enable(clk);
+               if (ret) {
+                       WARN(1, "clock: %s: could not enable: %d\n",
+                            clk->name, ret);
+                       goto oce_err3;
+               }
        }
 
        return 0;
 
 oce_err3:
        if (clk->clkdm)
-               omap2_clkdm_clk_disable(clk->clkdm, clk);
+               clkdm_clk_disable(clk->clkdm, clk);
 oce_err2:
        if (clk->parent)
                omap2_clk_disable(clk->parent);
@@ -349,8 +358,10 @@ int omap2_clk_set_rate(struct clk *clk, unsigned long rate)
        pr_debug("clock: set_rate for clock %s to rate %ld\n", clk->name, rate);
 
        /* dpll_ck, core_ck, virt_prcm_set; plus all clksel clocks */
-       if (clk->set_rate)
+       if (clk->set_rate) {
+               trace_clock_set_rate(clk->name, rate, smp_processor_id());
                ret = clk->set_rate(clk, rate);
+       }
 
        return ret;
 }
@@ -373,10 +384,16 @@ int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent)
 const struct clkops clkops_omap3_noncore_dpll_ops = {
        .enable         = omap3_noncore_dpll_enable,
        .disable        = omap3_noncore_dpll_disable,
+       .allow_idle     = omap3_dpll_allow_idle,
+       .deny_idle      = omap3_dpll_deny_idle,
 };
 
-#endif
+const struct clkops clkops_omap3_core_dpll_ops = {
+       .allow_idle     = omap3_dpll_allow_idle,
+       .deny_idle      = omap3_dpll_deny_idle,
+};
 
+#endif
 
 /*
  * OMAP2+ clock reset and init functions
index 896584e..e10ff2b 100644 (file)
@@ -2,7 +2,7 @@
  *  linux/arch/arm/mach-omap2/clock.h
  *
  *  Copyright (C) 2005-2009 Texas Instruments, Inc.
- *  Copyright (C) 2004-2009 Nokia Corporation
+ *  Copyright (C) 2004-2011 Nokia Corporation
  *
  *  Contacts:
  *  Richard Woodruff <r-woodruff2@ti.com>
@@ -18,9 +18,6 @@
 
 #include <plat/clock.h>
 
-/* The maximum error between a target DPLL rate and the rounded rate in Hz */
-#define DEFAULT_DPLL_RATE_TOLERANCE    50000
-
 /* CM_CLKSEL2_PLL.CORE_CLK_SRC bits (2XXX) */
 #define CORE_CLK_SRC_32K               0x0
 #define CORE_CLK_SRC_DPLL              0x1
@@ -55,7 +52,6 @@ void omap2_clk_disable(struct clk *clk);
 long omap2_clk_round_rate(struct clk *clk, unsigned long rate);
 int omap2_clk_set_rate(struct clk *clk, unsigned long rate);
 int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent);
-int omap2_dpll_set_rate_tolerance(struct clk *clk, unsigned int tolerance);
 long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate);
 unsigned long omap3_dpll_recalc(struct clk *clk);
 unsigned long omap3_clkoutx2_recalc(struct clk *clk);
@@ -65,6 +61,9 @@ u32 omap3_dpll_autoidle_read(struct clk *clk);
 int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate);
 int omap3_noncore_dpll_enable(struct clk *clk);
 void omap3_noncore_dpll_disable(struct clk *clk);
+int omap4_dpllmx_gatectrl_read(struct clk *clk);
+void omap4_dpllmx_allow_gatectrl(struct clk *clk);
+void omap4_dpllmx_deny_gatectrl(struct clk *clk);
 
 #ifdef CONFIG_OMAP_RESET_CLOCKS
 void omap2_clk_disable_unused(struct clk *clk);
@@ -83,6 +82,10 @@ long omap2_clksel_round_rate(struct clk *clk, unsigned long target_rate);
 int omap2_clksel_set_rate(struct clk *clk, unsigned long rate);
 int omap2_clksel_set_parent(struct clk *clk, struct clk *new_parent);
 
+/* clkt_iclk.c public functions */
+extern void omap2_clkt_iclk_allow_idle(struct clk *clk);
+extern void omap2_clkt_iclk_deny_idle(struct clk *clk);
+
 u32 omap2_get_dpll_rate(struct clk *clk);
 void omap2_init_dpll_parent(struct clk *clk);
 
@@ -136,6 +139,7 @@ extern struct clk *vclk, *sclk;
 extern const struct clksel_rate gpt_32k_rates[];
 extern const struct clksel_rate gpt_sys_rates[];
 extern const struct clksel_rate gfx_l3_rates[];
+extern const struct clksel_rate dsp_ick_rates[];
 
 #if defined(CONFIG_ARCH_OMAP2) && defined(CONFIG_CPU_FREQ)
 extern void omap2_clk_init_cpufreq_table(struct cpufreq_frequency_table **table);
@@ -145,6 +149,13 @@ extern void omap2_clk_exit_cpufreq_table(struct cpufreq_frequency_table **table)
 #define omap2_clk_exit_cpufreq_table   0
 #endif
 
+extern const struct clkops clkops_omap2_iclk_dflt_wait;
+extern const struct clkops clkops_omap2_iclk_dflt;
+extern const struct clkops clkops_omap2_iclk_idle_only;
+extern const struct clkops clkops_omap2_mdmclk_dflt_wait;
+extern const struct clkops clkops_omap2xxx_dpll_ops;
 extern const struct clkops clkops_omap3_noncore_dpll_ops;
+extern const struct clkops clkops_omap3_core_dpll_ops;
+extern const struct clkops clkops_omap4_dpllmx_ops;
 
 #endif
index 0a992bc..b6f65d4 100644 (file)
@@ -1,12 +1,12 @@
 /*
- *  linux/arch/arm/mach-omap2/clock2420_data.c
+ * OMAP2420 clock data
  *
- *  Copyright (C) 2005-2009 Texas Instruments, Inc.
- *  Copyright (C) 2004-2010 Nokia Corporation
+ * Copyright (C) 2005-2009 Texas Instruments, Inc.
+ * Copyright (C) 2004-2011 Nokia Corporation
  *
- *  Contacts:
- *  Richard Woodruff <r-woodruff2@ti.com>
- *  Paul Walmsley
+ * Contacts:
+ * Richard Woodruff <r-woodruff2@ti.com>
+ * Paul Walmsley
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
 /*
  * 2420 clock tree.
  *
- * NOTE:In many cases here we are assigning a 'default' parent.        In many
- *     cases the parent is selectable. The get/set parent calls will also
- *     switch sources.
- *
- *     Many some clocks say always_enabled, but they can be auto idled for
- *     power savings. They will always be available upon clock request.
+ * NOTE:In many cases here we are assigning a 'default' parent. In
+ *     many cases the parent is selectable. The set parent calls will
+ *     also switch sources.
  *
  *     Several sources are given initial rates which may be wrong, this will
  *     be fixed up in the init func.
  *
  *     Things are broadly separated below by clock domains. It is
- *     noteworthy that most periferals have dependencies on multiple clock
+ *     noteworthy that most peripherals have dependencies on multiple clock
  *     domains. Many get their interface clocks from the L4 domain, but get
  *     functional clocks from fixed sources or other core domain derived
  *     clocks.
@@ -55,7 +52,7 @@
 static struct clk func_32k_ck = {
        .name           = "func_32k_ck",
        .ops            = &clkops_null,
-       .rate           = 32000,
+       .rate           = 32768,
        .clkdm_name     = "wkup_clkdm",
 };
 
@@ -116,7 +113,6 @@ static struct dpll_data dpll_dd = {
        .max_multiplier         = 1023,
        .min_divider            = 1,
        .max_divider            = 16,
-       .rate_tolerance         = DEFAULT_DPLL_RATE_TOLERANCE
 };
 
 /*
@@ -125,7 +121,7 @@ static struct dpll_data dpll_dd = {
  */
 static struct clk dpll_ck = {
        .name           = "dpll_ck",
-       .ops            = &clkops_null,
+       .ops            = &clkops_omap2xxx_dpll_ops,
        .parent         = &sys_ck,              /* Can be func_32k also */
        .dpll_data      = &dpll_dd,
        .clkdm_name     = "wkup_clkdm",
@@ -455,36 +451,22 @@ static struct clk dsp_fck = {
        .recalc         = &omap2_clksel_recalc,
 };
 
-/* DSP interface clock */
-static const struct clksel_rate dsp_irate_ick_rates[] = {
-       { .div = 1, .val = 1, .flags = RATE_IN_24XX },
-       { .div = 2, .val = 2, .flags = RATE_IN_24XX },
-       { .div = 0 },
-};
-
-static const struct clksel dsp_irate_ick_clksel[] = {
-       { .parent = &dsp_fck, .rates = dsp_irate_ick_rates },
+static const struct clksel dsp_ick_clksel[] = {
+       { .parent = &dsp_fck, .rates = dsp_ick_rates },
        { .parent = NULL }
 };
 
-/* This clock does not exist as such in the TRM. */
-static struct clk dsp_irate_ick = {
-       .name           = "dsp_irate_ick",
-       .ops            = &clkops_null,
-       .parent         = &dsp_fck,
-       .clksel_reg     = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_CLKSEL),
-       .clksel_mask    = OMAP24XX_CLKSEL_DSP_IF_MASK,
-       .clksel         = dsp_irate_ick_clksel,
-       .recalc         = &omap2_clksel_recalc,
-};
-
-/* 2420 only */
 static struct clk dsp_ick = {
        .name           = "dsp_ick",     /* apparently ipi and isp */
-       .ops            = &clkops_omap2_dflt_wait,
-       .parent         = &dsp_irate_ick,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
+       .parent         = &dsp_fck,
+       .clkdm_name     = "dsp_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_ICLKEN),
        .enable_bit     = OMAP2420_EN_DSP_IPI_SHIFT,          /* for ipi */
+       .clksel_reg     = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_CLKSEL),
+       .clksel_mask    = OMAP24XX_CLKSEL_DSP_IF_MASK,
+       .clksel         = dsp_ick_clksel,
+       .recalc         = &omap2_clksel_recalc,
 };
 
 /*
@@ -579,7 +561,7 @@ static const struct clksel usb_l4_ick_clksel[] = {
 /* It is unclear from TRM whether usb_l4_ick is really in L3 or L4 clkdm */
 static struct clk usb_l4_ick = {       /* FS-USB interface clock */
        .name           = "usb_l4_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &core_l3_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
@@ -661,7 +643,7 @@ static struct clk ssi_ssr_sst_fck = {
  */
 static struct clk ssi_l4_ick = {
        .name           = "ssi_l4_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
@@ -716,6 +698,7 @@ static struct clk gfx_2d_fck = {
        .recalc         = &omap2_clksel_recalc,
 };
 
+/* This interface clock does not have a CM_AUTOIDLE bit */
 static struct clk gfx_ick = {
        .name           = "gfx_ick",            /* From l3 */
        .ops            = &clkops_omap2_dflt_wait,
@@ -763,7 +746,7 @@ static const struct clksel dss1_fck_clksel[] = {
 
 static struct clk dss_ick = {          /* Enables both L3,L4 ICLK's */
        .name           = "dss_ick",
-       .ops            = &clkops_omap2_dflt,
+       .ops            = &clkops_omap2_iclk_dflt,
        .parent         = &l4_ck,       /* really both l3 and l4 */
        .clkdm_name     = "dss_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -825,6 +808,14 @@ static struct clk dss_54m_fck = {  /* Alt clk used in power management */
        .recalc         = &followparent_recalc,
 };
 
+static struct clk wu_l4_ick = {
+       .name           = "wu_l4_ick",
+       .ops            = &clkops_null,
+       .parent         = &sys_ck,
+       .clkdm_name     = "wkup_clkdm",
+       .recalc         = &followparent_recalc,
+};
+
 /*
  * CORE power domain ICLK & FCLK defines.
  * Many of the these can have more than one possible parent. Entries
@@ -845,9 +836,9 @@ static const struct clksel omap24xx_gpt_clksel[] = {
 
 static struct clk gpt1_ick = {
        .name           = "gpt1_ick",
-       .ops            = &clkops_omap2_dflt_wait,
-       .parent         = &l4_ck,
-       .clkdm_name     = "core_l4_clkdm",
+       .ops            = &clkops_omap2_iclk_dflt_wait,
+       .parent         = &wu_l4_ick,
+       .clkdm_name     = "wkup_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
        .enable_bit     = OMAP24XX_EN_GPT1_SHIFT,
        .recalc         = &followparent_recalc,
@@ -871,7 +862,7 @@ static struct clk gpt1_fck = {
 
 static struct clk gpt2_ick = {
        .name           = "gpt2_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -895,7 +886,7 @@ static struct clk gpt2_fck = {
 
 static struct clk gpt3_ick = {
        .name           = "gpt3_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -919,7 +910,7 @@ static struct clk gpt3_fck = {
 
 static struct clk gpt4_ick = {
        .name           = "gpt4_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -943,7 +934,7 @@ static struct clk gpt4_fck = {
 
 static struct clk gpt5_ick = {
        .name           = "gpt5_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -967,7 +958,7 @@ static struct clk gpt5_fck = {
 
 static struct clk gpt6_ick = {
        .name           = "gpt6_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -991,8 +982,9 @@ static struct clk gpt6_fck = {
 
 static struct clk gpt7_ick = {
        .name           = "gpt7_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
+       .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
        .enable_bit     = OMAP24XX_EN_GPT7_SHIFT,
        .recalc         = &followparent_recalc,
@@ -1014,7 +1006,7 @@ static struct clk gpt7_fck = {
 
 static struct clk gpt8_ick = {
        .name           = "gpt8_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1038,7 +1030,7 @@ static struct clk gpt8_fck = {
 
 static struct clk gpt9_ick = {
        .name           = "gpt9_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1062,7 +1054,7 @@ static struct clk gpt9_fck = {
 
 static struct clk gpt10_ick = {
        .name           = "gpt10_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1086,7 +1078,7 @@ static struct clk gpt10_fck = {
 
 static struct clk gpt11_ick = {
        .name           = "gpt11_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1110,7 +1102,7 @@ static struct clk gpt11_fck = {
 
 static struct clk gpt12_ick = {
        .name           = "gpt12_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1134,7 +1126,7 @@ static struct clk gpt12_fck = {
 
 static struct clk mcbsp1_ick = {
        .name           = "mcbsp1_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1174,7 +1166,7 @@ static struct clk mcbsp1_fck = {
 
 static struct clk mcbsp2_ick = {
        .name           = "mcbsp2_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1198,7 +1190,7 @@ static struct clk mcbsp2_fck = {
 
 static struct clk mcspi1_ick = {
        .name           = "mcspi1_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1218,7 +1210,7 @@ static struct clk mcspi1_fck = {
 
 static struct clk mcspi2_ick = {
        .name           = "mcspi2_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1238,7 +1230,7 @@ static struct clk mcspi2_fck = {
 
 static struct clk uart1_ick = {
        .name           = "uart1_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1258,7 +1250,7 @@ static struct clk uart1_fck = {
 
 static struct clk uart2_ick = {
        .name           = "uart2_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1278,7 +1270,7 @@ static struct clk uart2_fck = {
 
 static struct clk uart3_ick = {
        .name           = "uart3_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
@@ -1298,9 +1290,9 @@ static struct clk uart3_fck = {
 
 static struct clk gpios_ick = {
        .name           = "gpios_ick",
-       .ops            = &clkops_omap2_dflt_wait,
-       .parent         = &l4_ck,
-       .clkdm_name     = "core_l4_clkdm",
+       .ops            = &clkops_omap2_iclk_dflt_wait,
+       .parent         = &wu_l4_ick,
+       .clkdm_name     = "wkup_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
        .enable_bit     = OMAP24XX_EN_GPIOS_SHIFT,
        .recalc         = &followparent_recalc,
@@ -1318,9 +1310,9 @@ static struct clk gpios_fck = {
 
 static struct clk mpu_wdt_ick = {
        .name           = "mpu_wdt_ick",
-       .ops            = &clkops_omap2_dflt_wait,
-       .parent         = &l4_ck,
-       .clkdm_name     = "core_l4_clkdm",
+       .ops            = &clkops_omap2_iclk_dflt_wait,
+       .parent         = &wu_l4_ick,
+       .clkdm_name     = "wkup_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
        .enable_bit     = OMAP24XX_EN_MPU_WDT_SHIFT,
        .recalc         = &followparent_recalc,
@@ -1338,10 +1330,10 @@ static struct clk mpu_wdt_fck = {
 
 static struct clk sync_32k_ick = {
        .name           = "sync_32k_ick",
-       .ops            = &clkops_omap2_dflt_wait,
-       .parent         = &l4_ck,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
+       .parent         = &wu_l4_ick,
+       .clkdm_name     = "wkup_clkdm",
        .flags          = ENABLE_ON_INIT,
-       .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
        .enable_bit     = OMAP24XX_EN_32KSYNC_SHIFT,
        .recalc         = &followparent_recalc,
@@ -1349,9 +1341,9 @@ static struct clk sync_32k_ick = {
 
 static struct clk wdt1_ick = {
        .name           = "wdt1_ick",
-       .ops            = &clkops_omap2_dflt_wait,
-       .parent         = &l4_ck,
-       .clkdm_name     = "core_l4_clkdm",
+       .ops            = &clkops_omap2_iclk_dflt_wait,
+       .parent         = &wu_l4_ick,
+       .clkdm_name     = "wkup_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
        .enable_bit     = OMAP24XX_EN_WDT1_SHIFT,
        .recalc         = &followparent_recalc,
@@ -1359,10 +1351,10 @@ static struct clk wdt1_ick = {
 
 static struct clk omapctrl_ick = {
        .name           = "omapctrl_ick",
-       .ops            = &clkops_omap2_dflt_wait,
-       .parent         = &l4_ck,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
+       .parent         = &wu_l4_ick,
+       .clkdm_name     = "wkup_clkdm",
        .flags          = ENABLE_ON_INIT,
-       .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
        .enable_bit     = OMAP24XX_EN_OMAPCTRL_SHIFT,
        .recalc         = &followparent_recalc,
@@ -1370,7 +1362,7 @@ static struct clk omapctrl_ick = {
 
 static struct clk cam_ick = {
        .name           = "cam_ick",
-       .ops            = &clkops_omap2_dflt,
+       .ops            = &clkops_omap2_iclk_dflt,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1395,7 +1387,7 @@ static struct clk cam_fck = {
 
 static struct clk mailboxes_ick = {
        .name           = "mailboxes_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1405,7 +1397,7 @@ static struct clk mailboxes_ick = {
 
 static struct clk wdt4_ick = {
        .name           = "wdt4_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1425,7 +1417,7 @@ static struct clk wdt4_fck = {
 
 static struct clk wdt3_ick = {
        .name           = "wdt3_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1445,7 +1437,7 @@ static struct clk wdt3_fck = {
 
 static struct clk mspro_ick = {
        .name           = "mspro_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1465,7 +1457,7 @@ static struct clk mspro_fck = {
 
 static struct clk mmc_ick = {
        .name           = "mmc_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1485,7 +1477,7 @@ static struct clk mmc_fck = {
 
 static struct clk fac_ick = {
        .name           = "fac_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1505,7 +1497,7 @@ static struct clk fac_fck = {
 
 static struct clk eac_ick = {
        .name           = "eac_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1525,7 +1517,7 @@ static struct clk eac_fck = {
 
 static struct clk hdq_ick = {
        .name           = "hdq_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1545,7 +1537,7 @@ static struct clk hdq_fck = {
 
 static struct clk i2c2_ick = {
        .name           = "i2c2_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1565,7 +1557,7 @@ static struct clk i2c2_fck = {
 
 static struct clk i2c1_ick = {
        .name           = "i2c1_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1583,12 +1575,18 @@ static struct clk i2c1_fck = {
        .recalc         = &followparent_recalc,
 };
 
+/*
+ * The enable_reg/enable_bit in this clock is only used for CM_AUTOIDLE
+ * accesses derived from this data.
+ */
 static struct clk gpmc_fck = {
        .name           = "gpmc_fck",
-       .ops            = &clkops_null, /* RMK: missing? */
+       .ops            = &clkops_omap2_iclk_idle_only,
        .parent         = &core_l3_ck,
        .flags          = ENABLE_ON_INIT,
        .clkdm_name     = "core_l3_clkdm",
+       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3),
+       .enable_bit     = OMAP24XX_AUTO_GPMC_SHIFT,
        .recalc         = &followparent_recalc,
 };
 
@@ -1600,17 +1598,38 @@ static struct clk sdma_fck = {
        .recalc         = &followparent_recalc,
 };
 
+/*
+ * The enable_reg/enable_bit in this clock is only used for CM_AUTOIDLE
+ * accesses derived from this data.
+ */
 static struct clk sdma_ick = {
        .name           = "sdma_ick",
-       .ops            = &clkops_null, /* RMK: missing? */
-       .parent         = &l4_ck,
+       .ops            = &clkops_omap2_iclk_idle_only,
+       .parent         = &core_l3_ck,
+       .clkdm_name     = "core_l3_clkdm",
+       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3),
+       .enable_bit     = OMAP24XX_AUTO_SDMA_SHIFT,
+       .recalc         = &followparent_recalc,
+};
+
+/*
+ * The enable_reg/enable_bit in this clock is only used for CM_AUTOIDLE
+ * accesses derived from this data.
+ */
+static struct clk sdrc_ick = {
+       .name           = "sdrc_ick",
+       .ops            = &clkops_omap2_iclk_idle_only,
+       .parent         = &core_l3_ck,
+       .flags          = ENABLE_ON_INIT,
        .clkdm_name     = "core_l3_clkdm",
+       .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3),
+       .enable_bit     = OMAP24XX_AUTO_SDRC_SHIFT,
        .recalc         = &followparent_recalc,
 };
 
 static struct clk vlynq_ick = {
        .name           = "vlynq_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &core_l3_ck,
        .clkdm_name     = "core_l3_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
@@ -1659,7 +1678,7 @@ static struct clk vlynq_fck = {
 
 static struct clk des_ick = {
        .name           = "des_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
@@ -1669,7 +1688,7 @@ static struct clk des_ick = {
 
 static struct clk sha_ick = {
        .name           = "sha_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
@@ -1679,7 +1698,7 @@ static struct clk sha_ick = {
 
 static struct clk rng_ick = {
        .name           = "rng_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
@@ -1689,7 +1708,7 @@ static struct clk rng_ick = {
 
 static struct clk aes_ick = {
        .name           = "aes_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
@@ -1699,7 +1718,7 @@ static struct clk aes_ick = {
 
 static struct clk pka_ick = {
        .name           = "pka_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_ICLKEN4),
@@ -1777,7 +1796,6 @@ static struct omap_clk omap2420_clks[] = {
        CLK(NULL,       "mpu_ck",       &mpu_ck,        CK_242X),
        /* dsp domain clocks */
        CLK(NULL,       "dsp_fck",      &dsp_fck,       CK_242X),
-       CLK(NULL,       "dsp_irate_ick", &dsp_irate_ick, CK_242X),
        CLK(NULL,       "dsp_ick",      &dsp_ick,       CK_242X),
        CLK(NULL,       "iva1_ifck",    &iva1_ifck,     CK_242X),
        CLK(NULL,       "iva1_mpu_int_ifck", &iva1_mpu_int_ifck, CK_242X),
@@ -1797,6 +1815,7 @@ static struct omap_clk omap2420_clks[] = {
        /* L4 domain clocks */
        CLK(NULL,       "l4_ck",        &l4_ck,         CK_242X),
        CLK(NULL,       "ssi_l4_ick",   &ssi_l4_ick,    CK_242X),
+       CLK(NULL,       "wu_l4_ick",    &wu_l4_ick,     CK_242X),
        /* virtual meta-group clock */
        CLK(NULL,       "virt_prcm_set", &virt_prcm_set, CK_242X),
        /* general l4 interface ck, multi-parent functional clk */
@@ -1869,6 +1888,7 @@ static struct omap_clk omap2420_clks[] = {
        CLK(NULL,       "gpmc_fck",     &gpmc_fck,      CK_242X),
        CLK(NULL,       "sdma_fck",     &sdma_fck,      CK_242X),
        CLK(NULL,       "sdma_ick",     &sdma_ick,      CK_242X),
+       CLK(NULL,       "sdrc_ick",     &sdrc_ick,      CK_242X),
        CLK(NULL,       "vlynq_ick",    &vlynq_ick,     CK_242X),
        CLK(NULL,       "vlynq_fck",    &vlynq_fck,     CK_242X),
        CLK(NULL,       "des_ick",      &des_ick,       CK_242X),
@@ -1913,6 +1933,9 @@ int __init omap2420_clk_init(void)
                omap2_init_clk_clkdm(c->lk.clk);
        }
 
+       /* Disable autoidle on all clocks; let the PM code enable it later */
+       omap_clk_disable_autoidle_all();
+
        /* Check the MPU rate set by bootloader */
        clkrate = omap2xxx_clk_get_core_rate(&dpll_ck);
        for (prcm = rate_table; prcm->mpu_speed; prcm++) {
index c047dcd..bba0183 100644 (file)
@@ -1,12 +1,12 @@
 /*
- *  linux/arch/arm/mach-omap2/clock2430_data.c
+ * OMAP2430 clock data
  *
- *  Copyright (C) 2005-2009 Texas Instruments, Inc.
- *  Copyright (C) 2004-2010 Nokia Corporation
+ * Copyright (C) 2005-2009 Texas Instruments, Inc.
+ * Copyright (C) 2004-2011 Nokia Corporation
  *
- *  Contacts:
- *  Richard Woodruff <r-woodruff2@ti.com>
- *  Paul Walmsley
+ * Contacts:
+ * Richard Woodruff <r-woodruff2@ti.com>
+ * Paul Walmsley
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
 /*
  * 2430 clock tree.
  *
- * NOTE:In many cases here we are assigning a 'default' parent.        In many
- *     cases the parent is selectable. The get/set parent calls will also
- *     switch sources.
- *
- *     Many some clocks say always_enabled, but they can be auto idled for
- *     power savings. They will always be available upon clock request.
+ * NOTE:In many cases here we are assigning a 'default' parent. In
+ *     many cases the parent is selectable. The set parent calls will
+ *     also switch sources.
  *
  *     Several sources are given initial rates which may be wrong, this will
  *     be fixed up in the init func.
  *
  *     Things are broadly separated below by clock domains. It is
- *     noteworthy that most periferals have dependencies on multiple clock
+ *     noteworthy that most peripherals have dependencies on multiple clock
  *     domains. Many get their interface clocks from the L4 domain, but get
  *     functional clocks from fixed sources or other core domain derived
  *     clocks.
@@ -55,7 +52,7 @@
 static struct clk func_32k_ck = {
        .name           = "func_32k_ck",
        .ops            = &clkops_null,
-       .rate           = 32000,
+       .rate           = 32768,
        .clkdm_name     = "wkup_clkdm",
 };
 
@@ -116,7 +113,6 @@ static struct dpll_data dpll_dd = {
        .max_multiplier         = 1023,
        .min_divider            = 1,
        .max_divider            = 16,
-       .rate_tolerance         = DEFAULT_DPLL_RATE_TOLERANCE
 };
 
 /*
@@ -125,7 +121,7 @@ static struct dpll_data dpll_dd = {
  */
 static struct clk dpll_ck = {
        .name           = "dpll_ck",
-       .ops            = &clkops_null,
+       .ops            = &clkops_omap2xxx_dpll_ops,
        .parent         = &sys_ck,              /* Can be func_32k also */
        .dpll_data      = &dpll_dd,
        .clkdm_name     = "wkup_clkdm",
@@ -434,37 +430,23 @@ static struct clk dsp_fck = {
        .recalc         = &omap2_clksel_recalc,
 };
 
-/* DSP interface clock */
-static const struct clksel_rate dsp_irate_ick_rates[] = {
-       { .div = 1, .val = 1, .flags = RATE_IN_24XX },
-       { .div = 2, .val = 2, .flags = RATE_IN_24XX },
-       { .div = 3, .val = 3, .flags = RATE_IN_243X },
-       { .div = 0 },
-};
-
-static const struct clksel dsp_irate_ick_clksel[] = {
-       { .parent = &dsp_fck, .rates = dsp_irate_ick_rates },
+static const struct clksel dsp_ick_clksel[] = {
+       { .parent = &dsp_fck, .rates = dsp_ick_rates },
        { .parent = NULL }
 };
 
-/* This clock does not exist as such in the TRM. */
-static struct clk dsp_irate_ick = {
-       .name           = "dsp_irate_ick",
-       .ops            = &clkops_null,
-       .parent         = &dsp_fck,
-       .clksel_reg     = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_CLKSEL),
-       .clksel_mask    = OMAP24XX_CLKSEL_DSP_IF_MASK,
-       .clksel         = dsp_irate_ick_clksel,
-       .recalc         = &omap2_clksel_recalc,
-};
-
 /* 2430 only - EN_DSP controls both dsp fclk and iclk on 2430 */
 static struct clk iva2_1_ick = {
        .name           = "iva2_1_ick",
        .ops            = &clkops_omap2_dflt_wait,
-       .parent         = &dsp_irate_ick,
+       .parent         = &dsp_fck,
+       .clkdm_name     = "dsp_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_FCLKEN),
        .enable_bit     = OMAP24XX_CM_FCLKEN_DSP_EN_DSP_SHIFT,
+       .clksel_reg     = OMAP_CM_REGADDR(OMAP24XX_DSP_MOD, CM_CLKSEL),
+       .clksel_mask    = OMAP24XX_CLKSEL_DSP_IF_MASK,
+       .clksel         = dsp_ick_clksel,
+       .recalc         = &omap2_clksel_recalc,
 };
 
 /*
@@ -525,7 +507,7 @@ static const struct clksel usb_l4_ick_clksel[] = {
 /* It is unclear from TRM whether usb_l4_ick is really in L3 or L4 clkdm */
 static struct clk usb_l4_ick = {       /* FS-USB interface clock */
        .name           = "usb_l4_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &core_l3_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
@@ -606,7 +588,7 @@ static struct clk ssi_ssr_sst_fck = {
  */
 static struct clk ssi_l4_ick = {
        .name           = "ssi_l4_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &l4_ck,
        .clkdm_name     = "core_l4_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
@@ -661,6 +643,7 @@ static struct clk gfx_2d_fck = {
        .recalc         = &omap2_clksel_recalc,
 };
 
+/* This interface clock does not have a CM_AUTOIDLE bit */
 static struct clk gfx_ick = {
        .name           = "gfx_ick",            /* From l3 */
        .ops            = &clkops_omap2_dflt_wait,
@@ -693,7 +676,7 @@ static const struct clksel mdm_ick_clksel[] = {
 
 static struct clk mdm_ick = {          /* used both as a ick and fck */
        .name           = "mdm_ick",
-       .ops            = &clkops_omap2_dflt_wait,
+       .ops            = &clkops_omap2_iclk_dflt_wait,
        .parent         = &core_ck,
        .clkdm_name     = "mdm_clkdm",
        .enable_reg     = OMAP_CM_REGADDR(OMAP2430_MDM_MOD, CM_ICLKEN),
@@ -706,7 +689,7 @@ static struct clk mdm_ick = {               /* used both as a ick and fck */
 
 static struct clk mdm_osc_ck = {
        .name           = "mdm_osc_ck",
-       .ops            = &clkops_omap2_dflt_wait,