Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Mar 2014 00:55:38 -0800
From:      Adrian Chadd <adrian@freebsd.org>
To:        Milan Obuch <freebsd-mips@dino.sk>
Cc:        "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org>
Subject:   Re: I (think) the AR8327 switch support now works
Message-ID:  <CAJ-Vmo=B0CG1FSCKYeaCmORJuWbJ24g=%2BQkHV7WC8DTV9m1zKA@mail.gmail.com>
In-Reply-To: <20140307204230.3c86b9b1@zeta.dino.sk>
References:  <CAJ-Vmok0cVLnH9DQh%2Bz6XF-NQmPKy_Ez37kLtuCSRThwjQHTJQ@mail.gmail.com> <20140301143607.13a96bd6@zeta.dino.sk> <CAJ-Vmom2coTLFn0zcTa=BzxAOopMjCDUBOtQwOVOyQmCeB19wA@mail.gmail.com> <20140301200546.7ff373d1@zeta.dino.sk> <20140301231239.023b8733@zeta.dino.sk> <CAJ-VmoknT-SWVmcDX-Cx8StUVuZNX%2BqNPzLcMBdLxN7qwssNoA@mail.gmail.com> <20140307140432.0a460da1@zeta.dino.sk> <CAJ-Vmok-nF4QdVmUMGJxt4tX=X%2Bvc4_-G100ZPRnQ-2aWyNCog@mail.gmail.com> <20140307204230.3c86b9b1@zeta.dino.sk>

next in thread | previous in thread | raw e-mail | index | archive | help
Look at if_arge.c - arge_fetch_mdiobus_clock_rate() . See whether the
openwrt config sets the mdiobus frequency to something.

The AR9344 defaults to 'MAC_MII_CFG_CLOCK_DIV_58'.

Maybe you can fiddle with which divisor it uses.


-a


On 7 March 2014 11:42, Milan Obuch <freebsd-mips@dino.sk> wrote:
> On Fri, 7 Mar 2014 10:19:03 -0800
> Adrian Chadd <adrian@freebsd.org> wrote:
>
>> On 7 March 2014 05:04, Milan Obuch <freebsd-mips@dino.sk> wrote:
>> > On Thu, 6 Mar 2014 23:05:56 -0800
>> > Adrian Chadd <adrian@freebsd.org> wrote:
>> >
>> >> Hi,
>> >>
>> >> So I'd add some debugging in arswitch_readreg() and
>> >> arswitch_writereg() to see what's being read/written. It should be
>> >> obviously wrong or not.
>> >>
>> >> It may be something like the arge0/arge1 MDIO speeds need to be
>> >> changed.
>> >>
>> >>
>> >> -a
>> >
>> > Where is this debugging? I just svn update my src-current tree,
>> > built new kernel and does not see any debug info...
>>
>> There isn't any; you have to add printfs to them. :)
>>
>>
>> -a
>
> Ahh, I misunderstood you, sorry...
>
> So, yes, I did add some printfs, diff in attachment, and voila,
> arswitch1 probes and /dev/etherswitch0 got created... so this looks
> like some timing issue. I am going to repeat this test with new flash
> with fresh world, so I can actually try to do something. In the
> meantime, do you have any idea how can I adjust MDIO speed so no printf
> is necessary?
>
> Milan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmo=B0CG1FSCKYeaCmORJuWbJ24g=%2BQkHV7WC8DTV9m1zKA>