aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/dm646x.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-davinci/dm646x.c')
-rw-r--r--arch/arm/mach-davinci/dm646x.c57
1 files changed, 57 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c
index 93443a6637ea..975ed062ce24 100644
--- a/arch/arm/mach-davinci/dm646x.c
+++ b/arch/arm/mach-davinci/dm646x.c
@@ -279,6 +279,44 @@ struct davinci_clk dm646x_clks[] = {
279 CLK(NULL, NULL, NULL), 279 CLK(NULL, NULL, NULL),
280}; 280};
281 281
282#if defined(CONFIG_TI_DAVINCI_EMAC) || defined(CONFIG_TI_DAVINCI_EMAC_MODULE)
283static struct resource dm646x_emac_resources[] = {
284 {
285 .start = DM646X_EMAC_BASE,
286 .end = DM646X_EMAC_BASE + 0x47ff,
287 .flags = IORESOURCE_MEM,
288 },
289 {
290 .start = IRQ_DM646X_EMACRXTHINT,
291 .end = IRQ_DM646X_EMACRXTHINT,
292 .flags = IORESOURCE_IRQ,
293 },
294 {
295 .start = IRQ_DM646X_EMACRXINT,
296 .end = IRQ_DM646X_EMACRXINT,
297 .flags = IORESOURCE_IRQ,
298 },
299 {
300 .start = IRQ_DM646X_EMACTXINT,
301 .end = IRQ_DM646X_EMACTXINT,
302 .flags = IORESOURCE_IRQ,
303 },
304 {
305 .start = IRQ_DM646X_EMACMISCINT,
306 .end = IRQ_DM646X_EMACMISCINT,
307 .flags = IORESOURCE_IRQ,
308 },
309};
310
311static struct platform_device dm646x_emac_device = {
312 .name = "davinci_emac",
313 .id = 1,
314 .num_resources = ARRAY_SIZE(dm646x_emac_resources),
315 .resource = dm646x_emac_resources,
316};
317
318#endif
319
282/* 320/*
283 * Device specific mux setup 321 * Device specific mux setup
284 * 322 *
@@ -385,6 +423,25 @@ static struct platform_device dm646x_edma_device = {
385 423
386/*----------------------------------------------------------------------*/ 424/*----------------------------------------------------------------------*/
387 425
426#if defined(CONFIG_TI_DAVINCI_EMAC) || defined(CONFIG_TI_DAVINCI_EMAC_MODULE)
427
428void dm646x_init_emac(struct emac_platform_data *pdata)
429{
430 pdata->ctrl_reg_offset = DM646X_EMAC_CNTRL_OFFSET;
431 pdata->ctrl_mod_reg_offset = DM646X_EMAC_CNTRL_MOD_OFFSET;
432 pdata->ctrl_ram_offset = DM646X_EMAC_CNTRL_RAM_OFFSET;
433 pdata->mdio_reg_offset = DM646X_EMAC_MDIO_OFFSET;
434 pdata->ctrl_ram_size = DM646X_EMAC_CNTRL_RAM_SIZE;
435 pdata->version = EMAC_VERSION_2;
436 dm646x_emac_device.dev.platform_data = pdata;
437 platform_device_register(&dm646x_emac_device);
438}
439#else
440
441void dm646x_init_emac(struct emac_platform_data *unused) {}
442
443#endif
444
388void __init dm646x_init(void) 445void __init dm646x_init(void)
389{ 446{
390 davinci_clk_init(dm646x_clks); 447 davinci_clk_init(dm646x_clks);