mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-20 00:33:57 +00:00
mips: fix build w/ TICK_USE_MALTA_RTC defined
This was mainly broken by 7e82012aff
and
r178192 respectively.
Also, remove unused #include.
This commit is contained in:
parent
7d7fad7bd9
commit
5731987b71
|
@ -73,8 +73,7 @@ __FBSDID("$FreeBSD$");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TICK_USE_MALTA_RTC
|
#ifdef TICK_USE_MALTA_RTC
|
||||||
#include <mips/mips4k/malta/maltareg.h>
|
#include <mips/malta/maltareg.h>
|
||||||
#include <dev/mc146818/mc146818reg.h>
|
|
||||||
#include <isa/rtc.h>
|
#include <isa/rtc.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -157,7 +156,7 @@ lcd_puts(char *s)
|
||||||
|
|
||||||
#ifdef TICK_USE_MALTA_RTC
|
#ifdef TICK_USE_MALTA_RTC
|
||||||
static __inline uint8_t
|
static __inline uint8_t
|
||||||
rtcin(uint8_t addr)
|
malta_rtcin(uint8_t addr)
|
||||||
{
|
{
|
||||||
|
|
||||||
*((volatile uint8_t *)
|
*((volatile uint8_t *)
|
||||||
|
@ -167,7 +166,7 @@ rtcin(uint8_t addr)
|
||||||
}
|
}
|
||||||
|
|
||||||
static __inline void
|
static __inline void
|
||||||
writertc(uint8_t addr, uint8_t val)
|
malta_writertc(uint8_t addr, uint8_t val)
|
||||||
{
|
{
|
||||||
|
|
||||||
*((volatile uint8_t *)
|
*((volatile uint8_t *)
|
||||||
|
@ -257,19 +256,19 @@ malta_cpu_freq(void)
|
||||||
u_int64_t counterval[2];
|
u_int64_t counterval[2];
|
||||||
|
|
||||||
/* Set RTC to binary mode. */
|
/* Set RTC to binary mode. */
|
||||||
writertc(RTC_STATUSB, (rtcin(RTC_STATUSB) | RTCSB_BCD));
|
malta_writertc(RTC_STATUSB, (malta_rtcin(RTC_STATUSB) | RTCSB_BCD));
|
||||||
|
|
||||||
/* Busy-wait for falling edge of RTC update. */
|
/* Busy-wait for falling edge of RTC update. */
|
||||||
while (((rtcin(RTC_STATUSA) & RTCSA_TUP) == 0))
|
while (((malta_rtcin(RTC_STATUSA) & RTCSA_TUP) == 0))
|
||||||
;
|
;
|
||||||
while (((rtcin(RTC_STATUSA)& RTCSA_TUP) != 0))
|
while (((malta_rtcin(RTC_STATUSA)& RTCSA_TUP) != 0))
|
||||||
;
|
;
|
||||||
counterval[0] = mips_rd_count();
|
counterval[0] = mips_rd_count();
|
||||||
|
|
||||||
/* Busy-wait for falling edge of RTC update. */
|
/* Busy-wait for falling edge of RTC update. */
|
||||||
while (((rtcin(RTC_STATUSA) & RTCSA_TUP) == 0))
|
while (((malta_rtcin(RTC_STATUSA) & RTCSA_TUP) == 0))
|
||||||
;
|
;
|
||||||
while (((rtcin(RTC_STATUSA)& RTCSA_TUP) != 0))
|
while (((malta_rtcin(RTC_STATUSA)& RTCSA_TUP) != 0))
|
||||||
;
|
;
|
||||||
counterval[1] = mips_rd_count();
|
counterval[1] = mips_rd_count();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue