Skip to contentSkip to conversation

Make drivers/sn/ioc3.c usable on Mips

PATCH New Johannes Dickgreber 1 participant 1 message Oct 16, 2007 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Make drivers/sn/ioc3.c usable on Mips

This makes driver/sn/ioc3.c usable on Mips.

Changes:

	make ethernet subdriver use always slot 0
	changes in test for dual_irq, test active[] first

Only tested on SGI Octane which is out of tree.
Please test on other Arch and machines.

---
 drivers/Makefile     |    2 +-
 drivers/sn/Kconfig   |    6 +--
 drivers/sn/ioc3.c    |  121 ++++++++++++++++++++++++++++++--------------------
 include/linux/ioc3.h |    2 +
 4 files changed, 77 insertions(+), 54 deletions(-)
drivers/Makefile +1 -1
index f0878b2..c8dba0c 100644
@@ -79,7 +79,7 @@ obj-$(CONFIG_CPU_FREQ)		+= cpufreq/
 obj-$(CONFIG_MMC)		+= mmc/
 obj-$(CONFIG_NEW_LEDS)		+= leds/
 obj-$(CONFIG_INFINIBAND)	+= infiniband/
-obj-$(CONFIG_SGI_SN)		+= sn/
+obj-$(CONFIG_SGI_IOC3)		+= sn/
 obj-y				+= firmware/
 obj-$(CONFIG_CRYPTO)		+= crypto/
 obj-$(CONFIG_SUPERH)		+= sh/
drivers/sn/Kconfig +1 -5
index c66ba9a..3649ad1 100644
@@ -2,11 +2,9 @@
 # Miscellaneous SN-specific devices
 #
 
-menu "SN Devices"
-	depends on SGI_SN
-
 config SGI_IOC3
 	tristate "SGI IOC3 Base IO support"
+	depends on PCI && (SGI_SN || SGI_IP30)
 	default m
 	---help---
 	This option enables basic support for the SGI IOC3-based Base IO
@@ -17,5 +15,3 @@ config SGI_IOC3
 	If you have an SGI Altix with an IOC3-based
 	I/O controller or a PCI IOC3 serial card say Y.
 	Otherwise say N.
-
-endmenu
drivers/sn/ioc3.c +73 -48

199 lines not on this page · raw message

include/linux/ioc3.h +2 -0
index 38b286e..4499243 100644
@@ -89,5 +89,7 @@ extern void ioc3_disable(struct ioc3_submodule *, struct ioc3_driver_data *, uns
 extern void ioc3_gpcr_set(struct ioc3_driver_data *, unsigned int);
 /* general ireg writer */
 extern void ioc3_write_ireg(struct ioc3_driver_data *idd, uint32_t value, int reg);
+/* atomically sets/clears GPIO bits */
+extern void ioc3_gpio(struct ioc3_driver_data *, unsigned int, unsigned int);
 
 #endif
Signature · 1 line
1.5.2.5