]> www.infradead.org Git - nvme.git/commitdiff
Merge tag 'rtc-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 30 Nov 2024 19:18:16 +0000 (11:18 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 30 Nov 2024 19:18:16 +0000 (11:18 -0800)
Pull RTC updates from Alexandre Belloni:
 "New drivers:
   - Amlogic A4 and A5 RTC
   - Marvell 88PM886 PMIC RTC
   - Renesas RTCA-3 for Renesas RZ/G3S

  Driver updates:
   - ab-eoz9: fix temperature and alarm support
   - cmos: improve locking behaviour
   - isl12022: add alarm support
   - m48t59: improve epoch handling
   - mt6359: add range
   - rzn1: fix BCD conversions and simplify driver"

* tag 'rtc-6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (38 commits)
  rtc: ab-eoz9: don't fail temperature reads on undervoltage notification
  rtc: rzn1: reduce register access
  rtc: rzn1: drop superfluous wday calculation
  m68k: mvme147, mvme16x: Adopt rtc-m48t59 platform driver
  rtc: brcmstb-waketimer: don't include 'pm_wakeup.h' directly
  rtc: m48t59: Use platform_data struct for year offset value
  rtc: ab-eoz9: fix abeoz9_rtc_read_alarm
  rtc: rv3028: fix RV3028_TS_COUNT type
  rtc: rzn1: update Michel's email
  rtc: rzn1: fix BCD to rtc_time conversion errors
  rtc: amlogic-a4: fix compile error
  rtc: amlogic-a4: drop error messages
  MAINTAINERS: Add an entry for Amlogic RTC driver
  rtc: support for the Amlogic on-chip RTC
  dt-bindings: rtc: Add Amlogic A4 and A5 RTC
  rtc: add driver for Marvell 88PM886 PMIC RTC
  rtc: check if __rtc_read_time was successful in rtc_timer_do_work()
  rtc: pcf8563: Switch to regmap
  rtc: pcf8563: Sort headers alphabetically
  rtc: abx80x: Fix WDT bit position of the status register
  ...

1  2 
MAINTAINERS
arch/m68k/configs/multi_defconfig
arch/m68k/configs/mvme147_defconfig
arch/m68k/configs/mvme16x_defconfig
arch/m68k/include/asm/mvme147hw.h
arch/m68k/mvme147/config.c
drivers/rtc/rtc-pm8xxx.c

diff --cc MAINTAINERS
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 824c42a302c6fd018a8b20a01c1dd11147fa90b3,2e8f41636efb15b6ee2787514ba144c3b3b3bf86..3054d3857efa2b652375863071e15530810b62c0
  #include <asm/mvme147hw.h>
  #include <asm/config.h>
  
 +#include "mvme147.h"
  
  static void mvme147_get_model(char *model);
 -extern void mvme147_sched_init(void);
 +static void __init mvme147_sched_init(void);
- extern int mvme147_hwclk (int, struct rtc_time *);
  extern void mvme147_reset (void);
  
  
@@@ -162,56 -179,3 +180,31 @@@ static u64 mvme147_read_clk(struct cloc
        return ticks;
  }
  
- static int bcd2int (unsigned char b)
- {
-       return ((b>>4)*10 + (b&15));
- }
- int mvme147_hwclk(int op, struct rtc_time *t)
- {
-       if (!op) {
-               m147_rtc->ctrl = RTC_READ;
-               t->tm_year = bcd2int (m147_rtc->bcd_year);
-               t->tm_mon  = bcd2int(m147_rtc->bcd_mth) - 1;
-               t->tm_mday = bcd2int (m147_rtc->bcd_dom);
-               t->tm_hour = bcd2int (m147_rtc->bcd_hr);
-               t->tm_min  = bcd2int (m147_rtc->bcd_min);
-               t->tm_sec  = bcd2int (m147_rtc->bcd_sec);
-               m147_rtc->ctrl = 0;
-               if (t->tm_year < 70)
-                       t->tm_year += 100;
-       } else {
-               /* FIXME Setting the time is not yet supported */
-               return -EOPNOTSUPP;
-       }
-       return 0;
- }
 +static void scc_delay(void)
 +{
 +      __asm__ __volatile__ ("nop; nop;");
 +}
 +
 +static void scc_write(char ch)
 +{
 +      do {
 +              scc_delay();
 +      } while (!(in_8(M147_SCC_A_ADDR) & BIT(2)));
 +      scc_delay();
 +      out_8(M147_SCC_A_ADDR, 8);
 +      scc_delay();
 +      out_8(M147_SCC_A_ADDR, ch);
 +}
 +
 +void mvme147_scc_write(struct console *co, const char *str, unsigned int count)
 +{
 +      unsigned long flags;
 +
 +      local_irq_save(flags);
 +      while (count--) {
 +              if (*str == '\n')
 +                      scc_write('\r');
 +              scc_write(*str++);
 +      }
 +      local_irq_restore(flags);
 +}
Simple merge