1*e2be04c7SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2ed3e81ffSGavin Shan /* 3ed3e81ffSGavin Shan * This program is free software; you can redistribute it and/or modify 4ed3e81ffSGavin Shan * it under the terms of the GNU General Public License, version 2, as 5ed3e81ffSGavin Shan * published by the Free Software Foundation. 6ed3e81ffSGavin Shan * 7ed3e81ffSGavin Shan * This program is distributed in the hope that it will be useful, 8ed3e81ffSGavin Shan * but WITHOUT ANY WARRANTY; without even the implied warranty of 9ed3e81ffSGavin Shan * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10ed3e81ffSGavin Shan * GNU General Public License for more details. 11ed3e81ffSGavin Shan * 12ed3e81ffSGavin Shan * You should have received a copy of the GNU General Public License 13ed3e81ffSGavin Shan * along with this program; if not, write to the Free Software 14ed3e81ffSGavin Shan * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15ed3e81ffSGavin Shan * 16ed3e81ffSGavin Shan * Copyright IBM Corp. 2015 17ed3e81ffSGavin Shan * 18ed3e81ffSGavin Shan * Authors: Gavin Shan <gwshan@linux.vnet.ibm.com> 19ed3e81ffSGavin Shan */ 20ed3e81ffSGavin Shan 21ed3e81ffSGavin Shan #ifndef _ASM_POWERPC_EEH_H 22ed3e81ffSGavin Shan #define _ASM_POWERPC_EEH_H 23ed3e81ffSGavin Shan 24ed3e81ffSGavin Shan /* PE states */ 25ed3e81ffSGavin Shan #define EEH_PE_STATE_NORMAL 0 /* Normal state */ 26ed3e81ffSGavin Shan #define EEH_PE_STATE_RESET 1 /* PE reset asserted */ 27ed3e81ffSGavin Shan #define EEH_PE_STATE_STOPPED_IO_DMA 2 /* Frozen PE */ 28ed3e81ffSGavin Shan #define EEH_PE_STATE_STOPPED_DMA 4 /* Stopped DMA only */ 29ed3e81ffSGavin Shan #define EEH_PE_STATE_UNAVAIL 5 /* Unavailable */ 30ed3e81ffSGavin Shan 31ec33d36eSGavin Shan /* EEH error types and functions */ 32ec33d36eSGavin Shan #define EEH_ERR_TYPE_32 0 /* 32-bits error */ 33ec33d36eSGavin Shan #define EEH_ERR_TYPE_64 1 /* 64-bits error */ 34ec33d36eSGavin Shan #define EEH_ERR_FUNC_MIN 0 35ec33d36eSGavin Shan #define EEH_ERR_FUNC_LD_MEM_ADDR 0 /* Memory load */ 36ec33d36eSGavin Shan #define EEH_ERR_FUNC_LD_MEM_DATA 1 37ec33d36eSGavin Shan #define EEH_ERR_FUNC_LD_IO_ADDR 2 /* IO load */ 38ec33d36eSGavin Shan #define EEH_ERR_FUNC_LD_IO_DATA 3 39ec33d36eSGavin Shan #define EEH_ERR_FUNC_LD_CFG_ADDR 4 /* Config load */ 40ec33d36eSGavin Shan #define EEH_ERR_FUNC_LD_CFG_DATA 5 41ec33d36eSGavin Shan #define EEH_ERR_FUNC_ST_MEM_ADDR 6 /* Memory store */ 42ec33d36eSGavin Shan #define EEH_ERR_FUNC_ST_MEM_DATA 7 43ec33d36eSGavin Shan #define EEH_ERR_FUNC_ST_IO_ADDR 8 /* IO store */ 44ec33d36eSGavin Shan #define EEH_ERR_FUNC_ST_IO_DATA 9 45ec33d36eSGavin Shan #define EEH_ERR_FUNC_ST_CFG_ADDR 10 /* Config store */ 46ec33d36eSGavin Shan #define EEH_ERR_FUNC_ST_CFG_DATA 11 47ec33d36eSGavin Shan #define EEH_ERR_FUNC_DMA_RD_ADDR 12 /* DMA read */ 48ec33d36eSGavin Shan #define EEH_ERR_FUNC_DMA_RD_DATA 13 49ec33d36eSGavin Shan #define EEH_ERR_FUNC_DMA_RD_MASTER 14 50ec33d36eSGavin Shan #define EEH_ERR_FUNC_DMA_RD_TARGET 15 51ec33d36eSGavin Shan #define EEH_ERR_FUNC_DMA_WR_ADDR 16 /* DMA write */ 52ec33d36eSGavin Shan #define EEH_ERR_FUNC_DMA_WR_DATA 17 53ec33d36eSGavin Shan #define EEH_ERR_FUNC_DMA_WR_MASTER 18 54ec33d36eSGavin Shan #define EEH_ERR_FUNC_DMA_WR_TARGET 19 55ec33d36eSGavin Shan #define EEH_ERR_FUNC_MAX 19 56ec33d36eSGavin Shan 57ed3e81ffSGavin Shan #endif /* _ASM_POWERPC_EEH_H */ 58