x86, VisWS: turn into generic arch, install proper PCI quirk
authorIngo Molnar <mingo@elte.hu>
Thu, 10 Jul 2008 14:53:21 +0000 (16:53 +0200)
committerIngo Molnar <mingo@elte.hu>
Thu, 10 Jul 2008 16:55:33 +0000 (18:55 +0200)
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/mach-visws/setup_visws.c
arch/x86/pci/visws.c
include/asm-x86/setup.h

index 8401208eec5c99f318f95ab00f7bc9cedff18103..bbc149f78a4bd0bd69e99c734a8705ebf8a26976 100644 (file)
 char visws_board_type  = -1;
 char visws_board_rev   = -1;
 
+int is_visws_box(void)
+{
+       return visws_board_type >= 0;
+}
+
 static int __init visws_time_init_quirk(void)
 {
        printk(KERN_INFO "Starting Cobalt Timer system clock\n");
index 2e022210a6327ed154f93220ace934d474988260..9b883890c0b2a8048c6f3a30d5685667af09aeda 100644 (file)
@@ -8,6 +8,7 @@
 #include <linux/pci.h>
 #include <linux/init.h>
 
+#include <asm/setup.h>
 #include "cobalt.h"
 #include "lithium.h"
 
@@ -107,7 +108,11 @@ static int __init pci_visws_init(void)
 
 static __init int pci_subsys_init(void)
 {
-       return -1;
+       if (!is_visws_box())
+               return -1;
+
+       pcibios_enable_irq = &pci_visws_enable_irq;
+       pcibios_disable_irq = &pci_visws_disable_irq;
 
        pci_visws_init();
        pcibios_init();
index 1ad7eae0d9be1b6546aea4c67e0242b4f767cf86..90ab2225e71bbefe9fb06c9d85127c555e8a8445 100644 (file)
@@ -10,8 +10,10 @@ void vsmp_init(void);
 
 #ifdef CONFIG_X86_VISWS
 extern void visws_early_detect(void);
+extern int is_visws_box(void);
 #else
 static inline void visws_early_detect(void) { }
+static inline int is_visws_box(void) { return 0; }
 #endif
 
 /*