diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-07-02 10:59:37 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-07-02 10:59:37 +0200 |
commit | f22d4e27786c8a7f58ef7167f38c3c5dd313d290 (patch) | |
tree | a0f02af6952b17650642ceee110bc063347eea2e /arch | |
parent | 6e4b15537b522fc6d393d664c12f40b4a00b5ef6 (diff) | |
parent | 1bb01712a717a2008efce4f76a3d8e43e4435eb3 (diff) | |
download | barebox-f22d4e27786c8a7f58ef7167f38c3c5dd313d290.tar.gz barebox-f22d4e27786c8a7f58ef7167f38c3c5dd313d290.tar.xz |
Merge branch 'for-next/sparse'
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-imx/clocksource.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-imx/include/mach/clock.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/speed-imx35.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/speed-imx51.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-imx/speed-imx53.c | 3 |
5 files changed, 15 insertions, 9 deletions
diff --git a/arch/arm/mach-imx/clocksource.c b/arch/arm/mach-imx/clocksource.c index 4f5895c2a5..4e77ece7f3 100644 --- a/arch/arm/mach-imx/clocksource.c +++ b/arch/arm/mach-imx/clocksource.c @@ -38,7 +38,7 @@ #include <io.h> #define GPT(x) __REG(IMX_TIM1_BASE + (x)) -#define timer_base (IMX_TIM1_BASE) +#define timer_base IOMEM(IMX_TIM1_BASE) static uint64_t imx_clocksource_read(void) { @@ -120,15 +120,17 @@ core_initcall(clocksource_init); */ void __noreturn reset_cpu (unsigned long addr) { + void __iomem *wdt = IOMEM(IMX_WDT_BASE); + /* Disable watchdog and set Time-Out field to 0 */ - writew(0x0, IMX_WDT_BASE + WDOG_WCR); + writew(0x0, wdt + WDOG_WCR); /* Write Service Sequence */ - writew(0x5555, IMX_WDT_BASE + WDOG_WSR); - writew(0xaaaa, IMX_WDT_BASE + WDOG_WSR); + writew(0x5555, wdt + WDOG_WSR); + writew(0xaaaa, wdt + WDOG_WSR); /* Enable watchdog */ - writew(WDOG_WCR_WDE, IMX_WDT_BASE + WDOG_WCR); + writew(WDOG_WCR_WDE, wdt + WDOG_WCR); while (1); /*NOTREACHED*/ diff --git a/arch/arm/mach-imx/include/mach/clock.h b/arch/arm/mach-imx/include/mach/clock.h index 10821782fe..060d265d5e 100644 --- a/arch/arm/mach-imx/include/mach/clock.h +++ b/arch/arm/mach-imx/include/mach/clock.h @@ -30,6 +30,8 @@ ulong imx_get_lcdclk(void); ulong imx_get_i2cclk(void); ulong imx_get_mmcclk(void); ulong imx_get_cspiclk(void); +ulong imx_get_ipgclk(void); +ulong imx_get_usbclk(void); int imx_clko_set_div(int div); void imx_clko_set_src(int src); diff --git a/arch/arm/mach-imx/speed-imx35.c b/arch/arm/mach-imx/speed-imx35.c index 1e1c39ff82..2bdcc07100 100644 --- a/arch/arm/mach-imx/speed-imx35.c +++ b/arch/arm/mach-imx/speed-imx35.c @@ -84,7 +84,7 @@ unsigned long imx_get_ahbclk(void) return fref / aad->ahb; } -static unsigned long imx_get_ipgclk(void) +unsigned long imx_get_ipgclk(void) { ulong clk = imx_get_ahbclk(); diff --git a/arch/arm/mach-imx/speed-imx51.c b/arch/arm/mach-imx/speed-imx51.c index 8d1ecf3e40..1c3523da55 100644 --- a/arch/arm/mach-imx/speed-imx51.c +++ b/arch/arm/mach-imx/speed-imx51.c @@ -2,11 +2,12 @@ #include <io.h> #include <asm-generic/div64.h> #include <mach/imx51-regs.h> +#include <mach/clock.h> #include <mach/clock-imx51_53.h> static u32 ccm_readl(u32 ofs) { - return readl(MX51_CCM_BASE_ADDR + ofs); + return readl(IOMEM(MX51_CCM_BASE_ADDR) + ofs); } static unsigned long ckil_get_rate(void) @@ -142,7 +143,7 @@ unsigned long imx_get_uartclk(void) return parent_rate / (prediv * podf); } -static unsigned long imx_get_ahbclk(void) +unsigned long imx_get_ahbclk(void) { u32 reg, div; diff --git a/arch/arm/mach-imx/speed-imx53.c b/arch/arm/mach-imx/speed-imx53.c index 634341e738..653dae33b6 100644 --- a/arch/arm/mach-imx/speed-imx53.c +++ b/arch/arm/mach-imx/speed-imx53.c @@ -2,6 +2,7 @@ #include <io.h> #include <asm-generic/div64.h> #include <mach/imx-regs.h> +#include <mach/clock.h> #include "mach/clock-imx51_53.h" static u32 ccm_readl(u32 ofs) @@ -139,7 +140,7 @@ unsigned long imx_get_uartclk(void) return parent_rate / (prediv * podf); } -static unsigned long imx_get_ahbclk(void) +unsigned long imx_get_ahbclk(void) { u32 reg, div; |