Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Dec 2011 09:44:11 +0800
From:      Adrian Chadd <adrian@freebsd.org>
To:        Warner Losh <imp@bsdimp.com>
Cc:        freebsd-embedded@freebsd.org
Subject:   Re: ar71xx_gpio.c touches SPI_CS1 and 2?
Message-ID:  <CAJ-VmonB6%2BYbRWb8wkvSQSGoXjPVmHFXxieav3gEJdO5ETFDFg@mail.gmail.com>
In-Reply-To: <9681BA0F-B8DE-479C-98B8-6DA702A489CA@bsdimp.com>
References:  <A78C6CC2-A6C9-42CC-B128-871C34C201CD@lassitu.de> <2B6F6CAC-F4EF-4958-A435-579A69862AE5@bsdimp.com> <CAJ-Vmo=-b96x4nH3VLciWfw1GSZ5ArrA4OXddOdwwTH7PuPztA@mail.gmail.com> <9681BA0F-B8DE-479C-98B8-6DA702A489CA@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
We're aligned in our thinking btw - it was just my choice of
terminology that was poor.

The reason I chose the term "GPIO" is because the pins tend to do
dual-duty as either GPIO or non-GP IO pins; on the ar71xx these are
configured via one nice register.
On the 8 bit AVRs at least, the pin personality is configured in a
variety of locations rather than just one location.

So I'd like to see this done in ether the kernel config or hints,
rather than by per-board C code (which is what openwrt/linux currently
does.) That way we can just ship one source tree without individual C
files, one per board. I'd prefer to stuff it inside a "boarddep" part
of hints, that gets read by the platform startup code and initialises
the IO pin personality as needed, far before the device drivers get
their grubby fingers into it.

This includes setting up the UART/JTAG personalities too, so I'd want
it to be done very early on (maybe in platform_start(), before it
starts using the UART. The firmware should have already set this up
but there may be some boards out there which just disable the UART
entirely in production.. ?


Adrian



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