4-bit SD Card mode

Björn König bkoenig at alpha-tierchen.de
Fri Jun 8 06:14:22 UTC 2007


Warner Losh skrev:
> My hardware guys are somewhat agressive in their elimination of
> "unused" lines.  We multiplex TX/RX from one of the serial ports to be
> GPIO lines dynamically at run time depending on what add-in hardware
> is connected to the box.  I want to keep things as flexible as
> possible because I know that other designs are doing similar "icky"
> things.

Ok, I thought about the topic a bit over night.

On the one hand I understand your concern that we can't probe for pins
whether they are connected or not; this characterises a significant
difference between embedded hardware and PC hardware. On the other hand
the problem remains if we make the loader responsible for configuring the
PIO controller, because board-specific configuration is necessary in any
case. Shifting a task is not a solution, especially if we want to stay
independend of the loader.

I understand the loader as a very small piece of software for
bootstraping. Usually it is lean and mean as much as possible and does
only things that are really necessary to go on with loading the operating
system, not to be able using specific hardware.

Actually neither the loader nor the kernel is responsible for making those
kind of decisions, but rather the user has to attend this duty. Since the
FreeBSD kernel is more flexible and highly configurable in contrast to any
loader I still hold the view that the kernel should give the ability to
configure the PIO controller.

I agree with you that it is impossible and unjustifiable to make
unprovable assumptions about the hardware that may cause damage or
unexpected behaviour (I like to apologise for suggesting such code ;-).

The best solution that I see is to provide a way to specify the hardware
without patching the kernel and without requiring special bits from the
loader. This should happen directly or indirectly in the kernel
configuration file.

I'm still concerned about this, so I'll provide some code that takes your
objection into account.

Regards
Björn




More information about the freebsd-arm mailing list