diff options
Diffstat (limited to 'arch/arm/mach-davinci/da850.c')
-rw-r--r-- | arch/arm/mach-davinci/da850.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index 1ac8f6318c1b..b9a7b3bc36b2 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <mach/time.h> | 26 | #include <mach/time.h> |
27 | #include <mach/da8xx.h> | 27 | #include <mach/da8xx.h> |
28 | #include <mach/cpufreq.h> | 28 | #include <mach/cpufreq.h> |
29 | #include <mach/pm.h> | ||
29 | 30 | ||
30 | #include "clock.h" | 31 | #include "clock.h" |
31 | #include "mux.h" | 32 | #include "mux.h" |
@@ -536,6 +537,7 @@ static const struct mux_config da850_pins[] = { | |||
536 | MUX_CFG(DA850, GPIO2_15, 5, 0, 15, 8, false) | 537 | MUX_CFG(DA850, GPIO2_15, 5, 0, 15, 8, false) |
537 | MUX_CFG(DA850, GPIO4_0, 10, 28, 15, 8, false) | 538 | MUX_CFG(DA850, GPIO4_0, 10, 28, 15, 8, false) |
538 | MUX_CFG(DA850, GPIO4_1, 10, 24, 15, 8, false) | 539 | MUX_CFG(DA850, GPIO4_1, 10, 24, 15, 8, false) |
540 | MUX_CFG(DA850, RTC_ALARM, 0, 28, 15, 2, false) | ||
539 | #endif | 541 | #endif |
540 | }; | 542 | }; |
541 | 543 | ||
@@ -1029,6 +1031,43 @@ static int da850_round_armrate(struct clk *clk, unsigned long rate) | |||
1029 | } | 1031 | } |
1030 | #endif | 1032 | #endif |
1031 | 1033 | ||
1034 | int da850_register_pm(struct platform_device *pdev) | ||
1035 | { | ||
1036 | int ret; | ||
1037 | struct davinci_pm_config *pdata = pdev->dev.platform_data; | ||
1038 | |||
1039 | ret = davinci_cfg_reg(DA850_RTC_ALARM); | ||
1040 | if (ret) | ||
1041 | return ret; | ||
1042 | |||
1043 | pdata->ddr2_ctlr_base = da8xx_get_mem_ctlr(); | ||
1044 | pdata->deepsleep_reg = DA8XX_SYSCFG1_VIRT(DA8XX_DEEPSLEEP_REG); | ||
1045 | pdata->ddrpsc_num = DA8XX_LPSC1_EMIF3C; | ||
1046 | |||
1047 | pdata->cpupll_reg_base = ioremap(DA8XX_PLL0_BASE, SZ_4K); | ||
1048 | if (!pdata->cpupll_reg_base) | ||
1049 | return -ENOMEM; | ||
1050 | |||
1051 | pdata->ddrpll_reg_base = ioremap(DA8XX_PLL1_BASE, SZ_4K); | ||
1052 | if (!pdata->ddrpll_reg_base) { | ||
1053 | ret = -ENOMEM; | ||
1054 | goto no_ddrpll_mem; | ||
1055 | } | ||
1056 | |||
1057 | pdata->ddrpsc_reg_base = ioremap(DA8XX_PSC1_BASE, SZ_4K); | ||
1058 | if (!pdata->ddrpsc_reg_base) { | ||
1059 | ret = -ENOMEM; | ||
1060 | goto no_ddrpsc_mem; | ||
1061 | } | ||
1062 | |||
1063 | return platform_device_register(pdev); | ||
1064 | |||
1065 | no_ddrpsc_mem: | ||
1066 | iounmap(pdata->ddrpll_reg_base); | ||
1067 | no_ddrpll_mem: | ||
1068 | iounmap(pdata->cpupll_reg_base); | ||
1069 | return ret; | ||
1070 | } | ||
1032 | 1071 | ||
1033 | static struct davinci_soc_info davinci_soc_info_da850 = { | 1072 | static struct davinci_soc_info davinci_soc_info_da850 = { |
1034 | .io_desc = da850_io_desc, | 1073 | .io_desc = da850_io_desc, |