Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Aug 2020 17:26:42 -0700
From:      John-Mark Gurney <jmg@funkthat.com>
To:        Andriy Gapon <avg@FreeBSD.org>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: Kmod driver at iicbus. attach() and config_intrhook(9)
Message-ID:  <20200901002642.GV4213@funkthat.com>
In-Reply-To: <2cd30277-0628-9a4c-56c0-4ab7d4debaf8@FreeBSD.org>
References:  <d603cf3b852d5e18fa5faa9066f643a3@mh.net.ru> <20200820223918.GC4213@funkthat.com> <d709ba1d3473f5d4353dc1109c198f8acb8ffa28.camel@freebsd.org> <496ed13afb2327d6416664b4dacfc346@mh.net.ru> <20200824204708.GH4213@funkthat.com> <6be8abd0-185c-dbbb-5964-1e2ad92ad213@FreeBSD.org> <20200825203313.GJ4213@funkthat.com> <41220fa2-0af3-22c2-0057-c7578f14d52b@FreeBSD.org> <20200826213343.GR4213@funkthat.com> <2cd30277-0628-9a4c-56c0-4ab7d4debaf8@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Andriy Gapon wrote this message on Thu, Aug 27, 2020 at 08:35 +0300:
> On 27/08/2020 00:33, John-Mark Gurney wrote:
> > Andriy Gapon wrote this message on Wed, Aug 26, 2020 at 23:55 +0300:
> >> On 25/08/2020 23:33, John-Mark Gurney wrote:
> >>> Andriy Gapon wrote this message on Tue, Aug 25, 2020 at 10:21 +0300:
> >>>> On 24/08/2020 23:47, John-Mark Gurney wrote:
> >>>>> What driver is used for i2c on the Orange?  I've tried to firgure it
> >>>>> out from dts + source, but it isn't clear.
> >>>>
> >>>> a10_twsi
> >>>
> >>> Thanks.  And this explains why I couldn't find it in arm/allwinner.. :)
> >>>
> >>> Yeah, this is using bus_generic_attach...
> >>>
> >>> But it looks like it supports interruptless operation.  Is there a flag
> >>> for when interrupts are enabled?
> >>>
> >>> Because the check in sys/dev/iicbus/twsi/twsi.c:twsi_transfer could be
> >>> changed from:
> >>>         if (sc->have_intr == false)
> >>>
> >>> to:
> >>>         if (sc->have_intr == false || interrupts_not_enabled)
> >>>
> >>> And that could fix things.
> >>>
> >>
> >> sc->have_intr is already enabled from the interrupt enable hook.
> > 
> > But that only detects if the interrupt are used, NOT that they are
> > currently active and working which the "|| cold" would provide...
> 
> The interrupt hook is called after interrupts are enabled and usable.
> Specifically, I mean config_intrhook_oneshot().

Ok, then the OP shouldn't be having a problem then, maybe you can help
then figure it out then?

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200901002642.GV4213>