Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1c30a29 authored by Jean-Christophe PLAGNIOL-VILLARD's avatar Jean-Christophe PLAGNIOL-VILLARD
Browse files

ARM: at91: make watchdog drivers soc independent



switch the watchdog drivers to resource and pass it via platform_device

Signed-off-by: default avatarJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent f22deee5
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -694,10 +694,19 @@ static void __init at91_add_device_rtt(void)
 * -------------------------------------------------------------------- */

#if defined(CONFIG_AT91SAM9X_WATCHDOG) || defined(CONFIG_AT91SAM9X_WATCHDOG_MODULE)
static struct resource wdt_resources[] = {
	{
		.start	= AT91CAP9_BASE_WDT,
		.end	= AT91CAP9_BASE_WDT + SZ_16 - 1,
		.flags	= IORESOURCE_MEM,
	}
};

static struct platform_device at91cap9_wdt_device = {
	.name		= "at91_wdt",
	.id		= -1,
	.num_resources	= 0,
	.resource	= wdt_resources,
	.num_resources	= ARRAY_SIZE(wdt_resources),
};

static void __init at91_add_device_watchdog(void)
+10 −1
Original line number Diff line number Diff line
@@ -738,10 +738,19 @@ static void __init at91_add_device_rtt(void)
 * -------------------------------------------------------------------- */

#if defined(CONFIG_AT91SAM9X_WATCHDOG) || defined(CONFIG_AT91SAM9X_WATCHDOG_MODULE)
static struct resource wdt_resources[] = {
	{
		.start	= AT91SAM9260_BASE_WDT,
		.end	= AT91SAM9260_BASE_WDT + SZ_16 - 1,
		.flags	= IORESOURCE_MEM,
	}
};

static struct platform_device at91sam9260_wdt_device = {
	.name		= "at91_wdt",
	.id		= -1,
	.num_resources	= 0,
	.resource	= wdt_resources,
	.num_resources	= ARRAY_SIZE(wdt_resources),
};

static void __init at91_add_device_watchdog(void)
+10 −1
Original line number Diff line number Diff line
@@ -624,10 +624,19 @@ static void __init at91_add_device_rtt(void)
 * -------------------------------------------------------------------- */

#if defined(CONFIG_AT91SAM9X_WATCHDOG) || defined(CONFIG_AT91SAM9X_WATCHDOG_MODULE)
static struct resource wdt_resources[] = {
	{
		.start	= AT91SAM9261_BASE_WDT,
		.end	= AT91SAM9261_BASE_WDT + SZ_16 - 1,
		.flags	= IORESOURCE_MEM,
	}
};

static struct platform_device at91sam9261_wdt_device = {
	.name		= "at91_wdt",
	.id		= -1,
	.num_resources	= 0,
	.resource	= wdt_resources,
	.num_resources	= ARRAY_SIZE(wdt_resources),
};

static void __init at91_add_device_watchdog(void)
+10 −1
Original line number Diff line number Diff line
@@ -996,10 +996,19 @@ static void __init at91_add_device_rtt(void)
 * -------------------------------------------------------------------- */

#if defined(CONFIG_AT91SAM9X_WATCHDOG) || defined(CONFIG_AT91SAM9X_WATCHDOG_MODULE)
static struct resource wdt_resources[] = {
	{
		.start	= AT91SAM9263_BASE_WDT,
		.end	= AT91SAM9263_BASE_WDT + SZ_16 - 1,
		.flags	= IORESOURCE_MEM,
	}
};

static struct platform_device at91sam9263_wdt_device = {
	.name		= "at91_wdt",
	.id		= -1,
	.num_resources	= 0,
	.resource	= wdt_resources,
	.num_resources	= ARRAY_SIZE(wdt_resources),
};

static void __init at91_add_device_watchdog(void)
+10 −1
Original line number Diff line number Diff line
@@ -1133,10 +1133,19 @@ static void __init at91_add_device_trng(void) {}
 * -------------------------------------------------------------------- */

#if defined(CONFIG_AT91SAM9X_WATCHDOG) || defined(CONFIG_AT91SAM9X_WATCHDOG_MODULE)
static struct resource wdt_resources[] = {
	{
		.start	= AT91SAM9G45_BASE_WDT,
		.end	= AT91SAM9G45_BASE_WDT + SZ_16 - 1,
		.flags	= IORESOURCE_MEM,
	}
};

static struct platform_device at91sam9g45_wdt_device = {
	.name		= "at91_wdt",
	.id		= -1,
	.num_resources	= 0,
	.resource	= wdt_resources,
	.num_resources	= ARRAY_SIZE(wdt_resources),
};

static void __init at91_add_device_watchdog(void)
Loading