diff options
author | Jag Raman <jag.raman@oracle.com> | 2017-08-15 17:03:00 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-15 21:33:51 -0700 |
commit | 5d171050e28f823aeb040f2830da4d3422b54b63 (patch) | |
tree | 0a33555a897bb343261d0b066079e7f7d479ef1e /arch/sparc/include/asm/vio.h | |
parent | ce808b746325975192d8cd1d29f1ec03d5b6b0fc (diff) | |
download | linux-5d171050e28f823aeb040f2830da4d3422b54b63.tar.bz2 |
sparc64: vcc: Enable VCC port probe and removal
Enables VCC port probe and removal to initialize and terminate
VCC ports respectively. When a device/port matching the VCC driver
is added, the probe function is invoked along with a reference
to the device. remove function is called when the device is
removed.
Also add APIs to cache and retrieve VCC ports from a VCC table
Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include/asm/vio.h')
-rw-r--r-- | arch/sparc/include/asm/vio.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/sparc/include/asm/vio.h b/arch/sparc/include/asm/vio.h index d1c47e9f0090..f3d4ac232690 100644 --- a/arch/sparc/include/asm/vio.h +++ b/arch/sparc/include/asm/vio.h @@ -52,6 +52,7 @@ struct vio_ver_info { #define VDEV_NETWORK_SWITCH 0x02 #define VDEV_DISK 0x03 #define VDEV_DISK_SERVER 0x04 +#define VDEV_CONSOLE_CON 0x05 u8 resv1[3]; u64 resv2[5]; @@ -282,6 +283,14 @@ struct vio_dring_state { struct ldc_trans_cookie cookies[VIO_MAX_RING_COOKIES]; }; +#define VIO_TAG_SIZE ((int)sizeof(struct vio_msg_tag)) +#define VIO_VCC_MTU_SIZE (LDC_PACKET_SIZE - VIO_TAG_SIZE) + +struct vio_vcc { + struct vio_msg_tag tag; + char data[VIO_VCC_MTU_SIZE]; +}; + static inline void *vio_dring_cur(struct vio_dring_state *dr) { return dr->base + (dr->entry_size * dr->prod); |