From patchwork Fri Mar 17 10:05:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Horia Geanta X-Patchwork-Id: 9630253 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4804960132 for ; Fri, 17 Mar 2017 10:08:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1FAEC28697 for ; Fri, 17 Mar 2017 10:08:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 13A5F286A0; Fri, 17 Mar 2017 10:08:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 789A628697 for ; Fri, 17 Mar 2017 10:08:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=X/CaspWYf+Q/Z9mCRU63kLsFveOorQsUNCmPs1O6Npw=; b=KvoEQvldLCQamy ts+P8fzlSohNppnz3EZNn82HFhaEbFRWSNAmBSfuTsyJAjWKH8XgLrqWWyWqThBJ/J6b6vmUpyju/ xrGjhW2w/kMjcqgoERburPHD8ntsqxXyGwJcXSuXtraxXq5SPuUTuT5SU4PdRrHby2qw7nkdq2T2u Zb34WREn2IRI++Ku9pTl+n943l9kjM1RQ++rJz2mxWyNniSU5d18J3g1jKc8zZDXq7trybQz24J4g KAISmYT8T/TvBC6FUvn0xD+wuFDdH4PWlDmtLhYddZQlg9tS06lNi77/6havd67HjfOsPyXMebnGF wHWydY5YCtQ2YpneuF5g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cooo7-0002Y7-57; Fri, 17 Mar 2017 10:08:27 +0000 Received: from mail-sn1nam01on0063.outbound.protection.outlook.com ([104.47.32.63] helo=NAM01-SN1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1coomc-0001A1-Ag for linux-arm-kernel@lists.infradead.org; Fri, 17 Mar 2017 10:07:00 +0000 Received: from BN3PR0301CA0014.namprd03.prod.outlook.com (10.160.180.152) by BLUPR03MB183.namprd03.prod.outlook.com (10.255.212.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.961.17; Fri, 17 Mar 2017 10:06:36 +0000 Received: from BN1AFFO11FD022.protection.gbl (2a01:111:f400:7c10::146) by BN3PR0301CA0014.outlook.office365.com (2a01:111:e400:4000::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.977.11 via Frontend Transport; Fri, 17 Mar 2017 10:06:36 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD022.mail.protection.outlook.com (10.58.52.82) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.977.7 via Frontend Transport; Fri, 17 Mar 2017 10:06:36 +0000 Received: from enigma.ea.freescale.net (enigma.ea.freescale.net [10.171.77.120]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v2HA6O4L014594; Fri, 17 Mar 2017 03:06:33 -0700 From: =?UTF-8?q?Horia=20Geant=C4=83?= To: Herbert Xu , Scott Wood , Roy Pledge Subject: [PATCH 3/7] soc/qman: export non-programmable FQD fields query Date: Fri, 17 Mar 2017 12:05:58 +0200 Message-ID: <20170317100602.2837-4-horia.geanta@nxp.com> X-Mailer: git-send-email 2.12.0.264.gd6db3f216544 In-Reply-To: <20170317100602.2837-1-horia.geanta@nxp.com> References: <20170317100602.2837-1-horia.geanta@nxp.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131342187967316755; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39860400002)(39450400003)(39380400002)(39400400002)(39410400002)(39840400002)(39850400002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(9170700003)(54906002)(106466001)(53936002)(81166006)(5820100001)(38730400002)(8656002)(77096006)(5660300001)(105606002)(33646002)(47776003)(23676002)(50466002)(8676002)(85426001)(104016004)(1076002)(50226002)(8936002)(4326008)(76176999)(356003)(50986999)(305945005)(2906002)(7416002)(189998001)(6636002)(36756003)(6666003)(86362001)(2870700001)(2950100002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR03MB183; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; A:1; MX:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD022; 1:0ukHCx8rqZjNxissqc8h6uHqy12Fsioyq9LJ3M+RE5pTzZ0eMWJDIhIZ2sC9VfVvqPc59qbsF1+5Kwh03gy8xI1o8PuUJercBMjVl+OHICFu6s1M0D/k+Lb70xdRIb9QkO3ipjbIKBXXjTdrLOhNz4nEN/PXZYwmhXAstHymU7O5AY+v657fK9cZr0ttrQM/PmBIqSsVg6PYxyRge0O2Vx6d13THYDStc7vPTYkxaFZN64T+GQaZ41vboUs0mNNcguh7dQb/yDz6JxLkfGv2aj5d/mMpZpX4qlu5Ep3bDGL9Qv2+oT7xU/s3RMMVwJprAg3jL19J0mWDEZo+3ApOJ7Xyx72twL5SBSV9nXrLf8qw7inssFBw6pRbhls6D8Ym/v73Kq28tw5fH/v4Hww+pD8kQnODmIbOJhijI5WQD1zN8+6WJ+2WAENhSjCzY7wPGiSFvpNLCVFgnoPeyf6JmvLkLdSMoclj6zD2LnzQyxq+fked54Zea+wd3tBElMFf+cz7ChORK5S8zgPDTVR+OUmA++UbhqMkajPgJBo+Bv/qyZFMC3VksYLjr1c0Pb1eNZfn3FhC+ZF4FMMQm5lmKLOD4xOCrAGNaTfN93A+tFJDuEWVJ3pEdnXT9P84+NSxLxNoIziDmcJb0GjsBb/UoawjApF1rjRdJwSvMG5tnE6mMyY05ZWr0yT/hQ3uPPaVRab3q2+Xw2cKNBCZ7WsSdw== X-MS-Office365-Filtering-Correlation-Id: 7fb89a22-539e-402c-8313-08d46d1d4c47 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BLUPR03MB183; X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB183; 3:Cni7+LcmYg471tWAO/dw88Btx0L15AkUmY5STkHfaXtbVcrT/QF3qOvWaHZrbSIddmsYmb7F4iEp2NM7Z2uik6gnwekoQmgD2IknzWRvX0w3ipqdJ1pWTed/VYByhm1v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change-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(13015025)(5005006)(8121501046)(13017025)(13018025)(13024025)(13023025)(3002001)(10201501046)(6055026)(6096035)(20161123556025)(20161123561025)(20161123559025)(20161123565025)(20161123563025); SRVR:BLUPR03MB183; BCL:0; PCL:0; RULEID:(400006); SRVR:BLUPR03MB183; X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB183; 4:1qjfsBC8/gJNHGsJtTEIfMZ/gVlVDIms4SaK+VWz47yNmWltDRFgRc/EQlvIaQab/bSuHc4JReBUbYKJOL4+tJu+Rr7eygJHj82kkiS13Syseo9WssRykTmstSTGGaIlbAMCCtEet0Qdh/jcRs+Ku2M2i/BoNz52/A9byguBx7ZhqmzQWoSrFPg2yTI/etwi4RXTmS3EBC1GOM+Gbm9m+NQ2u8qmGL744iq5WMkTDW786YTWF8DAAszMK8s+p9v/tbb4u1ixpu5EfiWzc6I74vG5lV2h0xh+Fs9UEL++wKFC9t0QCLZkP4/HkfMz9hlzJzZK2xHIUX62I36SnWdBsVzsd6Zld5fkBMu4qujGQ7gP0r9QNMHclNYtCvpr8fiNML9P5lYWa1ZIQvF3SL+Xw9EZwVRM2C3rh4U/maaYXNjrN5BsCMnRdi7dUV7LC1oZs44nJiwILcoDIs0WUkmel5h22UGFxC/GtwJ09Od0lt+vk5ZS7FqIBAGoWwlkNnkR84Lk7HPTBSWmCd6lI+CSWssz8eX8/GMUVyc8SinmmqpewbsTGPcikgcvPpaBlInTPo/Icw7lFdI4bBTz4dpRxj/PlhJzCW0ar01FXcGJNbiKSH84O3bnXGqUWr030IzT+h9SobjHuCoOjhWzOIUfLI3fD8aMY+9CWNHhrdmu1k8X+psjmLHKHPfLZrkLbR4BMXFJrxH2u0XiOWKPlBOaU9LXksVeIKNmLXe41xnEJ25D/baBc1QOGtzy23KwDDn9QlPxm4lRRsGzjhhFIv+5eQ== X-For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Io1PGCzNeTvykCikui3VmuH0mS72PHkRdsjCCaabrf31689ZmKz8g== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Mar 2017 10:06:36.4508 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB183 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170317_030654_556160_59E29351 X-CRM114-Status: GOOD ( 13.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Claudiu Manoil , Cristian Stoica , Dan Douglass , linux-arm-kernel@lists.infradead.org, Vakul Garg , "David S. Miller" , Alexandru Porosanu , linux-crypto@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Export qman_query_fq_np() function and related structures. This will be needed in the caam/qi driver, where "queue empty" condition will be decided based on the frm_cnt. Signed-off-by: Horia Geantă --- drivers/soc/fsl/qbman/qman.c | 4 +-- drivers/soc/fsl/qbman/qman_priv.h | 61 ----------------------------------- include/soc/fsl/qman.h | 68 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 63 deletions(-) diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c index 6f509f68085e..3d891db57ee6 100644 --- a/drivers/soc/fsl/qbman/qman.c +++ b/drivers/soc/fsl/qbman/qman.c @@ -2019,8 +2019,7 @@ int qman_query_fq(struct qman_fq *fq, struct qm_fqd *fqd) return ret; } -static int qman_query_fq_np(struct qman_fq *fq, - struct qm_mcr_queryfq_np *np) +int qman_query_fq_np(struct qman_fq *fq, struct qm_mcr_queryfq_np *np) { union qm_mc_command *mcc; union qm_mc_result *mcr; @@ -2046,6 +2045,7 @@ static int qman_query_fq_np(struct qman_fq *fq, put_affine_portal(); return ret; } +EXPORT_SYMBOL(qman_query_fq_np); static int qman_query_cgr(struct qman_cgr *cgr, struct qm_mcr_querycgr *cgrd) diff --git a/drivers/soc/fsl/qbman/qman_priv.h b/drivers/soc/fsl/qbman/qman_priv.h index 64781eff6974..22725bdc6f15 100644 --- a/drivers/soc/fsl/qbman/qman_priv.h +++ b/drivers/soc/fsl/qbman/qman_priv.h @@ -89,67 +89,6 @@ static inline u64 qm_mcr_querycgr_a_get64(const struct qm_mcr_querycgr *q) return ((u64)q->a_bcnt_hi << 32) | be32_to_cpu(q->a_bcnt_lo); } -/* "Query FQ Non-Programmable Fields" */ - -struct qm_mcr_queryfq_np { - u8 verb; - u8 result; - u8 __reserved1; - u8 state; /* QM_MCR_NP_STATE_*** */ - u32 fqd_link; /* 24-bit, _res2[24-31] */ - u16 odp_seq; /* 14-bit, _res3[14-15] */ - u16 orp_nesn; /* 14-bit, _res4[14-15] */ - u16 orp_ea_hseq; /* 15-bit, _res5[15] */ - u16 orp_ea_tseq; /* 15-bit, _res6[15] */ - u32 orp_ea_hptr; /* 24-bit, _res7[24-31] */ - u32 orp_ea_tptr; /* 24-bit, _res8[24-31] */ - u32 pfdr_hptr; /* 24-bit, _res9[24-31] */ - u32 pfdr_tptr; /* 24-bit, _res10[24-31] */ - u8 __reserved2[5]; - u8 is; /* 1-bit, _res12[1-7] */ - u16 ics_surp; - u32 byte_cnt; - u32 frm_cnt; /* 24-bit, _res13[24-31] */ - u32 __reserved3; - u16 ra1_sfdr; /* QM_MCR_NP_RA1_*** */ - u16 ra2_sfdr; /* QM_MCR_NP_RA2_*** */ - u16 __reserved4; - u16 od1_sfdr; /* QM_MCR_NP_OD1_*** */ - u16 od2_sfdr; /* QM_MCR_NP_OD2_*** */ - u16 od3_sfdr; /* QM_MCR_NP_OD3_*** */ -} __packed; - -#define QM_MCR_NP_STATE_FE 0x10 -#define QM_MCR_NP_STATE_R 0x08 -#define QM_MCR_NP_STATE_MASK 0x07 /* Reads FQD::STATE; */ -#define QM_MCR_NP_STATE_OOS 0x00 -#define QM_MCR_NP_STATE_RETIRED 0x01 -#define QM_MCR_NP_STATE_TEN_SCHED 0x02 -#define QM_MCR_NP_STATE_TRU_SCHED 0x03 -#define QM_MCR_NP_STATE_PARKED 0x04 -#define QM_MCR_NP_STATE_ACTIVE 0x05 -#define QM_MCR_NP_PTR_MASK 0x07ff /* for RA[12] & OD[123] */ -#define QM_MCR_NP_RA1_NRA(v) (((v) >> 14) & 0x3) /* FQD::NRA */ -#define QM_MCR_NP_RA2_IT(v) (((v) >> 14) & 0x1) /* FQD::IT */ -#define QM_MCR_NP_OD1_NOD(v) (((v) >> 14) & 0x3) /* FQD::NOD */ -#define QM_MCR_NP_OD3_NPC(v) (((v) >> 14) & 0x3) /* FQD::NPC */ - -enum qm_mcr_queryfq_np_masks { - qm_mcr_fqd_link_mask = BIT(24)-1, - qm_mcr_odp_seq_mask = BIT(14)-1, - qm_mcr_orp_nesn_mask = BIT(14)-1, - qm_mcr_orp_ea_hseq_mask = BIT(15)-1, - qm_mcr_orp_ea_tseq_mask = BIT(15)-1, - qm_mcr_orp_ea_hptr_mask = BIT(24)-1, - qm_mcr_orp_ea_tptr_mask = BIT(24)-1, - qm_mcr_pfdr_hptr_mask = BIT(24)-1, - qm_mcr_pfdr_tptr_mask = BIT(24)-1, - qm_mcr_is_mask = BIT(1)-1, - qm_mcr_frm_cnt_mask = BIT(24)-1, -}; -#define qm_mcr_np_get(np, field) \ - ((np)->field & (qm_mcr_##field##_mask)) - /* Congestion Groups */ /* diff --git a/include/soc/fsl/qman.h b/include/soc/fsl/qman.h index 10b549783ec5..0252c32f7421 100644 --- a/include/soc/fsl/qman.h +++ b/include/soc/fsl/qman.h @@ -811,6 +811,67 @@ struct qman_cgr { #define QMAN_VOLATILE_FLAG_WAIT_INT 0x00000002 /* if wait, interruptible? */ #define QMAN_VOLATILE_FLAG_FINISH 0x00000004 /* wait till VDQCR completes */ +/* "Query FQ Non-Programmable Fields" */ +struct qm_mcr_queryfq_np { + u8 verb; + u8 result; + u8 __reserved1; + u8 state; /* QM_MCR_NP_STATE_*** */ + u32 fqd_link; /* 24-bit, _res2[24-31] */ + u16 odp_seq; /* 14-bit, _res3[14-15] */ + u16 orp_nesn; /* 14-bit, _res4[14-15] */ + u16 orp_ea_hseq; /* 15-bit, _res5[15] */ + u16 orp_ea_tseq; /* 15-bit, _res6[15] */ + u32 orp_ea_hptr; /* 24-bit, _res7[24-31] */ + u32 orp_ea_tptr; /* 24-bit, _res8[24-31] */ + u32 pfdr_hptr; /* 24-bit, _res9[24-31] */ + u32 pfdr_tptr; /* 24-bit, _res10[24-31] */ + u8 __reserved2[5]; + u8 is; /* 1-bit, _res12[1-7] */ + u16 ics_surp; + u32 byte_cnt; + u32 frm_cnt; /* 24-bit, _res13[24-31] */ + u32 __reserved3; + u16 ra1_sfdr; /* QM_MCR_NP_RA1_*** */ + u16 ra2_sfdr; /* QM_MCR_NP_RA2_*** */ + u16 __reserved4; + u16 od1_sfdr; /* QM_MCR_NP_OD1_*** */ + u16 od2_sfdr; /* QM_MCR_NP_OD2_*** */ + u16 od3_sfdr; /* QM_MCR_NP_OD3_*** */ +} __packed; + +#define QM_MCR_NP_STATE_FE 0x10 +#define QM_MCR_NP_STATE_R 0x08 +#define QM_MCR_NP_STATE_MASK 0x07 /* Reads FQD::STATE; */ +#define QM_MCR_NP_STATE_OOS 0x00 +#define QM_MCR_NP_STATE_RETIRED 0x01 +#define QM_MCR_NP_STATE_TEN_SCHED 0x02 +#define QM_MCR_NP_STATE_TRU_SCHED 0x03 +#define QM_MCR_NP_STATE_PARKED 0x04 +#define QM_MCR_NP_STATE_ACTIVE 0x05 +#define QM_MCR_NP_PTR_MASK 0x07ff /* for RA[12] & OD[123] */ +#define QM_MCR_NP_RA1_NRA(v) (((v) >> 14) & 0x3) /* FQD::NRA */ +#define QM_MCR_NP_RA2_IT(v) (((v) >> 14) & 0x1) /* FQD::IT */ +#define QM_MCR_NP_OD1_NOD(v) (((v) >> 14) & 0x3) /* FQD::NOD */ +#define QM_MCR_NP_OD3_NPC(v) (((v) >> 14) & 0x3) /* FQD::NPC */ + +enum qm_mcr_queryfq_np_masks { + qm_mcr_fqd_link_mask = BIT(24) - 1, + qm_mcr_odp_seq_mask = BIT(14) - 1, + qm_mcr_orp_nesn_mask = BIT(14) - 1, + qm_mcr_orp_ea_hseq_mask = BIT(15) - 1, + qm_mcr_orp_ea_tseq_mask = BIT(15) - 1, + qm_mcr_orp_ea_hptr_mask = BIT(24) - 1, + qm_mcr_orp_ea_tptr_mask = BIT(24) - 1, + qm_mcr_pfdr_hptr_mask = BIT(24) - 1, + qm_mcr_pfdr_tptr_mask = BIT(24) - 1, + qm_mcr_is_mask = BIT(1) - 1, + qm_mcr_frm_cnt_mask = BIT(24) - 1, +}; + +#define qm_mcr_np_get(np, field) \ + ((np)->field & (qm_mcr_##field##_mask)) + /* Portal Management */ /** * qman_p_irqsource_add - add processing sources to be interrupt-driven @@ -1033,6 +1094,13 @@ int qman_alloc_fqid_range(u32 *result, u32 count); */ int qman_release_fqid(u32 fqid); +/** + * qman_query_fq_np - Queries non-programmable FQD fields + * @fq: the frame queue object to be queried + * @np: storage for the queried FQD fields + */ +int qman_query_fq_np(struct qman_fq *fq, struct qm_mcr_queryfq_np *np); + /* Pool-channel management */ /** * qman_alloc_pool_range - Allocate a contiguous range of pool-channel IDs