mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
[PATCH] ioc4: Enable build on non-SN2
The SGI PCI-RT card, based on the SGI IOC4 chip, will be made available on Altix XE (x86_64) platforms in the near future. As such it is now a misnomer for the IOC4 base device driver to live under drivers/sn, and would complicate builds for non-SN2. This patch moves the IOC4 base driver code from drivers/sn to drivers/misc, and updates the associated Makefiles and Kconfig files to allow building on non-SN2 configs. Due to the resulting change in link order, it is now necessary to use late_initcall() for IOC4 subdriver initialization. [akpm@osdl.org: __udivdi3 fix] [akpm@osdl.org: fix default in Kconfig] Acked-by: Pat Gefre <pfg@sgi.com> Acked-by: Jeremy Higdon <jeremy@sgi.com> Signed-off-by: Brent Casavant <bcasavan@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
107d5a72f2
commit
59f148005c
8 changed files with 23 additions and 23 deletions
|
@ -14,6 +14,10 @@ source "drivers/pnp/Kconfig"
|
||||||
|
|
||||||
source "drivers/block/Kconfig"
|
source "drivers/block/Kconfig"
|
||||||
|
|
||||||
|
# misc before ide - BLK_DEV_SGIIOC4 depends on SGI_IOC4
|
||||||
|
|
||||||
|
source "drivers/misc/Kconfig"
|
||||||
|
|
||||||
source "drivers/ide/Kconfig"
|
source "drivers/ide/Kconfig"
|
||||||
|
|
||||||
source "drivers/scsi/Kconfig"
|
source "drivers/scsi/Kconfig"
|
||||||
|
@ -52,8 +56,6 @@ source "drivers/w1/Kconfig"
|
||||||
|
|
||||||
source "drivers/hwmon/Kconfig"
|
source "drivers/hwmon/Kconfig"
|
||||||
|
|
||||||
source "drivers/misc/Kconfig"
|
|
||||||
|
|
||||||
source "drivers/mfd/Kconfig"
|
source "drivers/mfd/Kconfig"
|
||||||
|
|
||||||
source "drivers/media/Kconfig"
|
source "drivers/media/Kconfig"
|
||||||
|
|
|
@ -774,7 +774,7 @@ ioc4_ide_exit(void)
|
||||||
ioc4_unregister_submodule(&ioc4_ide_submodule);
|
ioc4_unregister_submodule(&ioc4_ide_submodule);
|
||||||
}
|
}
|
||||||
|
|
||||||
module_init(ioc4_ide_init);
|
late_initcall(ioc4_ide_init); /* Call only after IDE init is done */
|
||||||
module_exit(ioc4_ide_exit);
|
module_exit(ioc4_ide_exit);
|
||||||
|
|
||||||
MODULE_AUTHOR("Aniket Malatpure/Jeremy Higdon");
|
MODULE_AUTHOR("Aniket Malatpure/Jeremy Higdon");
|
||||||
|
|
|
@ -28,6 +28,17 @@ config IBM_ASM
|
||||||
|
|
||||||
If unsure, say N.
|
If unsure, say N.
|
||||||
|
|
||||||
|
config SGI_IOC4
|
||||||
|
tristate "SGI IOC4 Base IO support"
|
||||||
|
---help---
|
||||||
|
This option enables basic support for the IOC4 chip on certain
|
||||||
|
SGI IO controller cards (IO9, IO10, and PCI-RT). This option
|
||||||
|
does not enable any specific functions on such a card, but provides
|
||||||
|
necessary infrastructure for other drivers to utilize.
|
||||||
|
|
||||||
|
If you have an SGI Altix with an IOC4-based card say Y.
|
||||||
|
Otherwise say N.
|
||||||
|
|
||||||
config TIFM_CORE
|
config TIFM_CORE
|
||||||
tristate "TI Flash Media interface support (EXPERIMENTAL)"
|
tristate "TI Flash Media interface support (EXPERIMENTAL)"
|
||||||
depends on EXPERIMENTAL
|
depends on EXPERIMENTAL
|
||||||
|
|
|
@ -9,3 +9,4 @@ obj-$(CONFIG_MSI_LAPTOP) += msi-laptop.o
|
||||||
obj-$(CONFIG_LKDTM) += lkdtm.o
|
obj-$(CONFIG_LKDTM) += lkdtm.o
|
||||||
obj-$(CONFIG_TIFM_CORE) += tifm_core.o
|
obj-$(CONFIG_TIFM_CORE) += tifm_core.o
|
||||||
obj-$(CONFIG_TIFM_7XX1) += tifm_7xx1.o
|
obj-$(CONFIG_TIFM_7XX1) += tifm_7xx1.o
|
||||||
|
obj-$(CONFIG_SGI_IOC4) += ioc4.o
|
||||||
|
|
|
@ -32,9 +32,6 @@
|
||||||
#include <linux/ktime.h>
|
#include <linux/ktime.h>
|
||||||
#include <linux/mutex.h>
|
#include <linux/mutex.h>
|
||||||
#include <linux/time.h>
|
#include <linux/time.h>
|
||||||
#include <asm/sn/addrs.h>
|
|
||||||
#include <asm/sn/clksupport.h>
|
|
||||||
#include <asm/sn/shub_mmr.h>
|
|
||||||
|
|
||||||
/***************
|
/***************
|
||||||
* Definitions *
|
* Definitions *
|
||||||
|
@ -208,10 +205,12 @@ ioc4_clock_calibrate(struct ioc4_driver_data *idd)
|
||||||
IOC4_CALIBRATE_DEFAULT / IOC4_EXTINT_COUNT_DIVISOR);
|
IOC4_CALIBRATE_DEFAULT / IOC4_EXTINT_COUNT_DIVISOR);
|
||||||
period = IOC4_CALIBRATE_DEFAULT;
|
period = IOC4_CALIBRATE_DEFAULT;
|
||||||
} else {
|
} else {
|
||||||
|
u64 ns = period;
|
||||||
|
|
||||||
|
do_div(ns, IOC4_EXTINT_COUNT_DIVISOR);
|
||||||
printk(KERN_DEBUG
|
printk(KERN_DEBUG
|
||||||
"IOC4 %s: PCI clock is %ld ns.\n",
|
"IOC4 %s: PCI clock is %lld ns.\n",
|
||||||
pci_name(idd->idd_pdev),
|
pci_name(idd->idd_pdev), ns);
|
||||||
period / IOC4_EXTINT_COUNT_DIVISOR);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Remember results. We store the extint clock period rather
|
/* Remember results. We store the extint clock period rather
|
|
@ -2935,7 +2935,7 @@ static void __devexit ioc4_serial_exit(void)
|
||||||
uart_unregister_driver(&ioc4_uart_rs422);
|
uart_unregister_driver(&ioc4_uart_rs422);
|
||||||
}
|
}
|
||||||
|
|
||||||
module_init(ioc4_serial_init);
|
late_initcall(ioc4_serial_init); /* Call only after tty init is done */
|
||||||
module_exit(ioc4_serial_exit);
|
module_exit(ioc4_serial_exit);
|
||||||
|
|
||||||
MODULE_AUTHOR("Pat Gefre - Silicon Graphics Inc. (SGI) <pfg@sgi.com>");
|
MODULE_AUTHOR("Pat Gefre - Silicon Graphics Inc. (SGI) <pfg@sgi.com>");
|
||||||
|
|
|
@ -5,18 +5,6 @@
|
||||||
menu "SN Devices"
|
menu "SN Devices"
|
||||||
depends on SGI_SN
|
depends on SGI_SN
|
||||||
|
|
||||||
config SGI_IOC4
|
|
||||||
tristate "SGI IOC4 Base IO support"
|
|
||||||
default m
|
|
||||||
---help---
|
|
||||||
This option enables basic support for the IOC4 chip on certain
|
|
||||||
SGI IO controller cards (IO9, IO10, and PCI-RT). This option
|
|
||||||
does not enable any specific functions on such a card, but provides
|
|
||||||
necessary infrastructure for other drivers to utilize.
|
|
||||||
|
|
||||||
If you have an SGI Altix with an IOC4-based card say Y.
|
|
||||||
Otherwise say N.
|
|
||||||
|
|
||||||
config SGI_IOC3
|
config SGI_IOC3
|
||||||
tristate "SGI IOC3 Base IO support"
|
tristate "SGI IOC3 Base IO support"
|
||||||
default m
|
default m
|
||||||
|
|
|
@ -3,5 +3,4 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
obj-$(CONFIG_SGI_IOC4) += ioc4.o
|
|
||||||
obj-$(CONFIG_SGI_IOC3) += ioc3.o
|
obj-$(CONFIG_SGI_IOC3) += ioc3.o
|
||||||
|
|
Loading…
Reference in a new issue