Loading...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | /* * * Copyright (c) 2000 Grant Erickson <grant@borg.umn.edu> * All rights reserved. * * Module name: galaxy_pci.c * * Description: * PCI interface code for the IBM PowerPC 405GP on-chip PCI bus * interface. * * Why is this file called "galaxy_pci"? Because on the original * IBM "Walnut" evaluation board schematic I have, the 405GP is * is labeled "GALAXY". * */ #include <linux/kernel.h> #include <linux/pci.h> #include <linux/string.h> #include <linux/init.h> #include <asm/processor.h> #include <asm/system.h> #include <asm/io.h> #include <asm/machdep.h> #include "pci.h" /* Preprocessor Defines */ #define PCICFGADDR (volatile unsigned int *)(0xEEC00000) #define PCICFGDATA (volatile unsigned int *)(0xEEC00004) /* Function Prototypes */ void __init galaxy_pcibios_fixup(void) { } static int galaxy_pcibios_read_config_byte(struct pci_controller* hose, u8 bus, u8 dev, u8 offset, u8 *val) { return (PCIBIOS_SUCCESSFUL); } static int galaxy_pcibios_read_config_word(struct pci_controller* hose, u8 bus, u8 dev, u8 offset, u16 *val) { return (PCIBIOS_SUCCESSFUL); } static int galaxy_pcibios_read_config_dword(struct pci_controller* hose, u8 bus, u8 dev, u8 offset, u32 *val) { return (PCIBIOS_SUCCESSFUL); } static int galaxy_pcibios_write_config_byte(struct pci_controller* hose, u8 bus, u8 dev, u8 offset, u8 val) { return (PCIBIOS_SUCCESSFUL); } static int galaxy_pcibios_write_config_word(struct pci_controller* hose, u8 bus, u8 dev, u8 offset, u16 val) { return (PCIBIOS_SUCCESSFUL); } static int galaxy_pcibios_write_config_dword(struct pci_controller* hose, u8 bus, u8 dev, u8 offset, u32 val) { return (PCIBIOS_SUCCESSFUL); } static struct pci_controller_ops galaxy_pci_ops = { galaxy_pcibios_read_config_byte, galaxy_pcibios_read_config_word, galaxy_pcibios_read_config_dword, galaxy_pcibios_write_config_byte, galaxy_pcibios_write_config_word, galaxy_pcibios_write_config_dword }; void __init galaxy_find_bridges(void) { struct pci_controller* hose; set_config_access_method(galaxy); ppc_md.pcibios_fixup = galaxy_pcibios_fixup; hose = pcibios_alloc_controller(); if (!hose) return; hose->ops = &galaxy_pci_ops; /* Todo ... hose->cfg_data = ioremap(PCICFGDATA, ...); hose->cfg_addr = ioremap(PCICFGADDR, ...); */ } |