[RFA]: hw-glue-bus-mux selection behavior
Dave Brolley
brolley@redhat.com
Tue Mar 27 15:39:00 GMT 2001
Hi,
It seems more natural to me, and turns out to be more conveniant in many
cases to have the "switch" pin of the hw-glue-bus-mux component act as a
selector rather than as a command to switch buses. That is, when the pin
is driven 0, then "downstream1" is selected and when the pin is driven
1, then "downstream2" is selected. This is because the input to a
bus-mux is frequently the value of a bit in a control register of the
component driving the pin. It also scales well to a possible future
bux-mux which may have more than one output accessor.
Jeff Johnston, the original author of the component has agreed with me
in principal and so, I present this patch for approval. Anyone currently
using this component would have to make changes to their code.
Notes:
1) I actually implemented the selector to choose "downstream1" when the
pin value is even and "downstream2" otherwise. This works well for 0 and
1 values and provides a way for a component to toggle between the
busses, as before, by simply incrementing the pin value. Once again,
this scales to a multi-bus-mux where one could rotate between the busses
by incrementing the pin value.
2) I left the mux_passthrough_bus::switch_bus function in since it still
seems like useful functionality for other subclasses.
OK to commit?
Dave
More information about the Sid
mailing list