summaryrefslogtreecommitdiff
path: root/target/linux/omap4
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/omap4')
-rw-r--r--target/linux/omap4/Makefile30
-rw-r--r--target/linux/omap4/base-files/etc/inittab4
-rw-r--r--target/linux/omap4/config-default326
-rw-r--r--target/linux/omap4/image/Makefile36
-rw-r--r--target/linux/omap4/image/boot.script3
-rw-r--r--target/linux/omap4/patches/000-hwmod_dont_wait.patch196
-rw-r--r--target/linux/omap4/patches/001-omap4_pandaboard-wlan_fix.patch12
-rw-r--r--target/linux/omap4/patches/002-omap4_pandaboard_i2c.patch51
8 files changed, 658 insertions, 0 deletions
diff --git a/target/linux/omap4/Makefile b/target/linux/omap4/Makefile
new file mode 100644
index 0000000000..24fb34420d
--- /dev/null
+++ b/target/linux/omap4/Makefile
@@ -0,0 +1,30 @@
+#
+# Copyright (C) 2012 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+ARCH:=arm
+BOARD:=omap4
+BOARDNAME:=TI OMAP4
+FEATURES:=usb targz
+
+LINUX_VERSION:=3.2.1
+CFLAGS:=-Os -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp
+MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>
+
+KERNELNAME:="uImage"
+
+DEFAULT_PACKAGES += uboot-omap4-omap4_panda
+
+DEVICE_TYPE=developerboard
+
+define Target/Description
+ TI OMAP4
+endef
+
+include $(INCLUDE_DIR)/target.mk
+
+$(eval $(call BuildTarget))
diff --git a/target/linux/omap4/base-files/etc/inittab b/target/linux/omap4/base-files/etc/inittab
new file mode 100644
index 0000000000..cc6c31a129
--- /dev/null
+++ b/target/linux/omap4/base-files/etc/inittab
@@ -0,0 +1,4 @@
+::sysinit:/etc/init.d/rcS S boot
+::shutdown:/etc/init.d/rcS K shutdown
+ttyO2::askfirst:/bin/ash --login
+tty1::askfirst:/bin/ash --login
diff --git a/target/linux/omap4/config-default b/target/linux/omap4/config-default
new file mode 100644
index 0000000000..682074ecca
--- /dev/null
+++ b/target/linux/omap4/config-default
@@ -0,0 +1,326 @@
+CONFIG_ALIGNMENT_TRAP=y
+# CONFIG_APM_EMULATION is not set
+CONFIG_ARCH_HAS_CPUFREQ=y
+CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
+CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y
+CONFIG_ARCH_HAS_OPP=y
+CONFIG_ARCH_OMAP=y
+# CONFIG_ARCH_OMAP1 is not set
+# CONFIG_ARCH_OMAP2 is not set
+CONFIG_ARCH_OMAP2PLUS=y
+CONFIG_ARCH_OMAP2PLUS_TYPICAL=y
+# CONFIG_ARCH_OMAP3 is not set
+CONFIG_ARCH_OMAP4=y
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+# CONFIG_ARCH_USES_GETTIMEOFFSET is not set
+CONFIG_ARM=y
+CONFIG_ARM_CPU_SUSPEND=y
+# CONFIG_ARM_ERRATA_430973 is not set
+# CONFIG_ARM_ERRATA_458693 is not set
+# CONFIG_ARM_ERRATA_460075 is not set
+CONFIG_ARM_ERRATA_720789=y
+# CONFIG_ARM_ERRATA_742230 is not set
+# CONFIG_ARM_ERRATA_742231 is not set
+# CONFIG_ARM_ERRATA_743622 is not set
+# CONFIG_ARM_ERRATA_751472 is not set
+# CONFIG_ARM_ERRATA_754322 is not set
+# CONFIG_ARM_ERRATA_754327 is not set
+# CONFIG_ARM_ERRATA_764369 is not set
+CONFIG_ARM_GIC=y
+CONFIG_ARM_L1_CACHE_SHIFT=5
+CONFIG_ARM_PATCH_PHYS_VIRT=y
+CONFIG_ARM_THUMB=y
+# CONFIG_ARM_THUMBEE is not set
+# CONFIG_ATH_COMMON is not set
+# CONFIG_ATMEL_PWM is not set
+CONFIG_AVERAGE=y
+CONFIG_BCMA_POSSIBLE=y
+CONFIG_BOUNCE=y
+CONFIG_CACHE_L2X0=y
+CONFIG_CACHE_PL310=y
+CONFIG_CFG80211=m
+# CONFIG_CFG80211_DEBUGFS is not set
+CONFIG_CFG80211_DEFAULT_PS=y
+# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
+# CONFIG_CFG80211_INTERNAL_REGDB is not set
+# CONFIG_CFG80211_REG_DEBUG is not set
+CONFIG_CFG80211_WEXT=y
+CONFIG_CLKDEV_LOOKUP=y
+CONFIG_CLKSRC_MMIO=y
+CONFIG_CPU_32v6K=y
+CONFIG_CPU_32v7=y
+CONFIG_CPU_ABRT_EV7=y
+# CONFIG_CPU_BPREDICT_DISABLE is not set
+CONFIG_CPU_CACHE_V7=y
+CONFIG_CPU_CACHE_VIPT=y
+CONFIG_CPU_COPY_V6=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+CONFIG_CPU_HAS_ASID=y
+CONFIG_CPU_HAS_PMU=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+CONFIG_CPU_PABRT_V7=y
+CONFIG_CPU_RMAP=y
+CONFIG_CPU_TLB_V7=y
+CONFIG_CPU_V7=y
+CONFIG_CRC16=y
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_ALGAPI2=m
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_DEBUG_HIGHMEM is not set
+# CONFIG_DEBUG_USER is not set
+CONFIG_DECOMPRESS_LZMA=y
+# CONFIG_DW_WATCHDOG is not set
+CONFIG_EXT4_FS=y
+CONFIG_FRAME_POINTER=y
+CONFIG_FS_MBCACHE=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_IRQ_CHIP=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GPIOLIB=y
+CONFIG_GPIO_TWL4030=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAVE_AOUT=y
+CONFIG_HAVE_ARCH_KGDB=y
+CONFIG_HAVE_ARCH_PFN_VALID=y
+CONFIG_HAVE_ARM_SCU=y
+CONFIG_HAVE_ARM_TWD=y
+CONFIG_HAVE_CLK=y
+CONFIG_HAVE_C_RECORDMCOUNT=y
+CONFIG_HAVE_DMA_API_DEBUG=y
+CONFIG_HAVE_DYNAMIC_FTRACE=y
+CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
+CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_HAVE_GENERIC_HARDIRQS=y
+CONFIG_HAVE_IRQ_WORK=y
+CONFIG_HAVE_KERNEL_GZIP=y
+CONFIG_HAVE_KERNEL_LZMA=y
+CONFIG_HAVE_KERNEL_LZO=y
+CONFIG_HAVE_KERNEL_XZ=y
+CONFIG_HAVE_MEMBLOCK=y
+CONFIG_HAVE_OPROFILE=y
+CONFIG_HAVE_PERF_EVENTS=y
+CONFIG_HAVE_PROC_CPU=y
+CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
+CONFIG_HAVE_SCHED_CLOCK=y
+CONFIG_HAVE_SPARSE_IRQ=y
+CONFIG_HIGHMEM=y
+# CONFIG_HIGHPTE is not set
+CONFIG_HZ=128
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_OMAP=y
+# CONFIG_I2C_PXA_PCI is not set
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_INPUT=y
+# CONFIG_INPUT_GPIO_BUTTONS is not set
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_INPUT_TWL4030_PWRBUTTON=y
+# CONFIG_INPUT_TWL4030_VIBRA is not set
+# CONFIG_INPUT_TWL6040_VIBRA is not set
+CONFIG_IRQ_DOMAIN=y
+# CONFIG_IWM is not set
+CONFIG_JBD2=y
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_KEYBOARD_OMAP4 is not set
+CONFIG_KEYBOARD_TWL4030=y
+CONFIG_KTIME_SCALAR=y
+# CONFIG_LEDS is not set
+CONFIG_LEDS_GPIO=y
+# CONFIG_LEDS_REGULATOR is not set
+CONFIG_LOCAL_TIMERS=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_MAC80211=m
+# CONFIG_MAC80211_DEBUGFS is not set
+# CONFIG_MAC80211_DEBUG_MENU is not set
+CONFIG_MAC80211_HAS_RC=y
+# CONFIG_MAC80211_HWSIM is not set
+# CONFIG_MAC80211_LEDS is not set
+# CONFIG_MAC80211_MESH is not set
+CONFIG_MAC80211_RC_DEFAULT="minstrel_ht"
+CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
+CONFIG_MAC80211_RC_MINSTREL=y
+CONFIG_MAC80211_RC_MINSTREL_HT=y
+# CONFIG_MAC80211_RC_PID is not set
+CONFIG_MACH_OMAP4_PANDA=y
+# CONFIG_MACH_OMAP_4430SDP is not set
+# CONFIG_MACH_OMAP_GENERIC is not set
+CONFIG_MFD_OMAP_USB_HOST=y
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TWL4030_AUDIO is not set
+CONFIG_MMC=y
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_OMAP=y
+CONFIG_MMC_OMAP_HS=y
+CONFIG_MMC_UNSAFE_RESUME=y
+# CONFIG_MPCORE_WATCHDOG is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_DATAFLASH=y
+# CONFIG_MTD_DATAFLASH_OTP is not set
+# CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MUTEX_SPIN_ON_OWNER=y
+# CONFIG_MWIFIEX is not set
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEON=y
+# CONFIG_NET_VENDOR_I825XX is not set
+# CONFIG_NL80211_TESTMODE is not set
+CONFIG_NLS=y
+CONFIG_NO_HZ=y
+CONFIG_NR_CPUS=2
+# CONFIG_OMAP2_DSS is not set
+CONFIG_OMAP_32K_TIMER=y
+CONFIG_OMAP_32K_TIMER_HZ=128
+CONFIG_OMAP_DM_TIMER=y
+# CONFIG_OMAP_MBOX_FWK is not set
+CONFIG_OMAP_MCBSP=y
+CONFIG_OMAP_MUX=y
+# CONFIG_OMAP_MUX_DEBUG is not set
+CONFIG_OMAP_MUX_WARNINGS=y
+CONFIG_OMAP_PACKAGE_CBL=y
+CONFIG_OMAP_PACKAGE_CBS=y
+CONFIG_OMAP_PM_NOOP=y
+CONFIG_OMAP_RESET_CLOCKS=y
+# CONFIG_OMAP_SMARTREFLEX is not set
+# CONFIG_OMAP_WATCHDOG is not set
+CONFIG_OUTER_CACHE=y
+CONFIG_OUTER_CACHE_SYNC=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_PAGE_OFFSET=0xC0000000
+# CONFIG_PCI_SYSCALL is not set
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PHYLIB=y
+CONFIG_PL310_ERRATA_588369=y
+CONFIG_PL310_ERRATA_727915=y
+# CONFIG_PL310_ERRATA_753970 is not set
+CONFIG_PL310_ERRATA_769419=y
+CONFIG_PM=y
+CONFIG_PM_CLK=y
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_OPP=y
+CONFIG_PM_RUNTIME=y
+# CONFIG_PREEMPT_RCU is not set
+# CONFIG_QUOTACTL is not set
+CONFIG_REGMAP=y
+CONFIG_REGMAP_I2C=y
+CONFIG_REGULATOR=y
+# CONFIG_REGULATOR_AD5398 is not set
+# CONFIG_REGULATOR_DEBUG is not set
+# CONFIG_REGULATOR_DUMMY is not set
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
+# CONFIG_REGULATOR_ISL6271A is not set
+# CONFIG_REGULATOR_LP3971 is not set
+# CONFIG_REGULATOR_LP3972 is not set
+# CONFIG_REGULATOR_MAX1586 is not set
+# CONFIG_REGULATOR_MAX8649 is not set
+# CONFIG_REGULATOR_MAX8660 is not set
+# CONFIG_REGULATOR_MAX8952 is not set
+CONFIG_REGULATOR_TPS65023=y
+CONFIG_REGULATOR_TPS6507X=y
+# CONFIG_REGULATOR_TPS6524X is not set
+CONFIG_REGULATOR_TWL4030=y
+# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
+# CONFIG_RFKILL_REGULATOR is not set
+CONFIG_RFS_ACCEL=y
+CONFIG_RPS=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_TWL4030=y
+# CONFIG_RTL8192CU is not set
+# CONFIG_SCSI_DMA is not set
+# CONFIG_SDIO_UART is not set
+# CONFIG_SERIAL_8250 is not set
+CONFIG_SERIAL_OMAP=y
+CONFIG_SERIAL_OMAP_CONSOLE=y
+CONFIG_SMP=y
+CONFIG_SMP_ON_UP=y
+CONFIG_SPI=y
+# CONFIG_SPI_BITBANG is not set
+# CONFIG_SPI_GPIO is not set
+CONFIG_SPI_MASTER=y
+# CONFIG_SPI_OMAP24XX is not set
+CONFIG_STOP_MACHINE=y
+CONFIG_SWP_EMULATE=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+# CONFIG_THUMB2_KERNEL is not set
+CONFIG_TREE_RCU=y
+CONFIG_TWL4030_CORE=y
+# CONFIG_TWL4030_MADC is not set
+CONFIG_TWL4030_POWER=y
+CONFIG_TWL4030_USB=y
+CONFIG_TWL4030_WATCHDOG=y
+# CONFIG_TWL6030_PWM is not set
+CONFIG_TWL6030_USB=y
+# CONFIG_TWL6040_CORE is not set
+CONFIG_UID16=y
+CONFIG_USB=y
+# CONFIG_USB_ARCH_HAS_XHCI is not set
+# CONFIG_USB_CDC_COMPOSITE is not set
+CONFIG_USB_COMMON=y
+# CONFIG_USB_DUMMY_HCD is not set
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_HCD_OMAP=y
+CONFIG_USB_EHCI_TT_NEWSCHED=y
+# CONFIG_USB_ETH is not set
+# CONFIG_USB_FILE_STORAGE is not set
+# CONFIG_USB_FUNCTIONFS is not set
+# CONFIG_USB_FUSB300 is not set
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGETFS is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+# CONFIG_USB_GADGET_DEBUG_FS is not set
+CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2
+CONFIG_USB_GADGET_VBUS_DRAW=2
+# CONFIG_USB_G_ACM_MS is not set
+# CONFIG_USB_G_DBGP is not set
+# CONFIG_USB_G_HID is not set
+# CONFIG_USB_G_NCM is not set
+# CONFIG_USB_G_PRINTER is not set
+# CONFIG_USB_G_SERIAL is not set
+# CONFIG_USB_M66592 is not set
+# CONFIG_USB_NET2272 is not set
+CONFIG_USB_NET_SMSC95XX=y
+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_HCD_OMAP3=y
+CONFIG_USB_OMAP=y
+CONFIG_USB_OTG_UTILS=y
+# CONFIG_USB_R8A66597 is not set
+# CONFIG_USB_RENESAS_USBHS is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_USBNET=y
+# CONFIG_USB_ZERO is not set
+CONFIG_USE_GENERIC_SMP_HELPERS=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_VFP=y
+CONFIG_VFPv3=y
+# CONFIG_W35UND is not set
+# CONFIG_WL1251 is not set
+CONFIG_WL12XX_MENU=m
+CONFIG_WL12XX=m
+CONFIG_WL12XX_SDIO=m
+# CONFIG_WL12XX_SDIO_TEST is not set
+# CONFIG_WL12XX_SPI is not set
+CONFIG_WL12XX_PLATFORM_DATA=y
+CONFIG_XPS=y
+CONFIG_XZ_DEC=y
+CONFIG_ZBOOT_ROM_BSS=0
+CONFIG_ZBOOT_ROM_TEXT=0
+CONFIG_ZONE_DMA_FLAG=0
diff --git a/target/linux/omap4/image/Makefile b/target/linux/omap4/image/Makefile
new file mode 100644
index 0000000000..5123c3a0a8
--- /dev/null
+++ b/target/linux/omap4/image/Makefile
@@ -0,0 +1,36 @@
+#
+# Copyright (C) 2012 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/image.mk
+
+define Image/Prepare
+ cp $(LINUX_DIR)/arch/arm/boot/uImage $(KDIR)/uImage
+endef
+
+define Image/BuildKernel
+ mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n 'Boot Image' -d boot.script $(BIN_DIR)/boot.scr
+ cp $(KDIR)/uImage $(BIN_DIR)/openwrt-$(BOARD)-uImage
+endef
+
+define Image/Build
+ $(call Image/Build/$(1),$(1))
+endef
+
+define Image/Build/jffs2-64k
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=65536 conv=sync
+endef
+
+define Image/Build/jffs2-128k
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=131072 conv=sync
+endef
+
+define Image/Build/squashfs
+ $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
+ dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=131072 conv=sync
+endef
+
+$(eval $(call BuildImage))
diff --git a/target/linux/omap4/image/boot.script b/target/linux/omap4/image/boot.script
new file mode 100644
index 0000000000..521f4389cf
--- /dev/null
+++ b/target/linux/omap4/image/boot.script
@@ -0,0 +1,3 @@
+fatload mmc 0:1 0x80000000 openwrt-omap4-uImage
+setenv bootargs vram=32M fixrtc mem=1G@0x80000000 root=/dev/mmcblk0p2 rootfstype=ext4 console=ttyO2,115200n8 rootwait
+bootm 0x80000000
diff --git a/target/linux/omap4/patches/000-hwmod_dont_wait.patch b/target/linux/omap4/patches/000-hwmod_dont_wait.patch
new file mode 100644
index 0000000000..87c6aedd3a
--- /dev/null
+++ b/target/linux/omap4/patches/000-hwmod_dont_wait.patch
@@ -0,0 +1,196 @@
+From: Benoit Cousson <b-cousson@ti.com>
+Date: Sat, 17 Dec 2011 00:09:11 +0000 (-0800)
+Subject: ARM: OMAP4: hwmod: Don't wait for the idle status if modulemode is not supported
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux.git;a=commitdiff_plain;h=bfc141e3a515008d85e57af39c9faa4d2bbc65e0;hp=ddf536d0d7e1f0b63a681c970888730a4437414d
+
+ARM: OMAP4: hwmod: Don't wait for the idle status if modulemode is not supported
+
+If the module does not have any modulemode, the _disable_module function
+will do nothing. There is then no point waiting for a idle status change.
+
+It will remove the following warnings.
+
+[ 0.331848] omap_hwmod: dmm: _wait_target_disable failed
+[ 0.339935] omap_hwmod: emif_fw: _wait_target_disable failed
+[ 0.348358] omap_hwmod: l3_main_1: _wait_target_disable failed
+[ 0.356964] omap_hwmod: l3_main_2: _wait_target_disable failed
+[ 0.365600] omap_hwmod: l4_abe: _wait_target_disable failed
+[ 0.373931] omap_hwmod: l4_cfg: _wait_target_disable failed
+[ 0.382263] omap_hwmod: l4_per: _wait_target_disable failed
+[ 0.391113] omap_hwmod: l4_wkup: _wait_target_disable failed
+[ 0.399536] omap_hwmod: dma_system: _wait_target_disable failed
+[ 0.408325] omap_hwmod: dss_core: _wait_target_disable failed
+[ 0.416839] omap_hwmod: dss_dispc: _wait_target_disable failed
+[ 0.425445] omap_hwmod: dss_dsi1: _wait_target_disable failed
+[ 0.433990] omap_hwmod: dss_dsi2: _wait_target_disable failed
+[ 0.442504] omap_hwmod: dss_hdmi: _wait_target_disable failed
+[ 0.451019] omap_hwmod: dss_rfbi: _wait_target_disable failed
+[ 0.459564] omap_hwmod: dss_venc: _wait_target_disable failed
+[ 0.489471] omap_hwmod: mailbox: _wait_target_disable failed
+[ 0.505920] omap_hwmod: spinlock: _wait_target_disable failed
+
+Note: For such module, the state is managed automatically by HW according
+to clock domain transition. It is then not possible to wait for idle even
+later in the _idle function since the status will change at clock domain
+boundary.
+
+Signed-off-by: Benoit Cousson <b-cousson@ti.com>
+Cc: Paul Walmsley <paul@pwsan.com>
+Cc: Rajendra Nayak <rnayak@ti.com>
+[paul@pwsan.com: renamed fns to indicate that they are OMAP4-only; moved
+ _wait_target_disable() into _disable_module(), removing duplicate code]
+Signed-off-by: Paul Walmsley <paul@pwsan.com>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+---
+
+diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
+index 207a2ff..ebace0f 100644
+--- a/arch/arm/mach-omap2/omap_hwmod.c
++++ b/arch/arm/mach-omap2/omap_hwmod.c
+@@ -706,27 +706,65 @@ static void _enable_module(struct omap_hwmod *oh)
+ }
+
+ /**
+- * _disable_module - enable CLKCTRL modulemode on OMAP4
++ * _omap4_wait_target_disable - wait for a module to be disabled on OMAP4
++ * @oh: struct omap_hwmod *
++ *
++ * Wait for a module @oh to enter slave idle. Returns 0 if the module
++ * does not have an IDLEST bit or if the module successfully enters
++ * slave idle; otherwise, pass along the return value of the
++ * appropriate *_cm*_wait_module_idle() function.
++ */
++static int _omap4_wait_target_disable(struct omap_hwmod *oh)
++{
++ if (!cpu_is_omap44xx())
++ return 0;
++
++ if (!oh)
++ return -EINVAL;
++
++ if (oh->_int_flags & _HWMOD_NO_MPU_PORT)
++ return 0;
++
++ if (oh->flags & HWMOD_NO_IDLEST)
++ return 0;
++
++ return omap4_cminst_wait_module_idle(oh->clkdm->prcm_partition,
++ oh->clkdm->cm_inst,
++ oh->clkdm->clkdm_offs,
++ oh->prcm.omap4.clkctrl_offs);
++}
++
++/**
++ * _omap4_disable_module - enable CLKCTRL modulemode on OMAP4
+ * @oh: struct omap_hwmod *
+ *
+ * Disable the PRCM module mode related to the hwmod @oh.
+- * No return value.
++ * Return EINVAL if the modulemode is not supported and 0 in case of success.
+ */
+-static void _disable_module(struct omap_hwmod *oh)
++static int _omap4_disable_module(struct omap_hwmod *oh)
+ {
++ int v;
++
+ /* The module mode does not exist prior OMAP4 */
+- if (cpu_is_omap24xx() || cpu_is_omap34xx())
+- return;
++ if (!cpu_is_omap44xx())
++ return -EINVAL;
+
+ if (!oh->clkdm || !oh->prcm.omap4.modulemode)
+- return;
++ return -EINVAL;
+
+- pr_debug("omap_hwmod: %s: _disable_module\n", oh->name);
++ pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__);
+
+ omap4_cminst_module_disable(oh->clkdm->prcm_partition,
+ oh->clkdm->cm_inst,
+ oh->clkdm->clkdm_offs,
+ oh->prcm.omap4.clkctrl_offs);
++
++ v = _omap4_wait_target_disable(oh);
++ if (v)
++ pr_warn("omap_hwmod: %s: _wait_target_disable failed\n",
++ oh->name);
++
++ return 0;
+ }
+
+ /**
+@@ -1153,36 +1191,6 @@ static int _wait_target_ready(struct omap_hwmod *oh)
+ }
+
+ /**
+- * _wait_target_disable - wait for a module to be disabled
+- * @oh: struct omap_hwmod *
+- *
+- * Wait for a module @oh to enter slave idle. Returns 0 if the module
+- * does not have an IDLEST bit or if the module successfully enters
+- * slave idle; otherwise, pass along the return value of the
+- * appropriate *_cm*_wait_module_idle() function.
+- */
+-static int _wait_target_disable(struct omap_hwmod *oh)
+-{
+- /* TODO: For now just handle OMAP4+ */
+- if (cpu_is_omap24xx() || cpu_is_omap34xx())
+- return 0;
+-
+- if (!oh)
+- return -EINVAL;
+-
+- if (oh->_int_flags & _HWMOD_NO_MPU_PORT)
+- return 0;
+-
+- if (oh->flags & HWMOD_NO_IDLEST)
+- return 0;
+-
+- return omap4_cminst_wait_module_idle(oh->clkdm->prcm_partition,
+- oh->clkdm->cm_inst,
+- oh->clkdm->clkdm_offs,
+- oh->prcm.omap4.clkctrl_offs);
+-}
+-
+-/**
+ * _lookup_hardreset - fill register bit info for this hwmod/reset line
+ * @oh: struct omap_hwmod *
+ * @name: name of the reset line in the context of this hwmod
+@@ -1524,8 +1532,6 @@ static int _enable(struct omap_hwmod *oh)
+ */
+ static int _idle(struct omap_hwmod *oh)
+ {
+- int ret;
+-
+ pr_debug("omap_hwmod: %s: idling\n", oh->name);
+
+ if (oh->_state != _HWMOD_STATE_ENABLED) {
+@@ -1537,11 +1543,9 @@ static int _idle(struct omap_hwmod *oh)
+ if (oh->class->sysc)
+ _idle_sysc(oh);
+ _del_initiator_dep(oh, mpu_oh);
+- _disable_module(oh);
+- ret = _wait_target_disable(oh);
+- if (ret)
+- pr_warn("omap_hwmod: %s: _wait_target_disable failed\n",
+- oh->name);
++
++ _omap4_disable_module(oh);
++
+ /*
+ * The module must be in idle mode before disabling any parents
+ * clocks. Otherwise, the parent clock might be disabled before
+@@ -1642,11 +1646,7 @@ static int _shutdown(struct omap_hwmod *oh)
+ if (oh->_state == _HWMOD_STATE_ENABLED) {
+ _del_initiator_dep(oh, mpu_oh);
+ /* XXX what about the other system initiators here? dma, dsp */
+- _disable_module(oh);
+- ret = _wait_target_disable(oh);
+- if (ret)
+- pr_warn("omap_hwmod: %s: _wait_target_disable failed\n",
+- oh->name);
++ _omap4_disable_module(oh);
+ _disable_clocks(oh);
+ if (oh->clkdm)
+ clkdm_hwmod_disable(oh->clkdm, oh);
diff --git a/target/linux/omap4/patches/001-omap4_pandaboard-wlan_fix.patch b/target/linux/omap4/patches/001-omap4_pandaboard-wlan_fix.patch
new file mode 100644
index 0000000000..a2aaf206b0
--- /dev/null
+++ b/target/linux/omap4/patches/001-omap4_pandaboard-wlan_fix.patch
@@ -0,0 +1,12 @@
+diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
+index daa056e..fe03b09 100644
+--- a/arch/arm/mach-omap2/twl-common.c
++++ b/arch/arm/mach-omap2/twl-common.c
+@@ -261,6 +261,7 @@ static struct regulator_init_data omap4_vusb_idata = {
+ static struct regulator_init_data omap4_clk32kg_idata = {
+ .constraints = {
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
++ .always_on = true,
+ },
+ };
+
diff --git a/target/linux/omap4/patches/002-omap4_pandaboard_i2c.patch b/target/linux/omap4/patches/002-omap4_pandaboard_i2c.patch
new file mode 100644
index 0000000000..fa3f6cc900
--- /dev/null
+++ b/target/linux/omap4/patches/002-omap4_pandaboard_i2c.patch
@@ -0,0 +1,51 @@
+diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
+index 7f47092..2a05d3d 100644
+--- a/arch/arm/mach-omap2/id.c
++++ b/arch/arm/mach-omap2/id.c
+@@ -389,8 +389,10 @@ static void __init omap4_check_revision(void)
+ omap_revision = OMAP4430_REV_ES2_1;
+ break;
+ case 4:
+- default:
+ omap_revision = OMAP4430_REV_ES2_2;
++ case 6:
++ default:
++ omap_revision = OMAP4430_REV_ES2_3;
+ }
+ break;
+ case 0xb94e:
+@@ -403,7 +405,7 @@ static void __init omap4_check_revision(void)
+ break;
+ default:
+ /* Unknown default to latest silicon rev as default */
+- omap_revision = OMAP4430_REV_ES2_2;
++ omap_revision = OMAP4430_REV_ES2_3;
+ }
+
+ pr_info("OMAP%04x ES%d.%d\n", omap_rev() >> 16,
+diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+index 7695e5d..71d3e36 100644
+--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
++++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+@@ -2257,7 +2257,8 @@ static struct omap_hwmod_class omap44xx_i2c_hwmod_class = {
+ };
+
+ static struct omap_i2c_dev_attr i2c_dev_attr = {
+- .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
++ .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE |
++ OMAP_I2C_FLAG_RESET_REGS_POSTIDLE,
+ };
+
+ /* i2c1 */
+diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
+index 408a12f..e279395 100644
+--- a/arch/arm/plat-omap/include/plat/cpu.h
++++ b/arch/arm/plat-omap/include/plat/cpu.h
+@@ -391,6 +391,7 @@ IS_OMAP_TYPE(3517, 0x3517)
+ #define OMAP4430_REV_ES2_0 (OMAP443X_CLASS | (0x20 << 8))
+ #define OMAP4430_REV_ES2_1 (OMAP443X_CLASS | (0x21 << 8))
+ #define OMAP4430_REV_ES2_2 (OMAP443X_CLASS | (0x22 << 8))
++#define OMAP4430_REV_ES2_3 (OMAP443X_CLASS | (0x23 << 8))
+
+ #define OMAP446X_CLASS 0x44600044
+ #define OMAP4460_REV_ES1_0 (OMAP446X_CLASS | (0x10 << 8))