diff options
author | Wang Xiaojun <b41435@freescale.com> | 2012-12-10 18:35:41 +0800 |
---|---|---|
committer | Ed Nash <enash@enash-desktop.(none)> | 2012-12-12 14:46:32 -0500 |
commit | 3664f4e8ca3d18e87bc695f4b6838be61382dc17 (patch) | |
tree | dd41defc3c8896c789b0b3ceeb625311cdb49899 /arch/arm/mach-mvf | |
parent | 74e4dd3713a06947ac42aed73c822d7641735239 (diff) |
ENGR00181365-1: ADC: Add platform support for ADC driver
Add platform support for ADC driver.
Signed-off-by: Wang Xiaojun <b41435@freescale.com>
Diffstat (limited to 'arch/arm/mach-mvf')
-rw-r--r-- | arch/arm/mach-mvf/board-twr-vf700.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-mvf/clock.c | 13 | ||||
-rw-r--r-- | arch/arm/mach-mvf/devices-mvf.h | 4 |
3 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/mach-mvf/board-twr-vf700.c b/arch/arm/mach-mvf/board-twr-vf700.c index a267df7a303f..d64622b2db19 100644 --- a/arch/arm/mach-mvf/board-twr-vf700.c +++ b/arch/arm/mach-mvf/board-twr-vf700.c @@ -443,6 +443,11 @@ static void __init mvf_twr_init_usb(void) #endif } +static void __init mvf_init_adc(void) +{ + mvf_add_adc(0); +} + /*! * Board specific initialization. */ @@ -462,6 +467,8 @@ static void __init mvf_board_init(void) mvf_add_snvs_rtc(); + mvf_init_adc(); + mvf_add_pm_imx(0, &mvf_vf600_pm_data); mvf_add_sdhci_esdhc_imx(1, &mvfa5_sd1_data); diff --git a/arch/arm/mach-mvf/clock.c b/arch/arm/mach-mvf/clock.c index 140f0edee565..16d86fb73368 100644 --- a/arch/arm/mach-mvf/clock.c +++ b/arch/arm/mach-mvf/clock.c @@ -1626,6 +1626,18 @@ static struct clk pit_clk = { .get_rate = _clk_uart_get_rate, }; +static struct clk adc_clk[] = { + { + __INIT_CLK_DEBUG(adc_clk) + .id = 0, + .parent = &ipg_clk, + .enable_reg = MXC_CCM_CCGR1, + .enable_shift = MXC_CCM_CCGRx_CG11_OFFSET, + .enable = _clk_enable, + .disable = _clk_disable, + }, +}; + static struct clk i2c_clk[] = { { __INIT_CLK_DEBUG(i2c_clk_0) @@ -1886,6 +1898,7 @@ static struct clk_lookup lookups[] = { _REGISTER_CLOCK("pit", NULL, pit_clk), _REGISTER_CLOCK("fec.0", NULL, enet_clk[0]), _REGISTER_CLOCK("fec.1", NULL, enet_clk[1]), + _REGISTER_CLOCK("mvf-adc.0", NULL, adc_clk[0]), _REGISTER_CLOCK("switch.0", NULL, enet_clk[0]), _REGISTER_CLOCK("imx2-wdt.0", NULL, dummy_clk), _REGISTER_CLOCK("sdhci-esdhc-imx.1", NULL, esdhc1_clk), diff --git a/arch/arm/mach-mvf/devices-mvf.h b/arch/arm/mach-mvf/devices-mvf.h index b8bea993bdee..6bc61871fd5e 100644 --- a/arch/arm/mach-mvf/devices-mvf.h +++ b/arch/arm/mach-mvf/devices-mvf.h @@ -144,6 +144,10 @@ extern const struct imx_imx2_wdt_data mvf_imx2_wdt_data[] __initconst; #define mvf_add_imx2_wdt(id, pdata) \ imx_add_imx2_wdt(&mvf_imx2_wdt_data[id]) +extern const struct mvf_adc_data mvfa5_adc_data[] __initconst; +#define mvf_add_adc(id) \ + mvf_add_adcdev(&mvfa5_adc_data[id]) + extern const struct imx_imx2_wdt_data fsl_imx2_wdt_data[] __initconst; #define mvf_add_wdt(id) \ imx_add_imx2_wdt(&fsl_imx2_wdt_data[id]) |