From patchwork Mon Dec 11 08:06:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 10104405 X-Patchwork-Delegate: kvalo@adurom.com 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 836AB602A7 for ; Mon, 11 Dec 2017 08:06:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 626A6294AF for ; Mon, 11 Dec 2017 08:06:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 57201294B4; Mon, 11 Dec 2017 08:06:59 +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=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CBC59294AF for ; Mon, 11 Dec 2017 08:06:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751356AbdLKIG6 (ORCPT ); Mon, 11 Dec 2017 03:06:58 -0500 Received: from mail-co1nam03on0116.outbound.protection.outlook.com ([104.47.40.116]:59698 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750707AbdLKIG4 (ORCPT ); Mon, 11 Dec 2017 03:06:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cycorp.onmicrosoft.com; s=selector1-cypress-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=z6rtzY9/86QRKyc/g/zDEGQOtfWnR1rh7MJEsGqPab0=; b=pWEuHK4mz98ei5dxKMLmE84ZOjVp7IGfGbUba30p2o2cnsSfqqgiRT1dq+MhM8Fo+F9t8s8/tXtNCZ4PI4ATIIpbheWvvzUBCGfQfJRcpmhy7hdbJvvQqaJQMXiEGu4z3hJcSt2lvCG7hsQE2se8EOTSaEAkiBxlsfPUQ0a3nUs= Received: from aremote07.aus.cypress.com (12.110.209.130) by MWHPR06MB3232.namprd06.prod.outlook.com (10.174.248.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Mon, 11 Dec 2017 08:06:53 +0000 Date: Mon, 11 Dec 2017 02:06:46 -0600 From: Chi-Hsien Lin To: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list , brcm80211-dev-list.pdl@broadcom.com, franky.lin@broadcom.com, hante.meuleman@broadcom.com, Wright Feng , Stanley Hsu , devicetree@vger.kernel.org Subject: [PATCH V2] brcmfmac: Add sg parameters dts parsing Message-ID: <20171211080640.GA132360@aremote07.aus.cypress.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-12-10) X-Originating-IP: [12.110.209.130] X-ClientProxiedBy: SN4PR0401CA0002.namprd04.prod.outlook.com (10.171.32.12) To MWHPR06MB3232.namprd06.prod.outlook.com (10.174.248.158) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6d07e7c9-4bc7-45a9-c0be-08d5406e2413 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(2017052603307); SRVR:MWHPR06MB3232; X-Microsoft-Exchange-Diagnostics: 1; MWHPR06MB3232; 3:tJRCXQrR7ulil1jaPBQ5kL9xrjb/BCLAtCOgqpqkPKXfckuxK1fbKNm+LN/zkEJefs/QzBdpbasGUbYF8ETVUSDkNzwZ+IPMYArELrVf+LW7hL5AeBAKlYK3F7jodiCFAt96FPQBHIssWOIiSCVX/fGzpY215WxMZz5EkaJPRLx3Gg+RDsE2Ixky1V+lcWrIKaq3K0QL4iVV8VncDCiaTB01Qoqbj2yVBCz8gQ7SkS2O8TuXZhI8uKS5fgeeMaw0; 25:LXhKG74FkIW8ew5SSsAJt5zoIJoa0dvKwBfzH6ZyzpEQ+NXcU+Yhun0d4+56NLtXhStojfJNQM/ekJuicNjUaudcf1tZWe8OLCTcJj5iKVUNC45RNAmhnyaTSJUJE4X6Q4y2TdyScLRrxPLhe5Eran0gkEabDw4GnQO5DXTxLsCGHH8TW6OroN0Om7RnvUK6Zwczp3C8AK5v2C+SBc4IFmtLCvF5rW/3C0NFk2g2BMDxyoX62Y5Hy+86CtcmCuSIPeRiQSCtsk3o0/NqaKDLylVV980r7NFjZPKrWi31+0EfRZBCBlOvyxdDv8unADqte7itOFZxviYGtSsHt1OV0A==; 31:DHHe+TEitTpCUV/CVUaTD73LLZP3LHyKeZRc+Rp//Axvc2m4vVf+PKjTrXCmhOHpAdP3o5bicd3hXdpPHgf1NPen+XbcghG+LfctHQKKOiCp1u2dk14pc4qGl6X/oDSdzfnm6TXFhnU86JO22pWMAiQHc3tNUogdHeP0RcBbx7R6BeKJZP05E7QI7dRH9RqhkZZ6FFmTEfn4billt1vgoxYBWKuJRvYeYoSqP6ji57g= X-MS-TrafficTypeDiagnostic: MWHPR06MB3232: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Chi-Hsien.Lin@cypress.com; X-Microsoft-Exchange-Diagnostics: 1; MWHPR06MB3232; 20:6RIiDesiXUXkbq+GUHFyQUx8a3KMCx7S8kUdP0Y/pyfQyqTOi83AXc8A+4Lxw+ynEU3n4MPiw7Demj++gzntM2s9f/+hMFyuzAP3LQgzBl9dFv0Xg70KstYLCOK8nkKi2Ic+RqhKQvqTcWikSiBvYYgdShr7QLqbxuEjqkXgdGkCDmKGg4pPE2XZQv4+CyMhpKcncxPWfhAISCQMfNxNDAQxmjJifQAZkuk1a/m1AOb7/Ac/4Nq913AOtcuUP/Dv403I2QqFTGcyMNhM7kSk9HN83LE4lLgwMr9cznmvlzg7n6NPddMtSIcr3GHvc00exLvKEbNDMCb87xH1cQy3vej68xvwL+zcLOXj7bBVogqQHI0xVYhUv3NMvGandLjqX+GIg87JPSHoCVQpMNxb9qRquJ3m4QqFepHUainHgLCVqiQR8fgxuxjPUym9Iq8m2ZH9j/L5y4gXsHSrshHh0yQ8Ue71AsWqQjyyfTvNqk0EhDad7DQC8v5idzTNW6G9zucXg02nOFv6B+DWi2usRdKVNPwvrRG/F42ICWWifljmwwmS4QwQ4JiL9RAWC5JdC5U97x/wqqn8s7O7dOqSywwoexNt8gNXeLrnuBejHqY=; 4:GHuxP46rhvs4I9/YaqwRSAnjPalnhE6t3AtvoLsyy/woGRamPLfH6rn6WejXg7/wdVigqqS39Wug94clgog1+/U0pki3MeH+7qLmbyA+6OcIBcmYFUsyCH4WL65IKpqj+JEJeBpqDyiFcmH8lgXZyd9HQeD0lStQiZVWmwdw9Xc6GSjRexy3UHRN8HzexqkR7XFe/RXQY01TxFLdK54wp138GGkfD7qBMVI2xuPfiAEQsM5WXyQNt02fW/Ksvq5kmW7/PqMjTt+VcvyvMa+0pYv/HHKqtBO0s8OY6ILLz/ExSaGsq5f8chCOqA Qas8k5 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(258095267146985); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(3231022)(6055026)(6041248)(20161123562025)(20161123564025)(20161123560025)(20161123555025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:MWHPR06MB3232; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:MWHPR06MB3232; X-Forefront-PRVS: 0518EEFB48 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(39860400002)(366004)(346002)(376002)(199004)(189003)(7736002)(47776003)(5660300001)(6916009)(81166006)(8676002)(50466002)(305945005)(81156014)(478600001)(72206003)(6116002)(3846002)(66066001)(6666003)(1076002)(23726003)(16586007)(2906002)(2351001)(16526018)(106356001)(25786009)(316002)(33656002)(54906003)(8936002)(58126008)(68736007)(4326008)(105586002)(2361001)(55016002)(83506002)(53936002)(52116002)(86362001)(7696005)(97736004)(87496004)(18370500001); DIR:OUT; SFP:1102; SCL:1; SRVR:MWHPR06MB3232; H:aremote07.aus.cypress.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cypress.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR06MB3232; 23:3jZk1ryvnsiYFKJH6mAEJmo4biYyW4XsjntQEBpLX?= =?us-ascii?Q?tMVj8rwMZdO4jLGVmU+qw+/T9QcVh//Nrnr7Tsx+8NmERgNuDoba7CVxeGdZ?= =?us-ascii?Q?DrdbABV+4HpYjxkuT9ktN3ufwzPlu6vC+kHAhYeU+sjoy6E8eXbucroczao6?= =?us-ascii?Q?xqLbzzSymMleOKRcRg8PCR1jav3IEocxYfnzhC/SQOPDWx0wEFKS4qvrX7Fu?= =?us-ascii?Q?zt+Tgev1H6iv6fKzpzz2LDL7mvKUY6s9fAjbozh4zlkl5wYZyE2V8f48U1ZT?= =?us-ascii?Q?kbGpk4XsdDgf77JYLV4Vb+bUd9rf+Mv9ilgXH2wyR3C9gc9R9UsggJ7Lc/tv?= =?us-ascii?Q?7FEaDQwfjXjIdunv2HEhkvzbgNO13ML03UrKS90CV8Vk7+zUU2MedmMDmuJM?= =?us-ascii?Q?J09ZBUgK8WOiEWDBzMiOAaWtyLZIHpfQbTTL3a5yMobXADFR1i4KTIPw0X2s?= =?us-ascii?Q?EWiwNCSFGgr4Vx8UQKl0y9o162ERRM1RwavPQC7czW2+u4F6r0pYY6CsaAlO?= =?us-ascii?Q?qQLxu0BR6uF+JmR9ZVtFsRONdRctYqLrprT0PgDPyyXlD6/bH+Uc+f1BC3L3?= =?us-ascii?Q?MA/s01Llhd7Namqh7VvxFhc60pLIFHqsBNnuVbPhLNFxprPOO7JeGyVhlvo+?= =?us-ascii?Q?UtlquYoA491vgsfT30NqtDqHM7We0D418/2jcphlQzuUTNgPPDhAmD6pBUaO?= =?us-ascii?Q?J/s7pEq+K+kDF2352/a6/YnIKORcfHOoijTjkG97Z28Coo4BndmiSYy2b3WS?= =?us-ascii?Q?fbjpHCksA3Gt56vOlnEf/yeCfaMQfmD/U2dVT1LDfwC9tnr83JbpOxm8DUHY?= =?us-ascii?Q?yPWWfAmYaPWI5yNmBteGIueecuvQiSfatuA0ZkQDK24Ndz3PQFTvfF84qGce?= =?us-ascii?Q?HaiioSTq6MxEStKevTZ/VXgxF4aZesn42CmJgZ34y5gDZMykPwLP4pEbNwm+?= =?us-ascii?Q?Z0O1nzfSkJ3xeUeBytDfKjJwrmYRaRFBrt0EK2eVNsYVa0Kp7pKhPNvJ2Lpv?= =?us-ascii?Q?/+C76WpVtcK5u0gQinm+XsZzV6XlhLurJH4HGQK4ACBc0S7LTKkSP6JX8F54?= =?us-ascii?Q?f+pmineVxXUgsIrcTYwNkqNmomQlWNGy+kcrO6CmIKH8Hb4dw=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR06MB3232; 6:dINL/K1LwUMVgj3JVpQorzy8NmUS5jOh+ichMNgw511PYYtTAD79f9Ovg6BSwejRar1eigK14awgv2hu43tk3rFQBJWGVM32CC0YpbKh7EE3n0IREnktVNoAro92TZE/L3mWqtvavpeKQh2eaFhlljwDy8+vMegz5UNH83kApKhXCes29Jkp2ld9I0C14jVJxTAsqlEusKRD2qD8wVfgc5U2MF9G8r5lnksmy5sv1RcSWLsPkN6v0tTa4whcQWq97eRpzOh/vOq9Uc1d/XHtjmGTYqG1bveJzbHikff4EA7QBxeRshvATtfFXH78a4VN3v8vOpXk62qZAjPyzUvLEWYSAZHnGlbFw41dbPZY9Qw=; 5:pVcJaEKBwLmoUSJeQMZd//SHKt8nQHCAulDfIWiqqIt5ivO5eahG4xPH/O56737XvGHLZzQrSkIgMfqjigH+eivdprNEfjLbjUPagJTlcPDPqIZN7qresUHQskWqM0DleTueIsV+De+wnV5zvbw/XNd2KRL19yVDBd7HtP1/00M=; 24:YT8/mc2Tic3o154rY5QJ9XKGNhkk9kq+pfBfP48HdOln05LX4kKDG4TmAMHB5+uNPNt+dq1juRp6LdlqEYjcyJ4eCOH6SdF5ESIl1e8T1Dg=; 7:Qow2mXv73WDVLVUE0BhOhFeHXXBmwNt8e6Kt/2Ezpdbf2S5g1WqoUSN/RF7p9gMHOiZR7ViQeqSnwwvpKUSvaw3TIwq2S3s0zRyC2Nev4ENWHpg2+HB+F/04UsWXj6zpjYk7aJR6HHOBnjZjbfRh5e1jF+77Eyix0Nvs+drJbqYdMrbcS/uFXzepkQgZL9XwR/RC5nGuTcDZj/me3qlaRQd9tMcQ+il6eWR+dwdJWtCe9ao9VnNiKaSZTT0O8jAY SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Dec 2017 08:06:53.2553 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6d07e7c9-4bc7-45a9-c0be-08d5406e2413 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR06MB3232 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP broken_sg_support, sd_head_align, and sd_sgentry_align are used in brcmfmac code but not configurable in dts file. Add the parsing logic. Now they can be configured like below in dts: brcm,broken_sg_support; brcm,sd_head_align = <4>; brcm,sd_sgentry_align = <4>; Signed-off-by: Chi-hsien Lin --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c index aee6e59..fd028b1 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c @@ -39,6 +39,13 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, if (of_property_read_u32(np, "brcm,drive-strength", &val) == 0) sdio->drive_strength = val; + sdio->broken_sg_support = of_property_read_bool(np, + "brcm,broken_sg_support"); + if (of_property_read_u32(np, "brcm,sd_head_align", &val) == 0) + sdio->sd_head_align = (u16)val; + if (of_property_read_u32(np, "brcm,sd_sgentry_align", &val) == 0) + sdio->sd_sgentry_align = (u16)val; + /* make sure there are interrupts defined in the node */ if (!of_find_property(np, "interrupts", NULL)) return;