18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * This program is free software; you can redistribute it and/or modify 48c2ecf20Sopenharmony_ci * it under the terms of the GNU General Public License, version 2, as 58c2ecf20Sopenharmony_ci * published by the Free Software Foundation. 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * This program is distributed in the hope that it will be useful, 88c2ecf20Sopenharmony_ci * but WITHOUT ANY WARRANTY; without even the implied warranty of 98c2ecf20Sopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 108c2ecf20Sopenharmony_ci * GNU General Public License for more details. 118c2ecf20Sopenharmony_ci * 128c2ecf20Sopenharmony_ci * You should have received a copy of the GNU General Public License 138c2ecf20Sopenharmony_ci * along with this program; if not, write to the Free Software 148c2ecf20Sopenharmony_ci * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 158c2ecf20Sopenharmony_ci * 168c2ecf20Sopenharmony_ci * Copyright IBM Corp. 2015 178c2ecf20Sopenharmony_ci * 188c2ecf20Sopenharmony_ci * Authors: Gavin Shan <gwshan@linux.vnet.ibm.com> 198c2ecf20Sopenharmony_ci */ 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci#ifndef _ASM_POWERPC_EEH_H 228c2ecf20Sopenharmony_ci#define _ASM_POWERPC_EEH_H 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci/* PE states */ 258c2ecf20Sopenharmony_ci#define EEH_PE_STATE_NORMAL 0 /* Normal state */ 268c2ecf20Sopenharmony_ci#define EEH_PE_STATE_RESET 1 /* PE reset asserted */ 278c2ecf20Sopenharmony_ci#define EEH_PE_STATE_STOPPED_IO_DMA 2 /* Frozen PE */ 288c2ecf20Sopenharmony_ci#define EEH_PE_STATE_STOPPED_DMA 4 /* Stopped DMA only */ 298c2ecf20Sopenharmony_ci#define EEH_PE_STATE_UNAVAIL 5 /* Unavailable */ 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci/* EEH error types and functions */ 328c2ecf20Sopenharmony_ci#define EEH_ERR_TYPE_32 0 /* 32-bits error */ 338c2ecf20Sopenharmony_ci#define EEH_ERR_TYPE_64 1 /* 64-bits error */ 348c2ecf20Sopenharmony_ci#define EEH_ERR_FUNC_MIN 0 358c2ecf20Sopenharmony_ci#define EEH_ERR_FUNC_LD_MEM_ADDR 0 /* Memory load */ 368c2ecf20Sopenharmony_ci#define EEH_ERR_FUNC_LD_MEM_DATA 1 378c2ecf20Sopenharmony_ci#define EEH_ERR_FUNC_LD_IO_ADDR 2 /* IO load */ 388c2ecf20Sopenharmony_ci#define EEH_ERR_FUNC_LD_IO_DATA 3 398c2ecf20Sopenharmony_ci#define EEH_ERR_FUNC_LD_CFG_ADDR 4 /* Config load */ 408c2ecf20Sopenharmony_ci#define EEH_ERR_FUNC_LD_CFG_DATA 5 418c2ecf20Sopenharmony_ci#define EEH_ERR_FUNC_ST_MEM_ADDR 6 /* Memory store */ 428c2ecf20Sopenharmony_ci#define EEH_ERR_FUNC_ST_MEM_DATA 7 438c2ecf20Sopenharmony_ci#define EEH_ERR_FUNC_ST_IO_ADDR 8 /* IO store */ 448c2ecf20Sopenharmony_ci#define EEH_ERR_FUNC_ST_IO_DATA 9 458c2ecf20Sopenharmony_ci#define EEH_ERR_FUNC_ST_CFG_ADDR 10 /* Config store */ 468c2ecf20Sopenharmony_ci#define EEH_ERR_FUNC_ST_CFG_DATA 11 478c2ecf20Sopenharmony_ci#define EEH_ERR_FUNC_DMA_RD_ADDR 12 /* DMA read */ 488c2ecf20Sopenharmony_ci#define EEH_ERR_FUNC_DMA_RD_DATA 13 498c2ecf20Sopenharmony_ci#define EEH_ERR_FUNC_DMA_RD_MASTER 14 508c2ecf20Sopenharmony_ci#define EEH_ERR_FUNC_DMA_RD_TARGET 15 518c2ecf20Sopenharmony_ci#define EEH_ERR_FUNC_DMA_WR_ADDR 16 /* DMA write */ 528c2ecf20Sopenharmony_ci#define EEH_ERR_FUNC_DMA_WR_DATA 17 538c2ecf20Sopenharmony_ci#define EEH_ERR_FUNC_DMA_WR_MASTER 18 548c2ecf20Sopenharmony_ci#define EEH_ERR_FUNC_DMA_WR_TARGET 19 558c2ecf20Sopenharmony_ci#define EEH_ERR_FUNC_MAX 19 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci#endif /* _ASM_POWERPC_EEH_H */ 58