diff options
-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 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/Makefile | 1 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/cm_bf537.c | 7 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/eth_mac.c | 50 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/generic_board.c | 7 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/pnav10.c | 7 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/stamp.c | 11 |
9 files changed, 43 insertions, 102 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); | ||
diff --git a/arch/blackfin/mach-bf537/boards/Makefile b/arch/blackfin/mach-bf537/boards/Makefile index a5af7b5563e6..94a85174283a 100644 --- a/arch/blackfin/mach-bf537/boards/Makefile +++ b/arch/blackfin/mach-bf537/boards/Makefile | |||
@@ -2,7 +2,6 @@ | |||
2 | # arch/blackfin/mach-bf537/boards/Makefile | 2 | # arch/blackfin/mach-bf537/boards/Makefile |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y += eth_mac.o | ||
6 | obj-$(CONFIG_GENERIC_BF537_BOARD) += generic_board.o | 5 | obj-$(CONFIG_GENERIC_BF537_BOARD) += generic_board.o |
7 | obj-$(CONFIG_BFIN537_STAMP) += stamp.o led.o | 6 | obj-$(CONFIG_BFIN537_STAMP) += stamp.o led.o |
8 | obj-$(CONFIG_BFIN537_BLUETECHNIX_CM) += cm_bf537.o | 7 | obj-$(CONFIG_BFIN537_BLUETECHNIX_CM) += cm_bf537.o |
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537.c b/arch/blackfin/mach-bf537/boards/cm_bf537.c index 18bda5412b50..97482d9b4177 100644 --- a/arch/blackfin/mach-bf537/boards/cm_bf537.c +++ b/arch/blackfin/mach-bf537/boards/cm_bf537.c | |||
@@ -427,3 +427,10 @@ static int __init cm_bf537_init(void) | |||
427 | } | 427 | } |
428 | 428 | ||
429 | arch_initcall(cm_bf537_init); | 429 | arch_initcall(cm_bf537_init); |
430 | |||
431 | void get_bf537_ether_addr(char *addr) | ||
432 | { | ||
433 | random_ether_addr(addr); | ||
434 | printk(KERN_WARNING "%s:%s: Setting Ethernet MAC to a random one\n", __FILE__, __func__); | ||
435 | } | ||
436 | EXPORT_SYMBOL(get_bf537_ether_addr); | ||
diff --git a/arch/blackfin/mach-bf537/boards/eth_mac.c b/arch/blackfin/mach-bf537/boards/eth_mac.c deleted file mode 100644 index a725cc8a9290..000000000000 --- a/arch/blackfin/mach-bf537/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-bf537/boards/generic_board.c b/arch/blackfin/mach-bf537/boards/generic_board.c index ed0d26aa31ff..d9e48ba23de1 100644 --- a/arch/blackfin/mach-bf537/boards/generic_board.c +++ b/arch/blackfin/mach-bf537/boards/generic_board.c | |||
@@ -732,3 +732,10 @@ void native_machine_restart(char *cmd) | |||
732 | if ((bfin_read_SYSCR() & 0x7) == 0x3) | 732 | if ((bfin_read_SYSCR() & 0x7) == 0x3) |
733 | bfin_gpio_reset_spi0_ssel1(); | 733 | bfin_gpio_reset_spi0_ssel1(); |
734 | } | 734 | } |
735 | |||
736 | void get_bf537_ether_addr(char *addr) | ||
737 | { | ||
738 | random_ether_addr(addr); | ||
739 | printk(KERN_WARNING "%s:%s: Setting Ethernet MAC to a random one\n", __FILE__, __func__); | ||
740 | } | ||
741 | EXPORT_SYMBOL(get_bf537_ether_addr); | ||
diff --git a/arch/blackfin/mach-bf537/boards/pnav10.c b/arch/blackfin/mach-bf537/boards/pnav10.c index 3c72fc34f142..eea2afc72b57 100644 --- a/arch/blackfin/mach-bf537/boards/pnav10.c +++ b/arch/blackfin/mach-bf537/boards/pnav10.c | |||
@@ -510,3 +510,10 @@ static int __init stamp_init(void) | |||
510 | } | 510 | } |
511 | 511 | ||
512 | arch_initcall(stamp_init); | 512 | arch_initcall(stamp_init); |
513 | |||
514 | void get_bf537_ether_addr(char *addr) | ||
515 | { | ||
516 | random_ether_addr(addr); | ||
517 | printk(KERN_WARNING "%s:%s: Setting Ethernet MAC to a random one\n", __FILE__, __func__); | ||
518 | } | ||
519 | EXPORT_SYMBOL(get_bf537_ether_addr); | ||
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index 3bd0dad14ae3..d35f9628972c 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
@@ -732,3 +732,14 @@ void native_machine_restart(char *cmd) | |||
732 | if ((bfin_read_SYSCR() & 0x7) == 0x3) | 732 | if ((bfin_read_SYSCR() & 0x7) == 0x3) |
733 | bfin_gpio_reset_spi0_ssel1(); | 733 | bfin_gpio_reset_spi0_ssel1(); |
734 | } | 734 | } |
735 | |||
736 | /* | ||
737 | * Currently the MAC address is saved in Flash by U-Boot | ||
738 | */ | ||
739 | #define FLASH_MAC 0x203f0000 | ||
740 | void get_bf537_ether_addr(char *addr) | ||
741 | { | ||
742 | *(u32 *)(&(addr[0])) = bfin_read32(FLASH_MAC); | ||
743 | *(u16 *)(&(addr[4])) = bfin_read16(FLASH_MAC + 4); | ||
744 | } | ||
745 | EXPORT_SYMBOL(get_bf537_ether_addr); | ||