diff options
Diffstat (limited to 'arch/powerpc/include/asm/vio.h')
-rw-r--r-- | arch/powerpc/include/asm/vio.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/vio.h b/arch/powerpc/include/asm/vio.h index 6bfd5ffe1d4f..b19adf751dd9 100644 --- a/arch/powerpc/include/asm/vio.h +++ b/arch/powerpc/include/asm/vio.h | |||
@@ -46,6 +46,48 @@ | |||
46 | 46 | ||
47 | struct iommu_table; | 47 | struct iommu_table; |
48 | 48 | ||
49 | /* | ||
50 | * Platform Facilities Option (PFO)-specific data | ||
51 | */ | ||
52 | |||
53 | /* Starting unit address for PFO devices on the VIO BUS */ | ||
54 | #define VIO_BASE_PFO_UA 0x50000000 | ||
55 | |||
56 | /** | ||
57 | * vio_pfo_op - PFO operation parameters | ||
58 | * | ||
59 | * @flags: h_call subfunctions and modifiers | ||
60 | * @in: Input data block logical real address | ||
61 | * @inlen: If non-negative, the length of the input data block. If negative, | ||
62 | * the length of the input data descriptor list in bytes. | ||
63 | * @out: Output data block logical real address | ||
64 | * @outlen: If non-negative, the length of the input data block. If negative, | ||
65 | * the length of the input data descriptor list in bytes. | ||
66 | * @csbcpb: Logical real address of the 4k naturally-aligned storage block | ||
67 | * containing the CSB & optional FC field specific CPB | ||
68 | * @timeout: # of milliseconds to retry h_call, 0 for no timeout. | ||
69 | * @hcall_err: pointer to return the h_call return value, else NULL | ||
70 | */ | ||
71 | struct vio_pfo_op { | ||
72 | u64 flags; | ||
73 | s64 in; | ||
74 | s64 inlen; | ||
75 | s64 out; | ||
76 | s64 outlen; | ||
77 | u64 csbcpb; | ||
78 | void *done; | ||
79 | unsigned long handle; | ||
80 | unsigned int timeout; | ||
81 | long hcall_err; | ||
82 | }; | ||
83 | |||
84 | /* End PFO specific data */ | ||
85 | |||
86 | enum vio_dev_family { | ||
87 | VDEVICE, /* The OF node is a child of /vdevice */ | ||
88 | PFO, /* The OF node is a child of /ibm,platform-facilities */ | ||
89 | }; | ||
90 | |||
49 | /** | 91 | /** |
50 | * vio_dev - This structure is used to describe virtual I/O devices. | 92 | * vio_dev - This structure is used to describe virtual I/O devices. |
51 | * | 93 | * |
@@ -58,6 +100,7 @@ struct vio_dev { | |||
58 | const char *name; | 100 | const char *name; |
59 | const char *type; | 101 | const char *type; |
60 | uint32_t unit_address; | 102 | uint32_t unit_address; |
103 | uint32_t resource_id; | ||
61 | unsigned int irq; | 104 | unsigned int irq; |
62 | struct { | 105 | struct { |
63 | size_t desired; | 106 | size_t desired; |
@@ -65,6 +108,7 @@ struct vio_dev { | |||
65 | size_t allocated; | 108 | size_t allocated; |
66 | atomic_t allocs_failed; | 109 | atomic_t allocs_failed; |
67 | } cmo; | 110 | } cmo; |
111 | enum vio_dev_family family; | ||
68 | struct device dev; | 112 | struct device dev; |
69 | }; | 113 | }; |
70 | 114 | ||
@@ -95,6 +139,8 @@ extern void vio_cmo_set_dev_desired(struct vio_dev *viodev, size_t desired); | |||
95 | 139 | ||
96 | extern void __devinit vio_unregister_device(struct vio_dev *dev); | 140 | extern void __devinit vio_unregister_device(struct vio_dev *dev); |
97 | 141 | ||
142 | extern int vio_h_cop_sync(struct vio_dev *vdev, struct vio_pfo_op *op); | ||
143 | |||
98 | struct device_node; | 144 | struct device_node; |
99 | 145 | ||
100 | extern struct vio_dev *vio_register_device_node( | 146 | extern struct vio_dev *vio_register_device_node( |