summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/configs/imx6_defconfig210
-rw-r--r--arch/arm/mach-mx6/board-mx6q_sabreauto.c65
-rw-r--r--arch/arm/mach-mx6/usb_dr.c34
-rw-r--r--arch/arm/mach-mx6/usb_h1.c32
-rw-r--r--drivers/media/video/mxc/capture/mxc_v4l2_capture.c12
-rw-r--r--drivers/media/video/mxc/capture/ov3640.c199
-rw-r--r--drivers/mmc/host/sdhci.c5
-rw-r--r--drivers/mxc/asrc/mxc_asrc.c73
-rw-r--r--drivers/net/can/flexcan.c67
-rw-r--r--drivers/usb/gadget/f_audio.c4
-rw-r--r--drivers/usb/host/ehci-arc.c10
-rw-r--r--drivers/usb/host/ehci-hub.c12
-rw-r--r--sound/soc/codecs/sgtl5000.c4
13 files changed, 550 insertions, 177 deletions
diff --git a/arch/arm/configs/imx6_defconfig b/arch/arm/configs/imx6_defconfig
index 42c4eeb77db4..c90ed78827e8 100644
--- a/arch/arm/configs/imx6_defconfig
+++ b/arch/arm/configs/imx6_defconfig
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux/arm 2.6.38 Kernel Configuration
-# Wed Nov 16 10:57:43 2011
+# Fri Dec 30 13:46:51 2011
#
CONFIG_ARM=y
CONFIG_HAVE_PWM=y
@@ -256,7 +256,9 @@ CONFIG_ARCH_MXC=y
# CONFIG_ARCH_OMAP is not set
# CONFIG_PLAT_SPEAR is not set
CONFIG_GPIO_PCA953X=y
+# CONFIG_KEYBOARD_GPIO_POLLED is not set
CONFIG_IMX_HAVE_PLATFORM_DMA=y
+CONFIG_IMX_HAVE_PLATFORM_MXC_MLB=y
CONFIG_IMX_HAVE_PLATFORM_FEC=y
CONFIG_IMX_HAVE_PLATFORM_FLEXCAN=y
CONFIG_IMX_HAVE_PLATFORM_FSL_USB2_UDC=y
@@ -277,6 +279,7 @@ CONFIG_IMX_HAVE_PLATFORM_IMX_DVFS=y
CONFIG_IMX_HAVE_PLATFORM_AHCI=y
CONFIG_IMX_HAVE_PLATFORM_IMX_OCOTP=y
CONFIG_IMX_HAVE_PLATFORM_IMX_VIIM=y
+CONFIG_IMX_HAVE_PLATFORM_PERFMON=y
CONFIG_IMX_HAVE_PLATFORM_LDB=y
CONFIG_IMX_HAVE_PLATFORM_IMX_SPDIF=y
CONFIG_IMX_HAVE_PLATFORM_VIV_GPU=y
@@ -288,7 +291,6 @@ CONFIG_IMX_HAVE_PLATFORM_IMX_PM=y
CONFIG_IMX_HAVE_PLATFORM_IMX_ASRC=y
CONFIG_IMX_HAVE_PLATFORM_IMX_MIPI_DSI=y
CONFIG_IMX_HAVE_PLATFORM_IMX_MIPI_CSI2=y
-CONFIG_IMX_HAVE_PLATFORM_MXC_MLB=y
#
# Freescale MXC Implementations
@@ -626,10 +628,15 @@ CONFIG_WIRELESS=y
CONFIG_WIRELESS_EXT=y
CONFIG_WEXT_CORE=y
CONFIG_WEXT_PROC=y
+CONFIG_WEXT_SPY=y
CONFIG_WEXT_PRIV=y
# CONFIG_CFG80211 is not set
CONFIG_WIRELESS_EXT_SYSFS=y
-# CONFIG_LIB80211 is not set
+CONFIG_LIB80211=y
+CONFIG_LIB80211_CRYPT_WEP=y
+CONFIG_LIB80211_CRYPT_CCMP=y
+CONFIG_LIB80211_CRYPT_TKIP=y
+# CONFIG_LIB80211_DEBUG is not set
#
# CFG80211 needs to be enabled for MAC80211
@@ -771,7 +778,37 @@ CONFIG_BLK_DEV_LOOP=y
# CONFIG_MG_DISK is not set
# CONFIG_BLK_DEV_RBD is not set
CONFIG_MISC_DEVICES=y
+# CONFIG_AD525X_DPOT is not set
+# CONFIG_ICS932S401 is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+# CONFIG_APDS9802ALS is not set
+# CONFIG_ISL29003 is not set
+# CONFIG_ISL29020 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_SENSORS_BH1780 is not set
+# CONFIG_SENSORS_BH1770 is not set
+# CONFIG_SENSORS_APDS990X is not set
+# CONFIG_HMC6352 is not set
+# CONFIG_DS1682 is not set
+# CONFIG_TI_DAC7512 is not set
+# CONFIG_BMP085 is not set
CONFIG_MXS_PERFMON=m
+# CONFIG_C2PORT is not set
+
+#
+# EEPROM support
+#
+# CONFIG_EEPROM_AT24 is not set
+# CONFIG_EEPROM_AT25 is not set
+# CONFIG_EEPROM_LEGACY is not set
+# CONFIG_EEPROM_MAX6875 is not set
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_IWMC3200TOP is not set
+
+#
+# Texas Instruments shared transport line discipline
+#
+# CONFIG_TI_ST is not set
CONFIG_HAVE_IDE=y
# CONFIG_IDE is not set
@@ -911,6 +948,7 @@ CONFIG_FEC=y
CONFIG_WLAN=y
# CONFIG_USB_ZD1201 is not set
CONFIG_HOSTAP=y
+# CONFIG_HOSTAP_FIRMWARE is not set
#
# Enable WiMAX (Networking options) to see the WiMAX drivers
@@ -962,7 +1000,25 @@ CONFIG_INPUT_EVDEV=y
#
# Input Device Drivers
#
-# CONFIG_INPUT_KEYBOARD is not set
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ADP5588 is not set
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_QT2160 is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+CONFIG_KEYBOARD_GPIO=y
+# CONFIG_KEYBOARD_TCA6416 is not set
+# CONFIG_KEYBOARD_MATRIX is not set
+# CONFIG_KEYBOARD_LM8323 is not set
+# CONFIG_KEYBOARD_MAX7359 is not set
+# CONFIG_KEYBOARD_MCS is not set
+# CONFIG_KEYBOARD_IMX is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_OPENCORES is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_MXC is not set
+# CONFIG_KEYBOARD_MPR121 is not set
# CONFIG_INPUT_MOUSE is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TABLET is not set
@@ -1016,7 +1072,12 @@ CONFIG_INPUT_UINPUT=y
#
# Hardware I/O ports
#
-# CONFIG_SERIO is not set
+CONFIG_SERIO=y
+CONFIG_SERIO_SERPORT=y
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_SERIO_ALTERA_PS2 is not set
+# CONFIG_SERIO_PS2MULT is not set
# CONFIG_GAMEPORT is not set
#
@@ -1388,7 +1449,56 @@ CONFIG_VIDEO_MXC_IPU_OUTPUT=y
CONFIG_V4L_USB_DRIVERS=y
CONFIG_USB_VIDEO_CLASS=m
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
-CONFIG_USB_VIDEO_BUFFERS_DMA=y
+CONFIG_USB_GSPCA=m
+# CONFIG_USB_M5602 is not set
+# CONFIG_USB_STV06XX is not set
+# CONFIG_USB_GL860 is not set
+# CONFIG_USB_GSPCA_BENQ is not set
+# CONFIG_USB_GSPCA_CONEX is not set
+# CONFIG_USB_GSPCA_CPIA1 is not set
+# CONFIG_USB_GSPCA_ETOMS is not set
+# CONFIG_USB_GSPCA_FINEPIX is not set
+# CONFIG_USB_GSPCA_JEILINJ is not set
+# CONFIG_USB_GSPCA_KONICA is not set
+# CONFIG_USB_GSPCA_MARS is not set
+# CONFIG_USB_GSPCA_MR97310A is not set
+# CONFIG_USB_GSPCA_OV519 is not set
+# CONFIG_USB_GSPCA_OV534 is not set
+# CONFIG_USB_GSPCA_OV534_9 is not set
+# CONFIG_USB_GSPCA_PAC207 is not set
+# CONFIG_USB_GSPCA_PAC7302 is not set
+# CONFIG_USB_GSPCA_PAC7311 is not set
+# CONFIG_USB_GSPCA_SN9C2028 is not set
+# CONFIG_USB_GSPCA_SN9C20X is not set
+# CONFIG_USB_GSPCA_SONIXB is not set
+# CONFIG_USB_GSPCA_SONIXJ is not set
+# CONFIG_USB_GSPCA_SPCA500 is not set
+# CONFIG_USB_GSPCA_SPCA501 is not set
+# CONFIG_USB_GSPCA_SPCA505 is not set
+# CONFIG_USB_GSPCA_SPCA506 is not set
+# CONFIG_USB_GSPCA_SPCA508 is not set
+# CONFIG_USB_GSPCA_SPCA561 is not set
+# CONFIG_USB_GSPCA_SPCA1528 is not set
+# CONFIG_USB_GSPCA_SQ905 is not set
+# CONFIG_USB_GSPCA_SQ905C is not set
+# CONFIG_USB_GSPCA_SQ930X is not set
+# CONFIG_USB_GSPCA_STK014 is not set
+# CONFIG_USB_GSPCA_STV0680 is not set
+# CONFIG_USB_GSPCA_SUNPLUS is not set
+# CONFIG_USB_GSPCA_T613 is not set
+# CONFIG_USB_GSPCA_TV8532 is not set
+# CONFIG_USB_GSPCA_VC032X is not set
+# CONFIG_USB_GSPCA_XIRLINK_CIT is not set
+# CONFIG_USB_GSPCA_ZC3XX is not set
+# CONFIG_VIDEO_PVRUSB2 is not set
+# CONFIG_VIDEO_HDPVR is not set
+# CONFIG_VIDEO_USBVISION is not set
+# CONFIG_USB_ET61X251 is not set
+# CONFIG_USB_SN9C102 is not set
+# CONFIG_USB_PWC is not set
+# CONFIG_USB_ZR364XX is not set
+# CONFIG_USB_STKWEBCAM is not set
+# CONFIG_USB_S2255 is not set
# CONFIG_V4L_MEM2MEM_DRIVERS is not set
# CONFIG_RADIO_ADAPTERS is not set
@@ -1441,6 +1551,7 @@ CONFIG_BACKLIGHT_PWM=y
#
# CONFIG_DISPLAY_SUPPORT is not set
CONFIG_FB_MXC=y
+CONFIG_FB_MXC_EDID=y
CONFIG_FB_MXC_SYNC_PANEL=y
# CONFIG_FB_MXC_EPSON_VGA_SYNC_PANEL is not set
CONFIG_FB_MXC_LDB=y
@@ -1483,6 +1594,8 @@ CONFIG_SOUND=y
CONFIG_SND=y
CONFIG_SND_TIMER=y
CONFIG_SND_PCM=y
+CONFIG_SND_HWDEP=y
+CONFIG_SND_RAWMIDI=y
CONFIG_SND_JACK=y
# CONFIG_SND_SEQUENCER is not set
# CONFIG_SND_MIXER_OSS is not set
@@ -1717,7 +1830,6 @@ CONFIG_USB_ARC=y
# CONFIG_USB_GADGET_DUMMY_HCD is not set
CONFIG_USB_GADGET_DUALSPEED=y
# CONFIG_USB_ZERO is not set
-# CONFIG_USB_AUDIO is not set
CONFIG_USB_AUDIO=m
CONFIG_USB_ETH=m
CONFIG_USB_ETH_RNDIS=y
@@ -1773,6 +1885,30 @@ CONFIG_MMC_SDHCI_ESDHC_IMX=y
# CONFIG_MEMSTICK is not set
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+# CONFIG_LEDS_PCA9532 is not set
+# CONFIG_LEDS_GPIO is not set
+# CONFIG_LEDS_LP3944 is not set
+# CONFIG_LEDS_LP5521 is not set
+# CONFIG_LEDS_LP5523 is not set
+# CONFIG_LEDS_PCA955X is not set
+# CONFIG_LEDS_DAC124S085 is not set
+# CONFIG_LEDS_PWM is not set
+# CONFIG_LEDS_REGULATOR is not set
+# CONFIG_LEDS_BD2802 is not set
+# CONFIG_LEDS_LT3593 is not set
+# CONFIG_LEDS_TRIGGERS is not set
+
+#
+# LED Triggers
+#
+
+#
+# LED Triggers
+#
# CONFIG_NFC_DEVICES is not set
# CONFIG_ACCESSIBILITY is not set
CONFIG_RTC_LIB=y
@@ -1867,54 +2003,6 @@ CONFIG_DMA_ENGINE=y
# CONFIG_AUXDISPLAY is not set
# CONFIG_UIO is not set
# CONFIG_STAGING is not set
-# CONFIG_STAGING_EXCLUDE_BUILD is not set
-# CONFIG_USB_DABUSB is not set
-# CONFIG_USB_SE401 is not set
-# CONFIG_USB_VICAM is not set
-# CONFIG_USB_IP_COMMON is not set
-# CONFIG_ECHO is not set
-# CONFIG_BRCM80211 is not set
-# CONFIG_RT2870 is not set
-# CONFIG_COMEDI is not set
-# CONFIG_ASUS_OLED is not set
-# CONFIG_R8712U is not set
-# CONFIG_TRANZPORT is not set
-# CONFIG_POHMELFS is not set
-# CONFIG_AUTOFS_FS is not set
-# CONFIG_LINE6_USB is not set
-# CONFIG_VT6656 is not set
-# CONFIG_IIO is not set
-# CONFIG_ZRAM is not set
-# CONFIG_FB_SM7XX is not set
-
-#
-# Texas Instruments shared transport line discipline
-#
-# CONFIG_ST_BT is not set
-# CONFIG_SMB_FS is not set
-# CONFIG_EASYCAP is not set
-CONFIG_MACH_NO_WESTBRIDGE=y
-# CONFIG_ATH6K_LEGACY is not set
-# CONFIG_AR600x_SD31_XXX is not set
-# CONFIG_AR600x_WB31_XXX is not set
-# CONFIG_AR600x_SD32_XXX is not set
-# CONFIG_AR600x_CUSTOM_XXX is not set
-# CONFIG_ATH6KL_ENABLE_COEXISTENCE is not set
-# CONFIG_ATH6KL_HCI_BRIDGE is not set
-# CONFIG_ATH6KL_HTC_RAW_INTERFACE is not set
-# CONFIG_ATH6KL_VIRTUAL_SCATTER_GATHER is not set
-# CONFIG_ATH6KL_SKIP_ABI_VERSION_CHECK is not set
-# CONFIG_ATH6KL_DEBUG is not set
-# CONFIG_USB_ENESTORAGE is not set
-# CONFIG_BCM_WIMAX is not set
-# CONFIG_FT1000 is not set
-
-#
-# Speakup console speech
-#
-# CONFIG_SPEAKUP is not set
-# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set
-# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set
CONFIG_CLKDEV_LOOKUP=y
#
@@ -1981,6 +2069,7 @@ CONFIG_MXC_ASRC=y
#
# MXC Media Local Bus Driver
#
+CONFIG_MXC_MLB=y
CONFIG_MXC_MLB150=m
#
@@ -1989,11 +2078,7 @@ CONFIG_MXC_MLB150=m
# CONFIG_IMX_ADC is not set
#
-# MXC GPU support
-#
-
-#
-# MXC GPU support
+# MXC Vivante GPU support
#
CONFIG_MXC_GPU_VIV=m
@@ -2252,6 +2337,7 @@ CONFIG_CRYPTO_ALGAPI2=y
CONFIG_CRYPTO_AEAD2=y
CONFIG_CRYPTO_BLKCIPHER=y
CONFIG_CRYPTO_BLKCIPHER2=y
+CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_HASH2=y
CONFIG_CRYPTO_RNG2=y
CONFIG_CRYPTO_PCOMP2=y
@@ -2299,7 +2385,7 @@ CONFIG_CRYPTO_ECB=y
# CONFIG_CRYPTO_GHASH is not set
# CONFIG_CRYPTO_MD4 is not set
# CONFIG_CRYPTO_MD5 is not set
-# 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
@@ -2315,7 +2401,7 @@ CONFIG_CRYPTO_ECB=y
#
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
diff --git a/arch/arm/mach-mx6/board-mx6q_sabreauto.c b/arch/arm/mach-mx6/board-mx6q_sabreauto.c
index e5dde074e026..69dd92e17cc9 100644
--- a/arch/arm/mach-mx6/board-mx6q_sabreauto.c
+++ b/arch/arm/mach-mx6/board-mx6q_sabreauto.c
@@ -150,6 +150,8 @@ static iomux_v3_cfg_t mx6q_sabreauto_pads[] = {
MX6Q_PAD_RGMII_RD2__ENET_RGMII_RD2,
MX6Q_PAD_RGMII_RD3__ENET_RGMII_RD3,
MX6Q_PAD_RGMII_RX_CTL__ENET_RGMII_RX_CTL,
+ /*RGMII Phy Interrupt */
+ MX6Q_PAD_GPIO_19__GPIO_4_5,
#endif
/* MCLK for csi0 */
MX6Q_PAD_GPIO_0__CCM_CLKO,
@@ -473,38 +475,23 @@ static inline void mx6q_sabreauto_init_uart(void)
static int mx6q_sabreauto_fec_phy_init(struct phy_device *phydev)
{
- unsigned short val;
-
- /* To enable AR8031 ouput a 125MHz clk from CLK_25M */
- phy_write(phydev, 0xd, 0x7);
- phy_write(phydev, 0xe, 0x8016);
- phy_write(phydev, 0xd, 0x4007);
- val = phy_read(phydev, 0xe);
+/* prefer master mode, 1000 Base-T capable */
+ phy_write(phydev, 0x9, 0x0f00);
- val &= 0xffe3;
- val |= 0x18;
- phy_write(phydev, 0xe, val);
+ /* min rx data delay */
+ phy_write(phydev, 0x0b, 0x8105);
+ phy_write(phydev, 0x0c, 0x0000);
- /* introduce tx clock delay */
- phy_write(phydev, 0x1d, 0x5);
- val = phy_read(phydev, 0x1e);
- val |= 0x0100;
- phy_write(phydev, 0x1e, val);
+ /* max rx/tx clock delay, min rx/tx control delay */
+ phy_write(phydev, 0x0b, 0x8104);
+ phy_write(phydev, 0x0c, 0xf0f0);
+ phy_write(phydev, 0x0b, 0x104);
return 0;
}
static int mx6q_sabreauto_fec_power_hibernate(struct phy_device *phydev)
{
- unsigned short val;
-
- /*set AR8031 debug reg 0xb to hibernate power*/
- phy_write(phydev, 0x1d, 0xb);
- val = phy_read(phydev, 0x1e);
-
- val |= 0x8000;
- phy_write(phydev, 0x1e, val);
-
return 0;
}
@@ -568,8 +555,17 @@ static int max7310_1_setup(struct i2c_client *client,
unsigned gpio_base, unsigned ngpio,
void *context)
{
+ /* 0 BACKLITE_ON */
+ /* 1 SAT_SHUTDN_B */
+ /* 2 CPU_PER_RST_B */
+ /* 3 MAIN_PER_RST_B */
+ /* 4 IPOD_RST_B */
+ /* 5 MLB_RST_B */
+ /* 6 SSI_STEERING */
+ /* 7 GPS_RST_B */
+
int max7310_gpio_value[] = {
- 0, 1, 0, 1, 0, 0, 0, 0,
+ 0, 1, 1, 1, 0, 0, 0, 0,
};
int n;
@@ -593,12 +589,21 @@ static struct pca953x_platform_data max7310_platdata = {
.setup = max7310_1_setup,
};
-static int max7310_u48_setup(struct i2c_client *client,
+static int max7310_u516_setup(struct i2c_client *client,
unsigned gpio_base, unsigned ngpio,
void *context)
{
+ /* 0 not use */
+ /* 1 GPS_PWREN */
+ /* 2 VIDEO_ADC_PWRDN_B */
+ /* 3 ENET_CAN1_STEER */
+ /* 4 EIMD30_BTUART3_STEER */
+ /* 5 CAN_STBY */
+ /* 6 CAN_EN */
+ /* 7 USB_H1_PWR */
+
int max7310_gpio_value[] = {
- 1, 1, 1, 1, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
};
int n;
@@ -616,10 +621,10 @@ static int max7310_u48_setup(struct i2c_client *client,
return 0;
}
-static struct pca953x_platform_data max7310_u48_platdata = {
+static struct pca953x_platform_data max7310_u516_platdata = {
.gpio_base = MX6Q_SABREAUTO_MAX7310_2_BASE_ADDR,
.invert = 0,
- .setup = max7310_u48_setup,
+ .setup = max7310_u516_setup,
};
static void ddc_dvi_init(void)
@@ -679,7 +684,7 @@ static struct i2c_board_info mxc_i2c2_board_info[] __initdata = {
},
{
I2C_BOARD_INFO("max7310", 0x32),
- .platform_data = &max7310_u48_platdata,
+ .platform_data = &max7310_u516_platdata,
},
{
I2C_BOARD_INFO("mxc_dvi", 0x50),
diff --git a/arch/arm/mach-mx6/usb_dr.c b/arch/arm/mach-mx6/usb_dr.c
index de84a4ded23b..fb241f517c39 100644
--- a/arch/arm/mach-mx6/usb_dr.c
+++ b/arch/arm/mach-mx6/usb_dr.c
@@ -310,6 +310,36 @@ static void usbotg_wakeup_event_clear(void)
#ifdef CONFIG_USB_EHCI_ARC_OTG
/* Beginning of host related operation for DR port */
+static void _host_platform_suspend(struct fsl_usb2_platform_data *pdata)
+{
+ void __iomem *phy_reg = MX6_IO_ADDRESS(USB_PHY0_BASE_ADDR);
+ u32 tmp;
+
+ tmp = (BM_USBPHY_PWD_TXPWDFS
+ | BM_USBPHY_PWD_TXPWDIBIAS
+ | BM_USBPHY_PWD_TXPWDV2I
+ | BM_USBPHY_PWD_RXPWDENV
+ | BM_USBPHY_PWD_RXPWD1PT1
+ | BM_USBPHY_PWD_RXPWDDIFF
+ | BM_USBPHY_PWD_RXPWDRX);
+ __raw_writel(tmp, phy_reg + HW_USBPHY_PWD_SET);
+}
+
+static void _host_platform_resume(struct fsl_usb2_platform_data *pdata)
+{
+ void __iomem *phy_reg = MX6_IO_ADDRESS(USB_PHY0_BASE_ADDR);
+ u32 tmp;
+
+ tmp = (BM_USBPHY_PWD_TXPWDFS
+ | BM_USBPHY_PWD_TXPWDIBIAS
+ | BM_USBPHY_PWD_TXPWDV2I
+ | BM_USBPHY_PWD_RXPWDENV
+ | BM_USBPHY_PWD_RXPWD1PT1
+ | BM_USBPHY_PWD_RXPWDDIFF
+ | BM_USBPHY_PWD_RXPWDRX);
+ __raw_writel(tmp, phy_reg + HW_USBPHY_PWD_CLR);
+}
+
static void _host_phy_lowpower_suspend(struct fsl_usb2_platform_data *pdata, bool enable)
{
__phy_lowpower_suspend(pdata, enable, ENABLED_BY_HOST);
@@ -438,6 +468,8 @@ void __init mx6_usb_dr_init(void)
#ifdef CONFIG_USB_EHCI_ARC_OTG
dr_utmi_config.operating_mode = DR_HOST_MODE;
dr_utmi_config.wake_up_enable = _host_wakeup_enable;
+ dr_utmi_config.platform_suspend = _host_platform_suspend;
+ dr_utmi_config.platform_resume = _host_platform_resume;
dr_utmi_config.phy_lowpower_suspend = _host_phy_lowpower_suspend;
dr_utmi_config.is_wakeup_event = _is_host_wakeup;
dr_utmi_config.wakeup_pdata = &dr_wakeup_config;
@@ -448,6 +480,8 @@ void __init mx6_usb_dr_init(void)
#ifdef CONFIG_USB_GADGET_ARC
dr_utmi_config.operating_mode = DR_UDC_MODE;
dr_utmi_config.wake_up_enable = _device_wakeup_enable;
+ dr_utmi_config.platform_suspend = NULL;
+ dr_utmi_config.platform_resume = NULL;
dr_utmi_config.phy_lowpower_suspend = _device_phy_lowpower_suspend;
dr_utmi_config.is_wakeup_event = _is_device_wakeup;
dr_utmi_config.wakeup_pdata = &dr_wakeup_config;
diff --git a/arch/arm/mach-mx6/usb_h1.c b/arch/arm/mach-mx6/usb_h1.c
index 9c247d568754..f4b84df63f2f 100644
--- a/arch/arm/mach-mx6/usb_h1.c
+++ b/arch/arm/mach-mx6/usb_h1.c
@@ -148,6 +148,36 @@ static void _wake_up_enable(struct fsl_usb2_platform_data *pdata, bool enable)
}
}
+static void usbh1_platform_suspend(struct fsl_usb2_platform_data *pdata)
+{
+ void __iomem *phy_reg = MX6_IO_ADDRESS(USB_PHY1_BASE_ADDR);
+ u32 tmp;
+
+ tmp = (BM_USBPHY_PWD_TXPWDFS
+ | BM_USBPHY_PWD_TXPWDIBIAS
+ | BM_USBPHY_PWD_TXPWDV2I
+ | BM_USBPHY_PWD_RXPWDENV
+ | BM_USBPHY_PWD_RXPWD1PT1
+ | BM_USBPHY_PWD_RXPWDDIFF
+ | BM_USBPHY_PWD_RXPWDRX);
+ __raw_writel(tmp, phy_reg + HW_USBPHY_PWD_SET);
+}
+
+static void usbh1_platform_resume(struct fsl_usb2_platform_data *pdata)
+{
+ void __iomem *phy_reg = MX6_IO_ADDRESS(USB_PHY1_BASE_ADDR);
+ u32 tmp;
+
+ tmp = (BM_USBPHY_PWD_TXPWDFS
+ | BM_USBPHY_PWD_TXPWDIBIAS
+ | BM_USBPHY_PWD_TXPWDV2I
+ | BM_USBPHY_PWD_RXPWDENV
+ | BM_USBPHY_PWD_RXPWD1PT1
+ | BM_USBPHY_PWD_RXPWDDIFF
+ | BM_USBPHY_PWD_RXPWDRX);
+ __raw_writel(tmp, phy_reg + HW_USBPHY_PWD_CLR);
+}
+
static void _phy_lowpower_suspend(struct fsl_usb2_platform_data *pdata, bool enable)
{
u32 tmp;
@@ -224,6 +254,8 @@ static struct fsl_usb2_platform_data usbh1_config = {
.power_budget = 500, /* 500 mA max power */
.wake_up_enable = _wake_up_enable,
.usb_clock_for_pm = usbh1_clock_gate,
+ .platform_suspend = usbh1_platform_suspend,
+ .platform_resume = usbh1_platform_resume,
.phy_lowpower_suspend = _phy_lowpower_suspend,
.is_wakeup_event = _is_usbh1_wakeup,
.wakeup_handler = h1_wakeup_handler,
diff --git a/drivers/media/video/mxc/capture/mxc_v4l2_capture.c b/drivers/media/video/mxc/capture/mxc_v4l2_capture.c
index 21dcb1a46d50..2d9dfa8699b6 100644
--- a/drivers/media/video/mxc/capture/mxc_v4l2_capture.c
+++ b/drivers/media/video/mxc/capture/mxc_v4l2_capture.c
@@ -1203,6 +1203,7 @@ static int mxc_v4l2_s_param(cam_data *cam, struct v4l2_streamparm *parm)
struct v4l2_format cam_fmt;
struct v4l2_streamparm currentparm;
ipu_csi_signal_cfg_t csi_param;
+ u32 current_fps, parm_fps;
int err = 0;
pr_debug("In mxc_v4l2_s_param\n");
@@ -1227,16 +1228,21 @@ static int mxc_v4l2_s_param(cam_data *cam, struct v4l2_streamparm *parm)
goto exit;
}
+ current_fps = currentparm.parm.capture.timeperframe.denominator
+ / currentparm.parm.capture.timeperframe.numerator;
+ parm_fps = parm->parm.capture.timeperframe.denominator
+ / parm->parm.capture.timeperframe.numerator;
+
pr_debug(" Current capabilities are %x\n",
currentparm.parm.capture.capability);
pr_debug(" Current capturemode is %d change to %d\n",
currentparm.parm.capture.capturemode,
parm->parm.capture.capturemode);
pr_debug(" Current framerate is %d change to %d\n",
- currentparm.parm.capture.timeperframe.denominator,
- parm->parm.capture.timeperframe.denominator);
+ current_fps, parm_fps);
- if (parm->parm.capture.capturemode == currentparm.parm.capture.capturemode) {
+ if ((parm->parm.capture.capturemode == currentparm.parm.capture.capturemode)
+ && (current_fps == parm_fps)) {
return 0;
}
diff --git a/drivers/media/video/mxc/capture/ov3640.c b/drivers/media/video/mxc/capture/ov3640.c
index e10190687d80..570f50bae161 100644
--- a/drivers/media/video/mxc/capture/ov3640.c
+++ b/drivers/media/video/mxc/capture/ov3640.c
@@ -40,11 +40,13 @@ enum ov3640_mode {
ov3640_mode_MIN = 0,
ov3640_mode_VGA_640_480 = 0,
ov3640_mode_QVGA_320_240 = 1,
- ov3640_mode_XGA_1024_768 = 2,
- ov3640_mode_QXGA_2048_1536 = 3,
- ov3640_mode_NTSC_720_480 = 4,
- ov3640_mode_PAL_720_576 = 5,
- ov3640_mode_MAX = 5
+ ov3640_mode_NTSC_720_480 = 2,
+ ov3640_mode_PAL_720_576 = 3,
+ ov3640_mode_720P_1280_720 = 4,
+ ov3640_mode_1080P_1920_1080 = 5,
+ ov3640_mode_XGA_1024_768 = 6,
+ ov3640_mode_QXGA_2048_1536 = 7,
+ ov3640_mode_MAX = 7
};
enum ov3640_frame_rate {
@@ -162,11 +164,12 @@ static struct reg_value ov3640_setting_15fps_QXGA_2048_1536[] = {
};
static struct reg_value ov3640_setting_15fps_XGA_1024_768[] = {
- {0x3012, 0x80, 0, 0}, {0x304d, 0x45, 0, 0}, {0x30a7, 0x5e, 0, 0},
+ {0x3012, 0x80, 0, 5}, {0x304d, 0x45, 0, 0}, {0x30a7, 0x5e, 0, 0},
{0x3087, 0x16, 0, 0}, {0x309c, 0x1a, 0, 0}, {0x30a2, 0xe4, 0, 0},
{0x30aa, 0x42, 0, 0}, {0x30b0, 0xff, 0, 0}, {0x30b1, 0xff, 0, 0},
{0x30b2, 0x10, 0, 0}, {0x300e, 0x32, 0, 0}, {0x300f, 0x21, 0, 0},
{0x3010, 0x20, 0, 0}, {0x3011, 0x00, 0, 0}, {0x304c, 0x81, 0, 0},
+ {0x30d7, 0x10, 0, 0}, {0x30d9, 0x0d, 0, 0}, {0x30db, 0x08, 0, 0},
{0x3016, 0x82, 0, 0}, {0x3018, 0x38, 0, 0}, {0x3019, 0x30, 0, 0},
{0x301a, 0x61, 0, 0}, {0x307d, 0x00, 0, 0}, {0x3087, 0x02, 0, 0},
{0x3082, 0x20, 0, 0}, {0x3015, 0x12, 0, 0}, {0x3014, 0x04, 0, 0},
@@ -188,17 +191,159 @@ static struct reg_value ov3640_setting_15fps_XGA_1024_768[] = {
{0x3400, 0x01, 0, 0}, {0x3404, 0x1d, 0, 0}, {0x3600, 0xc4, 0, 0},
{0x3302, 0xef, 0, 0}, {0x3020, 0x01, 0, 0}, {0x3021, 0x1d, 0, 0},
{0x3022, 0x00, 0, 0}, {0x3023, 0x0a, 0, 0}, {0x3024, 0x08, 0, 0},
- {0x3025, 0x00, 0, 0}, {0x3026, 0x06, 0, 0}, {0x3027, 0x00, 0, 0},
- {0x335f, 0x68, 0, 0}, {0x3360, 0x00, 0, 0}, {0x3361, 0x00, 0, 0},
- {0x3362, 0x34, 0, 0}, {0x3363, 0x00, 0, 0}, {0x3364, 0x00, 0, 0},
- {0x3403, 0x00, 0, 0}, {0x3088, 0x04, 0, 0}, {0x3089, 0x00, 0, 0},
- {0x308a, 0x03, 0, 0}, {0x308b, 0x00, 0, 0}, {0x307c, 0x10, 0, 0},
+ {0x3025, 0x18, 0, 0}, {0x3026, 0x06, 0, 0}, {0x3027, 0x0c, 0, 0},
+ {0x335f, 0x68, 0, 0}, {0x3360, 0x18, 0, 0}, {0x3361, 0x0c, 0, 0},
+ {0x3362, 0x68, 0, 0}, {0x3363, 0x08, 0, 0}, {0x3364, 0x04, 0, 0},
+ {0x3403, 0x42, 0, 0}, {0x3088, 0x08, 0, 0}, {0x3089, 0x00, 0, 0},
+ {0x308a, 0x06, 0, 0}, {0x308b, 0x00, 0, 0}, {0x307c, 0x10, 0, 0},
{0x3090, 0xc0, 0, 0}, {0x304c, 0x84, 0, 0}, {0x308d, 0x04, 0, 0},
- {0x3086, 0x03, 0, 0}, {0x3086, 0x00, 0, 0}, {0x3011, 0x01, 0, 0},
+ {0x3086, 0x03, 0, 0}, {0x3086, 0x00, 0, 0}, {0x3301, 0xde, 0, 0},
+ {0x3304, 0x00, 0, 0}, {0x3400, 0x00, 0, 0}, {0x3404, 0x42, 0, 0},
+ {0x3600, 0xc4, 0, 0}, {0x3362, 0x34, 0, 0}, {0x3363, 0x08, 0, 0},
+ {0x3364, 0x04, 0, 0}, {0x3403, 0x42, 0, 0}, {0x3088, 0x04, 0, 0},
+ {0x3089, 0x00, 0, 0}, {0x308a, 0x03, 0, 0}, {0x308b, 0x00, 0, 0},
};
static struct reg_value ov3640_setting_30fps_XGA_1024_768[] = {
- {0x0, 0x0, 0}
+ {0x3012, 0x80, 0, 5}, {0x304d, 0x45, 0, 0}, {0x30a7, 0x5e, 0, 0},
+ {0x3087, 0x16, 0, 0}, {0x309c, 0x1a, 0, 0}, {0x30a2, 0xe4, 0, 0},
+ {0x30aa, 0x42, 0, 0}, {0x30b0, 0xff, 0, 0}, {0x30b1, 0xff, 0, 0},
+ {0x30b2, 0x08, 0, 0}, {0x300e, 0x32, 0, 0}, {0x300f, 0x21, 0, 0},
+ {0x3010, 0x20, 0, 0}, {0x3011, 0x04, 0, 0}, {0x304c, 0x81, 0, 0},
+ {0x30d7, 0x10, 0, 0}, {0x30d9, 0x0d, 0, 0}, {0x30db, 0x08, 0, 0},
+ {0x3016, 0x82, 0, 0}, {0x3018, 0x38, 0, 0}, {0x3019, 0x30, 0, 0},
+ {0x301a, 0x61, 0, 0}, {0x307d, 0x00, 0, 0}, {0x3087, 0x02, 0, 0},
+ {0x3082, 0x20, 0, 0}, {0x3015, 0x12, 0, 0}, {0x3014, 0x84, 0, 0},
+ {0x3013, 0xf7, 0, 0}, {0x303c, 0x08, 0, 0}, {0x303d, 0x18, 0, 0},
+ {0x303e, 0x06, 0, 0}, {0x303f, 0x0c, 0, 0}, {0x3030, 0x62, 0, 0},
+ {0x3031, 0x26, 0, 0}, {0x3032, 0xe6, 0, 0}, {0x3033, 0x6e, 0, 0},
+ {0x3034, 0xea, 0, 0}, {0x3035, 0xae, 0, 0}, {0x3036, 0xa6, 0, 0},
+ {0x3037, 0x6a, 0, 0}, {0x3104, 0x02, 0, 0}, {0x3105, 0xfd, 0, 0},
+ {0x3106, 0x00, 0, 0}, {0x3107, 0xff, 0, 0}, {0x3300, 0x12, 0, 0},
+ {0x3301, 0xde, 0, 0}, {0x3302, 0xef, 0, 0}, {0x3316, 0xff, 0, 0},
+ {0x3317, 0x00, 0, 0}, {0x3312, 0x26, 0, 0}, {0x3314, 0x42, 0, 0},
+ {0x3313, 0x2b, 0, 0}, {0x3315, 0x42, 0, 0}, {0x3310, 0xd0, 0, 0},
+ {0x3311, 0xbd, 0, 0}, {0x330c, 0x18, 0, 0}, {0x330d, 0x18, 0, 0},
+ {0x330e, 0x56, 0, 0}, {0x330f, 0x5c, 0, 0}, {0x330b, 0x1c, 0, 0},
+ {0x3306, 0x5c, 0, 0}, {0x3307, 0x11, 0, 0}, {0x336a, 0x52, 0, 0},
+ {0x3370, 0x46, 0, 0}, {0x3376, 0x38, 0, 0}, {0x3300, 0x13, 0, 0},
+ {0x30b8, 0x20, 0, 0}, {0x30b9, 0x17, 0, 0}, {0x30ba, 0x04, 0, 0},
+ {0x30bb, 0x08, 0, 0}, {0x3507, 0x06, 0, 0}, {0x350a, 0x4f, 0, 0},
+ {0x3100, 0x02, 0, 0}, {0x3301, 0xde, 0, 0}, {0x3304, 0x00, 0, 0},
+ {0x3400, 0x00, 0, 0}, {0x3404, 0x00, 0, 0}, {0x335f, 0x68, 0, 0},
+ {0x3360, 0x18, 0, 0}, {0x3361, 0x0c, 0, 0}, {0x3362, 0x12, 0, 0},
+ {0x3363, 0x88, 0, 0}, {0x3364, 0xe4, 0, 0}, {0x3403, 0x42, 0, 0},
+ {0x3088, 0x02, 0, 0}, {0x3089, 0x80, 0, 0}, {0x308a, 0x01, 0, 0},
+ {0x308b, 0xe0, 0, 0}, {0x308d, 0x04, 0, 0}, {0x3086, 0x03, 0, 0},
+ {0x3086, 0x00, 0, 0}, {0x3011, 0x00, 0, 0}, {0x304c, 0x84, 0, 0},
+ {0x332a, 0x1d, 0, 0}, {0x331b, 0x08, 0, 0}, {0x331c, 0x16, 0, 0},
+ {0x331d, 0x2d, 0, 0}, {0x331e, 0x54, 0, 0}, {0x331f, 0x66, 0, 0},
+ {0x3320, 0x73, 0, 0}, {0x3321, 0x80, 0, 0}, {0x3322, 0x8c, 0, 0},
+ {0x3323, 0x95, 0, 0}, {0x3324, 0x9d, 0, 0}, {0x3325, 0xac, 0, 0},
+ {0x3326, 0xb8, 0, 0}, {0x3327, 0xcc, 0, 0}, {0x3328, 0xdd, 0, 0},
+ {0x3329, 0xee, 0, 0}, {0x3340, 0x20, 0, 0}, {0x3341, 0x58, 0, 0},
+ {0x3342, 0x08, 0, 0}, {0x3343, 0x23, 0, 0}, {0x3344, 0xad, 0, 0},
+ {0x3345, 0xd0, 0, 0}, {0x3346, 0xb8, 0, 0}, {0x3347, 0xb4, 0, 0},
+ {0x3348, 0x04, 0, 0}, {0x3349, 0x98, 0, 0}, {0x333F, 0x06, 0, 0},
+ {0x3012, 0x10, 0, 0}, {0x3023, 0x06, 0, 0}, {0x3026, 0x03, 0, 0},
+ {0x3027, 0x04, 0, 0}, {0x302a, 0x03, 0, 0}, {0x302b, 0x10, 0, 0},
+ {0x3075, 0x24, 0, 0}, {0x300d, 0x01, 0, 0}, {0x30d7, 0x90, 0, 0},
+ {0x3069, 0x04, 0, 0}, {0x303e, 0x00, 0, 0}, {0x303f, 0xc0, 0, 0},
+ {0x3302, 0xef, 0, 0}, {0x335f, 0x34, 0, 0}, {0x3360, 0x0c, 0, 0},
+ {0x3361, 0x04, 0, 0}, {0x3362, 0x34, 0, 0}, {0x3363, 0x08, 0, 0},
+ {0x3364, 0x04, 0, 0}, {0x3403, 0x42, 0, 0}, {0x3088, 0x04, 0, 0},
+ {0x3089, 0x00, 0, 0}, {0x308a, 0x03, 0, 0}, {0x308b, 0x00, 0, 0},
+ {0x3100, 0x02, 0, 0}, {0x3301, 0xde, 0, 0}, {0x3304, 0x00, 0, 0},
+ {0x3400, 0x00, 0, 0}, {0x3404, 0x42, 0, 0}, {0x304c, 0x82, 0, 0},
+ {0x3011, 0x00, 0, 0}, {0x302a, 0x03, 0, 0}, {0x302b, 0x10, 0, 0},
+ {0x3070, 0x00, 0, 0}, {0x3071, 0xec, 0, 0}, {0x3072, 0x00, 0, 0},
+ {0x3073, 0xc4, 0, 0}, {0x301c, 0x02, 0, 0}, {0x301d, 0x03, 0, 0},
+};
+
+static struct reg_value ov3640_setting_15fps_720P_1280_720[] = {
+ {0x3012, 0x80, 0, 0}, {0x304d, 0x45, 0, 0}, {0x30a7, 0x5e, 0, 0},
+ {0x3087, 0x16, 0, 0}, {0x309C, 0x1a, 0, 0}, {0x30a2, 0xe4, 0, 0},
+ {0x30aa, 0x42, 0, 0}, {0x30b0, 0xff, 0, 0}, {0x30b1, 0xff, 0, 0},
+ {0x30b2, 0x10, 0, 0}, {0x300e, 0x32, 0, 0}, {0x300f, 0x21, 0, 0},
+ {0x3010, 0x20, 0, 0}, {0x3011, 0x01, 0, 0}, {0x304c, 0x82, 0, 0},
+ {0x30d7, 0x10, 0, 0}, {0x30d9, 0x0d, 0, 0}, {0x30db, 0x08, 0, 0},
+ {0x3016, 0x82, 0, 0}, {0x3018, 0x38, 0, 0}, {0x3019, 0x30, 0, 0},
+ {0x301a, 0x61, 0, 0}, {0x307d, 0x00, 0, 0}, {0x3087, 0x02, 0, 0},
+ {0x3082, 0x20, 0, 0}, {0x3015, 0x12, 0, 0}, {0x3014, 0x0c, 0, 0},
+ {0x3013, 0xf7, 0, 0}, {0x303c, 0x08, 0, 0}, {0x303d, 0x18, 0, 0},
+ {0x303e, 0x06, 0, 0}, {0x303F, 0x0c, 0, 0}, {0x3030, 0x62, 0, 0},
+ {0x3031, 0x26, 0, 0}, {0x3032, 0xe6, 0, 0}, {0x3033, 0x6e, 0, 0},
+ {0x3034, 0xea, 0, 0}, {0x3035, 0xae, 0, 0}, {0x3036, 0xa6, 0, 0},
+ {0x3037, 0x6a, 0, 0}, {0x3104, 0x02, 0, 0}, {0x3105, 0xfd, 0, 0},
+ {0x3106, 0x00, 0, 0}, {0x3107, 0xff, 0, 0}, {0x3300, 0x12, 0, 0},
+ {0x3301, 0xde, 0, 0}, {0x3302, 0xcf, 0, 0}, {0x3312, 0x26, 0, 0},
+ {0x3314, 0x42, 0, 0}, {0x3313, 0x2b, 0, 0}, {0x3315, 0x42, 0, 0},
+ {0x3310, 0xd0, 0, 0}, {0x3311, 0xbd, 0, 0}, {0x330c, 0x18, 0, 0},
+ {0x330d, 0x18, 0, 0}, {0x330e, 0x56, 0, 0}, {0x330f, 0x5c, 0, 0},
+ {0x330b, 0x1c, 0, 0}, {0x3306, 0x5c, 0, 0}, {0x3307, 0x11, 0, 0},
+ {0x336a, 0x52, 0, 0}, {0x3370, 0x46, 0, 0}, {0x3376, 0x38, 0, 0},
+ {0x3300, 0x13, 0, 0}, {0x30b8, 0x20, 0, 0}, {0x30b9, 0x17, 0, 0},
+ {0x30ba, 0x04, 0, 0}, {0x30bb, 0x08, 0, 0}, {0x3100, 0x02, 0, 0},
+ {0x3301, 0xde, 0, 0}, {0x3304, 0xfc, 0, 0}, {0x3400, 0x02, 0, 0},
+ {0x3404, 0x00, 0, 0}, {0x3088, 0x08, 0, 0}, {0x3089, 0x00, 0, 0},
+ {0x308a, 0x06, 0, 0}, {0x308b, 0x00, 0, 0}, {0x308d, 0x04, 0, 0},
+ {0x3086, 0x03, 0, 0}, {0x3086, 0x00, 0, 0}, {0x3020, 0x01, 0, 0},
+ {0x3021, 0x1d, 0, 0}, {0x3022, 0x00, 0, 0}, {0x3023, 0x0a, 0, 0},
+ {0x3024, 0x08, 0, 0}, {0x3025, 0x18, 0, 0}, {0x3026, 0x06, 0, 0},
+ {0x3027, 0x0c, 0, 0}, {0x302a, 0x06, 0, 0}, {0x302b, 0x20, 0, 0},
+ {0x3075, 0x44, 0, 0}, {0x300d, 0x00, 0, 0}, {0x30d7, 0x10, 0, 0},
+ {0x3069, 0x44, 0, 0}, {0x303e, 0x01, 0, 0}, {0x303f, 0x80, 0, 0},
+ {0x3302, 0xef, 0, 0}, {0x335f, 0x68, 0, 0}, {0x3360, 0x18, 0, 0},
+ {0x3361, 0x0c, 0, 0}, {0x3362, 0x68, 0, 0}, {0x3363, 0x08, 0, 0},
+ {0x3364, 0x04, 0, 0}, {0x3403, 0x42, 0, 0}, {0x304c, 0x81, 0, 0},
+ {0x3011, 0x01, 0, 0}, {0x3301, 0xde, 0, 0}, {0x3304, 0x00, 0, 0},
+ {0x3400, 0x00, 0, 0}, {0x3404, 0x42, 0, 0}, {0x3600, 0xc4, 0, 0},
+ {0x3362, 0x25, 0, 0}, {0x3363, 0x08, 0, 0}, {0x3364, 0xd4, 0, 0},
+ {0x3403, 0x42, 0, 0}, {0x3088, 0x05, 0, 0}, {0x3089, 0x00, 0, 0},
+ {0x308a, 0x02, 0, 0}, {0x308b, 0xd0, 0, 0},
+};
+
+static struct reg_value ov3640_setting_15fps_1080P_1920_1080[] = {
+ {0x3012, 0x80, 0, 0}, {0x304d, 0x45, 0, 0}, {0x30a7, 0x5e, 0, 0},
+ {0x3087, 0x16, 0, 0}, {0x309C, 0x1a, 0, 0}, {0x30a2, 0xe4, 0, 0},
+ {0x30aa, 0x42, 0, 0}, {0x30b0, 0xff, 0, 0}, {0x30b1, 0xff, 0, 0},
+ {0x30b2, 0x10, 0, 0}, {0x300e, 0x32, 0, 0}, {0x300f, 0x21, 0, 0},
+ {0x3010, 0x20, 0, 0}, {0x3011, 0x01, 0, 0}, {0x304c, 0x82, 0, 0},
+ {0x30d7, 0x10, 0, 0}, {0x30d9, 0x0d, 0, 0}, {0x30db, 0x08, 0, 0},
+ {0x3016, 0x82, 0, 0}, {0x3018, 0x38, 0, 0}, {0x3019, 0x30, 0, 0},
+ {0x301a, 0x61, 0, 0}, {0x307d, 0x00, 0, 0}, {0x3087, 0x02, 0, 0},
+ {0x3082, 0x20, 0, 0}, {0x3015, 0x12, 0, 0}, {0x3014, 0x0c, 0, 0},
+ {0x3013, 0xf7, 0, 0}, {0x303c, 0x08, 0, 0}, {0x303d, 0x18, 0, 0},
+ {0x303e, 0x06, 0, 0}, {0x303F, 0x0c, 0, 0}, {0x3030, 0x62, 0, 0},
+ {0x3031, 0x26, 0, 0}, {0x3032, 0xe6, 0, 0}, {0x3033, 0x6e, 0, 0},
+ {0x3034, 0xea, 0, 0}, {0x3035, 0xae, 0, 0}, {0x3036, 0xa6, 0, 0},
+ {0x3037, 0x6a, 0, 0}, {0x3104, 0x02, 0, 0}, {0x3105, 0xfd, 0, 0},
+ {0x3106, 0x00, 0, 0}, {0x3107, 0xff, 0, 0}, {0x3300, 0x12, 0, 0},
+ {0x3301, 0xde, 0, 0}, {0x3302, 0xcf, 0, 0}, {0x3312, 0x26, 0, 0},
+ {0x3314, 0x42, 0, 0}, {0x3313, 0x2b, 0, 0}, {0x3315, 0x42, 0, 0},
+ {0x3310, 0xd0, 0, 0}, {0x3311, 0xbd, 0, 0}, {0x330c, 0x18, 0, 0},
+ {0x330d, 0x18, 0, 0}, {0x330e, 0x56, 0, 0}, {0x330f, 0x5c, 0, 0},
+ {0x330b, 0x1c, 0, 0}, {0x3306, 0x5c, 0, 0}, {0x3307, 0x11, 0, 0},
+ {0x336a, 0x52, 0, 0}, {0x3370, 0x46, 0, 0}, {0x3376, 0x38, 0, 0},
+ {0x3300, 0x13, 0, 0}, {0x30b8, 0x20, 0, 0}, {0x30b9, 0x17, 0, 0},
+ {0x30ba, 0x04, 0, 0}, {0x30bb, 0x08, 0, 0}, {0x3100, 0x02, 0, 0},
+ {0x3301, 0xde, 0, 0}, {0x3304, 0xfc, 0, 0}, {0x3400, 0x02, 0, 0},
+ {0x3404, 0x00, 0, 0}, {0x3088, 0x08, 0, 0}, {0x3089, 0x00, 0, 0},
+ {0x308a, 0x06, 0, 0}, {0x308b, 0x00, 0, 0}, {0x308d, 0x04, 0, 0},
+ {0x3086, 0x03, 0, 0}, {0x3086, 0x00, 0, 0}, {0x3020, 0x01, 0, 0},
+ {0x3021, 0x1d, 0, 0}, {0x3022, 0x00, 0, 0}, {0x3023, 0x0a, 0, 0},
+ {0x3024, 0x08, 0, 0}, {0x3025, 0x18, 0, 0}, {0x3026, 0x06, 0, 0},
+ {0x3027, 0x0c, 0, 0}, {0x302a, 0x06, 0, 0}, {0x302b, 0x20, 0, 0},
+ {0x3075, 0x44, 0, 0}, {0x300d, 0x00, 0, 0}, {0x30d7, 0x10, 0, 0},
+ {0x3069, 0x44, 0, 0}, {0x303e, 0x01, 0, 0}, {0x303f, 0x80, 0, 0},
+ {0x3302, 0xef, 0, 0}, {0x335f, 0x68, 0, 0}, {0x3360, 0x18, 0, 0},
+ {0x3361, 0x0c, 0, 0}, {0x3362, 0x68, 0, 0}, {0x3363, 0x08, 0, 0},
+ {0x3364, 0x04, 0, 0}, {0x3403, 0x42, 0, 0}, {0x304c, 0x81, 0, 0},
+ {0x3011, 0x01, 0, 0}, {0x3301, 0xde, 0, 0}, {0x3304, 0x00, 0, 0},
+ {0x3400, 0x00, 0, 0}, {0x3404, 0x42, 0, 0}, {0x3600, 0xc4, 0, 0},
+ {0x3362, 0x47, 0, 0}, {0x3363, 0x88, 0, 0}, {0x3364, 0x3c, 0, 0},
+ {0x3403, 0x42, 0, 0}, {0x3088, 0x07, 0, 0}, {0x3089, 0x80, 0, 0},
+ {0x308a, 0x04, 0, 0}, {0x308b, 0x38, 0, 0},
};
static struct reg_value ov3640_setting_15fps_VGA_640_480[] = {
@@ -659,18 +804,24 @@ static struct ov3640_mode_info ov3640_mode_info_data[2][ov3640_mode_MAX + 1] = {
{ov3640_mode_QVGA_320_240, 320, 240,
ov3640_setting_15fps_QVGA_320_240,
ARRAY_SIZE(ov3640_setting_15fps_QVGA_320_240)},
- {ov3640_mode_XGA_1024_768, 1024, 768,
- ov3640_setting_15fps_XGA_1024_768,
- ARRAY_SIZE(ov3640_setting_15fps_XGA_1024_768)},
- {ov3640_mode_QXGA_2048_1536, 2048, 1536,
- ov3640_setting_15fps_QXGA_2048_1536,
- ARRAY_SIZE(ov3640_setting_15fps_QXGA_2048_1536)},
{ov3640_mode_NTSC_720_480, 720, 480,
ov3640_setting_15fps_NTSC_720_480,
ARRAY_SIZE(ov3640_setting_15fps_NTSC_720_480)},
{ov3640_mode_PAL_720_576, 720, 576,
ov3640_setting_15fps_PAL_720_576,
ARRAY_SIZE(ov3640_setting_15fps_PAL_720_576)},
+ {ov3640_mode_720P_1280_720, 1280, 720,
+ ov3640_setting_15fps_720P_1280_720,
+ ARRAY_SIZE(ov3640_setting_15fps_720P_1280_720)},
+ {ov3640_mode_1080P_1920_1080, 1920, 1080,
+ ov3640_setting_15fps_1080P_1920_1080,
+ ARRAY_SIZE(ov3640_setting_15fps_1080P_1920_1080)},
+ {ov3640_mode_XGA_1024_768, 1024, 768,
+ ov3640_setting_15fps_XGA_1024_768,
+ ARRAY_SIZE(ov3640_setting_15fps_XGA_1024_768)},
+ {ov3640_mode_QXGA_2048_1536, 2048, 1536,
+ ov3640_setting_15fps_QXGA_2048_1536,
+ ARRAY_SIZE(ov3640_setting_15fps_QXGA_2048_1536)},
},
{
{ov3640_mode_VGA_640_480, 640, 480,
@@ -679,16 +830,18 @@ static struct ov3640_mode_info ov3640_mode_info_data[2][ov3640_mode_MAX + 1] = {
{ov3640_mode_QVGA_320_240, 320, 240,
ov3640_setting_30fps_QVGA_320_240,
ARRAY_SIZE(ov3640_setting_30fps_QVGA_320_240)},
- {ov3640_mode_XGA_1024_768, 1024, 768,
- ov3640_setting_30fps_XGA_1024_768,
- ARRAY_SIZE(ov3640_setting_30fps_XGA_1024_768)},
- {ov3640_mode_QXGA_2048_1536, 0, 0, NULL, 0},
{ov3640_mode_NTSC_720_480, 720, 480,
ov3640_setting_30fps_NTSC_720_480,
ARRAY_SIZE(ov3640_setting_30fps_NTSC_720_480)},
{ov3640_mode_PAL_720_576, 720, 576,
ov3640_setting_30fps_PAL_720_576,
ARRAY_SIZE(ov3640_setting_30fps_PAL_720_576)},
+ {ov3640_mode_720P_1280_720, 0, 0, NULL, 0},
+ {ov3640_mode_1080P_1920_1080, 0, 0, NULL, 0},
+ {ov3640_mode_XGA_1024_768, 1024, 768,
+ ov3640_setting_30fps_XGA_1024_768,
+ ARRAY_SIZE(ov3640_setting_30fps_XGA_1024_768)},
+ {ov3640_mode_QXGA_2048_1536, 0, 0, NULL, 0},
},
};
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 0cdef1fb56e4..8437794d94f9 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1729,8 +1729,6 @@ int sdhci_suspend_host(struct sdhci_host *host, pm_message_t state)
{
int ret;
- mmc_claim_host(host->mmc);
-
sdhci_enable_clk(host);
sdhci_disable_card_detection(host);
@@ -1761,7 +1759,7 @@ int sdhci_resume_host(struct sdhci_host *host)
if (host->vmmc) {
ret = regulator_enable(host->vmmc);
if (ret)
- goto out;
+ return ret;
}
sdhci_enable_clk(host);
@@ -1788,7 +1786,6 @@ out:
/* sync worker */
sdhci_disable_clk(host, 0);
- mmc_release_host(host->mmc);
return ret;
}
diff --git a/drivers/mxc/asrc/mxc_asrc.c b/drivers/mxc/asrc/mxc_asrc.c
index 37528eb90752..bf36aec4bd34 100644
--- a/drivers/mxc/asrc/mxc_asrc.c
+++ b/drivers/mxc/asrc/mxc_asrc.c
@@ -130,12 +130,6 @@ static const unsigned char asrc_process_table[][8][2] = {
{{2, 2}, {2, 2}, {2, 2}, {2, 1}, {2, 1}, {2, 1}, {2, 1}, {2, 1},},
};
-static const unsigned char asrc_divider_table[] = {
-/*5500Hz 8kHz 11025Hz 16kHz 22050kHz 32kHz 44.1kHz 48kHz 64kHz 88.2kHz 96kHz 176400Hz 192kHz*/
- 0x07, 0x15, 0x06, 0x14, 0x05, 0x13, 0x04, 0x04, 0x12, 0x03, 0x03, 0x02,
- 0x02,
-};
-
static struct asrc_data *g_asrc_data;
static struct proc_dir_entry *proc_asrc;
static unsigned long asrc_vrt_base_addr;
@@ -294,54 +288,29 @@ static int asrc_set_process_configuration(enum asrc_pair_index index,
return 0;
}
-static int asrc_get_asrck_clock_divider(int sample_rate)
+static int asrc_get_asrck_clock_divider(int samplerate)
{
- int i = 0;
- switch (sample_rate) {
- case 5500:
- i = 0;
- break;
- case 8000:
- i = 1;
- break;
- case 11025:
- i = 2;
- break;
- case 16000:
- i = 3;
- break;
- case 22050:
- i = 4;
- break;
- case 32000:
- i = 5;
- break;
- case 44100:
- i = 6;
- break;
- case 48000:
- i = 7;
- break;
- case 64000:
- i = 8;
- break;
- case 88200:
- i = 9;
- break;
- case 96000:
- i = 10;
- break;
- case 176400:
- i = 11;
- break;
- case 192000:
- i = 12;
- break;
- default:
- return -1;
+ unsigned int prescaler, divider;
+ unsigned int i;
+ unsigned int ratio, ra;
+ unsigned long bitclk = clk_get_rate(mxc_asrc_data->asrc_audio_clk);
+
+ ra = bitclk/samplerate;
+ ratio = ra;
+ /*calculate the prescaler*/
+ i = 0;
+ while (ratio > 8) {
+ i++;
+ ratio = ratio >> 1;
}
-
- return asrc_divider_table[i];
+ prescaler = i;
+ /*calculate the divider*/
+ if (i >= 1)
+ divider = ((ra + (1 << (i - 1)) - 1) >> i) - 1;
+ else
+ divider = ra - 1;
+ /*the totally divider is (2^prescaler)*divider*/
+ return (divider << 3) + prescaler;
}
int asrc_req_pair(int chn_num, enum asrc_pair_index *index)
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index c216a0bd111a..36df2db855a1 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -38,6 +38,10 @@
#include <mach/clock.h>
#include <mach/hardware.h>
+#ifdef CONFIG_ARCH_MXC
+#include <mach/iomux-v3.h>
+#endif
+
#define DRV_NAME "flexcan"
/* 8 for RX fifo and 2 error handling */
@@ -573,6 +577,13 @@ static irqreturn_t flexcan_irq(int irq, void *dev_id)
reg_esr = readl(&regs->esr);
writel(FLEXCAN_ESR_ERR_INT, &regs->esr); /* ACK err IRQ */
+ if (reg_esr & FLEXCAN_ESR_WAK_INT) {
+ /* first clear stop request then wakeup irq status */
+ if (priv->version >= FLEXCAN_VER_10_0_12)
+ mxc_iomux_set_gpr_register(13, 28, 1, 0);
+ writel(FLEXCAN_ESR_WAK_INT, &regs->esr);
+ }
+
/*
* schedule NAPI in case of:
* - rx IRQ
@@ -691,12 +702,14 @@ static int flexcan_chip_start(struct net_device *dev)
* only supervisor access
* enable warning int
* choose format C
+ * enable self wakeup
*
*/
reg_mcr = readl(&regs->mcr);
reg_mcr |= FLEXCAN_MCR_FRZ | FLEXCAN_MCR_FEN | FLEXCAN_MCR_HALT |
FLEXCAN_MCR_SUPV | FLEXCAN_MCR_WRN_EN |
- FLEXCAN_MCR_IDAM_C;
+ FLEXCAN_MCR_IDAM_C | FLEXCAN_MCR_WAK_MSK |
+ FLEXCAN_MCR_SLF_WAK;
dev_dbg(dev->dev.parent, "%s: writing mcr=0x%08x", __func__, reg_mcr);
writel(reg_mcr, &regs->mcr);
@@ -1046,11 +1059,63 @@ static int __devexit flexcan_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_PM
+static int flexcan_suspend(struct platform_device *pdev, pm_message_t state)
+{
+ struct net_device *dev = platform_get_drvdata(pdev);
+ struct flexcan_priv *priv = netdev_priv(dev);
+ int ret;
+
+ if (netif_running(dev)) {
+ netif_stop_queue(dev);
+ netif_device_detach(dev);
+ }
+
+ priv->can.state = CAN_STATE_SLEEPING;
+
+ /* enable stop request for wakeup */
+ if (priv->version >= FLEXCAN_VER_10_0_12)
+ mxc_iomux_set_gpr_register(13, 28, 1, 1);
+
+ ret = set_irq_wake(dev->irq, 1);
+ if (ret)
+ return ret;
+
+ return 0;
+}
+
+static int flexcan_resume(struct platform_device *pdev)
+{
+ struct net_device *dev = platform_get_drvdata(pdev);
+ struct flexcan_priv *priv = netdev_priv(dev);
+ int ret;
+
+ ret = set_irq_wake(dev->irq, 0);
+ if (ret)
+ return ret;
+
+ priv->can.state = CAN_STATE_ERROR_ACTIVE;
+
+ if (netif_running(dev)) {
+ netif_device_attach(dev);
+ netif_start_queue(dev);
+ }
+
+ return 0;
+}
+#else
+#define flexcan_suspend NULL
+#define flexcan_resume NULL
+#endif
+
+
static struct platform_driver flexcan_driver = {
.driver.name = DRV_NAME,
.probe = flexcan_probe,
.id_table = flexcan_devtype,
.remove = __devexit_p(flexcan_remove),
+ .suspend = flexcan_suspend,
+ .resume = flexcan_resume,
};
static int __init flexcan_init(void)
diff --git a/drivers/usb/gadget/f_audio.c b/drivers/usb/gadget/f_audio.c
index 2d285ec6e8bc..3bc1fe2758e3 100644
--- a/drivers/usb/gadget/f_audio.c
+++ b/drivers/usb/gadget/f_audio.c
@@ -644,6 +644,10 @@ static int f_audio_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
static void f_audio_disable(struct usb_function *f)
{
+ struct f_audio *audio = func_to_audio(f);
+
+ usb_ep_disable(audio->out_ep);
+
return;
}
diff --git a/drivers/usb/host/ehci-arc.c b/drivers/usb/host/ehci-arc.c
index 4e6674a684df..1d015c92fc9c 100644
--- a/drivers/usb/host/ehci-arc.c
+++ b/drivers/usb/host/ehci-arc.c
@@ -155,6 +155,16 @@ static irqreturn_t ehci_fsl_pre_irq(int irq, void *dev)
pdata->wakeup_event = 0;
fsl_usb_recover_hcd(pdev);
return IRQ_HANDLED;
+ } else {
+ u32 portsc = 0;
+ struct ehci_hcd *ehci = hcd_to_ehci(hcd);
+ portsc = ehci_readl(ehci, &ehci->regs->port_status[0]);
+ /* PORT_USB11 macro is used to judge line state K*/
+ if ((PORT_USB11(portsc)) && (portsc & PORT_SUSPEND)) {
+ pdata = hcd->self.controller->platform_data;
+ if (pdata->platform_resume)
+ pdata->platform_resume(pdata);
+ }
}
return IRQ_NONE;
}
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
index 8a515f0d5988..69b7a31612aa 100644
--- a/drivers/usb/host/ehci-hub.c
+++ b/drivers/usb/host/ehci-hub.c
@@ -28,6 +28,10 @@
/*-------------------------------------------------------------------------*/
+#ifdef CONFIG_ARCH_MX6
+#define MX6_USB_HOST_HACK
+#include <linux/fsl_devices.h>
+#endif
#define PORT_WAKE_BITS (PORT_WKOC_E|PORT_WKDISC_E|PORT_WKCONN_E)
#ifdef CONFIG_PM
@@ -1032,6 +1036,14 @@ static int ehci_hub_control (
temp &= ~PORT_WKCONN_E;
temp |= PORT_WKDISC_E | PORT_WKOC_E;
ehci_writel(ehci, temp | PORT_SUSPEND, status_reg);
+#ifdef MX6_USB_HOST_HACK
+ {
+ struct fsl_usb2_platform_data *pdata;
+ pdata = hcd->self.controller->platform_data;
+ if (pdata->platform_suspend)
+ pdata->platform_suspend(pdata);
+ }
+#endif
if (hostpc_reg) {
spin_unlock_irqrestore(&ehci->lock, flags);
msleep(5);/* 5ms for HCD enter low pwr mode */
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 00fa1c5612c4..6a423dafb9cf 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -1152,7 +1152,7 @@ static struct snd_soc_dai_driver sgtl5000_dai = {
.name = "sgtl5000",
.playback = {
.stream_name = "Playback",
- .channels_min = 1,
+ .channels_min = 2,
.channels_max = 2,
/*
* only support 8~48K + 96K,
@@ -1163,7 +1163,7 @@ static struct snd_soc_dai_driver sgtl5000_dai = {
},
.capture = {
.stream_name = "Capture",
- .channels_min = 1,
+ .channels_min = 2,
.channels_max = 2,
.rates = SNDRV_PCM_RATE_8000_48000 | SNDRV_PCM_RATE_96000,
.formats = SGTL5000_FORMATS,