1b8b572e1SStephen Rothwell /* 2b8b572e1SStephen Rothwell * hvcserver.h 3b8b572e1SStephen Rothwell * Copyright (C) 2004 Ryan S Arnold, IBM Corporation 4b8b572e1SStephen Rothwell * 5b8b572e1SStephen Rothwell * PPC64 virtual I/O console server support. 6b8b572e1SStephen Rothwell * 7b8b572e1SStephen Rothwell * This program is free software; you can redistribute it and/or modify 8b8b572e1SStephen Rothwell * it under the terms of the GNU General Public License as published by 9b8b572e1SStephen Rothwell * the Free Software Foundation; either version 2 of the License, or 10b8b572e1SStephen Rothwell * (at your option) any later version. 11b8b572e1SStephen Rothwell * 12b8b572e1SStephen Rothwell * This program is distributed in the hope that it will be useful, 13b8b572e1SStephen Rothwell * but WITHOUT ANY WARRANTY; without even the implied warranty of 14b8b572e1SStephen Rothwell * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15b8b572e1SStephen Rothwell * GNU General Public License for more details. 16b8b572e1SStephen Rothwell * 17b8b572e1SStephen Rothwell * You should have received a copy of the GNU General Public License 18b8b572e1SStephen Rothwell * along with this program; if not, write to the Free Software 19b8b572e1SStephen Rothwell * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20b8b572e1SStephen Rothwell */ 21b8b572e1SStephen Rothwell 22b8b572e1SStephen Rothwell #ifndef _PPC64_HVCSERVER_H 23b8b572e1SStephen Rothwell #define _PPC64_HVCSERVER_H 24b8b572e1SStephen Rothwell #ifdef __KERNEL__ 25b8b572e1SStephen Rothwell 26b8b572e1SStephen Rothwell #include <linux/list.h> 27b8b572e1SStephen Rothwell 28b8b572e1SStephen Rothwell /* Converged Location Code length */ 29b8b572e1SStephen Rothwell #define HVCS_CLC_LENGTH 79 30b8b572e1SStephen Rothwell 31b8b572e1SStephen Rothwell /** 32b8b572e1SStephen Rothwell * hvcs_partner_info - an element in a list of partner info 33b8b572e1SStephen Rothwell * @node: list_head denoting this partner_info struct's position in the list of 34b8b572e1SStephen Rothwell * partner info. 35b8b572e1SStephen Rothwell * @unit_address: The partner unit address of this entry. 36b8b572e1SStephen Rothwell * @partition_ID: The partner partition ID of this entry. 37b8b572e1SStephen Rothwell * @location_code: The converged location code of this entry + 1 char for the 38b8b572e1SStephen Rothwell * null-term. 39b8b572e1SStephen Rothwell * 40b8b572e1SStephen Rothwell * This structure outlines the format that partner info is presented to a caller 41b8b572e1SStephen Rothwell * of the hvcs partner info fetching functions. These are strung together into 42b8b572e1SStephen Rothwell * a list using linux kernel lists. 43b8b572e1SStephen Rothwell */ 44b8b572e1SStephen Rothwell struct hvcs_partner_info { 45b8b572e1SStephen Rothwell struct list_head node; 46b8b572e1SStephen Rothwell uint32_t unit_address; 47b8b572e1SStephen Rothwell uint32_t partition_ID; 48b8b572e1SStephen Rothwell char location_code[HVCS_CLC_LENGTH + 1]; /* CLC + 1 null-term char */ 49b8b572e1SStephen Rothwell }; 50b8b572e1SStephen Rothwell 51b8b572e1SStephen Rothwell extern int hvcs_free_partner_info(struct list_head *head); 52b8b572e1SStephen Rothwell extern int hvcs_get_partner_info(uint32_t unit_address, 53b8b572e1SStephen Rothwell struct list_head *head, unsigned long *pi_buff); 54b8b572e1SStephen Rothwell extern int hvcs_register_connection(uint32_t unit_address, 55b8b572e1SStephen Rothwell uint32_t p_partition_ID, uint32_t p_unit_address); 56b8b572e1SStephen Rothwell extern int hvcs_free_connection(uint32_t unit_address); 57b8b572e1SStephen Rothwell 58b8b572e1SStephen Rothwell #endif /* __KERNEL__ */ 59b8b572e1SStephen Rothwell #endif /* _PPC64_HVCSERVER_H */ 60