X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fsh%2Fdrivers%2Fpci%2Fpci-sh7751.c;h=b2bb72972bdb00b67b6550766816dde62831890d;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=e53823e65dccd57e7eb2f158c3e2a3cb44a8b6c5;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/arch/sh/drivers/pci/pci-sh7751.c b/arch/sh/drivers/pci/pci-sh7751.c index e53823e65..b2bb72972 100644 --- a/arch/sh/drivers/pci/pci-sh7751.c +++ b/arch/sh/drivers/pci/pci-sh7751.c @@ -31,6 +31,7 @@ #include "pci-sh7751.h" static unsigned int pci_probe = PCI_PROBE_CONF1; +extern int pci_fixup_pcic(void); /* * Direct access to PCI hardware... @@ -74,7 +75,8 @@ static int sh7751_pci_read(struct pci_bus *bus, unsigned int devfn, } /* - * Since SH7751 only does 32bit access we'll have to do a read,mask,write operation. + * Since SH7751 only does 32bit access we'll have to do a read, + * mask,write operation. * We'll allow an odd byte offset, though it should be illegal. */ static int sh7751_pci_write(struct pci_bus *bus, unsigned int devfn, @@ -156,6 +158,7 @@ static int __init pci_check_direct(void) * Handle bus scanning and fixups .... */ +#if !defined(CONFIG_SH_HS7751RVOIP) && !defined(CONFIG_SH_RTS7751R2D) static void __init pci_fixup_ide_bases(struct pci_dev *d) { int i; @@ -174,11 +177,13 @@ static void __init pci_fixup_ide_bases(struct pci_dev *d) } } } - +#endif /* Add future fixups here... */ struct pci_fixup pcibios_fixups[] = { +#if !defined(CONFIG_SH_HS7751RVOIP) && !defined(CONFIG_SH_RTS7751R2D) { PCI_FIXUP_HEADER, PCI_ANY_ID, PCI_ANY_ID, pci_fixup_ide_bases }, +#endif { 0 } }; @@ -261,19 +266,19 @@ int __init sh7751_pcic_init(struct sh7751_pci_address_map *map) outl(word, PCI_REG(SH7751_PCICLKR)); /* - * XXX: This code is unused for the SnapGear boards as it is done in - * the bootloader and doing it here means the MAC addresses loaded by - * the bootloader get lost. + * This code is unused for some boards as it is done in the + * bootloader and doing it here means the MAC addresses loaded + * by the bootloader get lost. */ -#ifndef CONFIG_SH_SECUREEDGE5410 - /* toggle PCI reset pin */ - word = SH7751_PCICR_PREFIX | SH7751_PCICR_PRST; - outl(word,PCI_REG(SH7751_PCICR)); - /* Wait for a long time... not 1 sec. but long enough */ - mdelay(100); - word = SH7751_PCICR_PREFIX; - outl(word,PCI_REG(SH7751_PCICR)); -#endif + if (!(map->flags & SH7751_PCIC_NO_RESET)) { + /* toggle PCI reset pin */ + word = SH7751_PCICR_PREFIX | SH7751_PCICR_PRST; + outl(word,PCI_REG(SH7751_PCICR)); + /* Wait for a long time... not 1 sec. but long enough */ + mdelay(100); + word = SH7751_PCICR_PREFIX; + outl(word,PCI_REG(SH7751_PCICR)); + } /* set the command/status bits to: * Wait Cycle Control + Parity Enable + Bus Master + @@ -364,6 +369,10 @@ int __init sh7751_pcic_init(struct sh7751_pci_address_map *map) * DMA interrupts... */ +#ifdef CONFIG_SH_RTS7751R2D + pci_fixup_pcic(); +#endif + /* SH7751 init done, set central function init complete */ /* use round robin mode to stop a device starving/overruning */ word = SH7751_PCICR_PREFIX | SH7751_PCICR_CFIN | SH7751_PCICR_ARBM;