From 5d171050e28f823aeb040f2830da4d3422b54b63 Mon Sep 17 00:00:00 2001 From: Jag Raman Date: Tue, 15 Aug 2017 17:03:00 -0400 Subject: 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 Reviewed-by: Liam Merwick Reviewed-by: Shannon Nelson Signed-off-by: David S. Miller --- arch/sparc/include/asm/vio.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'arch/sparc/include/asm/vio.h') 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); -- cgit v1.2.3