Skip to contentSkip to conversation

sparc: drop SBUS ifdefs

PATCH In review Sam Ravnborg 3 participants 7 messages Jan 5, 2011 – Jan 7, 2011

lore
Share & tools
lore
#0 lore raw

cover sparc: drop SBUS ifdefs

Kristoffer Glembo noticed that SBUS is always defined for SPARC. So I went out and dropped all #ifdef SBUS that were present in SPARC only code.

This touches:
- arch/sparc
- drivers/net
- sound/sparc

But despite this I expect we can add all this to sparc.git. If you prefer I can submit the patches via the usual channels.

Build tested on sparc64 & sparc.

Patches are on top of sparc-next as of yesterday.

Sam

Sam Ravnborg (4):
sparc: drop ifdef CONFIG_SBUS in arch/sparc - SBUS is always defined
sunhme: cleanup conditional on CONFIG_SBUS
cs4231: cleanup conditional on CONFIG_SBUS
sound,sparc: drop SBUS dependency

 arch/sparc/kernel/ioport.c        |    4 ----
 arch/sparc/kernel/prom_irqtrans.c |    5 -----
 arch/sparc/mm/io-unit.c           |    4 ----
 arch/sparc/mm/iommu.c             |    4 ----
 drivers/net/sunhme.c              |    9 +--------
 sound/sparc/Kconfig               |    2 --
 sound/sparc/cs4231.c              |   13 -------------
 7 files changed, 1 insertions(+), 40 deletions(-)
#1 lore raw
Quoted 3 lines · Sam Ravnborg

Kristoffer Glembo noticed that SBUS is always defined for SPARC. So I went out and dropped all #ifdef SBUS that were present in SPARC only code.

Good catch, but is this necessarily correct - i.e. do all sparc machines have sbus hardware, and is it necessary to have sbus support compiled into all sparc kernels? - should this be a (hidden) compile option in like most other bus types? (e.g. PCI)

And beyond that, keeping these (unnecessary) #ifdefs is good documentation - it makes it obvious that these drivers require sbus to function. Would it potentially be a better choice to drop the SPARC dependency as it's the only architecture that defines SBUS?

Thanks,

Signature · 5 lines
Julian Calaby

Email: [email protected]
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/
#2 lore raw
In reply to Sam Ravnborg

From: Julian Calaby <[email protected]>
Date: Thu, 6 Jan 2011 10:23:43 +1100

Quoted 3 lines

And beyond that, keeping these (unnecessary) #ifdefs is good documentation - it makes it obvious that these drivers require sbus to function.

It should be buildable on any platform that has CONFIG_OF support, as all of the SBUS drivers only use generic OF and dma_*() interfaces.

And this has value because it increases build testing.

#3 lore raw
In reply to Sam Ravnborg
Quoted 11 lines · David Miller

From: Julian Calaby <[email protected]>
Date: Thu, 6 Jan 2011 10:23:43 +1100

Quoted 3 lines

And beyond that, keeping these (unnecessary) #ifdefs is good documentation - it makes it obvious that these drivers require sbus to function.

It should be buildable on any platform that has CONFIG_OF support, as all of the SBUS drivers only use generic OF and dma_*() interfaces.

And this has value because it increases build testing.

Oh, yes, forgot that =)

That said, sunhme has SBUS conditionals around calls to sbus_can_burst64() and sbus_can_dma_64bit() - I'm not sure if the other drivers also use similar functions to determine what they can / should do and whether this would break things.

Thanks,

Signature · 5 lines
Julian Calaby

Email: [email protected]
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/
#4 lore raw
In reply to Sam Ravnborg

From: Sam Ravnborg <[email protected]>
Date: Wed, 5 Jan 2011 22:02:17 +0100

Quoted 9 lines

Kristoffer Glembo noticed that SBUS is always defined for SPARC. So I went out and dropped all #ifdef SBUS that were present in SPARC only code.

This touches:
- arch/sparc
- drivers/net
- sound/sparc

Quoted 6 lines

But despite this I expect we can add all this to sparc.git. If you prefer I can submit the patches via the usual channels.

Build tested on sparc64 & sparc.

Patches are on top of sparc-next as of yesterday.

I've decided I'm going to defer on this set of patches for now.

The real thing to do is to create a include/linux/sbus.h that provides the SBUS specific interfaces, and dummy ones when CONFIG_SBUS is not defined.

That way all of the sparc drivers can be enabled unconditionally as long as CONFIG_OF is true.

#5 lore raw
In reply to Sam Ravnborg
Quoted 19 lines · David Miller

From: Sam Ravnborg <[email protected]>
Date: Wed, 5 Jan 2011 22:02:17 +0100

Quoted 9 lines

Kristoffer Glembo noticed that SBUS is always defined for SPARC. So I went out and dropped all #ifdef SBUS that were present in SPARC only code.

This touches:
- arch/sparc
- drivers/net
- sound/sparc

Quoted 6 lines

But despite this I expect we can add all this to sparc.git. If you prefer I can submit the patches via the usual channels.

Build tested on sparc64 & sparc.

Patches are on top of sparc-next as of yesterday.

Quoted 8 lines

I've decided I'm going to defer on this set of patches for now.

The real thing to do is to create a include/linux/sbus.h that provides the SBUS specific interfaces, and dummy ones when CONFIG_SBUS is not defined.

That way all of the sparc drivers can be enabled unconditionally as long as CONFIG_OF is true.

OK.
I will try to look into providing this an resend.

Sam

#6 lore raw
In reply to Sam Ravnborg
Quoted 26 lines · Sam Ravnborg
Quoted 25 lines · David Miller

From: Sam Ravnborg <[email protected]>
Date: Wed, 5 Jan 2011 22:02:17 +0100

Quoted 9 lines

Kristoffer Glembo noticed that SBUS is always defined for SPARC. So I went out and dropped all #ifdef SBUS that were present in SPARC only code.

This touches:
- arch/sparc
- drivers/net
- sound/sparc

Quoted 6 lines

But despite this I expect we can add all this to sparc.git. If you prefer I can submit the patches via the usual channels.

Build tested on sparc64 & sparc.

Patches are on top of sparc-next as of yesterday.

I've decided I'm going to defer on this set of patches for now.

The real thing to do is to create a include/linux/sbus.h that provides the SBUS specific interfaces, and dummy ones when CONFIG_SBUS is not defined.

Quoted 5 lines
Quoted 2 lines

That way all of the sparc drivers can be enabled unconditionally as long as CONFIG_OF is true.

OK.
I will try to look into providing this an resend.

I'm thinking about having a look to see if it's possible to split the sBus code out of the base sparc arch code this weekend. I'm thinking of trying to put it behind a KConfig option, similar to PCI - of course making it properly backwards compatible so that nothing breaks horribly.

I'll hold off on sending anything until you've re-sent this.

Thanks,

Signature · 5 lines
Julian Calaby

Email: [email protected]
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/