aboutsummaryrefslogtreecommitdiff
path: root/hw/rtc
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2022-07-05 16:30:52 +0530
committerRichard Henderson <richard.henderson@linaro.org>2022-07-05 16:30:52 +0530
commit19361471b59441cd6f2aa22d4fbee7a6e9e76586 (patch)
treed4cf184b9d138c117e58339d5c2f1cc9bc534e34 /hw/rtc
parent1437479e5ee1a49ccd84cad9e7b010fb2ee9d805 (diff)
parentbf7ce37f8f40149dfa354bdb74810c8e586a11e4 (diff)
downloadqemu-19361471b59441cd6f2aa22d4fbee7a6e9e76586.zip
qemu-19361471b59441cd6f2aa22d4fbee7a6e9e76586.tar.gz
qemu-19361471b59441cd6f2aa22d4fbee7a6e9e76586.tar.bz2
Merge tag 'pull-la-20220705' of https://gitlab.com/rth7680/qemu into staging
Loongarch patch queue: Build fix for --enable-debug --enable-tcg-interpreter. Build fix for ls7a_rtc. Clear tlb on reset. Fixes for ipi mailboxes. Minor tweak to scripts/qemu-binfmt-conf. # -----BEGIN PGP SIGNATURE----- # # iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmLEGVIdHHJpY2hhcmQu # aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV+SYAgAqMk+GHMT6VQANEsk # So58d9WCPG0XSavowl9oD4w/YSSvPZe5P4KVpJbC3WAgVwEI0RRKTX3RMAeg5z0I # zEEzFUSplSl7cO/7vQG86JRf5C7C/n4V9Q1pQUstNnTEf1s7MdgcG9597OZbV+cF # G5KY1RTQRUr6gpChZQSrv+6j6+aQCA5ZgNwjiVnkBjsNefz1GVFKYppanwHXmMiX # qjxVLgZb1FwOysiKpHKObLsC9pV7ub0QKrlBBk90UyidNjXxcLvV+oQrkyaVwB0m # UM/NN/x5Ive2dqEDfq007TXUc1RpFgwDvKU8EffavBYxx8hCed3DysroiYN+v2MK # qoYWmg== # =+zUy # -----END PGP SIGNATURE----- # gpg: Signature made Tue 05 Jul 2022 04:28:26 PM +0530 # gpg: using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F # gpg: issuer "richard.henderson@linaro.org" # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [ultimate] * tag 'pull-la-20220705' of https://gitlab.com/rth7680/qemu: hw/intc/loongarch_ipi: Fix mail send and any send function hw/intc/loongarch_ipi: Fix ipi device access of 64bits tcg/tci: Remove CONFIG_DEBUG_TCG_INTERPRETER scripts/qemu-binfmt-conf: Add LoongArch to qemu_get_family() target/loongarch: Clean up tlb when cpu reset hw/rtc/ls7a_rtc: Drop unused inline functions Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'hw/rtc')
-rw-r--r--hw/rtc/ls7a_rtc.c27
1 files changed, 6 insertions, 21 deletions
diff --git a/hw/rtc/ls7a_rtc.c b/hw/rtc/ls7a_rtc.c
index e8b7570..1f9e38a 100644
--- a/hw/rtc/ls7a_rtc.c
+++ b/hw/rtc/ls7a_rtc.c
@@ -86,46 +86,31 @@ struct LS7ARtcState {
};
/* switch nanoseconds time to rtc ticks */
-static inline uint64_t ls7a_rtc_ticks(void)
+static uint64_t ls7a_rtc_ticks(void)
{
return qemu_clock_get_ns(rtc_clock) * LS7A_RTC_FREQ / NANOSECONDS_PER_SECOND;
}
/* switch rtc ticks to nanoseconds */
-static inline uint64_t ticks_to_ns(uint64_t ticks)
+static uint64_t ticks_to_ns(uint64_t ticks)
{
return ticks * NANOSECONDS_PER_SECOND / LS7A_RTC_FREQ;
}
-static inline bool toy_enabled(LS7ARtcState *s)
+static bool toy_enabled(LS7ARtcState *s)
{
return FIELD_EX32(s->cntrctl, RTC_CTRL, TOYEN) &&
FIELD_EX32(s->cntrctl, RTC_CTRL, EO);
}
-static inline bool rtc_enabled(LS7ARtcState *s)
+static bool rtc_enabled(LS7ARtcState *s)
{
return FIELD_EX32(s->cntrctl, RTC_CTRL, RTCEN) &&
FIELD_EX32(s->cntrctl, RTC_CTRL, EO);
}
-/* parse toy value to struct tm */
-static inline void toy_val_to_time_mon(uint64_t toy_val, struct tm *tm)
-{
- tm->tm_sec = FIELD_EX32(toy_val, TOY, SEC);
- tm->tm_min = FIELD_EX32(toy_val, TOY, MIN);
- tm->tm_hour = FIELD_EX32(toy_val, TOY, HOUR);
- tm->tm_mday = FIELD_EX32(toy_val, TOY, DAY);
- tm->tm_mon = FIELD_EX32(toy_val, TOY, MON) - 1;
-}
-
-static inline void toy_val_to_time_year(uint64_t toy_year, struct tm *tm)
-{
- tm->tm_year = toy_year;
-}
-
/* parse struct tm to toy value */
-static inline uint64_t toy_time_to_val_mon(struct tm *tm)
+static uint64_t toy_time_to_val_mon(const struct tm *tm)
{
uint64_t val = 0;
@@ -137,7 +122,7 @@ static inline uint64_t toy_time_to_val_mon(struct tm *tm)
return val;
}
-static inline void toymatch_val_to_time(LS7ARtcState *s, uint64_t val, struct tm *tm)
+static void toymatch_val_to_time(LS7ARtcState *s, uint64_t val, struct tm *tm)
{
qemu_get_timedate(tm, s->offset_toy);
tm->tm_sec = FIELD_EX32(val, TOY_MATCH, SEC);