From patchwork Sun Sep 2 13:03:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 145734 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp1493069ljw; Sun, 2 Sep 2018 06:36:31 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaPxyhH+hVjNnEVlqxSvi+JuApgmmmtBlVmIAuOqqo0No9JgrUiTAz0vrdGU8nb4gCyo2aG X-Received: by 2002:a17:902:6501:: with SMTP id b1-v6mr24017837plk.31.1535895391413; Sun, 02 Sep 2018 06:36:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535895391; cv=none; d=google.com; s=arc-20160816; b=DtRoCdDXQfev5jBhn6SUis1fIeV5azCfVCzN6GZgzAx3bBRFkppT2Xs1JZX5MjhN8e wMXGeVF1ymv/hUVjaOtlijAnQgQM6YNGrVQaazH0dQhIV/w4eoa9WlE48MIPeV3UV6B4 0wULlHjQFjqOUXgOCS4OO25Z61O7bc1glr/ci+KVrxb4ybgGjLNWBlIEOeQf8CAxHk8o Bjdc6Mez4xIY9B1F/tcvxCPfgHPk3lijdKlDxi+D1HPu5JmAAHRgyaifQjM42UMXu0UO CVX0+atD9YU0j//d2t2UmHI9FEv9s9wulel+bawvMbNjoFp+oYUanTQuFoAWeW7DKF0e P6Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=WzxqCmUyRWazx6DN8Tz7zJI+x0QMykD/+dBwuIMc4Vw=; b=C77IdKYIy/soEIJ8z30Owj0XxCU+tuvxqF3xWHuP5uDaT8QVA3RZnuSn8TpBrzAU3E 772hJAkQ/W8H492Pji3JfJmPeu0a2I2Qhyqd4amCh1xSSVTxOb2Sg3pk+lCIWrVxAvq3 I5R29NsLjk4YShOkolmWsxfIEIfSN0Feein+HfrSz4LnMvCat6zcNKJKvK1e7WvXliEs Vh5Jhnm/jbRvyJlBVCBEnx53osbu/mUBd7f8+k2Zi/aIZi3h8u0XcOTA7Egb0ARgNwUf FgyyqrL46iCVjAc9EqpGMsYgK3DiEBJHGshh9LkAfY7OVYnLxGdeIA5itB3rauvD/X7k bRjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=nxNQMn34; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d6-v6si14829064pgh.569.2018.09.02.06.36.31; Sun, 02 Sep 2018 06:36:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=nxNQMn34; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727634AbeIBRTj (ORCPT + 32 others); Sun, 2 Sep 2018 13:19:39 -0400 Received: from mail-cys01nam02on0094.outbound.protection.outlook.com ([104.47.37.94]:40784 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726155AbeIBRTh (ORCPT ); Sun, 2 Sep 2018 13:19:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WzxqCmUyRWazx6DN8Tz7zJI+x0QMykD/+dBwuIMc4Vw=; b=nxNQMn34iCD4Lcrlh4o1FYBvpanKL14wOhaYoBXYo4V81Clsh8L+gBAM7y4+y/OnpGg4ei26ZJSYGUBKKO0feklSLFJjl5v0GKe6tijFhVUdyw4voE6ur8L0IdYwr38Nlv2GF5NWZSY9lMN++9HHNYnD/2f6L9YOHo1bU53kwdY= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0150.namprd21.prod.outlook.com (10.173.189.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.4; Sun, 2 Sep 2018 13:03:31 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611%7]) with mapi id 15.20.1143.000; Sun, 2 Sep 2018 13:03:31 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Todor Tomov , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH AUTOSEL 4.18 026/131] media: camss: csid: Configure data type and decode format properly Thread-Topic: [PATCH AUTOSEL 4.18 026/131] media: camss: csid: Configure data type and decode format properly Thread-Index: AQHUQr1ZjMjLYkZLT0GOIisEcsdxng== Date: Sun, 2 Sep 2018 13:03:31 +0000 Message-ID: <20180902064601.183036-26-alexander.levin@microsoft.com> References: <20180902064601.183036-1-alexander.levin@microsoft.com> In-Reply-To: <20180902064601.183036-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR21MB0150; 6:NG1CWQ30iUIYNXNsburUakFiXOBPDfFIiK8miWlLKwH/GPFWCMvHl1HW2Cjnu4pJnBD+D9ajOYt3eH6NAXN3ab+DOeR7LQJxTC7HgNsVtKkECspKQ+CutJeRsP7l2RuGZiMEYE+tOLYvCxSpFWpm6oRdYpudmc0sedqYPS/VduaUiXasmZgY4H9wuQVNFGYqlGJ8jdeO8xoYtBMOfEEMDVpq6UO59ONC68Rok370aeeTFc3Lu/jS68k2mW6I7YlM86xfx6YOfUzSJxIOWvOoepeYy3U/9fxJWCWKAozoiaSHojOjx0YXbnjzb5m77bNcBTHOd4JtuTn7OJlAIWe/dGdCoIF9sBLkNiODCuwRCDiVcR/0fvmaQlLFZEEiRp+sZ/smMuEOLkG8TorOiHNe1gY5hR1kBuXjJiHRW08XJZ8vCZNjhdMkl2GLI4rHAvF0uNM1hueELw3DLjPLloeFMw==; 5:LC7ypuWpBxCJSsJLRQgZZade5k9/PNO+iirm2gA5Lk9YjpQBetZilPYa80ut3FpJZUsyqDtsnwZx213jCfQQ+VvUuTH4lO9wKv4gLnMcib3TsoOhcjJ+Q086oFcvcK9Cx/Ez0xq9+bpBY14AEj+myGlh5xZKZaMAlx6+ZDYsj+c=; 7:NYhRmskXv7+zngxYTtQiRLXZevioo815bJFzxynkLEn4q+USGd+fKcdU5DftL7tTypzkdjx/YDIDxZBPo2+OI+a+jlotyKGOqzeAALH9JebUnCVrL4MVnwcxkTCdtC6J6YbBHdEmTX7XPvDEl3pmpFJFLO0SKf68TZ4L3kb/rn1WKbM/ct4Tee+t54q0AymfGmEfmTej5UL2HmUyxIMZDLSnFEhAzqZzMfQX2cFIutBYiQlQvX3oCrrnV7i3muzc x-ms-office365-filtering-correlation-id: b3624f96-9428-4b97-0eb4-08d610d47bbf x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(4534165)(4627221)(201703031133081)(201702281549075)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:CY4PR21MB0150; x-ms-traffictypediagnostic: CY4PR21MB0150: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(95692535739014); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231340)(944501410)(52105095)(2018427008)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(20161123564045)(20161123562045)(201708071742011)(7699049)(76991033); SRVR:CY4PR21MB0150; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0150; x-forefront-prvs: 078310077C x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(979002)(396003)(366004)(39860400002)(376002)(346002)(136003)(199004)(189003)(256004)(22452003)(2906002)(217873002)(3846002)(68736007)(10090500001)(6506007)(6116002)(1076002)(6436002)(102836004)(486006)(53936002)(76176011)(106356001)(105586002)(7736002)(305945005)(8676002)(316002)(5660300001)(6512007)(99286004)(36756003)(4326008)(97736004)(5250100002)(2616005)(476003)(2900100001)(11346002)(186003)(2501003)(81166006)(26005)(8936002)(81156014)(110136005)(54906003)(107886003)(66066001)(478600001)(86612001)(14454004)(6346003)(6486002)(10290500003)(86362001)(72206003)(25786009)(446003)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0150; H:CY4PR21MB0776.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: OC/227+/oOWqjmk/i81GVSHasdXbJr4WVcBaZBD8CE8kdDiX5vGucVUldDRBuOGyMUVWEs5kBJ37ysKZMEWUU1SYHb7Rqtc9+WkQIvYpKcX/TWEM96m3+vCBeqgv8iD7M/njlhrdyi0ryy8YPSQxKzP6AARCGoRl6/qn3CpDWWYAPUbxS89H+lblQ0Fz/e3mt4GxLzfwggGUlS6mfyUE8iuEhsMcE6izMhMlKdreY4SluaViL99FuUm0hFbkTPCLfcMUpXmqsidneo9v2lKUUIvqml+m1+hepsuYRcjrpXKFoc2A5+fEXnwxa0p5vCfO5Cgx0kz1T8sBg0zk5ltJ9HhAMUVT3fh+B60V8npnOlo= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: b3624f96-9428-4b97-0eb4-08d610d47bbf X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Sep 2018 13:03:31.3052 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0150 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Todor Tomov [ Upstream commit c628e78899ff8006b5f9d8206da54ed3bb994342 ] The CSID decodes the input data stream. When the input comes from the Test Generator the format of the stream is set on the source media pad. When the input comes from the CSIPHY the format is the one on the sink media pad. Use the proper format for each case. Signed-off-by: Todor Tomov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- .../media/platform/qcom/camss-8x16/camss-csid.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) -- 2.17.1 diff --git a/drivers/media/platform/qcom/camss-8x16/camss-csid.c b/drivers/media/platform/qcom/camss-8x16/camss-csid.c index 226f36ef7419..2bf65805f2c1 100644 --- a/drivers/media/platform/qcom/camss-8x16/camss-csid.c +++ b/drivers/media/platform/qcom/camss-8x16/camss-csid.c @@ -392,9 +392,6 @@ static int csid_set_stream(struct v4l2_subdev *sd, int enable) !media_entity_remote_pad(&csid->pads[MSM_CSID_PAD_SINK])) return -ENOLINK; - dt = csid_get_fmt_entry(csid->fmt[MSM_CSID_PAD_SRC].code)-> - data_type; - if (tg->enabled) { /* Config Test Generator */ struct v4l2_mbus_framefmt *f = @@ -416,6 +413,9 @@ static int csid_set_stream(struct v4l2_subdev *sd, int enable) writel_relaxed(val, csid->base + CAMSS_CSID_TG_DT_n_CGG_0(0)); + dt = csid_get_fmt_entry( + csid->fmt[MSM_CSID_PAD_SRC].code)->data_type; + /* 5:0 data type */ val = dt; writel_relaxed(val, csid->base + @@ -425,6 +425,9 @@ static int csid_set_stream(struct v4l2_subdev *sd, int enable) val = tg->payload_mode; writel_relaxed(val, csid->base + CAMSS_CSID_TG_DT_n_CGG_2(0)); + + df = csid_get_fmt_entry( + csid->fmt[MSM_CSID_PAD_SRC].code)->decode_format; } else { struct csid_phy_config *phy = &csid->phy; @@ -439,13 +442,16 @@ static int csid_set_stream(struct v4l2_subdev *sd, int enable) writel_relaxed(val, csid->base + CAMSS_CSID_CORE_CTRL_1); + + dt = csid_get_fmt_entry( + csid->fmt[MSM_CSID_PAD_SINK].code)->data_type; + df = csid_get_fmt_entry( + csid->fmt[MSM_CSID_PAD_SINK].code)->decode_format; } /* Config LUT */ dt_shift = (cid % 4) * 8; - df = csid_get_fmt_entry(csid->fmt[MSM_CSID_PAD_SINK].code)-> - decode_format; val = readl_relaxed(csid->base + CAMSS_CSID_CID_LUT_VC_n(vc)); val &= ~(0xff << dt_shift); From patchwork Sun Sep 2 13:04:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 145732 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp1490496ljw; Sun, 2 Sep 2018 06:33:19 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZNpQeoXZnnzpYlX21Nu9x5/gq+3wGj/D6Ca8/N92yDKxRoKMoxnmXJZbhr0zJKN1w4r0Ri X-Received: by 2002:a17:902:aa05:: with SMTP id be5-v6mr22679697plb.313.1535895199273; Sun, 02 Sep 2018 06:33:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535895199; cv=none; d=google.com; s=arc-20160816; b=edzKRDFGawr0PY91IxJ9jxmp4gFXG861sFMPAorgKb8PtRw0FEMJr9o4a2KEIkeNeL uHOVY5/sf9TlBk6k37HlGV/ZbG69d6mlo0sE1mtPCHH8W3/DGJRF3KQY8dxpwEubVh6D C04nnonKfLmp7mAqnDjoYosIFt+WxyZPo/g7GpulC84BtKey9f7hFPCA589OOq9ggZhf J9ewZEanJ12eZscFSOJcYmVUk3Q5L2NB95g+/2jAT1x8MY2GUtwQlzBHKawR+gY22suL aLLQTvyHZ/3+OnKpKAMtLf5xdRhgTg4h9jw+yoyHF45qOJwZqCyI82Ep/Hmf3TS/ZhB1 q16w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=8movVkFd11BFbwEzn83QjVr6cJBPOMaHE9q6TWK0H48=; b=Yr4n0cGFG5WD0nbLOFySgqHvg4ybVP6bc9Vi6T2zwSe42jMOKAtVzOO0kR3Iw02AAO gEj+wz57DK4OBI0YlgoLNbwmhNcak5wylrosvqJFY4HKgAWxFhg/N7Umj+bnVs/yi4U5 y6UA8CM3GtRwPZFZ3CTx9730mMASVKqbH12Froxnz79B3Zmp14N7ojhaNyr1g4L8Zdv/ TRMPTvrLuokbu2PpfrqyiWzm+szbVSga6yQoZVBpsnunEbZP5sW/NZqK3jVk+w+syZDe Qk17omnCbPEkud0CpvtvBZcpIqmQEXaG2yW2XdmAzzkjM4RwPEYpvwc+3Jb1z6FvSTy4 c8mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=UO7N+XCE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e10-v6si14821239pgl.554.2018.09.02.06.33.19; Sun, 02 Sep 2018 06:33:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=UO7N+XCE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728586AbeIBRtJ (ORCPT + 32 others); Sun, 2 Sep 2018 13:49:09 -0400 Received: from mail-eopbgr700093.outbound.protection.outlook.com ([40.107.70.93]:58944 "EHLO NAM04-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728037AbeIBRUq (ORCPT ); Sun, 2 Sep 2018 13:20:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8movVkFd11BFbwEzn83QjVr6cJBPOMaHE9q6TWK0H48=; b=UO7N+XCEGuB8iHvC7EThha3kuMYJTWpPZlvNOK6sLNrQ2V8rRtfSxEN1IPjC7SpWbV7zlIQH8WGixEIkjs+QMqpUNAsySx5wY1bYWyx+kjby5Ibgv1QJb9tvWmxhh+T5OL7z3svJd1sE+Tfahx3oXuIkPSF9cISUpGX9uF3UII4= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0120.namprd21.prod.outlook.com (10.173.189.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.2; Sun, 2 Sep 2018 13:04:16 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611%7]) with mapi id 15.20.1143.000; Sun, 2 Sep 2018 13:04:16 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Loic Poulain , Kalle Valo , Sasha Levin Subject: [PATCH AUTOSEL 4.18 056/131] wlcore: Set rx_status boottime_ns field on rx Thread-Topic: [PATCH AUTOSEL 4.18 056/131] wlcore: Set rx_status boottime_ns field on rx Thread-Index: AQHUQr1xTCPRg7oR8ESovdBZKReQgw== Date: Sun, 2 Sep 2018 13:04:11 +0000 Message-ID: <20180902064601.183036-56-alexander.levin@microsoft.com> References: <20180902064601.183036-1-alexander.levin@microsoft.com> In-Reply-To: <20180902064601.183036-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR21MB0120; 6:FJfzGlYnFkSPDXeRtsKQArTFfSYCpVfrHIC6KiFZx1F+1qs62qNXcF2ngV/ZSpPQJ67X4eXtGHQEJkMFNcjM+fuD7yiRd+9oXAuiB4EnuoLT7xuZW53wCCiYSUJuL/W9vMXO9MlQApmlkv24L2SvbWwX21lI/8QUeoW5kcijjilY9ikjGNNoEZEYhW5erQIipCN4rVppcu87hAaA+5zS9ooXsgEUPTKif30osaicGRHrVRabAM9yzs/yKgSju+9zr463K1GIisbgmnwnFxSkVTke/UdAC7NqCtxZd6fKL8ERqJ6j7I7Tsgsokgv30fl819gGhzXSxRGZRdTHT9wPPsFetr6udUqK98WfcMNyFdBqIa7iUJPjvmv4wzmWwStJJh4TMa0rvhj+1bE1+MqLJMAyVGPuLkHcw1WmYBUUNK2VIW3W6zRjBD9NmhMYi2dmv86DfU4mGP47kmBXdakVVg==; 5:76lYTZ2p3aHAM0OGNNtao4rraG1aAUKUMtjBh1IrNc2jaFenJKwM4/DVnNeZa7QRPZaA9Z12bmWCazZCHf+qg3voLfzPjOsLM2UQzwaqgI51JzaymbbWl4120suhdFOZ9LrT9c/1VB1mWXYE9vd9A3JJxUQnbmqxS/LJMiLLzqA=; 7:Kt2GCpzkRr/6JxJ9HnienaFJbahv11/4K10qpCcw/96Lw+7vMqlDicrLGZc02prY5IKFDkM8tnih8OC9vQ3kR5DuJZsKtD+c0jR154oQLXWkApl/MVaybNebPOd8/XyWehPdynlIWfvJAEd3SxNWNzqT6z1gCA/JxAzxA6GtRu9MXIIt4295rhZG7o7KqnmaIV1MFFKYbb115xAJGviraLUD7HdQ0o2nFzn/WKHhxJ9ZVqWF9g9WHhA6otipCgpp x-ms-office365-filtering-correlation-id: 9c222fb5-12a0-44a4-290f-08d610d496d7 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(4534165)(4627221)(201703031133081)(201702281549075)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:CY4PR21MB0120; x-ms-traffictypediagnostic: CY4PR21MB0120: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231340)(944501410)(52105095)(2018427008)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(20161123564045)(20161123562045)(201708071742011)(7699049)(76991033); SRVR:CY4PR21MB0120; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0120; x-forefront-prvs: 078310077C x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(136003)(376002)(366004)(346002)(39860400002)(199004)(189003)(110136005)(5660300001)(107886003)(26005)(6506007)(6666003)(2900100001)(8936002)(68736007)(66066001)(99286004)(76176011)(217873002)(2906002)(1076002)(316002)(3846002)(6116002)(86612001)(14444005)(54906003)(6436002)(305945005)(7736002)(256004)(86362001)(6486002)(25786009)(10290500003)(478600001)(14454004)(476003)(22452003)(5250100002)(97736004)(106356001)(72206003)(53936002)(2501003)(2616005)(446003)(11346002)(6512007)(10090500001)(4326008)(36756003)(105586002)(102836004)(8676002)(81156014)(81166006)(186003)(486006)(83323001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0120; H:CY4PR21MB0776.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: EV2nLmhVJ3UzvkAAvZp2BGpOoYpIvJleQA7V5Y6y3yNcDkiJbsYoUn7b5fBhgi9HDCKzw16dREIcJzEHIBbt6imZCCQqhN9/4WrlTLc4a08TIc3XHwxh8WWPPh6hAWWaFylyK6Vz79v0mqRnBW7GGz0CuLBddpQGxJIJrQKpuIGHHs0DyGNJWXdC0QHrfZOgGX84mmaNf/mMpj+CCl831CWNfljeJ6ITZh2QA7a4YhTpfwwssW/FIE85FGZA/8tiIpeTNsRuSZIjmJAdVdTV/r4U7104uN+9auQj/UX8JdRVXhaV+pBLNUOEkRm73nUWW//Ypm6O2ZRSpmZlVsnmHMWeXCxdIwL/K9cZRHHOIn0= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9c222fb5-12a0-44a4-290f-08d610d496d7 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Sep 2018 13:04:11.6955 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0120 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Loic Poulain [ Upstream commit 37a634f60fd6dfbda2c312657eec7ef0750546e7 ] When receiving a beacon or probe response, we should update the boottime_ns field which is the timestamp the frame was received at. (cf mac80211.h) This fixes a scanning issue with Android since it relies on this timestamp to determine when the AP has been seen for the last time (via the nl80211 BSS_LAST_SEEN_BOOTTIME parameter). Signed-off-by: Loic Poulain Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin --- drivers/net/wireless/ti/wlcore/rx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/net/wireless/ti/wlcore/rx.c b/drivers/net/wireless/ti/wlcore/rx.c index 0f15696195f8..078a4940bc5c 100644 --- a/drivers/net/wireless/ti/wlcore/rx.c +++ b/drivers/net/wireless/ti/wlcore/rx.c @@ -59,7 +59,7 @@ static u32 wlcore_rx_get_align_buf_size(struct wl1271 *wl, u32 pkt_len) static void wl1271_rx_status(struct wl1271 *wl, struct wl1271_rx_descriptor *desc, struct ieee80211_rx_status *status, - u8 beacon) + u8 beacon, u8 probe_rsp) { memset(status, 0, sizeof(struct ieee80211_rx_status)); @@ -106,6 +106,9 @@ static void wl1271_rx_status(struct wl1271 *wl, } } + if (beacon || probe_rsp) + status->boottime_ns = ktime_get_boot_ns(); + if (beacon) wlcore_set_pending_regdomain_ch(wl, (u16)desc->channel, status->band); @@ -191,7 +194,8 @@ static int wl1271_rx_handle_data(struct wl1271 *wl, u8 *data, u32 length, if (ieee80211_is_data_present(hdr->frame_control)) is_data = 1; - wl1271_rx_status(wl, desc, IEEE80211_SKB_RXCB(skb), beacon); + wl1271_rx_status(wl, desc, IEEE80211_SKB_RXCB(skb), beacon, + ieee80211_is_probe_resp(hdr->frame_control)); wlcore_hw_set_rx_csum(wl, desc, skb); seq_num = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4; From patchwork Sun Sep 2 13:04:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 145733 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp1491078ljw; Sun, 2 Sep 2018 06:34:00 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaHGN12QZD2mcyqx764HZBP/Vzy2tW+45w5A9FIUUhzoEtoZxbG+Wti/ZdxZkyWggXmzjpk X-Received: by 2002:a63:ff1f:: with SMTP id k31-v6mr21753793pgi.20.1535895240721; Sun, 02 Sep 2018 06:34:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535895240; cv=none; d=google.com; s=arc-20160816; b=kKFDxU7E6rKAs7LUZq2c8ngm+I+Z1/zIQ5ct6vgEUeLqBErtha4RYhv2/X8Qu2YimI uEgqvZZrou1B144Lxe8V1IGqL3WgoEogjK3DXD2793bAKtJLB3Synqc8jZTa76HKCubi eoElteuzcDfFrgxVSZgh+xS4sm93WbCrE6KtHP5WZ6SZIuO5kAQO24rF83NG1LGy2lyy bAwSngUwQ8mEvbF8oZaSoeVwp6Hkgd/BtGgOph6T4wh7sv0TfNaIyjQgLByRHyj78hDp rr/x+Y1esqbhizUNaD6aKAavGJpEnm0E3kXgQFwlQDxfx1TDaPPgW2d/wPwTjfMxIoGd PXuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=w1i73d2xR4FyRnKS8HbICX7PY6Wba5A+NnQugEPzwHU=; b=Z0pYv5W7LvGoAVbuKtDejc4y8rzs0iI9/auiECmaIVT//ECYUyRy3MNxDDjcG53Oql 1Qpsvd/P9j9LBrqqnBuPfBxwNV0ifHY8O8gZ0OoqCGVbp97MypW+tOYetiCnSlgGmVpj K5f7Tb6+rXvaz2TqBKMPD/I7SDf0nY+eVjEZhyBy2xOljR2ahd0yABbR9REPj8QoVj52 ZFbyVGDnjCxOEs1HvJT8AJcm8CWh7poecLLnC6HNldcVzpLLWm+6sRivtA/vV/nSA8eV tYhPA31lsrm/pnWqsBSPPITXuoLnGpi1ch8rv+FuP20y1TlDtiNo1W5KoZhCwqq3atV5 RkMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=Pn2XnxWb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u5-v6si14356286pgc.459.2018.09.02.06.34.00; Sun, 02 Sep 2018 06:34:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=Pn2XnxWb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728188AbeIBRUl (ORCPT + 32 others); Sun, 2 Sep 2018 13:20:41 -0400 Received: from mail-eopbgr700098.outbound.protection.outlook.com ([40.107.70.98]:16799 "EHLO NAM04-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727469AbeIBRUk (ORCPT ); Sun, 2 Sep 2018 13:20:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=w1i73d2xR4FyRnKS8HbICX7PY6Wba5A+NnQugEPzwHU=; b=Pn2XnxWb2uYC3ZxCcVRA5wrugS6SS6bIZJleaGlt6X3COJkQTF7esYPMh/lJh/x2Yeunr7pi3vqSt3GVVAe5b0AWgIYKMAHuHvs7px1uRsTXaVgus05rJtl88WRQz8QGaaCBjVXsrIO1TdHN/S5uROkq0IC457LuDdg/KirTwVA= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0120.namprd21.prod.outlook.com (10.173.189.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.2; Sun, 2 Sep 2018 13:04:17 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611%7]) with mapi id 15.20.1143.000; Sun, 2 Sep 2018 13:04:17 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Srinivas Kandagatla , Bjorn Andersson , Sasha Levin Subject: [PATCH AUTOSEL 4.18 057/131] rpmsg: core: add support to power domains for devices Thread-Topic: [PATCH AUTOSEL 4.18 057/131] rpmsg: core: add support to power domains for devices Thread-Index: AQHUQr1xXVAes5ieb0ix5i/sIMas5A== Date: Sun, 2 Sep 2018 13:04:12 +0000 Message-ID: <20180902064601.183036-57-alexander.levin@microsoft.com> References: <20180902064601.183036-1-alexander.levin@microsoft.com> In-Reply-To: <20180902064601.183036-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR21MB0120; 6:tZNrxgSy/2gA6xHu3etdOx2f6GQwnjBE1apWqe6Kg6CgPIUPWFDlZYse6AawqqEvA1j+GQuXRpqF8w8grHPqEjvsCgkQLUuu2Cu2kxIgMuWmaDhLqmsJvyn0gmoksCeqyXk/uQihKkwad8sNroS5ctcVMEZdf2/pGen7ZL9500qKxMA4VN3CZc6mwJ6O9iBnEB+ZR2hBBaErdfWIQ3h3uQv0D0Ye5i11RAnGsrKWf6FspZP3f0+XYpiK6cORk8q6Ps32vpR2n6e4Fx1TzyMVs/aVVUEI8ij6xNN8JUr1PA0YG7JQGgFX4NvSR8dH0COwceo/Im4mbj4DxAvePb/ZdpUQUU0XxEmVUG+GH1JdC54mWRGyB+TvSuookOyUIa5xNhmOx21ghR/LNcK/+JALmKZD4VcsFCeXgeUELMcAZwydOP9GHdDLPxIjPtnVwz8GoeOh583HqkY4/KSBOwrDYg==; 5:M8Q4Elv8arDFgDHHkwO4/kCdxJomsABAJrTraqRRYFyYIyJqNaBYto+N7n0HLkK6K37OQ1q1v4Tetw3W0FLE4SEKqT1CFnnDrtuqAyIkoViYACC1ZmgXi1bQ2D62i1WC5+ETOKgtb65DgM/tSFZqEI8+59HpxpkzvBsjlVUF7Bc=; 7:nDkRPMNr7qjS7Art8zOFA12qI34gS8CXf0mOqyKhGPF85KjHnh6aXE58KNYFJttp49anZv5+SWh7OdTZ9xat6YUt6r0VnrcLfWKn3TP9zZBXwl20sRR4beG5v5mD1E4QLgdPqNCs20nyor7APWkcZ2/E6WZ1itLhv/7k8CijFQ0/wI3gYRdWiwn18TY3HjPo6m/mZV9S6oasynCjKQ6nEoN8/8Z3ygFSRKwpVMIe2vuDIKJb9XH6AQh/b4lS8uLV x-ms-office365-filtering-correlation-id: d3126e2d-9df0-43ba-509a-08d610d49715 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(4534165)(4627221)(201703031133081)(201702281549075)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:CY4PR21MB0120; x-ms-traffictypediagnostic: CY4PR21MB0120: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(269456686620040); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231340)(944501410)(52105095)(2018427008)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(20161123564045)(20161123562045)(201708071742011)(7699049)(76991033); SRVR:CY4PR21MB0120; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0120; x-forefront-prvs: 078310077C x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(136003)(376002)(366004)(346002)(39860400002)(199004)(189003)(110136005)(5660300001)(107886003)(26005)(6506007)(6666003)(2900100001)(8936002)(68736007)(66066001)(99286004)(76176011)(217873002)(2906002)(1076002)(316002)(3846002)(6116002)(86612001)(54906003)(6436002)(305945005)(7736002)(256004)(575784001)(86362001)(6486002)(25786009)(10290500003)(478600001)(14454004)(476003)(22452003)(5250100002)(97736004)(5024004)(106356001)(72206003)(53936002)(2501003)(2616005)(446003)(11346002)(6512007)(10090500001)(4326008)(36756003)(105586002)(102836004)(8676002)(81156014)(81166006)(186003)(486006); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0120; H:CY4PR21MB0776.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: dCYtIVAOsrjk6z+uGFPWUtNMvJluPiJhh2Kdrf3Ll+Xfz6KWFfdpuH0TinWYroxrtATbHL8W17V+ACOKScoowMe3LFe9oIpFInokIn74Vb5aascOFpi6uHbHF3KPMHjhaBXDicPWgNW17lPwSqXTWj+3OD7b21o4PrzTSXu1qdp/DwA5LqCr+46hChb5d/riXe/k7YCO1exReUVxzndewb1Np5+N/mPZj8J/c0s7HTmh62ZHCQrrZa+OYFstJ5kn8SpyoQQybIK16wubRvzSaBESoImMLPI5djnAIJBulM2YyZywI3Vf272Dyb5TO5GVJYvM0OblRsIdG6elhj6775GgI+cK1ITUZ2PC8deDrvU= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: d3126e2d-9df0-43ba-509a-08d610d49715 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Sep 2018 13:04:12.7273 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0120 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Srinivas Kandagatla [ Upstream commit fe782affd0f440a4e60e2cc81b8f2eccb2923113 ] Some of the rpmsg devices need to switch on power domains to communicate with remote processor. For example on Qualcomm DB820c platform LPASS power domain needs to switched on for any kind of audio services. This patch adds the missing power domain support in rpmsg core. Without this patch attempting to play audio via QDSP on DB820c would reboot the system. Signed-off-by: Srinivas Kandagatla Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin --- drivers/rpmsg/rpmsg_core.c | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.17.1 diff --git a/drivers/rpmsg/rpmsg_core.c b/drivers/rpmsg/rpmsg_core.c index b714a543a91d..8122807db380 100644 --- a/drivers/rpmsg/rpmsg_core.c +++ b/drivers/rpmsg/rpmsg_core.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include "rpmsg_internal.h" @@ -449,6 +450,10 @@ static int rpmsg_dev_probe(struct device *dev) struct rpmsg_endpoint *ept = NULL; int err; + err = dev_pm_domain_attach(dev, true); + if (err) + goto out; + if (rpdrv->callback) { strncpy(chinfo.name, rpdev->id.name, RPMSG_NAME_SIZE); chinfo.src = rpdev->src; @@ -490,6 +495,8 @@ static int rpmsg_dev_remove(struct device *dev) rpdrv->remove(rpdev); + dev_pm_domain_detach(dev, true); + if (rpdev->ept) rpmsg_destroy_ept(rpdev->ept); From patchwork Sun Sep 2 13:04:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 145731 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp1489457ljw; Sun, 2 Sep 2018 06:32:03 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY6o6XWVA9aHY5I0AeUofQ4ErELeyAjexdws+lctHVf7btWgddprTkNqAEmPOWwa3ss5YYq X-Received: by 2002:a63:f111:: with SMTP id f17-v6mr21728098pgi.87.1535895123086; Sun, 02 Sep 2018 06:32:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535895123; cv=none; d=google.com; s=arc-20160816; b=JUGBNl7CZDEF3tWlmlEKDaedLVan2bcHsHndZIB2PC+k26+TdD5ICfWjQybYsArRH8 wPBGyI+lnifNlk/XuMIc3Vg7L9IUuzymCPHT7MAsAahI9Ie0D5N3U7uM+5aC7d9mIyOx Kiu0ZM8+QEVFS7fCb041StFpaxTTX6blWOu49kee6YdAZgeWgfgr/XYd7ko7TCCkKorY MWsJBo/Myn3OaULXNczZ/W4G2M2fkxrBPFOaURlDrK1Vgnjz/ON6oElq/yEPrBNUX1A9 Tl+qlbp2fLaRnvy5INPTrrukL09oeuiEIyPnsFo89I317o5AzyGK+TKW+QELTx/xpVVY FxNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=EHBt9x17oBRrvbN47Z5BjhAaRNnswYEzHWR5o7Qxiio=; b=omsJxYhDOwEZbTZKtb00TtTG/xOJ9SAddcszAjyBVzfht78/yiak5uhr4qd3uCfnVm bMnQOzvJrSeylC75br/784APsJW0DpCcSB2RuivJ2o6VjbjZjibo+YqFREd6Bi3ZPnSE g3Q/logvt6TKZVSZ2DvvrpCW7tCA5rtAS256om7ZblwgSy3r4reovIYqGDkU1hQSZUpj QepEH/b7Nr5CKpWRX/b0Z5cs7vWyqGvsP8ILbBWNgwe6S9ZiqqEENZqhRIYAfhhSd3z/ DgfNEc2ZnF4S2lWzTkgDz4N9QAwmlOJCjqAok6RKZNdlmBgrSwPECUifhYKnk0hIjU7d S4mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=ZQ6cHIYA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u64-v6si15863406pfd.297.2018.09.02.06.32.02; Sun, 02 Sep 2018 06:32:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=ZQ6cHIYA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728831AbeIBRrv (ORCPT + 32 others); Sun, 2 Sep 2018 13:47:51 -0400 Received: from mail-eopbgr680109.outbound.protection.outlook.com ([40.107.68.109]:62112 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728338AbeIBRUw (ORCPT ); Sun, 2 Sep 2018 13:20:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EHBt9x17oBRrvbN47Z5BjhAaRNnswYEzHWR5o7Qxiio=; b=ZQ6cHIYA9I96BCUwF+EhNeXEPL5lG+MDAUM35k96jkM3wr8oqvK/ST9KfFDjlNIQ0jSIZJ8+51jgdpQyd6v+Tdr+8Vlar2M0qGc8JdhHudoZjzKKS/xLEMWhwJHtWo0iVVP5iGUKywaXTUQaeU0CawrznjR/Fpf3vGzju+41rNY= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0741.namprd21.prod.outlook.com (10.173.189.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.2; Sun, 2 Sep 2018 13:04:58 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611%7]) with mapi id 15.20.1143.000; Sun, 2 Sep 2018 13:04:58 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Linus Walleij , Mark Brown , Jarkko Sakkinen , Sasha Levin Subject: [PATCH AUTOSEL 4.18 084/131] tpm_tis_spi: Pass the SPI IRQ down to the driver Thread-Topic: [PATCH AUTOSEL 4.18 084/131] tpm_tis_spi: Pass the SPI IRQ down to the driver Thread-Index: AQHUQr2IhILDvwAsdE2smrUPalRh3Q== Date: Sun, 2 Sep 2018 13:04:50 +0000 Message-ID: <20180902064601.183036-84-alexander.levin@microsoft.com> References: <20180902064601.183036-1-alexander.levin@microsoft.com> In-Reply-To: <20180902064601.183036-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR21MB0741; 6:VareT7CWq99loQnMbN/Zq05YV8RWLAXp6u7SZ/LPbnAl/qGjNUW0ZewcwO+Q+B0xIZjq+jNgmbp+mBdLFy6mr/TeftFbcvtI4hTTHmr8yw3xfdq6aYrLu9Eb8ZVlOAsDWvy8u4gyB47V/pm7o/hFqWcJlI7u9sLdc4imE8wYsZTBhLRqgKXBJs+92nlA6NdTfEw4eUepuRijgH8wfBKJ25tvnJ0dg11DTJhK2Lm50CEWtuJlDTr781lX3K9Gl+YAGFs8Rk0Yc4nCeqnlwuVljS/m8HKtnO5IqK+D94A/tBtwhzlu2m9lVVdM6kTlAmnt1++yLal1Q8mHayt5UBgjdEUEYYx6R+nHju20fcYhTA5fXbIMzgbz0+DZj5ZJ6tn4MGU8GM/QkhbQnUd7K4HG8PH8deqZ8gFKSTNs0u3kL6sO6GUDsN5SPSKnpH0V2hMW7j7vGbnRYfEfSebnD6pfOw==; 5:HORlnWAZMzS8F4xsgMGV2OVWU59iuOwS7zDNaz5VIaF5/ZwlEaf1EQ8h+jGBY+PRgqIIp3Xkw20il132ZF1Y58Fj5jmaZtYpY1xO6tHvnq+PZu1xje5X5WPf6AUu3iT6JSUCxPWeK17RuMe7Gcqg0/hEUEhawei7rpkKRuhEBG4=; 7:zzpg5xD7VYUxiswTsetW/JmvQKoZ+x5V/kobB+ol9Vu2G8QWTSOzXYRsvSplxtE86Shtbi4rsuwT+WwSlEpJz+uuPdmnlftXNLyieylhLNn/4kF2xHmvCXwz9v5a1ukilpd5WcOOQNlaOE93PX/Nsyd+MjBJu2OqvboF9tIXVYLQTJETOsubFKv+vvI+nztOwsxTVL196jP4p5X30t5bd0TPHhD4vWJqM2/f5QcTFrQxPOlczy/F4vv97nSJAEMc x-ms-office365-filtering-correlation-id: 00e0ad7f-022f-416d-5787-08d610d4af63 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(4534165)(4627221)(201703031133081)(201702281549075)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:CY4PR21MB0741; x-ms-traffictypediagnostic: CY4PR21MB0741: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3231340)(944501410)(52105095)(2018427008)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(201708071742011)(7699049)(76991033); SRVR:CY4PR21MB0741; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0741; x-forefront-prvs: 078310077C x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(39860400002)(136003)(346002)(396003)(376002)(199004)(189003)(97736004)(2906002)(186003)(26005)(256004)(14444005)(102836004)(11346002)(25786009)(476003)(486006)(2616005)(446003)(305945005)(66066001)(5250100002)(2501003)(7736002)(6506007)(8676002)(68736007)(76176011)(6666003)(99286004)(6486002)(105586002)(81156014)(81166006)(53936002)(5660300001)(22452003)(478600001)(6436002)(86362001)(14454004)(54906003)(36756003)(106356001)(110136005)(6512007)(4326008)(107886003)(217873002)(3846002)(2900100001)(316002)(8936002)(1076002)(10090500001)(6116002)(72206003)(86612001)(10290500003); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0741; H:CY4PR21MB0776.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: pGnVhHlgRu0/70YarIdJDReYbifTGCpQFIchx0bH+wm/CtdwJR90QsbjRECTS6OuieXEW/mh0UYpZhd5YT/HcCGWdTx5w61Um9ie59RCwHBV9kN4juzSEvjLh0w3xCUwrM6/3gpzdxcNLeE8Vt1x09AqrjJ+8cUFDvz3n9sQ8UENcWIO1HL9lv7n+xkRZ8J8S4OVVoYUhsGSFMigknICQibx1b8DJoW17QoB7tu5gfjAhlfXlcUBB+Ys4VZRTZxawLsPB+lrvcU6v1OoXsPFDG1y74toj9Q/oQDwZjPy5L6d+Lp4m8D/JMiuFXOrkZRcEkrS9aYWJObYAeT5CLiue1hA2xFvzKOF9xdtt8se9fM= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 00e0ad7f-022f-416d-5787-08d610d4af63 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Sep 2018 13:04:50.0331 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0741 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Linus Walleij [ Upstream commit 1a339b658d9dbe1471f67b78237cf8fa08bbbeb5 ] An SPI TPM device managed directly on an embedded board using the SPI bus and some GPIO or similar line as IRQ handler will pass the IRQn from the TPM device associated with the SPI device. This is already handled by the SPI core, so make sure to pass this down to the core as well. (The TPM core habit of using -1 to signal no IRQ is dubious (as IRQ 0 is NO_IRQ) but I do not want to mess with that semantic in this patch.) Cc: Mark Brown Signed-off-by: Linus Walleij Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen Signed-off-by: Sasha Levin --- drivers/char/tpm/tpm_tis_spi.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/char/tpm/tpm_tis_spi.c b/drivers/char/tpm/tpm_tis_spi.c index 424ff2fde1f2..9914f6973463 100644 --- a/drivers/char/tpm/tpm_tis_spi.c +++ b/drivers/char/tpm/tpm_tis_spi.c @@ -199,6 +199,7 @@ static const struct tpm_tis_phy_ops tpm_spi_phy_ops = { static int tpm_tis_spi_probe(struct spi_device *dev) { struct tpm_tis_spi_phy *phy; + int irq; phy = devm_kzalloc(&dev->dev, sizeof(struct tpm_tis_spi_phy), GFP_KERNEL); @@ -211,7 +212,13 @@ static int tpm_tis_spi_probe(struct spi_device *dev) if (!phy->iobuf) return -ENOMEM; - return tpm_tis_core_init(&dev->dev, &phy->priv, -1, &tpm_spi_phy_ops, + /* If the SPI device has an IRQ then use that */ + if (dev->irq > 0) + irq = dev->irq; + else + irq = -1; + + return tpm_tis_core_init(&dev->dev, &phy->priv, irq, &tpm_spi_phy_ops, NULL); } From patchwork Sun Sep 2 13:05:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 145730 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp1487774ljw; Sun, 2 Sep 2018 06:30:14 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYkeiTnaq6tbpLB+sjB3s1Z6HcW/rJYH64bVK9PYIDuQHxQekRvuptoEx1pwJfLj07CiP+T X-Received: by 2002:a17:902:76c5:: with SMTP id j5-v6mr23989675plt.140.1535895014331; Sun, 02 Sep 2018 06:30:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535895014; cv=none; d=google.com; s=arc-20160816; b=rzkQ0DFmfyCoLXQQFazYzilW3F4Sd8e/f+QXQQZIZghYSpB46QWSEUfcsjMbowG/YI B9L+Sw1mvxMCG9P+c5VP8ML3Wy6x0/97fGO1LnQ2fZkdncfYNqwvAYMoijDXg2b6JTF5 U2tssF4eKMR5/kY+if14g2eNx6OjRUcqmVJNP1UYutEVa+2WCvopvE5u9FZo+5Blh9tt M080QsduPkB/ydDvZBEgtmjHKBpaSkPLinVjHxKmhkl2a8LNEm0ZroU4UsRzJbDXWrYv 2/gCAJYU2oMWKnyV1wdlngK7gqXX5Bu22yNfj2FwGbTcGqkjw8eC+1jc2kAg1S/V2ZXf DJnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=RpVk4KhLamJyXYvFQ8eDqQjW0nNFwRAAMgAkAXNfulU=; b=NEiKJVTlYNqCDL3xDcOwd/jKl3idzLlpICYdvurclsCcWXaoQwXS19VjQc/wY7lepG cgxiEq+yssebhPXmkEtEP4xL+u40saNYMOWnVo4t8cwwvklKU116PxsGmJ6X94rY6X8Z CX75HYbTQoX+e2rk+0Mup3QMZDL5BGnPHNPUNyxdEQlWJ7Jz00rMPR3FxUh+tbB212rE ySB/8qwd7xm0hU0xlQm5lY8szhavtb5wSEzCLiWjvhjBf9x5+Uj2ooBn0pHot5Cl94YJ v0hgOQ6GGK8cQX06p78+cCvMpM/2hgjFAS5lHIV96Hgq2GsC0+uk1MSiLCBFuVe1EsOk 8H/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=i+gwlZB8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 12-v6si14054337pgv.351.2018.09.02.06.30.14; Sun, 02 Sep 2018 06:30:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=i+gwlZB8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728596AbeIBRVZ (ORCPT + 32 others); Sun, 2 Sep 2018 13:21:25 -0400 Received: from mail-co1nam03on0121.outbound.protection.outlook.com ([104.47.40.121]:64374 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727587AbeIBRVY (ORCPT ); Sun, 2 Sep 2018 13:21:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RpVk4KhLamJyXYvFQ8eDqQjW0nNFwRAAMgAkAXNfulU=; b=i+gwlZB8HuWLX4Ch8SNsN0O3j+4fjjFPyChtTP1HEJYNpfqk2O3YIPKRqCsYsQrJI/f9WAFmJ4idGiS/aOSSGMVuA5J0vAI3I4vo/aATIP0PIvfDKKGDGY1RywUzwMBxkm7qPxVwxk6eeFG5aarYLzch9WnKMonzgptlXtTxMq8= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0184.namprd21.prod.outlook.com (10.173.193.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.2; Sun, 2 Sep 2018 13:05:34 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611%7]) with mapi id 15.20.1143.000; Sun, 2 Sep 2018 13:05:34 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Katsuhiro Suzuki , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH AUTOSEL 4.18 100/131] media: helene: fix xtal frequency setting at power on Thread-Topic: [PATCH AUTOSEL 4.18 100/131] media: helene: fix xtal frequency setting at power on Thread-Index: AQHUQr2TgvyLL1zgfkGBE/WS+nD9cg== Date: Sun, 2 Sep 2018 13:05:09 +0000 Message-ID: <20180902064601.183036-100-alexander.levin@microsoft.com> References: <20180902064601.183036-1-alexander.levin@microsoft.com> In-Reply-To: <20180902064601.183036-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR21MB0184; 6:mJAzpEst7bNrozizKviy8HkpuGdBVUe1yuMBvToFGZnxAFbpDqzONBlmmu76ZGIjsuuQAI43rdMekuag/6sfrF1D6QQT3qXEne0NBolqTLNBzL0Nx8Cr4Y96yy6vt0LqoI01wW8Ftidtd4EW0CyFeqfLH1UcGGHlDYo0u9dsdXZQg7I5xSFyy5uiFciVuolRNpwyHdr1lkG5W9mN/4Dm6zPbttyk1PoMmKiR8c3QHPRJLCRrMM7n4KhZl6PZdYSK/y0goZ3OZ16M5ve8Sd4CIQdYeceuT6KzcTJ9o0ruSH+fTgT+B56CVHRZHgh/58SF80sFRcgKQw6XULJVFUlw7KOGJSrHxkXnzHClnw12iHYAITN1Rjt6kJMBuLazjLs37NGWZN79jIPpw4TYM4joEzfuEhcxd3ZIn/ex0w+eMcaEjIu5KWsejhMLm6xLS3GBxD2bCn2uCKMMj9Kf1SjEgQ==; 5:6FQGF/dhDOQBpRYskhc9/jugrMdPwcS8rYiAoV608tisfpVgWfq3B1dgzHkIHWwaPluhG3mX3JElFJGSThJ/9HBcQTjbuuNRi7QLrNirMfPUqLe3wLjOJZnO4VzMYwsWJy6A5hLdNVdJt6bZqQO3Ceym50XrjlbSwzoWR2sns+Q=; 7:XLsAIke9r+cohn5a6V+FOX/pGhkCPjYnY9v9OYxTeAXU6r5Uq8r/XO5mT+wCOUrlgqBQYBNhclTXZP0bUK1IK4TZJnIpXwRwxeLyK4T1KVI/kMFnMDUi02dbOHImaNYA754QvKWE9aQEsPGchaMlvjlFIM7N2Qgn+SS5qGQcg8VXoJsbJiEwqJfM4yxitYysX0YWIw+AuP2YLkR2cTYYBLeEdVrDPC2jfzQAi3lc0YcqC7EBM9YsmyF+wO607YJb x-ms-office365-filtering-correlation-id: d00e45e3-61d2-4cfd-a401-08d610d4c54b x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(4534165)(4627221)(201703031133081)(201702281549075)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:CY4PR21MB0184; x-ms-traffictypediagnostic: CY4PR21MB0184: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231340)(944501410)(52105095)(2018427008)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201708071742011)(7699049)(76991033); SRVR:CY4PR21MB0184; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0184; x-forefront-prvs: 078310077C x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(366004)(136003)(396003)(376002)(346002)(189003)(199004)(6512007)(53936002)(6436002)(97736004)(105586002)(22452003)(25786009)(106356001)(107886003)(4326008)(4477795004)(6486002)(110136005)(54906003)(316002)(10090500001)(14444005)(5250100002)(256004)(66066001)(36756003)(6116002)(2501003)(26005)(6506007)(5660300001)(3846002)(81156014)(76176011)(99286004)(102836004)(1076002)(8676002)(81166006)(10290500003)(2616005)(68736007)(476003)(2906002)(8936002)(11346002)(72206003)(186003)(305945005)(7736002)(486006)(6666003)(217873002)(86362001)(2900100001)(86612001)(446003)(575784001)(14454004)(478600001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0184; H:CY4PR21MB0776.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: /C+X1iRzQVpG1N2Yfr5J5uKlZyJAOX0UD4gPWOfTBGaOEGWHVsZABmeLiun080S5HVH4eEfogP1x9mHr8xxqWOnr8FvmxG2bT/n7841Q2WCFr7YEmcf6ir8TFvdW3N/SOZgGaTE3OYRUZBJMb4SH8DFrGVqYbhDLJ5V6iUlwZ/A1Tt/Lnuq30dj8u6ONDA2xq2lApvOzGOufkKMeY1+qU/XIV7OyMhyZHmCU5rlRDOnYSSepJcqjHngZxvOk2GMmJAyxsza3SGj1dGY1JaAYiTTuIS8bAVZvPWMWzaXlb93gOpzzCxlP+ElNiKuQ+LJK3TUkseYtKD+6+lwAXK49Nym8VZB9K/r/plipifAbUsQ= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: d00e45e3-61d2-4cfd-a401-08d610d4c54b X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Sep 2018 13:05:09.2390 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0184 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Katsuhiro Suzuki [ Upstream commit a00e5f074b3f3cd39d1ccdc53d4d805b014df3f3 ] This patch fixes crystal frequency setting when power on this device. Signed-off-by: Katsuhiro Suzuki Acked-by: Abylay Ospan Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/dvb-frontends/helene.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/media/dvb-frontends/helene.c b/drivers/media/dvb-frontends/helene.c index a0d0b53c91d7..a5de65dcf784 100644 --- a/drivers/media/dvb-frontends/helene.c +++ b/drivers/media/dvb-frontends/helene.c @@ -897,7 +897,10 @@ static int helene_x_pon(struct helene_priv *priv) helene_write_regs(priv, 0x99, cdata, sizeof(cdata)); /* 0x81 - 0x94 */ - data[0] = 0x18; /* xtal 24 MHz */ + if (priv->xtal == SONY_HELENE_XTAL_16000) + data[0] = 0x10; /* xtal 16 MHz */ + else + data[0] = 0x18; /* xtal 24 MHz */ data[1] = (uint8_t)(0x80 | (0x04 & 0x1F)); /* 4 x 25 = 100uA */ data[2] = (uint8_t)(0x80 | (0x26 & 0x7F)); /* 38 x 0.25 = 9.5pF */ data[3] = 0x80; /* REFOUT signal output 500mVpp */ From patchwork Sun Sep 2 13:05:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 145729 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp1487209ljw; Sun, 2 Sep 2018 06:29:33 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYR7/Qh4FShS7qTdwPGKg5bIiMiYFJZ9t1veyP03ABe/1+7KwkduwNkXf1lirNU/DpVdKUy X-Received: by 2002:a65:6109:: with SMTP id z9-v6mr22542146pgu.243.1535894973063; Sun, 02 Sep 2018 06:29:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535894973; cv=none; d=google.com; s=arc-20160816; b=iFd7Q9cru0y/4LWLqeevzWE9gfZVj1HdhVVtTOSd5S0l6gTkGpX4QrjiAj/IRyqRfr C9gWGqIu4I61JvNhcVv1F4L3WOWls7MGSqd57wLaiB1qVJ9PA5puw5wmPgSzzcD9qMQT H3XLvEkO6dweFrUYxB1QCcjoSt54l0ugIwBNLWZ+9CkmEcM+6kcpOTnspCaY6h/nCFA1 YC3+gUbFCmSqBRrtm/lbXuZBspFe8lqMgdCS80BiQsv7AyfE8Gkyz+oQf/T4PRGF4AM2 7YblzAYOE4yKFzcZ57NwsJSbUUE9VWuGje16qdOmOUvbzFoQq3tYBs/WVBCseTtr/Pco lljQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=SIcAO+MNytyVGmnYF/Z2WZ1hQNmXw02dYYDMNNkF4EA=; b=qiOnld+eY4bBtr7KjOjW+lEgAC+pxe0dJvpfHbWrMyYc0ArQDgHjgsGlI1wc1ex9Lb 8AkTbdQO5iv92PYBQjYqdrVMBVK0eua1ku0tyJzuFRzFITdXKj/qS78mhHT3oRkWxDM3 4BLZxTzCliTT++UmVPyaRedV0J6qWPwjSyQRpTaAYh0yNN+jvSd7kRb8JkCo8gIdsyW6 P75Gr3v2D5y1tlB/ga+ARsJZGoAVPnCmhwyT7ZxPHFp7ezFwD4iv/mTKlQlGUU1RD41C zzFbkIMw/dib0F9tUd8VJyK6iqROhHimoqMQzRzf3Z0ZkdwaaOliv2PnihJpOlOE2MTC 5ZHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=QYIhnxLV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b87-v6si16640858pfm.5.2018.09.02.06.29.32; Sun, 02 Sep 2018 06:29:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=QYIhnxLV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728631AbeIBRV1 (ORCPT + 32 others); Sun, 2 Sep 2018 13:21:27 -0400 Received: from mail-co1nam03on0121.outbound.protection.outlook.com ([104.47.40.121]:64374 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728580AbeIBRV0 (ORCPT ); Sun, 2 Sep 2018 13:21:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SIcAO+MNytyVGmnYF/Z2WZ1hQNmXw02dYYDMNNkF4EA=; b=QYIhnxLVrXx+ABX0I+lmtbZibkEw6ysKaQsHvCWR8zDeTRCod8ZX30FkmuCIkQT5PCNPwncgJ/zSl6RcT4YhqLx9hAUbZKWf75EMGRswI1j70MfZLlAcJe+o0yMN1Es+JvfOvquHI4N10M30fY5I9ydVlOse/YUSCa32QnLCEYE= Received: from CY4PR21MB0776.namprd21.prod.outlook.com (10.173.192.22) by CY4PR21MB0184.namprd21.prod.outlook.com (10.173.193.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.2; Sun, 2 Sep 2018 13:05:36 +0000 Received: from CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611]) by CY4PR21MB0776.namprd21.prod.outlook.com ([fe80::7c3a:eea8:1391:1611%7]) with mapi id 15.20.1143.000; Sun, 2 Sep 2018 13:05:35 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Will Deacon , Sasha Levin Subject: [PATCH AUTOSEL 4.18 103/131] iommu/arm-smmu-v3: Abort all transactions if SMMU is enabled in kdump kernel Thread-Topic: [PATCH AUTOSEL 4.18 103/131] iommu/arm-smmu-v3: Abort all transactions if SMMU is enabled in kdump kernel Thread-Index: AQHUQr2VqdBlQttbL0y2JM9EMV+lIA== Date: Sun, 2 Sep 2018 13:05:13 +0000 Message-ID: <20180902064601.183036-103-alexander.levin@microsoft.com> References: <20180902064601.183036-1-alexander.levin@microsoft.com> In-Reply-To: <20180902064601.183036-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; CY4PR21MB0184; 6:j7NOWUaXyfh9yuKYnCsQEJoDt1HLzIW5/w6xtRezwWZDA5s3c0mEiph54NIB1XMBXqD7UjnPKYlt7YrRzCJ8R9iRRNxasWoF1VO8O+8NghDoCRPaXxtKWqj3N13vTMVvEgozjNoHAJ7f1IMG/sKzGYILv6vGJkwPeqR+wdfR7V+xrt/hPBqjEJuRnSfz9C5vu3ltucXwxOoj/1uPro9wJERjPR3uJjtDagjbZme5Cy+GoGnQsuCdtrPSVI2gI9BJv5PhjKgEVtbmaekoFdtEIlHUCxlMf/Wvq2h2PVmtU98nCqo65yOH84HnX/Pe/wDxs7tZDXpMVEQQBmik15bKHdXJogcezMRkFxaLea5FDy+VdAUrSFYXClSAU9la0aFw5xvfNfIsk8a5ipWD6bkX1/JOra/wFcurP8iW1IUmAXmjp9zIU9pRKxzJs9sfmLbnHHUtHcDH8fptbRmfkuxcPQ==; 5:y4nQrPN7qlPe95l6m8Nd2loKbshu9I11CBg7EBsrBtpB8UzCm0EnN+GjTUsEnHavlRZoZe6ge2L9vw+fQ3NW5lZ+IpE5cXmGqd6VeaqAWokOgvMJYmjOCh3iHBKBqysiAggKjRTpSzCajG8ex3bGRmSNZnt3+adQqSrpkiBIHIY=; 7:zr1SkIBfZwzc616ARin3IIAtXUuIHunyKPyY/CiLO5geyO5j7NjhtIVApnu5kya2v4w0Zv87UzMh25SoMYorswj+B0R1lUGt8ENt9eaepbk4kiMQlkzG9kiNNqMqp215X1TTwSAHilRPIeYhrsGoXS3i7rkbCnS7TVHBN3nDaJ75urvpViyGYcswFwhAksu1v1XuTZp1o0zyQTuDmVKQJi7hl+UWlN1MYQXuAS3Uy+eZdqUOrWSsFjIzqG3pAA/q x-ms-office365-filtering-correlation-id: 763bd9e1-6ac3-428f-8747-08d610d4c5f6 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(4534165)(4627221)(201703031133081)(201702281549075)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:CY4PR21MB0184; x-ms-traffictypediagnostic: CY4PR21MB0184: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(180628864354917)(89211679590171); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231340)(944501410)(52105095)(2018427008)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201708071742011)(7699049)(76991033); SRVR:CY4PR21MB0184; BCL:0; PCL:0; RULEID:; SRVR:CY4PR21MB0184; x-forefront-prvs: 078310077C x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(366004)(136003)(396003)(376002)(346002)(189003)(199004)(6512007)(53936002)(6436002)(97736004)(105586002)(22452003)(25786009)(106356001)(107886003)(4326008)(6486002)(110136005)(54906003)(316002)(10090500001)(14444005)(5250100002)(256004)(66066001)(36756003)(6116002)(2501003)(26005)(6506007)(5660300001)(3846002)(81156014)(76176011)(99286004)(102836004)(1076002)(8676002)(81166006)(10290500003)(2616005)(68736007)(476003)(2906002)(8936002)(11346002)(72206003)(186003)(305945005)(7736002)(486006)(6666003)(217873002)(86362001)(2900100001)(86612001)(446003)(575784001)(14454004)(478600001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY4PR21MB0184; H:CY4PR21MB0776.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: uhOqNe7BtjN+SEJhUTBAlkdeCXU4XggphCtYRG5dwgz3UPk3eZ5zN7podvW6R57WSobDgvOdeEsalvV8oxa/hjOle1tCsx3LcemUX1oVnntIg+mPNkhR1Y5WnzrNZl0+sENcAW+RqsNQ9C9wfdvvoY38sV0hTL/fRfE16yQMUkE4hyljAu8yyi51i8poTR1mcXBh43v/vs2XW4XCceZs6ImIb2SPVu9WvyTuWbSt8162dXvTN6zj5T1Da4LEi/0C7hfrD43IZFu4dUMjEYPyqCb4VkChaNYdC82zYGJsoZE0OPX/fU/5X/Tuz/FROoddSMM/YdhvyCh3Fs2OOtkJNeh/csgMVJ2thV4rwZQ9jxI= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 763bd9e1-6ac3-428f-8747-08d610d4c5f6 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Sep 2018 13:05:13.1383 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR21MB0184 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Will Deacon [ Upstream commit b63b3439b85609338e4faabd5d2588dbda137e5c ] If we find that the SMMU is enabled during probe, we reset it by re-initialising its registers and either enabling translation or placing it into bypass based on the disable_bypass commandline option. In the case of a kdump kernel, the SMMU won't have been shutdown cleanly by the previous kernel and there may be concurrent DMA through the SMMU. Rather than reset the SMMU to bypass, which would likely lead to rampant data corruption, we can instead configure the SMMU to abort all incoming transactions when we find that it is enabled from within a kdump kernel. Reported-by: Sameer Goel Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- drivers/iommu/arm-smmu-v3.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) -- 2.17.1 diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c index 1d647104bccc..b73c6a7bf7f2 100644 --- a/drivers/iommu/arm-smmu-v3.c +++ b/drivers/iommu/arm-smmu-v3.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -2211,8 +2212,12 @@ static int arm_smmu_update_gbpa(struct arm_smmu_device *smmu, u32 set, u32 clr) reg &= ~clr; reg |= set; writel_relaxed(reg | GBPA_UPDATE, gbpa); - return readl_relaxed_poll_timeout(gbpa, reg, !(reg & GBPA_UPDATE), - 1, ARM_SMMU_POLL_TIMEOUT_US); + ret = readl_relaxed_poll_timeout(gbpa, reg, !(reg & GBPA_UPDATE), + 1, ARM_SMMU_POLL_TIMEOUT_US); + + if (ret) + dev_err(smmu->dev, "GBPA not responding to update\n"); + return ret; } static void arm_smmu_free_msis(void *data) @@ -2392,8 +2397,15 @@ static int arm_smmu_device_reset(struct arm_smmu_device *smmu, bool bypass) /* Clear CR0 and sync (disables SMMU and queue processing) */ reg = readl_relaxed(smmu->base + ARM_SMMU_CR0); - if (reg & CR0_SMMUEN) + if (reg & CR0_SMMUEN) { + if (is_kdump_kernel()) { + arm_smmu_update_gbpa(smmu, GBPA_ABORT, 0); + arm_smmu_device_disable(smmu); + return -EBUSY; + } + dev_warn(smmu->dev, "SMMU currently enabled! Resetting...\n"); + } ret = arm_smmu_device_disable(smmu); if (ret) @@ -2491,10 +2503,8 @@ static int arm_smmu_device_reset(struct arm_smmu_device *smmu, bool bypass) enables |= CR0_SMMUEN; } else { ret = arm_smmu_update_gbpa(smmu, 0, GBPA_ABORT); - if (ret) { - dev_err(smmu->dev, "GBPA not responding to update\n"); + if (ret) return ret; - } } ret = arm_smmu_write_reg_sync(smmu, enables, ARM_SMMU_CR0, ARM_SMMU_CR0ACK);