2 * SPDX-License-Identifier: GPL-2.0 ibm-pibs
4 /*----------------------------------------------------------------------------- */
5 /* Function: ext_bus_cntlr_init */
6 /* Description: Initializes the External Bus Controller for the external */
7 /* peripherals. IMPORTANT: For pass1 this code must run from */
8 /* cache since you can not reliably change a peripheral banks */
9 /* timing register (pbxap) while running code from that bank. */
10 /* For ex., since we are running from ROM on bank 0, we can NOT */
11 /* execute the code that modifies bank 0 timings from ROM, so */
12 /* we run it from cache. */
13 /* Bank 0 - Flash and SRAM */
14 /* Bank 1 - NVRAM/RTC */
15 /* Bank 2 - Keyboard/Mouse controller */
16 /* Bank 3 - IR controller */
17 /* Bank 4 - not used */
18 /* Bank 5 - not used */
19 /* Bank 6 - not used */
20 /* Bank 7 - FPGA registers */
21 /*----------------------------------------------------------------------------- */
22 #include <asm/ppc4xx.h>
24 #include <ppc_asm.tmpl>
27 #include <asm/cache.h>
31 .globl write_without_sync
34 * Write one values to host via pci busmastering
35 * ptr = 0xc0000000 -> 0x01000000 (PCI)
48 * ptr = (volatile unsigned long *)addr;
55 * One pci config write
56 * ibmPciConfigWrite(0x2e, 2, 0x1234);
71 blr /* never reached !!!! */
73 .globl write_with_sync
76 * Write one values to host via pci busmastering
77 * ptr = 0xc0000000 -> 0x01000000 (PCI)
90 * ptr = (volatile unsigned long *)addr;
97 * One pci config write
98 * ibmPciConfigWrite(0x2e, 2, 0x1234);
115 blr /* never reached !!!! */
117 .globl write_with_less_sync
118 write_with_less_sync:
120 * Write one values to host via pci busmastering
121 * ptr = 0xc0000000 -> 0x01000000 (PCI)
133 * Read one value back
134 * ptr = (volatile unsigned long *)addr;
141 * One pci config write
142 * ibmPciConfigWrite(0x2e, 2, 0x1234);
159 blr /* never reached !!!! */
161 .globl write_with_more_sync
162 write_with_more_sync:
164 * Write one values to host via pci busmastering
165 * ptr = 0xc0000000 -> 0x01000000 (PCI)
178 * Read one value back
179 * ptr = (volatile unsigned long *)addr;
187 * One pci config write
188 * ibmPciConfigWrite(0x2e, 2, 0x1234);
190 /* subsystem id (PCIC0_SBSYSVID)*/
205 blr /* never reached !!!! */