> Date: Sat, 25 Apr 2020 20:20:37 +0200 (CEST)
> From: Mark Kettenis <[email protected]>
> 
> The cvs log tells me this driver was written to privide an alternative
> clock for the Sun Fire V210.  That is probably why it prints a message
> about overwriting the rtc handler.  But the driver was never enabled
> on sparc64 (or anywhere else for that matter) and overwriting the rtc
> is normal behaviour on arm64.  So this diff removes that message.
> 
> The official device tree binding name for this device is
> "dallas,ds1307" so check for that in the match function.
> 
> ok?

ping?

> Index: dev/i2c/ds1307.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/i2c/ds1307.c,v
> retrieving revision 1.1
> diff -u -p -r1.1 ds1307.c
> --- dev/i2c/ds1307.c  20 Jun 2016 13:42:42 -0000      1.1
> +++ dev/i2c/ds1307.c  25 Apr 2020 18:05:37 -0000
> @@ -96,7 +96,8 @@ maxrtc_match(struct device *parent, void
>  {
>       struct i2c_attach_args *ia = arg;
>  
> -     if (strcmp(ia->ia_name, "ds1307") == 0)
> +     if (strcmp(ia->ia_name, "dallas,ds1307") == 0 ||
> +         strcmp(ia->ia_name, "ds1307") == 0)
>               return (1);
>  
>       return (0);
> @@ -123,12 +124,6 @@ maxrtc_attach(struct device *parent, str
>       if (maxrtc_set_24h_mode(sc) == -1)
>               return;
>  
> -     /* register our time handlers */
> -     if (todr_handle != NULL) {
> -             printf("%s: overwriting existing rtc handler\n",
> -                 sc->sc_dev.dv_xname);
> -     }
> -     /* XXX just overwrite existing rtc handler? */
>       todr_handle = &sc->sc_todr;
>  }
>  
> 
> 

  • maxrtc(4) Mark Kettenis
    • Re: maxrtc(4) Mark Kettenis

Reply via email to