public inbox for sid@sourceware.org
 help / color / mirror / Atom feed
* [RFA]: hw-glue-bus-mux selection behavior
@ 2001-03-27 15:39 Dave Brolley
  2001-03-27 15:54 ` Ben Elliston
  2001-03-27 16:05 ` Frank Ch. Eigler
  0 siblings, 2 replies; 8+ messages in thread
From: Dave Brolley @ 2001-03-27 15:39 UTC (permalink / raw)
  To: sid

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFA]: hw-glue-bus-mux selection behavior
  2001-03-27 15:39 [RFA]: hw-glue-bus-mux selection behavior Dave Brolley
@ 2001-03-27 15:54 ` Ben Elliston
  2001-03-27 16:05 ` Frank Ch. Eigler
  1 sibling, 0 replies; 8+ messages in thread
From: Ben Elliston @ 2001-03-27 15:54 UTC (permalink / raw)
  To: Dave Brolley; +Cc: sid

>>>>> "Dave" == Dave Brolley <brolley@redhat.com> writes:

  Dave> Jeff Johnston, the original author of the component has agreed with me 
  Dave> in principal and so, I present this patch for approval. Anyone currently 
  Dave> using this component would have to make changes to their code.

Approved.  It's a shame there is no testsuite for this component.

Ben

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFA]: hw-glue-bus-mux selection behavior
  2001-03-27 15:39 [RFA]: hw-glue-bus-mux selection behavior Dave Brolley
  2001-03-27 15:54 ` Ben Elliston
@ 2001-03-27 16:05 ` Frank Ch. Eigler
  2001-03-28  8:56   ` Dave Brolley
  1 sibling, 1 reply; 8+ messages in thread
From: Frank Ch. Eigler @ 2001-03-27 16:05 UTC (permalink / raw)
  To: Dave Brolley; +Cc: sid

Hi -

On Tue, Mar 27, 2001 at 06:39:47PM -0500, Dave Brolley wrote:
: [...]
: Notes:
: 1)  I actually implemented the selector to choose "downstream1" when the 
: pin value is even and "downstream2" otherwise. [...]

To me, this seems like an unnecessary feature; I'd let the client pick
exactly 0 or 1.


: 2) I left the mux_passthrough_bus::switch_bus function in since it still 
: seems like useful functionality for other subclasses.

Hmm.  For what it's worth, I wouldn't have put the mux_passthrough
thingie into sid/include/ at all.  It looks like a specialized enough
piece of code that I'd have kept it inside the source directory of
the appropriate glue component.


: OK to commit?

Sure; up to you if you want to take my mild objections into consideration.


- FChE
-- 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6wSqmVZbdDOm/ZT0RAqKsAJ9oKw/zlbI1726JFv0EM/dGq3lNTwCdGixL
gLlHP6fV4QJSRCsihsGu/5w=
=TNAM
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFA]: hw-glue-bus-mux selection behavior
  2001-03-27 16:05 ` Frank Ch. Eigler
@ 2001-03-28  8:56   ` Dave Brolley
  2001-03-28  9:08     ` Frank Ch. Eigler
  2001-03-28  9:17     ` Dave Feustel
  0 siblings, 2 replies; 8+ messages in thread
From: Dave Brolley @ 2001-03-28  8:56 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: sid

Frank Ch. Eigler wrote:

> Hi -
> 
> On Tue, Mar 27, 2001 at 06:39:47PM -0500, Dave Brolley wrote:
> : [...]
> : Notes:
> : 1)  I actually implemented the selector to choose "downstream1" when the 
> : pin value is even and "downstream2" otherwise. [...]
> 
> To me, this seems like an unnecessary feature; I'd let the client pick
> exactly 0 or 1.

ok -- just trying to be too clever, I guess. How about 0 vs non-zero? I 
think there should be some defined behavior for all values. Updated 
patch attached.

> : 2) I left the mux_passthrough_bus::switch_bus function in since it still 
> : seems like useful functionality for other subclasses.
> 
> Hmm.  For what it's worth, I wouldn't have put the mux_passthrough
> thingie into sid/include/ at all.  It looks like a specialized enough
> piece of code that I'd have kept it inside the source directory of
> the appropriate glue component.

I didn't move it. It was already there. Feel free to move it if you like.

> : OK to commit?
> 
> Sure; up to you if you want to take my mild objections into consideration.

Of course, as always....

Dave

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFA]: hw-glue-bus-mux selection behavior
  2001-03-28  8:56   ` Dave Brolley
@ 2001-03-28  9:08     ` Frank Ch. Eigler
  2001-03-28  9:46       ` Dave Brolley
  2001-03-28  9:17     ` Dave Feustel
  1 sibling, 1 reply; 8+ messages in thread
From: Frank Ch. Eigler @ 2001-03-28  9:08 UTC (permalink / raw)
  To: Dave Brolley; +Cc: sid

Hi -

brolley wrote:
: [...]
: > To me, this seems like an unnecessary feature; I'd let the client pick
: > exactly 0 or 1.
: 
: ok -- just trying to be too clever, I guess. How about 0 vs non-zero? 
: I think there should be some defined behavior for all values.  [...]

No doubt about that.  Not that I want to get you to go all the way
on this now, but ideally, setting the selector to any index that does
not have an configured downstream accessor should be okay, merely cause
sid::bus::unmapped for all future accesses.  The 0/1 case falls out of
that automatically, as does future expansion to 2..N downstream
accessors.


: > Hmm.  For what it's worth, I wouldn't have put the mux_passthrough
: > thingie into sid/include/ at all.  [...]

: I didn't move it. It was already there. Feel free to move it if you like.

"Yuppa yuppa".


- FChE
-- 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6whpmVZbdDOm/ZT0RAsppAJ4xy5Lrl8ajnlwubzWQJOqxLUgFLQCdGna5
OXr2J0HtHGd6hOaemo9F+B0=
=Ccqr
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFA]: hw-glue-bus-mux selection behavior
  2001-03-28  8:56   ` Dave Brolley
  2001-03-28  9:08     ` Frank Ch. Eigler
@ 2001-03-28  9:17     ` Dave Feustel
  1 sibling, 0 replies; 8+ messages in thread
From: Dave Feustel @ 2001-03-28  9:17 UTC (permalink / raw)
  To: Dave Brolley, Frank Ch. Eigler; +Cc: sid

How do I unsubscribe from this list?
(Please respond in message body and not in attachments)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFA]: hw-glue-bus-mux selection behavior
  2001-03-28  9:08     ` Frank Ch. Eigler
@ 2001-03-28  9:46       ` Dave Brolley
       [not found]         ` <20010328124937.E11408@redhat.com>
  0 siblings, 1 reply; 8+ messages in thread
From: Dave Brolley @ 2001-03-28  9:46 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: sid

Frank Ch. Eigler wrote:

> Hi -
> 
> brolley wrote:
> : [...]
> : > To me, this seems like an unnecessary feature; I'd let the client pick
> : > exactly 0 or 1.
> : 
> : ok -- just trying to be too clever, I guess. How about 0 vs non-zero? 
> : I think there should be some defined behavior for all values.  [...]
> 
> No doubt about that.  Not that I want to get you to go all the way
> on this now, but ideally, setting the selector to any index that does
> not have an configured downstream accessor should be okay, merely cause
> sid::bus::unmapped for all future accesses.  The 0/1 case falls out of
> that automatically, as does future expansion to 2..N downstream
> accessors.

OK -- new patch attached

Right now mux_passthrough_bus returns sid::bus::unpermitted if the 
target bus is NULL. Shall I change that to sid::bus::unmapped?

Dave

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFA]: hw-glue-bus-mux selection behavior
       [not found]         ` <20010328124937.E11408@redhat.com>
@ 2001-03-28 12:31           ` Dave Brolley
  0 siblings, 0 replies; 8+ messages in thread
From: Dave Brolley @ 2001-03-28 12:31 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: sid

Done and committed.

Dave


Frank Ch. Eigler wrote:

> Hi -
> 
> : [...]
> : OK -- new patch attached
> : Right now mux_passthrough_bus returns sid::bus::unpermitted if the 
> : target bus is NULL. Shall I change that to sid::bus::unmapped?
> 
> Thanks; yes, please!  Commit at will.
> 
> - FChE


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2001-03-28 12:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-27 15:39 [RFA]: hw-glue-bus-mux selection behavior Dave Brolley
2001-03-27 15:54 ` Ben Elliston
2001-03-27 16:05 ` Frank Ch. Eigler
2001-03-28  8:56   ` Dave Brolley
2001-03-28  9:08     ` Frank Ch. Eigler
2001-03-28  9:46       ` Dave Brolley
     [not found]         ` <20010328124937.E11408@redhat.com>
2001-03-28 12:31           ` Dave Brolley
2001-03-28  9:17     ` Dave Feustel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).