Skip to content

Commit

Permalink
Merge tag 'at91-cleanup' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/abelloni/linux into next/cleanup

Merge "First batch of cleanup for 4.2" from Alexandre Belloni:

 - use syscon in the ata and cf drivers to configure the SMC and drop
 sam9_smc.c
 - switch the at91rm9200 memory controller to syscon
 - remove last useless headers
 - remove now useless Makefile.boot

* tag 'at91-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux:
  ARM: at91: remove useless Makefile.boot
  ARM: at91: remove at91rm9200_sdramc.h
  ARM: at91: remove mach/at91_ramc.h and mach/at91rm9200_mc.h
  ARM: at91/pm: use the atmel-mc syscon defines
  pcmcia: at91_cf: Use syscon to configure the MC/smc
  ARM: at91: declare the at91rm9200 memory controller as a syscon
  mfd: syscon: Add Atmel MC (Memory Controller) registers definition
  ARM: at91: drop sam9_smc.c
  ata: at91: use syscon to configure the smc
  • Loading branch information
Arnd Bergmann committed May 22, 2015
2 parents 2ed2558 + 196b44e commit d7c82da
Show file tree
Hide file tree
Showing 18 changed files with 249 additions and 508 deletions.
2 changes: 1 addition & 1 deletion Documentation/devicetree/bindings/arm/atmel-at91.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Example:
};

RAMC SDRAM/DDR Controller required properties:
- compatible: Should be "atmel,at91rm9200-sdramc",
- compatible: Should be "atmel,at91rm9200-sdramc", "syscon"
"atmel,at91sam9260-sdramc",
"atmel,at91sam9g45-ddramc",
"atmel,sama5d3-ddramc",
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/at91rm9200.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
};

ramc0: ramc@ffffff00 {
compatible = "atmel,at91rm9200-sdramc";
compatible = "atmel,at91rm9200-sdramc", "syscon";
reg = <0xffffff00 0x100>;
};

Expand Down
5 changes: 0 additions & 5 deletions arch/arm/mach-at91/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
#
# Makefile for the linux kernel.
#
ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include
asflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include

obj-y := soc.o

obj-$(CONFIG_SOC_AT91SAM9) += sam9_smc.o

# CPU-specific support
obj-$(CONFIG_SOC_AT91RM9200) += at91rm9200.o
obj-$(CONFIG_SOC_AT91SAM9) += at91sam9.o
Expand Down
8 changes: 0 additions & 8 deletions arch/arm/mach-at91/Makefile.boot

This file was deleted.

28 changes: 0 additions & 28 deletions arch/arm/mach-at91/include/mach/at91_ramc.h

This file was deleted.

116 changes: 0 additions & 116 deletions arch/arm/mach-at91/include/mach/at91rm9200_mc.h

This file was deleted.

98 changes: 0 additions & 98 deletions arch/arm/mach-at91/include/mach/at91sam9_smc.h

This file was deleted.

8 changes: 4 additions & 4 deletions arch/arm/mach-at91/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ static void at91_pm_set_standby(void (*at91_standby)(void))
*/
static void at91rm9200_standby(void)
{
u32 lpr = at91_ramc_read(0, AT91RM9200_SDRAMC_LPR);
u32 lpr = at91_ramc_read(0, AT91_MC_SDRAMC_LPR);

asm volatile(
"b 1f\n\t"
Expand All @@ -244,8 +244,8 @@ static void at91rm9200_standby(void)
" mcr p15, 0, %0, c7, c0, 4\n\t"
" str %5, [%1, %2]"
:
: "r" (0), "r" (at91_ramc_base[0]), "r" (AT91RM9200_SDRAMC_LPR),
"r" (1), "r" (AT91RM9200_SDRAMC_SRR),
: "r" (0), "r" (at91_ramc_base[0]), "r" (AT91_MC_SDRAMC_LPR),
"r" (1), "r" (AT91_MC_SDRAMC_SRR),
"r" (lpr));
}

Expand Down Expand Up @@ -414,7 +414,7 @@ void __init at91rm9200_pm_init(void)
/*
* AT91RM9200 SDRAM low-power mode cannot be used with self-refresh.
*/
at91_ramc_write(0, AT91RM9200_SDRAMC_LPR, 0);
at91_ramc_write(0, AT91_MC_SDRAMC_LPR, 0);

at91_pm_data.uhp_udp_mask = AT91RM9200_PMC_UHP | AT91RM9200_PMC_UDP;
at91_pm_data.memctrl = AT91_MEMCTRL_MC;
Expand Down
14 changes: 13 additions & 1 deletion arch/arm/mach-at91/pm.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,19 @@

#include <asm/proc-fns.h>

#include <mach/at91_ramc.h>
#include <linux/mfd/syscon/atmel-mc.h>
#include <soc/at91/at91sam9_ddrsdr.h>
#include <soc/at91/at91sam9_sdramc.h>

#ifndef __ASSEMBLY__
extern void __iomem *at91_ramc_base[];

#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
Expand Down
3 changes: 1 addition & 2 deletions arch/arm/mach-at91/pm_suspend.S
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
*/
#include <linux/linkage.h>
#include <linux/clk/at91_pmc.h>
#include <mach/at91_ramc.h>
#include "pm.h"

#define SRAMC_SELF_FRESH_ACTIVE 0x01
Expand Down Expand Up @@ -216,7 +215,7 @@ ENTRY(at91_sramc_self_refresh)

/* Active SDRAM self-refresh mode */
mov r3, #1
str r3, [r2, #AT91RM9200_SDRAMC_SRR]
str r3, [r2, #AT91_MC_SDRAMC_SRR]
b exit_sramc_sf

ddrc_sf:
Expand Down
Loading

0 comments on commit d7c82da

Please sign in to comment.