]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/mips/txx9/generic/pci.c
[MIPS] TXx9: Add some pci options
[linux-2.6-omap-h63xx.git] / arch / mips / txx9 / generic / pci.c
index 8173faab99bb5b2ce34a42c69faf2bd21baa656a..7b637a7c0e6694d7bbae5c3ec895093fb2f6491e 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/delay.h>
 #include <linux/jiffies.h>
 #include <linux/io.h>
+#include <asm/txx9/generic.h>
 #include <asm/txx9/pci.h>
 #ifdef CONFIG_TOSHIBA_FPCIB0
 #include <linux/interrupt.h>
@@ -375,3 +376,49 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_EFAR, PCI_DEVICE_ID_EFAR_SLC90E66_1,
 #endif
 DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, final_fixup);
 DECLARE_PCI_FIXUP_RESUME(PCI_ANY_ID, PCI_ANY_ID, final_fixup);
+
+int pcibios_plat_dev_init(struct pci_dev *dev)
+{
+       return 0;
+}
+
+int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+{
+       return txx9_board_vec->pci_map_irq(dev, slot, pin);
+}
+
+char * (*txx9_board_pcibios_setup)(char *str) __devinitdata;
+
+char *__devinit txx9_pcibios_setup(char *str)
+{
+       if (txx9_board_pcibios_setup && !txx9_board_pcibios_setup(str))
+               return NULL;
+       if (!strcmp(str, "picmg")) {
+               /* PICMG compliant backplane (TOSHIBA JMB-PICMG-ATX
+                  (5V or 3.3V), JMB-PICMG-L2 (5V only), etc.) */
+               txx9_pci_option |= TXX9_PCI_OPT_PICMG;
+               return NULL;
+       } else if (!strcmp(str, "nopicmg")) {
+               /* non-PICMG compliant backplane (TOSHIBA
+                  RBHBK4100,RBHBK4200, Interface PCM-PCM05, etc.) */
+               txx9_pci_option &= ~TXX9_PCI_OPT_PICMG;
+               return NULL;
+       } else if (!strncmp(str, "clk=", 4)) {
+               char *val = str + 4;
+               txx9_pci_option &= ~TXX9_PCI_OPT_CLK_MASK;
+               if (strcmp(val, "33") == 0)
+                       txx9_pci_option |= TXX9_PCI_OPT_CLK_33;
+               else if (strcmp(val, "66") == 0)
+                       txx9_pci_option |= TXX9_PCI_OPT_CLK_66;
+               else /* "auto" */
+                       txx9_pci_option |= TXX9_PCI_OPT_CLK_AUTO;
+               return NULL;
+       } else if (!strncmp(str, "err=", 4)) {
+               if (!strcmp(str + 4, "panic"))
+                       txx9_pci_err_action = TXX9_PCI_ERR_PANIC;
+               else if (!strcmp(str + 4, "ignore"))
+                       txx9_pci_err_action = TXX9_PCI_ERR_IGNORE;
+               return NULL;
+       }
+       return str;
+}