diff options
author | Marcel Moolenaar <marcel@FreeBSD.org> | 2011-10-04 20:17:43 +0000 |
---|---|---|
committer | Marcel Moolenaar <marcel@FreeBSD.org> | 2011-10-04 20:17:43 +0000 |
commit | 4699b5e472d01d978f94b07152af2fa169146d4b (patch) | |
tree | 3c4db05f9483934a4daafed483064f428ebfedc5 /sys | |
parent | 5da3eb94fc6c44f333b318c7fd5cd37efea3a7d3 (diff) | |
download | src-4699b5e472d01d978f94b07152af2fa169146d4b.tar.gz src-4699b5e472d01d978f94b07152af2fa169146d4b.zip |
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
Notes
Notes:
svn path=/head/; revision=226024
Diffstat (limited to 'sys')
-rw-r--r-- | sys/mips/cavium/if_octm.c | 4 | ||||
-rw-r--r-- | sys/mips/cavium/octe/ethernet-common.c | 13 | ||||
-rw-r--r-- | sys/mips/cavium/octe/ethernet.c | 8 | ||||
-rw-r--r-- | sys/mips/cavium/octeon_ebt3000_cf.c | 5 | ||||
-rw-r--r-- | sys/mips/cavium/octeon_mp.c | 5 |
5 files changed, 10 insertions, 25 deletions
diff --git a/sys/mips/cavium/if_octm.c b/sys/mips/cavium/if_octm.c index a753d663752a..847ad3c0fd88 100644 --- a/sys/mips/cavium/if_octm.c +++ b/sys/mips/cavium/if_octm.c @@ -64,8 +64,6 @@ #include <contrib/octeon-sdk/cvmx-interrupt.h> #include <contrib/octeon-sdk/cvmx-mgmt-port.h> -extern cvmx_bootinfo_t *octeon_bootinfo; - struct octm_softc { struct ifnet *sc_ifp; device_t sc_dev; @@ -179,7 +177,7 @@ octm_attach(device_t dev) * Set MAC address for this management port. */ mac = 0; - memcpy((u_int8_t *)&mac + 2, octeon_bootinfo->mac_addr_base, 6); + memcpy((u_int8_t *)&mac + 2, cvmx_sysinfo_get()->mac_addr_base, 6); mac += sc->sc_port; cvmx_mgmt_port_set_mac(sc->sc_port, mac); diff --git a/sys/mips/cavium/octe/ethernet-common.c b/sys/mips/cavium/octe/ethernet-common.c index 73103cc4725a..839b6f82ecee 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 50b91fcf0a7f..a3a5ae79d3fb 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); diff --git a/sys/mips/cavium/octeon_ebt3000_cf.c b/sys/mips/cavium/octeon_ebt3000_cf.c index bb553e868749..ae7bb7e7fbba 100644 --- a/sys/mips/cavium/octeon_ebt3000_cf.c +++ b/sys/mips/cavium/octeon_ebt3000_cf.c @@ -100,9 +100,6 @@ __FBSDID("$FreeBSD$"); #define SWAP_SHORT(x) ((x << 8) | (x >> 8)) #define MODEL_STR_SIZE 40 -/* XXX */ -extern cvmx_bootinfo_t *octeon_bootinfo; - /* Globals */ /* * There's three bus types supported by this driver. @@ -648,7 +645,7 @@ static void cf_identify (driver_t *drv, device_t parent) int count = 0; cvmx_mio_boot_reg_cfgx_t cfg; - uint64_t phys_base = octeon_bootinfo->compact_flash_common_base_addr; + uint64_t phys_base = cvmx_sysinfo_get()->compact_flash_common_base_addr; if (octeon_is_simulation()) return; diff --git a/sys/mips/cavium/octeon_mp.c b/sys/mips/cavium/octeon_mp.c index 5cd73e837e60..95839779ccaa 100644 --- a/sys/mips/cavium/octeon_mp.c +++ b/sys/mips/cavium/octeon_mp.c @@ -43,9 +43,6 @@ __FBSDID("$FreeBSD$"); #include <contrib/octeon-sdk/cvmx.h> #include <contrib/octeon-sdk/cvmx-interrupt.h> -/* XXX */ -extern cvmx_bootinfo_t *octeon_bootinfo; - unsigned octeon_ap_boot = ~0; void @@ -105,7 +102,7 @@ platform_init_ap(int cpuid) void platform_cpu_mask(cpuset_t *mask) { - uint64_t core_mask = octeon_bootinfo->core_mask; + uint64_t core_mask = cvmx_sysinfo_get()->core_mask; uint64_t i, m; CPU_ZERO(mask); |