15283ecb5SPaul Mundt /*
25283ecb5SPaul Mundt  * arch/sh/drivers/pci/fixups-r7780rp.c
35283ecb5SPaul Mundt  *
45283ecb5SPaul Mundt  * Highlander R7780RP-1 PCI fixups
55283ecb5SPaul Mundt  *
65283ecb5SPaul Mundt  * Copyright (C) 2003  Lineo uSolutions, Inc.
75283ecb5SPaul Mundt  * Copyright (C) 2004  Paul Mundt
85283ecb5SPaul Mundt  *
95283ecb5SPaul Mundt  * This file is subject to the terms and conditions of the GNU General Public
105283ecb5SPaul Mundt  * License.  See the file "COPYING" in the main directory of this archive
115283ecb5SPaul Mundt  * for more details.
125283ecb5SPaul Mundt  */
135283ecb5SPaul Mundt #include "pci-sh7780.h"
145283ecb5SPaul Mundt #include <asm/io.h>
155283ecb5SPaul Mundt 
165283ecb5SPaul Mundt int pci_fixup_pcic(void)
175283ecb5SPaul Mundt {
185283ecb5SPaul Mundt 	outl(0x000043ff, PCI_REG(SH7780_PCIIMR));
195283ecb5SPaul Mundt 	outl(0x0000380f, PCI_REG(SH7780_PCIAINTM));
205283ecb5SPaul Mundt 
215283ecb5SPaul Mundt 	outl(0xfbb00047, PCI_REG(SH7780_PCICMD));
225283ecb5SPaul Mundt 	outl(0x00000000, PCI_REG(SH7780_PCIIBAR));
235283ecb5SPaul Mundt 
245283ecb5SPaul Mundt 	outl(0x00011912, PCI_REG(SH7780_PCISVID));
255283ecb5SPaul Mundt 	outl(0x08000000, PCI_REG(SH7780_PCICSCR0));
265283ecb5SPaul Mundt 	outl(0x0000001b, PCI_REG(SH7780_PCICSAR0));
275283ecb5SPaul Mundt 	outl(0xfd000000, PCI_REG(SH7780_PCICSCR1));
285283ecb5SPaul Mundt 	outl(0x0000000f, PCI_REG(SH7780_PCICSAR1));
295283ecb5SPaul Mundt 
305283ecb5SPaul Mundt 	outl(0xfd000000, PCI_REG(SH7780_PCIMBR0));
315283ecb5SPaul Mundt 	outl(0x00fc0000, PCI_REG(SH7780_PCIMBMR0));
325283ecb5SPaul Mundt 
335283ecb5SPaul Mundt 	/* Set IOBR for windows containing area specified in pci.h */
345283ecb5SPaul Mundt 	outl((PCIBIOS_MIN_IO & ~(SH7780_PCI_IO_SIZE-1)), PCI_REG(SH7780_PCIIOBR));
355283ecb5SPaul Mundt 	outl(((SH7780_PCI_IO_SIZE-1) & (7<<18)), PCI_REG(SH7780_PCIIOBMR));
365283ecb5SPaul Mundt 
375283ecb5SPaul Mundt 	return 0;
385283ecb5SPaul Mundt }
395283ecb5SPaul Mundt 
40