diff options
Diffstat (limited to 'arch/mips/txx9/generic')
-rw-r--r-- | arch/mips/txx9/generic/pci.c | 36 | ||||
-rw-r--r-- | arch/mips/txx9/generic/setup.c | 4 |
2 files changed, 40 insertions, 0 deletions
diff --git a/arch/mips/txx9/generic/pci.c b/arch/mips/txx9/generic/pci.c index 0b92d8c13208..7b637a7c0e66 100644 --- a/arch/mips/txx9/generic/pci.c +++ b/arch/mips/txx9/generic/pci.c | |||
@@ -386,3 +386,39 @@ int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
386 | { | 386 | { |
387 | return txx9_board_vec->pci_map_irq(dev, slot, pin); | 387 | return txx9_board_vec->pci_map_irq(dev, slot, pin); |
388 | } | 388 | } |
389 | |||
390 | char * (*txx9_board_pcibios_setup)(char *str) __devinitdata; | ||
391 | |||
392 | char *__devinit txx9_pcibios_setup(char *str) | ||
393 | { | ||
394 | if (txx9_board_pcibios_setup && !txx9_board_pcibios_setup(str)) | ||
395 | return NULL; | ||
396 | if (!strcmp(str, "picmg")) { | ||
397 | /* PICMG compliant backplane (TOSHIBA JMB-PICMG-ATX | ||
398 | (5V or 3.3V), JMB-PICMG-L2 (5V only), etc.) */ | ||
399 | txx9_pci_option |= TXX9_PCI_OPT_PICMG; | ||
400 | return NULL; | ||
401 | } else if (!strcmp(str, "nopicmg")) { | ||
402 | /* non-PICMG compliant backplane (TOSHIBA | ||
403 | RBHBK4100,RBHBK4200, Interface PCM-PCM05, etc.) */ | ||
404 | txx9_pci_option &= ~TXX9_PCI_OPT_PICMG; | ||
405 | return NULL; | ||
406 | } else if (!strncmp(str, "clk=", 4)) { | ||
407 | char *val = str + 4; | ||
408 | txx9_pci_option &= ~TXX9_PCI_OPT_CLK_MASK; | ||
409 | if (strcmp(val, "33") == 0) | ||
410 | txx9_pci_option |= TXX9_PCI_OPT_CLK_33; | ||
411 | else if (strcmp(val, "66") == 0) | ||
412 | txx9_pci_option |= TXX9_PCI_OPT_CLK_66; | ||
413 | else /* "auto" */ | ||
414 | txx9_pci_option |= TXX9_PCI_OPT_CLK_AUTO; | ||
415 | return NULL; | ||
416 | } else if (!strncmp(str, "err=", 4)) { | ||
417 | if (!strcmp(str + 4, "panic")) | ||
418 | txx9_pci_err_action = TXX9_PCI_ERR_PANIC; | ||
419 | else if (!strcmp(str + 4, "ignore")) | ||
420 | txx9_pci_err_action = TXX9_PCI_ERR_IGNORE; | ||
421 | return NULL; | ||
422 | } | ||
423 | return str; | ||
424 | } | ||
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c index 8c60c78b9a9e..4fbd7baa7037 100644 --- a/arch/mips/txx9/generic/setup.c +++ b/arch/mips/txx9/generic/setup.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <asm/bootinfo.h> | 23 | #include <asm/bootinfo.h> |
24 | #include <asm/time.h> | 24 | #include <asm/time.h> |
25 | #include <asm/txx9/generic.h> | 25 | #include <asm/txx9/generic.h> |
26 | #include <asm/txx9/pci.h> | ||
26 | #ifdef CONFIG_CPU_TX49XX | 27 | #ifdef CONFIG_CPU_TX49XX |
27 | #include <asm/txx9/tx4938.h> | 28 | #include <asm/txx9/tx4938.h> |
28 | #endif | 29 | #endif |
@@ -194,6 +195,9 @@ void __init plat_mem_setup(void) | |||
194 | ioport_resource.end = ~0UL; /* no limit */ | 195 | ioport_resource.end = ~0UL; /* no limit */ |
195 | iomem_resource.start = 0; | 196 | iomem_resource.start = 0; |
196 | iomem_resource.end = ~0UL; /* no limit */ | 197 | iomem_resource.end = ~0UL; /* no limit */ |
198 | #ifdef CONFIG_PCI | ||
199 | pcibios_plat_setup = txx9_pcibios_setup; | ||
200 | #endif | ||
197 | txx9_board_vec->mem_setup(); | 201 | txx9_board_vec->mem_setup(); |
198 | } | 202 | } |
199 | 203 | ||