diff options
author | Mike Frysinger <michael.frysinger@analog.com> | 2007-11-22 03:07:03 -0500 |
---|---|---|
committer | Bryan Wu <bryan.wu@analog.com> | 2007-11-22 03:07:03 -0500 |
commit | 137b1529da492baa654c702ecb60bb950eccb98d (patch) | |
tree | e51b79cb23e428eba0e3168b920ec623721886fa /arch/blackfin/mach-bf527 | |
parent | b33d51877726b066699b9ee40b5f512c77bdca38 (diff) |
Blackfin arch: sharing the board-specific MAC function does not make sense so move it into board-specific files
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'arch/blackfin/mach-bf527')
-rw-r--r-- | arch/blackfin/mach-bf527/boards/Makefile | 1 | ||||
-rw-r--r-- | arch/blackfin/mach-bf527/boards/eth_mac.c | 50 | ||||
-rw-r--r-- | arch/blackfin/mach-bf527/boards/ezkit.c | 11 |
3 files changed, 11 insertions, 51 deletions
diff --git a/arch/blackfin/mach-bf527/boards/Makefile b/arch/blackfin/mach-bf527/boards/Makefile index 8c75ed5987b1..7277d35ef111 100644 --- a/arch/blackfin/mach-bf527/boards/Makefile +++ b/arch/blackfin/mach-bf527/boards/Makefile | |||
@@ -2,5 +2,4 @@ | |||
2 | # arch/blackfin/mach-bf527/boards/Makefile | 2 | # arch/blackfin/mach-bf527/boards/Makefile |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y += eth_mac.o | ||
6 | obj-$(CONFIG_BFIN527_EZKIT) += ezkit.o | 5 | obj-$(CONFIG_BFIN527_EZKIT) += ezkit.o |
diff --git a/arch/blackfin/mach-bf527/boards/eth_mac.c b/arch/blackfin/mach-bf527/boards/eth_mac.c deleted file mode 100644 index a725cc8a9290..000000000000 --- a/arch/blackfin/mach-bf527/boards/eth_mac.c +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | /* | ||
2 | * arch/blackfin/mach-bf537/board/eth_mac.c | ||
3 | * | ||
4 | * Copyright (C) 2007 Analog Devices, Inc. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #include <linux/module.h> | ||
21 | #include <asm/blackfin.h> | ||
22 | |||
23 | #if defined(CONFIG_GENERIC_BOARD) || defined(CONFIG_BFIN537_STAMP) | ||
24 | |||
25 | /* | ||
26 | * Currently the MAC address is saved in Flash by U-Boot | ||
27 | */ | ||
28 | #define FLASH_MAC 0x203f0000 | ||
29 | |||
30 | void get_bf537_ether_addr(char *addr) | ||
31 | { | ||
32 | unsigned int flash_mac = (unsigned int) FLASH_MAC; | ||
33 | *(u32 *)(&(addr[0])) = bfin_read32(flash_mac); | ||
34 | flash_mac += 4; | ||
35 | *(u16 *)(&(addr[4])) = bfin_read16(flash_mac); | ||
36 | } | ||
37 | |||
38 | #else | ||
39 | |||
40 | /* | ||
41 | * Provide MAC address function for other specific board setting | ||
42 | */ | ||
43 | void get_bf537_ether_addr(char *addr) | ||
44 | { | ||
45 | printk(KERN_WARNING "%s: No valid Ethernet MAC address found\n", __FILE__); | ||
46 | } | ||
47 | |||
48 | #endif | ||
49 | |||
50 | EXPORT_SYMBOL(get_bf537_ether_addr); | ||
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c index 299b1704796d..57407b95d532 100644 --- a/arch/blackfin/mach-bf527/boards/ezkit.c +++ b/arch/blackfin/mach-bf527/boards/ezkit.c | |||
@@ -808,3 +808,14 @@ void native_machine_restart(char *cmd) | |||
808 | if ((bfin_read_SYSCR() & 0x7) == 0x3) | 808 | if ((bfin_read_SYSCR() & 0x7) == 0x3) |
809 | bfin_gpio_reset_spi0_ssel1(); | 809 | bfin_gpio_reset_spi0_ssel1(); |
810 | } | 810 | } |
811 | |||
812 | /* | ||
813 | * Currently the MAC address is saved in Flash by U-Boot | ||
814 | */ | ||
815 | #define FLASH_MAC 0x203f0000 | ||
816 | void get_bf537_ether_addr(char *addr) | ||
817 | { | ||
818 | *(u32 *)(&(addr[0])) = bfin_read32(FLASH_MAC); | ||
819 | *(u16 *)(&(addr[4])) = bfin_read16(FLASH_MAC + 4); | ||
820 | } | ||
821 | EXPORT_SYMBOL(get_bf537_ether_addr); | ||