#include <linux/module.h>
#include <linux/of_address.h>
#include <linux/platform_device.h>
#include <linux/reboot.h>
#include <soc/at91/at91sam9_ddrsdr.h>
#include <soc/at91/at91sam9_sdramc.h>
#define AT91_RSTC_CR 0x00
#define AT91_RSTC_PROCRST BIT(0)
#define AT91_RSTC_PERRST BIT(2)
#define AT91_RSTC_EXTRST BIT(3)
#define AT91_RSTC_KEY (0xa5 << 24)
#define AT91_RSTC_SR 0x04
#define AT91_RSTC_URSTS BIT(0)
#define AT91_RSTC_RSTTYP GENMASK(10, 8)
#define AT91_RSTC_NRSTL BIT(16)
#define AT91_RSTC_SRCMP BIT(17)
#define AT91_RSTC_MR 0x08
#define AT91_RSTC_URSTEN BIT(0)
#define AT91_RSTC_URSTIEN BIT(4)
#define AT91_RSTC_ERSTL GENMASK(11, 8)
RESET_TYPE_XTAL_FAIL = 7,
static void __iomem *at91_ramc_base[2], *at91_rstc_base;
static int at91sam9260_restart(struct notifier_block *this, unsigned long mode,