summaryrefslogtreecommitdiffstats
path: root/sys/mips/cavium/octe
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2011-10-04 20:17:43 +0000
committermarcel <marcel@FreeBSD.org>2011-10-04 20:17:43 +0000
commit36e7af5118dbe7ba99b898f0507b1211adf6b71b (patch)
tree3c4db05f9483934a4daafed483064f428ebfedc5 /sys/mips/cavium/octe
parent1485b2ad01c1e0d5adfdbcc6d06114ecaa15a950 (diff)
downloadFreeBSD-src-36e7af5118dbe7ba99b898f0507b1211adf6b71b.zip
FreeBSD-src-36e7af5118dbe7ba99b898f0507b1211adf6b71b.tar.gz
Remove octeon_bootinfo from all files except octeon_machdep.c.
Use instead cvmx_sysinfo_get() consistently. Reviewed by: jmallett, marcel Obtained from: Juniper Networks, Inc Author: Andrew Duane
Diffstat (limited to 'sys/mips/cavium/octe')
-rw-r--r--sys/mips/cavium/octe/ethernet-common.c13
-rw-r--r--sys/mips/cavium/octe/ethernet.c8
2 files changed, 7 insertions, 14 deletions
diff --git a/sys/mips/cavium/octe/ethernet-common.c b/sys/mips/cavium/octe/ethernet-common.c
index 73103cc..839b6f8 100644
--- a/sys/mips/cavium/octe/ethernet-common.c
+++ b/sys/mips/cavium/octe/ethernet-common.c
@@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$");
#include "ethernet-headers.h"
extern int octeon_is_simulation(void);
-extern cvmx_bootinfo_t *octeon_bootinfo;
/**
@@ -270,12 +269,12 @@ void cvm_oct_common_poll(struct ifnet *ifp)
int cvm_oct_common_init(struct ifnet *ifp)
{
char mac[6] = {
- octeon_bootinfo->mac_addr_base[0],
- octeon_bootinfo->mac_addr_base[1],
- octeon_bootinfo->mac_addr_base[2],
- octeon_bootinfo->mac_addr_base[3],
- octeon_bootinfo->mac_addr_base[4],
- octeon_bootinfo->mac_addr_base[5] };
+ cvmx_sysinfo_get()->mac_addr_base[0],
+ cvmx_sysinfo_get()->mac_addr_base[1],
+ cvmx_sysinfo_get()->mac_addr_base[2],
+ cvmx_sysinfo_get()->mac_addr_base[3],
+ cvmx_sysinfo_get()->mac_addr_base[4],
+ cvmx_sysinfo_get()->mac_addr_base[5] };
cvm_oct_private_t *priv = (cvm_oct_private_t *)ifp->if_softc;
mac[5] += cvm_oct_mac_addr_offset++;
diff --git a/sys/mips/cavium/octe/ethernet.c b/sys/mips/cavium/octe/ethernet.c
index 50b91fc..a3a5ae7 100644
--- a/sys/mips/cavium/octe/ethernet.c
+++ b/sys/mips/cavium/octe/ethernet.c
@@ -77,12 +77,6 @@ TUNABLE_INT("hw.octe.pow_receive_group", &pow_receive_group);
extern int octeon_is_simulation(void);
/**
- * Exported from the kernel so we can determine board information. It is
- * passed by the bootloader to the kernel.
- */
-extern cvmx_bootinfo_t *octeon_bootinfo;
-
-/**
* Periodic timer to check auto negotiation
*/
static struct callout cvm_oct_poll_timer;
@@ -475,7 +469,7 @@ int cvm_oct_init_module(device_t bus)
if (INTERRUPT_LIMIT) {
/* Set the POW timer rate to give an interrupt at most INTERRUPT_LIMIT times per second */
- cvmx_write_csr(CVMX_POW_WQ_INT_PC, octeon_bootinfo->eclock_hz/(INTERRUPT_LIMIT*16*256)<<8);
+ cvmx_write_csr(CVMX_POW_WQ_INT_PC, cvmx_clock_get_rate(CVMX_CLOCK_CORE)/(INTERRUPT_LIMIT*16*256)<<8);
/* Enable POW timer interrupt. It will count when there are packets available */
cvmx_write_csr(CVMX_POW_WQ_INT_THRX(pow_receive_group), 0x1ful<<24);
OpenPOWER on IntegriCloud