blob: 980d343556e28e5412af4850f44d86dec5aa6782 [file] [log] [blame]
wdenkc7de8292002-11-19 11:04:11 +00001#include "macros.h"
2
wdenkc7de8292002-11-19 11:04:11 +00003
4 .globl pci_read_cfg_byte
wdenk8bde7f72003-06-27 21:31:46 +00005
wdenkc7de8292002-11-19 11:04:11 +00006pci_read_cfg_byte:
7 config_addr
8 config_data 3
9 eieio
10 sync
11 lbz r3, 0(r9)
12 blr
13
wdenkc7de8292002-11-19 11:04:11 +000014
15 .globl pci_write_cfg_byte
wdenk8bde7f72003-06-27 21:31:46 +000016
17pci_write_cfg_byte:
wdenkc7de8292002-11-19 11:04:11 +000018 config_addr
19 config_data 3
20 stb r6, 0(r9)
21 eieio
22 sync
23 blr
24
25
wdenkc7de8292002-11-19 11:04:11 +000026 .globl pci_read_cfg_word
wdenk8bde7f72003-06-27 21:31:46 +000027
wdenkc7de8292002-11-19 11:04:11 +000028pci_read_cfg_word:
29 config_addr
30 config_data 2
31 lhbrx r3, 0, r9
32 eieio
33 sync
34 blr
35
36
wdenkc7de8292002-11-19 11:04:11 +000037 .globl pci_write_cfg_word
wdenk8bde7f72003-06-27 21:31:46 +000038
wdenkc7de8292002-11-19 11:04:11 +000039pci_write_cfg_word:
40 config_addr
41 config_data 2
42 sthbrx r6, 0, r9
43 eieio
44 sync
45 blr
46
wdenkc7de8292002-11-19 11:04:11 +000047
48 .globl pci_read_cfg_long
wdenk8bde7f72003-06-27 21:31:46 +000049
wdenkc7de8292002-11-19 11:04:11 +000050pci_read_cfg_long:
51 config_addr
52 config_data 0
53 lwbrx r3, 0, r9
54 eieio
55 sync
56 blr
57
58
wdenkc7de8292002-11-19 11:04:11 +000059 .globl pci_write_cfg_long
wdenk8bde7f72003-06-27 21:31:46 +000060
wdenkc7de8292002-11-19 11:04:11 +000061pci_write_cfg_long:
62 config_addr
63 config_data 0
64 stwbrx r6, 0, r9
65 eieio
66 sync
67 blr