From patchwork Mon Oct 19 15:57:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joakim Zhang X-Patchwork-Id: 288360 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.9 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF701C433E7 for ; Mon, 19 Oct 2020 07:57:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7E5A32225A for ; Mon, 19 Oct 2020 07:57:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="g6xhdVPo" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728214AbgJSH5p (ORCPT ); Mon, 19 Oct 2020 03:57:45 -0400 Received: from mail-db8eur05on2056.outbound.protection.outlook.com ([40.107.20.56]:12225 "EHLO EUR05-DB8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727420AbgJSH5o (ORCPT ); Mon, 19 Oct 2020 03:57:44 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=R5uOqsKWpKiH53eoGfD/jq4fD4QKn5VMDn7BeJmUX4oQxRZq02BzDo+FquaV+gwcRSNvbNMzSONTUc9HoVi9xqg6wCsTumJ/7Tjpf3bP2wyJGzEqFjQKE32miUyYH5wM8HuDg+xByhpjMkDzmC8mPz4Bf47xJCx15CwBypo2F/cupB9za9zzpSUOMCCWfXgSD35dhLgsexAJsM4urgoce+cx6T/iyagqco6bdiw2i4rXa7QhOgqtgRqbAB+2G421PgxEnGbB41u8JYebRJ1cPHG8iIsalvNd9SxadB33dif/+E5yYbr/N4vgqxn7OiN3gqxtlY++lmJB7tSYucyqVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tDbAwQnA5enTI3i2f5XQgOnhhQ23eN6woNIFu1j7SmI=; b=H37QGilN9Z3suFh7+j8e80MFiopMCweRLwYxjwNAD0r/kHeG2Nu9lgrVI1+C3gmpkwEOooOdCY9h6jDDsgwInENFEzr0sw90xzIccn2AN+DM9czVu+hLU7ht8Mw3VnjX14Iy+SfxufBfBRkvLcl00vTz4r18u2i5vTH/0wGweNiCSWOoyE2yqPcpjv6vtDyvJhmFR7S7wv/8oRHpbN+LJctK1mksDCGpEZzCKIhV7OBeTf9RxqxYMRlxm4UZj/hh4JrOPOiHJZXqMmgKscq68Izp427/NdSpnBbjVIyeRxatx5mY1/uoppg0/zUg7AxduP41El/TM+yeCNx452FHQw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tDbAwQnA5enTI3i2f5XQgOnhhQ23eN6woNIFu1j7SmI=; b=g6xhdVPoYVhtc+f3Z44VWCQAMftnETQT/vhs2zLVyLS4cLAbBGeChnXtRD7B7h8a02xk3JywmUaNOnVu70YUqRAn6vUBIO3/al5aUKXp6u2EgsX4nDeGw6vGAhNiHz4IHIZkxbV/d2PHWVPOrSIynPUFcK5zb6Q8yr0XucXitI0= Authentication-Results: pengutronix.de; dkim=none (message not signed) header.d=none; pengutronix.de; dmarc=none action=none header.from=nxp.com; Received: from DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) by DBAPR04MB7430.eurprd04.prod.outlook.com (2603:10a6:10:1aa::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.22; Mon, 19 Oct 2020 07:57:41 +0000 Received: from DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::3c3a:58b9:a1cc:cbcc]) by DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::3c3a:58b9:a1cc:cbcc%9]) with mapi id 15.20.3477.028; Mon, 19 Oct 2020 07:57:41 +0000 From: Joakim Zhang To: mkl@pengutronix.de, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, linux-imx@nxp.com, victor.liu@nxp.com, linux-can@vger.kernel.org, pankaj.bansal@nxp.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V2 1/8] firmware: imx: always export SCU symbols Date: Mon, 19 Oct 2020 23:57:30 +0800 Message-Id: <20201019155737.26577-2-qiangqing.zhang@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201019155737.26577-1-qiangqing.zhang@nxp.com> References: <20201019155737.26577-1-qiangqing.zhang@nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR02CA0107.apcprd02.prod.outlook.com (2603:1096:4:92::23) To DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.71) by SG2PR02CA0107.apcprd02.prod.outlook.com (2603:1096:4:92::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.20 via Frontend Transport; Mon, 19 Oct 2020 07:57:37 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 828803ef-6097-45f2-9473-08d87404a73e X-MS-TrafficTypeDiagnostic: DBAPR04MB7430: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:751; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lAZaTOyv0rnmxgDhEfblBZ5LEHGzOXH+z4oWWq0jxvNH1zkuuz/mRVBPqc0u7sIAL/epHd2gYY+3QyXeVDdygaoeK1UV1zNhpBvkQn79oMpwG8eIHlwABoMrWBBopdTGmY5zthX2Pc9QhCAf6IQq6WnGJUHvBiLHMEyfCK6zFR6pMwCs4BgKTF6pAmLpWueFrBbQNZ9roPFlqNvoCmtNFceF00mzJgy04gdQg4i60UaArDI5p4SEQh6dsivwP3fm/7k3K2aZAozIvGR+WDqGaLdphUmw2tApcBFaVyFIPdiiQMuOE/NEk1eT6jh+U78mTZQR5vlOE0zdlG3LHSSiUuS0Yso5jt8b4FuwghOQTJhTcNFJ8YOHjnUSp77lBAzJ X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB8PR04MB6795.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(396003)(39860400002)(376002)(346002)(136003)(1076003)(6666004)(2906002)(4326008)(956004)(2616005)(316002)(5660300002)(52116002)(36756003)(8676002)(8936002)(6512007)(6486002)(6506007)(16526019)(26005)(186003)(86362001)(66946007)(66556008)(478600001)(66476007)(83380400001)(69590400008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: MuXqvkdBK1g/cRiwLXK7r4Xf74UYh4fetPvwEUYT4l9g8ZJtWOweKHXqqbw6hEbAwPlsn0/T3IuYu5zTPN3kvh5LpD23wqk5Dz0hn9bcRMMFE9yCugLWKr5Y/EJFA5nLljKgb87F6g8kVfkCAO4DmhUdAafqccKYEWhMstqCTM1qfH3qjf41uKjz00/UWKhntb3dPbhmTRnogOrrotG9jHicRrqNspC/VAfbcWd6ugCoMvvNVVfn9W8YXQ0rkFFyuFRCnpviSwHIFP3z5D9XMC1KtcnLh7UbTJSaCWcII2Slhcxpr0KV0htfbD1Jr+gQ5uH6P56iBfxh8WrMknO8LoVQGKdpQwUGaiBIZaYJbM0QMVKqOk8s2FZZxKA5Y9ch1HtEI9vHVHOy/OZEGbi3z+FMFBRIR4QJfedRv7oy8HDRr2oIRagF1QbZtEEjCUXF4oWLCF0uYxepeluC/ae2QRfNtxktjQCbtyteLQCqaWY5zLM36k5CP6mRC02XpWD/70Ft6JqqWZvBZOy9lkCYGwbHrLqurRqBIDZejiuPhynFp/K/E6gGHNqoRB9NtulvV2qabZ7X+p7Whg5Y5b0f7pu51Exnv4F0jOwEHz7Pd4+dU4hhYpInfMCVWE7a2m+mfwGi2r6dKpNbYe1wldIl1Q== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 828803ef-6097-45f2-9473-08d87404a73e X-MS-Exchange-CrossTenant-AuthSource: DB8PR04MB6795.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2020 07:57:41.0360 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 5sTO0Z+oAj3KWS4VymHFpixV11jXJ28rVrtPNodzGjK7xbaE0Xhz1aRbqWgcJJw2l8kB1nKveGY8hEymcLIJlA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7430 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Liu Ying Always export SCU symbols for both SCU SoCs and non-SCU SoCs to avoid build error. Signed-off-by: Liu Ying Signed-off-by: Peng Fan Signed-off-by: Joakim Zhang --- include/linux/firmware/imx/ipc.h | 15 +++++++++++++++ include/linux/firmware/imx/svc/misc.h | 23 +++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/include/linux/firmware/imx/ipc.h b/include/linux/firmware/imx/ipc.h index 891057434858..300fa253fc30 100644 --- a/include/linux/firmware/imx/ipc.h +++ b/include/linux/firmware/imx/ipc.h @@ -34,6 +34,7 @@ struct imx_sc_rpc_msg { uint8_t func; }; +#if IS_ENABLED(CONFIG_IMX_SCU) /* * This is an function to send an RPC message over an IPC channel. * It is called by client-side SCFW API function shims. @@ -55,4 +56,18 @@ int imx_scu_call_rpc(struct imx_sc_ipc *ipc, void *msg, bool have_resp); * @return Returns an error code (0 = success, failed if < 0) */ int imx_scu_get_handle(struct imx_sc_ipc **ipc); + +#else +static inline int +imx_scu_call_rpc(struct imx_sc_ipc *ipc, void *msg, bool have_resp) +{ + return -EIO; +} + +static inline int imx_scu_get_handle(struct imx_sc_ipc **ipc) +{ + return -EIO; +} +#endif + #endif /* _SC_IPC_H */ diff --git a/include/linux/firmware/imx/svc/misc.h b/include/linux/firmware/imx/svc/misc.h index 031dd4d3c766..d255048f17de 100644 --- a/include/linux/firmware/imx/svc/misc.h +++ b/include/linux/firmware/imx/svc/misc.h @@ -46,6 +46,7 @@ enum imx_misc_func { * Control Functions */ +#if IS_ENABLED(CONFIG_IMX_SCU) int imx_sc_misc_set_control(struct imx_sc_ipc *ipc, u32 resource, u8 ctrl, u32 val); @@ -55,4 +56,26 @@ int imx_sc_misc_get_control(struct imx_sc_ipc *ipc, u32 resource, int imx_sc_pm_cpu_start(struct imx_sc_ipc *ipc, u32 resource, bool enable, u64 phys_addr); +#else +static inline int +imx_sc_misc_set_control(struct imx_sc_ipc *ipc, u32 resource, + u8 ctrl, u32 val) +{ + return -EIO; +} + +static inline int +imx_sc_misc_get_control(struct imx_sc_ipc *ipc, u32 resource, + u8 ctrl, u32 *val) +{ + return -EIO; +} + +static inline int imx_sc_pm_cpu_start(struct imx_sc_ipc *ipc, u32 resource, + bool enable, u64 phys_addr) +{ + return -EIO; +} +#endif + #endif /* _SC_MISC_API_H */ From patchwork Mon Oct 19 15:57:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joakim Zhang X-Patchwork-Id: 298845 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.9 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2EA57C433E7 for ; Mon, 19 Oct 2020 07:57:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D3DBC2224D for ; Mon, 19 Oct 2020 07:57:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="fnihOAR2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728295AbgJSH5u (ORCPT ); Mon, 19 Oct 2020 03:57:50 -0400 Received: from mail-db8eur05on2051.outbound.protection.outlook.com ([40.107.20.51]:15008 "EHLO EUR05-DB8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727420AbgJSH5s (ORCPT ); Mon, 19 Oct 2020 03:57:48 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C+TzNQCOgHALn3pWRNJLp9nl3ezGxJX87VdToM8C4CeBAm2BTLj761OU/fTzypDX5mieTSIdxfsWfElM0FkBdGfutvUDahMbI3SyRhX9mF4ZhydQzzkSARpT/OmCq8GrbJ3g03mCtdVbN1lrRc5m/6PAnAWFiBD9Xxy2PNCz6T8Ybe2SF8bfVzN/JRFVuZHfx9jy4nqF9dbsW9H3DqR/TCjosp5f8AubDdn3iEBIV1/7xjRydTx4vTPhEMAGPWuRhcj+QUNAT+bT87EEW2dZYPyIsihjPp5bsdixHUw8xpzukPmDmdGumSM6AyhqryeQtNMk3AzhOt/c3EbIlodWgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ur08Q6AfFGrPIwCDQuAKK4njckBVmBZasrWQCnYHC5c=; b=H6AhT8Ubk4Mq1jdhTzUiECmSuZDEdsnl+3k+sey6BhUGauFbhaVzt2MejQA2BDKZN1Lyus6MquzaHTKTnibO0DmJIbF+R5esZ/La8WVjUs3YR3I8ye5npjUiDCpqkkMpyM+OVLsqEJEFxKcOZT64TjIYeziyT07ikMgkhQrNCAQj3v91ZcCqG0Okdr5elm4M8N7+H3zYEvEMiprQqBzRqHc8J6nf+5maiBbzrP8wod4a8xXbU35w84/N3DBKfuY1VVFm09felJOczNqV+/AsLD4Y/TjxeT9zz2oonojsLItTN7qxYpO4dffVgAKQffHeo5cfWaYRpsXeo+kU2HPAyw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ur08Q6AfFGrPIwCDQuAKK4njckBVmBZasrWQCnYHC5c=; b=fnihOAR2ulATD1fDp+KPtGUQxvduQH0zp5EV7emwEqouftmKkX+2BwfDw98ZjZJsr5uv0B9ysZG75SHI7660ZDvNDbdf+85PiPgW5XWZA8SuGB9uXnQI12YUgXThN8A+IkXEQ1kGzAHFdrl9nA2x6iVfwnMm5Pq8fZu7jSys5PM= Authentication-Results: pengutronix.de; dkim=none (message not signed) header.d=none; pengutronix.de; dmarc=none action=none header.from=nxp.com; Received: from DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) by DBAPR04MB7430.eurprd04.prod.outlook.com (2603:10a6:10:1aa::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.22; Mon, 19 Oct 2020 07:57:45 +0000 Received: from DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::3c3a:58b9:a1cc:cbcc]) by DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::3c3a:58b9:a1cc:cbcc%9]) with mapi id 15.20.3477.028; Mon, 19 Oct 2020 07:57:45 +0000 From: Joakim Zhang To: mkl@pengutronix.de, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, linux-imx@nxp.com, victor.liu@nxp.com, linux-can@vger.kernel.org, pankaj.bansal@nxp.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V2 2/8] dt-bindings: can: flexcan: fix fsl, clk-source property Date: Mon, 19 Oct 2020 23:57:31 +0800 Message-Id: <20201019155737.26577-3-qiangqing.zhang@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201019155737.26577-1-qiangqing.zhang@nxp.com> References: <20201019155737.26577-1-qiangqing.zhang@nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR02CA0107.apcprd02.prod.outlook.com (2603:1096:4:92::23) To DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.71) by SG2PR02CA0107.apcprd02.prod.outlook.com (2603:1096:4:92::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.20 via Frontend Transport; Mon, 19 Oct 2020 07:57:41 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 912f7800-04f6-4164-67af-08d87404a9d5 X-MS-TrafficTypeDiagnostic: DBAPR04MB7430: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2733; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: s5+aoeiw3rKaaW6ZHl/ABKXvZ5G9Wb1fC2qQG+hBbj5XkQhUgYTRmM0EXyo1e1/e4siu9aF4HkaGB5kLjaJ6iuPSHMPMv6ntoQK6Xcrlu8ABrKm46qHrOLPkjfbNUNZX7Cizt7FojL3IUt81bWCnKN7XnH3Ic1qRONT+lNRwlm44GmYNwvP6rUb7BEfVp7B8kooR30/jvY+PlqTHiACYB2W89Iz8H+7YPpaGK8mAvYYfjBIhahH+6wFvMnDIw6oJysW1yx5SiR2N/Y042AKpJMdDkXl9OjaGgxy1laZ+JI+azRRiwczLr7lFwyQ3WTE6Tny7xhH07NpvSDtTfPE+s4V05mBLXbjvlPcGHilW/TOppjfA/rYPzEsZdAI6lYIA X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB8PR04MB6795.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(396003)(39860400002)(376002)(346002)(136003)(1076003)(6666004)(4744005)(2906002)(4326008)(956004)(2616005)(316002)(5660300002)(52116002)(36756003)(8676002)(8936002)(6512007)(6486002)(6506007)(16526019)(26005)(186003)(86362001)(66946007)(66556008)(478600001)(66476007)(83380400001)(69590400008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: CiR71sKNxe8ayBoohkXrnjYVZ/L9fDGULe18LY3JdBrFPkjKyRFnYbLDqZQLo0g5WOd6XxhKz2hoo0p2Zm5VG/rSni/u2EaY+xCJz8ihraeHMqBWGb3jFzekuA0Scw94wOQZ4YC/nljbkNHjW3lKipXaNNqK8esnHLiekRIl630DgD+Xee34dqvIuAY56sktdaazvTHNBKjiRRVjm0aX53q9Hc+PmfrNmQMuUrMSGprTwlpgLBWJI/QMyqd+NaF+P0fLzYTqTeIFodDSiRxk3nwCgFSBuxwCdWIc+TKkXMvBN2Yjss82QDtdcH7PQhaXNiTo3jyFyt+qFxWHI90Wik5bdUv9Abo+9L+o+BWtggRrFeSgldERlz2aHvwitBejSGTFjNm/fswxxAAEB9syoDUj3inKPRMQa9vp3AFZ9xx21Kzq6ETYUDy9GWRkFDUXXdJBnbKagrHudIIQtBjYBt9bBDjitBCTx5flxORM5PbRXHzeN1pCkzepExv7Rkg3nKH09l+tkY2K81x/HxxWVlZj7hNcHT2/Tn62gB46XPn9GC9dz8aaqUduxJeGoP7vdMu15nu29V5sJxEgP/c0rQq5clbcJqcHDf5wTQ01KIlf7LA8AunADD8PnPbwROX1i1bcK/xdcMm8KyVmJzFgYA== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 912f7800-04f6-4164-67af-08d87404a9d5 X-MS-Exchange-CrossTenant-AuthSource: DB8PR04MB6795.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2020 07:57:45.4615 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fQEi8vVG71v6Ub5sJ/ksFCd0dah7lJsDtQfYOHGDSuncTOJqI/5s7sM2TiyRl4Yi5Q5d8Qbk4GzzNW247ic8wQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7430 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Correct fsl,clk-source example since flexcan driver uses "of_property_read_u8" to get this property. Fixes: 9d733992772d ("dt-bindings: can: flexcan: add PE clock source property to device tree") Signed-off-by: Joakim Zhang --- Documentation/devicetree/bindings/net/can/fsl-flexcan.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt b/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt index e10b6eb955e1..6af67f5e581c 100644 --- a/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt +++ b/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt @@ -53,5 +53,5 @@ Example: interrupts = <48 0x2>; interrupt-parent = <&mpic>; clock-frequency = <200000000>; // filled in by bootloader - fsl,clk-source = <0>; // select clock source 0 for PE + fsl,clk-source = /bits/ 8 <0>; // select clock source 0 for PE }; From patchwork Mon Oct 19 15:57:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joakim Zhang X-Patchwork-Id: 288359 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.9 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96838C43457 for ; Mon, 19 Oct 2020 07:57:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3894022243 for ; Mon, 19 Oct 2020 07:57:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="SgzvNON/" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728333AbgJSH5z (ORCPT ); Mon, 19 Oct 2020 03:57:55 -0400 Received: from mail-db8eur05on2066.outbound.protection.outlook.com ([40.107.20.66]:13280 "EHLO EUR05-DB8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728310AbgJSH5x (ORCPT ); Mon, 19 Oct 2020 03:57:53 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QSU3PXhtgA/NGesEuRvR9K5a7JxAdomeKDzEl6DSlIPnSQP4ybV8YIOdkknn9w3L13c+IgtegJYFoTHlIHPGYJ1p1t+mMYq+HeeRe+jucN9G4ICVgCLUaR1wDWoayu5rwSuiSI0W13FTnESV5PyW2ciphtb8AYu31qTT05sjTk6kYz4feBkI5MC4DrJyjxexzsg2C8nbSx5TLDDkJK6eJqQbcp+ccwl5J7cHryaNlSMI9riGE1baenXYnTv8NQVfA5PFtaa+vyQWH0q2QGY+amO3M0NaVy9hb9V45sAcvcpiz4lJNky/PDJBTrR5zq1f0xuh7emtG4rOlxmIobHkbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=peiX8UE9p5cXI2sL73kSBj0XwcJcL5uwALVe1rW5XNU=; b=dWYsv8XMJhyU6LvEs1A6bhng/oKegzhjs3BH7lf12dxY73vd+4ry8htEeECW0ODWeshV/rb60pxzlvRc7z80KwB62fmCv+Q0TWBPZ7Hf76PFBihAqFjx4Neh8zPeXlaL0t9e+sVrHk5F5x7WDIp8CF4tVVMniRASSkutZtufH3Ur08KPjup5+LFSucyV1m6hZOVK+8EvvOuDcFix2xMQxJ5yZ2ctyZT+RQQ1rg9o01Tx+y2BDo1xVWKAo3E2vHjcP913so/mf+3QlNvO98MO4hYar4auzeB0oYaK50ZdJVDdmxbA21bkskK/a6At1HRmrusIloiyzRWBh7sJK43Rrg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=peiX8UE9p5cXI2sL73kSBj0XwcJcL5uwALVe1rW5XNU=; b=SgzvNON//7ERxjsxN/YM2RBOEKf3DYmkPcNsXvxv3gdO49tdiKdG7/Eo9hd7RoMp6dpJ4L3eQQg2UrobvGdGJwBfG2mUH1BPVfykeAqdLZojUN1Eb3JmtVfZ5CTdJxW5ZwRiwh06Kgu2+MkboxseD1LjliULUe6sh0TrUSjxbDI= Authentication-Results: pengutronix.de; dkim=none (message not signed) header.d=none; pengutronix.de; dmarc=none action=none header.from=nxp.com; Received: from DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) by DBAPR04MB7430.eurprd04.prod.outlook.com (2603:10a6:10:1aa::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.22; Mon, 19 Oct 2020 07:57:49 +0000 Received: from DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::3c3a:58b9:a1cc:cbcc]) by DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::3c3a:58b9:a1cc:cbcc%9]) with mapi id 15.20.3477.028; Mon, 19 Oct 2020 07:57:49 +0000 From: Joakim Zhang To: mkl@pengutronix.de, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, linux-imx@nxp.com, victor.liu@nxp.com, linux-can@vger.kernel.org, pankaj.bansal@nxp.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V2 3/8] can: flexcan: remove FLEXCAN_QUIRK_DISABLE_MECR quirk for LS1021A Date: Mon, 19 Oct 2020 23:57:32 +0800 Message-Id: <20201019155737.26577-4-qiangqing.zhang@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201019155737.26577-1-qiangqing.zhang@nxp.com> References: <20201019155737.26577-1-qiangqing.zhang@nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR02CA0107.apcprd02.prod.outlook.com (2603:1096:4:92::23) To DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.71) by SG2PR02CA0107.apcprd02.prod.outlook.com (2603:1096:4:92::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.20 via Frontend Transport; Mon, 19 Oct 2020 07:57:45 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 4a95f0ed-9389-4146-2143-08d87404ac74 X-MS-TrafficTypeDiagnostic: DBAPR04MB7430: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1468; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8/wOdOEa8weo7IXXHCGIboLlFc6aaUlUq7/RKtZfmriLUkDP2equSZx4bDplY/ZdOw0MOio7vI5wyK200xf72LheRDCzZHfJxjCZFY8fdlvBu/QCuYAxS1Bm2qxI1PMGSC824lMzLovaTpLvwFekTvUcM2HJ0/6C+f1n14+TOCIrqyzO/liVuExfrs2FeeN/XSCHm2ZX5QVdbhJAymUeeNI/oqyMBFrxJXJ+dl66WYGwV8N9ACyBeh6oI4OoVI6eV878v8QV/AzbsnrD1reI5UhI14vq677CHpzDVX4nbIDgJ2zqylCafZD0LjVlMvsRIYGYiHKtiEDuucQEv/ZS2HMGEC6zhF4SNL1XGMwI6CnOMy4vPK5B5DvVC2hNu6KI X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB8PR04MB6795.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(396003)(39860400002)(376002)(346002)(136003)(1076003)(6666004)(2906002)(4326008)(956004)(2616005)(316002)(5660300002)(52116002)(36756003)(8676002)(8936002)(6512007)(6486002)(6506007)(16526019)(26005)(186003)(86362001)(66946007)(66556008)(478600001)(66476007)(83380400001)(69590400008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: fSK1HbAaeVUsdCGnxSvUgS9ZbY0u5vJnorgGlOVoJWOYXnJEy/rPcrT+eA35JfNhbjMhvTxSSUlJPn/or1dSNr4NMG7DADtLUbshNq2TcFywDTrmMpYAZ2svUrwGt8ou+g0TYAPlWC5IgVyfYecOWcrfzBYCQ7bKXnymWGyBUeVL0FcvwANdezfWd0PBORgw+yKJdIqjRnYX8JrDjXXSgY7o6dK0Fc7tmeJfO3BonmA66RytTBJbPNRvxn7eMbLADpE5uAaRj4J2JcKw0Nes/aZHYVcvMiy343iScMyk+7XeDj9IzqX3pCpFZ0rb8numRQll1wK5Zu6YQPmvD1RkI3UASPwSZ064iCh5jFyP236jiT41RqXQcxUCrowFw3/azuM7rR6gbv3B1PyGoJnXRncVPqgaVl+XfZuAC492QrhqJcAOBhzy7GIb6hPE32UpBhnainRPLqhuxETZCTW7mG5+lDfDn7Ujlq94RaNm/4D+AA4WFA+snF0Ab8XyH64agaRNjC4Mn2hxiY662V5z1C+RlqPWnAppgjbkhV7c6gyUGhPFrGf3deJfACoBEgYk17wy1VnEtcEkSC4Zbvfc+2muugrHMOhSYsJQTyLLLWiWgBp9IL0IkUeTkIGVoJk7No6Xj7zznzGjC0OXMe4Wcg== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4a95f0ed-9389-4146-2143-08d87404ac74 X-MS-Exchange-CrossTenant-AuthSource: DB8PR04MB6795.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2020 07:57:49.8372 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: IhDAjhzPgJZCXjI/oy5QwC918xzNyRWaW65jK6w50GNRDXNESlsJhZzn9XtcEBddVDwfzokuEvzQMLRgxfl5uw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7430 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org After double check with Layerscape CAN owner (Pankaj Bansal), confirm that LS1021A doesn't support ECC feature, so remove FLEXCAN_QUIRK_DISABLE_MECR quirk. Fixes: 99b7668c04b27 ("can: flexcan: adding platform specific details for LS1021A") Cc: Pankaj Bansal Signed-off-by: Joakim Zhang --- drivers/net/can/flexcan.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index 4d594e977497..586e1417a697 100644 --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c @@ -405,8 +405,7 @@ static const struct flexcan_devtype_data fsl_vf610_devtype_data = { static const struct flexcan_devtype_data fsl_ls1021a_r2_devtype_data = { .quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS | - FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_BROKEN_PERR_STATE | - FLEXCAN_QUIRK_USE_OFF_TIMESTAMP, + FLEXCAN_QUIRK_BROKEN_PERR_STATE | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP, }; static const struct flexcan_devtype_data fsl_lx2160a_r1_devtype_data = { From patchwork Mon Oct 19 15:57:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joakim Zhang X-Patchwork-Id: 298844 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.9 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D912C43467 for ; Mon, 19 Oct 2020 07:58:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C02492225A for ; Mon, 19 Oct 2020 07:57:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="libpq5Qa" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728398AbgJSH56 (ORCPT ); Mon, 19 Oct 2020 03:57:58 -0400 Received: from mail-db8eur05on2066.outbound.protection.outlook.com ([40.107.20.66]:52033 "EHLO EUR05-DB8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728340AbgJSH54 (ORCPT ); Mon, 19 Oct 2020 03:57:56 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VwuwUXOrYr0Qq+6TSNUUywhBXHPL/uRiBvmtfuOkZcQxwS6WGgoIPWLLWUub1B1kebywWUQ74+IoRT6ADJnCkzvpEWwWBBhfFXRcCMS3Gx4gOK04R5Td6peHZyMn2LQ43W0589iqasQi6n2qr4/PhltARKd3wx6miGAidx49S0rdn+DtYNRlPfQp3ZvcLc3v2LNXNPnrDUgII0EhudfJGQ1zGnZ8UbdY/JyZEPFAqqVkLh3EakX/yHgqXDU58VSvpG4+KEIWZbqoVjJrLM0YpTW/tQO0yAwpjFcYSDXa3bX5sGcmD1eG9X6drr91GCB9TYGsNJugMEqcfocWTyxrow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wCJodCo2r/+Tzl+AgQJiLwFEQJopamT1XfSgrEiYf+8=; b=CrpD0hOz7QiWkxqmZz7F3JmUPPxtJ1uw/GrtfONBI3QfnoHPDZmMiSN6B3g1Iw034g8/OgbCSNXsGYQcYe03doDfN1U+zpk+CPjIKUJHs2NhJu+CiziT5vVxMHBi/uQGslE3wkTURDiErIaJgp1H35dFnF+hAZVcNH+N+fIoZM5z1dy5QJtJ7DmJKKIlIDtMBOCFRYMUoWBDMR1+To1c2g7iCqb3EnGm+oPX2XddFssu2FUYlP/7/ao8ZdltMD8Dkos8iUY9aitpWu48zTHQEM3klZyFnXwaSJ4dEx0YtskSJWv/hrxZcwuDxoyyzR2Yh1kDzMdvtC08d51zqQHlkQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wCJodCo2r/+Tzl+AgQJiLwFEQJopamT1XfSgrEiYf+8=; b=libpq5Qa4VXXdzVubahlTH+SClGW7u/UwKqs3y2hf0CzV8EgmMwSZW2nP+v1FTaPpWGf3hKqq2iVV1VfWHpqBYMaIcOPfkTabrxJKX+2kgbQGUr1r9nuhiH8O1bRn235jpS1WsgtVNbaBiBdf9QNW1M/0p+v8oFlY3eYU0/V0sI= Authentication-Results: pengutronix.de; dkim=none (message not signed) header.d=none; pengutronix.de; dmarc=none action=none header.from=nxp.com; Received: from DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) by DBAPR04MB7430.eurprd04.prod.outlook.com (2603:10a6:10:1aa::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.22; Mon, 19 Oct 2020 07:57:54 +0000 Received: from DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::3c3a:58b9:a1cc:cbcc]) by DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::3c3a:58b9:a1cc:cbcc%9]) with mapi id 15.20.3477.028; Mon, 19 Oct 2020 07:57:54 +0000 From: Joakim Zhang To: mkl@pengutronix.de, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, linux-imx@nxp.com, victor.liu@nxp.com, linux-can@vger.kernel.org, pankaj.bansal@nxp.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V2 4/8] can: flexcan: add ECC initialization for LX2160A Date: Mon, 19 Oct 2020 23:57:33 +0800 Message-Id: <20201019155737.26577-5-qiangqing.zhang@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201019155737.26577-1-qiangqing.zhang@nxp.com> References: <20201019155737.26577-1-qiangqing.zhang@nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR02CA0107.apcprd02.prod.outlook.com (2603:1096:4:92::23) To DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.71) by SG2PR02CA0107.apcprd02.prod.outlook.com (2603:1096:4:92::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.20 via Frontend Transport; Mon, 19 Oct 2020 07:57:50 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: f1876f5a-c193-491f-cd92-08d87404af0a X-MS-TrafficTypeDiagnostic: DBAPR04MB7430: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2449; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CuqXsbX+UraTGeA+AITl00OwFIPAtUMqQvvzJzflffUlCamDePZINkZVL9ksReAgYEKKNlDouzlRT4IIVmkCADvK5N/2530MutZEyVqEGqk+ytxPTPlPcMO/ywpIZEGPfUt1PFbeA6vwr4CfKRBUjl4d32EwAIophe1PL9HJJC8rZPPjVxc/KnlFJ6beLfX3bEmxNphXz+TPRZNN3CiCld5ZchhmBsE8cjq8PzJ09DCbqJUB1fJZmP1RER3ob3jEC+/jXho2NdhlKFFtsBDpv9soUFvVpE7eRTFmDh96OIrU6/HIZY7SvEgM9fo9tSTd6wy+1MG/OA21w+UcoaU+7wtEuTOP+nms9WkaAvMSy1USgFpVtqQj+CIk+Uegcocj X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB8PR04MB6795.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(396003)(39860400002)(376002)(346002)(136003)(1076003)(6666004)(2906002)(4326008)(956004)(2616005)(316002)(5660300002)(52116002)(36756003)(8676002)(8936002)(6512007)(6486002)(6506007)(16526019)(26005)(186003)(86362001)(66946007)(66556008)(478600001)(66476007)(83380400001)(69590400008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 6Pstc2n9ZtMNrj7jPIkngVZb5v3Ni6r1V4AEaEfm3ARAEICGKrY8DtZz6UE4kMb+cEhSf501UIDPMxJXWarze1hOBiV1Zx/40DL+sYvmxQMr2d3BIcvlc1GkDOdZaE61rAnGl+tXBvwsmb9OKswBZvmcE2++eLIQmJRAchhoMBHkvDTAQfEd21QeJh9XIFgnD1as9xAYrayxZmDNx4Nm79f+Z701Zw+x2jMI7wfddlSrWgnjgU5pZCc74EXwVPKD1rsmaIoBuXdkxXfNCEeSJp6mNBm7QDS/hgqQQewppFf4Y7W2yN1DOWXiN8iarP7Z1s4kCxy0Drqs/JvdBA1c55hYzOHWxJ+C8owRWJECB4GFGen0GHRMLu/WBHhghBPcZq1A27J6pKH9chDT9XTwXCRxGZ0cqM7GHwg88daAdUMb27SbMhIybiGmSHNcGgaaqnz1PvlNRIxNqHPYaZb5Gvttjgj6BOBC7lV+V9042GpU3rn8rjB7EbPkJdajCgYywDUe6UyDevVC4AyNl8+vV3r4264JjHgOSO0zPp4WNAzm+24sR8a7TIWuDLPbrdF8Opq+pYS0cxDiahFm+1MwFNABRXTXc2Z/kmrn3dyVaDWFYBpbrhvmhco0cx7xEJp49ws1X7R73ad7Vs6E9nvPEA== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f1876f5a-c193-491f-cd92-08d87404af0a X-MS-Exchange-CrossTenant-AuthSource: DB8PR04MB6795.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2020 07:57:54.0895 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ZZrvi4+gd1CDJnU85JN7/ANg4zws/rI0WFWKHwS1tTOtoQNS6OI6m06zq9egJT4f8XizRUV3sjwrVIqPiZrJbA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7430 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org After double check with Layerscape CAN owner (Pankaj Bansal), confirm that LX2160A indeed supports ECC feature, so correct the feature table. For SoCs with ECC supported, even use FLEXCAN_QUIRK_DISABLE_MECR quirk to disable non-correctable errors interrupt and freeze mode, had better use FLEXCAN_QUIRK_SUPPORT_ECC quirk to initialize all memory. Fixes: 2c19bb43e5572 ("can: flexcan: add lx2160ar1 support") Cc: Pankaj Bansal Signed-off-by: Joakim Zhang --- drivers/net/can/flexcan.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index 586e1417a697..c2330eab3595 100644 --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c @@ -217,7 +217,7 @@ * MX8MP FlexCAN3 03.00.17.01 yes yes no yes yes yes * VF610 FlexCAN3 ? no yes no yes yes? no * LS1021A FlexCAN2 03.00.04.00 no yes no no yes no - * LX2160A FlexCAN3 03.00.23.00 no yes no no yes yes + * LX2160A FlexCAN3 03.00.23.00 no yes no yes yes yes * * Some SOCs do not have the RX_WARN & TX_WARN interrupt line connected. */ @@ -411,7 +411,8 @@ static const struct flexcan_devtype_data fsl_ls1021a_r2_devtype_data = { static const struct flexcan_devtype_data fsl_lx2160a_r1_devtype_data = { .quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS | FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_BROKEN_PERR_STATE | - FLEXCAN_QUIRK_USE_OFF_TIMESTAMP | FLEXCAN_QUIRK_SUPPORT_FD, + FLEXCAN_QUIRK_USE_OFF_TIMESTAMP | FLEXCAN_QUIRK_SUPPORT_FD | + FLEXCAN_QUIRK_SUPPORT_ECC, }; static const struct can_bittiming_const flexcan_bittiming_const = { From patchwork Mon Oct 19 15:57:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joakim Zhang X-Patchwork-Id: 298842 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.9 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 180D3C43457 for ; Mon, 19 Oct 2020 07:58:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AFC102224D for ; Mon, 19 Oct 2020 07:58:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="KRno9dzE" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728671AbgJSH6Z (ORCPT ); Mon, 19 Oct 2020 03:58:25 -0400 Received: from mail-eopbgr30048.outbound.protection.outlook.com ([40.107.3.48]:61410 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728423AbgJSH6H (ORCPT ); Mon, 19 Oct 2020 03:58:07 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hp/Crg4djTaPAgcSmFphLTYaaF2eZHoHOgghkgG0S586ekVfb1YCjBFIZ/2KN1U54XlUXkY6o6/bmKFuCoFXo/aArd2SspIKUVMJycNURjNDi/jGaWVq+UXXYtiX8mTlqQNtNdF3QS9X6ED55quRqVGKBG0iMMorbo+7GLyEWFdpT1pdl2xy1fw/dYCmgdIt+sirVjL1uv9JhXkToQq6L6nJrpucsjWtpaA6+vx77hA52muEI9W5yxySF1+VCSSsxRBnHYLMQpW+Vfx4qSGulfbIWBAw+ak7QbfqARgOhJOReYDxSGzx1277DrkN/4Mjjpd0ROaxQXrIHxKn92wZhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=x5xuKQAQda6WMgDOX2SvDxTU5/aWbfXr5OA6dTBscEI=; b=XV0yJ4GDbFqRSy4CXn+4WjNeU9vv65jXB9dH5h+3RBrEALbBYNc0FBEa3F9pZ6nZKhGyCuVCJinTnSvknYCeLAwzpbxuAF3IES2PeOjNGReqduvlI8cMoMmiHV1B7QiNz+d+NwG+B3gsdat7zzo4DSBSbk0+wzx5euQCz/6agh1/bCuollcFlByVmWPrBfKUBF9rpNaRug1+R2fjcfRCm19mFIxbuh1g7l1E4/HWPqEveo5vRMUFSJ10w/CnxlPFp7uLR5In4KcO55poBzhwsVzXTS9lqHfTV1AQXw31yGsA3vHxWYIRThlW0jOf5A/W7C8NoM8YTkWPRjW+3B/Jvg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=x5xuKQAQda6WMgDOX2SvDxTU5/aWbfXr5OA6dTBscEI=; b=KRno9dzEJJYnr+TPk4p4XDIQP4At6AQEprBzANTRfnjcp7zfsuwv3WPFs0cdIEtTt5DF+uiONzF1yJywxq3NW/t1gUBxv1QTW/VaEIFEmkSifZ/fGCBkz8TTkklYWuxHtA/m0p8aeCio7+UZ6P5+siLsn93Eaz4awhAev3mmmkw= Authentication-Results: pengutronix.de; dkim=none (message not signed) header.d=none; pengutronix.de; dmarc=none action=none header.from=nxp.com; Received: from DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) by DB8PR04MB5852.eurprd04.prod.outlook.com (2603:10a6:10:b0::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.28; Mon, 19 Oct 2020 07:57:58 +0000 Received: from DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::3c3a:58b9:a1cc:cbcc]) by DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::3c3a:58b9:a1cc:cbcc%9]) with mapi id 15.20.3477.028; Mon, 19 Oct 2020 07:57:58 +0000 From: Joakim Zhang To: mkl@pengutronix.de, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, linux-imx@nxp.com, victor.liu@nxp.com, linux-can@vger.kernel.org, pankaj.bansal@nxp.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V2 5/8] can: flexcan: add ECC initialization for VF610 Date: Mon, 19 Oct 2020 23:57:34 +0800 Message-Id: <20201019155737.26577-6-qiangqing.zhang@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201019155737.26577-1-qiangqing.zhang@nxp.com> References: <20201019155737.26577-1-qiangqing.zhang@nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR02CA0107.apcprd02.prod.outlook.com (2603:1096:4:92::23) To DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.71) by SG2PR02CA0107.apcprd02.prod.outlook.com (2603:1096:4:92::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.20 via Frontend Transport; Mon, 19 Oct 2020 07:57:54 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: bdb59c9d-11de-4d07-b094-08d87404b196 X-MS-TrafficTypeDiagnostic: DB8PR04MB5852: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2331; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vW1cbHYfsLrF6axrkk8GUXPIBieie8aOF42B6LzoWBX4ddHd91fj84F7AgmXWrDoOKSxKQBhxNvpvTB0JdOOeYa0F5NmyVuz+1aAE7C0B2DJr4jDmN2DZjbSzFTOlEFYS0mdT6G9de7C8uT3GcSzl3ZdDL3s8K0HC/jaW4fq3jFxQofPuU6VDvI0UDtCE6xJDrV5zWG45yMvfcDPdoVMd1IJUUCHeLJhAeRHdo4mOA2D/33ujIMyhb2BtI8p3T616+KOcl6K2UkkGX0/TrtRuTaGdUVtzhJwiGCCdt9GsE+c278NrPbOgp6MfJ5wc0lcnYzz+MJY7lzSwNiVa2pT4ks7tVoEjib6MHGDdDR1kXlIDnkjOMMOqnjKk8s+WN+A X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB8PR04MB6795.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(39860400002)(376002)(396003)(346002)(5660300002)(8936002)(8676002)(66556008)(66946007)(52116002)(36756003)(66476007)(6666004)(6506007)(6512007)(956004)(2616005)(83380400001)(316002)(4326008)(26005)(478600001)(6486002)(2906002)(186003)(16526019)(1076003)(69590400008)(86362001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: F1D+L2jpTasPCuVYH9u10oaOw9HDhMo+Lmkn6NyYG3ClSHTt/Cl0PMLBSNAHqorUPgdet4Dkv6UlLKojY5TUTTttAGLdIhbmX0zzWAUn6KpDaPSVEr5iMzLMscJzukhzI0yaN4ZKZkb51/65NcP/hvSbQD3njQgBF2PZ9RDtyXxFtoviPVhKMqDXIfRjH/88RxoDSar3bXraihXVCcapZDCnzQXbsnOZyH+GO57lNI814xjBl0t2gc0134oT2LHIGbfZAxTMxmffV1cNe1y2IglCbdKLIiXbhDdhngdoGQlpBFMDy3bEJk/sKMUwwW5+VnGuFH7ZGXtkySmC/kn0RZ8FgD7Rtv40P3kUuHEIfBXtQRARXSeEn4TfP9gyIhxsKJCm7NpwRpSVay6AdDJTLSzHbpTUEahLsBFys0qjpsbIttu5INu2fRD088MLkURwrmUgIIrXdO7gor8R0vF9WsceLdJojb691y3jDY0D7tR5l29/DiQ/RJnN1dP5erpNg4eH58YGDrebJmg6/hZF6uNOhFgMOT1mO2/9dQeelojHzsno2eu+1KaYKnUzpn7spcHN1cdZx9jMor1RgwOezueyYfCLX6KuESpjpgCuDWEfz8zPL3ZBUGlRWRc54KxUFcXe30QJPNLDH3ntaDZFbA== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bdb59c9d-11de-4d07-b094-08d87404b196 X-MS-Exchange-CrossTenant-AuthSource: DB8PR04MB6795.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2020 07:57:58.4752 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: qNiwL/bUi8EJAkgE1EmSLujis+FSq2kIrbNEG2+2oCjgr4PSZbsaWNyU+hrMfHukGReLt4KpBdiOjuCJm8wIIg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB5852 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org For SoCs with ECC supported, even use FLEXCAN_QUIRK_DISABLE_MECR quirk to disable non-correctable errors interrupt and freeze mode, had better use FLEXCAN_QUIRK_SUPPORT_ECC quirk to initialize all memory. Fixes: cdce844865bea ("can: flexcan: add vf610 support for FlexCAN") Signed-off-by: Joakim Zhang --- drivers/net/can/flexcan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index c2330eab3595..06f94b6f0ebe 100644 --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c @@ -400,7 +400,7 @@ static struct flexcan_devtype_data fsl_imx8mp_devtype_data = { static const struct flexcan_devtype_data fsl_vf610_devtype_data = { .quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS | FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP | - FLEXCAN_QUIRK_BROKEN_PERR_STATE, + FLEXCAN_QUIRK_BROKEN_PERR_STATE | FLEXCAN_QUIRK_SUPPORT_ECC, }; static const struct flexcan_devtype_data fsl_ls1021a_r2_devtype_data = { From patchwork Mon Oct 19 15:57:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joakim Zhang X-Patchwork-Id: 288358 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.9 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45A3CC433DF for ; Mon, 19 Oct 2020 07:58:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E2A2122243 for ; Mon, 19 Oct 2020 07:58:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="A9j85VmG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728469AbgJSH6I (ORCPT ); Mon, 19 Oct 2020 03:58:08 -0400 Received: from mail-eopbgr00082.outbound.protection.outlook.com ([40.107.0.82]:63976 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728435AbgJSH6G (ORCPT ); Mon, 19 Oct 2020 03:58:06 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oVlfz92XjB+LRQ9HwO7jwxAR1ikaLfG5WiPxHnfPj2ZVk5JGPoSIQ1ZjXTRk4wZmKbyLIiiw5LD2FPDxmb5AA07cBjl0jpUzEG6jw6RSv9q6mmRgG64uCmqG/Tlimp6/3WYAuTvQ3uhepuevFhDrHLLaVAO2kzvpkouAboMkyXzFCnd84Ex4Vd6RDnnBY92LKYzYTo7P8w40vJE0RlFCiz/+74EQSuD2NPegUAXojtGfHBnJt0shPlChb0Uu9w1ce4SEHNemDkPCeMcczWXu0+1OCfrd4nPnCA15FM5UXtQKKNLntsGYpcQgMMV9VUfOfeg/v9Lro1VbvXaQw8wffg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IkDwRQQnDsJ6l4YhI6BNKWr2jPI/N3rQnuj4f1bPETo=; b=Za5kHCr2eyEyr6BCG5YwPT84jNISzIrz+NK1Cj3VPNpaJjtKnQoOrRxqpU3oyXtp/3fT6Uzc/Pg0LXbHCpBWsRqMKd9i2x4+9Uez8M+UFecEUFe76tB4lTWdirMdU6Kd2qJblEbxXRGaEP7JuKzwdz3FDrad00ozo8uX8nA8qgpZIe0uKlM4gGXy9/5B4G2ANwmwrbH+64886q8KuB2sTm96RPTyiw3wd/zQDVVjHpI4GXlSZBP8YnoVaKJb/JoMS14CCAIqDSyPh9Fzbajde8+7VbIjzYZweDO0b4ysCBb+sGXEVsUY/V9bXbBwqJp60Ui4T5TNQj11wAZbOlEhBQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IkDwRQQnDsJ6l4YhI6BNKWr2jPI/N3rQnuj4f1bPETo=; b=A9j85VmGmZkVgF1b/KPo8+tWb65MhtI5iAaUJvORDj9Vp31AZllBBbprsymQJLaVVMzUYGjBG+wIPLSxu0XKM7r2VMg9eO/YnuSF/MaSlz//eX9zRVFrFz2yoQffVZ2vibXpeM/TbSBmV87Le9pQDfEMtBUVNqZ1g93WlwIfRSI= Authentication-Results: pengutronix.de; dkim=none (message not signed) header.d=none; pengutronix.de; dmarc=none action=none header.from=nxp.com; Received: from DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) by DB7PR04MB3963.eurprd04.prod.outlook.com (2603:10a6:5:1c::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21; Mon, 19 Oct 2020 07:58:02 +0000 Received: from DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::3c3a:58b9:a1cc:cbcc]) by DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::3c3a:58b9:a1cc:cbcc%9]) with mapi id 15.20.3477.028; Mon, 19 Oct 2020 07:58:02 +0000 From: Joakim Zhang To: mkl@pengutronix.de, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, linux-imx@nxp.com, victor.liu@nxp.com, linux-can@vger.kernel.org, pankaj.bansal@nxp.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V2 6/8] dt-bindings: can: flexcan: add fsl, scu-index property to indicate a resource Date: Mon, 19 Oct 2020 23:57:35 +0800 Message-Id: <20201019155737.26577-7-qiangqing.zhang@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201019155737.26577-1-qiangqing.zhang@nxp.com> References: <20201019155737.26577-1-qiangqing.zhang@nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR02CA0107.apcprd02.prod.outlook.com (2603:1096:4:92::23) To DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.71) by SG2PR02CA0107.apcprd02.prod.outlook.com (2603:1096:4:92::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.20 via Frontend Transport; Mon, 19 Oct 2020 07:57:58 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 8bd2224a-c682-465c-806c-08d87404b428 X-MS-TrafficTypeDiagnostic: DB7PR04MB3963: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nJlwXF7QrYfa30TCzhZfaJRYXFy1dKvmEeV+TkvQcNo5uUQcuTa6XL/aNc2pgEDuezAtvLp2Gz2KZv53VkFEJ9AAY1NHlByu9MRHbaQdvW7R8H0ZXcoKAnEnelydsV35VyWDpHj+MXkYLdhuloB/4+3/QsZR/Tff32+cLNdptRHMtI/l040XP1VLKn8ts8YWPU5rTCuArqvIRbd2+y3eeMnAOplcK3DZci5gj4b8feEJfq8JIEXBocF22nNQ7DoA8gESnFsl+T1Sj4UWsnPFtjqxhloDBZgrncKe4tAqvHhVBRou964chow8AiVMRFoHLA+GdVpcKXfMk8fo3MjRnQBhvNMh7rPrAtyQ0Oa59NW2aCEpx3ATUZsQDTsYerN7 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB8PR04MB6795.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(39860400002)(376002)(396003)(346002)(69590400008)(86362001)(6512007)(478600001)(2906002)(316002)(5660300002)(36756003)(1076003)(83380400001)(186003)(16526019)(956004)(2616005)(8676002)(8936002)(26005)(66556008)(66946007)(66476007)(6486002)(52116002)(6666004)(6506007)(4326008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: J898xXImeU0DnUbLgyCBquzYSWy4a60kKjdx/evZfRdqortK7FBjiPfvfwcrDKyfqT8vTMOnmGIcnPT3zeAWl75eCei3dsKWCYC9C8G/LD5uzFjoCGsxRp096Nwyb+KN6LTJ6Jk4+CYQdNVSHfv6NfVjY2sw7s0sr0VAbIvbtIZ3IBolA9wAphc6dKv1nPHAkUmdllsrBnoycv882X6Pz8aGUALyCKe5SJ/JYeOaJIzQxERbXB6xhKaegDrLRDrNcC5qtnw3l8RCX7GhlRRjyj61gDQXm0nZJvZOU3hIqD+RhVHk4q6fxeUVTY0ufAQwjtxdBx3LsKmaUtD/F/MTNCZvyWEDgPbiNTkHad5wNBRI+BDdcRFQVj52OzeaiEqOulz2nqOFVrfnoy4f5NYpn5zj8vDqZ0REY6DUJiJ+r3TXbEC0qUs1isv9xsNe632Q1mP9xS4X6Z+SmMPA9NhwcijBxJzsswgByvtEzs3pztNw4wpdWZGjUAa+5RFMHDLFd+o1qzHZpnkxST4hzG86iTpvIY1t3rt4EddTbMyTK/iMoCaO4Vu6xneCWGKB1Y4FpZiDn9Ygc23pB+KdaopixBIC87Nq5qpEIBKeSISbUACpvIKUPHUDxF4mCcpTK7mawsRayhqo4kwH+hxiYICMog== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8bd2224a-c682-465c-806c-08d87404b428 X-MS-Exchange-CrossTenant-AuthSource: DB8PR04MB6795.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2020 07:58:02.8201 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: sgcro7nkZz3+wzMB59cBTye7+dWR6bwGEzmEzVPkS+M6DFP51PItSeuKdCEN1E+XfvzoWfMO62TOXQCX84oCWQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB3963 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org For SoCs with SCU support, need setup stop mode via SCU firmware, so this property can help indicate a resource in SCU firmware. Signed-off-by: Joakim Zhang --- Documentation/devicetree/bindings/net/can/fsl-flexcan.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt b/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt index 6af67f5e581c..38a7da4fef3f 100644 --- a/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt +++ b/Documentation/devicetree/bindings/net/can/fsl-flexcan.txt @@ -43,6 +43,11 @@ Optional properties: 0: clock source 0 (oscillator clock) 1: clock source 1 (peripheral clock) +- fsl,scu-index: The scu index of CAN instance. + For SoCs with SCU support, need setup stop mode via SCU firmware, + so this property can help indicate a resource. It supports up to + 3 CAN instances now, so the value should be 0, 1, or 2. + - wakeup-source: enable CAN remote wakeup Example: @@ -54,4 +59,5 @@ Example: interrupt-parent = <&mpic>; clock-frequency = <200000000>; // filled in by bootloader fsl,clk-source = /bits/ 8 <0>; // select clock source 0 for PE + fsl,scu-index = /bits/ 8 <1>; // the second CAN instance }; From patchwork Mon Oct 19 15:57:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joakim Zhang X-Patchwork-Id: 298843 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.9 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6522AC433DF for ; Mon, 19 Oct 2020 07:58:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 04BBB2225A for ; Mon, 19 Oct 2020 07:58:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="YAwDNVgd" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728521AbgJSH6M (ORCPT ); Mon, 19 Oct 2020 03:58:12 -0400 Received: from mail-db8eur05on2046.outbound.protection.outlook.com ([40.107.20.46]:54662 "EHLO EUR05-DB8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728482AbgJSH6L (ORCPT ); Mon, 19 Oct 2020 03:58:11 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=go51YaqPCxq6lmBXprpVZ6WRCm6Mceq/VDDcg5MlbUp33yfh0oDDn9ci/dXfDWfWjn6Q0TM/7WspBkTUnN30tcdJofVpUQhioK2NsL3vwdpVMSI6aSYAX5T+QgWGm1sC/zPL8hwgcatFxWpNYbjLm4d8wS8p4AZSrEAAc6kK9iUnG/uWUz/gz9kDAecdRCvfszut4He3Yyj89XWahanJYtYjxOIK/NPmrPNd+2pAYHFiJ9GaNsA69P45OIWCF4fo5gA/xgFQvFmrmSVD6tmxbkULPVNtVv3h8X1MlsgefXFD5iYmTF/3uWYe/zZ7KhpCfEr7o99E0vSNiDktwdzrng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kWusqq3PDt6IZ6JfY6g1vhBAugxrktpiIQky12TlL6o=; b=S3vW2m/1b98/sPunxu9/uNgBSBevNZKNllSyzHo3tSDL2B4nfot1Ht6FwL/PQRzMSBb5ScI/zHgVpohfYqZVPu8E4ifb7yhguFRNAKvJr/dHpUZCNKFuignrctBdkZqkd4CUKgw5SBX/GO1E7OfArmqvulHtHy7uNzYf+VDbLKIEv3M3JNEyjIgRzHn6uMKstmASolZrPqx75DecCHqhDHinrD7iTkPY6GOGIDaXUj91dI9d8rgcf5n8t8FiW7HSHxb2QCad7M9ayDZKihzp0FjYOLKou6Bi6S8T12wBRYmhbdaYK4cH5t+MO9CZtyBasIMJcfupV9xxoEWjC+eddQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kWusqq3PDt6IZ6JfY6g1vhBAugxrktpiIQky12TlL6o=; b=YAwDNVgd2aP4eglnArYG8sgPt3avBoNaeUr/5E+zIJcFoD4Bs5ym6PbxLYY0LM7cDMWOtDs1ff7rgbCnXDHWg2hlMgIa9/dR6CM0mYEL+DSxFYOIP0CRRXdscOEJHvbLz/Ob9ow10PjPvEqkRRZlsIGhf4hkJeCyWV1Zap+Hr1A= Authentication-Results: pengutronix.de; dkim=none (message not signed) header.d=none; pengutronix.de; dmarc=none action=none header.from=nxp.com; Received: from DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) by DB7PR04MB3963.eurprd04.prod.outlook.com (2603:10a6:5:1c::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21; Mon, 19 Oct 2020 07:58:07 +0000 Received: from DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::3c3a:58b9:a1cc:cbcc]) by DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::3c3a:58b9:a1cc:cbcc%9]) with mapi id 15.20.3477.028; Mon, 19 Oct 2020 07:58:07 +0000 From: Joakim Zhang To: mkl@pengutronix.de, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, linux-imx@nxp.com, victor.liu@nxp.com, linux-can@vger.kernel.org, pankaj.bansal@nxp.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V2 7/8] can: flexcan: rename macro FLEXCAN_QUIRK_SETUP_STOP_MODE -> FLEXCAN_QUIRK_SETUP_STOP_MODE_GPR Date: Mon, 19 Oct 2020 23:57:36 +0800 Message-Id: <20201019155737.26577-8-qiangqing.zhang@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201019155737.26577-1-qiangqing.zhang@nxp.com> References: <20201019155737.26577-1-qiangqing.zhang@nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR02CA0107.apcprd02.prod.outlook.com (2603:1096:4:92::23) To DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.71) by SG2PR02CA0107.apcprd02.prod.outlook.com (2603:1096:4:92::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.20 via Frontend Transport; Mon, 19 Oct 2020 07:58:03 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 7866f728-2dae-49aa-d363-08d87404b6e6 X-MS-TrafficTypeDiagnostic: DB7PR04MB3963: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:372; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lNi1LeNcReue3GDh23L6/Rtw+4S7zPQGzR70eOQb2l9hyGosJybYvpczD/HRCjIpnDzkU+PLEF9i8Fr2p/zLw17v2hXXa6q8mhkT+cBi4WVMyhIbnaFOgxPIUoJdw6eVh3g+1FhnnFspj7qtNdKh7jBTC+ecER8s5Ot8U6QqA6DkIgzhzjod6VvIcgRskasI9/Sf4A29wP6QUEdKSGzXT4xzJHzMUjYjNs/fufjSWt91NLH1wpPPxhqld7JnQgq5jzkCI8Q+zp22+6f3UGA1RhLnY0wS2QvZeD/Sq0XNOsCekR2s8r+NSTedybQRe15Y30cx6o5k9ccfKJmfXDixYHyfpsPuvu1PQh9NMEL35NsCw4GS9AwPoSWaXMzelgmo X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB8PR04MB6795.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(39860400002)(376002)(396003)(346002)(69590400008)(86362001)(6512007)(478600001)(2906002)(316002)(5660300002)(36756003)(1076003)(83380400001)(186003)(16526019)(956004)(2616005)(8676002)(8936002)(26005)(66556008)(66946007)(66476007)(6486002)(52116002)(6666004)(6506007)(4326008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: cG7wSpuGWTdfs/VS7TLwlRXHE3ToQISZO0JZ8Rk01xWO2xc7KHFHEKg6+Xqo7MGXaqiezH15/FDqwbVgw+ewcGVCdksVA/GAWms3AKEe+Dr9z5hD+I/uodFZkB7mwZzjKw3P3d7Zaa5h8O050f5VeU9n0ic6xw5vZan6NxCQAvlMSW8ouQPzU6Vcj/+CKlcNpRojSm54NPbzK0Pb2ZAC1SkIWwLfzwM3dugF+sTdbxJ6CP4IAJWYdyqe4dFkGgoY9KxZgTNsoXI0cYvsqjOdV5L7ArJ8W6arNp0FP/gm75NbD+aGq8N7AvV6/8GuH3wZP4EkgWprALFdykqeZRhgEqyVMFHUHnfHua1K5y14iqTnJjogYNxj1HGbnJuBHE2PwhOxwhbpd2jrUPafK6bmmKhUogXI3Qng7dTVauufZZ+b5HajzJ4S2ZeQzTh4THrVc/gGMzxYVosZVkZmiJRtunIYR4g/ATW7xlBUqo1lZ6LeS89lvuPRZW4sZcqqqQeFV0Jjf1ZUVGwN5u1vTCHZe3UJWRG0V/PXhk6/6EImVFeLsCjpWqbnegy8XUTP9E1zSMDvWgGLwdigv0svVR+y4DP0iqLrJvLIUuEF89ZqYuCyOGb0myJAgaACIAqdJJYQvulWOXtviK6idzIrIow2yA== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7866f728-2dae-49aa-d363-08d87404b6e6 X-MS-Exchange-CrossTenant-AuthSource: DB8PR04MB6795.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2020 07:58:07.2845 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: K6TD6MGn7qrGmxRrWjuDGuXFDQIOIWNso6qi189Z0EcwfE69JfBuHQfdzZjS5dE/3UXrA1i2Tdyc308Dsl2+IA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB3963 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This patch intends to rename FLEXCAN_QUIRK_SETUP_STOP_MODE quirk to FLEXCAN_QUIRK_SETUP_STOP_MODE_GRP for non-scu SoCs, coming patch will add quirk for scu SoCs. For non-scu SoCs, setup stop mode with GPR register. For scu SoCs, setup stop mode with SCU firmware. Signed-off-by: Joakim Zhang --- drivers/net/can/flexcan.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index 06f94b6f0ebe..c0cdee904ca7 100644 --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c @@ -236,8 +236,8 @@ #define FLEXCAN_QUIRK_BROKEN_PERR_STATE BIT(6) /* default to BE register access */ #define FLEXCAN_QUIRK_DEFAULT_BIG_ENDIAN BIT(7) -/* Setup stop mode to support wakeup */ -#define FLEXCAN_QUIRK_SETUP_STOP_MODE BIT(8) +/* Setup stop mode with GPR to support wakeup */ +#define FLEXCAN_QUIRK_SETUP_STOP_MODE_GPR BIT(8) /* Support CAN-FD mode */ #define FLEXCAN_QUIRK_SUPPORT_FD BIT(9) /* support memory detection and correction */ @@ -381,7 +381,7 @@ static const struct flexcan_devtype_data fsl_imx28_devtype_data = { static const struct flexcan_devtype_data fsl_imx6q_devtype_data = { .quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP | FLEXCAN_QUIRK_BROKEN_PERR_STATE | - FLEXCAN_QUIRK_SETUP_STOP_MODE, + FLEXCAN_QUIRK_SETUP_STOP_MODE_GPR, }; static const struct flexcan_devtype_data fsl_imx8qm_devtype_data = { @@ -393,7 +393,7 @@ static const struct flexcan_devtype_data fsl_imx8qm_devtype_data = { static struct flexcan_devtype_data fsl_imx8mp_devtype_data = { .quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS | FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP | - FLEXCAN_QUIRK_BROKEN_PERR_STATE | FLEXCAN_QUIRK_SETUP_STOP_MODE | + FLEXCAN_QUIRK_BROKEN_PERR_STATE | FLEXCAN_QUIRK_SETUP_STOP_MODE_GPR | FLEXCAN_QUIRK_SUPPORT_FD | FLEXCAN_QUIRK_SUPPORT_ECC, }; @@ -2043,7 +2043,7 @@ static int flexcan_probe(struct platform_device *pdev) of_can_transceiver(dev); devm_can_led_init(dev); - if (priv->devtype_data->quirks & FLEXCAN_QUIRK_SETUP_STOP_MODE) { + if (priv->devtype_data->quirks & FLEXCAN_QUIRK_SETUP_STOP_MODE_GPR) { err = flexcan_setup_stop_mode(pdev); if (err) dev_dbg(&pdev->dev, "failed to setup stop-mode\n"); From patchwork Mon Oct 19 15:57:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joakim Zhang X-Patchwork-Id: 288357 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.9 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E04CC43457 for ; Mon, 19 Oct 2020 07:58:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BCA6A2224D for ; Mon, 19 Oct 2020 07:58:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="kUAXdBx1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728616AbgJSH6S (ORCPT ); Mon, 19 Oct 2020 03:58:18 -0400 Received: from mail-eopbgr80089.outbound.protection.outlook.com ([40.107.8.89]:51266 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728570AbgJSH6Q (ORCPT ); Mon, 19 Oct 2020 03:58:16 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Omrokz4WgmYHtwrFblKBcp/jx2tPty9jtRBVp/QbI1vQHhEUW8goyVI/5j4HrYeqTvH0gLOyalUr2DONLHkXIJxWStcGyEC67XBnKavsW+impBOuNkSeGT9YwfJqTeA525HC3CPDYsgohC71vIF+4E0TS2jq/JiFKmQfUiy79oT55pSgYXYUItdit0zQ4J88345rtqDs1jfrcF/jAJ0EQGgBKLAuAo10KOmSJAqI/IAVokclCuV4GGRUAGzTsXaguHx9Y74tAt1dzMc4lpzWzG7FoSPiitMmomYc7QKk/sALphTK2yzhG+JhXVyuPnCD0Wvgi/olXwt5jX1qzx6Zcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C5PTBAvCw3PJiXmYefQzyZfL7s8rHcWnc5BjSN3brVM=; b=WJk0jtrJp0ltwsl/dlnjG3Q4+hDp0a/4RcZxfcsQ0lxgcaGDfR4Xhfe3x1J9WPJxyJlEHNCYV2DXTIOI7vdjquZNVjdyoVPJPo/fvtYn64+41ldt46rGaIZGIpvjerzVHFOK3zMJub1dbmLuqaFGDzHebNGUIkLlrHr0XFNNKTjFPtZZam+ezXirQcMP0xTbJusFgS07C3JoJj1xMSeJeMWwbCykXesHepzFjVYKGC4FSr9ZCG0fGP1/5r42DfJLKsYvnoyRdrdmflMNv2Vn7uxwl5Y0jjS1svljPKFRONXl+KjIMgmMm/pgXxZiCH3mO1k3XyCc4riCRSWGn7qdPQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C5PTBAvCw3PJiXmYefQzyZfL7s8rHcWnc5BjSN3brVM=; b=kUAXdBx15icniqLVSq3sXGASL1Yp15baY4LMADgh6TX3PcM1osH1MrP8hIY0kZTmqmjpor+Ecx0l09yglUihE949zRR4cRlZ6pskQa02k74ej7RLesSu9lQr89/61fcOAJ6qyNUVa6K/Bjp2cNoRRoKUGDPF2RxpDNy/yChtJn4= Authentication-Results: pengutronix.de; dkim=none (message not signed) header.d=none; pengutronix.de; dmarc=none action=none header.from=nxp.com; Received: from DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) by DB7PR04MB3963.eurprd04.prod.outlook.com (2603:10a6:5:1c::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21; Mon, 19 Oct 2020 07:58:12 +0000 Received: from DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::3c3a:58b9:a1cc:cbcc]) by DB8PR04MB6795.eurprd04.prod.outlook.com ([fe80::3c3a:58b9:a1cc:cbcc%9]) with mapi id 15.20.3477.028; Mon, 19 Oct 2020 07:58:11 +0000 From: Joakim Zhang To: mkl@pengutronix.de, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, linux-imx@nxp.com, victor.liu@nxp.com, linux-can@vger.kernel.org, pankaj.bansal@nxp.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V2 8/8] can: flexcan: add CAN wakeup function for i.MX8QM Date: Mon, 19 Oct 2020 23:57:37 +0800 Message-Id: <20201019155737.26577-9-qiangqing.zhang@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201019155737.26577-1-qiangqing.zhang@nxp.com> References: <20201019155737.26577-1-qiangqing.zhang@nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR02CA0107.apcprd02.prod.outlook.com (2603:1096:4:92::23) To DB8PR04MB6795.eurprd04.prod.outlook.com (2603:10a6:10:fa::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.71) by SG2PR02CA0107.apcprd02.prod.outlook.com (2603:1096:4:92::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.20 via Frontend Transport; Mon, 19 Oct 2020 07:58:07 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 337f9a8e-84be-4ef6-9cd3-08d87404b97a X-MS-TrafficTypeDiagnostic: DB7PR04MB3963: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3173; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: x1PSLJly6fobR2IeLdQJmM3U/8dp00Ws+f/kPrxElu6V+ccNNOyayw4pw3bNJDeswVmSE3UfAzoDUSoEMGbt/5IncT+MQ9PNAii1HRqrI0Vu5tN0siA+fovPQm69dKnuyDlOu0q+p4uJUH6RWdCylyIG5ZBEGTi4L401rp1/qYs0DdlKuoeLgfznYKbD6jnwyoLGVHfi3u/wK6egvc0BAcVncO7pRUnBWsiLNAp3TYhcn0jpyLTSZhIohiwE4UtoP5QUmo2ulD+6Tzj9KyFe7RG7TD1TPV2aMJznk3D8TV3q7fWx/yTKTAYBZEvpCayXQXCRGQWxlEbHBE02/1crZgfGcHsi29IUg88zpXWLP4mNRaRXMpP9K8+XyUKE5n23 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB8PR04MB6795.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(39860400002)(376002)(396003)(346002)(69590400008)(86362001)(6512007)(478600001)(2906002)(316002)(5660300002)(36756003)(1076003)(83380400001)(186003)(16526019)(956004)(2616005)(8676002)(8936002)(26005)(66556008)(66946007)(66476007)(6486002)(52116002)(6666004)(6506007)(4326008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: ZpQ3yw2S+kVfuBZOMXtJyvWNINs6EuUggTYyYL2tgmmuxd55CehaI6NXEEI4CAC27cEDDnRo0EhEQomKgiDO099qRKANJaCxRzb1QgVr13U22qe1QmBBUpzxDenvA0IHvJl05MRv4QFbpnCAc2yTejLGFa1NyMwKB53zsSuU9sDfP++N2aH8+TwiwzXR2ZrFXd5jMyOdZg319y1dD6kRAkrHx9A2GE3+dwx3jiVOByvSrmDuSDMyB4+Cyvm0KeVmorwbn6jKCCSLw/LqNoPK2o1Nid3ahJrQwfyzxjm7bLbWagM7lUv8KtPXz5fYAGiMHaPYA0ZegrjymXwJpoSU8HILF1QJpc+6sUzlMJuxnQeWNnZe4ixoZ8ZegQGK5ca84/pIHzg2HCCErr+4JLVJf+LkiIRYyT/piIJHknKE4Q8h5QTL4tuLbLA+BSsUuwFocTLLE6NkhmDt/hrewLSXkm+NxDT5eqKqwrpQb89zkkMaRR0U2iwMC26rY0nd0R/5vRc4mdQEHPyxgImwLTFRI4o5wrDCXZ4qHLqMfTfjJw5AuLb7d3BbeI56oEApIDxu8N5Bo6POooNrvr0JRz1dCqCQku8Cu5nf/emZzcGih2e0Gvrp50ggqHbC2FPE6qjQHBIVX47myhTKy2/pvvcBpg== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 337f9a8e-84be-4ef6-9cd3-08d87404b97a X-MS-Exchange-CrossTenant-AuthSource: DB8PR04MB6795.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2020 07:58:11.7887 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: vAGlQmXC3y770K9t2y5HAArGeTxxetkOLAyje0sSV8a650ms7PKzmNisCp9t+56FEf8R4WLpqjnAfR0Pd8sQdA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB3963 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The System Controller Firmware (SCFW) is a low-level system function which runs on a dedicated Cortex-M core to provide power, clock, and resource management. It exists on some i.MX8 processors. e.g. i.MX8QM (QM, QP), and i.MX8QX (QXP, DX). SCU driver manages the IPC interface between host CPU and the SCU firmware running on M4. For i.MX8QM, stop mode request is controlled by System Controller Unit(SCU) firmware, this patch introduces FLEXCAN_QUIRK_SETUP_STOP_MODE_SCFW quirk for this function. Signed-off-by: Joakim Zhang --- drivers/net/can/flexcan.c | 131 +++++++++++++++++++++++++++++++++----- 1 file changed, 114 insertions(+), 17 deletions(-) diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index c0cdee904ca7..8ad5065c918f 100644 --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c @@ -9,6 +9,7 @@ // // Based on code originally by Andrey Volkov +#include #include #include #include @@ -17,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -203,6 +205,8 @@ #define FLEXCAN_TIMEOUT_US (250) +#define FLEXCAN_IMX_SC_R_CAN(x) (IMX_SC_R_CAN_0 + (x)) + /* FLEXCAN hardware feature flags * * Below is some version info we got: @@ -242,6 +246,8 @@ #define FLEXCAN_QUIRK_SUPPORT_FD BIT(9) /* support memory detection and correction */ #define FLEXCAN_QUIRK_SUPPORT_ECC BIT(10) +/* Setup stop mode with SCU firmware to support wakeup */ +#define FLEXCAN_QUIRK_SETUP_STOP_MODE_SCFW BIT(11) /* Structure of the message buffer */ struct flexcan_mb { @@ -347,6 +353,7 @@ struct flexcan_priv { u8 mb_count; u8 mb_size; u8 clk_src; /* clock source of CAN Protocol Engine */ + u8 can_idx; u64 rx_mask; u64 tx_mask; @@ -358,6 +365,9 @@ struct flexcan_priv { struct regulator *reg_xceiver; struct flexcan_stop_mode stm; + /* IPC handle when setup stop mode by System Controller firmware(scfw) */ + struct imx_sc_ipc *sc_ipc_handle; + /* Read and Write APIs */ u32 (*read)(void __iomem *addr); void (*write)(u32 val, void __iomem *addr); @@ -387,7 +397,7 @@ static const struct flexcan_devtype_data fsl_imx6q_devtype_data = { static const struct flexcan_devtype_data fsl_imx8qm_devtype_data = { .quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP | FLEXCAN_QUIRK_BROKEN_PERR_STATE | - FLEXCAN_QUIRK_SUPPORT_FD, + FLEXCAN_QUIRK_SUPPORT_FD | FLEXCAN_QUIRK_SETUP_STOP_MODE_SCFW, }; static struct flexcan_devtype_data fsl_imx8mp_devtype_data = { @@ -546,18 +556,42 @@ static void flexcan_enable_wakeup_irq(struct flexcan_priv *priv, bool enable) priv->write(reg_mcr, ®s->mcr); } +static int flexcan_stop_mode_enable_scfw(struct flexcan_priv *priv, bool enabled) +{ + u8 idx = priv->can_idx; + u32 rsrc_id, val; + + rsrc_id = FLEXCAN_IMX_SC_R_CAN(idx); + + if (enabled) + val = 1; + else + val = 0; + + /* stop mode request via scu firmware */ + return imx_sc_misc_set_control(priv->sc_ipc_handle, rsrc_id, + IMX_SC_C_IPG_STOP, val); +} + static inline int flexcan_enter_stop_mode(struct flexcan_priv *priv) { struct flexcan_regs __iomem *regs = priv->regs; u32 reg_mcr; + int ret; reg_mcr = priv->read(®s->mcr); reg_mcr |= FLEXCAN_MCR_SLF_WAK; priv->write(reg_mcr, ®s->mcr); /* enable stop request */ - regmap_update_bits(priv->stm.gpr, priv->stm.req_gpr, - 1 << priv->stm.req_bit, 1 << priv->stm.req_bit); + if (priv->devtype_data->quirks & FLEXCAN_QUIRK_SETUP_STOP_MODE_SCFW) { + ret = flexcan_stop_mode_enable_scfw(priv, true); + if (ret < 0) + return ret; + } else { + regmap_update_bits(priv->stm.gpr, priv->stm.req_gpr, + 1 << priv->stm.req_bit, 1 << priv->stm.req_bit); + } return flexcan_low_power_enter_ack(priv); } @@ -566,10 +600,17 @@ static inline int flexcan_exit_stop_mode(struct flexcan_priv *priv) { struct flexcan_regs __iomem *regs = priv->regs; u32 reg_mcr; + int ret; /* remove stop request */ - regmap_update_bits(priv->stm.gpr, priv->stm.req_gpr, - 1 << priv->stm.req_bit, 0); + if (priv->devtype_data->quirks & FLEXCAN_QUIRK_SETUP_STOP_MODE_SCFW) { + ret = flexcan_stop_mode_enable_scfw(priv, false); + if (ret < 0) + return ret; + } else { + regmap_update_bits(priv->stm.gpr, priv->stm.req_gpr, + 1 << priv->stm.req_bit, 0); + } reg_mcr = priv->read(®s->mcr); reg_mcr &= ~FLEXCAN_MCR_SLF_WAK; @@ -1838,7 +1879,7 @@ static void unregister_flexcandev(struct net_device *dev) unregister_candev(dev); } -static int flexcan_setup_stop_mode(struct platform_device *pdev) +static int flexcan_setup_stop_mode_gpr(struct platform_device *pdev) { struct net_device *dev = platform_get_drvdata(pdev); struct device_node *np = pdev->dev.of_node; @@ -1883,11 +1924,6 @@ static int flexcan_setup_stop_mode(struct platform_device *pdev) "gpr %s req_gpr=0x02%x req_bit=%u\n", gpr_np->full_name, priv->stm.req_gpr, priv->stm.req_bit); - device_set_wakeup_capable(&pdev->dev, true); - - if (of_property_read_bool(np, "wakeup-source")) - device_set_wakeup_enable(&pdev->dev, true); - return 0; out_put_node: @@ -1895,6 +1931,64 @@ static int flexcan_setup_stop_mode(struct platform_device *pdev) return ret; } +static int flexcan_setup_stop_mode_scfw(struct platform_device *pdev) +{ + struct net_device *dev = platform_get_drvdata(pdev); + struct flexcan_priv *priv; + u8 can_idx; + int ret; + + ret = of_property_read_u8(pdev->dev.of_node, "fsl,scu-index", &can_idx); + if (ret < 0) { + dev_dbg(&pdev->dev, "failed to get scu index\n"); + return ret; + } + + priv = netdev_priv(dev); + priv->can_idx = can_idx; + + /* this function could be defered probe, return -EPROBE_DEFER */ + ret = imx_scu_get_handle(&priv->sc_ipc_handle); + if (ret < 0) { + dev_dbg(&pdev->dev, "get ipc handle used by SCU failed\n"); + return ret; + } + + return 0; +} + +/* flexcan_setup_stop_mode - Setup stop mode for wakeup + * + * Return: = 0 setup stop mode successfully or doesn't support this feature + * < 0 fail to setup stop mode (could be defered probe) + */ +static int flexcan_setup_stop_mode(struct platform_device *pdev) +{ + struct net_device *dev = platform_get_drvdata(pdev); + struct flexcan_priv *priv; + int ret; + + priv = netdev_priv(dev); + + if (priv->devtype_data->quirks & FLEXCAN_QUIRK_SETUP_STOP_MODE_SCFW) + ret = flexcan_setup_stop_mode_scfw(pdev); + else if (priv->devtype_data->quirks & FLEXCAN_QUIRK_SETUP_STOP_MODE_GPR) + ret = flexcan_setup_stop_mode_gpr(pdev); + else + /* return 0 directly if doesn't support stop mode feature */ + return 0; + + if (ret) + return ret; + + device_set_wakeup_capable(&pdev->dev, true); + + if (of_property_read_bool(pdev->dev.of_node, "wakeup-source")) + device_set_wakeup_enable(&pdev->dev, true); + + return 0; +} + static const struct of_device_id flexcan_of_match[] = { { .compatible = "fsl,imx8qm-flexcan", .data = &fsl_imx8qm_devtype_data, }, { .compatible = "fsl,imx8mp-flexcan", .data = &fsl_imx8mp_devtype_data, }, @@ -2040,17 +2134,19 @@ static int flexcan_probe(struct platform_device *pdev) goto failed_register; } + err = flexcan_setup_stop_mode(pdev); + if (err < 0) { + dev_err(&pdev->dev, "setup stop mode failed\n"); + goto failed_canregister; + } + of_can_transceiver(dev); devm_can_led_init(dev); - if (priv->devtype_data->quirks & FLEXCAN_QUIRK_SETUP_STOP_MODE_GPR) { - err = flexcan_setup_stop_mode(pdev); - if (err) - dev_dbg(&pdev->dev, "failed to setup stop-mode\n"); - } - return 0; + failed_canregister: + unregister_flexcandev(dev); failed_register: pm_runtime_put_noidle(&pdev->dev); pm_runtime_disable(&pdev->dev); @@ -2062,6 +2158,7 @@ static int flexcan_remove(struct platform_device *pdev) { struct net_device *dev = platform_get_drvdata(pdev); + device_set_wakeup_enable(&pdev->dev, false); unregister_flexcandev(dev); pm_runtime_disable(&pdev->dev); free_candev(dev);