Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305381
b: refs/heads/master
c: f2ab621
h: refs/heads/master
i:
  305379: d2e113c
v: v3
  • Loading branch information
Kent Yoder authored and Benjamin Herrenschmidt committed May 14, 2012
1 parent 34a2b1e commit 844ce3f
Show file tree
Hide file tree
Showing 3 changed files with 281 additions and 40 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4726b7b5e5a0a3d11a3c80ae8e2d5395003c51af
refs/heads/master: f2ab6219969fcb79dca6792a484b0bdc95ab1f81
46 changes: 46 additions & 0 deletions trunk/arch/powerpc/include/asm/vio.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,48 @@

struct iommu_table;

/*
* Platform Facilities Option (PFO)-specific data
*/

/* Starting unit address for PFO devices on the VIO BUS */
#define VIO_BASE_PFO_UA 0x50000000

/**
* vio_pfo_op - PFO operation parameters
*
* @flags: h_call subfunctions and modifiers
* @in: Input data block logical real address
* @inlen: If non-negative, the length of the input data block. If negative,
* the length of the input data descriptor list in bytes.
* @out: Output data block logical real address
* @outlen: If non-negative, the length of the input data block. If negative,
* the length of the input data descriptor list in bytes.
* @csbcpb: Logical real address of the 4k naturally-aligned storage block
* containing the CSB & optional FC field specific CPB
* @timeout: # of milliseconds to retry h_call, 0 for no timeout.
* @hcall_err: pointer to return the h_call return value, else NULL
*/
struct vio_pfo_op {
u64 flags;
s64 in;
s64 inlen;
s64 out;
s64 outlen;
u64 csbcpb;
void *done;
unsigned long handle;
unsigned int timeout;
long hcall_err;
};

/* End PFO specific data */

enum vio_dev_family {
VDEVICE, /* The OF node is a child of /vdevice */
PFO, /* The OF node is a child of /ibm,platform-facilities */
};

/**
* vio_dev - This structure is used to describe virtual I/O devices.
*
Expand All @@ -58,13 +100,15 @@ struct vio_dev {
const char *name;
const char *type;
uint32_t unit_address;
uint32_t resource_id;
unsigned int irq;
struct {
size_t desired;
size_t entitled;
size_t allocated;
atomic_t allocs_failed;
} cmo;
enum vio_dev_family family;
struct device dev;
};

Expand Down Expand Up @@ -95,6 +139,8 @@ extern void vio_cmo_set_dev_desired(struct vio_dev *viodev, size_t desired);

extern void __devinit vio_unregister_device(struct vio_dev *dev);

extern int vio_h_cop_sync(struct vio_dev *vdev, struct vio_pfo_op *op);

struct device_node;

extern struct vio_dev *vio_register_device_node(
Expand Down
Loading

0 comments on commit 844ce3f

Please sign in to comment.