summaryrefslogtreecommitdiff
path: root/arch/arm/mach-davinci/dm644x.c
diff options
context:
space:
mode:
authorKevin Hilman <khilman@deeprootsystems.com>2009-05-07 06:19:40 -0700
committerKevin Hilman <khilman@deeprootsystems.com>2009-05-26 07:18:16 -0700
commitac7b75b5bbbfd60b752869a22daa3be99b5b4f99 (patch)
treedac2408210f9e815f98f67c7c6e32216db99fa73 /arch/arm/mach-davinci/dm644x.c
parent2dbf56aeb7986b54651c93ed171877e8179289bc (diff)
davinci: EMAC platform support
Add SoC and platform-specific data and init for DaVinci EMAC network driver. Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/dm644x.c')
-rw-r--r--arch/arm/mach-davinci/dm644x.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c
index d428ef192eac..0419d571bdca 100644
--- a/arch/arm/mach-davinci/dm644x.c
+++ b/arch/arm/mach-davinci/dm644x.c
@@ -444,6 +444,25 @@ static struct platform_device dm644x_edma_device = {
};
/*----------------------------------------------------------------------*/
+#if defined(CONFIG_TI_DAVINCI_EMAC) || defined(CONFIG_TI_DAVINCI_EMAC_MODULE)
+
+void dm644x_init_emac(struct emac_platform_data *pdata)
+{
+ pdata->ctrl_reg_offset = DM644X_EMAC_CNTRL_OFFSET;
+ pdata->ctrl_mod_reg_offset = DM644X_EMAC_CNTRL_MOD_OFFSET;
+ pdata->ctrl_ram_offset = DM644X_EMAC_CNTRL_RAM_OFFSET;
+ pdata->mdio_reg_offset = DM644X_EMAC_MDIO_OFFSET;
+ pdata->ctrl_ram_size = DM644X_EMAC_CNTRL_RAM_SIZE;
+ pdata->version = EMAC_VERSION_1;
+ dm644x_emac_device.dev.platform_data = pdata;
+ platform_device_register(&dm644x_emac_device);
+}
+#else
+
+void dm644x_init_emac(struct emac_platform_data *unused) {}
+
+#endif
+
void __init dm644x_init(void)
{
davinci_clk_init(dm644x_clks);