diff --git a/arch/avr32/mach-at32ap/clock.c b/arch/avr32/mach-at32ap/clock.c index 4642117cc9ab8e362f0a07cc8205ab4e81c0c905..6c27ddac5adf10c6870c1c4679f8f6ab93411dc8 100644 --- a/arch/avr32/mach-at32ap/clock.c +++ b/arch/avr32/mach-at32ap/clock.c @@ -16,6 +16,8 @@ #include #include +#include + #include "clock.h" static DEFINE_SPINLOCK(clk_lock); diff --git a/arch/avr32/mach-at32ap/include/mach/at32ap700x.h b/arch/avr32/mach-at32ap/include/mach/at32ap700x.h index d18a3053be0d33b909ce665b41aaa62211e37a0a..31b44e13ec3289e4b2e794596547b624093636f2 100644 --- a/arch/avr32/mach-at32ap/include/mach/at32ap700x.h +++ b/arch/avr32/mach-at32ap/include/mach/at32ap700x.h @@ -46,4 +46,12 @@ #define DMAC_DMAREQ_2 9 #define DMAC_DMAREQ_3 10 +/* + * Base addresses of controllers that may be accessed early by + * platform code. + */ +#define PM_BASE 0xfff00000 +#define HMATRIX_BASE 0xfff00800 +#define SDRAMC_BASE 0xfff03800 + #endif /* __ASM_ARCH_AT32AP700X_H__ */ diff --git a/arch/avr32/mach-at32ap/pm.c b/arch/avr32/mach-at32ap/pm.c index a0cbef54fc2a8e706878dd19777a0239c2c4d898..f021edfeaab0d8ea253e0305479d51b813880309 100644 --- a/arch/avr32/mach-at32ap/pm.c +++ b/arch/avr32/mach-at32ap/pm.c @@ -14,12 +14,10 @@ #include #include +#include #include #include -/* FIXME: This is only valid for AP7000 */ -#define SDRAMC_BASE 0xfff03800 - #include "sdramc.h" #define SRAM_PAGE_FLAGS (SYSREG_BIT(TLBELO_D) | SYSREG_BF(SZ, 1) \ diff --git a/arch/avr32/mach-at32ap/pm.h b/arch/avr32/mach-at32ap/pm.h index 694d521edc2ffcb91e47eeb6a96037d2f0e2ce12..532a3732c214c1bb5fbe31e71786730d7362105b 100644 --- a/arch/avr32/mach-at32ap/pm.h +++ b/arch/avr32/mach-at32ap/pm.h @@ -4,14 +4,6 @@ #ifndef __ARCH_AVR32_MACH_AT32AP_PM_H__ #define __ARCH_AVR32_MACH_AT32AP_PM_H__ -/* - * We can reduce the code size a bit by using a constant here. Since - * this file is only used on AVR32 AP CPUs with segmentation enabled, - * it's safe to not use ioremap. Generic drivers should of course - * never do this. - */ -#define AT32_PM_BASE 0xfff00000 - /* PM register offsets */ #define PM_MCCTRL 0x0000 #define PM_CKSEL 0x0004 @@ -113,8 +105,8 @@ /* Register access macros */ #define pm_readl(reg) \ - __raw_readl((void __iomem __force *)AT32_PM_BASE + PM_##reg) + __raw_readl((void __iomem __force *)PM_BASE + PM_##reg) #define pm_writel(reg,value) \ - __raw_writel((value), (void __iomem __force *)AT32_PM_BASE + PM_##reg) + __raw_writel((value), (void __iomem __force *)PM_BASE + PM_##reg) #endif /* __ARCH_AVR32_MACH_AT32AP_PM_H__ */