From patchwork Wed Mar 16 00:47:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 8594091 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-renesas-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 78B949F294 for ; Wed, 16 Mar 2016 00:47:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B3F86203B7 for ; Wed, 16 Mar 2016 00:47:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E33AD20376 for ; Wed, 16 Mar 2016 00:47:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933961AbcCPAr5 (ORCPT ); Tue, 15 Mar 2016 20:47:57 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:44600 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933942AbcCPArz (ORCPT ); Tue, 15 Mar 2016 20:47:55 -0400 Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie1.idc.renesas.com with ESMTP; 16 Mar 2016 09:47:53 +0900 Received: from relmlac4.idc.renesas.com (relmlac4.idc.renesas.com [10.200.69.24]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id 2E07B45E77; Wed, 16 Mar 2016 09:47:51 +0900 (JST) Received: by relmlac4.idc.renesas.com (Postfix, from userid 0) id 10653480A3; Wed, 16 Mar 2016 09:47:50 +0900 (JST) Received: from relmlac4.idc.renesas.com (localhost [127.0.0.1]) by relmlac4.idc.renesas.com (Postfix) with ESMTP id EE43348014; Wed, 16 Mar 2016 09:47:50 +0900 (JST) Received: from relmlii3.idc.renesas.com [10.200.68.67] by relmlac4.idc.renesas.com with ESMTP id KAS28201; Wed, 16 Mar 2016 09:47:50 +0900 X-IronPort-AV: E=Sophos;i="5.22,559,1449500400"; d="scan'";a="1467409" Received: from mail-hk2apc01lp0214.outbound.protection.outlook.com (HELO APC01-HK2-obe.outbound.protection.outlook.com) ([65.55.88.214]) by relmlii3.idc.renesas.com with ESMTP/TLS/AES256-SHA; 16 Mar 2016 09:47:50 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=kSryqnihl/BRzwxhz5OKu32BZzDl8iThmrT0OGqMUiY=; b=QhuUDERreyojApjrhSGG+ADbNslqyO9xHMsCTMgSuqCahkClMfWZCBR9vtqussXiE7mbNWMcg+X0g1tArVvvagvQecGU+3Mol3XRBx0FaazSmdTKO/RmhiLN+sQfPjSqdxkWcXJ2Vi+BNoQfRVabbq7PeJm9NPd5Qt3XaKo4FIo= Authentication-Results: ideasonboard.com; dkim=none (message not signed) header.d=none;ideasonboard.com; dmarc=none action=none header.from=renesas.com; Received: from morimoto-PC.renesas.com (211.11.155.144) by HKXPR06MB1016.apcprd06.prod.outlook.com (10.161.181.156) with Microsoft SMTP Server (TLS) id 15.1.434.16; Wed, 16 Mar 2016 00:47:48 +0000 Message-ID: <874mc7fe29.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 1/2] pinctrl: sh-pfc: enable to indicate GPSR/IPSR/MOD_SEL for debug User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 To: Laurent Pinchart , Geert Uytterhoeven , Linus Walleij CC: Magnus , Simon , , , In-Reply-To: <8760wnfe3r.wl%kuninori.morimoto.gx@renesas.com> References: <8760wnfe3r.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Date: Wed, 16 Mar 2016 00:47:48 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: KAWPR01CA0003.jpnprd01.prod.outlook.com (25.161.24.13) To HKXPR06MB1016.apcprd06.prod.outlook.com (25.161.181.156) X-MS-Office365-Filtering-Correlation-Id: b1aadcc2-af89-4cbc-eb47-08d34d3498d7 X-Microsoft-Exchange-Diagnostics: 1; HKXPR06MB1016; 2:vP3L3s2vY7QOWpVLZdkZsR9QcPB68wwUXmm02ru3IDaTeTBBFQAIJ4+PCe4s91V5Bb3O75cyN2Ffd3SYfNI90mKFtjCDmb6hOjIemZ25JSZFvmo5D+I90XyQnCKJ/DQt8kxk5up6CwWJhoYC4ZX2SeJG10goquudLKJGZoWFkxXCfjjmXYRvbR1VZIICJvwl; 3:ML8FpLJLg1guP1lAVZ6XF7l/Nbst7qiI3Bhpc3DlCpaoMa4+SNMFJ8AAo9gKiDF78rHzdeXyRBctXblalo8ToBP9FDUB5n9R8Rt/8P1bsocZcfpP5HdNrPMxG0swj8kh; 25:IFvGrmp0TeuYQxrPdqhmLuDveMu4KE98kr0ajHztVPQ7IzN6UlG5YEUFg8S0cwVeg3sR2ucfT6moMzR3wEaf3ZV31VB8WXFjefQvUO7zcXoLVzVtOBkSY3D4DmMk0nWKEu7L5fAg5BQazYRRpzd5c79rxJ2dEW1oGcYd8bBUhcdVQplz7UKhsu9JOVs0lqTSEpGZYw90bbkfmVS4U1yfM6D4Y7PPFwg4Zw4polqYVT1Lr3DdK6+M5l6yFqfhQWXruxMlJahTg9MtaamrP6dnNlJKzdiZU9EPJqj938I1EKLrH9WqOBbNSHBubnCdVkn39ZM5OH/HMKpIXom3PjZDIQ== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:HKXPR06MB1016; X-Microsoft-Exchange-Diagnostics: 1; HKXPR06MB1016; 20:Jd5jHqjv6tMx0jdku2Os6mZnFL8EKylwpvV58Hn3ipZm1F/eX8wxHm7+vNd+0F/UdEVkI9O9jFKsAhSOLh28fhSRNPHU/htrDSsFCv16wcyi+eCrdHZRchKwr5asoGrJhx73vLNBKeauvL0MWmc8+T7BQgLF5ZGMGPynFQqn2vrdiTrnuzyH0hd5W4LddynzMrg0VXHoDxLdRWbFWhd5dWzZFo+x/bdhLu9R/1yDhPeNCDjkPmp4yLSFEU5dyJ1UtCz893/PIzr79UGQI0GfCXpvGwOIKasd/IcXCqmUe3ELPRHqVZ0bYljTVlxUo5qLjYjOA1E1dmWQ81ac2ivUJBaNteDP4/XKx3AB7CG0B9LeQUCul8d8job2fK/B1s6wA1X1hcr+Xz7NImyiBmAW/2S/S7zLGXSKU9r3MNIR3zTrRI1XuE5v5/z1S5XxTaaoxIRZ8pC9/9dPV2joP9fuytf40tPvWIdcFRzIt6Tu4m29dHrrA/zU/0jUsy8sm4jr; 4:QA4Q3R9V654lgeR96Qlyrb3i+E9RjjNlDPXhzOsj67jnPs3485y1bVSNBz0C5HgKUBgHE5hXanSb2pDIEYC9Rqbjs3KiP8hwdwTtWFfABwYMJFyzMonb4iiv6MAwCnL6grPJPSC/7eAXNILfCwxMrqRbqAX58wE7EO00Rqh5omlLJfV86OBCBuRJiSq+FDJYoQHQpABeJVTRlyEAV79QeGGWp/Wc9wqIX/QhGs5uxWoJkdRUo50EcG4elGyHoVKbwQnABICwLIucGuiv4pDH9KL3mq2nNPtgRH8naq7jqyn1LmCOdxXZ6UXIdRm6VTbxpND94855IlvMfKaP9bgiLvllIY2ymXtauNVg/oSp6QFYYr4CB9a8VzsFcYjqsl4c X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001); SRVR:HKXPR06MB1016; BCL:0; PCL:0; RULEID:; SRVR:HKXPR06MB1016; X-Forefront-PRVS: 08831F51DC X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(83506001)(4326007)(47776003)(2906002)(36756003)(5004730100002)(50986999)(19580405001)(86362001)(66066001)(5008740100001)(92566002)(54356999)(42186005)(586003)(1096002)(46406003)(23726003)(3846002)(189998001)(81166005)(77096005)(76176999)(2950100001)(5001770100001)(6116002)(229853001)(50466002)(19580395003)(53416004)(33646002)(16060500001); DIR:OUT; SFP:1102; SCL:1; SRVR:HKXPR06MB1016; H:morimoto-PC.renesas.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; HKXPR06MB1016; 23:DeJbQgsZ7EXe0ml/N3jEYACW/xLRFEclMmkWo+WlItOXBcRmAQjoHl6FELqxmRHm7gcMcEP4HbLgABSSPfinluk1qWb9GO3626kE0NyxrxwxYybhINfdjuhV2CSzkvouRxxzX6ka8VbXoMpKUxOC01PT1uxKdhNdQjx995n+yx0l2NS/5CZruxQj3oX15ZNKc+TK6FfymJnqZJlUHlu/7FGLAbXq95hq/IeEj6Ny6+FkcCiKbhzEp6JTfkLj9UcBKOBvhUwjxUXngTWF4Ytqy48N/uQh4CBHv4Nnaxaiq4kHLlJVnFtbFognIbNFd16XuJ/gMadqS89PU1IPfJyMNQ4fPnY6iGL7I7taU8IcF8HBXIAHhtiPdasCeqcOuHGHHq5DSaInaLklt088EIpO30CZ4oY89/PjXcq5IE/5k44Y7XRDuVI3CFes2COxDcQXMUq0ZSMwL3z0dRKoyn68TL+JZBeT2wE28CQ8ZR7FiV5PeGYr8IDbfyvxvuLhlB1TwoN5HahFtDRuVC7GKBANbMV3L8dUGcsQc/cJbQxm+sqkVMQLY3I1xRBj0pVzNaWsol99MTljaQ8fI/akROfNHIjyfm5NtfZlKIZ819B6TQ7WmnSu84pgPafvXBpXHUx0qDxlk2DrqGtCn2/CY5ZxPdTAWQfr48qvwCI4+k8ZNoM/3d6lvmq0AZmJGF+9rPN+ZorCbOkPt+/Cx5s2TP1NFB61NfIDEyvysGyV77UOPqzubNIR8msPtkIwvwerNsPz4BTMIGkNIdmC6UG+O7nSa7ymv6BLU/4f2xEJxzqImNf23pO9cFwsHXfIe1fn7HVFIdpaBEdYFkpJ9yJ6UoPMvusLqdI9taIcK1MSx60zr2u/AqBWXdeoXP19mYqpWWKtJosoZ7TT3IpT9DSt7UhLTDJwx27AOxw7Zl5gxr/wN vvxnbffMLPtzUaG8I0gOF0g X-Microsoft-Exchange-Diagnostics: 1; HKXPR06MB1016; 5:7FoYEYlW0h3RMoMW6nCw5hJwhnpyq8kIR65jgdE5a2GMB47pcpJO3gONPy3WsMNZo7x0Xfu2a/c+n1O9cQU8agm6rclkhlCecLCvHona4Itwq8llddGYqoTU8flYsdm+5mis7cnened6ZVZziSU4SA==; 24:43LkryjNSBolBD3/J/oafnlXUIZJ8mgzSUmchcVqK5PiWLrvtcsBsjXm2V5oXq6p2CPMtqyfU+O+zsMjQj0AazO6DkUFVH69R0dRD6KfnyM=; 20:0hZOWHyY9oIdo+z5JgjNBnAe5kjzP6W4pyJ7jWbLeOBWXmVHMCXL9gk/P2Vd4Hqnzl3eg8EkR+zBggCFT60SfNexSSTr2Ykh2jwOVIQy8o07KGPXL+ptGaBEYq47Z3IEURdfs5Nu8Ydc+EABCy60aOLQKPbpaOh+yEZ51hM3hQg= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Mar 2016 00:47:48.0891 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HKXPR06MB1016 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto Current sh_pfc can't indicate GPSR/IPSR/MOD_SEL name for debug. Of course we can get it from indicated register address, but it is not convenient. This patch enables to indicate these. Signed-off-by: Kuninori Morimoto --- drivers/pinctrl/sh-pfc/core.c | 3 ++- drivers/pinctrl/sh-pfc/sh_pfc.h | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/sh-pfc/core.c b/drivers/pinctrl/sh-pfc/core.c index 0c2d14c..c59f858 100644 --- a/drivers/pinctrl/sh-pfc/core.c +++ b/drivers/pinctrl/sh-pfc/core.c @@ -204,8 +204,9 @@ static void sh_pfc_write_config_reg(struct sh_pfc *pfc, sh_pfc_config_reg_helper(pfc, crp, field, &mapped_reg, &mask, &pos); - dev_dbg(pfc->dev, "write_reg addr = %x, value = 0x%x, field = %u, " + dev_dbg(pfc->dev, "%s: write_reg addr = %x, value = 0x%x, field = %u, " "r_width = %u, f_width = %u\n", + crp->name, crp->reg, value, field, crp->reg_width, crp->field_width); mask = ~(mask << pos); diff --git a/drivers/pinctrl/sh-pfc/sh_pfc.h b/drivers/pinctrl/sh-pfc/sh_pfc.h index a490834..2b593fc 100644 --- a/drivers/pinctrl/sh-pfc/sh_pfc.h +++ b/drivers/pinctrl/sh-pfc/sh_pfc.h @@ -94,6 +94,7 @@ struct pinmux_func { }; struct pinmux_cfg_reg { + const char *name; u32 reg; u8 reg_width, field_width; const u16 *enum_ids; @@ -110,7 +111,8 @@ struct pinmux_cfg_reg { * (from left to right, i.e. MSB to LSB), 2^f_width enum IDs must be specified, * one for each possible combination of the register field bit values. */ -#define PINMUX_CFG_REG(name, r, r_width, f_width) \ +#define PINMUX_CFG_REG(_name, r, r_width, f_width) \ + .name = _name, \ .reg = r, .reg_width = r_width, .field_width = f_width, \ .enum_ids = (const u16 [(r_width / f_width) * (1 << f_width)]) @@ -125,7 +127,8 @@ struct pinmux_cfg_reg { * (from left to right, i.e. MSB to LSB), 2^var_fwi enum IDs must be specified, * one for each possible combination of the register field bit values. */ -#define PINMUX_CFG_REG_VAR(name, r, r_width, var_fw0, var_fwn...) \ +#define PINMUX_CFG_REG_VAR(_name, r, r_width, var_fw0, var_fwn...) \ + .name = _name, \ .reg = r, .reg_width = r_width, \ .var_field_width = (const u8 [r_width]) \ { var_fw0, var_fwn, 0 }, \ @@ -465,7 +468,7 @@ struct sh_pfc_soc_info { */ #define PORTCR(nr, reg) \ { \ - PINMUX_CFG_REG_VAR("PORT" nr "CR", reg, 8, 2, 2, 1, 3) {\ + PINMUX_CFG_REG_VAR("PORT" #nr "CR", reg, 8, 2, 2, 1, 3) {\ /* PULMD[1:0], handled by .set_bias() */ \ 0, 0, 0, 0, \ /* IE and OE */ \