diff options
author | yagi <yagi@ke66.alps.lineo.co.jp> | 2012-06-01 12:00:41 +0900 |
---|---|---|
committer | Justin Waters <justin.waters@timesys.com> | 2012-07-03 17:15:03 -0400 |
commit | 303d272518e78cba565224686560bc6980536a96 (patch) | |
tree | a79285ac084059b40e4cdc86c0601d7c364962f9 | |
parent | 2c5244aebcae8252923f293e1b5f05372c98a8d7 (diff) |
commit: 2012.06.01 MSL modification
-rw-r--r-- | arch/arm/mach-mvf/Kconfig | 4 | ||||
-rw-r--r-- | arch/arm/mach-mvf/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-mvf/board-twr_vf600.c | 196 | ||||
-rw-r--r-- | arch/arm/mach-mvf/clock.c | 13 | ||||
-rw-r--r-- | arch/arm/mach-mvf/devices-mvf.h | 197 | ||||
-rw-r--r-- | arch/arm/mach-mvf/mvf_fec.c | 8 | ||||
-rw-r--r-- | arch/arm/plat-mxc/devices/platform-fec.c | 5 | ||||
-rwxr-xr-x | arch/arm/plat-mxc/include/mach/common.h | 1 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/mvf.h | 20 | ||||
-rw-r--r-- | arch/arm/plat-mxc/iomux-vmvf.c | 15 |
10 files changed, 80 insertions, 381 deletions
diff --git a/arch/arm/mach-mvf/Kconfig b/arch/arm/mach-mvf/Kconfig index 44757909765e..f6f237f7a389 100644 --- a/arch/arm/mach-mvf/Kconfig +++ b/arch/arm/mach-mvf/Kconfig @@ -8,7 +8,7 @@ config ARCH_VF6XX select ARM_GIC #select ARCH_HAS_CPUFREQ #select IMX_HAVE_PLATFORM_IMX_UART - #select IMX_HAVE_PLATFORM_FEC + select IMX_HAVE_PLATFORM_FEC #select IMX_HAVE_PLATFORM_IMX_ANATOP_THERMAL #select IMX_HAVE_PLATFORM_IMX_IPUV3 #select IMX_HAVE_PLATFORM_MXC_PWM @@ -24,7 +24,7 @@ config MACH_TWR_VF600 select SOC_VF6XX #select IMX_HAVE_PLATFORM_IMX_UART #select IMX_HAVE_PLATFORM_DMA - #select IMX_HAVE_PLATFORM_FEC + select IMX_HAVE_PLATFORM_FEC #select IMX_HAVE_PLATFORM_GPMI_NFC #select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX #select IMX_HAVE_PLATFORM_SPI_IMX diff --git a/arch/arm/mach-mvf/Makefile b/arch/arm/mach-mvf/Makefile index ca85b5ee3769..a601ac34fa12 100644 --- a/arch/arm/mach-mvf/Makefile +++ b/arch/arm/mach-mvf/Makefile @@ -3,6 +3,6 @@ # # Object file lists. -obj-y := mm.o devices.o irq.o clock.o bus_freq.o system.o +obj-y := mm.o devices.o irq.o clock.o bus_freq.o system.o mvf_fec.o obj-$(CONFIG_MACH_TWR_VF600) += board-twr_vf600.o diff --git a/arch/arm/mach-mvf/board-twr_vf600.c b/arch/arm/mach-mvf/board-twr_vf600.c index 3c87ebbc3e5e..e2a4bf71794d 100644 --- a/arch/arm/mach-mvf/board-twr_vf600.c +++ b/arch/arm/mach-mvf/board-twr_vf600.c @@ -80,91 +80,7 @@ #include "board-twr_vf600.h" #if 0 //FIXME -/* GPIO PIN, sort by PORT/BIT */ -#define MX6_ARM2_LDB_BACKLIGHT IMX_GPIO_NR(1, 9) -#define MX6_ARM2_ECSPI1_CS0 IMX_GPIO_NR(2, 30) -#define MX6_ARM2_ECSPI1_CS1 IMX_GPIO_NR(3, 19) -#define MX6_ARM2_USB_OTG_PWR IMX_GPIO_NR(3, 22) -#define MX6_ARM2_DISP0_PWR IMX_GPIO_NR(3, 24) -#define MX6_ARM2_DISP0_I2C_EN IMX_GPIO_NR(3, 28) -#define MX6_ARM2_CAP_TCH_INT IMX_GPIO_NR(3, 31) -#define MX6_ARM2_DISP0_DET_INT IMX_GPIO_NR(3, 31) -#define MX6_ARM2_CSI0_RST IMX_GPIO_NR(4, 5) -#define MX6_ARM2_DISP0_RESET IMX_GPIO_NR(5, 0) -#define MX6_ARM2_CSI0_PWN IMX_GPIO_NR(5, 23) -#define MX6_ARM2_CAN2_EN IMX_GPIO_NR(5, 24) -#define MX6_ARM2_CSI0_RST_TVIN IMX_GPIO_NR(5, 25) -#define MX6_ARM2_SD3_CD IMX_GPIO_NR(6, 11) -#define MX6_ARM2_SD3_WP IMX_GPIO_NR(6, 14) -#define MX6_ARM2_CAN1_STBY IMX_GPIO_NR(7, 12) -#define MX6_ARM2_CAN1_EN IMX_GPIO_NR(7, 13) -#define MX6_ARM2_MAX7310_1_BASE_ADDR IMX_GPIO_NR(8, 0) -#define MX6_ARM2_MAX7310_2_BASE_ADDR IMX_GPIO_NR(8, 8) -#define MX6DL_ARM2_EPDC_SDDO_0 IMX_GPIO_NR(2, 22) -#define MX6DL_ARM2_EPDC_SDDO_1 IMX_GPIO_NR(3, 10) -#define MX6DL_ARM2_EPDC_SDDO_2 IMX_GPIO_NR(3, 12) -#define MX6DL_ARM2_EPDC_SDDO_3 IMX_GPIO_NR(3, 11) -#define MX6DL_ARM2_EPDC_SDDO_4 IMX_GPIO_NR(2, 27) -#define MX6DL_ARM2_EPDC_SDDO_5 IMX_GPIO_NR(2, 30) -#define MX6DL_ARM2_EPDC_SDDO_6 IMX_GPIO_NR(2, 23) -#define MX6DL_ARM2_EPDC_SDDO_7 IMX_GPIO_NR(2, 26) -#define MX6DL_ARM2_EPDC_SDDO_8 IMX_GPIO_NR(2, 24) -#define MX6DL_ARM2_EPDC_SDDO_9 IMX_GPIO_NR(3, 15) -#define MX6DL_ARM2_EPDC_SDDO_10 IMX_GPIO_NR(3, 16) -#define MX6DL_ARM2_EPDC_SDDO_11 IMX_GPIO_NR(3, 23) -#define MX6DL_ARM2_EPDC_SDDO_12 IMX_GPIO_NR(3, 19) -#define MX6DL_ARM2_EPDC_SDDO_13 IMX_GPIO_NR(3, 13) -#define MX6DL_ARM2_EPDC_SDDO_14 IMX_GPIO_NR(3, 14) -#define MX6DL_ARM2_EPDC_SDDO_15 IMX_GPIO_NR(5, 2) -#define MX6DL_ARM2_EPDC_GDCLK IMX_GPIO_NR(2, 17) -#define MX6DL_ARM2_EPDC_GDSP IMX_GPIO_NR(2, 16) -#define MX6DL_ARM2_EPDC_GDOE IMX_GPIO_NR(6, 6) -#define MX6DL_ARM2_EPDC_GDRL IMX_GPIO_NR(5, 4) -#define MX6DL_ARM2_EPDC_SDCLK IMX_GPIO_NR(3, 31) -#define MX6DL_ARM2_EPDC_SDOEZ IMX_GPIO_NR(3, 30) -#define MX6DL_ARM2_EPDC_SDOED IMX_GPIO_NR(3, 26) -#define MX6DL_ARM2_EPDC_SDOE IMX_GPIO_NR(3, 27) -#define MX6DL_ARM2_EPDC_SDLE IMX_GPIO_NR(3, 1) -#define MX6DL_ARM2_EPDC_SDCLKN IMX_GPIO_NR(3, 0) -#define MX6DL_ARM2_EPDC_SDSHR IMX_GPIO_NR(2, 29) -#define MX6DL_ARM2_EPDC_PWRCOM IMX_GPIO_NR(2, 28) -#define MX6DL_ARM2_EPDC_PWRSTAT IMX_GPIO_NR(2, 21) -#define MX6DL_ARM2_EPDC_PWRCTRL0 IMX_GPIO_NR(2, 20) -#define MX6DL_ARM2_EPDC_PWRCTRL1 IMX_GPIO_NR(2, 19) -#define MX6DL_ARM2_EPDC_PWRCTRL2 IMX_GPIO_NR(2, 18) -#define MX6DL_ARM2_EPDC_PWRCTRL3 IMX_GPIO_NR(3, 28) -#define MX6DL_ARM2_EPDC_BDR0 IMX_GPIO_NR(3, 2) -#define MX6DL_ARM2_EPDC_BDR1 IMX_GPIO_NR(3, 3) -#define MX6DL_ARM2_EPDC_SDCE0 IMX_GPIO_NR(3, 4) -#define MX6DL_ARM2_EPDC_SDCE1 IMX_GPIO_NR(3, 5) -#define MX6DL_ARM2_EPDC_SDCE2 IMX_GPIO_NR(3, 6) -#define MX6DL_ARM2_EPDC_SDCE3 IMX_GPIO_NR(3, 7) -#define MX6DL_ARM2_EPDC_SDCE4 IMX_GPIO_NR(3, 8) -#define MX6DL_ARM2_EPDC_SDCE5 IMX_GPIO_NR(3, 9) -#define MX6DL_ARM2_EPDC_PMIC_WAKE IMX_GPIO_NR(2, 31) -#define MX6DL_ARM2_EPDC_PMIC_INT IMX_GPIO_NR(2, 25) -#define MX6DL_ARM2_EPDC_VCOM IMX_GPIO_NR(3, 17) - -#define MX6_ARM2_IO_EXP_GPIO1(x) (MX6_ARM2_MAX7310_1_BASE_ADDR + (x)) -#define MX6_ARM2_IO_EXP_GPIO2(x) (MX6_ARM2_MAX7310_2_BASE_ADDR + (x)) - -#define MX6_ARM2_CAN2_STBY MX6_ARM2_IO_EXP_GPIO2(1) - - -#define BMCR_PDOWN 0x0800 /* PHY Powerdown */ - void __init early_console_setup(unsigned long base, struct clk *clk); -static int spdif_en; -static int flexcan_en; -static int disable_mipi_dsi; - -extern struct regulator *(*get_cpu_regulator)(void); -extern void (*put_cpu_regulator)(void); -extern char *gp_reg_id; -extern int epdc_enabled; -extern void mx6_cpu_regulator_init(void); -static int max17135_regulator_init(struct max17135 *max17135); - static const struct imxuart_platform_data mx6_arm2_uart1_data __initconst = { .flags = IMXUART_HAVE_RTSCTS | IMXUART_USE_DCEDTE | IMXUART_SDMA, @@ -177,7 +93,9 @@ static inline void twr_vf600_init_uart(void) imx6q_add_imx_uart(3, NULL); imx6q_add_imx_uart(1, &mx6_arm2_uart1_data); } +#endif //FIXME +//FIXME static int twr_vf600_fec_phy_init(struct phy_device *phydev) { unsigned short val; @@ -240,30 +158,6 @@ static const struct pm_platform_data twr_vf600_pm_data __initconst = { .suspend_exit = twr_vf600_suspend_exit, }; -static struct mxc_dvfs_platform_data arm2_dvfscore_data = { - .reg_id = "cpu_vddgp", - .clk1_id = "cpu_clk", - .clk2_id = "gpc_dvfs_clk", - .gpc_cntr_offset = MXC_GPC_CNTR_OFFSET, - .ccm_cdcr_offset = MXC_CCM_CDCR_OFFSET, - .ccm_cacrr_offset = MXC_CCM_CACRR_OFFSET, - .ccm_cdhipr_offset = MXC_CCM_CDHIPR_OFFSET, - .prediv_mask = 0x1F800, - .prediv_offset = 11, - .prediv_val = 3, - .div3ck_mask = 0xE0000000, - .div3ck_offset = 29, - .div3ck_val = 2, - .emac_val = 0x08, - .upthr_val = 25, - .dnthr_val = 9, - .pncthr_val = 33, - .upcnt_val = 10, - .dncnt_val = 10, - .delay_time = 80, -}; -#endif //FIXME - static void __init twr_vf600_fixup(struct machine_desc *desc, struct tag *tags, char **cmdline, struct meminfo *mi) { @@ -274,10 +168,7 @@ static void __init twr_vf600_fixup(struct machine_desc *desc, struct tag *tags, */ static void __init twr_vf600_init(void) { -#if 0 //FIXME - int i; - int ret; - iomux_vmf_cfg_t *common_pads = NULL; + iomux_vmvf_cfg_t *common_pads = NULL; int common_pads_cnt; /* @@ -285,8 +176,8 @@ static void __init twr_vf600_init(void) * feature_pds: pads are shared with others on this board */ - common_pads = mx6q_arm2_pads; - common_pads_cnt = ARRAY_SIZE(mx6q_arm2_pads); + common_pads = twr_vf6xx_pads; + common_pads_cnt = ARRAY_SIZE(twr_vf6xx_pads); BUG_ON(!common_pads); mxc_iomux_vmvf_setup_multiple_pads(common_pads, common_pads_cnt); @@ -302,7 +193,7 @@ static void __init twr_vf600_init(void) * Bit21: 0 - GPIO_16 pad output * 1 - GPIO_16 pad input */ - mxc_iomux_set_gpr_register(1, 21, 1, 1); + //mxc_iomux_set_gpr_register(1, 21, 1, 1); /* * the following is the common devices support on the shared ARM2 boards @@ -312,79 +203,16 @@ static void __init twr_vf600_init(void) * on each indivual SOC, we can use cpu_is_mx6q/6dl() to diff it. */ +#if 0 twr_vf600_init_uart(); mvf_add_imx_snvs_rtc(); +#endif mvf_init_fec(fec_data); - imx6q_add_pm_imx(0, &twr_vf600_pm_data); - imx6q_add_sdhci_usdhc_imx(3, &mx6_arm2_sd4_data); - imx6q_add_sdhci_usdhc_imx(2, &mx6_arm2_sd3_data); - imx_add_viv_gpu(&imx6_gpu_data, &imx6_gpu_pdata); - imx6q_add_vpu(); - twr_vf600_init_usb(); - twr_vf600_init_audio(); - platform_device_register(&arm2_vmmc_reg_devices); - mx6_cpu_regulator_init(); - - imx_asrc_data.asrc_core_clk = clk_get(NULL, "asrc_clk"); - imx_asrc_data.asrc_audio_clk = clk_get(NULL, "asrc_serial_clk"); - imx6q_add_asrc(&imx_asrc_data); - - /* DISP0 Reset - Assert for i2c disabled mode */ - gpio_request(MX6_ARM2_DISP0_RESET, "disp0-reset"); - gpio_direction_output(MX6_ARM2_DISP0_RESET, 0); - - /* DISP0 I2C enable */ - if (!disable_mipi_dsi) { - gpio_request(MX6_ARM2_DISP0_I2C_EN, "disp0-i2c"); - gpio_direction_output(MX6_ARM2_DISP0_I2C_EN, 0); - } - gpio_request(MX6_ARM2_DISP0_PWR, "disp0-pwr"); - gpio_direction_output(MX6_ARM2_DISP0_PWR, 1); - - gpio_request(MX6_ARM2_LDB_BACKLIGHT, "ldb-backlight"); - gpio_direction_output(MX6_ARM2_LDB_BACKLIGHT, 1); - imx6q_add_otp(); - imx6q_add_viim(); - imx6q_add_imx2_wdt(0, NULL); - imx6q_add_dma(); - imx6q_add_gpmi(&mx6_gpmi_nand_platform_data); - - imx6q_add_dvfs_core(&arm2_dvfscore_data); - - imx6q_add_mxc_pwm(0); - imx6q_add_mxc_pwm_backlight(0, &mx6_arm2_pwm_backlight_data); - - if (spdif_en) { - mxc_spdif_data.spdif_core_clk = clk_get_sys("mxc_spdif.0", NULL); - clk_put(mxc_spdif_data.spdif_core_clk); - imx6q_add_spdif(&mxc_spdif_data); - imx6q_add_spdif_dai(); - imx6q_add_spdif_audio_device(); - } else if (flexcan_en) { - ret = gpio_request_array(mx6_flexcan_gpios, - ARRAY_SIZE(mx6_flexcan_gpios)); - if (ret) { - pr_err("failed to request flexcan-gpios: %d\n", ret); - } else { - imx6q_add_flexcan0(&mx6_arm2_flexcan_pdata[0]); - imx6q_add_flexcan1(&mx6_arm2_flexcan_pdata[1]); - } - } - - imx6q_add_hdmi_soc(); - imx6q_add_hdmi_soc_dai(); - imx6q_add_perfmon(0); - imx6q_add_perfmon(1); - imx6q_add_perfmon(2); - imx6q_add_mlb150(&mx6_arm2_mlb150_data); - - if (cpu_is_mx6dl() && epdc_enabled) { - imx6dl_add_imx_pxp(); - imx6dl_add_imx_pxp_client(); - mxc_register_device(&max17135_sensor_device, NULL); - imx6dl_add_imx_epdc(&epdc_data); - } +#if 0 + vf6xx_add_pm_imx(0, &twr_vf600_pm_data); + mvf_add_imx2_wdt(0, NULL); + mvf_add_dma(); #endif } diff --git a/arch/arm/mach-mvf/clock.c b/arch/arm/mach-mvf/clock.c index 4ded93a880bd..144754c0e7e0 100644 --- a/arch/arm/mach-mvf/clock.c +++ b/arch/arm/mach-mvf/clock.c @@ -2932,7 +2932,15 @@ static struct clk dma_mux3_clk = { .disable = _clk_disable, }; -/* FIXME: OTP CTRL */ +static struct clk ocotp_clk = { + __INIT_CLK_DEBUG(ocotp_clk) + .parent = &ips_bus_clk, + .enable_reg = MXC_CCM_CCGR6, + .enable_shift = MXC_CCM_CCGRx_CG5_OFFSET, + .enable = _clk_enable, + .disable = _clk_disable, +}; + static struct clk uart4_clk = { __INIT_CLK_DEBUG(uart4_clk) @@ -3141,7 +3149,7 @@ static struct clk_lookup lookups[] = { _REGISTER_CLOCK(NULL, "ftm1_clk", ftm1_clk), _REGISTER_CLOCK(NULL, "ftm2_clk", ftm2_clk), _REGISTER_CLOCK(NULL, "ftm3_clk", ftm3_clk), -#if 0 +#if 1 _REGISTER_CLOCK(NULL, "fec_clk", enet_clk), //FIXME #else _REGISTER_CLOCK("fec.0", NULL, enet_clk), //FIXME @@ -3185,6 +3193,7 @@ static struct clk_lookup lookups[] = { _REGISTER_CLOCK(NULL, "src_clk", src_clk), _REGISTER_CLOCK(NULL, "dma_mix2_clk", dma_mux2_clk), _REGISTER_CLOCK(NULL, "dma_mix3_clk", dma_mux3_clk), + _REGISTER_CLOCK(NULL, "ocotp_clk", ocotp_clk), _REGISTER_CLOCK("imx-uart.4", NULL, uart4_clk), _REGISTER_CLOCK("imx-uart.5", NULL, uart5_clk), _REGISTER_CLOCK(NULL, "tcon1_clk", tcon1_clk), diff --git a/arch/arm/mach-mvf/devices-mvf.h b/arch/arm/mach-mvf/devices-mvf.h index 19534fecfc6d..0174224f0c70 100644 --- a/arch/arm/mach-mvf/devices-mvf.h +++ b/arch/arm/mach-mvf/devices-mvf.h @@ -21,192 +21,17 @@ #include <mach/mvf.h> #include <mach/devices-common.h> -extern const struct imx_imx_uart_1irq_data imx6q_imx_uart_data[] __initconst; -#define imx6q_add_imx_uart(id, pdata) \ - imx_add_imx_uart_1irq(&imx6q_imx_uart_data[id], pdata) +extern const struct imx_imx_uart_1irq_data vf6xx_imx_uart_data[] __initconst; +#define vf6xx_add_imx_uart(id, pdata) \ + imx_add_imx_uart_1irq(&vf6xx_imx_uart_data[id], pdata) -extern const struct imx_snvs_rtc_data imx6q_imx_snvs_rtc_data __initconst; -#define imx6q_add_imx_snvs_rtc() \ - imx_add_snvs_rtc(&imx6q_imx_snvs_rtc_data) +extern const struct imx_snvs_rtc_data vf6xx_imx_snvs_rtc_data __initconst; +#define vf6xx_add_imx_snvs_rtc() \ + imx_add_snvs_rtc(&vf6xx_imx_snvs_rtc_data) -extern const struct imx_anatop_thermal_imx_data -imx6q_anatop_thermal_imx_data __initconst; -#define imx6q_add_anatop_thermal_imx(id, pdata) \ - imx_add_anatop_thermal_imx(&imx6q_anatop_thermal_imx_data, pdata) +extern const struct imx_dma_data vf6xx_dma_data __initconst; +#define vf6xx_add_dma() imx_add_dma(&vf6xx_dma_data); -extern const struct imx_dma_data imx6q_dma_data __initconst; -#define imx6q_add_dma() imx_add_dma(&imx6q_dma_data); - -#define imx6q_add_gpmi(platform_data) imx_add_gpmi(platform_data); - -extern const struct imx_fec_data imx6q_fec_data __initconst; -#define imx6q_add_fec(pdata) \ - imx_add_fec(&imx6q_fec_data, pdata) - -extern const struct imx_sdhci_esdhc_imx_data -imx6q_sdhci_usdhc_imx_data[] __initconst; -#define imx6q_add_sdhci_usdhc_imx(id, pdata) \ - imx_add_sdhci_esdhc_imx(&imx6q_sdhci_usdhc_imx_data[id], pdata) - -extern const struct imx_spi_imx_data imx6q_ecspi_data[] __initconst; -#define imx6q_add_ecspi(id, pdata) \ - imx_add_spi_imx(&imx6q_ecspi_data[id], pdata) - -extern const struct imx_imx_i2c_data imx6q_imx_i2c_data[] __initconst; -#define imx6q_add_imx_i2c(id, pdata) \ - imx_add_imx_i2c(&imx6q_imx_i2c_data[id], pdata) - -extern const struct imx_fsl_usb2_udc_data imx6q_fsl_usb2_udc_data __initconst; -#define imx6q_add_fsl_usb2_udc(pdata) \ - imx_add_fsl_usb2_udc(&imx6q_fsl_usb2_udc_data, pdata) - -extern const struct imx_mxc_ehci_data imx6q_mxc_ehci_otg_data __initconst; -#define imx6q_add_fsl_ehci_otg(pdata) \ - imx_add_fsl_ehci(&imx6q_mxc_ehci_otg_data, pdata) - -extern const struct imx_mxc_ehci_data imx6q_mxc_ehci_hs_data[] __initconst; -#define imx6q_add_fsl_ehci_hs(id, pdata) \ - imx_add_fsl_ehci(&imx6q_mxc_ehci_hs_data[id - 1], pdata) - -extern const struct imx_fsl_usb2_otg_data imx6q_fsl_usb2_otg_data __initconst; -#define imx6q_add_fsl_usb2_otg(pdata) \ - imx_add_fsl_usb2_otg(&imx6q_fsl_usb2_otg_data, pdata) - -extern const struct imx_fsl_usb2_wakeup_data imx6q_fsl_otg_wakeup_data __initconst; -#define imx6q_add_fsl_usb2_otg_wakeup(pdata) \ - imx_add_fsl_usb2_wakeup(&imx6q_fsl_otg_wakeup_data, pdata) - -extern const struct imx_fsl_usb2_wakeup_data imx6q_fsl_hs_wakeup_data[] __initconst; -#define imx6q_add_fsl_usb2_hs_wakeup(id, pdata) \ - imx_add_fsl_usb2_wakeup(&imx6q_fsl_hs_wakeup_data[id - 1], pdata) - -extern const struct imx_imx_esai_data imx6q_imx_esai_data[] __initconst; -#define imx6q_add_imx_esai(id, pdata) \ - imx_add_imx_esai(&imx6q_imx_esai_data[id], pdata) - -extern const struct imx_viv_gpu_data imx6_gpu_data __initconst; - -extern const struct imx_ahci_data imx6q_ahci_data __initconst; -#define imx6q_add_ahci(id, pdata) \ - imx_add_ahci(&imx6q_ahci_data, pdata) - -extern const struct imx_imx_ssi_data imx6_imx_ssi_data[] __initconst; -#define imx6q_add_imx_ssi(id, pdata) \ - imx_add_imx_ssi(&imx6_imx_ssi_data[id], pdata) - -extern const struct imx_ipuv3_data imx6q_ipuv3_data[] __initconst; -#define imx6q_add_ipuv3(id, pdata) imx_add_ipuv3(id, &imx6q_ipuv3_data[id], pdata) -#define imx6q_add_ipuv3fb(id, pdata) imx_add_ipuv3_fb(id, pdata) - -#define imx6q_add_lcdif(pdata) \ - platform_device_register_resndata(NULL, "mxc_lcdif",\ - 0, NULL, 0, pdata, sizeof(*pdata)); - -extern const struct imx_ldb_data imx6q_ldb_data __initconst; -#define imx6q_add_ldb(pdata) \ - imx_add_ldb(&imx6q_ldb_data, pdata); - -#define imx6q_add_v4l2_output(id) \ - platform_device_register_resndata(NULL, "mxc_v4l2_output",\ - id, NULL, 0, NULL, 0); - -#define imx6q_add_v4l2_capture(id) \ - platform_device_register_resndata(NULL, "mxc_v4l2_capture",\ - id, NULL, 0, NULL, 0); - -extern const struct imx_mxc_hdmi_data imx6q_mxc_hdmi_data __initconst; -#define imx6q_add_mxc_hdmi(pdata) \ - imx_add_mxc_hdmi(&imx6q_mxc_hdmi_data, pdata) - -extern const struct imx_mxc_hdmi_core_data imx6q_mxc_hdmi_core_data __initconst; -#define imx6q_add_mxc_hdmi_core(pdata) \ - imx_add_mxc_hdmi_core(&imx6q_mxc_hdmi_core_data, pdata) - -extern const struct imx_vpu_data imx6q_vpu_data __initconst; -#define imx6q_add_vpu() imx_add_vpu(&imx6q_vpu_data) - -extern const struct imx_otp_data imx6q_otp_data __initconst; -#define imx6q_add_otp() \ - imx_add_otp(&imx6q_otp_data) - -extern const struct imx_viim_data imx6q_viim_data __initconst; -#define imx6q_add_viim() \ - imx_add_viim(&imx6q_viim_data) - -extern const struct imx_imx2_wdt_data imx6q_imx2_wdt_data[] __initconst; -#define imx6q_add_imx2_wdt(id, pdata) \ - imx_add_imx2_wdt(&imx6q_imx2_wdt_data[id]) - -extern const struct imx_pm_imx_data imx6q_pm_imx_data __initconst; -#define imx6q_add_pm_imx(id, pdata) \ - imx_add_pm_imx(&imx6q_pm_imx_data, pdata) - -extern const struct imx_imx_asrc_data imx6q_imx_asrc_data[] __initconst; -#define imx6q_add_asrc(pdata) \ - imx_add_imx_asrc(imx6q_imx_asrc_data, pdata) - -extern const struct imx_spi_imx_data imx6q_ecspi_data[] __initconst; -#define imx6q_add_ecspi(id, pdata) \ - imx_add_spi_imx(&imx6q_ecspi_data[id], pdata) - -extern const struct imx_dvfs_core_data imx6q_dvfs_core_data __initconst; -#define imx6q_add_dvfs_core(pdata) \ - imx_add_dvfs_core(&imx6q_dvfs_core_data, pdata) - -extern const struct imx_viv_gpu_data imx6_gc2000_data __initconst; -extern const struct imx_viv_gpu_data imx6_gc320_data __initconst; -extern const struct imx_viv_gpu_data imx6_gc355_data __initconst; - -extern const struct imx_mxc_pwm_data imx6q_mxc_pwm_data[] __initconst; -#define imx6q_add_mxc_pwm(id) \ - imx_add_mxc_pwm(&imx6q_mxc_pwm_data[id]) - -#define imx6q_add_mxc_pwm_backlight(id, pdata) \ - platform_device_register_resndata(NULL, "pwm-backlight",\ - id, NULL, 0, pdata, sizeof(*pdata)); - -extern const struct imx_spdif_data imx6q_imx_spdif_data __initconst; -#define imx6q_add_spdif(pdata) imx_add_spdif(&imx6q_imx_spdif_data, pdata) - -extern const struct imx_spdif_dai_data imx6q_spdif_dai_data __initconst; -#define imx6q_add_spdif_dai() imx_add_spdif_dai(&imx6q_spdif_dai_data) - -#define imx6q_add_spdif_audio_device(pdata) imx_add_spdif_audio_device() - -#define imx6q_add_hdmi_soc() imx_add_hdmi_soc() -extern const struct imx_hdmi_soc_data imx6q_imx_hdmi_soc_dai_data __initconst; -#define imx6q_add_hdmi_soc_dai() \ - imx_add_hdmi_soc_dai(&imx6q_imx_hdmi_soc_dai_data) - -extern const struct imx_mipi_dsi_data imx6q_mipi_dsi_data __initconst; -#define imx6q_add_mipi_dsi(pdata) \ - imx_add_mipi_dsi(&imx6q_mipi_dsi_data, pdata) - -extern const struct imx_flexcan_data imx6q_flexcan_data[] __initconst; -#define imx6q_add_flexcan(id, pdata) \ - imx_add_flexcan(&imx6q_flexcan_data[id], pdata) -#define imx6q_add_flexcan0(pdata) imx6q_add_flexcan(0, pdata) -#define imx6q_add_flexcan1(pdata) imx6q_add_flexcan(1, pdata) - -extern const struct imx_mipi_csi2_data imx6q_mipi_csi2_data __initconst; -#define imx6q_add_mipi_csi2(pdata) \ - imx_add_mipi_csi2(&imx6q_mipi_csi2_data, pdata) - -extern const struct imx_perfmon_data imx6q_perfmon_data[] __initconst; -#define imx6q_add_perfmon(id) \ - imx_add_perfmon(&imx6q_perfmon_data[id]) - -extern const struct imx_mxc_mlb_data imx6q_mxc_mlb150_data __initconst; -#define imx6q_add_mlb150(pdata) \ - imx_add_mlb(pdata) - -extern const struct imx_pxp_data imx6dl_pxp_data __initconst; -#define imx6dl_add_imx_pxp() \ - imx_add_imx_pxp(&imx6dl_pxp_data) - -#define imx6dl_add_imx_pxp_client() \ - imx_add_imx_pxp_client() - -extern const struct imx_epdc_data imx6dl_epdc_data __initconst; -#define imx6dl_add_imx_epdc(pdata) \ - imx_add_imx_epdc(&imx6dl_epdc_data, pdata) +extern const struct imx_fec_data vf6xx_fec_data __initconst; +#define vf6xx_add_fec(pdata) \ + imx_add_fec(&vf6xx_fec_data, pdata) diff --git a/arch/arm/mach-mvf/mvf_fec.c b/arch/arm/mach-mvf/mvf_fec.c index 04b3a22df8a9..83a92feac2dc 100644 --- a/arch/arm/mach-mvf/mvf_fec.c +++ b/arch/arm/mach-mvf/mvf_fec.c @@ -33,23 +33,23 @@ static int fec_get_mac_addr(unsigned char *mac) { unsigned int value; - value = readl(MX6_IO_ADDRESS(OCOTP_BASE_ADDR) + HW_OCOTP_MACn(0)); + value = readl(MVF_IO_ADDRESS(MVF_OTP_CTRL_BASE_ADDR) + HW_OCOTP_MACn(0)); mac[5] = value & 0xff; mac[4] = (value >> 8) & 0xff; mac[3] = (value >> 16) & 0xff; mac[2] = (value >> 24) & 0xff; - value = readl(MX6_IO_ADDRESS(OCOTP_BASE_ADDR) + HW_OCOTP_MACn(1)); + value = readl(MVF_IO_ADDRESS(MVF_OTP_CTRL_BASE_ADDR) + HW_OCOTP_MACn(1)); mac[1] = value & 0xff; mac[0] = (value >> 8) & 0xff; return 0; } -void __init imx6_init_fec(struct fec_platform_data fec_data) +void __init mvf_init_fec(struct fec_platform_data fec_data) { fec_get_mac_addr(fec_data.mac); if (!is_valid_ether_addr(fec_data.mac)) random_ether_addr(fec_data.mac); - imx6q_add_fec(&fec_data); + vf6xx_add_fec(&fec_data); } diff --git a/arch/arm/plat-mxc/devices/platform-fec.c b/arch/arm/plat-mxc/devices/platform-fec.c index b5e98576992f..e235fce53fb8 100644 --- a/arch/arm/plat-mxc/devices/platform-fec.c +++ b/arch/arm/plat-mxc/devices/platform-fec.c @@ -54,6 +54,11 @@ const struct imx_fec_data imx6q_fec_data __initconst = imx_fec_data_entry_single(MX6Q); #endif +#ifdef CONFIG_SOC_VF6XX +const struct imx_fec_data vf6xx_fec_data __initconst = + imx_fec_data_entry_single(VF6XX); +#endif + struct platform_device *__init imx_add_fec( const struct imx_fec_data *data, const struct fec_platform_data *pdata) diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h index a6bdc638a2e4..99200d0f241e 100755 --- a/arch/arm/plat-mxc/include/mach/common.h +++ b/arch/arm/plat-mxc/include/mach/common.h @@ -77,6 +77,7 @@ extern int mx50_clocks_init(unsigned long ckil, unsigned long osc, extern int mx6_clocks_init(unsigned long ckil, unsigned long osc, unsigned long ckih1, unsigned long ckih2); extern void imx6_init_fec(struct fec_platform_data fec_data); +extern void mvf_init_fec(struct fec_platform_data fec_data); extern int mxc91231_clocks_init(unsigned long fref); extern int mvf_clocks_init(unsigned long ckil, unsigned long ckih, unsigned long oscl, unsigned long osch); diff --git a/arch/arm/plat-mxc/include/mach/mvf.h b/arch/arm/plat-mxc/include/mach/mvf.h index 7f95d93b049c..028bc24cf075 100644 --- a/arch/arm/plat-mxc/include/mach/mvf.h +++ b/arch/arm/plat-mxc/include/mach/mvf.h @@ -274,8 +274,8 @@ #define MVF_DAC0_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x2C000) #define MVF_DAC1_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x2D000) #define MVF_OPEN_VG_GPU_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x2F000) -#define MVF_EMAC0_TMR_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x30000) -#define MVF_EMAC1_TMR_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x31000) +#define MVF_ENET0_IEEE1588_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x30000) +#define MVF_ENET1_IEEE1588_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x31000) #define MVF_FLEX_CAN1_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x34000) #define MVF_DCU1_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x38000) #define MVF_NFC_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x40000) @@ -284,6 +284,14 @@ #define MVF_ETH_L2_SW_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x48000) #define MVF_CAAM_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x50000) +#define VF6XX_UART0_BASE_ADDR MVF_UART0_BASE_ADDR +#define VF6XX_UART1_BASE_ADDR MVF_UART1_BASE_ADDR +#define VF6XX_UART2_BASE_ADDR MVF_UART2_BASE_ADDR +#define VF6XX_UART3_BASE_ADDR MVF_UART3_BASE_ADDR +#define VF6XX_UART4_BASE_ADDR MVF_UART4_BASE_ADDR +#define VF6XX_UART5_BASE_ADDR MVF_UART5_BASE_ADDR +#define VF6XX_FEC_BASE_ADDR MVF_ENET0_IEEE1588_BASE_ADDR + #define MVF_IO_P2V(x) IMX_IO_P2V(x) #define MVF_IO_ADDRESS(x) IOMEM(MVF_IO_P2V(x)) @@ -387,6 +395,14 @@ #define MXC_INT_GPIOE 153 #define MXC_INT_END 153 +#define VF6XX_INT_UART0 MXC_INT_UART0 +#define VF6XX_INT_UART1 MXC_INT_UART1 +#define VF6XX_INT_UART2 MXC_INT_UART2 +#define VF6XX_INT_UART3 MXC_INT_UART3 +#define VF6XX_INT_UART4 MXC_INT_UART4 +#define VF6XX_INT_UART5 MXC_INT_UART5 +#define VF6XX_INT_FEC MXC_INT_ENET_MAC0 + #define IRQ_GLOBALTIMER 27 #define IRQ_LOCALTIMER 29 diff --git a/arch/arm/plat-mxc/iomux-vmvf.c b/arch/arm/plat-mxc/iomux-vmvf.c index 6741c508b63b..b0b6a76b779b 100644 --- a/arch/arm/plat-mxc/iomux-vmvf.c +++ b/arch/arm/plat-mxc/iomux-vmvf.c @@ -64,6 +64,21 @@ int mxc_iomux_vmvf_setup_multiple_pads(iomux_vmvf_cfg_t *pad_list, unsigned coun } EXPORT_SYMBOL(mxc_iomux_vmvf_setup_multiple_pads); +void mxc_iomux_set_gpr_register(int group, int start_bit, int num_bits, int value) +{ + int i = 0; + u32 reg; + reg = __raw_readl(base + group * 4); + while (num_bits) { + reg &= ~(1<<(start_bit + i)); + i++; + num_bits--; + } + reg |= (value << start_bit); + __raw_writel(reg, base + group * 4); +} +EXPORT_SYMBOL(mxc_iomux_set_gpr_register); + void mxc_iomux_vmvf_init(void __iomem *iomux_vmvf_base) { base = iomux_vmvf_base; |