diff options
Diffstat (limited to 'arch/arm/mach-davinci/devices.c')
-rw-r--r-- | arch/arm/mach-davinci/devices.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/devices.c b/arch/arm/mach-davinci/devices.c index 56c19319a7d2..36c528ff30f9 100644 --- a/arch/arm/mach-davinci/devices.c +++ b/arch/arm/mach-davinci/devices.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <mach/mux.h> | 25 | #include <mach/mux.h> |
26 | #include <mach/edma.h> | 26 | #include <mach/edma.h> |
27 | #include <mach/mmc.h> | 27 | #include <mach/mmc.h> |
28 | #include <mach/time.h> | ||
28 | 29 | ||
29 | #define DAVINCI_I2C_BASE 0x01C21000 | 30 | #define DAVINCI_I2C_BASE 0x01C21000 |
30 | #define DAVINCI_MMCSD0_BASE 0x01E10000 | 31 | #define DAVINCI_MMCSD0_BASE 0x01E10000 |
@@ -235,6 +236,52 @@ static void davinci_init_wdt(void) | |||
235 | 236 | ||
236 | /*-------------------------------------------------------------------------*/ | 237 | /*-------------------------------------------------------------------------*/ |
237 | 238 | ||
239 | struct davinci_timer_instance davinci_timer_instance[2] = { | ||
240 | { | ||
241 | .base = IO_ADDRESS(DAVINCI_TIMER0_BASE), | ||
242 | .bottom_irq = IRQ_TINT0_TINT12, | ||
243 | .top_irq = IRQ_TINT0_TINT34, | ||
244 | }, | ||
245 | { | ||
246 | .base = IO_ADDRESS(DAVINCI_TIMER1_BASE), | ||
247 | .bottom_irq = IRQ_TINT1_TINT12, | ||
248 | .top_irq = IRQ_TINT1_TINT34, | ||
249 | }, | ||
250 | }; | ||
251 | |||
252 | /*-------------------------------------------------------------------------*/ | ||
253 | |||
254 | #if defined(CONFIG_TI_DAVINCI_EMAC) || defined(CONFIG_TI_DAVINCI_EMAC_MODULE) | ||
255 | |||
256 | void davinci_init_emac(struct emac_platform_data *pdata) | ||
257 | { | ||
258 | DECLARE_MAC_BUF(buf); | ||
259 | |||
260 | if (cpu_is_davinci_dm644x()) | ||
261 | dm644x_init_emac(pdata); | ||
262 | else if (cpu_is_davinci_dm646x()) | ||
263 | dm646x_init_emac(pdata); | ||
264 | |||
265 | /* if valid MAC exists, don't re-register */ | ||
266 | if (is_valid_ether_addr(pdata->mac_addr)) | ||
267 | return; | ||
268 | else { | ||
269 | /* Use random MAC if none passed */ | ||
270 | random_ether_addr(pdata->mac_addr); | ||
271 | |||
272 | printk(KERN_WARNING "%s: using random MAC addr: %s\n", | ||
273 | __func__, print_mac(buf, pdata->mac_addr)); | ||
274 | } | ||
275 | } | ||
276 | |||
277 | #else | ||
278 | |||
279 | void davinci_init_emac(struct emac_platform_data *unused) {} | ||
280 | |||
281 | #endif | ||
282 | |||
283 | /*-------------------------------------------------------------------------*/ | ||
284 | |||
238 | static int __init davinci_init_devices(void) | 285 | static int __init davinci_init_devices(void) |
239 | { | 286 | { |
240 | /* please keep these calls, and their implementations above, | 287 | /* please keep these calls, and their implementations above, |