162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * hvcserver.h 462306a36Sopenharmony_ci * Copyright (C) 2004 Ryan S Arnold, IBM Corporation 562306a36Sopenharmony_ci * 662306a36Sopenharmony_ci * PPC64 virtual I/O console server support. 762306a36Sopenharmony_ci */ 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci#ifndef _PPC64_HVCSERVER_H 1062306a36Sopenharmony_ci#define _PPC64_HVCSERVER_H 1162306a36Sopenharmony_ci#ifdef __KERNEL__ 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci#include <linux/list.h> 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ci/* Converged Location Code length */ 1662306a36Sopenharmony_ci#define HVCS_CLC_LENGTH 79 1762306a36Sopenharmony_ci 1862306a36Sopenharmony_ci/** 1962306a36Sopenharmony_ci * hvcs_partner_info - an element in a list of partner info 2062306a36Sopenharmony_ci * @node: list_head denoting this partner_info struct's position in the list of 2162306a36Sopenharmony_ci * partner info. 2262306a36Sopenharmony_ci * @unit_address: The partner unit address of this entry. 2362306a36Sopenharmony_ci * @partition_ID: The partner partition ID of this entry. 2462306a36Sopenharmony_ci * @location_code: The converged location code of this entry + 1 char for the 2562306a36Sopenharmony_ci * null-term. 2662306a36Sopenharmony_ci * 2762306a36Sopenharmony_ci * This structure outlines the format that partner info is presented to a caller 2862306a36Sopenharmony_ci * of the hvcs partner info fetching functions. These are strung together into 2962306a36Sopenharmony_ci * a list using linux kernel lists. 3062306a36Sopenharmony_ci */ 3162306a36Sopenharmony_cistruct hvcs_partner_info { 3262306a36Sopenharmony_ci struct list_head node; 3362306a36Sopenharmony_ci uint32_t unit_address; 3462306a36Sopenharmony_ci uint32_t partition_ID; 3562306a36Sopenharmony_ci char location_code[HVCS_CLC_LENGTH + 1]; /* CLC + 1 null-term char */ 3662306a36Sopenharmony_ci}; 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ciextern int hvcs_free_partner_info(struct list_head *head); 3962306a36Sopenharmony_ciextern int hvcs_get_partner_info(uint32_t unit_address, 4062306a36Sopenharmony_ci struct list_head *head, unsigned long *pi_buff); 4162306a36Sopenharmony_ciextern int hvcs_register_connection(uint32_t unit_address, 4262306a36Sopenharmony_ci uint32_t p_partition_ID, uint32_t p_unit_address); 4362306a36Sopenharmony_ciextern int hvcs_free_connection(uint32_t unit_address); 4462306a36Sopenharmony_ci 4562306a36Sopenharmony_ci#endif /* __KERNEL__ */ 4662306a36Sopenharmony_ci#endif /* _PPC64_HVCSERVER_H */ 47