MIPS: Octeon: Remove usage of cvmx_wait() everywhere.

Signed-off-by: Steven J. Hill <steven.hill@cavium.com>
Acked-by: David Daney <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/17389/
Signed-off-by: James Hogan <jhogan@kernel.org>
This commit is contained in:
Steven J. Hill
2017-09-28 12:34:05 -05:00
committed by James Hogan
parent 7820b84be8
commit edf188bee1
5 changed files with 17 additions and 26 deletions

View File

@@ -36,6 +36,8 @@
#ifndef __CVMX_FPA_H__
#define __CVMX_FPA_H__
#include <linux/delay.h>
#include <asm/octeon/cvmx-address.h>
#include <asm/octeon/cvmx-fpa-defs.h>
@@ -165,7 +167,7 @@ static inline void cvmx_fpa_enable(void)
}
/* Enforce a 10 cycle delay between config and enable */
cvmx_wait(10);
__delay(10);
}
/* FIXME: CVMX_FPA_CTL_STATUS read is unmodelled */

View File

@@ -30,6 +30,7 @@
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/delay.h>
enum cvmx_mips_space {
CVMX_MIPS_SPACE_XKSEG = 3LL,
@@ -428,18 +429,6 @@ static inline uint64_t cvmx_get_cycle(void)
return cycle;
}
/**
* Wait for the specified number of cycle
*
*/
static inline void cvmx_wait(uint64_t cycles)
{
uint64_t done = cvmx_get_cycle() + cycles;
while (cvmx_get_cycle() < done)
; /* Spin */
}
/**
* Reads a chip global cycle counter. This counts CPU cycles since
* chip reset. The counter is 64 bit.
@@ -481,7 +470,7 @@ static inline uint64_t cvmx_get_cycle_global(void)
result = -1; \
break; \
} else \
cvmx_wait(100); \
__delay(100); \
} \
} while (0); \
result; \