Skip to content

Commit

Permalink
ARM: at91: pm: Move at91_ramc_read/write to pm.c
Browse files Browse the repository at this point in the history
Those macros are only used in pm.c, move them there so we can remove the
test on __ASSEMBLY__.

Acked-by: Wenyou Yang <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
  • Loading branch information
alexandrebelloni committed Mar 31, 2017
1 parent 9824c44 commit 4d767bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 6 additions & 0 deletions arch/arm/mach-at91/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ static struct {
} at91_pm_data;

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)
{
Expand Down
8 changes: 0 additions & 8 deletions arch/arm/mach-at91/pm.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@
#include <soc/at91/at91sam9_ddrsdr.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_SDRAMC 1
#define AT91_MEMCTRL_DDRSDR 2
Expand Down

0 comments on commit 4d767bc

Please sign in to comment.