From patchwork Tue Apr 24 03:25:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 903267 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 40VTJj4zC6z9rx7 for ; Tue, 24 Apr 2018 13:26:45 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40VTJj2X1NzF26H for ; Tue, 24 Apr 2018 13:26:45 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=stewart@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com 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 40VTHS08vGzF1Rl for ; Tue, 24 Apr 2018 13:25:39 +1000 (AEST) Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3O3OHit094579 for ; Mon, 23 Apr 2018 23:25:36 -0400 Received: from e19.ny.us.ibm.com (e19.ny.us.ibm.com [129.33.205.209]) by mx0b-001b2d01.pphosted.com with ESMTP id 2hhuwf9spm-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 23 Apr 2018 23:25:36 -0400 Received: from localhost by e19.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 23 Apr 2018 23:25:36 -0400 Received: from b01cxnp23034.gho.pok.ibm.com (9.57.198.29) by e19.ny.us.ibm.com (146.89.104.206) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 23 Apr 2018 23:25:34 -0400 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w3O3PXGb50004022; Tue, 24 Apr 2018 03:25:33 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1824B2803D; Mon, 23 Apr 2018 23:24:57 -0400 (EDT) Received: from birb.localdomain (unknown [9.102.53.128]) by b01ledav001.gho.pok.ibm.com (Postfix) with SMTP id 47C742803F; Mon, 23 Apr 2018 23:24:56 -0400 (EDT) Received: by birb.localdomain (Postfix, from userid 1000) id 7F1CF4E86C4; Tue, 24 Apr 2018 13:25:30 +1000 (AEST) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Tue, 24 Apr 2018 13:25:29 +1000 X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180424032529.18592-1-stewart@linux.ibm.com> References: <20180424032529.18592-1-stewart@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18042403-0056-0000-0000-00000443DDF8 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008909; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000257; SDB=6.01022385; UDB=6.00521832; IPR=6.00801619; MB=3.00020739; MTD=3.00000008; XFM=3.00000015; UTC=2018-04-24 03:25:35 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18042403-0057-0000-0000-00000887E815 Message-Id: <20180424032529.18592-5-stewart@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-04-23_09:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804240030 Subject: [Skiboot] [PATCH 4/4] p9dsu: add slot power limit. X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jim Yuan MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" From: Jim Yuan Signed-off-by: Jim Yuan Signed-off-by: Stewart Smith --- platforms/astbmc/p9dsu.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/platforms/astbmc/p9dsu.c b/platforms/astbmc/p9dsu.c index 06f6599800bd..a9a2a9a1c1db 100644 --- a/platforms/astbmc/p9dsu.c +++ b/platforms/astbmc/p9dsu.c @@ -29,6 +29,7 @@ static const struct slot_table_entry p9dsu1u_phb0_0_slot[] = { .etype = st_pluggable_slot, .location = ST_LOC_DEVFN(0,0), .name = "UIO Slot1", + .power_limit = 75, }, { .etype = st_end }, }; @@ -38,6 +39,7 @@ static const struct slot_table_entry p9dsu1u_phb0_1_slot[] = { .etype = st_pluggable_slot, .location = ST_LOC_DEVFN(0,0), .name = "UIO Slot2", + .power_limit = 75, }, { .etype = st_end }, }; @@ -83,6 +85,7 @@ static const struct slot_table_entry p9dsu1u_phb8_0_slot[] = { .etype = st_pluggable_slot, .location = ST_LOC_DEVFN(0,0), .name = "WIO Slot1", + .power_limit = 75, }, { .etype = st_end }, }; @@ -92,6 +95,7 @@ static const struct slot_table_entry p9dsu1u_phb8_1_slot[] = { .etype = st_pluggable_slot, .location = ST_LOC_DEVFN(0,0), .name = "WIO-R Slot", + .power_limit = 75, }, { .etype = st_end }, }; @@ -101,6 +105,7 @@ static const struct slot_table_entry p9dsu1u_phb8_2_slot[] = { .etype = st_pluggable_slot, .location = ST_LOC_DEVFN(0,0), .name = "WIO Slot3", + .power_limit = 75, }, { .etype = st_end }, }; @@ -110,6 +115,7 @@ static const struct slot_table_entry p9dsu1u_phb8_3_slot[] = { .etype = st_pluggable_slot, .location = ST_LOC_DEVFN(0,0), .name = "WIO Slot2", + .power_limit = 75, }, { .etype = st_end }, }; @@ -174,6 +180,7 @@ static const struct slot_table_entry p9dsu2u_phb0_0_slot[] = { .etype = st_pluggable_slot, .location = ST_LOC_DEVFN(0,0), .name = "UIO Slot1", + .power_limit = 75, }, { .etype = st_end }, }; @@ -183,6 +190,7 @@ static const struct slot_table_entry p9dsu2u_phb0_1_slot[] = { .etype = st_pluggable_slot, .location = ST_LOC_DEVFN(0,0), .name = "UIO Slot2", + .power_limit = 75, }, { .etype = st_end }, }; @@ -228,6 +236,7 @@ static const struct slot_table_entry p9dsu2u_phb8_0_slot[] = { .etype = st_pluggable_slot, .location = ST_LOC_DEVFN(0,0), .name = "WIO Slot1", + .power_limit = 75, }, { .etype = st_end }, }; @@ -237,6 +246,7 @@ static const struct slot_table_entry p9dsu2u_phb8_1_slot[] = { .etype = st_pluggable_slot, .location = ST_LOC_DEVFN(0,0), .name = "WIO-R Slot", + .power_limit = 75, }, { .etype = st_end }, }; @@ -246,6 +256,7 @@ static const struct slot_table_entry p9dsu2u_phb8_2_slot[] = { .etype = st_pluggable_slot, .location = ST_LOC_DEVFN(0,0), .name = "WIO Slot3", + .power_limit = 75, }, { .etype = st_end }, }; @@ -255,6 +266,7 @@ static const struct slot_table_entry p9dsu2u_phb8_3_slot[] = { .etype = st_pluggable_slot, .location = ST_LOC_DEVFN(0,0), .name = "WIO Slot3", + .power_limit = 75, }, { .etype = st_end }, }; @@ -264,6 +276,7 @@ static const struct slot_table_entry p9dsu2u_phb8_4_slot[] = { .etype = st_pluggable_slot, .location = ST_LOC_DEVFN(0,0), .name = "WIO Slot2", + .power_limit = 75, }, { .etype = st_end }, }; @@ -333,11 +346,13 @@ static const struct slot_table_entry p9dsu2uess_uio_plx_down[] = { .etype = st_pluggable_slot, .location = ST_LOC_DEVFN(0x1,0), .name = "UIO Slot2", + .power_limit = 75, }, { .etype = st_builtin_dev, .location = ST_LOC_DEVFN(0x8,0), .name = "PLX switch", + .power_limit = 75, }, { .etype = st_builtin_dev, @@ -353,6 +368,7 @@ static const struct slot_table_entry p9dsu2uess_uio_plx_up[] = { .location = ST_LOC_DEVFN(0,0), .children = p9dsu2uess_uio_plx_down, .name = "PLX up", + .power_limit = 75, }, { .etype = st_end }, }; @@ -362,16 +378,19 @@ static const struct slot_table_entry p9dsu2uess_wio_plx_down[] = { .etype = st_pluggable_slot, .location = ST_LOC_DEVFN(0x1,0), .name = "WIO Slot1", + .power_limit = 75, }, { .etype = st_builtin_dev, .location = ST_LOC_DEVFN(0x8,0), .name = "PLX switch", + .power_limit = 75, }, { .etype = st_pluggable_slot, .location = ST_LOC_DEVFN(0x9,0), .name = "WIO Slot2", + .power_limit = 75, }, { .etype = st_end }, }; @@ -382,6 +401,7 @@ static const struct slot_table_entry p9dsu2uess_wio_plx_up[] = { .location = ST_LOC_DEVFN(0,0), .children = p9dsu2uess_wio_plx_down, .name = "PLX up", + .power_limit = 75, }, { .etype = st_end }, }; @@ -391,6 +411,7 @@ static const struct slot_table_entry p9dsu2uess_phb0_0_slot[] = { .etype = st_pluggable_slot, .location = ST_LOC_DEVFN(0,0), .name = "UIO Slot1", + .power_limit = 75, }, { .etype = st_end }, }; @@ -401,6 +422,7 @@ static const struct slot_table_entry p9dsu2uess_phb0_1_slot[] = { .location = ST_LOC_DEVFN(0,0), .children = p9dsu2uess_uio_plx_up, .name = "PLX", + .power_limit = 75, }, { .etype = st_end }, }; @@ -410,6 +432,7 @@ static const struct slot_table_entry p9dsu2uess_phb0_2_slot[] = { .etype = st_builtin_dev, .location = ST_LOC_DEVFN(0,0), .name = "UIO Slot3", + .power_limit = 75, }, { .etype = st_end }, }; @@ -446,6 +469,7 @@ static const struct slot_table_entry p9dsu2uess_phb8_0_slot[] = { .etype = st_pluggable_slot, .location = ST_LOC_DEVFN(0,0), .name = "WIO Slot3", + .power_limit = 75, }, { .etype = st_end }, }; @@ -455,6 +479,7 @@ static const struct slot_table_entry p9dsu2uess_phb8_1_slot[] = { .etype = st_pluggable_slot, .location = ST_LOC_DEVFN(0,0), .name = "WIO-R Slot", + .power_limit = 75, }, { .etype = st_end }, }; @@ -465,6 +490,7 @@ static const struct slot_table_entry p9dsu2uess_phb8_2_slot[] = { .location = ST_LOC_DEVFN(0,0), .children = p9dsu2uess_wio_plx_up, .name = "PLX", + .power_limit = 75, }, { .etype = st_end }, }; @@ -474,6 +500,7 @@ static const struct slot_table_entry p9dsu2uess_phb8_3_slot[] = { .etype = st_pluggable_slot, .location = ST_LOC_DEVFN(0,0), .name = "WIO Slot4", + .power_limit = 75, }, { .etype = st_end }, };