{"id":808089,"url":"http://patchwork.ozlabs.org/api/1.0/patches/808089/?format=json","project":{"id":44,"url":"http://patchwork.ozlabs.org/api/1.0/projects/44/?format=json","name":"skiboot firmware development","link_name":"skiboot","list_id":"skiboot.lists.ozlabs.org","list_email":"skiboot@lists.ozlabs.org","web_url":"http://github.com/open-power/skiboot","scm_url":"http://github.com/open-power/skiboot","webscm_url":""},"msgid":"<1504164285-15095-3-git-send-email-cclaudio@linux.vnet.ibm.com>","date":"2017-08-31T07:24:33","name":"[v2,02/14] core/flash: extern function to get the name of a PNOR partition","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"cf6eb4f7c90ae8d892938b88d0057e937df52efb","submitter":{"id":69305,"url":"http://patchwork.ozlabs.org/api/1.0/people/69305/?format=json","name":"Claudio Carvalho","email":"cclaudio@linux.vnet.ibm.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/skiboot/patch/1504164285-15095-3-git-send-email-cclaudio@linux.vnet.ibm.com/mbox/","series":[{"id":760,"url":"http://patchwork.ozlabs.org/api/1.0/series/760/?format=json","date":"2017-08-31T07:24:31","name":"libstb: simplify the initialization of cvc drivers","version":2,"mbox":"http://patchwork.ozlabs.org/series/760/mbox/"}],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/808089/checks/","tags":{},"headers":{"Return-Path":"<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>","X-Original-To":["incoming@patchwork.ozlabs.org","skiboot@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","skiboot@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjYnQ23Fkz9sNc\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 17:25:46 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xjYnP6nhhzDqGZ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 17:25:45 +1000 (AEST)","from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com\n\t[148.163.156.1])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xjYmd6SdrzDqGX\n\tfor <skiboot@lists.ozlabs.org>; Thu, 31 Aug 2017 17:25:05 +1000 (AEST)","from pps.filterd (m0098394.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv7V7Oeen041571\n\tfor <skiboot@lists.ozlabs.org>; Thu, 31 Aug 2017 03:25:03 -0400","from e14.ny.us.ibm.com (e14.ny.us.ibm.com [129.33.205.204])\n\tby mx0a-001b2d01.pphosted.com with ESMTP id 2cp58064s2-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <skiboot@lists.ozlabs.org>; Thu, 31 Aug 2017 03:25:03 -0400","from localhost\n\tby e14.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <skiboot@lists.ozlabs.org> from <cclaudio@linux.vnet.ibm.com>;\n\tThu, 31 Aug 2017 03:25:02 -0400","from b01cxnp23032.gho.pok.ibm.com (9.57.198.27)\n\tby e14.ny.us.ibm.com (146.89.104.201) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tThu, 31 Aug 2017 03:25:00 -0400","from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com\n\t[9.57.199.109])\n\tby b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP\n\tid v7V7P0k326214522\n\tfor <skiboot@lists.ozlabs.org>; Thu, 31 Aug 2017 07:25:00 GMT","from localhost (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with SMTP id CF39C112040\n\tfor <skiboot@lists.ozlabs.org>; Thu, 31 Aug 2017 03:24:45 -0400 (EDT)","from legolas.ibm.com (unknown [9.85.193.48])\n\tby b01ledav004.gho.pok.ibm.com (Postfix) with ESMTP id 3081D112040;\n\tThu, 31 Aug 2017 03:24:41 -0400 (EDT)"],"X-IMSS-HAND-OFF-DIRECTIVE":"127.0.0.1:10026","From":"Claudio Carvalho <cclaudio@linux.vnet.ibm.com>","To":"skiboot@lists.ozlabs.org","Date":"Thu, 31 Aug 2017 04:24:33 -0300","X-Mailer":"git-send-email 2.7.4","In-Reply-To":"<1504164285-15095-1-git-send-email-cclaudio@linux.vnet.ibm.com>","References":"<1504164285-15095-1-git-send-email-cclaudio@linux.vnet.ibm.com>","X-TM-AS-GCONF":"00","x-cbid":"17083107-0052-0000-0000-000002589D6C","X-IBM-SpamModules-Scores":"","X-IBM-SpamModules-Versions":"BY=3.00007640; HX=3.00000241; KW=3.00000007;\n\tPH=3.00000004; SC=3.00000226; SDB=6.00910098; UDB=6.00456511;\n\tIPR=6.00690378; \n\tBA=6.00005562; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009;\n\tZB=6.00000000; \n\tZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016938;\n\tXFM=3.00000015; UTC=2017-08-31 07:25:01","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17083107-0053-0000-0000-000051D83C29","Message-Id":"<1504164285-15095-3-git-send-email-cclaudio@linux.vnet.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-08-31_02:, , signatures=0","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=1\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000\n\tdefinitions=main-1708310114","Subject":"[Skiboot] [PATCH v2 02/14] core/flash: extern function to get the\n\tname of a PNOR partition","X-BeenThere":"skiboot@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Mailing list for skiboot development <skiboot.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/skiboot/>","List-Post":"<mailto:skiboot@lists.ozlabs.org>","List-Help":"<mailto:skiboot-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=subscribe>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org","Sender":"\"Skiboot\"\n\t<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>"},"content":"This adds the flash_map_resource_name() to allow other skiboot\nsubsystems to lookup the name of a PNOR partition. With this we don't\nneed to duplicate the same information in other places (e.g. libstb).\n\nSigned-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com>\n---\n core/flash.c      | 10 ++++++++++\n include/skiboot.h |  1 +\n 2 files changed, 11 insertions(+)","diff":"diff --git a/core/flash.c b/core/flash.c\nindex 53e6eba..90402ef 100644\n--- a/core/flash.c\n+++ b/core/flash.c\n@@ -424,6 +424,16 @@ static struct {\n \t{ RESOURCE_ID_IMA_CATALOG,  RESOURCE_SUBID_SUPPORTED,\t\"IMA_CATALOG\" },\n };\n \n+char *flash_map_resource_name(enum resource_id id)\n+{\n+\tint i;\n+\n+\tfor (i = 0; i < ARRAY_SIZE(part_name_map); i++) {\n+\t\tif (part_name_map[i].id == id)\n+\t\t\treturn part_name_map[i].name;\n+\t}\n+\treturn NULL;\n+}\n \n static size_t sizeof_elf_from_hdr(void *buf)\n {\ndiff --git a/include/skiboot.h b/include/skiboot.h\nindex 4b7d519..06d681e 100644\n--- a/include/skiboot.h\n+++ b/include/skiboot.h\n@@ -243,6 +243,7 @@ extern int flash_subpart_info(void *part_header, uint32_t header_len,\n \t\t\t      uint32_t part_size, uint32_t *part_actual,\n \t\t\t      uint32_t subid, uint32_t *offset,\n \t\t\t      uint32_t *size);\n+extern char *flash_map_resource_name(enum resource_id id);\n /* NVRAM support */\n extern void nvram_init(void);\n extern void nvram_read_complete(bool success);\n","prefixes":["v2","02/14"]}