diff options
Diffstat (limited to 'arch/arm/plat-mxc')
-rwxr-xr-x | arch/arm/plat-mxc/cpufreq.c | 20 | ||||
-rwxr-xr-x | arch/arm/plat-mxc/devices/Kconfig | 3 | ||||
-rwxr-xr-x | arch/arm/plat-mxc/devices/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/plat-mxc/devices/platform-dma.c | 8 | ||||
-rw-r--r-- | arch/arm/plat-mxc/devices/platform-imx-fsl-csi.c | 55 | ||||
-rw-r--r-- | arch/arm/plat-mxc/devices/platform-imx-uart.c | 12 | ||||
-rwxr-xr-x | arch/arm/plat-mxc/include/mach/devices-common.h | 12 | ||||
-rwxr-xr-x | arch/arm/plat-mxc/include/mach/iomux-mx6sl.h | 9 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/mx6.h | 17 | ||||
-rwxr-xr-x | arch/arm/plat-mxc/include/mach/mxc.h | 4 | ||||
-rwxr-xr-x | arch/arm/plat-mxc/usb_common.c | 37 |
11 files changed, 123 insertions, 55 deletions
diff --git a/arch/arm/plat-mxc/cpufreq.c b/arch/arm/plat-mxc/cpufreq.c index e7278d9501a5..cc26b7adbc76 100755 --- a/arch/arm/plat-mxc/cpufreq.c +++ b/arch/arm/plat-mxc/cpufreq.c @@ -95,15 +95,19 @@ int set_cpu_freq(int freq) ret = regulator_set_voltage(soc_regulator, soc_volt, soc_volt); if (ret < 0) { - printk(KERN_DEBUG "COULD NOT SET SOC VOLTAGE!!!!\n"); + printk(KERN_DEBUG + "COULD NOT SET SOC VOLTAGE!!!!\n"); return ret; } } - if (!IS_ERR(pu_regulator)) { + /*if pu_regulator is enabled, it will be tracked with VDDARM*/ + if (!IS_ERR(pu_regulator) && + regulator_is_enabled(pu_regulator)) { ret = regulator_set_voltage(pu_regulator, pu_volt, pu_volt); if (ret < 0) { - printk(KERN_DEBUG "COULD NOT SET PU VOLTAGE!!!!\n"); + printk(KERN_DEBUG + "COULD NOT SET PU VOLTAGE!!!!\n"); return ret; } } @@ -132,15 +136,19 @@ int set_cpu_freq(int freq) ret = regulator_set_voltage(soc_regulator, soc_volt, soc_volt); if (ret < 0) { - printk(KERN_DEBUG "COULD NOT SET SOC VOLTAGE BACK!!!!\n"); + printk(KERN_DEBUG + "COULD NOT SET SOC VOLTAGE BACK!!!!\n"); return ret; } } - if (!IS_ERR(pu_regulator)) { + /*if pu_regulator is enabled, it will be tracked with VDDARM*/ + if (!IS_ERR(pu_regulator) && + regulator_is_enabled(pu_regulator)) { ret = regulator_set_voltage(pu_regulator, pu_volt, pu_volt); if (ret < 0) { - printk(KERN_DEBUG "COULD NOT SET PU VOLTAGE!!!!\n"); + printk(KERN_DEBUG + "COULD NOT SET PU VOLTAGE!!!!\n"); return ret; } } diff --git a/arch/arm/plat-mxc/devices/Kconfig b/arch/arm/plat-mxc/devices/Kconfig index bdea66b7a1f4..2e666bac3afd 100755 --- a/arch/arm/plat-mxc/devices/Kconfig +++ b/arch/arm/plat-mxc/devices/Kconfig @@ -185,3 +185,6 @@ config IMX_HAVE_PLATFORM_IMX_VDOA config IMX_HAVE_PLATFORM_IMX_PCIE bool + +config IMX_HAVE_PLATFORM_IMX_FSL_CSI + bool diff --git a/arch/arm/plat-mxc/devices/Makefile b/arch/arm/plat-mxc/devices/Makefile index 41287783cb80..102eeaaff38b 100755 --- a/arch/arm/plat-mxc/devices/Makefile +++ b/arch/arm/plat-mxc/devices/Makefile @@ -66,4 +66,5 @@ obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_MIPI_DSI) += platform-imx-mipi_dsi.o obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_MIPI_CSI2) += platform-imx-mipi_csi2.o obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_VDOA) += platform-imx-vdoa.o obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_PCIE) += platform-imx-pcie.o +obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_FSL_CSI) += platform-imx-fsl-csi.o obj-y += platform-imx-pmu.o diff --git a/arch/arm/plat-mxc/devices/platform-dma.c b/arch/arm/plat-mxc/devices/platform-dma.c index b2cba3db6d6d..7f731954192e 100644 --- a/arch/arm/plat-mxc/devices/platform-dma.c +++ b/arch/arm/plat-mxc/devices/platform-dma.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright (C) 2011-2012 Freescale Semiconductor, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License version 2 as published by the @@ -13,19 +13,19 @@ #include <mach/devices-common.h> #ifdef CONFIG_SOC_IMX50 -const struct imx_dma_data imx50_dma_data __initconst = { +const struct imx_dma_res_data imx50_dma_res_data __initconst = { .iobase = MX50_APBHDMA_BASE_ADDR, }; #endif #ifdef CONFIG_SOC_IMX6Q -const struct imx_dma_data imx6q_dma_data __initconst = { +const struct imx_dma_res_data imx6q_dma_res_data __initconst = { .iobase = APBH_DMA_ARB_BASE_ADDR, }; #endif struct platform_device *__init imx_add_dma( - const struct imx_dma_data *data) + const struct imx_dma_res_data *data) { struct resource res[] = { { diff --git a/arch/arm/plat-mxc/devices/platform-imx-fsl-csi.c b/arch/arm/plat-mxc/devices/platform-imx-fsl-csi.c new file mode 100644 index 000000000000..8b6601ccc5a0 --- /dev/null +++ b/arch/arm/plat-mxc/devices/platform-imx-fsl-csi.c @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2012 Freescale Semiconductor, Inc. All Rights Reserved. + */ + +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include <asm/sizes.h> +#include <mach/hardware.h> +#include <mach/devices-common.h> + +#define imx_fsl_csi_data_entry_single(soc, size) \ + { \ + .iobase = soc ## _CSI_BASE_ADDR, \ + .irq = soc ## _INT_CSI, \ + .iosize = size, \ + } + +#ifdef CONFIG_SOC_IMX6SL +const struct imx_fsl_csi_data imx6sl_csi_data __initconst = + imx_fsl_csi_data_entry_single(MX6SL, SZ_16K); +#endif + +struct platform_device *__init imx_add_fsl_csi( + const struct imx_fsl_csi_data *data) +{ + struct resource res[] = { + { + .start = data->iobase, + .end = data->iobase + data->iosize - 1, + .flags = IORESOURCE_MEM, + }, { + .start = data->irq, + .end = data->irq, + .flags = IORESOURCE_IRQ, + }, + }; + + return imx_add_platform_device("fsl_csi", -1, + res, ARRAY_SIZE(res), NULL, 0); +} + diff --git a/arch/arm/plat-mxc/devices/platform-imx-uart.c b/arch/arm/plat-mxc/devices/platform-imx-uart.c index ecfadc3060ea..7f70dc9f8e07 100644 --- a/arch/arm/plat-mxc/devices/platform-imx-uart.c +++ b/arch/arm/plat-mxc/devices/platform-imx-uart.c @@ -137,6 +137,18 @@ const struct imx_imx_uart_1irq_data imx6q_imx_uart_data[] __initconst = { }; #endif /* ifdef CONFIG_SOC_IMX6Q */ +#ifdef CONFIG_SOC_IMX6SL +const struct imx_imx_uart_1irq_data imx6sl_imx_uart_data[] __initconst = { +#define imx6sl_imx_uart_data_entry(_id, _hwid) \ + imx_imx_uart_1irq_data_entry(MX6SL, _id, _hwid, SZ_4K) + imx6sl_imx_uart_data_entry(0, 1), + imx6sl_imx_uart_data_entry(1, 2), + imx6sl_imx_uart_data_entry(2, 3), + imx6sl_imx_uart_data_entry(3, 4), + imx6sl_imx_uart_data_entry(4, 5), +}; +#endif /* ifdef CONFIG_SOC_IMX6SL */ + struct platform_device *__init imx_add_imx_uart_3irq( const struct imx_imx_uart_3irq_data *data, const struct imxuart_platform_data *pdata) diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h b/arch/arm/plat-mxc/include/mach/devices-common.h index 99ef8abee1e3..1ff68bd8b6dd 100755 --- a/arch/arm/plat-mxc/include/mach/devices-common.h +++ b/arch/arm/plat-mxc/include/mach/devices-common.h @@ -25,10 +25,10 @@ static inline struct platform_device *imx_add_platform_device( name, id, res, num_resources, data, size_data, 0); } -struct imx_dma_data { +struct imx_dma_res_data { resource_size_t iobase; }; -struct platform_device *__init imx_add_dma(const struct imx_dma_data *data); +struct platform_device *__init imx_add_dma(const struct imx_dma_res_data *data); #include <linux/fec.h> struct imx_fec_data { @@ -690,3 +690,11 @@ struct platform_device *__init imx_add_pcie( const struct imx_pcie_platform_data *pdata); void __init imx_add_imx_armpmu(void); + +struct imx_fsl_csi_data { + resource_size_t iobase; + resource_size_t iosize; + resource_size_t irq; +}; +struct platform_device *__init imx_add_fsl_csi( + const struct imx_fsl_csi_data *data); diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx6sl.h b/arch/arm/plat-mxc/include/mach/iomux-mx6sl.h index 296df42d3ef7..90de1dd8f4fb 100755 --- a/arch/arm/plat-mxc/include/mach/iomux-mx6sl.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mx6sl.h @@ -77,6 +77,9 @@ #define MX6SL_ADU_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \ PAD_CTL_DSE_40ohm | PAD_CTL_PUS_100K_DOWN | \ PAD_CTL_HYS | PAD_CTL_SPEED_MED) +#define MX6SL_CHG_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_PKE | PAD_CTL_PUE | \ + PAD_CTL_PUS_47K_UP) + #define MX6SL_PAD_AUD_MCLK 0x02A4 #define MX6SL_PAD_AUD_RXD 0x02AC @@ -510,7 +513,7 @@ IOMUX_PAD(0x0364, 0x0074, 7, 0x0000, 0, NO_PAD_CTRL) #define MX6SL_PAD_ECSPI2_MISO__GPIO_4_14 \ - IOMUX_PAD(0x0368, 0x0078, 5, 0x0000, 0, NO_PAD_CTRL) + IOMUX_PAD(0x0368, 0x0078, 5, 0x0000, 0, MX6SL_CHG_PAD_CTRL) #define MX6SL_PAD_ECSPI2_MISO__USB_USBOTG1_OC \ IOMUX_PAD(0x0368, 0x0078, 6, 0x0824, 0, NO_PAD_CTRL) #define MX6SL_PAD_ECSPI2_MISO__TPSMP_HDATA_23 \ @@ -541,7 +544,7 @@ #define MX6SL_PAD_ECSPI2_MOSI__USDHC1_VSELECT \ IOMUX_PAD(0x036C, 0x007C, 4, 0x0000, 0, MX6SL_USDHC_PAD_CTRL) #define MX6SL_PAD_ECSPI2_MOSI__GPIO_4_13 \ - IOMUX_PAD(0x036C, 0x007C, 5, 0x0000, 0, NO_PAD_CTRL) + IOMUX_PAD(0x036C, 0x007C, 5, 0x0000, 0, MX6SL_CHG_PAD_CTRL) #define MX6SL_PAD_ECSPI2_MOSI__ANATOP_ANATOP_TESTO_1 \ IOMUX_PAD(0x036C, 0x007C, 6, 0x0000, 0, NO_PAD_CTRL) #define MX6SL_PAD_ECSPI2_MOSI__TPSMP_HDATA_22 \ @@ -579,7 +582,7 @@ #define MX6SL_PAD_ECSPI2_SS0__USDHC1_CD \ IOMUX_PAD(0x0374, 0x0084, 4, 0x0828, 0, MX6SL_USDHC_PAD_CTRL) #define MX6SL_PAD_ECSPI2_SS0__GPIO_4_15 \ - IOMUX_PAD(0x0374, 0x0084, 5, 0x0000, 0, NO_PAD_CTRL) + IOMUX_PAD(0x0374, 0x0084, 5, 0x0000, 0, MX6SL_CHG_PAD_CTRL) #define MX6SL_PAD_ECSPI2_SS0__USB_USBOTG1_PWR \ IOMUX_PAD(0x0374, 0x0084, 6, 0x0000, 0, NO_PAD_CTRL) #define MX6SL_PAD_ECSPI2_SS0__PL301_SIM_MX6SL_PER1_HADDR_24 \ diff --git a/arch/arm/plat-mxc/include/mach/mx6.h b/arch/arm/plat-mxc/include/mach/mx6.h index aaf8b998ca63..dfb3f6489cc1 100644 --- a/arch/arm/plat-mxc/include/mach/mx6.h +++ b/arch/arm/plat-mxc/include/mach/mx6.h @@ -77,7 +77,7 @@ #define MX6Q_IRAM_BASE_ADDR IRAM_BASE_ADDR /* The last 4K is for cpu hotplug to workaround wdog issue*/ #define MX6Q_IRAM_SIZE (SZ_256K - SZ_4K) -#define MX6DL_IRAM_SIZE (SZ_128K - SZ_4K) +#define MX6DL_MX6SL_IRAM_SIZE (SZ_128K - SZ_4K) /* Blocks connected via pl301periph */ #define ROMCP_ARB_BASE_ADDR 0x00000000 @@ -145,6 +145,7 @@ #define MX6SL_UART5_BASE_ADDR (ATZ1_BASE_ADDR + 0x18000) /* MX6SL */ #define UART1_BASE_ADDR (ATZ1_BASE_ADDR + 0x20000) /* slot 8 */ #define ESAI1_BASE_ADDR (ATZ1_BASE_ADDR + 0x24000) /* slot 9 */ +#define MX6SL_UART1_BASE_ADDR (ATZ1_BASE_ADDR + 0x20000) /* MX6SL */ #define MX6SL_UART2_BASE_ADDR (ATZ1_BASE_ADDR + 0x24000) /* MX6SL */ #define MX6Q_SSI1_BASE_ADDR (ATZ1_BASE_ADDR + 0x28000) /* slot 10 */ #define MX6Q_SSI2_BASE_ADDR (ATZ1_BASE_ADDR + 0x2C000) /* slot 11 */ @@ -215,6 +216,14 @@ /* ARM Cortex A9 MPCore Platform */ #define MX6Q_A9_PLATFRM_BASE (ARM_BASE_ADDR + 0x20000) +/* ARM Cortex A9 PTM */ +#define MX6Q_PTM0_BASE_ADDR 0x0215C000 +#define MX6Q_PTM1_BASE_ADDR 0x0215D000 +#define MX6Q_PTM2_BASE_ADDR 0x0215E000 +#define MX6Q_PTM3_BASE_ADDR 0x0215F000 +#define MX6Q_FUNNEL_BASE_ADDR 0x02144000 +#define MX6Q_ETB_BASE_ADDR 0x02141000 + #define MX6Q_PL301_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x0000) #define MX6Q_USB_OTG_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x4000) #define MX6Q_USB_HS1_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x4200) @@ -327,6 +336,7 @@ #define MX6SL_INT_SPDC 38 #define MX6Q_INT_IPU2_ERR 39 #define MX6DL_INT_CSI 39 +#define MX6SL_INT_CSI 39 #define MX6Q_INT_IPU2_SYN 40 #define MXC_INT_GPU3D_IRQ 41 #define MXC_INT_GPU2D_IRQ 42 @@ -474,6 +484,11 @@ #define MX6Q_INT_UART2 MXC_INT_UART2_ANDED #define MX6Q_INT_UART3 MXC_INT_UART3_ANDED #define MX6Q_INT_UART4 MXC_INT_UART4_ANDED +#define MX6SL_INT_UART1 MXC_INT_UART1_ANDED +#define MX6SL_INT_UART2 MXC_INT_UART2_ANDED +#define MX6SL_INT_UART3 MXC_INT_UART3_ANDED +#define MX6SL_INT_UART4 MXC_INT_UART4_ANDED +#define MX6SL_INT_UART5 MXC_INT_UART5_ANDED #define MX6Q_INT_FEC MXC_INT_ENET1 #define MX6Q_INT_DSI MXC_INT_DSI diff --git a/arch/arm/plat-mxc/include/mach/mxc.h b/arch/arm/plat-mxc/include/mach/mxc.h index 23159090ace8..4260d4a25c2c 100755 --- a/arch/arm/plat-mxc/include/mach/mxc.h +++ b/arch/arm/plat-mxc/include/mach/mxc.h @@ -266,8 +266,8 @@ enum mxc_cpu_pwr_mode { WAIT_CLOCKED, /* wfi only */ WAIT_UNCLOCKED, /* WAIT */ WAIT_UNCLOCKED_POWER_OFF, /* WAIT + SRPG */ - STOP_POWER_ON, /* just STOP */ - STOP_POWER_OFF, /* STOP + SRPG */ + STOP_XTAL_ON, /* STOP + SRPG + XTAL_ON*/ + STOP_POWER_OFF, /* STOP + XTAL_OFF */ ARM_POWER_OFF, /* STOP + SRPG + ARM power off */ }; diff --git a/arch/arm/plat-mxc/usb_common.c b/arch/arm/plat-mxc/usb_common.c index d85d8d663571..97d963a54a54 100755 --- a/arch/arm/plat-mxc/usb_common.c +++ b/arch/arm/plat-mxc/usb_common.c @@ -53,9 +53,7 @@ typedef void (*driver_vbus_func)(bool); void __iomem *imx_otg_base; static driver_vbus_func s_driver_vbus; -static int stop_mode_refcount; -DEFINE_MUTEX(usb_common_mutex); EXPORT_SYMBOL(imx_otg_base); #define MXC_NUMBER_USB_TRANSCEIVER 6 @@ -73,41 +71,6 @@ bool usb_icbug_swfix_need(void) } EXPORT_SYMBOL(usb_icbug_swfix_need); -/* - * The Mx6 phy sometimes work abnormally after system suspend/resume if the 1V1 is off. - * So we should keep the 1V1 active during the system suspend if any USB host enabled. - * Set stop_mode_config when any USB host enabled by default, it will impact on system power. - * #define DISABLE_STOP_MODE will disable the feature. - */ -#ifndef DISABLE_STOP_MODE -int usb_stop_mode_refcount(bool enable) -{ - if (enable) - stop_mode_refcount++; - else - stop_mode_refcount--; - return stop_mode_refcount; -} -#else -int usb_stop_mode_refcount(bool enable) -{ - return 0; -} -#endif -EXPORT_SYMBOL(usb_stop_mode_refcount); - -void usb_stop_mode_lock(void) -{ - mutex_lock(&usb_common_mutex); -} -EXPORT_SYMBOL(usb_stop_mode_lock); - -void usb_stop_mode_unlock(void) -{ - mutex_unlock(&usb_common_mutex); -} -EXPORT_SYMBOL(usb_stop_mode_unlock); - void mx6_set_host1_vbus_func(driver_vbus_func driver_vbus) { s_driver_vbus = driver_vbus; |