aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/bcm63xx/boards
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-09 03:08:04 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-09 03:08:04 -0400
commitde390bba797aa9a554bc1769b6a8771605854d79 (patch)
treece95610d4a70ec0a7307a30cfd1a66fdf0c901ab /arch/mips/bcm63xx/boards
parent50e0d10232db05c6776afcf6098459bff47e8b15 (diff)
parent382fc33b4a04e2dde89b4c69a6880e0c7d9761e2 (diff)
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS update from Ralf Baechle: "This is the MIPS update for 3.7. A fair chunk of them are platform updates to the Cavium Octeon SOC (which involves machine generated header files of considerable size), Atheros ATH79xx, RMI aka Netlogic aka Broadcom XLP, Broadcom BCM63xx platforms. Support for the commercial MIPS simulator MIPSsim has been removed as MIPS Technologies is shifting away from this product and Qemu is offering various more powerful platforms. The generic MIPS code can now also probe for no-execute / write-only TLB features implemented without the full SmartMIPS extension as permitted by the latest MIPS processor architecture. Lots of small changes to generic code." * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (78 commits) MIPS: ath79: Fix CPU/DDR frequency calculation for SRIF PLLs MIPS: ath79: use correct fractional dividers for {CPU,DDR}_PLL on AR934x MIPS: BCM63XX: Properly handle mac address octet overflow MIPS: Kconfig: Avoid build errors by hiding USE_OF from the user. MIPS: Replace `-' in defconfig filename wth `_' for consistency. MIPS: Wire kcmp syscall. MIPS: MIPSsim: Remove the MIPSsim platform. MIPS: NOTIFY_RESUME is not needed in TIF masks MIPS: Merge the identical "return from syscall" per-ABI code MIPS: Unobfuscate _TIF..._MASK MIPS: Prevent hitting do_notify_resume() with !user_mode(regs). MIPS: Replace 'kernel_uses_smartmips_rixi' with 'cpu_has_rixi'. MIPS: Add base architecture support for RI and XI. MIPS: Optimise TLB handlers for MIPS32/64 R2 cores. MIPS: uasm: Add INS and EXT instructions. MIPS: Avoid pipeline stalls on some MIPS32R2 cores. MIPS: Make VPE count to be one-based. MIPS: Add new end of interrupt functionality for GIC. MIPS: Add EIC support for GIC. MIPS: Code clean-ups for the GIC. ...
Diffstat (limited to 'arch/mips/bcm63xx/boards')
-rw-r--r--arch/mips/bcm63xx/boards/board_bcm963xx.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/arch/mips/bcm63xx/boards/board_bcm963xx.c b/arch/mips/bcm63xx/boards/board_bcm963xx.c
index dd18e4b761a8..1cd4d73f23c7 100644
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -24,6 +24,7 @@
24#include <bcm63xx_dev_flash.h> 24#include <bcm63xx_dev_flash.h>
25#include <bcm63xx_dev_pcmcia.h> 25#include <bcm63xx_dev_pcmcia.h>
26#include <bcm63xx_dev_spi.h> 26#include <bcm63xx_dev_spi.h>
27#include <bcm63xx_dev_usb_usbd.h>
27#include <board_bcm963xx.h> 28#include <board_bcm963xx.h>
28 29
29#define PFX "board_bcm963xx: " 30#define PFX "board_bcm963xx: "
@@ -42,6 +43,12 @@ static struct board_info __initdata board_96328avng = {
42 43
43 .has_uart0 = 1, 44 .has_uart0 = 1,
44 .has_pci = 1, 45 .has_pci = 1,
46 .has_usbd = 0,
47
48 .usbd = {
49 .use_fullspeed = 0,
50 .port_no = 0,
51 },
45 52
46 .leds = { 53 .leds = {
47 { 54 {
@@ -713,7 +720,7 @@ const char *board_get_name(void)
713 */ 720 */
714static int board_get_mac_address(u8 *mac) 721static int board_get_mac_address(u8 *mac)
715{ 722{
716 u8 *p; 723 u8 *oui;
717 int count; 724 int count;
718 725
719 if (mac_addr_used >= nvram.mac_addr_count) { 726 if (mac_addr_used >= nvram.mac_addr_count) {
@@ -722,21 +729,23 @@ static int board_get_mac_address(u8 *mac)
722 } 729 }
723 730
724 memcpy(mac, nvram.mac_addr_base, ETH_ALEN); 731 memcpy(mac, nvram.mac_addr_base, ETH_ALEN);
725 p = mac + ETH_ALEN - 1; 732 oui = mac + ETH_ALEN/2 - 1;
726 count = mac_addr_used; 733 count = mac_addr_used;
727 734
728 while (count--) { 735 while (count--) {
736 u8 *p = mac + ETH_ALEN - 1;
737
729 do { 738 do {
730 (*p)++; 739 (*p)++;
731 if (*p != 0) 740 if (*p != 0)
732 break; 741 break;
733 p--; 742 p--;
734 } while (p != mac); 743 } while (p != oui);
735 }
736 744
737 if (p == mac) { 745 if (p == oui) {
738 printk(KERN_ERR PFX "unable to fetch mac address\n"); 746 printk(KERN_ERR PFX "unable to fetch mac address\n");
739 return -ENODEV; 747 return -ENODEV;
748 }
740 } 749 }
741 750
742 mac_addr_used++; 751 mac_addr_used++;
@@ -888,6 +897,9 @@ int __init board_register_devices(void)
888 !board_get_mac_address(board.enet1.mac_addr)) 897 !board_get_mac_address(board.enet1.mac_addr))
889 bcm63xx_enet_register(1, &board.enet1); 898 bcm63xx_enet_register(1, &board.enet1);
890 899
900 if (board.has_usbd)
901 bcm63xx_usbd_register(&board.usbd);
902
891 if (board.has_dsp) 903 if (board.has_dsp)
892 bcm63xx_dsp_register(&board.dsp); 904 bcm63xx_dsp_register(&board.dsp);
893 905