davinci: Add watchdog base address flexibility
The watchdog code currently hardcodes the base address of the timer its using. To support new SoCs, make it support timers at any address. Use the soc_info structure to do this. Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
This commit is contained in:
committed by
Kevin Hilman
parent
f64691b3ab
commit
951d6f6d70
@@ -216,8 +216,6 @@ void __init davinci_setup_mmc(int module, struct davinci_mmc_config *config)
|
||||
|
||||
static struct resource wdt_resources[] = {
|
||||
{
|
||||
.start = 0x01c21c00,
|
||||
.end = 0x01c21fff,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
};
|
||||
@@ -231,6 +229,11 @@ struct platform_device davinci_wdt_device = {
|
||||
|
||||
static void davinci_init_wdt(void)
|
||||
{
|
||||
struct davinci_soc_info *soc_info = &davinci_soc_info;
|
||||
|
||||
wdt_resources[0].start = (resource_size_t)soc_info->wdt_base;
|
||||
wdt_resources[0].end = (resource_size_t)soc_info->wdt_base + SZ_1K - 1;
|
||||
|
||||
platform_device_register(&davinci_wdt_device);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user