Home
last modified time | relevance | path

Searched refs:secs (Results 1 – 25 of 41) sorted by relevance

12

/drivers/rtc/
A Drtc-pcap.c44 unsigned long secs; in pcap_rtc_read_alarm() local
49 secs = tod & PCAP_RTC_TOD_MASK; in pcap_rtc_read_alarm()
54 rtc_time64_to_tm(secs, tm); in pcap_rtc_read_alarm()
65 tod = secs % SEC_PER_DAY; in pcap_rtc_set_alarm()
68 days = secs / SEC_PER_DAY; in pcap_rtc_set_alarm()
77 unsigned long secs; in pcap_rtc_read_time() local
81 secs = tod & PCAP_RTC_TOD_MASK; in pcap_rtc_read_time()
86 rtc_time64_to_tm(secs, tm); in pcap_rtc_read_time()
94 unsigned long secs = rtc_tm_to_time64(tm); in pcap_rtc_set_time() local
97 tod = secs % SEC_PER_DAY; in pcap_rtc_set_time()
[all …]
A Drtc-pm8xxx.c256 offset = secs - raw_secs; in pm8xxx_rtc_update_offset()
301 put_unaligned_le32(secs, value); in __pm8xxx_rtc_set_time()
348 u32 secs; in pm8xxx_rtc_set_time() local
351 secs = rtc_tm_to_time64(tm); in pm8xxx_rtc_set_time()
369 u32 secs; in pm8xxx_rtc_read_time() local
376 secs += rtc_dd->offset; in pm8xxx_rtc_read_time()
377 rtc_time64_to_tm(secs, tm); in pm8xxx_rtc_read_time()
389 u32 secs; in pm8xxx_rtc_set_alarm() local
393 secs -= rtc_dd->offset; in pm8xxx_rtc_set_alarm()
424 u32 secs; in pm8xxx_rtc_read_alarm() local
[all …]
A Drtc-ab8500.c65 unsigned long mins, secs; in ab8500_rtc_read_time() local
99 secs = (buf[3] << 8) | buf[4]; in ab8500_rtc_read_time()
100 secs = secs / COUNTS_PER_SEC; in ab8500_rtc_read_time()
101 secs = secs + (mins * 60); in ab8500_rtc_read_time()
103 rtc_time64_to_tm(secs, tm); in ab8500_rtc_read_time()
113 secs = rtc_tm_to_time64(tm); in ab8500_rtc_set_time()
115 no_mins = secs / 60; in ab8500_rtc_set_time()
117 no_secs = secs % 60; in ab8500_rtc_set_time()
145 unsigned long secs, mins; in ab8500_rtc_read_alarm() local
169 secs = mins * 60; in ab8500_rtc_read_alarm()
[all …]
A Drtc-at91sam9.c106 u32 secs, secs2; in at91_rtc_readtime() local
115 secs = rtt_readl(rtc, VR); in at91_rtc_readtime()
117 if (secs != secs2) in at91_rtc_readtime()
118 secs = rtt_readl(rtc, VR); in at91_rtc_readtime()
134 unsigned long secs; in at91_rtc_settime() local
149 secs += 1; in at91_rtc_settime()
150 gpbr_writel(rtc, secs); in at91_rtc_settime()
155 if (offset > secs) { in at91_rtc_settime()
157 alarm += (offset - secs); in at91_rtc_settime()
203 unsigned long secs; in at91_rtc_setalarm() local
[all …]
A Dtest_rtc_lib.c51 time64_t secs; in rtc_time64_to_tm_test_date_range() local
54 for (secs = 0; secs <= total_secs; secs += 86400) { in rtc_time64_to_tm_test_date_range()
56 rtc_time64_to_tm(secs + sec_offset, &result); in rtc_time64_to_tm_test_date_range()
59 year, month, mday, yday, wday, secs + sec_offset in rtc_time64_to_tm_test_date_range()
A Drtc-sc27xx.c167 time64_t *secs) in sprd_rtc_get_secs() argument
224 time64_t secs) in sprd_rtc_set_secs() argument
231 day = div_s64_rem(secs, 86400, &rem); in sprd_rtc_set_secs()
305 time64_t secs = rtc_tm_to_time64(&alrm->time); in sprd_rtc_set_aux_alarm() local
335 time64_t secs; in sprd_rtc_read_time() local
347 rtc_time64_to_tm(secs, tm); in sprd_rtc_read_time()
354 time64_t secs = rtc_tm_to_time64(tm); in sprd_rtc_set_time() local
357 ret = sprd_rtc_set_secs(rtc, SPRD_RTC_TIME, secs); in sprd_rtc_set_time()
386 time64_t secs; in sprd_rtc_read_alarm() local
398 rtc_time64_to_tm(secs, &alrm->time); in sprd_rtc_read_alarm()
[all …]
A Drtc-sunplus.c65 static void sp_get_seconds(struct device *dev, unsigned long *secs) in sp_get_seconds() argument
69 *secs = (unsigned long)readl(sp_rtc->reg_base + RTC_TIMER_OUT); in sp_get_seconds()
72 static void sp_set_seconds(struct device *dev, unsigned long secs) in sp_set_seconds() argument
76 writel((u32)secs, sp_rtc->reg_base + RTC_TIMER_SET); in sp_set_seconds()
81 unsigned long secs; in sp_rtc_read_time() local
83 sp_get_seconds(dev, &secs); in sp_rtc_read_time()
84 rtc_time64_to_tm(secs, tm); in sp_rtc_read_time()
91 unsigned long secs; in sp_rtc_set_time() local
93 secs = rtc_tm_to_time64(tm); in sp_rtc_set_time()
94 dev_dbg(dev, "%s, secs = %lu\n", __func__, secs); in sp_rtc_set_time()
[all …]
A Dlib.c54 int secs; in rtc_time64_to_tm() local
72 udays = div_s64_rem(time, 86400, &secs); in rtc_time64_to_tm()
147 tm->tm_hour = secs / 3600; in rtc_time64_to_tm()
148 secs -= tm->tm_hour * 3600; in rtc_time64_to_tm()
149 tm->tm_min = secs / 60; in rtc_time64_to_tm()
150 tm->tm_sec = secs - tm->tm_min * 60; in rtc_time64_to_tm()
A Drtc-jz4740.c145 uint32_t secs, secs2; in jz4740_rtc_read_time() local
155 secs = jz4740_rtc_reg_read(rtc, JZ_REG_RTC_SEC); in jz4740_rtc_read_time()
158 while (secs != secs2 && --timeout) { in jz4740_rtc_read_time()
159 secs = secs2; in jz4740_rtc_read_time()
166 rtc_time64_to_tm(secs, time); in jz4740_rtc_read_time()
186 uint32_t secs; in jz4740_rtc_read_alarm() local
189 secs = jz4740_rtc_reg_read(rtc, JZ_REG_RTC_SEC_ALARM); in jz4740_rtc_read_alarm()
196 rtc_time64_to_tm(secs, &alrm->time); in jz4740_rtc_read_alarm()
205 uint32_t secs = lower_32_bits(rtc_tm_to_time64(&alrm->time)); in jz4740_rtc_set_alarm() local
207 ret = jz4740_rtc_reg_write(rtc, JZ_REG_RTC_SEC_ALARM, secs); in jz4740_rtc_set_alarm()
A Drtc-ds1672.c86 unsigned long secs = rtc_tm_to_time64(tm); in ds1672_set_time() local
89 buf[1] = secs & 0x000000FF; in ds1672_set_time()
90 buf[2] = (secs & 0x0000FF00) >> 8; in ds1672_set_time()
91 buf[3] = (secs & 0x00FF0000) >> 16; in ds1672_set_time()
92 buf[4] = (secs & 0xFF000000) >> 24; in ds1672_set_time()
A Dinterface.c25 time64_t secs; in rtc_add_offset() local
30 secs = rtc_tm_to_time64(tm); in rtc_add_offset()
38 if ((rtc->start_secs > rtc->range_min && secs >= rtc->start_secs) || in rtc_add_offset()
40 secs <= (rtc->start_secs + rtc->range_max - rtc->range_min))) in rtc_add_offset()
43 rtc_time64_to_tm(secs + rtc->offset_secs, tm); in rtc_add_offset()
48 time64_t secs; in rtc_subtract_offset() local
53 secs = rtc_tm_to_time64(tm); in rtc_subtract_offset()
61 if (secs >= rtc->range_min && secs <= rtc->range_max) in rtc_subtract_offset()
64 rtc_time64_to_tm(secs - rtc->offset_secs, tm); in rtc_subtract_offset()
A Drtc-brcmstb-waketimer.c75 unsigned int secs) in brcmstb_waketmr_set_alarm() argument
84 writel_relaxed(secs, timer->base + BRCMSTB_WKTMR_ALARM); in brcmstb_waketmr_set_alarm()
87 while ((int)(secs - now) <= 0 && in brcmstb_waketmr_set_alarm()
89 secs = now + 1; in brcmstb_waketmr_set_alarm()
90 writel_relaxed(secs, timer->base + BRCMSTB_WKTMR_ALARM); in brcmstb_waketmr_set_alarm()
A Drtc-ds1347.c53 unsigned int status, century, secs; in ds1347_read_time() local
73 err = regmap_read(map, DS1347_SECONDS_REG, &secs); in ds1347_read_time()
76 } while (buf[0] != secs); in ds1347_read_time()
A Drtc-sun4v.c46 static int hypervisor_set_time(unsigned long secs) in hypervisor_set_time() argument
52 ret = sun4v_tod_set(secs); in hypervisor_set_time()
A Drtc-ab-b5ze-s3.c273 static inline void sec_to_timer_a(u8 secs, u8 *taq, u8 *timer_a) in sec_to_timer_a() argument
276 *timer_a = secs; in sec_to_timer_a()
283 static inline int sec_from_timer_a(u8 *secs, u8 taq, u8 timer_a) in sec_from_timer_a() argument
288 *secs = timer_a; in sec_from_timer_a()
506 u8 secs) in _abb5zes3_rtc_set_timer() argument
514 sec_to_timer_a(secs, &regs[0], &regs[1]); in _abb5zes3_rtc_set_timer()
A Drtc-lpc32xx.c69 u32 secs = rtc_tm_to_time64(time); in lpc32xx_rtc_set_time() local
77 rtc_writel(rtc, LPC32XX_RTC_UCOUNT, secs); in lpc32xx_rtc_set_time()
78 rtc_writel(rtc, LPC32XX_RTC_DCOUNT, 0xFFFFFFFF - secs); in lpc32xx_rtc_set_time()
A Drtc-st-lpc.c105 unsigned long long lpt, secs; in st_rtc_set_time() local
108 secs = rtc_tm_to_time64(tm); in st_rtc_set_time()
110 lpt = (unsigned long long)secs * rtc->clkrate; in st_rtc_set_time()
A Drtc-ep93xx.c66 unsigned long secs = rtc_tm_to_time64(tm); in ep93xx_rtc_set_time() local
68 writel(secs + 1, ep93xx_rtc->mmio_base + EP93XX_RTC_LOAD); in ep93xx_rtc_set_time()
/drivers/net/dsa/microchip/
A Dlan937x_main.c467 u32 secs = msecs; in lan937x_set_ageing_time() local
482 secs /= 1000; in lan937x_set_ageing_time()
483 if (!secs) in lan937x_set_ageing_time()
484 secs = 1; in lan937x_set_ageing_time()
487 else if (secs > 7 * MAX_TIMER_VAL) in lan937x_set_ageing_time()
508 max_val = DIV_ROUND_UP(secs, mult); in lan937x_set_ageing_time()
509 if (max_val > MAX_TIMER_VAL || max_val * mult != secs) in lan937x_set_ageing_time()
513 data = DIV_ROUND_UP(secs, max_val); in lan937x_set_ageing_time()
522 secs = DIV_ROUND_UP(secs, data); in lan937x_set_ageing_time()
524 value = FIELD_GET(SW_AGE_PERIOD_7_0_M, secs); in lan937x_set_ageing_time()
[all …]
A Dksz9477.c1177 u32 secs = msecs / 1000; in ksz9477_set_ageing_time() local
1188 if (!secs) in ksz9477_set_ageing_time()
1189 secs = 1; in ksz9477_set_ageing_time()
1192 else if (secs > 7 * MAX_TIMER_VAL) in ksz9477_set_ageing_time()
1207 max_val = DIV_ROUND_UP(secs, mult); in ksz9477_set_ageing_time()
1208 if (max_val > MAX_TIMER_VAL || max_val * mult != secs) in ksz9477_set_ageing_time()
1212 data = DIV_ROUND_UP(secs, max_val); in ksz9477_set_ageing_time()
1221 value = DIV_ROUND_UP(secs, data); in ksz9477_set_ageing_time()
/drivers/watchdog/
A Dbooke_wdt.c79 static unsigned int sec_to_period(unsigned int secs) in sec_to_period() argument
83 if (period_to_sec(period) >= secs) in sec_to_period()
98 static unsigned int sec_to_period(unsigned int secs) in sec_to_period() argument
100 return secs; in sec_to_period()
A Domap_wdt.h33 #define GET_WLDR_VAL(secs) (0xffffffff - ((secs) * (32768/(1<<PTV))) + 1) argument
A Dda9063_wdt.c39 static unsigned int da9063_wdt_timeout_to_sel(unsigned int secs) in da9063_wdt_timeout_to_sel() argument
44 if (wdt_timeout[i] >= secs) in da9063_wdt_timeout_to_sel()
/drivers/mfd/
A Dgateworks-gsc.c76 static int gsc_powerdown(struct gsc_dev *gsc, unsigned long secs) in gsc_powerdown() argument
82 secs); in gsc_powerdown()
84 put_unaligned_le32(secs, regs); in gsc_powerdown()
/drivers/scsi/
A Dscsicam.c176 unsigned int *secs) in setsize() argument
201 *secs = (unsigned int) sectors; in setsize()

Completed in 62 milliseconds

12