Home
last modified time | relevance | path

Searched refs:rtc (Results 1 – 25 of 1312) sorted by relevance

12345678910>>...53

/linux-6.6.21/drivers/rtc/
Drtc-ds1685.c45 ds1685_read(struct ds1685_priv *rtc, int reg) in ds1685_read() argument
47 return readb((u8 __iomem *)rtc->regs + in ds1685_read()
48 (reg * rtc->regstep)); in ds1685_read()
58 ds1685_write(struct ds1685_priv *rtc, int reg, u8 value) in ds1685_write() argument
60 writeb(value, ((u8 __iomem *)rtc->regs + in ds1685_write()
61 (reg * rtc->regstep))); in ds1685_write()
76 ds1685_indirect_read(struct ds1685_priv *rtc, int reg) in ds1685_indirect_read() argument
78 writeb(reg, rtc->regs); in ds1685_indirect_read()
79 return readb(rtc->data); in ds1685_indirect_read()
89 ds1685_indirect_write(struct ds1685_priv *rtc, int reg, u8 value) in ds1685_indirect_write() argument
[all …]
DMakefile9 obj-$(CONFIG_RTC_CLASS) += rtc-core.o
10 obj-$(CONFIG_RTC_MC146818_LIB) += rtc-mc146818-lib.o
11 rtc-core-y := class.o interface.o
13 rtc-core-$(CONFIG_RTC_NVMEM) += nvmem.o
14 rtc-core-$(CONFIG_RTC_INTF_DEV) += dev.o
15 rtc-core-$(CONFIG_RTC_INTF_PROC) += proc.o
16 rtc-core-$(CONFIG_RTC_INTF_SYSFS) += sysfs.o
22 obj-$(CONFIG_RTC_DRV_88PM80X) += rtc-88pm80x.o
23 obj-$(CONFIG_RTC_DRV_88PM860X) += rtc-88pm860x.o
24 obj-$(CONFIG_RTC_DRV_AB8500) += rtc-ab8500.o
[all …]
Dclass.c28 struct rtc_device *rtc = to_rtc_device(dev); in rtc_device_release() local
29 struct timerqueue_head *head = &rtc->timerqueue; in rtc_device_release()
32 mutex_lock(&rtc->ops_lock); in rtc_device_release()
35 mutex_unlock(&rtc->ops_lock); in rtc_device_release()
37 cancel_work_sync(&rtc->irqwork); in rtc_device_release()
39 ida_free(&rtc_ida, rtc->id); in rtc_device_release()
40 mutex_destroy(&rtc->ops_lock); in rtc_device_release()
41 kfree(rtc); in rtc_device_release()
59 static void rtc_hctosys(struct rtc_device *rtc) in rtc_hctosys() argument
67 err = rtc_read_time(rtc, &tm); in rtc_hctosys()
[all …]
Dinterface.c20 static int rtc_timer_enqueue(struct rtc_device *rtc, struct rtc_timer *timer);
21 static void rtc_timer_remove(struct rtc_device *rtc, struct rtc_timer *timer);
23 static void rtc_add_offset(struct rtc_device *rtc, struct rtc_time *tm) in rtc_add_offset() argument
27 if (!rtc->offset_secs) in rtc_add_offset()
38 if ((rtc->start_secs > rtc->range_min && secs >= rtc->start_secs) || in rtc_add_offset()
39 (rtc->start_secs < rtc->range_min && 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()
46 static void rtc_subtract_offset(struct rtc_device *rtc, struct rtc_time *tm) in rtc_subtract_offset() argument
50 if (!rtc->offset_secs) in rtc_subtract_offset()
[all …]
Drtc-omap.c137 void (*lock)(struct omap_rtc *rtc);
138 void (*unlock)(struct omap_rtc *rtc);
142 struct rtc_device *rtc; member
155 static inline u8 rtc_read(struct omap_rtc *rtc, unsigned int reg) in rtc_read() argument
157 return readb(rtc->base + reg); in rtc_read()
160 static inline u32 rtc_readl(struct omap_rtc *rtc, unsigned int reg) in rtc_readl() argument
162 return readl(rtc->base + reg); in rtc_readl()
165 static inline void rtc_write(struct omap_rtc *rtc, unsigned int reg, u8 val) in rtc_write() argument
167 writeb(val, rtc->base + reg); in rtc_write()
170 static inline void rtc_writel(struct omap_rtc *rtc, unsigned int reg, u32 val) in rtc_writel() argument
[all …]
Ddev.c25 struct rtc_device *rtc = container_of(inode->i_cdev, in rtc_dev_open() local
28 if (test_and_set_bit_lock(RTC_DEV_BUSY, &rtc->flags)) in rtc_dev_open()
31 file->private_data = rtc; in rtc_dev_open()
33 spin_lock_irq(&rtc->irq_lock); in rtc_dev_open()
34 rtc->irq_data = 0; in rtc_dev_open()
35 spin_unlock_irq(&rtc->irq_lock); in rtc_dev_open()
47 struct rtc_device *rtc = in rtc_uie_task() local
53 err = rtc_read_time(rtc, &tm); in rtc_uie_task()
55 spin_lock_irq(&rtc->irq_lock); in rtc_uie_task()
56 if (rtc->stop_uie_polling || err) { in rtc_uie_task()
[all …]
Drtc-lpc32xx.c51 struct rtc_device *rtc; member
58 struct lpc32xx_rtc *rtc = dev_get_drvdata(dev); in lpc32xx_rtc_read_time() local
60 elapsed_sec = rtc_readl(rtc, LPC32XX_RTC_UCOUNT); in lpc32xx_rtc_read_time()
68 struct lpc32xx_rtc *rtc = dev_get_drvdata(dev); in lpc32xx_rtc_set_time() local
72 spin_lock_irq(&rtc->lock); in lpc32xx_rtc_set_time()
75 tmp = rtc_readl(rtc, LPC32XX_RTC_CTRL); in lpc32xx_rtc_set_time()
76 rtc_writel(rtc, LPC32XX_RTC_CTRL, tmp | LPC32XX_RTC_CTRL_CNTR_DIS); in lpc32xx_rtc_set_time()
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()
79 rtc_writel(rtc, LPC32XX_RTC_CTRL, tmp &= ~LPC32XX_RTC_CTRL_CNTR_DIS); in lpc32xx_rtc_set_time()
[all …]
Drtc-at91sam9.c81 #define rtt_readl(rtc, field) \ argument
82 readl((rtc)->rtt + AT91_RTT_ ## field)
83 #define rtt_writel(rtc, field, val) \ argument
84 writel((val), (rtc)->rtt + AT91_RTT_ ## field)
86 static inline unsigned int gpbr_readl(struct sam9_rtc *rtc) in gpbr_readl() argument
90 regmap_read(rtc->gpbr, rtc->gpbr_offset, &val); in gpbr_readl()
95 static inline void gpbr_writel(struct sam9_rtc *rtc, unsigned int val) in gpbr_writel() argument
97 regmap_write(rtc->gpbr, rtc->gpbr_offset, val); in gpbr_writel()
105 struct sam9_rtc *rtc = dev_get_drvdata(dev); in at91_rtc_readtime() local
110 offset = gpbr_readl(rtc); in at91_rtc_readtime()
[all …]
Drtc-armada38x.c86 void (*update_mbus_timing)(struct armada38x_rtc *rtc);
87 u32 (*read_rtc_reg)(struct armada38x_rtc *rtc, u8 rtc_reg);
88 void (*clear_isr)(struct armada38x_rtc *rtc);
89 void (*unmask_interrupt)(struct armada38x_rtc *rtc);
103 static void rtc_delayed_write(u32 val, struct armada38x_rtc *rtc, int offset) in rtc_delayed_write() argument
105 writel(0, rtc->regs + RTC_STATUS); in rtc_delayed_write()
106 writel(0, rtc->regs + RTC_STATUS); in rtc_delayed_write()
107 writel(val, rtc->regs + offset); in rtc_delayed_write()
112 static void rtc_update_38x_mbus_timing_params(struct armada38x_rtc *rtc) in rtc_update_38x_mbus_timing_params() argument
116 reg = readl(rtc->regs_soc + RTC_38X_BRIDGE_TIMING_CTL); in rtc_update_38x_mbus_timing_params()
[all …]
Drtc-sh.c110 static int __sh_rtc_interrupt(struct sh_rtc *rtc) in __sh_rtc_interrupt() argument
114 tmp = readb(rtc->regbase + RCR1); in __sh_rtc_interrupt()
117 writeb(tmp, rtc->regbase + RCR1); in __sh_rtc_interrupt()
120 if (pending && rtc->periodic_freq & PF_OXS) in __sh_rtc_interrupt()
121 rtc_update_irq(rtc->rtc_dev, 1, RTC_UF | RTC_IRQF); in __sh_rtc_interrupt()
126 static int __sh_rtc_alarm(struct sh_rtc *rtc) in __sh_rtc_alarm() argument
130 tmp = readb(rtc->regbase + RCR1); in __sh_rtc_alarm()
133 writeb(tmp, rtc->regbase + RCR1); in __sh_rtc_alarm()
136 rtc_update_irq(rtc->rtc_dev, 1, RTC_AF | RTC_IRQF); in __sh_rtc_alarm()
141 static int __sh_rtc_periodic(struct sh_rtc *rtc) in __sh_rtc_periodic() argument
[all …]
Drtc-st-lpc.c52 static void st_rtc_set_hw_alarm(struct st_rtc *rtc, in st_rtc_set_hw_alarm() argument
57 spin_lock_irqsave(&rtc->lock, flags); in st_rtc_set_hw_alarm()
59 writel_relaxed(1, rtc->ioaddr + LPC_WDT_OFF); in st_rtc_set_hw_alarm()
61 writel_relaxed(msb, rtc->ioaddr + LPC_LPA_MSB_OFF); in st_rtc_set_hw_alarm()
62 writel_relaxed(lsb, rtc->ioaddr + LPC_LPA_LSB_OFF); in st_rtc_set_hw_alarm()
63 writel_relaxed(1, rtc->ioaddr + LPC_LPA_START_OFF); in st_rtc_set_hw_alarm()
65 writel_relaxed(0, rtc->ioaddr + LPC_WDT_OFF); in st_rtc_set_hw_alarm()
67 spin_unlock_irqrestore(&rtc->lock, flags); in st_rtc_set_hw_alarm()
72 struct st_rtc *rtc = (struct st_rtc *)data; in st_rtc_handler() local
74 rtc_update_irq(rtc->rtc_dev, 1, RTC_AF); in st_rtc_handler()
[all …]
Drtc-meson.c62 struct rtc_device *rtc; /* rtc device we created */ member
81 static void meson_rtc_sclk_pulse(struct meson_rtc *rtc) in meson_rtc_sclk_pulse() argument
84 regmap_update_bits(rtc->peripheral, RTC_ADDR0, RTC_ADDR0_LINE_SCLK, 0); in meson_rtc_sclk_pulse()
86 regmap_update_bits(rtc->peripheral, RTC_ADDR0, RTC_ADDR0_LINE_SCLK, in meson_rtc_sclk_pulse()
90 static void meson_rtc_send_bit(struct meson_rtc *rtc, unsigned int bit) in meson_rtc_send_bit() argument
92 regmap_update_bits(rtc->peripheral, RTC_ADDR0, RTC_ADDR0_LINE_SDI, in meson_rtc_send_bit()
94 meson_rtc_sclk_pulse(rtc); in meson_rtc_send_bit()
97 static void meson_rtc_send_bits(struct meson_rtc *rtc, u32 data, in meson_rtc_send_bits() argument
103 meson_rtc_send_bit(rtc, data & bit); in meson_rtc_send_bits()
108 static void meson_rtc_set_dir(struct meson_rtc *rtc, u32 mode) in meson_rtc_set_dir() argument
[all …]
Drtc-sc27xx.c104 struct rtc_device *rtc; member
126 static int sprd_rtc_clear_alarm_ints(struct sprd_rtc *rtc) in sprd_rtc_clear_alarm_ints() argument
128 return regmap_write(rtc->regmap, rtc->base + SPRD_RTC_INT_CLR, in sprd_rtc_clear_alarm_ints()
132 static int sprd_rtc_lock_alarm(struct sprd_rtc *rtc, bool lock) in sprd_rtc_lock_alarm() argument
137 ret = regmap_read(rtc->regmap, rtc->base + SPRD_RTC_SPG_VALUE, &val); in sprd_rtc_lock_alarm()
147 ret = regmap_write(rtc->regmap, rtc->base + SPRD_RTC_SPG_UPD, val); in sprd_rtc_lock_alarm()
152 ret = regmap_read_poll_timeout(rtc->regmap, in sprd_rtc_lock_alarm()
153 rtc->base + SPRD_RTC_INT_RAW_STS, val, in sprd_rtc_lock_alarm()
158 dev_err(rtc->dev, "failed to update SPG value:%d\n", ret); in sprd_rtc_lock_alarm()
162 return regmap_write(rtc->regmap, rtc->base + SPRD_RTC_INT_CLR, in sprd_rtc_lock_alarm()
[all …]
Drtc-lpc24xx.c63 struct rtc_device *rtc; member
70 struct lpc24xx_rtc *rtc = dev_get_drvdata(dev); in lpc24xx_rtc_set_time() local
73 rtc_writel(rtc, LPC24XX_CCR, LPC178X_CCALEN); in lpc24xx_rtc_set_time()
75 rtc_writel(rtc, LPC24XX_SEC, tm->tm_sec); in lpc24xx_rtc_set_time()
76 rtc_writel(rtc, LPC24XX_MIN, tm->tm_min); in lpc24xx_rtc_set_time()
77 rtc_writel(rtc, LPC24XX_HOUR, tm->tm_hour); in lpc24xx_rtc_set_time()
78 rtc_writel(rtc, LPC24XX_DOW, tm->tm_wday); in lpc24xx_rtc_set_time()
79 rtc_writel(rtc, LPC24XX_DOM, tm->tm_mday); in lpc24xx_rtc_set_time()
80 rtc_writel(rtc, LPC24XX_DOY, tm->tm_yday); in lpc24xx_rtc_set_time()
81 rtc_writel(rtc, LPC24XX_MONTH, tm->tm_mon); in lpc24xx_rtc_set_time()
[all …]
Drtc-cpcap.c51 static void cpcap2rtc_time(struct rtc_time *rtc, struct cpcap_time *cpcap) in cpcap2rtc_time() argument
59 rtc_time64_to_tm(time, rtc); in cpcap2rtc_time()
62 static void rtc2cpcap_time(struct cpcap_time *cpcap, struct rtc_time *rtc) in rtc2cpcap_time() argument
66 time = rtc_tm_to_time64(rtc); in rtc2cpcap_time()
76 struct cpcap_rtc *rtc = dev_get_drvdata(dev); in cpcap_rtc_alarm_irq_enable() local
78 if (rtc->alarm_enabled == enabled) in cpcap_rtc_alarm_irq_enable()
82 enable_irq(rtc->alarm_irq); in cpcap_rtc_alarm_irq_enable()
84 disable_irq(rtc->alarm_irq); in cpcap_rtc_alarm_irq_enable()
86 rtc->alarm_enabled = !!enabled; in cpcap_rtc_alarm_irq_enable()
93 struct cpcap_rtc *rtc; in cpcap_rtc_read_time() local
[all …]
Drtc-stm32.c119 void (*clear_events)(struct stm32_rtc *rtc, unsigned int flags);
137 static void stm32_rtc_wpr_unlock(struct stm32_rtc *rtc) in stm32_rtc_wpr_unlock() argument
139 const struct stm32_rtc_registers *regs = &rtc->data->regs; in stm32_rtc_wpr_unlock()
141 writel_relaxed(RTC_WPR_1ST_KEY, rtc->base + regs->wpr); in stm32_rtc_wpr_unlock()
142 writel_relaxed(RTC_WPR_2ND_KEY, rtc->base + regs->wpr); in stm32_rtc_wpr_unlock()
145 static void stm32_rtc_wpr_lock(struct stm32_rtc *rtc) in stm32_rtc_wpr_lock() argument
147 const struct stm32_rtc_registers *regs = &rtc->data->regs; in stm32_rtc_wpr_lock()
149 writel_relaxed(RTC_WPR_WRONG_KEY, rtc->base + regs->wpr); in stm32_rtc_wpr_lock()
152 static int stm32_rtc_enter_init_mode(struct stm32_rtc *rtc) in stm32_rtc_enter_init_mode() argument
154 const struct stm32_rtc_registers *regs = &rtc->data->regs; in stm32_rtc_enter_init_mode()
[all …]
Drtc-da9052.c19 #define rtc_err(rtc, fmt, ...) \ argument
20 dev_err(rtc->da9052->dev, "%s: " fmt, __func__, ##__VA_ARGS__)
25 struct rtc_device *rtc; member
29 static int da9052_rtc_enable_alarm(struct da9052_rtc *rtc, bool enable) in da9052_rtc_enable_alarm() argument
33 ret = da9052_reg_update(rtc->da9052, DA9052_ALARM_Y_REG, in da9052_rtc_enable_alarm()
37 rtc_err(rtc, "Failed to enable ALM: %d\n", ret); in da9052_rtc_enable_alarm()
39 ret = da9052_reg_update(rtc->da9052, DA9052_ALARM_Y_REG, in da9052_rtc_enable_alarm()
42 rtc_err(rtc, "Write error: %d\n", ret); in da9052_rtc_enable_alarm()
49 struct da9052_rtc *rtc = data; in da9052_rtc_irq() local
51 rtc_update_irq(rtc->rtc, 1, RTC_IRQF | RTC_AF); in da9052_rtc_irq()
[all …]
Drtc-jz4740.c64 struct rtc_device *rtc; member
73 static inline uint32_t jz4740_rtc_reg_read(struct jz4740_rtc *rtc, size_t reg) in jz4740_rtc_reg_read() argument
75 return readl(rtc->base + reg); in jz4740_rtc_reg_read()
78 static int jz4740_rtc_wait_write_ready(struct jz4740_rtc *rtc) in jz4740_rtc_wait_write_ready() argument
82 return readl_poll_timeout(rtc->base + JZ_REG_RTC_CTRL, ctrl, in jz4740_rtc_wait_write_ready()
86 static inline int jz4780_rtc_enable_write(struct jz4740_rtc *rtc) in jz4780_rtc_enable_write() argument
91 ret = jz4740_rtc_wait_write_ready(rtc); in jz4780_rtc_enable_write()
95 writel(JZ_RTC_WENR_MAGIC, rtc->base + JZ_REG_RTC_WENR); in jz4780_rtc_enable_write()
97 return readl_poll_timeout(rtc->base + JZ_REG_RTC_WENR, ctrl, in jz4780_rtc_enable_write()
101 static inline int jz4740_rtc_reg_write(struct jz4740_rtc *rtc, size_t reg, in jz4740_rtc_reg_write() argument
[all …]
Drtc-mt6397.c19 static int mtk_rtc_write_trigger(struct mt6397_rtc *rtc) in mtk_rtc_write_trigger() argument
24 ret = regmap_write(rtc->regmap, rtc->addr_base + rtc->data->wrtgr, 1); in mtk_rtc_write_trigger()
28 ret = regmap_read_poll_timeout(rtc->regmap, in mtk_rtc_write_trigger()
29 rtc->addr_base + RTC_BBPU, data, in mtk_rtc_write_trigger()
34 dev_err(rtc->rtc_dev->dev.parent, in mtk_rtc_write_trigger()
42 struct mt6397_rtc *rtc = data; in mtk_rtc_irq_handler_thread() local
46 ret = regmap_read(rtc->regmap, rtc->addr_base + RTC_IRQ_STA, &irqsta); in mtk_rtc_irq_handler_thread()
48 rtc_update_irq(rtc->rtc_dev, 1, RTC_IRQF | RTC_AF); in mtk_rtc_irq_handler_thread()
50 mutex_lock(&rtc->lock); in mtk_rtc_irq_handler_thread()
51 if (regmap_write(rtc->regmap, rtc->addr_base + RTC_IRQ_EN, in mtk_rtc_irq_handler_thread()
[all …]
Drtc-fsl-ftm-alarm.c61 static inline void ftm_counter_enable(struct ftm_rtc *rtc) in ftm_counter_enable() argument
66 val = rtc_readl(rtc, FTM_SC); in ftm_counter_enable()
69 rtc_writel(rtc, FTM_SC, val); in ftm_counter_enable()
72 static inline void ftm_counter_disable(struct ftm_rtc *rtc) in ftm_counter_disable() argument
77 val = rtc_readl(rtc, FTM_SC); in ftm_counter_disable()
79 rtc_writel(rtc, FTM_SC, val); in ftm_counter_disable()
82 static inline void ftm_irq_acknowledge(struct ftm_rtc *rtc) in ftm_irq_acknowledge() argument
107 while ((FTM_SC_TOF & rtc_readl(rtc, FTM_SC)) && timeout--) in ftm_irq_acknowledge()
108 rtc_writel(rtc, FTM_SC, rtc_readl(rtc, FTM_SC) & (~FTM_SC_TOF)); in ftm_irq_acknowledge()
111 static inline void ftm_irq_enable(struct ftm_rtc *rtc) in ftm_irq_enable() argument
[all …]
Drtc-pcf50633.c62 static void pcf2rtc_time(struct rtc_time *rtc, struct pcf50633_time *pcf) in pcf2rtc_time() argument
64 rtc->tm_sec = bcd2bin(pcf->time[PCF50633_TI_SEC]); in pcf2rtc_time()
65 rtc->tm_min = bcd2bin(pcf->time[PCF50633_TI_MIN]); in pcf2rtc_time()
66 rtc->tm_hour = bcd2bin(pcf->time[PCF50633_TI_HOUR]); in pcf2rtc_time()
67 rtc->tm_wday = bcd2bin(pcf->time[PCF50633_TI_WKDAY]); in pcf2rtc_time()
68 rtc->tm_mday = bcd2bin(pcf->time[PCF50633_TI_DAY]); in pcf2rtc_time()
69 rtc->tm_mon = bcd2bin(pcf->time[PCF50633_TI_MONTH]) - 1; in pcf2rtc_time()
70 rtc->tm_year = bcd2bin(pcf->time[PCF50633_TI_YEAR]) + 100; in pcf2rtc_time()
73 static void rtc2pcf_time(struct pcf50633_time *pcf, struct rtc_time *rtc) in rtc2pcf_time() argument
75 pcf->time[PCF50633_TI_SEC] = bin2bcd(rtc->tm_sec); in rtc2pcf_time()
[all …]
Drtc-ftrtc010.c66 struct ftrtc010_rtc *rtc = dev_get_drvdata(dev); in ftrtc010_rtc_read_time() local
71 sec = readl(rtc->rtc_base + FTRTC010_RTC_SECOND); in ftrtc010_rtc_read_time()
72 min = readl(rtc->rtc_base + FTRTC010_RTC_MINUTE); in ftrtc010_rtc_read_time()
73 hour = readl(rtc->rtc_base + FTRTC010_RTC_HOUR); in ftrtc010_rtc_read_time()
74 days = readl(rtc->rtc_base + FTRTC010_RTC_DAYS); in ftrtc010_rtc_read_time()
75 offset = readl(rtc->rtc_base + FTRTC010_RTC_RECORD); in ftrtc010_rtc_read_time()
86 struct ftrtc010_rtc *rtc = dev_get_drvdata(dev); in ftrtc010_rtc_set_time() local
92 sec = readl(rtc->rtc_base + FTRTC010_RTC_SECOND); in ftrtc010_rtc_set_time()
93 min = readl(rtc->rtc_base + FTRTC010_RTC_MINUTE); in ftrtc010_rtc_set_time()
94 hour = readl(rtc->rtc_base + FTRTC010_RTC_HOUR); in ftrtc010_rtc_set_time()
[all …]
Drtc-pl030.c24 struct rtc_device *rtc; member
30 struct pl030_rtc *rtc = dev_id; in pl030_interrupt() local
31 writel(0, rtc->base + RTC_EOI); in pl030_interrupt()
37 struct pl030_rtc *rtc = dev_get_drvdata(dev); in pl030_read_alarm() local
39 rtc_time64_to_tm(readl(rtc->base + RTC_MR), &alrm->time); in pl030_read_alarm()
45 struct pl030_rtc *rtc = dev_get_drvdata(dev); in pl030_set_alarm() local
47 writel(rtc_tm_to_time64(&alrm->time), rtc->base + RTC_MR); in pl030_set_alarm()
54 struct pl030_rtc *rtc = dev_get_drvdata(dev); in pl030_read_time() local
56 rtc_time64_to_tm(readl(rtc->base + RTC_DR), tm); in pl030_read_time()
71 struct pl030_rtc *rtc = dev_get_drvdata(dev); in pl030_set_time() local
[all …]
Drtc-mpc5121.c78 struct rtc_device *rtc; member
103 struct mpc5121_rtc_data *rtc = dev_get_drvdata(dev); in mpc5121_rtc_read_time() local
104 struct mpc5121_rtc_regs __iomem *regs = rtc->regs; in mpc5121_rtc_read_time()
125 struct mpc5121_rtc_data *rtc = dev_get_drvdata(dev); in mpc5121_rtc_set_time() local
126 struct mpc5121_rtc_regs __iomem *regs = rtc->regs; in mpc5121_rtc_set_time()
147 struct mpc5121_rtc_data *rtc = dev_get_drvdata(dev); in mpc5200_rtc_read_time() local
148 struct mpc5121_rtc_regs __iomem *regs = rtc->regs; in mpc5200_rtc_read_time()
174 struct mpc5121_rtc_data *rtc = dev_get_drvdata(dev); in mpc5200_rtc_set_time() local
175 struct mpc5121_rtc_regs __iomem *regs = rtc->regs; in mpc5200_rtc_set_time()
196 struct mpc5121_rtc_data *rtc = dev_get_drvdata(dev); in mpc5121_rtc_read_alarm() local
[all …]
/linux-6.6.21/arch/m68k/bvme6000/
Dconfig.c168 volatile RtcPtr_t rtc = (RtcPtr_t)BVME_RTC_BASE; in bvme6000_timer_int() local
172 msr = rtc->msr & 0xc0; in bvme6000_timer_int()
173 rtc->msr = msr | 0x20; /* Ack the interrupt */ in bvme6000_timer_int()
193 volatile RtcPtr_t rtc = (RtcPtr_t)BVME_RTC_BASE; in bvme6000_sched_init() local
194 unsigned char msr = rtc->msr & 0xc0; in bvme6000_sched_init()
196 rtc->msr = 0; /* Ensure timer registers accessible */ in bvme6000_sched_init()
202 rtc->t1cr_omr = 0x04; /* Mode 2, ext clk */ in bvme6000_sched_init()
203 rtc->t1msb = RTC_TIMER_COUNT >> 8; in bvme6000_sched_init()
204 rtc->t1lsb = RTC_TIMER_COUNT & 0xff; in bvme6000_sched_init()
205 rtc->irr_icr1 &= 0xef; /* Route timer 1 to INTR pin */ in bvme6000_sched_init()
[all …]

12345678910>>...53