1
0
mirror of https://git.yoctoproject.org/meta-ti synced 2026-05-08 04:20:11 +00:00

linux-omap-psp 2.6.37: add more recent version of OMAP3 kernel

Ported from Arago the kernel that corresponds to PSP version 04.02.00.07 with
corresponding SDK patches applied on top.

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
This commit is contained in:
Denys Dmytriyenko
2012-11-01 22:50:53 -04:00
parent 12f4fb47ab
commit 53dcf7977a
31 changed files with 16620 additions and 0 deletions
@@ -0,0 +1,44 @@
From 10fbd32a96aedd644b6bf38888a2af64cc13a35f Mon Sep 17 00:00:00 2001
From: Matt Porter <mporter@ti.com>
Date: Mon, 5 Dec 2011 15:29:35 -0600
Subject: [PATCH] musb: update PIO mode help information in Kconfig
* Updated the Kconfig help information for the PIO mode for MUSB
to make it more clear to the customer when to select this option
and which devices currently have issues with this option.
* This is in accordance with the findings for CPPI4.1 DMA usage
for MUSB
Upstream-Status: Submitted
* Submitted to the PSP team using the lpr list
Signed-off-by: Matt Porter <mporter@ti.com>
Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
---
drivers/usb/musb/Kconfig | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
index ee75cbc..d56f23d 100644
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
@@ -107,10 +107,13 @@ config MUSB_PIO_ONLY
All data is copied between memory and FIFO by the CPU.
DMA controllers are ignored.
- Do not select 'n' here unless DMA support for your SOC or board
- is unavailable (or unstable). When DMA is enabled at compile time,
- you can still disable it at run time using the "use_dma=n" module
- parameter.
+ Select 'y' here if DMA support for your SOC or board
+ is unavailable (or unstable). On CPPI 4.1 DMA based
+ systems (AM335x, AM35x, and AM180x) DMA support is
+ considered unstable and this option should be enabled
+ in production. When DMA is enabled at compile time,
+ you can still disable it at run time using the "use_dma=n"
+ module parameter.
config USB_UX500_DMA_HW
select USB_UX500_DMA
--
1.7.0.4
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,111 @@
From a520a30ffd932bce334d894adce12a6ceec2be00 Mon Sep 17 00:00:00 2001
From: Greg Guyotte <gguyotte@ti.com>
Date: Tue, 21 Jun 2011 21:56:06 -0500
Subject: [PATCH] Fix matrix suspend
* Added new OMAP config option OMAP3_PM_DISABLE_VT_SWITCH which
disables the VT console switch which normally occurs during
suspend. This console switch, when performed with Matrix
running, hangs. The VT switch is considered unnecessary.
* Modified OMAP3 EVM and OMAP3 Beagle defconfig files to default
the OMAP3_PM_DISABLE_VT_SWITCH=y, and also to default
MMC_UNSAFE_RESUME=y. The latter case causes a hang during suspend
if the root filesystem is located on the MMC card. This
fix has actually been done in another patch, but the defconfigs
were not updated.
Signed-off-by: Greg Guyotte <gguyotte@ti.com>
Fix mistake in Kconfig
Did not mean to add the two lines in Kconfig under ARCH_OMAP3.
Signed-off-by: Greg Guyotte <gguyotte@ti.com>
---
arch/arm/configs/omap3_beagle_defconfig | 3 ++-
arch/arm/configs/omap3_evm_defconfig | 3 ++-
arch/arm/mach-omap2/Kconfig | 10 ++++++++++
arch/arm/mach-omap2/pm34xx.c | 4 ++++
4 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/arch/arm/configs/omap3_beagle_defconfig b/arch/arm/configs/omap3_beagle_defconfig
index cef7597..6e8d50c 100644
--- a/arch/arm/configs/omap3_beagle_defconfig
+++ b/arch/arm/configs/omap3_beagle_defconfig
@@ -97,6 +97,7 @@ CONFIG_MACH_OMAP3_BEAGLE=y
# CONFIG_MACH_OMAP_3630SDP is not set
# CONFIG_OMAP3_EMU is not set
# CONFIG_OMAP3_SDRC_AC_TIMING is not set
+CONFIG_OMAP3_PM_DISABLE_VT_SWITCH=y
#
# Processor Features
@@ -504,7 +505,7 @@ CONFIG_USB_ETH=y
CONFIG_USB_ETH_RNDIS=y
CONFIG_MMC=y
# CONFIG_MMC_DEBUG is not set
-# CONFIG_MMC_UNSAFE_RESUME is not set
+CONFIG_MMC_UNSAFE_RESUME=y
#
# MMC/SD/SDIO Card Drivers
diff --git a/arch/arm/configs/omap3_evm_defconfig b/arch/arm/configs/omap3_evm_defconfig
index 675ae9c..8db3574 100644
--- a/arch/arm/configs/omap3_evm_defconfig
+++ b/arch/arm/configs/omap3_evm_defconfig
@@ -97,6 +97,7 @@ CONFIG_MACH_OMAP3EVM=y
# CONFIG_MACH_OMAP_3630SDP is not set
# CONFIG_OMAP3_EMU is not set
# CONFIG_OMAP3_SDRC_AC_TIMING is not set
+CONFIG_OMAP3_PM_DISABLE_VT_SWITCH=y
#
# Processor Features
@@ -557,7 +558,7 @@ CONFIG_USB_ETH=y
CONFIG_USB_ETH_RNDIS=y
CONFIG_MMC=y
# CONFIG_MMC_DEBUG is not set
-# CONFIG_MMC_UNSAFE_RESUME is not set
+CONFIG_MMC_UNSAFE_RESUME=y
#
# MMC/SD/SDIO Card Drivers
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index dfa5464..43dc070 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -338,6 +338,16 @@ config OMAP3_EMU
help
Say Y here to enable debugging hardware of omap3
+config OMAP3_PM_DISABLE_VT_SWITCH
+ bool "OMAP3 Disable PM Console Switch"
+ depends on ARCH_OMAP3
+ default y
+ help
+ This option disables the default PM VT switch behavior for OMAP3.
+ Some platforms hang during suspend due to a failed attempt to
+ perform the VT switch. The VT switch is unnecessary on many
+ platforms.
+
config OMAP3_SDRC_AC_TIMING
bool "Enable SDRC AC timing register changes"
depends on ARCH_OMAP3
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 242babc..1d23b55 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -1072,6 +1072,10 @@ static int __init omap3_pm_init(void)
printk(KERN_ERR "Power Management for TI OMAP3.\n");
+#ifdef CONFIG_OMAP3_PM_DISABLE_VT_SWITCH
+ pm_set_vt_switch(0);
+#endif
+
/* XXX prcm_setup_regs needs to be before enabling hw
* supervised mode for powerdomains */
prcm_setup_regs();
--
1.7.0.4
@@ -0,0 +1,130 @@
From f4019d96a708b09a804f59667d5dfd2a9eaaced5 Mon Sep 17 00:00:00 2001
From: Chase Maupin <Chase.Maupin@ti.com>
Date: Mon, 27 Jun 2011 13:33:43 -0500
Subject: [PATCH 1/3] OCF support: remove support for non-TI hardware
* Base OCF patch was updated to not patch in support for non-TI
hardware.
* Makefile and Kconfig needed updating to remove these options
Upstream-Status: Inappropriate [TI SDK specific]
Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
---
crypto/ocf/Kconfig | 77 ---------------------------------------------------
crypto/ocf/Makefile | 11 -------
2 files changed, 0 insertions(+), 88 deletions(-)
diff --git a/crypto/ocf/Kconfig b/crypto/ocf/Kconfig
index b9c24ff..805cb4c 100644
--- a/crypto/ocf/Kconfig
+++ b/crypto/ocf/Kconfig
@@ -31,83 +31,6 @@ config OCF_CRYPTOSOFT
A software driver for the OCF framework that uses
the kernel CryptoAPI.
-config OCF_SAFE
- tristate "safenet (HW crypto engine)"
- depends on OCF_OCF
- help
- A driver for a number of the safenet Excel crypto accelerators.
- Currently tested and working on the 1141 and 1741.
-
-config OCF_IXP4XX
- tristate "IXP4xx (HW crypto engine)"
- depends on OCF_OCF
- help
- XScale IXP4xx crypto accelerator driver. Requires the
- Intel Access library.
-
-config OCF_IXP4XX_SHA1_MD5
- bool "IXP4xx SHA1 and MD5 Hashing"
- depends on OCF_IXP4XX
- help
- Allows the IXP4xx crypto accelerator to perform SHA1 and MD5 hashing.
- Note: this is MUCH slower than using cryptosoft (software crypto engine).
-
-config OCF_HIFN
- tristate "hifn (HW crypto engine)"
- depends on OCF_OCF
- help
- OCF driver for various HIFN based crypto accelerators.
- (7951, 7955, 7956, 7751, 7811)
-
-config OCF_HIFNHIPP
- tristate "Hifn HIPP (HW packet crypto engine)"
- depends on OCF_OCF
- help
- OCF driver for various HIFN (HIPP) based crypto accelerators
- (7855)
-
-config OCF_TALITOS
- tristate "talitos (HW crypto engine)"
- depends on OCF_OCF
- help
- OCF driver for Freescale's security engine (SEC/talitos).
-
-config OCF_PASEMI
- tristate "pasemi (HW crypto engine)"
- depends on OCF_OCF && PPC_PASEMI
- help
- OCF driver for the PA Semi PWRficient DMA Engine
-
-config OCF_EP80579
- tristate "ep80579 (HW crypto engine)"
- depends on OCF_OCF
- help
- OCF driver for the Intel EP80579 Integrated Processor Product Line.
-
-config OCF_CRYPTOCTEON
- tristate "cryptocteon (HW crypto engine)"
- depends on OCF_OCF
- help
- OCF driver for the Cavium OCTEON Processors.
-
-config OCF_KIRKWOOD
- tristate "kirkwood (HW crypto engine)"
- depends on OCF_OCF
- help
- OCF driver for the Marvell Kirkwood (88F6xxx) Processors.
-
-config OCF_C7108
- tristate "Micronas 7108 (HW crypto engine)"
- depends on OCF_OCF
- help
- OCF driver for the Microna 7108 Cipher processors.
-
-config OCF_OCFNULL
- tristate "ocfnull (fake crypto engine)"
- depends on OCF_OCF
- help
- OCF driver for measuring ipsec overheads (does no crypto)
-
config OCF_BENCH
tristate "ocf-bench (HW crypto in-kernel benchmark)"
depends on OCF_OCF
diff --git a/crypto/ocf/Makefile b/crypto/ocf/Makefile
index fa951f4..aab3fae 100644
--- a/crypto/ocf/Makefile
+++ b/crypto/ocf/Makefile
@@ -37,17 +37,6 @@ obj-$(CONFIG_OCF_CRYPTODEV) += cryptodev.o
obj-$(CONFIG_OCF_CRYPTOSOFT) += cryptosoft.o
obj-$(CONFIG_OCF_BENCH) += ocf-bench.o
-$(_obj)-$(CONFIG_OCF_SAFE) += safe$(_slash)
-$(_obj)-$(CONFIG_OCF_HIFN) += hifn$(_slash)
-$(_obj)-$(CONFIG_OCF_IXP4XX) += ixp4xx$(_slash)
-$(_obj)-$(CONFIG_OCF_TALITOS) += talitos$(_slash)
-$(_obj)-$(CONFIG_OCF_PASEMI) += pasemi$(_slash)
-$(_obj)-$(CONFIG_OCF_EP80579) += ep80579$(_slash)
-$(_obj)-$(CONFIG_OCF_CRYPTOCTEON) += cryptocteon$(_slash)
-$(_obj)-$(CONFIG_OCF_KIRKWOOD) += kirkwood$(_slash)
-$(_obj)-$(CONFIG_OCF_OCFNULL) += ocfnull$(_slash)
-$(_obj)-$(CONFIG_OCF_C7108) += c7108$(_slash)
-
ocf-objs := $(OCF_OBJS)
$(list-multi) dummy1: $(ocf-objs)
--
1.7.0.4
@@ -0,0 +1,319 @@
From 0192a1d0731d3e8959b817bbc458c21e1c51408f Mon Sep 17 00:00:00 2001
From: Greg Guyotte <gguyotte@ti.com>
Date: Tue, 5 Jun 2012 16:54:26 -0500
Subject: [PATCH] am37x: Adding ABB Support for 1GHz OPP
This patch adds ABB support for the AM37x 1GHz OPP. When 1GHz
operation occurs, the ABB LDO will be enabled, effectively
boosting MPU voltage. At any time that we are not operating
at 1GHz, the ABB LDO will be bypassed. This change is
required for operation at 1GHz on the AM37x device.
This patch only affects AM37x. In the course of booting,
it boosts the MPU rate to 1GHz and turns on the ABB LDO. It
is expected that the system will be operating at 800MHz
prior to this time, as set by Uboot. Also note that after
MPU rate is changed, the loops_per_jiffy global is updated,
which is required in order to get the proper readout from
BogoMIPS.
Upstream-Status: Not Appropriate
* This patch is a quick fix based on an old kernel.
* This will be reworked for the Linux mainline kernel.
Signed-off-by: Greg Guyotte <gguyotte@ti.com>
---
arch/arm/mach-omap2/pm.c | 30 +++++++-
arch/arm/mach-omap2/prm-regbits-34xx.h | 20 +++++
arch/arm/mach-omap2/prm2xxx_3xxx.h | 5 ++
arch/arm/mach-omap2/voltage.c | 123 ++++++++++++++++++++++++++++++++
4 files changed, 176 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index f7e4d1b..678877c 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -27,6 +27,8 @@
#include "cm2xxx_3xxx.h"
#include "pm.h"
+#define RATE_1GHZ 1000000000
+
static struct omap_device_pm_latency *pm_lats;
static struct device *mpu_dev;
@@ -61,7 +63,6 @@ struct device *omap4_get_dsp_device(void)
}
EXPORT_SYMBOL(omap4_get_dsp_device);
-#ifndef CONFIG_CPU_FREQ
static unsigned long compute_lpj(unsigned long ref, u_int div, u_int mult)
{
unsigned long new_jiffy_l, new_jiffy_h;
@@ -81,7 +82,6 @@ static unsigned long compute_lpj(unsigned long ref, u_int div, u_int mult)
return new_jiffy_h + new_jiffy_l * 100;
}
-#endif
/* static int _init_omap_device(struct omap_hwmod *oh, void *user) */
static int _init_omap_device(char *name, struct device **new_dev)
@@ -289,6 +289,7 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,
struct clk *clk;
struct opp *opp;
unsigned long freq, bootup_volt;
+ int ret;
if (!vdd_name || !clk_name || !dev) {
printk(KERN_ERR "%s: Invalid parameters!\n", __func__);
@@ -311,6 +312,11 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,
freq = clk->rate;
clk_put(clk);
+
+ /* set up for a voltage to support 1GHz */
+ if (cpu_is_omap3630())
+ if (!strcmp(vdd_name, "mpu"))
+ freq = RATE_1GHZ;
opp = opp_find_freq_ceil(dev, &freq);
if (IS_ERR(opp)) {
@@ -327,6 +333,26 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,
}
omap_voltage_scale_vdd(voltdm, bootup_volt);
+
+ /* once voltage is changed, we can scale freq to max */
+ if (cpu_is_omap3630()) {
+ if (!strcmp(vdd_name, "mpu")) {
+ unsigned long cur_rate;
+ cur_rate = clk->rate;
+
+ ret = clk_set_rate(clk, RATE_1GHZ);
+ if (ret) {
+ dev_warn(dev, "%s: Unable to set rate to %d\n",
+ __func__, RATE_1GHZ);
+ return ret;
+ }
+ /* Update loops_per_jiffy because processor speed is
+ being changed. Necessary to keep BogoMIPS happy. */
+ loops_per_jiffy = compute_lpj(loops_per_jiffy,
+ cur_rate / 1000000,
+ RATE_1GHZ / 1000000);
+ }
+ }
return 0;
exit:
diff --git a/arch/arm/mach-omap2/prm-regbits-34xx.h b/arch/arm/mach-omap2/prm-regbits-34xx.h
index 64c087a..2758fa3 100644
--- a/arch/arm/mach-omap2/prm-regbits-34xx.h
+++ b/arch/arm/mach-omap2/prm-regbits-34xx.h
@@ -89,6 +89,7 @@
#define OMAP3430_LASTPOWERSTATEENTERED_MASK (0x3 << 0)
/* PRM_IRQSTATUS_IVA2, PRM_IRQSTATUS_MPU shared bits */
+#define OMAP3630_ABB_LDO_TRANXDONE_ST (1 << 26)
#define OMAP3430_WKUP_ST_MASK (1 << 0)
/* PRM_IRQENABLE_IVA2, PRM_IRQENABLE_MPU shared bits */
@@ -216,6 +217,9 @@
/* PRM_SYSCONFIG specific bits */
/* PRM_IRQSTATUS_MPU specific bits */
+#define OMAP3630_VC_BYPASS_ACK_EN (1 << 28)
+#define OMAP3630_VC_VP1_ACK_EN (1 << 27)
+#define OMAP3630_VC_ABB_LDO_TRANXDONE_EN (1 << 26)
#define OMAP3430ES2_SND_PERIPH_DPLL_ST_SHIFT 25
#define OMAP3430ES2_SND_PERIPH_DPLL_ST_MASK (1 << 25)
#define OMAP3430_VC_TIMEOUTERR_ST_MASK (1 << 24)
@@ -587,6 +591,22 @@
/* PRM_VP2_STATUS specific bits */
+/* PRM_LDO_ABB_SETUP */
+#define OMAP3630_SR2_IN_TRANSITION (1 << 6)
+#define OMAP3630_SR2_STATUS_SHIFT 3
+#define OMAP3630_SR2_STATUS_MASK (0x3 << 3)
+#define OMAP3630_OPP_CHANGE (1 << 2)
+#define OMAP3630_OPP_SEL_SHIFT 0
+#define OMAP3630_OPP_SEL_MASK (0x3 << 0)
+
+/* PRM_LDO_ABB_CTRL */
+#define OMAP3630_SR2_WTCNT_VALUE_SHIFT 8
+#define OMAP3630_SR2_WTCNT_VALUE_MASK (0xff << 8)
+#define OMAP3630_SLEEP_RBB_SEL (1 << 3)
+#define OMAP3630_ACTIVE_FBB_SEL (1 << 2)
+#define OMAP3630_ACTIVE_RBB_SEL (1 << 1)
+#define OMAP3630_SR2EN (1 << 0)
+
/* RM_RSTST_NEON specific bits */
/* PM_WKDEP_NEON specific bits */
diff --git a/arch/arm/mach-omap2/prm2xxx_3xxx.h b/arch/arm/mach-omap2/prm2xxx_3xxx.h
index 613f83c..79c9ad5 100644
--- a/arch/arm/mach-omap2/prm2xxx_3xxx.h
+++ b/arch/arm/mach-omap2/prm2xxx_3xxx.h
@@ -171,6 +171,11 @@
#define OMAP3_PRM_VP2_STATUS_OFFSET 0x00e4
#define OMAP3430_PRM_VP2_STATUS OMAP34XX_PRM_REGADDR(OMAP3430_GR_MOD, 0x00e4)
+#define OMAP3_PRM_LDO_ABB_SETUP_OFFSET 0x00f0
+#define OMAP3430_PRM_LDO_ABB_SETUP OMAP34XX_PRM_REGADDR(OMAP3430_GR_MOD, 0x00f0)
+#define OMAP3_PRM_LDO_ABB_CTRL_OFFSET 0x00f4
+#define OMAP3430_PRM_LDO_ABB_CTRL OMAP34XX_PRM_REGADDR(OMAP3430_GR_MOD, 0x00f4)
+
#define OMAP3_PRM_CLKSEL_OFFSET 0x0040
#define OMAP3430_PRM_CLKSEL OMAP34XX_PRM_REGADDR(OMAP3430_CCR_MOD, 0x0040)
#define OMAP3_PRM_CLKOUT_CTRL_OFFSET 0x0070
diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c
index 2e015a7..32944d0 100644
--- a/arch/arm/mach-omap2/voltage.c
+++ b/arch/arm/mach-omap2/voltage.c
@@ -45,6 +45,10 @@
#define VP_TRANXDONE_TIMEOUT 300
#define VOLTAGE_DIR_SIZE 16
+#define ABB_TRANXDONE_TIMEOUT 100
+#define ABB_FAST_OPP 1
+#define ABB_NOMINAL_OPP 2
+
/* Voltage processor register offsets */
struct vp_reg_offs {
u8 vpconfig;
@@ -764,6 +768,112 @@ static int vc_bypass_scale_voltage(struct omap_vdd_info *vdd,
return 0;
}
+/**
+ * omap3630_abb_change_active_opp - handle OPP changes with Adaptive Body-Bias
+ * @target_opp_no: ABB_FAST_OPP or ABB_NOMINAL_OPP
+ *
+ * Adaptive Body-Bias is a 3630-specific technique to boost voltage in high
+ * OPPs for silicon with weak characteristics as well as lower voltage in low
+ * OPPs for silicon with strong characteristics.
+ *
+ * Only Foward Body-Bias for operating at high OPPs is implemented below.
+ * Reverse Body-Bias for saving power in active cases and sleep cases is not
+ * yet implemented.
+ */
+static int omap3630_abb_change_active_opp(u32 target_opp_no)
+{
+ u32 sr2en_enabled;
+ int timeout;
+
+ /* has SR2EN been enabled previously? */
+ sr2en_enabled = (omap2_prm_read_mod_reg(OMAP3430_GR_MOD,
+ OMAP3_PRM_LDO_ABB_CTRL_OFFSET) &
+ OMAP3630_SR2EN);
+
+ /* select OPP */
+ /* FIXME: shouldn't be hardcoded OPP here */
+ if (target_opp_no == ABB_FAST_OPP) {
+ /* program for fast opp - enable fbb */
+ omap2_prm_rmw_mod_reg_bits(OMAP3630_OPP_SEL_MASK,
+ (ABB_FAST_OPP << OMAP3630_OPP_SEL_SHIFT),
+ OMAP3430_GR_MOD,
+ OMAP3_PRM_LDO_ABB_SETUP_OFFSET);
+
+ /* enable the ABB ldo if not done already */
+ if (!sr2en_enabled)
+ omap2_prm_set_mod_reg_bits(OMAP3630_SR2EN,
+ OMAP3430_GR_MOD,
+ OMAP3_PRM_LDO_ABB_CTRL_OFFSET);
+ pr_debug("ABB: ABB LDO Enabled\n");
+ } else if (sr2en_enabled) {
+ /* program for nominal opp - bypass abb ldo */
+ omap2_prm_rmw_mod_reg_bits(OMAP3630_OPP_SEL_MASK,
+ (ABB_NOMINAL_OPP << OMAP3630_OPP_SEL_SHIFT),
+ OMAP3430_GR_MOD,
+ OMAP3_PRM_LDO_ABB_SETUP_OFFSET);
+ pr_debug("ABB: ABB LDO Bypassed\n");
+ } else {
+ /* nothing to do here */
+ return 0;
+ }
+
+ /* set ACTIVE_FBB_SEL for all 3630 silicon */
+ omap2_prm_set_mod_reg_bits(OMAP3630_ACTIVE_FBB_SEL,
+ OMAP3430_GR_MOD,
+ OMAP3_PRM_LDO_ABB_CTRL_OFFSET);
+
+ /* program settling time of 30us for ABB ldo transition */
+ omap2_prm_rmw_mod_reg_bits(OMAP3630_SR2_WTCNT_VALUE_MASK,
+ (0x62 << OMAP3630_SR2_WTCNT_VALUE_SHIFT),
+ OMAP3430_GR_MOD,
+ OMAP3_PRM_LDO_ABB_CTRL_OFFSET);
+
+ /* clear ABB ldo interrupt status */
+ omap2_prm_write_mod_reg(OMAP3630_ABB_LDO_TRANXDONE_ST,
+ OCP_MOD,
+ OMAP3_PRM_IRQSTATUS_MPU_OFFSET);
+
+ /* enable ABB LDO OPP change */
+ omap2_prm_set_mod_reg_bits(OMAP3630_OPP_CHANGE,
+ OMAP3430_GR_MOD,
+ OMAP3_PRM_LDO_ABB_SETUP_OFFSET);
+
+ timeout = 0;
+
+ /* wait until OPP change completes */
+ while ((timeout < ABB_TRANXDONE_TIMEOUT ) &&
+ (!(omap2_prm_read_mod_reg(OCP_MOD,
+ OMAP3_PRM_IRQSTATUS_MPU_OFFSET) &
+ OMAP3630_ABB_LDO_TRANXDONE_ST))) {
+ udelay(1);
+ timeout++;
+ }
+
+ if (timeout == ABB_TRANXDONE_TIMEOUT)
+ pr_warning("ABB: TRANXDONE timed out waiting for OPP change\n");
+
+ timeout = 0;
+
+ /* Clear all pending TRANXDONE interrupts/status */
+ while (timeout < ABB_TRANXDONE_TIMEOUT) {
+ omap2_prm_write_mod_reg(OMAP3630_ABB_LDO_TRANXDONE_ST,
+ OCP_MOD,
+ OMAP3_PRM_IRQSTATUS_MPU_OFFSET);
+ if (!(omap2_prm_read_mod_reg(OCP_MOD,
+ OMAP3_PRM_IRQSTATUS_MPU_OFFSET)
+ & OMAP3630_ABB_LDO_TRANXDONE_ST))
+ break;
+
+ udelay(1);
+ timeout++;
+ }
+
+ if (timeout == ABB_TRANXDONE_TIMEOUT)
+ pr_warning("ABB: TRANXDONE timed out trying to clear status\n");
+
+ return 0;
+}
+
/* VP force update method of voltage scaling */
static int vp_forceupdate_scale_voltage(struct omap_vdd_info *vdd,
unsigned long target_volt)
@@ -858,6 +968,19 @@ static int vp_forceupdate_scale_voltage(struct omap_vdd_info *vdd,
vpconfig &= ~vdd->vp_reg.vpconfig_forceupdate;
vdd->write_reg(vpconfig, mod, vdd->vp_offs.vpconfig);
+ if (cpu_is_omap3630() && !strcmp(vdd->voltdm.name, "mpu")) {
+ if (vdd->curr_volt == OMAP3630_VDD_MPU_OPP1G_UV) {
+ pr_debug("%s: vdd_%s: Attempting ABB enable\n",
+ __func__, vdd->voltdm.name);
+ omap3630_abb_change_active_opp(ABB_FAST_OPP);
+ }
+ else {
+ pr_debug("%s: vdd_%s: Attempting ABB disable\n",
+ __func__, vdd->voltdm.name);
+ omap3630_abb_change_active_opp(ABB_NOMINAL_OPP);
+ }
+ }
+
return 0;
}
--
1.7.0.4
@@ -0,0 +1,29 @@
From ac7635211d2a5b133bac56fec4b6ed087f553e49 Mon Sep 17 00:00:00 2001
From: Punya Prakash <pprakash@ti.com>
Date: Thu, 30 Jun 2011 13:52:18 -0500
Subject: [PATCH] mt9t111: enable clock pad register in configuration
* fixes the issue where sensor sync pulses were not generated during first loopback after boot-up
Upstream-Status: Pending
Signed-off-by: Punya Prakash <pprakash@ti.com>
---
drivers/media/video/mt9t111.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/media/video/mt9t111.c b/drivers/media/video/mt9t111.c
index f18aa24..02c18a5 100644
--- a/drivers/media/video/mt9t111.c
+++ b/drivers/media/video/mt9t111.c
@@ -290,6 +290,9 @@ static int mt9t111_configure(struct v4l2_subdev *subdev)
if (err)
goto out;
+ // Enable Clock pad
+ err = mt9t111_write_reg(client, 0x0016, 0x0400);
+
err = mt9t111_write_regs(client, def_regs1,
sizeof(def_regs1) / sizeof(mt9t111_regs));
if (err)
--
@@ -0,0 +1,96 @@
From 33f43b37f82038e8383e76d621448a9983ed35e4 Mon Sep 17 00:00:00 2001
From: Eyal Reizer <eyalr@ti.com>
Date: Wed, 3 Aug 2011 14:48:18 +0300
Subject: [PATCH 1/6] nlcp: sdio fixes for wowlan support
Upstream status: pending
Signed-off-by: Eyal Reizer <eyalr@ti.com>
---
drivers/mmc/core/core.c | 8 ++++++--
drivers/mmc/core/sdio.c | 2 +-
drivers/mmc/host/omap_hsmmc.c | 2 ++
include/linux/mmc/host.h | 9 +++++++++
4 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 2762ad2..55bc015 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1705,7 +1705,7 @@ int mmc_suspend_host(struct mmc_host *host)
}
mmc_bus_put(host);
- if (!err && !(host->pm_flags & MMC_PM_KEEP_POWER))
+ if (!err && !mmc_card_keep_power(host))
mmc_power_off(host);
return err;
@@ -1723,7 +1723,7 @@ int mmc_resume_host(struct mmc_host *host)
mmc_bus_get(host);
if (host->bus_ops && !host->bus_dead) {
- if (!(host->pm_flags & MMC_PM_KEEP_POWER)) {
+ if (!mmc_card_keep_power(host)) {
mmc_power_up(host);
mmc_select_voltage(host, host->ocr);
/*
@@ -1748,6 +1748,10 @@ int mmc_resume_host(struct mmc_host *host)
err = 0;
}
}
+
+ /* clear flag */
+ host->pm_flags &= ~MMC_PM_KEEP_POWER;
+
mmc_bus_put(host);
return err;
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index b424fbe..4a198b2 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -616,7 +616,7 @@ static int mmc_sdio_suspend(struct mmc_host *host)
}
}
- if (!err && host->pm_flags & MMC_PM_KEEP_POWER) {
+ if (!err && mmc_card_keep_power(host) && mmc_card_wake_sdio_irq(host)) {
mmc_claim_host(host);
sdio_disable_wide(host->card);
mmc_release_host(host);
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index c75c799..b5f496d 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -2222,6 +2222,8 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev)
if (mmc_slot(host).nonremovable)
mmc->caps |= MMC_CAP_NONREMOVABLE;
+ mmc->pm_caps |= MMC_PM_KEEP_POWER;
+
omap_hsmmc_conf_bus_power(host);
res = platform_get_resource(pdev, IORESOURCE_DMA, 0);
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 86d74a5..74694c4 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -312,5 +312,14 @@ static inline int mmc_card_is_powered_resumed(struct mmc_host *host)
return host->pm_flags & MMC_PM_KEEP_POWER;
}
+static inline int mmc_card_keep_power(struct mmc_host *host)
+{
+ return host->pm_flags & MMC_PM_KEEP_POWER;
+}
+
+static inline int mmc_card_wake_sdio_irq(struct mmc_host *host)
+{
+ return host->pm_flags & MMC_PM_WAKE_SDIO_IRQ;
+}
#endif
--
1.7.0.4
@@ -0,0 +1,48 @@
From 2056c6802c5afbd722fcffc99a5cf50bbaee23c8 Mon Sep 17 00:00:00 2001
From: Tom Rini <trini@ti.com>
Date: Tue, 15 Nov 2011 17:43:31 -0700
Subject: [PATCH 1/3] omap3:am3517evm: Allow for NAND to really be disabled
On boards with both NAND and NOR and NOR being selected, NAND needs
to be disabled fully.
Signed-off-by: Tom Rini <trini@ti.com>
---
.../arch/arm/mach-omap2/board-am3517evm.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 3992b86..1d17415 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -59,6 +59,7 @@
#define NAND_BLOCK_SIZE SZ_128K
+#ifdef CONFIG_MTD_NAND_OMAP2
static struct mtd_partition am3517evm_nand_partitions[] = {
/* All the partition sizes are listed in terms of NAND block size */
{
@@ -89,6 +90,7 @@ static struct mtd_partition am3517evm_nand_partitions[] = {
.offset = MTDPART_OFS_APPEND,
},
};
+#endif
static struct mdio_platform_data am3517_evm_mdio_pdata = {
.bus_freq = AM35XX_EVM_MDIO_FREQUENCY,
@@ -926,9 +928,11 @@ static void __init am3517_evm_init(void)
/* DSS */
am3517_evm_display_init();
+#ifdef CONFIG_MTD_NAND_OMAP2
/* NAND */
board_nand_init(am3517evm_nand_partitions,
ARRAY_SIZE(am3517evm_nand_partitions), 0, NAND_BUSWIDTH_16);
+#endif
/* RTC - S35390A */
am3517_evm_rtc_init();
--
1.7.0.4
@@ -0,0 +1,147 @@
From 20a525629de613000b6f22f91f40063b0a43e7cc Mon Sep 17 00:00:00 2001
From: Eyal Reizer <eyalr@ti.com>
Date: Tue, 12 Apr 2011 22:50:51 +0300
Subject: [PATCH] omap3evm:add support for the WL12xx WLAN module
Signed-off-by: Eyal Reizer <eyalr@ti.com>
---
arch/arm/mach-omap2/board-omap3evm.c | 89 ++++++++++++++++++++++++++++++++++
1 files changed, 89 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index c8aabff..4088840 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -31,6 +31,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>
@@ -452,6 +454,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 */
};
@@ -671,6 +683,47 @@ static struct regulator_init_data omap3_evm_vio = {
.consumer_supplies = omap3_evm_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", "mmci-omap-hs.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,
@@ -876,6 +929,21 @@ static struct omap_board_mux omap35x_board_mux[] __initdata = {
OMAP_PIN_OFF_NONE),
OMAP3_MUX(MCBSP1_FSR, 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 },
};
@@ -901,6 +969,21 @@ static struct omap_board_mux omap36x_board_mux[] __initdata = {
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
@@ -976,6 +1059,12 @@ static void __init omap3_evm_init(void)
0, NAND_BUSWIDTH_16);
board_onenand_init(omap3_evm_onenand_partitions,
ARRAY_SIZE(omap3_evm_onenand_partitions), 0);
+#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")
--
1.7.0.4
@@ -0,0 +1,49 @@
From 5e7643b6e4fe8144e576f2faf9f1e07fd2a7753f Mon Sep 17 00:00:00 2001
From: Eyal Reizer <eyalr@ti.com>
Date: Wed, 3 Aug 2011 14:01:45 +0300
Subject: [PATCH 1/8] omap3evm: add wake on wlan support
Upstream status: pending
Signed-off-by: Eyal Reizer <eyalr@ti.com>
---
arch/arm/mach-omap2/board-omap3evm.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 4088840..08c074a 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -458,7 +458,8 @@ static struct omap2_hsmmc_info mmc[] = {
{
.name = "wl1271",
.mmc = 2,
- .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
+ .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD
+ | MMC_PM_KEEP_POWER ,
.gpio_wp = -EINVAL,
.gpio_cd = -EINVAL,
.nonremovable = true,
@@ -931,7 +932,8 @@ static struct omap_board_mux omap35x_board_mux[] __initdata = {
OMAP_PIN_OFF_NONE),
#ifdef CONFIG_WL12XX_PLATFORM_DATA
/* WLAN IRQ - GPIO 149 */
- OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
+ OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT |
+ OMAP_PIN_OFF_WAKEUPENABLE),
/* WLAN POWER ENABLE - GPIO 150 */
OMAP3_MUX(UART1_CTS, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
@@ -971,7 +973,8 @@ static struct omap_board_mux omap36x_board_mux[] __initdata = {
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),
+ OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT |
+ OMAP_PIN_OFF_WAKEUPENABLE),
/* WLAN POWER ENABLE - GPIO 150 */
OMAP3_MUX(UART1_CTS, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
--
1.7.0.4
@@ -0,0 +1,34 @@
From a4f14adcde615d2f6689ed9046464dad8a5465f6 Mon Sep 17 00:00:00 2001
From: Chase Maupin <Chase.Maupin@ti.com>
Date: Mon, 21 Nov 2011 07:40:40 -0600
Subject: [PATCH] omap_hsmmc: make default dto value 14
* It seems that making the dto value makes all the various SD
cards work. If not we will sometimes see -110 errors during
boot with certain SD cards.
* Based on input from Steve Kipisz
Upstream-Status: Pending
Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
---
drivers/mmc/host/omap_hsmmc.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index b5f496d..6985331 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1494,6 +1494,9 @@ static void set_data_timeout(struct omap_hsmmc_host *host,
dto = 14;
}
+ // Use 14 by default because this seems to work will with all cards
+ dto = 14;
+
reg &= ~DTO_MASK;
reg |= dto << DTO_SHIFT;
OMAP_HSMMC_WRITE(host->base, SYSCTL, reg);
--
1.7.0.4
@@ -0,0 +1,38 @@
From f0cf4495fc1d4dfb71a93eb6e315789c276221da Mon Sep 17 00:00:00 2001
From: Bin Liu <b-liu@ti.com>
Date: Wed, 30 May 2012 15:35:07 -0500
Subject: [PATCH 1/2] usb: musb: am35x: set default VBUS timeout value
The issue was:
musb->a_wait_bcon was not set so the OTG timer does not start when
a USB device gets disconnected to reset the OTG back to b_idle state.
Signed-off-by: Bin Liu <b-liu@ti.com>
---
drivers/usb/musb/am35x.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/usb/musb/am35x.c b/drivers/usb/musb/am35x.c
index 57d4417..a59a5e7 100644
--- a/drivers/usb/musb/am35x.c
+++ b/drivers/usb/musb/am35x.c
@@ -79,6 +79,8 @@
#define AM35X_TX_INTR_MASK (AM35X_TX_EP_MASK << AM35X_INTR_TX_SHIFT)
#define AM35X_RX_INTR_MASK (AM35X_RX_EP_MASK << AM35X_INTR_RX_SHIFT)
+#define A_WAIT_BCON_TIMEOUT 1100 /* in ms */
+
/* CPPI 4.1 queue manager registers */
#define QMGR_PEND0_REG 0x4090
#define QMGR_PEND1_REG 0x4094
@@ -599,6 +601,7 @@ static int am35x_musb_init(struct musb *musb)
cppi41_init(musb);
#endif
+ musb->a_wait_bcon = A_WAIT_BCON_TIMEOUT;
musb->isr = am35x_musb_interrupt;
/* clear level interrupt */
--
1.7.0.4
@@ -0,0 +1,37 @@
From bc0118889db3c48fd5760fcd8d9633373a18d8fc Mon Sep 17 00:00:00 2001
From: Eyal Reizer <eyalr@ti.com>
Date: Wed, 30 Mar 2011 15:39:26 +0200
Subject: [PATCH 153/153] allow selecting WL12XX_PLATFROM_DATA independently of whether mac80211
and wl12xx drivers are selected in the kernel.
Needed for building with compat-wireless
Signed-off-by: Eyal Reizer <eyalr@ti.com>
---
arch/arm/mach-omap2/Kconfig | 1 +
drivers/net/wireless/wl12xx/Kconfig | 1 -
2 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index c787aef..0f67445 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -37,6 +37,7 @@ config ARCH_OMAP3
select ARM_L1_CACHE_SHIFT_6 if !ARCH_OMAP4
select ARCH_HAS_OPP
select PM_OPP if PM
+ select WL12XX_PLATFORM_DATA
config ARCH_OMAP4
bool "TI OMAP4"
diff --git a/drivers/net/wireless/wl12xx/Kconfig b/drivers/net/wireless/wl12xx/Kconfig
index b447559..441aaf6 100644
--- a/drivers/net/wireless/wl12xx/Kconfig
+++ b/drivers/net/wireless/wl12xx/Kconfig
@@ -42,5 +42,4 @@ config WL1271_SDIO
config WL12XX_PLATFORM_DATA
bool
- depends on WL1271_SDIO != n
default y
--
1.7.0.4
@@ -0,0 +1,82 @@
From 3c61d0342093f4fbaeed8f063474ddfb250062fe Mon Sep 17 00:00:00 2001
From: Ohad Ben-Cohen <ohad@wizery.com>
Date: Sat, 2 Oct 2010 13:54:13 +0200
Subject: [PATCH 2/6] mmc: sdio: support suspend/resume while runtime suspended
Bring SDIO devices back to full power before their suspend
handler is invoked.
Doing so ensures that SDIO suspend/resume semantics are
maintained (drivers still get to decide whether their
card should be removed or kept during system suspend,
and at what power state), and that SDIO suspend/resume
execution paths are unchanged.
This is achieved by resuming a runtime-suspended SDIO device
in its ->prepare() PM callback (similary to the PCI subsystem).
Since the PM core always increments the run-time usage
counter before calling the ->prepare() callback and decrements
it after calling the ->complete() callback, it is guaranteed
that when the system will come out of suspend, our device's
power state will reflect its runtime PM usage counter.
Upstream status: accepted
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Tested-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Eliad Peller <eliad@wizery.com>
---
drivers/mmc/core/sdio_bus.c | 29 +++++++++++++++++++++++++++++
1 files changed, 29 insertions(+), 0 deletions(-)
diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c
index d29b9c3..aadb12d 100644
--- a/drivers/mmc/core/sdio_bus.c
+++ b/drivers/mmc/core/sdio_bus.c
@@ -197,12 +197,41 @@ out:
#ifdef CONFIG_PM_RUNTIME
+static int sdio_bus_pm_prepare(struct device *dev)
+{
+ /*
+ * Resume an SDIO device which was suspended at run time at this
+ * point, in order to allow standard SDIO suspend/resume paths
+ * to keep working as usual.
+ *
+ * Ultimately, the SDIO driver itself will decide (in its
+ * suspend handler, or lack thereof) whether the card should be
+ * removed or kept, and if kept, at what power state.
+ *
+ * At this point, PM core have increased our use count, so it's
+ * safe to directly resume the device. After system is resumed
+ * again, PM core will drop back its runtime PM use count, and if
+ * needed device will be suspended again.
+ *
+ * The end result is guaranteed to be a power state that is
+ * coherent with the device's runtime PM use count.
+ *
+ * The return value of pm_runtime_resume is deliberately unchecked
+ * since there is little point in failing system suspend if a
+ * device can't be resumed.
+ */
+ pm_runtime_resume(dev);
+
+ return 0;
+}
+
static const struct dev_pm_ops sdio_bus_pm_ops = {
SET_RUNTIME_PM_OPS(
pm_generic_runtime_suspend,
pm_generic_runtime_resume,
pm_generic_runtime_idle
)
+ .prepare = sdio_bus_pm_prepare,
};
#define SDIO_PM_OPS_PTR (&sdio_bus_pm_ops)
--
1.7.0.4
@@ -0,0 +1,58 @@
From 3cf420f85f2ccaf01e8b76a7bbdc0b7119269032 Mon Sep 17 00:00:00 2001
From: Tom Rini <trini@ti.com>
Date: Tue, 15 Nov 2011 17:44:24 -0700
Subject: [PATCH 2/3] omap3:am3517evm: Update NOR partition table
With newer U-Boot we use a different partition table on NOR
Signed-off-by: Tom Rini <trini@ti.com>
---
.../arch/arm/mach-omap2/board-am3517evm.c | 19 ++++++-------------
1 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 1d17415..e559f33 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -758,32 +758,25 @@ static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
/* NOR flash information */
static struct mtd_partition am3517_evm_norflash_partitions[] = {
- /* primiary bootloader (X-loader) in first 4 sectors(32K) */
- {
- .name = "X-Loader-NOR",
- .offset = 0,
- .size = 4 * SZ_32K,
- .mask_flags = MTD_WRITEABLE, /* force read-only */
- },
- /* secondary bootloader (U-Boot, etc) in first 5 sectors(128K) */
+ /* Bootloader (U-Boot) in first 512K */
{
.name = "U-Boot-NOR",
- .offset = MTDPART_OFS_APPEND,
- .size = 5 * SZ_128K,
+ .offset = 0,
+ .size = 4 * SZ_128K,
.mask_flags = MTD_WRITEABLE, /* force read-only */
},
- /* bootloader params in the next 2 sectors */
+ /* bootloader params in the next sector */
{
.name = "Boot Env-NOR",
.offset = MTDPART_OFS_APPEND,
- .size = 2 * SZ_128K,
+ .size = SZ_128K,
.mask_flags = 0,
},
/* kernel */
{
.name = "Kernel-NOR",
.offset = MTDPART_OFS_APPEND,
- .size = 32 * SZ_128K,
+ .size = 27 * SZ_128K,
.mask_flags = 0
},
/* file system */
--
1.7.0.4
@@ -0,0 +1,67 @@
From 96fa47d92d10382f4e0d9b6e3ab2c627e4671716 Mon Sep 17 00:00:00 2001
From: Bin Liu <b-liu@ti.com>
Date: Wed, 30 May 2012 18:28:07 -0500
Subject: [PATCH 2/2] usb: musb: am35x: fix role switching issue
Fixing the role switching issue seen when followed steps below:
a) Configure port in OTG mode
b) Connect MSC device through micro-A-plug to std-A-receptacle
c) MSC enumerated and works fine
d) Disconnect MSC device and let cable be connected to port
e) Now disconnect cable also
f) Connect port to host PC using micro-B plug to std-A plug
e) PC doesn't recognise the gadget driver
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Bin Liu <b-liu@ti.com>
---
drivers/usb/musb/am35x.c | 25 ++++++++++++++++++++-----
1 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/musb/am35x.c b/drivers/usb/musb/am35x.c
index a59a5e7..d32fb77 100644
--- a/drivers/usb/musb/am35x.c
+++ b/drivers/usb/musb/am35x.c
@@ -368,6 +368,13 @@ static void otg_timer(unsigned long _musb)
devctl = musb_readb(mregs, MUSB_DEVCTL);
if (devctl & MUSB_DEVCTL_BDEVICE)
mod_timer(&otg_workaround, jiffies + POLL_SECONDS * HZ);
+ else if ((devctl & MUSB_DEVCTL_SESSION) &&
+ !(devctl & MUSB_DEVCTL_BDEVICE)) {
+ mod_timer(&otg_workaround,
+ jiffies + POLL_SECONDS * HZ);
+ musb_writeb(musb->mregs, MUSB_DEVCTL, devctl &
+ ~MUSB_DEVCTL_SESSION);
+ }
else
musb->xceiv->state = OTG_STATE_A_IDLE;
break;
@@ -502,11 +509,19 @@ static irqreturn_t am35x_musb_interrupt(int irq, void *hci)
mod_timer(&otg_workaround, jiffies + POLL_SECONDS * HZ);
WARNING("VBUS error workaround (delay coming)\n");
} else if (is_host_enabled(musb) && drvvbus) {
- MUSB_HST_MODE(musb);
- musb->xceiv->default_a = 1;
- musb->xceiv->state = OTG_STATE_A_WAIT_VRISE;
- portstate(musb->port1_status |= USB_PORT_STAT_POWER);
- del_timer(&otg_workaround);
+ if (!(devctl & MUSB_DEVCTL_SESSION) ||
+ (devctl & MUSB_DEVCTL_BDEVICE) ||
+ (devctl & MUSB_DEVCTL_HM)) {
+ if (musb->is_active)
+ del_timer(&otg_workaround);
+ else
+ musb->is_active = 1;
+
+ MUSB_HST_MODE(musb);
+ musb->xceiv->default_a = 1;
+ musb->xceiv->state = OTG_STATE_A_WAIT_VRISE;
+ portstate(musb->port1_status |= USB_PORT_STAT_POWER);
+ }
} else {
musb->is_active = 0;
MUSB_DEV_MODE(musb);
--
1.7.0.4
@@ -0,0 +1,256 @@
From 0fa5a9c5cf331d5df578797e778f18de223e02aa Mon Sep 17 00:00:00 2001
From: Tom Rini <trini@ti.com>
Date: Wed, 16 Nov 2011 09:02:23 -0700
Subject: [PATCH 3/3] AM3517: Add am3517_evn_nor_defconfig
When building for NOR, we need to disable NAND. Provide a config
that does so.
Signed-off-by: Tom Rini <trini@ti.com>
---
arch/arm/configs/am3517_evm_nor_defconfig | 233 ++++++++++++++++++++
1 files changed, 233 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/configs/am3517_evm_nor_defconfig
diff --git a/arch/arm/configs/am3517_evm_nor_defconfig b/arch/arm/configs/am3517_evm_nor_defconfig
new file mode 100644
index 0000000..70bd7dd
--- /dev/null
+++ b/arch/arm/configs/am3517_evm_nor_defconfig
@@ -0,0 +1,233 @@
+CONFIG_EXPERIMENTAL=y
+CONFIG_SYSVIPC=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_EMBEDDED=y
+# CONFIG_SYSCTL_SYSCALL is not set
+CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_SLAB=y
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=y
+CONFIG_KPROBES=y
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+# CONFIG_BLK_DEV_BSG is not set
+CONFIG_ARCH_OMAP=y
+CONFIG_OMAP_RESET_CLOCKS=y
+CONFIG_OMAP_MUX_DEBUG=y
+# CONFIG_ARCH_OMAP2 is not set
+# CONFIG_ARCH_OMAP4 is not set
+# CONFIG_MACH_OMAP3_BEAGLE is not set
+# CONFIG_MACH_DEVKIT8000 is not set
+# CONFIG_MACH_OMAP_LDP is not set
+# CONFIG_MACH_OMAP3530_LV_SOM is not set
+# CONFIG_MACH_OMAP3_TORPEDO is not set
+# CONFIG_MACH_OVERO is not set
+# CONFIG_MACH_OMAP3EVM is not set
+# CONFIG_MACH_OMAP3_PANDORA is not set
+# CONFIG_MACH_OMAP3_TOUCHBOOK is not set
+# CONFIG_MACH_OMAP_3430SDP is not set
+# CONFIG_MACH_NOKIA_RM680 is not set
+# CONFIG_MACH_NOKIA_RX51 is not set
+# CONFIG_MACH_OMAP_ZOOM2 is not set
+# CONFIG_MACH_OMAP_ZOOM3 is not set
+# CONFIG_MACH_CM_T35 is not set
+# CONFIG_MACH_CM_T3517 is not set
+# CONFIG_MACH_IGEP0020 is not set
+# CONFIG_MACH_IGEP0030 is not set
+# CONFIG_MACH_SBC3530 is not set
+# CONFIG_MACH_OMAP_3630SDP is not set
+CONFIG_ARM_THUMBEE=y
+CONFIG_ARM_ERRATA_430973=y
+CONFIG_ARM_ERRATA_458693=y
+CONFIG_ARM_ERRATA_460075=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="root=/dev/mmcblk0p2 rootwait console=ttyO2,115200"
+CONFIG_KEXEC=y
+CONFIG_FPE_NWFPE=y
+CONFIG_BINFMT_MISC=y
+CONFIG_PM_DEBUG=y
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_XFRM_USER=y
+CONFIG_NET_KEY=y
+CONFIG_NET_KEY_MIGRATE=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+# CONFIG_INET_LRO is not set
+# CONFIG_IPV6 is not set
+CONFIG_CAN=y
+CONFIG_CAN_RAW=y
+CONFIG_CAN_BCM=y
+CONFIG_CAN_VCAN=y
+CONFIG_CAN_DEV=y
+CONFIG_CAN_CALC_BITTIMING=y
+CONFIG_CAN_TI_HECC=y
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_MTD=y
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLOCK=y
+CONFIG_MTD_OOPS=y
+CONFIG_MTD_CFI=y
+CONFIG_MTD_CFI_INTELEXT=y
+CONFIG_MTD_CFI_AMDSTD=y
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_BLOCK2MTD=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=32768
+CONFIG_SCSI=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_SCSI_MULTI_LUN=y
+CONFIG_SCSI_SCAN_ASYNC=y
+CONFIG_MD=y
+CONFIG_NETDEVICES=y
+CONFIG_SMSC_PHY=y
+CONFIG_NET_ETHERNET=y
+CONFIG_SMSC911X=y
+CONFIG_TI_DAVINCI_EMAC=y
+CONFIG_USB_USBNET=y
+# CONFIG_USB_NET_AX8817X is not set
+CONFIG_USB_NET_DM9601=y
+# CONFIG_USB_NET_NET1080 is not set
+# CONFIG_USB_NET_CDC_SUBSET is not set
+# CONFIG_USB_NET_ZAURUS is not set
+CONFIG_INPUT_JOYDEV=y
+CONFIG_INPUT_EVDEV=y
+CONFIG_KEYBOARD_TCA6416=y
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_TSC2004=y
+CONFIG_INPUT_MISC=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=32
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_MANY_PORTS=y
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+CONFIG_SERIAL_8250_DETECT_IRQ=y
+CONFIG_SERIAL_8250_RSA=y
+# CONFIG_LEGACY_PTYS is not set
+CONFIG_HW_RANDOM=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_SPI=y
+CONFIG_SPI_OMAP24XX=y
+CONFIG_DEBUG_GPIO=y
+CONFIG_GPIO_SYSFS=y
+CONFIG_GPIO_PCA953X=y
+CONFIG_POWER_SUPPLY=y
+CONFIG_WATCHDOG=y
+CONFIG_WATCHDOG_NOWAYOUT=y
+CONFIG_OMAP_WATCHDOG=y
+CONFIG_REGULATOR_DUMMY=y
+CONFIG_REGULATOR_TPS65023=y
+CONFIG_MEDIA_SUPPORT=y
+CONFIG_VIDEO_DEV=y
+# CONFIG_IR_CORE is not set
+# CONFIG_MEDIA_TUNER_CUSTOMISE is not set
+CONFIG_VIDEO_TVP514X=y
+CONFIG_VIDEO_VPFE_CAPTURE=y
+CONFIG_VIDEO_OMAP2_VOUT=y
+CONFIG_USB_VIDEO_CLASS=y
+# CONFIG_RADIO_ADAPTERS is not set
+CONFIG_FB=y
+CONFIG_FIRMWARE_EDID=y
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_FB_TILEBLITTING=y
+CONFIG_OMAP2_VRAM_SIZE=4
+CONFIG_OMAP2_DSS_DSI=y
+CONFIG_OMAP2_DSS_USE_DSI_PLL=y
+CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=1
+CONFIG_FB_OMAP2=y
+CONFIG_FB_OMAP2_NUM_FBS=1
+CONFIG_PANEL_GENERIC=y
+CONFIG_PANEL_SHARP_LQ043T1DG01=y
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_LCD_PLATFORM=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_GENERIC=m
+CONFIG_DISPLAY_SUPPORT=y
+CONFIG_LOGO=y
+CONFIG_SOUND=y
+CONFIG_SND=y
+CONFIG_SND_USB_AUDIO=y
+CONFIG_SND_SOC=y
+CONFIG_SND_OMAP_SOC=y
+CONFIG_SND_OMAP_SOC_AM3517EVM=y
+CONFIG_USB=y
+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_SUSPEND=y
+# CONFIG_USB_OTG_WHITELIST is not set
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_MUSB_HDRC=y
+CONFIG_USB_MUSB_AM35X_GLUE=y
+CONFIG_USB_MUSB_OTG=y
+CONFIG_USB_GADGET_MUSB_HDRC=y
+CONFIG_USB_MUSB_DEBUG=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_TEST=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_ETH=y
+CONFIG_NOP_USB_XCEIV=y
+CONFIG_MMC=y
+CONFIG_SDIO_UART=y
+CONFIG_MMC_OMAP=y
+CONFIG_MMC_OMAP_HS=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_S35390A=y
+CONFIG_EXT2_FS=y
+CONFIG_EXT3_FS=y
+# CONFIG_EXT3_FS_XATTR is not set
+CONFIG_QUOTA=y
+CONFIG_QFMT_V2=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_TMPFS=y
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_SUMMARY=y
+CONFIG_JFFS2_FS_XATTR=y
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_RUBIN=y
+CONFIG_CRAMFS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+CONFIG_NFS_V3_ACL=y
+CONFIG_NFS_V4=y
+CONFIG_ROOT_NFS=y
+CONFIG_PARTITION_ADVANCED=y
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_ISO8859_1=y
+CONFIG_PRINTK_TIME=y
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_KERNEL=y
+CONFIG_SCHEDSTATS=y
+CONFIG_TIMER_STATS=y
+CONFIG_PROVE_LOCKING=y
+CONFIG_LOCK_STAT=y
+CONFIG_DEBUG_SPINLOCK_SLEEP=y
+CONFIG_DEBUG_INFO=y
+CONFIG_DEBUG_LL=y
+CONFIG_SECURITY=y
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+CONFIG_CRC_CCITT=y
+CONFIG_LIBCRC32C=y
--
1.7.0.4
@@ -0,0 +1,43 @@
From 3627429b1a0cbe9380a9834fb91419fcb81be2ef Mon Sep 17 00:00:00 2001
From: Ohad Ben-Cohen <ohad@wizery.com>
Date: Sun, 28 Nov 2010 07:21:28 +0200
Subject: [PATCH 1/6] mmc: skip detection of nonremovable cards on rescan
mmc_rescan() checks whether registered cards are still present before
skipping them, by calling the bus-specific ->detect() handler.
With buses that support runtime PM, the card may be powered off at
this point, so they need to be powered on and fully reinitialized before
->detect() executes.
This whole process is redundant with nonremovable cards; in those cases,
we can safely skip calling ->detect() and implicitly assume its success.
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Reviewed-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
---
drivers/mmc/core/core.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 57dcf8f..305e2a5 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1446,8 +1446,12 @@ void mmc_rescan(struct work_struct *work)
mmc_bus_get(host);
- /* if there is a card registered, check whether it is still present */
- if ((host->bus_ops != NULL) && host->bus_ops->detect && !host->bus_dead)
+ /*
+ * if there is a _removable_ card registered, check whether it is
+ * still present
+ */
+ if (host->bus_ops && host->bus_ops->detect && !host->bus_dead
+ && mmc_card_is_removable(host))
host->bus_ops->detect(host);
mmc_bus_put(host);
--
1.7.1
@@ -0,0 +1,69 @@
From 92093bb141b85f6f7396a0efd79d9f93c264baa3 Mon Sep 17 00:00:00 2001
From: Eyal Reizer <eyalr@ti.com>
Date: Wed, 3 Aug 2011 15:03:46 +0300
Subject: [PATCH 3/6] mmc_card_keep_power cleanups
mmc_card_is_powered_resumed is a mouthful; instead, simply use
mmc_card_keep_power, which also better explains the purpose of
the macro.
Employ mmc_card_keep_power() where possible.
Upstream status: accepted
Based on Ohad Ben-Cohen <ohad@wizery.com> original patch.
Signed-off-by: Eyal Reizer <eyalr@ti.com>
---
drivers/mmc/core/sdio.c | 14 +++++++-------
include/linux/mmc/host.h | 2 +-
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index 4a198b2..e43ff56 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -635,12 +635,12 @@ static int mmc_sdio_resume(struct mmc_host *host)
/* Basic card reinitialization. */
mmc_claim_host(host);
- /* No need to reinitialize powered-resumed nonremovable cards */
- if (mmc_card_is_removable(host) || !mmc_card_is_powered_resumed(host))
- err = mmc_sdio_init_card(host, host->ocr, host->card,
- (host->pm_flags & MMC_PM_KEEP_POWER));
- else if (mmc_card_is_powered_resumed(host)) {
- /* We may have switched to 1-bit mode during suspend */
+ /* No need to reinitialize powered-resumed nonremovable cards */
+ if (mmc_card_is_removable(host) || !mmc_card_keep_power(host))
+ err = mmc_sdio_init_card(host, host->ocr, host->card,
+ mmc_card_keep_power(host));
+ else if (mmc_card_keep_power(host)) {
+ /* We may have switched to 1-bit mode during suspend */
err = sdio_enable_4bit_bus(host->card);
if (err > 0) {
mmc_set_bus_width(host, MMC_BUS_WIDTH_4);
@@ -682,7 +682,7 @@ static int mmc_sdio_power_restore(struct mmc_host *host)
mmc_claim_host(host);
ret = mmc_sdio_init_card(host, host->ocr, host->card,
- (host->pm_flags & MMC_PM_KEEP_POWER));
+ mmc_card_keep_power(host));
if (!ret && host->sdio_irqs)
mmc_signal_sdio_irq(host);
mmc_release_host(host);
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 74694c4..db2548f 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -307,7 +307,7 @@ static inline int mmc_card_is_removable(struct mmc_host *host)
return !(host->caps & MMC_CAP_NONREMOVABLE) && mmc_assume_removable;
}
-static inline int mmc_card_is_powered_resumed(struct mmc_host *host)
+static inline int mmc_card_keep_power(struct mmc_host *host)
{
return host->pm_flags & MMC_PM_KEEP_POWER;
}
--
1.7.0.4
@@ -0,0 +1,283 @@
From c49824d3d41982eb6d655f5cc4cc4c7e20d511c4 Mon Sep 17 00:00:00 2001
From: Chase Maupin <Chase.Maupin@ti.com>
Date: Mon, 27 Jun 2011 14:06:58 -0500
Subject: [PATCH 3/3] omap3_evm_defconfig: add WLAN config options
* Added the WLAN config options to be base default configuration.
Upstream-Status: Inappropriate [SDK specific changes]
Signed-off-by: Chase Maupin <Chase.Maupin@ti.com>
---
arch/arm/configs/omap3_evm_defconfig | 167 +++++++++++++++++++++++++++++++--
1 files changed, 156 insertions(+), 11 deletions(-)
diff --git a/arch/arm/configs/omap3_evm_defconfig b/arch/arm/configs/omap3_evm_defconfig
index 6b9c736..5d44b2d 100644
--- a/arch/arm/configs/omap3_evm_defconfig
+++ b/arch/arm/configs/omap3_evm_defconfig
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux/arm 2.6.37 Kernel Configuration
-# Mon Jun 27 13:40:14 2011
+# Tue Jun 28 07:29:21 2011
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -515,7 +515,123 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
# CONFIG_NETLABEL is not set
# CONFIG_NETWORK_SECMARK is not set
# CONFIG_NETWORK_PHY_TIMESTAMPING is not set
-# CONFIG_NETFILTER is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+CONFIG_NETFILTER_ADVANCED=y
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK_QUEUE is not set
+# CONFIG_NETFILTER_NETLINK_LOG is not set
+CONFIG_NF_CONNTRACK=y
+# CONFIG_NF_CONNTRACK_MARK is not set
+# CONFIG_NF_CONNTRACK_EVENTS is not set
+# CONFIG_NF_CT_PROTO_DCCP is not set
+# CONFIG_NF_CT_PROTO_SCTP is not set
+# CONFIG_NF_CT_PROTO_UDPLITE is not set
+# CONFIG_NF_CONNTRACK_AMANDA is not set
+# CONFIG_NF_CONNTRACK_FTP is not set
+# CONFIG_NF_CONNTRACK_H323 is not set
+# CONFIG_NF_CONNTRACK_IRC is not set
+# CONFIG_NF_CONNTRACK_NETBIOS_NS is not set
+# CONFIG_NF_CONNTRACK_PPTP is not set
+# CONFIG_NF_CONNTRACK_SANE is not set
+# CONFIG_NF_CONNTRACK_SIP is not set
+# CONFIG_NF_CONNTRACK_TFTP is not set
+# CONFIG_NF_CT_NETLINK is not set
+CONFIG_NETFILTER_XTABLES=y
+
+#
+# Xtables combined modules
+#
+# CONFIG_NETFILTER_XT_MARK is not set
+# CONFIG_NETFILTER_XT_CONNMARK is not set
+
+#
+# Xtables targets
+#
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set
+# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set
+# CONFIG_NETFILTER_XT_TARGET_MARK is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set
+# CONFIG_NETFILTER_XT_TARGET_TEE is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+
+#
+# Xtables matches
+#
+# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set
+# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set
+# CONFIG_NETFILTER_XT_MATCH_CONNMARK is not set
+# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set
+# CONFIG_NETFILTER_XT_MATCH_CPU is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+# CONFIG_NETFILTER_XT_MATCH_HELPER is not set
+# CONFIG_NETFILTER_XT_MATCH_HL is not set
+# CONFIG_NETFILTER_XT_MATCH_IPRANGE is not set
+# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
+# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
+# CONFIG_NETFILTER_XT_MATCH_MAC is not set
+# CONFIG_NETFILTER_XT_MATCH_MARK is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_OWNER is not set
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_RECENT is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATE is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_TIME is not set
+# CONFIG_NETFILTER_XT_MATCH_U32 is not set
+# CONFIG_IP_VS is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_NF_DEFRAG_IPV4=y
+CONFIG_NF_CONNTRACK_IPV4=y
+CONFIG_NF_CONNTRACK_PROC_COMPAT=y
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=y
+# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
+# CONFIG_IP_NF_MATCH_AH is not set
+# CONFIG_IP_NF_MATCH_ECN is not set
+# CONFIG_IP_NF_MATCH_TTL is not set
+CONFIG_IP_NF_FILTER=y
+# CONFIG_IP_NF_TARGET_REJECT is not set
+CONFIG_IP_NF_TARGET_LOG=y
+# CONFIG_IP_NF_TARGET_ULOG is not set
+CONFIG_NF_NAT=y
+CONFIG_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=y
+# CONFIG_IP_NF_TARGET_NETMAP is not set
+# CONFIG_IP_NF_TARGET_REDIRECT is not set
+# CONFIG_NF_NAT_SNMP_BASIC is not set
+# CONFIG_NF_NAT_FTP is not set
+# CONFIG_NF_NAT_IRC is not set
+# CONFIG_NF_NAT_TFTP is not set
+# CONFIG_NF_NAT_AMANDA is not set
+# CONFIG_NF_NAT_PPTP is not set
+# CONFIG_NF_NAT_H323 is not set
+# CONFIG_NF_NAT_SIP is not set
+# CONFIG_IP_NF_MANGLE is not set
+# CONFIG_IP_NF_RAW is not set
+# CONFIG_IP_NF_SECURITY is not set
+# CONFIG_IP_NF_ARPTABLES is not set
# CONFIG_IP_DCCP is not set
# CONFIG_IP_SCTP is not set
# CONFIG_RDS is not set
@@ -548,7 +664,31 @@ CONFIG_DNS_RESOLVER=y
# CONFIG_HAMRADIO is not set
# CONFIG_CAN is not set
# CONFIG_IRDA is not set
-# CONFIG_BT is not set
+CONFIG_BT=y
+CONFIG_BT_L2CAP=y
+CONFIG_BT_SCO=y
+CONFIG_BT_RFCOMM=y
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=y
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=y
+
+#
+# Bluetooth device drivers
+#
+# CONFIG_BT_HCIBTUSB is not set
+# CONFIG_BT_HCIBTSDIO is not set
+CONFIG_BT_HCIUART=y
+CONFIG_BT_HCIUART_H4=y
+# CONFIG_BT_HCIUART_BCSP is not set
+# CONFIG_BT_HCIUART_ATH3K is not set
+CONFIG_BT_HCIUART_LL=y
+# CONFIG_BT_HCIBCM203X is not set
+# CONFIG_BT_HCIBPA10X is not set
+# CONFIG_BT_HCIBFUSB is not set
+# CONFIG_BT_HCIVHCI is not set
+# CONFIG_BT_MRVL is not set
# CONFIG_AF_RXRPC is not set
CONFIG_WIRELESS=y
CONFIG_WIRELESS_EXT=y
@@ -566,7 +706,8 @@ CONFIG_WIRELESS_EXT_SYSFS=y
# Some wireless drivers require a rate control algorithm
#
# CONFIG_WIMAX is not set
-# CONFIG_RFKILL is not set
+CONFIG_RFKILL=y
+# CONFIG_RFKILL_INPUT is not set
# CONFIG_NET_9P is not set
# CONFIG_CAIF is not set
# CONFIG_CEPH_LIB is not set
@@ -851,6 +992,7 @@ CONFIG_USB_EPSON2888=y
CONFIG_USB_KC2190=y
CONFIG_USB_NET_ZAURUS=y
# CONFIG_USB_NET_CX82310_ETH is not set
+# CONFIG_USB_HSO is not set
# CONFIG_USB_NET_INT51X1 is not set
# CONFIG_USB_IPHETH is not set
# CONFIG_USB_SIERRA_NET is not set
@@ -1278,7 +1420,7 @@ CONFIG_TWL4030_CODEC=y
CONFIG_REGULATOR=y
# CONFIG_REGULATOR_DEBUG is not set
CONFIG_REGULATOR_DUMMY=y
-# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
# CONFIG_REGULATOR_BQ24022 is not set
@@ -1643,6 +1785,7 @@ CONFIG_USB_HID=y
# CONFIG_HID_CYPRESS is not set
# CONFIG_HID_DRAGONRISE is not set
# CONFIG_HID_EGALAX is not set
+# CONFIG_HID_ELECOM is not set
# CONFIG_HID_EZKEY is not set
# CONFIG_HID_KYE is not set
# CONFIG_HID_UCLOGIC is not set
@@ -1651,6 +1794,7 @@ CONFIG_USB_HID=y
# CONFIG_HID_TWINHAN is not set
# CONFIG_HID_KENSINGTON is not set
# CONFIG_HID_LOGITECH is not set
+# CONFIG_HID_MAGICMOUSE is not set
# CONFIG_HID_MICROSOFT is not set
# CONFIG_HID_MOSART is not set
# CONFIG_HID_MONTEREY is not set
@@ -1671,6 +1815,7 @@ CONFIG_USB_HID=y
# CONFIG_HID_SMARTJOYPLUS is not set
# CONFIG_HID_TOPSEED is not set
# CONFIG_HID_THRUSTMASTER is not set
+# CONFIG_HID_WACOM is not set
# CONFIG_HID_ZEROPLUS is not set
# CONFIG_HID_ZYDACRON is not set
CONFIG_USB_SUPPORT=y
@@ -2286,7 +2431,7 @@ CONFIG_CRYPTO_WORKQUEUE=y
CONFIG_CRYPTO_CBC=y
# CONFIG_CRYPTO_CTR is not set
# CONFIG_CRYPTO_CTS is not set
-# CONFIG_CRYPTO_ECB is not set
+CONFIG_CRYPTO_ECB=y
# CONFIG_CRYPTO_LRW is not set
# CONFIG_CRYPTO_PCBC is not set
# CONFIG_CRYPTO_XTS is not set
@@ -2305,7 +2450,7 @@ CONFIG_CRYPTO_CRC32C=y
# CONFIG_CRYPTO_GHASH is not set
# CONFIG_CRYPTO_MD4 is not set
CONFIG_CRYPTO_MD5=y
-# CONFIG_CRYPTO_MICHAEL_MIC is not set
+CONFIG_CRYPTO_MICHAEL_MIC=y
# CONFIG_CRYPTO_RMD128 is not set
# CONFIG_CRYPTO_RMD160 is not set
# CONFIG_CRYPTO_RMD256 is not set
@@ -2319,9 +2464,9 @@ CONFIG_CRYPTO_MD5=y
#
# Ciphers
#
-# CONFIG_CRYPTO_AES is not set
+CONFIG_CRYPTO_AES=y
# CONFIG_CRYPTO_ANUBIS is not set
-# CONFIG_CRYPTO_ARC4 is not set
+CONFIG_CRYPTO_ARC4=y
# CONFIG_CRYPTO_BLOWFISH is not set
# CONFIG_CRYPTO_CAMELLIA is not set
# CONFIG_CRYPTO_CAST5 is not set
@@ -2367,11 +2512,11 @@ CONFIG_BINARY_PRINTF=y
CONFIG_BITREVERSE=y
CONFIG_GENERIC_FIND_LAST_BIT=y
CONFIG_CRC_CCITT=y
-# CONFIG_CRC16 is not set
+CONFIG_CRC16=y
# CONFIG_CRC_T10DIF is not set
# CONFIG_CRC_ITU_T is not set
CONFIG_CRC32=y
-# CONFIG_CRC7 is not set
+CONFIG_CRC7=y
CONFIG_LIBCRC32C=y
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y
--
1.7.0.4
@@ -0,0 +1,43 @@
From fbd81cb717ed6a875abd1f09e32e8f803a066a91 Mon Sep 17 00:00:00 2001
From: Eyal Reizer <eyalr@ti.com>
Date: Wed, 3 Aug 2011 15:10:30 +0300
Subject: [PATCH 4/6] mmc: do not switch to 1-bit mode if not required
6b5eda36 followed SDIO spec part E1 section 8, which states that
in case SDIO interrupts are being used to wake up a suspended host,
then it is required to switch to 1-bit mode before stopping the clock.
Before switching to 1-bit mode (or back to 4-bit mode on resume),
make sure that SDIO interrupts are really being used to wake the host.
This is helpful for devices which have an external irq line (e.g.
wl1271), and do not use SDIO interrupts to wake up the host.
In this case, switching to 1-bit mode (and back to 4-bit mode on resume)
is not necessary.
Upstream status: accepted
Based on patch made by Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Eyal Reizer <eyalr@ti.com>
---
drivers/mmc/core/sdio.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index e43ff56..2eeeaa2 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -639,7 +639,7 @@ static int mmc_sdio_resume(struct mmc_host *host)
if (mmc_card_is_removable(host) || !mmc_card_keep_power(host))
err = mmc_sdio_init_card(host, host->ocr, host->card,
mmc_card_keep_power(host));
- else if (mmc_card_keep_power(host)) {
+ else if (mmc_card_keep_power(host) && mmc_card_wake_sdio_irq(host)) {
/* We may have switched to 1-bit mode during suspend */
err = sdio_enable_4bit_bus(host->card);
if (err > 0) {
--
1.7.0.4
@@ -0,0 +1,77 @@
From 756d4919d44948a7a7d2860db75077c753a75039 Mon Sep 17 00:00:00 2001
From: Ohad Ben-Cohen <ohad@wizery.com>
Date: Sun, 28 Nov 2010 07:21:29 +0200
Subject: [PATCH 2/6] mmc: sdio: don't reinitialize nonremovable powered-resumed cards
Upon system resume, SDIO core must reinitialize cards that were
powered off during suspend.
If the card had its power kept during suspend (and thus it is
'powered-resumed'), SDIO core performs only a limited reinitializing,
mainly needed to make sure that the card wasn't removed/replaced.
If a __nonremovable__ card is powered-resumed, we can safely skip the
reinitializing phase.
Note: 9b966aa (mmc: sdio: fully reconfigure oldcard on resume) removed
the bus width reconfiguration since mmc_sdio_init_card already does it.
It is brought back now in case mmc_sdio_init_card is skipped.
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
---
drivers/mmc/core/sdio.c | 16 ++++++++++++++--
include/linux/mmc/host.h | 5 +++++
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index efef5f9..b424fbe 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -627,15 +627,27 @@ static int mmc_sdio_suspend(struct mmc_host *host)
static int mmc_sdio_resume(struct mmc_host *host)
{
- int i, err;
+ int i, err = 0;
BUG_ON(!host);
BUG_ON(!host->card);
/* Basic card reinitialization. */
mmc_claim_host(host);
- err = mmc_sdio_init_card(host, host->ocr, host->card,
+
+ /* No need to reinitialize powered-resumed nonremovable cards */
+ if (mmc_card_is_removable(host) || !mmc_card_is_powered_resumed(host))
+ err = mmc_sdio_init_card(host, host->ocr, host->card,
(host->pm_flags & MMC_PM_KEEP_POWER));
+ else if (mmc_card_is_powered_resumed(host)) {
+ /* We may have switched to 1-bit mode during suspend */
+ err = sdio_enable_4bit_bus(host->card);
+ if (err > 0) {
+ mmc_set_bus_width(host, MMC_BUS_WIDTH_4);
+ err = 0;
+ }
+ }
+
if (!err && host->sdio_irqs)
mmc_signal_sdio_irq(host);
mmc_release_host(host);
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 30f6fad..86d74a5 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -307,5 +307,10 @@ static inline int mmc_card_is_removable(struct mmc_host *host)
return !(host->caps & MMC_CAP_NONREMOVABLE) && mmc_assume_removable;
}
+static inline int mmc_card_is_powered_resumed(struct mmc_host *host)
+{
+ return host->pm_flags & MMC_PM_KEEP_POWER;
+}
+
#endif
--
1.7.1
@@ -0,0 +1,41 @@
From 6dc280ffc189b8d534e7e9ff758b12f31a8d3234 Mon Sep 17 00:00:00 2001
From: Linus Walleij <linus.walleij@stericsson.com>
Date: Wed, 5 Jan 2011 00:44:32 +0100
Subject: [PATCH 5/6] mmc: fix division by zero in MMC core
The card is not always clocked and the clock frequency zero is perfectly
legal, thus this code in mmc_set_data_timeout() may cause a division by
zero. It will be triggered more often if you're using software clock
gating but can be triggered under other conditions too.
Upstream status: accepted
Reported-by: Pierre Tardy <tardyp@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Reviewed-by: Chris Ball <cjb@laptop.org>
Cc: <stable@kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Eliad Peller <eliad@wizery.com>
---
drivers/mmc/core/core.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 55bc015..6448c6b 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -296,8 +296,9 @@ void mmc_set_data_timeout(struct mmc_data *data, const struct mmc_card *card)
unsigned int timeout_us, limit_us;
timeout_us = data->timeout_ns / 1000;
- timeout_us += data->timeout_clks * 1000 /
- (card->host->ios.clock / 1000);
+ if (card->host->ios.clock)
+ timeout_us += data->timeout_clks * 1000 /
+ (card->host->ios.clock / 1000);
if (data->flags & MMC_DATA_WRITE)
/*
--
1.7.0.4
@@ -0,0 +1,112 @@
From 3d72f4e09138025931b1e0cb2ef921478f7d6d11 Mon Sep 17 00:00:00 2001
From: Ohad Ben-Cohen <ohad@wizery.com>
Date: Sun, 28 Nov 2010 07:21:30 +0200
Subject: [PATCH 3/6] mmc: sdio: don't power up cards on system suspend
Initial SDIO runtime PM implementation took a conservative approach
of powering up cards (and fully reinitializing them) on system suspend,
just before the suspend handlers of the relevant drivers were executed.
To avoid redundant power and reinitialization cycles, this patch removes
this behavior: if a card is already powered off when system suspend kicks
in, it is left at that state.
If a card is active when a system sleep starts, everything is
straightforward and works exactly like before. But if the card was
already suspended before the sleep began, then when the MMC core powers
it back up on resume, its run-time PM status has to be updated to reflect
the actual post-system sleep status.
The technique to do that is borrowed from the I2C runtime PM
implementation (for more info see Documentation/power/runtime_pm.txt).
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Reviewed-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
---
drivers/mmc/core/core.c | 13 +++++++++++++
drivers/mmc/core/sdio_bus.c | 32 --------------------------------
2 files changed, 13 insertions(+), 32 deletions(-)
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 305e2a5..2762ad2 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -22,6 +22,7 @@
#include <linux/scatterlist.h>
#include <linux/log2.h>
#include <linux/regulator/consumer.h>
+#include <linux/pm_runtime.h>
#include <linux/mmc/card.h>
#include <linux/mmc/host.h>
@@ -1725,6 +1726,18 @@ int mmc_resume_host(struct mmc_host *host)
if (!(host->pm_flags & MMC_PM_KEEP_POWER)) {
mmc_power_up(host);
mmc_select_voltage(host, host->ocr);
+ /*
+ * Tell runtime PM core we just powered up the card,
+ * since it still believes the card is powered off.
+ * Note that currently runtime PM is only enabled
+ * for SDIO cards that are MMC_CAP_POWER_OFF_CARD
+ */
+ if (mmc_card_sdio(host->card) &&
+ (host->caps & MMC_CAP_POWER_OFF_CARD)) {
+ pm_runtime_disable(&host->card->dev);
+ pm_runtime_set_active(&host->card->dev);
+ pm_runtime_enable(&host->card->dev);
+ }
}
BUG_ON(!host->bus_ops->resume);
err = host->bus_ops->resume(host);
diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c
index 203da44..d29b9c3 100644
--- a/drivers/mmc/core/sdio_bus.c
+++ b/drivers/mmc/core/sdio_bus.c
@@ -197,44 +197,12 @@ out:
#ifdef CONFIG_PM_RUNTIME
-static int sdio_bus_pm_prepare(struct device *dev)
-{
- struct sdio_func *func = dev_to_sdio_func(dev);
-
- /*
- * Resume an SDIO device which was suspended at run time at this
- * point, in order to allow standard SDIO suspend/resume paths
- * to keep working as usual.
- *
- * Ultimately, the SDIO driver itself will decide (in its
- * suspend handler, or lack thereof) whether the card should be
- * removed or kept, and if kept, at what power state.
- *
- * At this point, PM core have increased our use count, so it's
- * safe to directly resume the device. After system is resumed
- * again, PM core will drop back its runtime PM use count, and if
- * needed device will be suspended again.
- *
- * The end result is guaranteed to be a power state that is
- * coherent with the device's runtime PM use count.
- *
- * The return value of pm_runtime_resume is deliberately unchecked
- * since there is little point in failing system suspend if a
- * device can't be resumed.
- */
- if (func->card->host->caps & MMC_CAP_POWER_OFF_CARD)
- pm_runtime_resume(dev);
-
- return 0;
-}
-
static const struct dev_pm_ops sdio_bus_pm_ops = {
SET_RUNTIME_PM_OPS(
pm_generic_runtime_suspend,
pm_generic_runtime_resume,
pm_generic_runtime_idle
)
- .prepare = sdio_bus_pm_prepare,
};
#define SDIO_PM_OPS_PTR (&sdio_bus_pm_ops)
--
1.7.1
@@ -0,0 +1,30 @@
From ddcdd25ae15a5b6ec1d179ce018c09e0880f36a8 Mon Sep 17 00:00:00 2001
From: Ido Reis <idor@ti.com>
Date: Thu, 7 Jul 2011 00:21:55 +0300
Subject: [PATCH 6/6] revert duplicate insertion of mmc_card_keep_power function in include/linux/mmc/host.h
Upstream status: accepted
---
include/linux/mmc/host.h | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index db2548f..c797318 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -312,11 +312,6 @@ static inline int mmc_card_keep_power(struct mmc_host *host)
return host->pm_flags & MMC_PM_KEEP_POWER;
}
-static inline int mmc_card_keep_power(struct mmc_host *host)
-{
- return host->pm_flags & MMC_PM_KEEP_POWER;
-}
-
static inline int mmc_card_wake_sdio_irq(struct mmc_host *host)
{
return host->pm_flags & MMC_PM_WAKE_SDIO_IRQ;
--
1.7.0.4
@@ -0,0 +1,64 @@
From c3c1429faed56c53d96bf5c98dcaa7140a616ea5 Mon Sep 17 00:00:00 2001
From: Ido Yariv <ido@wizery.com>
Date: Wed, 6 Apr 2011 00:36:41 +0300
Subject: [PATCH 5/6] wl12xx: Backport wl12xx platform data
In order to build a more recent wl12xx driver externally (using
compat-wireless), the builtin platform data structure needs to match the
one used in the driver.
Fix this by backporting wl12xx.h from Luciano's tree.
Signed-off-by: Ido Yariv <ido@wizery.com>
---
include/linux/wl12xx.h | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/include/linux/wl12xx.h b/include/linux/wl12xx.h
index 4f902e1..4b69739 100644
--- a/include/linux/wl12xx.h
+++ b/include/linux/wl12xx.h
@@ -24,14 +24,41 @@
#ifndef _LINUX_WL12XX_H
#define _LINUX_WL12XX_H
+/* Reference clock values */
+enum {
+ WL12XX_REFCLOCK_19 = 0, /* 19.2 MHz */
+ WL12XX_REFCLOCK_26 = 1, /* 26 MHz */
+ WL12XX_REFCLOCK_38 = 2, /* 38.4 MHz */
+ WL12XX_REFCLOCK_52 = 3, /* 52 MHz */
+ WL12XX_REFCLOCK_38_XTAL = 4, /* 38.4 MHz, XTAL */
+ WL12XX_REFCLOCK_26_XTAL = 5, /* 26 MHz, XTAL */
+};
+
+/* TCXO clock values */
+enum {
+ WL12XX_TCXOCLOCK_19_2 = 0, /* 19.2MHz */
+ WL12XX_TCXOCLOCK_26 = 1, /* 26 MHz */
+ WL12XX_TCXOCLOCK_38_4 = 2, /* 38.4MHz */
+ WL12XX_TCXOCLOCK_52 = 3, /* 52 MHz */
+ WL12XX_TCXOCLOCK_16_368 = 4, /* 16.368 MHz */
+ WL12XX_TCXOCLOCK_32_736 = 5, /* 32.736 MHz */
+ WL12XX_TCXOCLOCK_16_8 = 6, /* 16.8 MHz */
+ WL12XX_TCXOCLOCK_33_6 = 7, /* 33.6 MHz */
+};
+
struct wl12xx_platform_data {
void (*set_power)(bool enable);
/* SDIO only: IRQ number if WLAN_IRQ line is used, 0 for SDIO IRQs */
int irq;
bool use_eeprom;
int board_ref_clock;
+ int board_tcxo_clock;
+ unsigned long platform_quirks;
};
+/* Platform does not support level trigger interrupts */
+#define WL12XX_PLATFORM_QUIRK_EDGE_IRQ BIT(0)
+
#ifdef CONFIG_WL12XX_PLATFORM_DATA
int wl12xx_set_platform_data(const struct wl12xx_platform_data *data);
--
1.7.1
@@ -0,0 +1,26 @@
From 6133415cf067d656c40997e00eace06d07aeab34 Mon Sep 17 00:00:00 2001
From: Eyal Reizer <eyalr@ti.com>
Date: Mon, 16 May 2011 17:47:46 +0300
Subject: [PATCH] PSP04.02.00.07.sdk: activate wireless extensions interface used by iwconfig
Signed-off-by: Eyal Reizer <eyalr@ti.com>
---
arch/arm/mach-omap2/Kconfig | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index dfa5464..8152b72 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -34,6 +34,7 @@ config ARCH_OMAP3
select ARM_L1_CACHE_SHIFT_6 if !ARCH_OMAP4
select ARCH_HAS_OPP
select PM_OPP if PM
select WL12XX_PLATFORM_DATA
+ select WIRELESS_EXT
config ARCH_OMAP4
bool "TI OMAP4"
--
1.7.0.4
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,89 @@
require linux.inc
DESCRIPTION = "Linux kernel for OMAP3 EVM from PSP, based on linux-omap3 kernel"
COMPATIBLE_MACHINE = "omap3"
SRCREV= "20c003f2f024d9f50f59edf9f1b8f5f035fb15b8"
SRC_URI = "git://arago-project.org/git/projects/linux-omap3.git;protocol=git \
file://defconfig"
# The following patches below have been upstreamed to linux kernel 2.6.39 tree
# and will not be needed once we move to this kernel.
# The only exception is "0002-allow-selecting-WL12XX_PLATFROM_DATA-independently.patch"
# which is needed for building against a compat-wireless package
SRC_URI += " \
file://0001-linux-omap3-Add-OCF-support-to-2.6.37-kernel.patch \
file://0001-omap3evm-add-support-for-the-WL12xx-WLAN-module.patch \
file://0002-allow-selecting-WL12XX_PLATFROM_DATA-independently.patch \
file://0003-mmc-skip-detection-of-nonremovable-cards-on-rescan.patch \
file://0004-mmc-sdio-don-t-reinitialize-nonremovable-powered-res.patch \
file://0005-mmc-sdio-don-t-power-up-cards-on-system-suspend.patch \
file://0006-wl12xx-Backport-wl12xx-platform-data.patch \
file://0007-activate-wireless-extensions.patch \
"
# Update the kernel to support suspend/resume when the file system is located
# on the SD card. This is also being submitted to the PSP team for inclusion
# in future releases.
SRC_URI += " \
file://0001-Fix-matrix-suspend.patch \
"
# Update the OCF kernel patch to remove non-existing components for
# non-TI hardware. This allows the make clean target to work.
# Update the defconfig for omap3 to enable OCF and WLAN by default
SRC_URI += " \
file://0001-OCF-support-remove-support-for-non-TI-hardware.patch \
file://0002-omap3_evm_defconfig-add-OCF-driver-support.patch \
file://0003-omap3_evm_defconfig-add-WLAN-config-options.patch \
"
# Enable clock pad register in mt9t111 sensor driver. This fixes the issue where
# sensor sync pulses were not generated during first loopback after boot-up.
SRC_URI += " \
file://0001-mt9t111-enable-clock-pad-register-in-configuration.patch \
"
# The following patches add support for wake on wlan (WoWlan)
# which is supported in nlcp R4 release
SRC_URI += "file://0001-omap3evm-add-wake-on-wlan-support.patch \
file://0001-nlcp-sdio-fixes-for-wowlan-support.patch \
file://0002-mmc-sdio-support-suspend-resume-while-runtime-suspen.patch \
file://0003-mmc_card_keep_power-cleanups.patch \
file://0004-mmc-do-not-switch-to-1-bit-mode-if-not-required.patch \
file://0005-mmc-fix-division-by-zero-in-MMC-core.patch \
file://0006-revert-duplicate-insertion-of-mmc_card_keep_power-fu.patch \
"
# The following patches allow for NOR to be enabled and built
# easily.
SRC_URI += " \
file://0001-omap3-am3517evm-Allow-for-NAND-to-really-be-disabled.patch \
file://0002-omap3-am3517evm-Update-NOR-partition-table.patch \
file://0003-AM3517-Add-am3517_evn_nor_defconfig.patch \
"
# The following patch sets the dto timeout for SD cards to the max of 14.
# This has been found to make SD cards work more reliably in the omap3 systems
SRC_URI += " \
file://0001-omap_hsmmc-make-default-dto-value-14.patch \
"
# Add ABB support to the Linux kernel to enable 1GHz OPP and to allow
# booting at 1GHz
SRC_URI += " \
file://0001-am37x-Adding-ABB-Support-for-1GHz-OPP.patch \
"
# Fix USB role switching when leaving USB cable connected
SRC_URI += " \
file://0001-usb-musb-am35x-set-default-VBUS-timeout-value.patch \
file://0002-usb-musb-am35x-fix-role-switching-issue.patch \
"
# Updated PIO mode for MUSB help description
SRC_URI_append_am3517-evm = " file://0001-musb-update-PIO-mode-help-information-in-Kconfig.patch"
S = "${WORKDIR}/git"