forked from Minki/linux
ARM: at91: pm: Move at91_ramc_read/write to pm.c
Those macros are only used in pm.c, move them there so we can remove the test on __ASSEMBLY__. Acked-by: Wenyou Yang <wenyou.yang@atmel.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
This commit is contained in:
parent
9824c447aa
commit
4d767bc3c3
@ -45,6 +45,12 @@ static struct {
|
|||||||
} at91_pm_data;
|
} at91_pm_data;
|
||||||
|
|
||||||
static void __iomem *at91_ramc_base[2];
|
static void __iomem *at91_ramc_base[2];
|
||||||
|
#define at91_ramc_read(id, field) \
|
||||||
|
__raw_readl(at91_ramc_base[id] + field)
|
||||||
|
|
||||||
|
#define at91_ramc_write(id, field, value) \
|
||||||
|
__raw_writel(value, at91_ramc_base[id] + field)
|
||||||
|
|
||||||
|
|
||||||
static int at91_pm_valid_state(suspend_state_t state)
|
static int at91_pm_valid_state(suspend_state_t state)
|
||||||
{
|
{
|
||||||
|
@ -17,14 +17,6 @@
|
|||||||
#include <soc/at91/at91sam9_ddrsdr.h>
|
#include <soc/at91/at91sam9_ddrsdr.h>
|
||||||
#include <soc/at91/at91sam9_sdramc.h>
|
#include <soc/at91/at91sam9_sdramc.h>
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
|
||||||
#define at91_ramc_read(id, field) \
|
|
||||||
__raw_readl(at91_ramc_base[id] + field)
|
|
||||||
|
|
||||||
#define at91_ramc_write(id, field, value) \
|
|
||||||
__raw_writel(value, at91_ramc_base[id] + field)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define AT91_MEMCTRL_MC 0
|
#define AT91_MEMCTRL_MC 0
|
||||||
#define AT91_MEMCTRL_SDRAMC 1
|
#define AT91_MEMCTRL_SDRAMC 1
|
||||||
#define AT91_MEMCTRL_DDRSDR 2
|
#define AT91_MEMCTRL_DDRSDR 2
|
||||||
|
Loading…
Reference in New Issue
Block a user