Skip to contentSkip to conversation

hide pmac specific drivers if CONFIG_ADB is not set

PATCH In review Olaf Hering 4 participants 7 messages Oct 22, 2005 – Oct 23, 2005

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hide pmac specific drivers if CONFIG_ADB is not set

This started out as a fix for https://bugzilla.novell.com/show_bug.cgi?id=119606

Hiding a few pmac specific drivers when ADB is disabled can not hurt:

AGP_UNINORTH exist only on systems with ADB_PMU
I2C_KEYWEST is used by sound
MACE exists only on systems with ADB_CUDA
BMAC exists on old and new Macs
SCSI_MESH exists on old Macs, but the PB Lombard has an external connector SERIAL_PMACZILOG exists on old and new Macs
BLK_DEV_IDE_PMAC exists on old and new Macs
APPLE_AIRPORT exist only on systems with ADB_PMU
FB_CONTROL exists only on old Macs
FB_PLATINUM exists only on old Macs
FB_VALKYRIE exists only on old Macs
FB_CT65550 exists only on old Macs

 drivers/char/agp/Kconfig     |    2 +-
 drivers/i2c/busses/Kconfig   |    2 +-
 drivers/ide/Kconfig          |    2 +-
 drivers/net/Kconfig          |    4 ++--
 drivers/net/wireless/Kconfig |    2 +-
 drivers/scsi/Kconfig         |    4 ++--
 drivers/serial/Kconfig       |    2 +-
 drivers/video/Kconfig        |    8 ++++----
 8 files changed, 13 insertions(+), 13 deletions(-)
drivers/char/agp/Kconfig +1 -1
Index: linux-2.6.14-rc5/drivers/char/agp/Kconfig
===================================================================
@@ -147,7 +147,7 @@ config AGP_ALPHA_CORE
 
 config AGP_UNINORTH
 	tristate "Apple UniNorth & U3 AGP support"
-	depends on AGP && PPC_PMAC
+	depends on AGP && PPC_PMAC && ADB_PMU
 	help
 	  This option gives you AGP support for Apple machines with a
 	  UniNorth or U3 (Apple G5) bridge.
drivers/i2c/busses/Kconfig +1 -1
Index: linux-2.6.14-rc5/drivers/i2c/busses/Kconfig
===================================================================
@@ -237,7 +237,7 @@ config I2C_IXP2000
 
 config I2C_KEYWEST
 	tristate "Powermac Keywest I2C interface"
-	depends on I2C && PPC_PMAC
+	depends on I2C && PPC_PMAC && (ADB_CUDA || ADB_PMU)
 	help
 	  This supports the use of the I2C interface in the combo-I/O
 	  chip on recent Apple machines.  Say Y if you have such a machine.
drivers/net/Kconfig +2 -2
Index: linux-2.6.14-rc5/drivers/net/Kconfig
===================================================================
@@ -178,7 +178,7 @@ source "drivers/net/arm/Kconfig"
 
 config MACE
 	tristate "MACE (Power Mac ethernet) support"
-	depends on NET_ETHERNET && PPC_PMAC && PPC32
+	depends on NET_ETHERNET && PPC_PMAC && PPC32 && ADB_CUDA
 	select CRC32
 	help
 	  Power Macintoshes and clones with Ethernet built-in on the
@@ -201,7 +201,7 @@ config MACE_AAUI_PORT
 
 config BMAC
 	tristate "BMAC (G3 ethernet) support"
-	depends on NET_ETHERNET && PPC_PMAC && PPC32
+	depends on NET_ETHERNET && PPC_PMAC && PPC32 && (ADB_CUDA || ADB_PMU)
 	select CRC32
 	help
 	  Say Y for support of BMAC Ethernet interfaces. These are used on G3
drivers/scsi/Kconfig +2 -2
Index: linux-2.6.14-rc5/drivers/scsi/Kconfig
===================================================================
@@ -1529,7 +1529,7 @@ config SCSI_DEBUG
 
 config SCSI_MESH
 	tristate "MESH (Power Mac internal SCSI) support"
-	depends on PPC32 && PPC_PMAC && SCSI
+	depends on PPC32 && PPC_PMAC && SCSI && (ADB_CUDA || ADB_PMU)
 	help
 	  Many Power Macintoshes and clones have a MESH (Macintosh Enhanced
 	  SCSI Hardware) SCSI bus adaptor (the 7200 doesn't, but all of the
@@ -1560,7 +1560,7 @@ config SCSI_MESH_RESET_DELAY_MS
 
 config SCSI_MAC53C94
 	tristate "53C94 (Power Mac external SCSI) support"
-	depends on PPC32 && PPC_PMAC && SCSI
+	depends on PPC32 && PPC_PMAC && SCSI && ADB_CUDA
 	help
 	  On Power Macintoshes (and clones) with two SCSI buses, the external
 	  SCSI bus is usually controlled by a 53C94 SCSI bus adaptor. Older
drivers/serial/Kconfig +1 -1
Index: linux-2.6.14-rc5/drivers/serial/Kconfig
===================================================================
@@ -651,7 +651,7 @@ config SERIAL_68360
 
 config SERIAL_PMACZILOG
 	tristate "PowerMac z85c30 ESCC support"
-	depends on PPC_OF && PPC_PMAC
+	depends on PPC_OF && PPC_PMAC && (ADB_CUDA || ADB_PMU)
 	select SERIAL_CORE
 	help
 	  This driver supports the Zilog z85C30 serial ports found on
drivers/ide/Kconfig +1 -1
Index: linux-2.6.14-rc5/drivers/ide/Kconfig
===================================================================
@@ -744,7 +744,7 @@ endif
 
 config BLK_DEV_IDE_PMAC
 	bool "Builtin PowerMac IDE support"
-	depends on PPC_PMAC && IDE=y
+	depends on PPC_PMAC && IDE=y && (ADB_CUDA || ADB_PMU)
 	help
 	  This driver provides support for the built-in IDE controller on
 	  most of the recent Apple Power Macintoshes and PowerBooks.
drivers/net/wireless/Kconfig +1 -1
Index: linux-2.6.14-rc5/drivers/net/wireless/Kconfig
===================================================================
@@ -281,7 +281,7 @@ config HERMES
 
 config APPLE_AIRPORT
 	tristate "Apple Airport support (built-in)"
-	depends on PPC_PMAC && HERMES
+	depends on PPC_PMAC && HERMES && ADB_PMU
 	help
 	  Say Y here to support the Airport 802.11b wireless Ethernet hardware
 	  built into the Macintosh iBook and other recent PowerPC-based
drivers/video/Kconfig +4 -4
Index: linux-2.6.14-rc5/drivers/video/Kconfig
===================================================================
@@ -359,7 +359,7 @@ config FB_OF
 
 config FB_CONTROL
 	bool "Apple \"control\" display support"
-	depends on (FB = y) && PPC_PMAC
+	depends on (FB = y) && PPC_PMAC && ADB_CUDA
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
@@ -371,7 +371,7 @@ config FB_CONTROL
 
 config FB_PLATINUM
 	bool "Apple \"platinum\" display support"
-	depends on (FB = y) && PPC_PMAC
+	depends on (FB = y) && PPC_PMAC && ADB_CUDA
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
@@ -383,7 +383,7 @@ config FB_PLATINUM
 
 config FB_VALKYRIE
 	bool "Apple \"valkyrie\" display support"
-	depends on (FB = y) && (MAC || PPC_PMAC)
+	depends on (FB = y) && (MAC || (PPC_PMAC && ADB_CUDA))
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
@@ -395,7 +395,7 @@ config FB_VALKYRIE
 
 config FB_CT65550
 	bool "Chips 65550 display support"
-	depends on (FB = y) && PPC
+	depends on (FB = y) && PPC_PMAC && ADB_CUDA
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
Signature · 2 lines
short story of a lazy sysadmin:
 alias appserv=wotan
#1 lore raw
Quoted 5 lines · Olaf Hering

This started out as a fix for https://bugzilla.novell.com/show_bug.cgi?id=119606

Hiding a few pmac specific drivers when ADB is disabled can not hurt:

AGP_UNINORTH exist only on systems with ADB_PMU

No. SMU machines too

Quoted 1 line

I2C_KEYWEST is used by sound

Same comment. PMU and SMU based machines. Be careful of not breaking ppc64 here :) I think those changes are definitely not welcome now. Wait for the big ppc/ppc64 merge that's coming, a lot of stuff will be consolidated and these will be much easier to do. Also, I'm seriously considering removing the user setting for "CUDA based machiens" vs. "PMU based machines". I may instead just enable machine generations (PowerSurge, PowerStar, Gossamer, Core99, MacRISC2, MacRISC4)

Quoted 1 line

MACE exists only on systems with ADB_CUDA

Hrm... No old laptop with Mace ? Yah, I think that's ok.

Quoted 1 line

BMAC exists on old and new Macs

Yah, Cuda and PMU based.

Quoted 3 lines

SCSI_MESH exists on old Macs, but the PB Lombard has an external connector SERIAL_PMACZILOG exists on old and new Macs
BLK_DEV_IDE_PMAC exists on old and new Macs

You missed SMU again...

Quoted 5 lines

APPLE_AIRPORT exist only on systems with ADB_PMU
FB_CONTROL exists only on old Macs
FB_PLATINUM exists only on old Macs
FB_VALKYRIE exists only on old Macs
FB_CT65550 exists only on old Macs

No, it's on old laptops which are PMU based

Anyway, I'm not fan of this patch at all. We should do that properly in a different way after the merge.

Ben.

Quoted 162 lines
 drivers/char/agp/Kconfig     |    2 +-
 drivers/i2c/busses/Kconfig   |    2 +-
 drivers/ide/Kconfig          |    2 +-
 drivers/net/Kconfig          |    4 ++--
 drivers/net/wireless/Kconfig |    2 +-
 drivers/scsi/Kconfig         |    4 ++--
 drivers/serial/Kconfig       |    2 +-
 drivers/video/Kconfig        |    8 ++++----
 8 files changed, 13 insertions(+), 13 deletions(-)

Index: linux-2.6.14-rc5/drivers/char/agp/Kconfig
===================================================================

drivers/char/agp/Kconfig +1 -1
@@ -147,7 +147,7 @@ config AGP_ALPHA_CORE
 
 config AGP_UNINORTH
 	tristate "Apple UniNorth & U3 AGP support"
-	depends on AGP && PPC_PMAC
+	depends on AGP && PPC_PMAC && ADB_PMU
 	help
 	  This option gives you AGP support for Apple machines with a
 	  UniNorth or U3 (Apple G5) bridge.

Index: linux-2.6.14-rc5/drivers/i2c/busses/Kconfig
===================================================================

drivers/i2c/busses/Kconfig +1 -1
@@ -237,7 +237,7 @@ config I2C_IXP2000
 
 config I2C_KEYWEST
 	tristate "Powermac Keywest I2C interface"
-	depends on I2C && PPC_PMAC
+	depends on I2C && PPC_PMAC && (ADB_CUDA || ADB_PMU)
 	help
 	  This supports the use of the I2C interface in the combo-I/O
 	  chip on recent Apple machines.  Say Y if you have such a machine.

Index: linux-2.6.14-rc5/drivers/net/Kconfig
===================================================================

drivers/net/Kconfig +2 -2
@@ -178,7 +178,7 @@ source "drivers/net/arm/Kconfig"
 
 config MACE
 	tristate "MACE (Power Mac ethernet) support"
-	depends on NET_ETHERNET && PPC_PMAC && PPC32
+	depends on NET_ETHERNET && PPC_PMAC && PPC32 && ADB_CUDA
 	select CRC32
 	help
 	  Power Macintoshes and clones with Ethernet built-in on the
@@ -201,7 +201,7 @@ config MACE_AAUI_PORT
 
 config BMAC
 	tristate "BMAC (G3 ethernet) support"
-	depends on NET_ETHERNET && PPC_PMAC && PPC32
+	depends on NET_ETHERNET && PPC_PMAC && PPC32 && (ADB_CUDA || ADB_PMU)
 	select CRC32
 	help
 	  Say Y for support of BMAC Ethernet interfaces. These are used on G3

Index: linux-2.6.14-rc5/drivers/scsi/Kconfig
===================================================================

drivers/scsi/Kconfig +2 -2
@@ -1529,7 +1529,7 @@ config SCSI_DEBUG
 
 config SCSI_MESH
 	tristate "MESH (Power Mac internal SCSI) support"
-	depends on PPC32 && PPC_PMAC && SCSI
+	depends on PPC32 && PPC_PMAC && SCSI && (ADB_CUDA || ADB_PMU)
 	help
 	  Many Power Macintoshes and clones have a MESH (Macintosh Enhanced
 	  SCSI Hardware) SCSI bus adaptor (the 7200 doesn't, but all of the
@@ -1560,7 +1560,7 @@ config SCSI_MESH_RESET_DELAY_MS
 
 config SCSI_MAC53C94
 	tristate "53C94 (Power Mac external SCSI) support"
-	depends on PPC32 && PPC_PMAC && SCSI
+	depends on PPC32 && PPC_PMAC && SCSI && ADB_CUDA
 	help
 	  On Power Macintoshes (and clones) with two SCSI buses, the external
 	  SCSI bus is usually controlled by a 53C94 SCSI bus adaptor. Older

Index: linux-2.6.14-rc5/drivers/serial/Kconfig
===================================================================

drivers/serial/Kconfig +1 -1
@@ -651,7 +651,7 @@ config SERIAL_68360
 
 config SERIAL_PMACZILOG
 	tristate "PowerMac z85c30 ESCC support"
-	depends on PPC_OF && PPC_PMAC
+	depends on PPC_OF && PPC_PMAC && (ADB_CUDA || ADB_PMU)
 	select SERIAL_CORE
 	help
 	  This driver supports the Zilog z85C30 serial ports found on

Index: linux-2.6.14-rc5/drivers/ide/Kconfig
===================================================================

drivers/ide/Kconfig +1 -1
@@ -744,7 +744,7 @@ endif
 
 config BLK_DEV_IDE_PMAC
 	bool "Builtin PowerMac IDE support"
-	depends on PPC_PMAC && IDE=y
+	depends on PPC_PMAC && IDE=y && (ADB_CUDA || ADB_PMU)
 	help
 	  This driver provides support for the built-in IDE controller on
 	  most of the recent Apple Power Macintoshes and PowerBooks.

Index: linux-2.6.14-rc5/drivers/net/wireless/Kconfig
===================================================================

drivers/net/wireless/Kconfig +1 -1
@@ -281,7 +281,7 @@ config HERMES
 
 config APPLE_AIRPORT
 	tristate "Apple Airport support (built-in)"
-	depends on PPC_PMAC && HERMES
+	depends on PPC_PMAC && HERMES && ADB_PMU
 	help
 	  Say Y here to support the Airport 802.11b wireless Ethernet hardware
 	  built into the Macintosh iBook and other recent PowerPC-based

Index: linux-2.6.14-rc5/drivers/video/Kconfig
===================================================================

drivers/video/Kconfig +4 -4
@@ -359,7 +359,7 @@ config FB_OF
 
 config FB_CONTROL
 	bool "Apple \"control\" display support"
-	depends on (FB = y) && PPC_PMAC
+	depends on (FB = y) && PPC_PMAC && ADB_CUDA
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
@@ -371,7 +371,7 @@ config FB_CONTROL
 
 config FB_PLATINUM
 	bool "Apple \"platinum\" display support"
-	depends on (FB = y) && PPC_PMAC
+	depends on (FB = y) && PPC_PMAC && ADB_CUDA
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
@@ -383,7 +383,7 @@ config FB_PLATINUM
 
 config FB_VALKYRIE
 	bool "Apple \"valkyrie\" display support"
-	depends on (FB = y) && (MAC || PPC_PMAC)
+	depends on (FB = y) && (MAC || (PPC_PMAC && ADB_CUDA))
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
@@ -395,7 +395,7 @@ config FB_VALKYRIE
 
 config FB_CT65550
 	bool "Chips 65550 display support"
-	depends on (FB = y) && PPC
+	depends on (FB = y) && PPC_PMAC && ADB_CUDA
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
#2 lore raw
Quoted 8 lines · Benjamin Herrenschmidt
Quoted 5 lines · Olaf Hering

This started out as a fix for https://bugzilla.novell.com/show_bug.cgi?id=119606

Hiding a few pmac specific drivers when ADB is disabled can not hurt:

AGP_UNINORTH exist only on systems with ADB_PMU

No. SMU machines too

arch/ppc64/configs/g5_defconfig has CONFIG_ADB_PMU enabled. It compiles ok with that option disabled.
Is there a pmu in early G5 models?

Signature · 2 lines
short story of a lazy sysadmin:
 alias appserv=wotan
#3 lore raw
Quoted 6 lines
Quoted 2 lines

No. SMU machines too

arch/ppc64/configs/g5_defconfig has CONFIG_ADB_PMU enabled. It compiles ok with that option disabled.
Is there a pmu in early G5 models?

Yes, but not newer ones and I intend to change the way all those low level support options are dealt with anyway

Ben.

#4 lore raw
In reply to Olaf Hering
Quoted 1 line · Olaf Hering

SCSI_MESH exists on old Macs, but the PB Lombard has an external connector

And on some CHRP.

drivers/scsi/Kconfig config SCSI_DEBUG · line 1535

Quoted 11 lines
drivers/scsi/Kconfig +1 -1
@@ -1529,7 +1529,7 @@ config SCSI_DEBUG
 
 config SCSI_MESH
 	tristate "MESH (Power Mac internal SCSI) support"
-	depends on PPC32 && PPC_PMAC && SCSI
+	depends on PPC32 && PPC_PMAC && SCSI && (ADB_CUDA || ADB_PMU)
 	help
 	  Many Power Macintoshes and clones have a MESH (Macintosh Enhanced
 	  SCSI Hardware) SCSI bus adaptor (the 7200 doesn't, but all of the

You can no longer enable MESH when compiling for CHRP or when disabling ADB?

It's clearly visible my LongTrail died last year... :-(

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#5 lore raw
Quoted 19 lines · Geert Uytterhoeven
Quoted 1 line · Olaf Hering

SCSI_MESH exists on old Macs, but the PB Lombard has an external connector

And on some CHRP.

drivers/scsi/Kconfig config SCSI_DEBUG · line 1535

Quoted 11 lines
drivers/scsi/Kconfig +1 -1
@@ -1529,7 +1529,7 @@ config SCSI_DEBUG
 
 config SCSI_MESH
 	tristate "MESH (Power Mac internal SCSI) support"
-	depends on PPC32 && PPC_PMAC && SCSI
+	depends on PPC32 && PPC_PMAC && SCSI && (ADB_CUDA || ADB_PMU)
 	help
 	  Many Power Macintoshes and clones have a MESH (Macintosh Enhanced
 	  SCSI Hardware) SCSI bus adaptor (the 7200 doesn't, but all of the

You can no longer enable MESH when compiling for CHRP or when disabling ADB?

Quoted 1 line

It's clearly visible my LongTrail died last year... :-(

Come on, Geert, I told you back then I was doing that :) You didn't complain and we figured out nobody around had any of these in working conditions anymore :)

Ben.

#6 lore raw
Quoted 6 lines · Benjamin Herrenschmidt
Quoted 5 lines · Geert Uytterhoeven
Quoted 1 line · Olaf Hering

SCSI_MESH exists on old Macs, but the PB Lombard has an external connector

And on some CHRP.

Quoted 7 lines
Quoted 3 lines

You can no longer enable MESH when compiling for CHRP or when disabling ADB?

It's clearly visible my LongTrail died last year... :-(

Come on, Geert, I told you back then I was doing that :) You didn't complain and we figured out nobody around had any of these in working conditions anymore :)

Well, it really doesn't have anything to do with ADB. The problem is actually the macio bus layer, but we don't have CONFIG_ options for that. I've been working on getting the macio code running in 68k, so I was thinking of introducing a CONFIG_MACIO. Would this be an acceptable option? On 68k, I would just default it to yes if the config has CONFIG_MAC, but it could be made a real question for ppc since the platform stuff doesn't really let you select just a pci powermac kernel anymore. Any comments?

I suppose if anyone still has one of those old CHRP machines, we could probably get hydra supported by macio_asic to get some of the other drivers working on it.

Brad Boyer
[email protected]