Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3167060ybt; Mon, 29 Jun 2020 17:31:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyerZ6vbdeTClziNnDL5MSzt7KpCIFjysZl/Bdbh26zmdCuvhuZ0T9Liw7FtciAZKEs4dZp X-Received: by 2002:a50:9f22:: with SMTP id b31mr20711962edf.24.1593477085962; Mon, 29 Jun 2020 17:31:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1593477085; cv=pass; d=google.com; s=arc-20160816; b=pa+1aVKWB2m6zX1CR4tq4kyvihBDs2MVjTCQ4+U/IdUBqOvHbgk+e7ipAPoxCF4wTd ATw92+2HW/m83bVHiCND4LeTGG3QzNm+SVzBMtH0z9AFNVWV+5zgzY45EzSU96nqbhf2 ZvP0XgXPp5dYaG92EXWXnBXzeWEovHxjkW+rzkNR4xQqF3oHouTM8hmU/JpTD2BA0FOR fGOVOVesroi3IQYfELB/7GC6YQDCFr4hgDv4AbgPT5EHclltj1ciZ1zrQiWHYp1OfK4M UyNgJ08AYKq7YTm+u3+/8Lr1/tDBdI3IC0IVC6PMCxiOKvoScwD0jzAww8/l6mh7tEnV FWGw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rwRMnH0svoTSDNBAdtT+uCArF6YTouahzWByTwT9074=; b=e+XxK8opdpUB6Cpx1gTXNWSId99Ut6zq4hmGZOkFvlZE+VdezBAk7g6fagCsBQ+D9j Vh6s9fkMHffoBQS4U/+lv9WoGJglcWHevdNO53uqrB74XaDhsRNUhJg07fVu8+xuT/ch xVHrhmf5mKhC6fcKaidn6ERKUhBuIEkxi4jVYSMVfrDoIR1x3DIcrks4yBwMqE6Ls1z2 bm5b+cK/eclh84oHIeRzcpLHhPDzntDii+aaKe72moWofrHGM9I9UV3ocNTa28a3i0s+ T5btueOVQ6ujlY0BDMSyaaUKp9Zdf+hQKGTZ+bEJJpBxoi8oNx2lJVJKX3aG+rETRePB Lqbg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@xilinx.onmicrosoft.com header.s=selector2-xilinx-onmicrosoft-com header.b=pPdTYfKj; arc=pass (i=1 spf=pass spfdomain=xilinx.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t13si702807edj.100.2020.06.29.17.31.02; Mon, 29 Jun 2020 17:31:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@xilinx.onmicrosoft.com header.s=selector2-xilinx-onmicrosoft-com header.b=pPdTYfKj; arc=pass (i=1 spf=pass spfdomain=xilinx.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728629AbgF3Aa2 (ORCPT + 99 others); Mon, 29 Jun 2020 20:30:28 -0400 Received: from mail-bn7nam10on2072.outbound.protection.outlook.com ([40.107.92.72]:6191 "EHLO NAM10-BN7-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726119AbgF3AaW (ORCPT ); Mon, 29 Jun 2020 20:30:22 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GrtECbstmkIz4vOHNZOiceAXr8fMEIkAJG6AkPTCmWAw+25jH9sVTsMghcebCYBZmjBiGnUCDRv6CC9TAZ0VKLUepyFIWfxTn8RDwuIuKxHxGHAvZeCtL1GJs+81Bkr4oDT8yKMUn8pVmVcOfSd1YR1Phmr9eIWI1xhlnIebl5Jz1QzKkqyLsk+suoDDIzmUg1lVq3BmUEWBQIqFt0Mjr726ou3CUyLmSZaQwmeTpPTGCYBApbVfa8MumSFz5Y2vxjwy22xetvCoDLaqvH1A8m+pjAliKBG8bZlrhStpnWtRsoIuRc9cJ1ArALsU4dE2+LjTlk95S3rh7kt3rgs1ng== 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=rwRMnH0svoTSDNBAdtT+uCArF6YTouahzWByTwT9074=; b=SfuoGTr6PQVh7Pc6zeX0PXxJBOR5+NAZVBArlD43oAe3WcMYlNZpSDLVyRPkTNQaDACFDyvjPSqbh5wFplBXjjfSXiVMOlAc9JRa2AIvoME/kQlfhnjAmYd2FJj2WJMRMDzLcaOcxwzRN5oICmXeYfwO989VQa+A5ga6cfuffF4qHGNBZ5o0EO577ENkjhHmSXwWw5KX20+nROhUkvY0irE1z3CYrMi6EEsAnNDus1YAwGSxqMU7o4XjFHmgVikJL8qAwqbeFVbNhVHun4ESotW/RuTrFvZW1y/ghvqQ7W0UgQcYTDIyr/5Dx76nBVVwNf8Sua+aylTyS86qG6L6aA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.60.83) smtp.rcpttodomain=baylibre.com smtp.mailfrom=xilinx.com; dmarc=bestguesspass action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rwRMnH0svoTSDNBAdtT+uCArF6YTouahzWByTwT9074=; b=pPdTYfKjr4BzUjgFoWGUeyb5Of2mk3VvLTeeGYwf5Nc9YlOuGoSPwEg1TaPaXF0NQoq97oes+VX0hI9syBdk5ovviuJb3w4YzH4HJmRO92RMq4ZIn1K4RJQM65d8jzNK/18VtgKJgGTClubjwVTB8htNs8HK2GXJwN5gC3TGapU= Received: from DM3PR12CA0124.namprd12.prod.outlook.com (2603:10b6:0:51::20) by DM5PR02MB3372.namprd02.prod.outlook.com (2603:10b6:4:63::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.26; Tue, 30 Jun 2020 00:30:18 +0000 Received: from CY1NAM02FT061.eop-nam02.prod.protection.outlook.com (2603:10b6:0:51:cafe::d1) by DM3PR12CA0124.outlook.office365.com (2603:10b6:0:51::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.21 via Frontend Transport; Tue, 30 Jun 2020 00:30:18 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; baylibre.com; dkim=none (message not signed) header.d=none;baylibre.com; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by CY1NAM02FT061.mail.protection.outlook.com (10.152.75.30) with Microsoft SMTP Server id 15.20.3131.20 via Frontend Transport; Tue, 30 Jun 2020 00:30:18 +0000 Received: from [149.199.38.66] (port=58356 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.90) (envelope-from ) id 1jq48u-000545-NN; Mon, 29 Jun 2020 17:28:56 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1jq4AE-0005bY-5V; Mon, 29 Jun 2020 17:30:18 -0700 Received: from [10.18.5.8] (helo=xsjamitsuni51.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1jq4AC-0005YJ-8C; Mon, 29 Jun 2020 17:30:16 -0700 From: Amit Sunil Dhamne To: mturquette@baylibre.com, sboyd@codeaurora.org, sboyd@kernel.org, michal.simek@xilinx.com, mark.rutland@arm.com, linux-clk@vger.kernel.org Cc: rajanv@xilinx.com, jollys@xilinx.com, tejasp@xilinx.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Rajan Vaja , Amit Sunil Dhamne Subject: [PATCH 3/3] clk: zynqmp: Use firmware specific mux clock flags Date: Mon, 29 Jun 2020 17:30:14 -0700 Message-Id: <1593477014-18443-4-git-send-email-amit.sunil.dhamne@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1593477014-18443-1-git-send-email-amit.sunil.dhamne@xilinx.com> References: <1593477014-18443-1-git-send-email-amit.sunil.dhamne@xilinx.com> X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:xsj-pvapsmtpgw01;PTR:unknown-60-83.xilinx.com;CAT:NONE;SFTY:;SFS:(39860400002)(346002)(396003)(376002)(136003)(46966005)(107886003)(356005)(9786002)(7696005)(8936002)(26005)(47076004)(81166007)(82310400002)(82740400003)(186003)(478600001)(426003)(336012)(5660300002)(2616005)(83380400001)(4326008)(36756003)(54906003)(70586007)(316002)(8676002)(2906002)(70206006);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 969e3e5c-e76d-4ce4-d340-08d81c8cc422 X-MS-TrafficTypeDiagnostic: DM5PR02MB3372: X-Microsoft-Antispam-PRVS: Content-Transfer-Encoding: quoted-printable X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:415; X-Forefront-PRVS: 0450A714CB X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WIhrX6uzMK2EamhVbj0KhuzWLgNGtBtvUoV3uYv9A0pzvkW4JUDxZaUcvmg18R4ABEdpEB0ONstxGWPFAMe36ZNWGd11Y3JS/8q4ptgL/KoyAxVzgGyhqysP2GHS+Fq8HD+8OD6yKxNLZzlUawoSCltIuxBjEBF6dHNnCOwBcmi/ufxDJbDzLn2r4Cd1XlBlF4iUxh5yOfzxpIqkYwimoCd5Kuhjy6SKog/vrqFW8pLJdyrZT3HLFbq46MaucWAJ3iyGWZkwL7onUZI6T+DqqRgZbVcXfWi+YvOMiiLEL2LD6eozl2hXRBsLICbpvnyRosWSdRPg4TwSIoJaLcHGLe1ikmMibZmuq0/PTpNVUEqk/jphZGZ77IhP8BPURkuoxQKedrHiFZG74nwy+/5oBQ== X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2020 00:30:18.4441 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 969e3e5c-e76d-4ce4-d340-08d81c8cc422 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.83];Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-AuthSource: CY1NAM02FT061.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR02MB3372 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rajan Vaja Use ZynqMP specific mux clock flags instead of using CCF flags. Signed-off-by: Rajan Vaja Signed-off-by: Amit Sunil Dhamne --- drivers/clk/zynqmp/clk-mux-zynqmp.c | 14 +++++++++++++- drivers/clk/zynqmp/clk-zynqmp.h | 8 ++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/drivers/clk/zynqmp/clk-mux-zynqmp.c b/drivers/clk/zynqmp/clk-m= ux-zynqmp.c index 0619414..9e365e7 100644 --- a/drivers/clk/zynqmp/clk-mux-zynqmp.c +++ b/drivers/clk/zynqmp/clk-mux-zynqmp.c @@ -123,7 +123,19 @@ struct clk_hw *zynqmp_clk_register_mux(const char *nam= e, u32 clk_id, init.flags =3D nodes->flag; init.parent_names =3D parents; init.num_parents =3D num_parents; - mux->flags =3D nodes->type_flag; + mux->flags =3D 0; + mux->flags |=3D (nodes->type_flag & ZYNQMP_CLK_MUX_INDEX_ONE) ? + CLK_MUX_INDEX_ONE : 0; + mux->flags |=3D (nodes->type_flag & ZYNQMP_CLK_MUX_INDEX_BIT) ? + CLK_MUX_INDEX_BIT : 0; + mux->flags |=3D (nodes->type_flag & ZYNQMP_CLK_MUX_HIWORD_MASK) ? + CLK_MUX_HIWORD_MASK : 0; + mux->flags |=3D (nodes->type_flag & ZYNQMP_CLK_MUX_READ_ONLY) ? + CLK_MUX_READ_ONLY : 0; + mux->flags |=3D (nodes->type_flag & ZYNQMP_CLK_MUX_ROUND_CLOSEST) ? + CLK_MUX_ROUND_CLOSEST : 0; + mux->flags |=3D (nodes->type_flag & ZYNQMP_CLK_MUX_BIG_ENDIAN) ? + CLK_MUX_BIG_ENDIAN : 0; mux->hw.init =3D &init; mux->clk_id =3D clk_id; diff --git a/drivers/clk/zynqmp/clk-zynqmp.h b/drivers/clk/zynqmp/clk-zynqm= p.h index ade5e9e..a29ab43 100644 --- a/drivers/clk/zynqmp/clk-zynqmp.h +++ b/drivers/clk/zynqmp/clk-zynqmp.h @@ -41,6 +41,14 @@ #define ZYNQMP_CLK_DIVIDER_READ_ONLY BIT(5) #define ZYNQMP_CLK_DIVIDER_MAX_AT_ZERO BIT(6) +/* Type Flags for mux clock */ +#define ZYNQMP_CLK_MUX_INDEX_ONE BIT(0) +#define ZYNQMP_CLK_MUX_INDEX_BIT BIT(1) +#define ZYNQMP_CLK_MUX_HIWORD_MASK BIT(2) +#define ZYNQMP_CLK_MUX_READ_ONLY BIT(3) +#define ZYNQMP_CLK_MUX_ROUND_CLOSEST BIT(4) +#define ZYNQMP_CLK_MUX_BIG_ENDIAN BIT(5) + enum topology_type { TYPE_INVALID, TYPE_MUX, -- 2.7.4 This email and any attachments are intended for the sole use of the named r= ecipient(s) and contain(s) confidential information that may be proprietary= , privileged or copyrighted under applicable law. If you are not the intend= ed recipient, do not read, copy, or forward this email message or any attac= hments. Delete this email message and any attachments immediately.