On Wed, Dec 27, 2017 at 05:09:38AM +0200, Artturi Alm wrote:
> 
> On Wed, Dec 27, 2017 at 09:37:12AM +0800, Kevin Lo wrote:
> > On Tue, Dec 26, 2017 at 06:20:59PM +0100, Mark Kettenis wrote:
> > > 
> > > > Date: Tue, 26 Dec 2017 22:51:38 +0800
> > > > From: Kevin Lo <ke...@openbsd.org>
> > > > 
> > > > > Shouldn't be too difficult to add support for that one to axppmic(4).
> > > > > Do you want me to create a diff for you to test?
> > > > 
> > > > That'd be great, thanks.  Testing is easier than writing code :)
> > > 
> > > Here's a diff.  Should give you a couple of sensors and working
> > > regulators.  That might make the on-board eMMC work.
> > > 
> > 
> > Thanks, but I keep getting these messages:
> > 
> > axppmic0 at sxirsb0 addr 0x3a3: AXP223
> > sxirsb0: RD8 failed for run-time address 0x2d
> > sxirsb0: RD8 failed for run-time address 0x2d
> > sxirsb0: WR8 failed for run-time address 0x2d
> > sxirsb0: RD8 failed for run-time address 0x2d
> > sxirsb0: RD8 failed for run-time address 0x2d
> > ...
> > 
> 
> Hi,
> 
> did you try adding anything like in the diff below?
> the output might help kettenis@ to help you:)

Fair enough, shows up in dmesg as http://ix.io/DsJ

> -Artturi
> 
> 
> diff --git a/sys/dev/fdt/sxirsb.c b/sys/dev/fdt/sxirsb.c
> index 6136e2a4359..8ab54923a4a 100644
> --- a/sys/dev/fdt/sxirsb.c
> +++ b/sys/dev/fdt/sxirsb.c
> @@ -267,8 +267,8 @@ rsb_read_1(void *cookie, uint8_t rta, uint8_t addr)
>       HWRITE4(sc, RSB_AR, addr);
>  
>       if (sxirsb_do_trans(sc)) {
> -             printf("%s: RD8 failed for run-time address 0x%02x\n",
> -                 sc->sc_dev.dv_xname, rta);
> +             printf("%s: RD8 failed for run-time address 0x%02x "
> +                 "addr 0x%02x\n", sc->sc_dev.dv_xname, rta, addr);
>               return 0xff;
>       }
>  
> @@ -285,8 +285,8 @@ rsb_read_2(void *cookie, uint8_t rta, uint8_t addr)
>       HWRITE4(sc, RSB_AR, addr);
>  
>       if (sxirsb_do_trans(sc)) {
> -             printf("%s: RD16 failed for run-time address 0x%02x\n",
> -                 sc->sc_dev.dv_xname, rta);
> +             printf("%s: RD16 failed for run-time address 0x%02x "
> +                 "addr 0x%02x\n", sc->sc_dev.dv_xname, rta, addr);
>               return 0xff;
>       }
>  
> @@ -304,8 +304,8 @@ rsb_write_1(void *cookie, uint8_t rta, uint8_t addr, 
> uint8_t data)
>       HWRITE4(sc, RSB_DATA, data);
>  
>       if (sxirsb_do_trans(sc)) {
> -             printf("%s: WR8 failed for run-time address 0x%02x\n",
> -                 sc->sc_dev.dv_xname, rta);
> +             printf("%s: WR8 failed for run-time address 0x%02x "
> +                 "addr 0x%02x\n", sc->sc_dev.dv_xname, rta, addr);
>               return;
>       }
>  }
> @@ -321,8 +321,8 @@ rsb_write_2(void *cookie, uint8_t rta, uint8_t addr, 
> uint16_t data)
>       HWRITE4(sc, RSB_DATA, data);
>  
>       if (sxirsb_do_trans(sc)) {
> -             printf("%s: WR16 failed for run-time address 0x%02x\n",
> -                 sc->sc_dev.dv_xname, rta);
> +             printf("%s: WR16 failed for run-time address 0x%02x "
> +                 "addr 0x%02x\n", sc->sc_dev.dv_xname, rta, addr);
>               return;
>       }
>  }
> 
> 

Reply via email to