Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Dec 2011 19:05:35 +0100
From:      Stefan Bethke <stb@lassitu.de>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        Aleksandr Rybalko <ray@dlink.ua>, "freebsd-embedded@freebsd.org" <freebsd-embedded@freebsd.org>
Subject:   Re: TL-WR1043: switch
Message-ID:  <9EB5B4D2-3927-4790-AB90-C7310FC732DC@lassitu.de>
In-Reply-To: <CAJ-VmokrnjhvV8rS5s292UdFM4GbyxXJHNhMmyKyDrAdmiJh3Q@mail.gmail.com>
References:  <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <2B8826C7-00C7-4117-B424-4A86F1346DFF@bsdimp.com> <20111130231311.4a154bc5.ray@ddteam.net> <CAJ-Vmon8-yo-UQ%2B81feLT-Yr%2BJimMsEbLHWfd9kZP_s4804%2BtA@mail.gmail.com> <20111202164539.fff3ea91.ray@dlink.ua> <20111202191122.GK25601@funkthat.com> <E29B1787-FF42-4462-81C0-8185F70C45B6@lassitu.de> <CAJ-Vmo=YMTuk6gOsjp15QWpRuBPkdDvM3JvamE6E38MhCsL7iw@mail.gmail.com> <2DB1EAFF-BFEA-4104-8F5A-E4D00BFDF8F9@lassitu.de> <CAJ-VmokrnjhvV8rS5s292UdFM4GbyxXJHNhMmyKyDrAdmiJh3Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Am 03.12.2011 um 16:47 schrieb Adrian Chadd <adrian@freebsd.org>:
> * Don't get rid of SCL_PIN / SDA_PIN: instead rename them to
> blah_PIN_DEFAULT, and use those defines instead of hardcoding 0 and 1.
> I have a "thing" for avoiding hard-coded constants, and this makes it
> more obvious that those 0/1 values are pins rather than true/false.

Ok.

> * We should break this out into separate diffs - let's focus right now
> on fixing/extending the i2c bus code to work with the "strict" flag
> you've introduced.  The rest of the diff is GPIO stuff. That way we
> can commit it in two parts.

Will do.

> Stuff to look at later:
> 
> * The gpio default stuff is fine (but luis has send me some alternate
> hint code to look at too!) - however, the capabilities are either in
> or out. What about pullup, pulldown, etc?

From my Reading of ar71xx_gpio.c, only in and Out are supported, so I ignored the rest. If we can find enough letters, the other capabilities could be supported as well.  Note that the capabilities are defaulted, not configured.  I'm only setting the initial mode. If this is unclear, I can talk about later when I'm back home. 

> * Is there any way to make that "configure GPIO from hint" function
> generic? Or should we worry about that later on? (eg so the rt305x CPU
> support from ray@ can also use this?)

I'd think iT can be made generic.

> And my final question:
> 
> Does this actually now work for mainipulating the switch phy? If so:
> 
> * how does it work;
> * do we get per-physical-switch-port statistics somehow?
> * how do I tinker with it next week when I'm over in Melbourne,
> talking about this stuff to a group of researchers that want to use
> the 1043nd? :)

yes, see the tbz in the same dir on the web site.


Stefan

-- 
Stefan Bethke <stb@lassitu.de>   Fon +49 151 14070811




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9EB5B4D2-3927-4790-AB90-C7310FC732DC>