wdenk | c7de829 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 1 | #include "macros.h" |
| 2 | |
wdenk | c7de829 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 3 | |
| 4 | .globl pci_read_cfg_byte |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 5 | |
wdenk | c7de829 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 6 | pci_read_cfg_byte: |
| 7 | config_addr |
| 8 | config_data 3 |
| 9 | eieio |
| 10 | sync |
| 11 | lbz r3, 0(r9) |
| 12 | blr |
| 13 | |
wdenk | c7de829 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 14 | |
| 15 | .globl pci_write_cfg_byte |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 16 | |
| 17 | pci_write_cfg_byte: |
wdenk | c7de829 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 18 | config_addr |
| 19 | config_data 3 |
| 20 | stb r6, 0(r9) |
| 21 | eieio |
| 22 | sync |
| 23 | blr |
| 24 | |
| 25 | |
wdenk | c7de829 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 26 | .globl pci_read_cfg_word |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 27 | |
wdenk | c7de829 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 28 | pci_read_cfg_word: |
| 29 | config_addr |
| 30 | config_data 2 |
| 31 | lhbrx r3, 0, r9 |
| 32 | eieio |
| 33 | sync |
| 34 | blr |
| 35 | |
| 36 | |
wdenk | c7de829 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 37 | .globl pci_write_cfg_word |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 38 | |
wdenk | c7de829 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 39 | pci_write_cfg_word: |
| 40 | config_addr |
| 41 | config_data 2 |
| 42 | sthbrx r6, 0, r9 |
| 43 | eieio |
| 44 | sync |
| 45 | blr |
| 46 | |
wdenk | c7de829 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 47 | |
| 48 | .globl pci_read_cfg_long |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 49 | |
wdenk | c7de829 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 50 | pci_read_cfg_long: |
| 51 | config_addr |
| 52 | config_data 0 |
| 53 | lwbrx r3, 0, r9 |
| 54 | eieio |
| 55 | sync |
| 56 | blr |
| 57 | |
| 58 | |
wdenk | c7de829 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 59 | .globl pci_write_cfg_long |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame^] | 60 | |
wdenk | c7de829 | 2002-11-19 11:04:11 +0000 | [diff] [blame] | 61 | pci_write_cfg_long: |
| 62 | config_addr |
| 63 | config_data 0 |
| 64 | stwbrx r6, 0, r9 |
| 65 | eieio |
| 66 | sync |
| 67 | blr |