summaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/pci_sun4v_asm.S
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-02-09 22:20:01 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 01:12:12 -0800
commit7eae642f75e0f7fbce7c37b2dfe0641ff1e9ebfd (patch)
treebc308c82a5670163470b44b6f339d1b379a97347 /arch/sparc64/kernel/pci_sun4v_asm.S
parentbade5622167181844cd4e60087971c1f949e149f (diff)
downloadblackbird-op-linux-7eae642f75e0f7fbce7c37b2dfe0641ff1e9ebfd.tar.gz
blackbird-op-linux-7eae642f75e0f7fbce7c37b2dfe0641ff1e9ebfd.zip
[SPARC64]: Implement SUN4V PCI config space access.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/pci_sun4v_asm.S')
-rw-r--r--arch/sparc64/kernel/pci_sun4v_asm.S48
1 files changed, 48 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/pci_sun4v_asm.S b/arch/sparc64/kernel/pci_sun4v_asm.S
index fd2fe0edf168..2f1147146abe 100644
--- a/arch/sparc64/kernel/pci_sun4v_asm.S
+++ b/arch/sparc64/kernel/pci_sun4v_asm.S
@@ -54,3 +54,51 @@ pci_sun4v_iommu_demap:
ta HV_FAST_TRAP
retl
mov %o1, %o0
+
+ /* %o0: devhandle
+ * %o1: pci_device
+ * %o2: pci_config_offset
+ * %o3: size
+ *
+ * returns %o0: data
+ *
+ * If there is an error, the data will be returned
+ * as all 1's.
+ */
+ .globl pci_sun4v_config_get
+pci_sun4v_config_get:
+ mov %o3, %o4
+ mov %o2, %o3
+ mov %o1, %o2
+ mov %o0, %o1
+ mov HV_FAST_PCI_CONFIG_GET, %o0
+ ta HV_FAST_TRAP
+ brnz,a,pn %o1, 1f
+ mov -1, %o2
+1: retl
+ mov %o2, %o0
+
+ /* %o0: devhandle
+ * %o1: pci_device
+ * %o2: pci_config_offset
+ * %o3: size
+ * %o4: data
+ *
+ * returns %o0: status
+ *
+ * status will be zero if the operation completed
+ * successfully, else -1 if not
+ */
+ .globl pci_sun4v_config_put
+pci_sun4v_config_put:
+ mov %o3, %o4
+ mov %o2, %o3
+ mov %o1, %o2
+ mov %o0, %o1
+ mov HV_FAST_PCI_CONFIG_PUT, %o0
+ ta HV_FAST_TRAP
+ brnz,a,pn %o1, 1f
+ mov -1, %o1
+1: retl
+ mov %o1, %o0
+
OpenPOWER on IntegriCloud