1 // SPDX-License-Identifier: GPL-2.0+
3 * SH4 PCI Controller (PCIC) for U-Boot.
4 * (C) Dustin McIntire (dustin@sensoria.com)
5 * (C) 2007,2008 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 * (C) 2008 Yusuke Goda <goda.yusuke@renesas.com>
8 * u-boot/arch/sh/cpu/sh4/pci-sh4.c
13 #include <asm/processor.h>
18 int pci_sh4_init(struct pci_controller *hose)
20 hose->first_busno = 0;
21 hose->region_count = 0;
22 hose->last_busno = 0xff;
24 /* PCI memory space */
25 pci_set_region(hose->regions + 0,
33 pci_set_region(hose->regions + 1,
40 #if defined(CONFIG_PCI_SYS_BUS)
41 /* PCI System Memory space */
42 pci_set_region(hose->regions + 2,
46 PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
53 pci_hose_read_config_byte_via_dword,
54 pci_hose_read_config_word_via_dword,
55 pci_sh4_read_config_dword,
56 pci_hose_write_config_byte_via_dword,
57 pci_hose_write_config_word_via_dword,
58 pci_sh4_write_config_dword);
60 pci_register_hose(hose);
64 #ifdef CONFIG_PCI_SCAN_SHOW
65 printf("PCI: Bus Dev VenId DevId Class Int\n");
67 hose->last_busno = pci_hose_scan(hose);
71 int pci_skip_dev(struct pci_controller *hose, pci_dev_t dev)
76 #ifdef CONFIG_PCI_SCAN_SHOW
77 int pci_print_dev(struct pci_controller *hose, pci_dev_t dev)
81 #endif /* CONFIG_PCI_SCAN_SHOW */