1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-14 14:55:41 +00:00

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
This commit is contained in:
Marcel Moolenaar 2011-10-04 20:17:43 +00:00
parent 5da3eb94fc
commit 4699b5e472
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=226024
5 changed files with 10 additions and 25 deletions

View File

@ -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);

View File

@ -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++;

View File

@ -76,12 +76,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
*/
@ -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);

View File

@ -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;

View File

@ -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);