aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci
diff options
context:
space:
mode:
authorSriramakrishnan <srk@ti.com>2009-11-19 05:28:25 -0500
committerKevin Hilman <khilman@deeprootsystems.com>2010-02-04 16:29:50 -0500
commit8ee2bf9ab792d0c02b13ca3acbd036debb7745d9 (patch)
tree3aee12e86ef03b9df2727c9032eaf60d2a7a11b4 /arch/arm/mach-davinci
parentfc42e335ee6a7dd1f740c0fc868d607cc689d7c4 (diff)
TI Davinci EMAC : Re-use driver for other platforms.
The davinci EMAC peripheral is also available on other TI platforms -notably TI AM3517 SoC. This patch modifies the config option and the platform structure header files so that the driver can be reused on non-davinci platforms as well. Signed-off-by: Sriramakrishnan <srk@ti.com> Acked-by: Chaithrika U S <chaithrika@ti.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci')
-rw-r--r--arch/arm/mach-davinci/common.c2
-rw-r--r--arch/arm/mach-davinci/include/mach/da8xx.h2
-rw-r--r--arch/arm/mach-davinci/include/mach/dm365.h2
-rw-r--r--arch/arm/mach-davinci/include/mach/dm644x.h2
-rw-r--r--arch/arm/mach-davinci/include/mach/dm646x.h2
-rw-r--r--arch/arm/mach-davinci/include/mach/emac.h36
6 files changed, 5 insertions, 41 deletions
diff --git a/arch/arm/mach-davinci/common.c b/arch/arm/mach-davinci/common.c
index c2de94cde56a..94f27cbcd55a 100644
--- a/arch/arm/mach-davinci/common.c
+++ b/arch/arm/mach-davinci/common.c
@@ -11,13 +11,13 @@
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/io.h> 12#include <linux/io.h>
13#include <linux/etherdevice.h> 13#include <linux/etherdevice.h>
14#include <linux/davinci_emac.h>
14 15
15#include <asm/tlb.h> 16#include <asm/tlb.h>
16#include <asm/mach/map.h> 17#include <asm/mach/map.h>
17 18
18#include <mach/common.h> 19#include <mach/common.h>
19#include <mach/cputype.h> 20#include <mach/cputype.h>
20#include <mach/emac.h>
21 21
22#include "clock.h" 22#include "clock.h"
23 23
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h
index d43a4b6b6d76..d9a7f11894c4 100644
--- a/arch/arm/mach-davinci/include/mach/da8xx.h
+++ b/arch/arm/mach-davinci/include/mach/da8xx.h
@@ -13,10 +13,10 @@
13 13
14#include <video/da8xx-fb.h> 14#include <video/da8xx-fb.h>
15 15
16#include <linux/davinci_emac.h>
16#include <mach/serial.h> 17#include <mach/serial.h>
17#include <mach/edma.h> 18#include <mach/edma.h>
18#include <mach/i2c.h> 19#include <mach/i2c.h>
19#include <mach/emac.h>
20#include <mach/asp.h> 20#include <mach/asp.h>
21#include <mach/mmc.h> 21#include <mach/mmc.h>
22#include <mach/usb.h> 22#include <mach/usb.h>
diff --git a/arch/arm/mach-davinci/include/mach/dm365.h b/arch/arm/mach-davinci/include/mach/dm365.h
index 9fc5a64a5364..c3610eb39869 100644
--- a/arch/arm/mach-davinci/include/mach/dm365.h
+++ b/arch/arm/mach-davinci/include/mach/dm365.h
@@ -14,8 +14,8 @@
14#define __ASM_ARCH_DM665_H 14#define __ASM_ARCH_DM665_H
15 15
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/davinci_emac.h>
17#include <mach/hardware.h> 18#include <mach/hardware.h>
18#include <mach/emac.h>
19#include <mach/asp.h> 19#include <mach/asp.h>
20#include <mach/keyscan.h> 20#include <mach/keyscan.h>
21#include <media/davinci/vpfe_capture.h> 21#include <media/davinci/vpfe_capture.h>
diff --git a/arch/arm/mach-davinci/include/mach/dm644x.h b/arch/arm/mach-davinci/include/mach/dm644x.h
index 44e8f0fae9ea..1a8b09ccc3c8 100644
--- a/arch/arm/mach-davinci/include/mach/dm644x.h
+++ b/arch/arm/mach-davinci/include/mach/dm644x.h
@@ -22,8 +22,8 @@
22#ifndef __ASM_ARCH_DM644X_H 22#ifndef __ASM_ARCH_DM644X_H
23#define __ASM_ARCH_DM644X_H 23#define __ASM_ARCH_DM644X_H
24 24
25#include <linux/davinci_emac.h>
25#include <mach/hardware.h> 26#include <mach/hardware.h>
26#include <mach/emac.h>
27#include <mach/asp.h> 27#include <mach/asp.h>
28#include <media/davinci/vpfe_capture.h> 28#include <media/davinci/vpfe_capture.h>
29 29
diff --git a/arch/arm/mach-davinci/include/mach/dm646x.h b/arch/arm/mach-davinci/include/mach/dm646x.h
index 8221153bb2af..846da98b619a 100644
--- a/arch/arm/mach-davinci/include/mach/dm646x.h
+++ b/arch/arm/mach-davinci/include/mach/dm646x.h
@@ -12,11 +12,11 @@
12#define __ASM_ARCH_DM646X_H 12#define __ASM_ARCH_DM646X_H
13 13
14#include <mach/hardware.h> 14#include <mach/hardware.h>
15#include <mach/emac.h>
16#include <mach/asp.h> 15#include <mach/asp.h>
17#include <linux/i2c.h> 16#include <linux/i2c.h>
18#include <linux/videodev2.h> 17#include <linux/videodev2.h>
19#include <linux/clk.h> 18#include <linux/clk.h>
19#include <linux/davinci_emac.h>
20 20
21#define DM646X_EMAC_BASE (0x01C80000) 21#define DM646X_EMAC_BASE (0x01C80000)
22#define DM646X_EMAC_CNTRL_OFFSET (0x0000) 22#define DM646X_EMAC_CNTRL_OFFSET (0x0000)
diff --git a/arch/arm/mach-davinci/include/mach/emac.h b/arch/arm/mach-davinci/include/mach/emac.h
deleted file mode 100644
index beff4fb7c845..000000000000
--- a/arch/arm/mach-davinci/include/mach/emac.h
+++ /dev/null
@@ -1,36 +0,0 @@
1/*
2 * TI DaVinci EMAC platform support
3 *
4 * Author: Kevin Hilman, Deep Root Systems, LLC
5 *
6 * 2007 (c) Deep Root Systems, LLC. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 */
11#ifndef _MACH_DAVINCI_EMAC_H
12#define _MACH_DAVINCI_EMAC_H
13
14#include <linux/if_ether.h>
15#include <linux/memory.h>
16
17struct emac_platform_data {
18 char mac_addr[ETH_ALEN];
19 u32 ctrl_reg_offset;
20 u32 ctrl_mod_reg_offset;
21 u32 ctrl_ram_offset;
22 u32 mdio_reg_offset;
23 u32 ctrl_ram_size;
24 u32 phy_mask;
25 u32 mdio_max_freq;
26 u8 rmii_en;
27 u8 version;
28};
29
30enum {
31 EMAC_VERSION_1, /* DM644x */
32 EMAC_VERSION_2, /* DM646x */
33};
34
35void davinci_get_mac_addr(struct memory_accessor *mem_acc, void *context);
36#endif