From patchwork Fri Feb 10 09:04:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lombard X-Patchwork-Id: 726442 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vKTYY26n6z9s2G for ; Fri, 10 Feb 2017 20:05:21 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3vKTYY1BXFzDq5s for ; Fri, 10 Feb 2017 20:05:21 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3vKTY95LGMzDqC0 for ; Fri, 10 Feb 2017 20:05:01 +1100 (AEDT) Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v1A8x47d062511 for ; Fri, 10 Feb 2017 04:04:58 -0500 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0b-001b2d01.pphosted.com with ESMTP id 28gr4ek3hr-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 10 Feb 2017 04:04:58 -0500 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 10 Feb 2017 09:04:56 -0000 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 10 Feb 2017 09:04:54 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id B40BB17D8042 for ; Fri, 10 Feb 2017 09:07:58 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v1A94RU712124620; Fri, 10 Feb 2017 09:04:27 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6D0DFA405E; Fri, 10 Feb 2017 09:04:24 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C8F21A4059; Fri, 10 Feb 2017 09:04:23 +0000 (GMT) Received: from lombard-w520.ibm.com (unknown [9.164.182.111]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 10 Feb 2017 09:04:23 +0000 (GMT) From: Christophe Lombard To: skiboot@lists.ozlabs.org, fbarrat@linux.vnet.ibm.com, imunsie@au1.ibm.com, andrew.donnellan@au1.ibm.com, christophe_lombard@fr.ibm.com Date: Fri, 10 Feb 2017 10:04:20 +0100 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1486717462-5016-1-git-send-email-clombard@linux.vnet.ibm.com> References: <1486717462-5016-1-git-send-email-clombard@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17021009-0020-0000-0000-00000303FBD6 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17021009-0021-0000-0000-00004057835C Message-Id: <1486717462-5016-3-git-send-email-clombard@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-02-10_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1702100090 Subject: [Skiboot] [PATCH 2/4] capi: Move phb3 capp registers to specialized files X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" The definitions of the CAPP registers for PHB3 are moved in a specific file. The updated file capp.h will be used for the common functionalities about the CAPP for PHB3 and PHB4. Signed-off-by: Christophe Lombard Reviewed-by: Andrew Donnellan --- core/hmi.c | 2 +- hw/phb3.c | 1 + include/capp.h | 29 ----------------------------- include/phb3-capp.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 52 insertions(+), 30 deletions(-) create mode 100644 include/phb3-capp.h diff --git a/core/hmi.c b/core/hmi.c index 6fe060d..eb43807 100644 --- a/core/hmi.c +++ b/core/hmi.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/hw/phb3.c b/hw/phb3.c index 4010739..f0e957c 100644 --- a/hw/phb3.c +++ b/hw/phb3.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include diff --git a/include/capp.h b/include/capp.h index c76258b..d0c28c9 100644 --- a/include/capp.h +++ b/include/capp.h @@ -62,33 +62,4 @@ enum capp_reg { apc_master_powerbus_ctrl = 0xB }; -#define CAPP_SNP_ARRAY_ADDR_REG 0x2013028 -#define CAPP_APC_MASTER_ARRAY_ADDR_REG 0x201302A -#define CAPP_SNP_ARRAY_WRITE_REG 0x2013801 -#define CAPP_APC_MASTER_ARRAY_WRITE_REG 0x2013802 - -#define CAPP_FIR 0x2013000 -#define CAPP_ERR_RPT_CLR 0x2013013 -#define APC_MASTER_PB_CTRL 0x2013018 -#define APC_MASTER_CAPI_CTRL 0x2013019 -#define TRANSPORT_CONTROL 0x201301C -#define CANNED_PRESP_MAP0 0x201301D -#define CANNED_PRESP_MAP1 0x201301E -#define CANNED_PRESP_MAP2 0x201301F -#define CAPP_ERR_STATUS_CTRL 0x201300E -#define FLUSH_SUE_STATE_MAP 0x201300F -#define CAPP_TB 0x2013026 -#define CAPP_TFMR 0x2013027 -#define CAPP_EPOCH_TIMER_CTRL 0x201302C -#define FLUSH_UOP_CONFIG1 0x2013803 -#define FLUSH_UOP_CONFIG2 0x2013804 -#define SNOOP_CAPI_CONFIG 0x201301A - -/* - * Naples has two CAPP units, statically mapped: - * CAPP0 attached to PHB0, and CAPP1 attached to PHB1. - * The addresses of CAPP1 XSCOMS registers are 0x180 away. - */ -#define CAPP1_REG_OFFSET 0x180 - #endif /* __CAPP_H */ diff --git a/include/phb3-capp.h b/include/phb3-capp.h new file mode 100644 index 0000000..3834ef4 --- /dev/null +++ b/include/phb3-capp.h @@ -0,0 +1,50 @@ +/* Copyright 2013-2017 IBM Corp. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __PHB3_CAPP_H +#define __PHB3_CAPP_H + + +#define CAPP_SNP_ARRAY_ADDR_REG 0x2013028 +#define CAPP_APC_MASTER_ARRAY_ADDR_REG 0x201302A +#define CAPP_SNP_ARRAY_WRITE_REG 0x2013801 +#define CAPP_APC_MASTER_ARRAY_WRITE_REG 0x2013802 + +#define CAPP_FIR 0x2013000 +#define CAPP_ERR_RPT_CLR 0x2013013 +#define APC_MASTER_PB_CTRL 0x2013018 +#define APC_MASTER_CAPI_CTRL 0x2013019 +#define TRANSPORT_CONTROL 0x201301C +#define CANNED_PRESP_MAP0 0x201301D +#define CANNED_PRESP_MAP1 0x201301E +#define CANNED_PRESP_MAP2 0x201301F +#define CAPP_ERR_STATUS_CTRL 0x201300E +#define FLUSH_SUE_STATE_MAP 0x201300F +#define CAPP_TB 0x2013026 +#define CAPP_TFMR 0x2013027 +#define CAPP_EPOCH_TIMER_CTRL 0x201302C +#define FLUSH_UOP_CONFIG1 0x2013803 +#define FLUSH_UOP_CONFIG2 0x2013804 +#define SNOOP_CAPI_CONFIG 0x201301A + +/* + * Naples has two CAPP units, statically mapped: + * CAPP0 attached to PHB0, and CAPP1 attached to PHB1. + * The addresses of CAPP1 XSCOMS registers are 0x180 away. + */ +#define CAPP1_REG_OFFSET 0x180 + +#endif /* __PHB3_CAPP_H */