Commit 88c5544a authored by Nicolas Ferre's avatar Nicolas Ferre
Browse files

Merge tag 'at91-cleanup3' into at91-4.1-multiplatform

Third batch of cleanup for 4.1:
- System Timer (ST) for at91rm9200 re-work (syscon/regmap):
  - watchdog
  - restart handler
  - timer as a proper clocksource
  => remove mach dependency + cleanup
parents 2197cf70 8590ca65
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -46,10 +46,12 @@ PIT Timer required properties:
  shared across all System Controller members.

System Timer (ST) required properties:
- compatible: Should be "atmel,at91rm9200-st"
- compatible: Should be "atmel,at91rm9200-st", "syscon", "simple-mfd"
- reg: Should contain registers location and length
- interrupts: Should contain interrupt for the ST which is the IRQ line
  shared across all System Controller members.
Its subnodes can be:
- watchdog: compatible should be "atmel,at91rm9200-wdt"

TC/TCLIB Timer required properties:
- compatible: Should be "atmel,<chip>-tcb".
+5 −1
Original line number Diff line number Diff line
@@ -356,9 +356,13 @@
			};

			st: timer@fffffd00 {
				compatible = "atmel,at91rm9200-st";
				compatible = "atmel,at91rm9200-st", "syscon", "simple-mfd";
				reg = <0xfffffd00 0x100>;
				interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;

				watchdog {
					compatible = "atmel,at91rm9200-wdt";
				};
			};

			rtc: rtc@fffffe00 {
+1 −0
Original line number Diff line number Diff line
@@ -77,6 +77,7 @@ if SOC_SAM_V4_V5
config SOC_AT91RM9200
	bool "AT91RM9200"
	select ATMEL_AIC_IRQ
	select ATMEL_ST
	select COMMON_CLK_AT91
	select CPU_ARM920T
	select GENERIC_CLOCKEVENTS
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ obj-y := soc.o
obj-$(CONFIG_SOC_AT91SAM9)	+= sam9_smc.o

# CPU-specific support
obj-$(CONFIG_SOC_AT91RM9200)	+= at91rm9200.o at91rm9200_time.o
obj-$(CONFIG_SOC_AT91RM9200)	+= at91rm9200.o
obj-$(CONFIG_SOC_AT91SAM9)	+= at91sam9.o
obj-$(CONFIG_SOC_SAMA5)		+= sama5.o

+0 −19
Original line number Diff line number Diff line
@@ -15,8 +15,6 @@
#include <asm/mach/arch.h>
#include <asm/system_misc.h>

#include <mach/at91_st.h>

#include "generic.h"
#include "soc.h"

@@ -25,21 +23,6 @@ static const struct at91_soc rm9200_socs[] = {
	{ /* sentinel */ },
};

static void at91rm9200_restart(enum reboot_mode reboot_mode, const char *cmd)
{
	/*
	 * Perform a hardware reset with the use of the Watchdog timer.
	 */
	at91_st_write(AT91_ST_WDMR, AT91_ST_RSTEN | AT91_ST_EXTEN | 1);
	at91_st_write(AT91_ST_CR, AT91_ST_WDRST);
}

static void __init at91rm9200_dt_timer_init(void)
{
	of_clk_init(NULL);
	at91rm9200_timer_init();
}

static void __init at91rm9200_dt_device_init(void)
{
	struct soc_device *soc;
@@ -52,7 +35,6 @@ static void __init at91rm9200_dt_device_init(void)
	of_platform_populate(NULL, of_default_bus_match_table, NULL, soc_dev);

	arm_pm_idle = at91rm9200_idle;
	arm_pm_restart = at91rm9200_restart;
	at91rm9200_pm_init();
}

@@ -62,7 +44,6 @@ static const char *at91rm9200_dt_board_compat[] __initconst = {
};

DT_MACHINE_START(at91rm9200_dt, "Atmel AT91RM9200")
	.init_time      = at91rm9200_dt_timer_init,
	.init_machine	= at91rm9200_dt_device_init,
	.dt_compat	= at91rm9200_dt_board_compat,
MACHINE_END
Loading