From patchwork Fri Nov 6 09:27:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 319490 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=-12.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, 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 571C6C2D0A3 for ; Fri, 6 Nov 2020 09:28:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ECC87208B3 for ; Fri, 6 Nov 2020 09:28:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="SZYb3XXW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726646AbgKFJ2h (ORCPT ); Fri, 6 Nov 2020 04:28:37 -0500 Received: from esa6.microchip.iphmx.com ([216.71.154.253]:35745 "EHLO esa6.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726751AbgKFJ2g (ORCPT ); Fri, 6 Nov 2020 04:28:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1604654916; x=1636190916; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=FrCYjC2ukUCDH3p6+EqKIEI32HKV++foBRusYDNEF6Q=; b=SZYb3XXWFYH78Qib0haA6R5vI/tek3pMcNDldsf0OL8dTfuorF+YIJA6 NakAMI9rb/maBG4otYoQ15X9leCzKOcjBOEuPapw31akS0+vGh61MR0pL nWtPDD/2SCSeqskOk4AsLayyZegdEHl+N7mzllr/5tI7mimZRX7dJ7dq6 92mX6vMk1YvW/0WriGElKEiXgwGDkqu0lMyNQLVIx9vf9HENxFMgKPGIu KpjDF7hEeE4ldk63XlZ8b6+tJ96ubQEADNMnQQCddQ+V4sUnIDq39PK65 BTLkhaH2LAwOQ0TUUwIomDgVj2rKZJ/2c4a7YyzMrrPii5NfPFW6QFKAU A==; IronPort-SDR: H/FDb0C7Mp7tEma+OaaL1ahIxFyUntfeDNaI4OcpzszzpXMyKTBPfGz3+WXpyNXWVXvnYN9dp3 NPMKOv6ceYHGDHL0pbhJeEYfvS3sl1qHDt3f+M99ND9f7KaS5lBbDq04C86i6oCcQ1e1/l8IEW 7I53ojWYyEIvQx8D2+UCET5iouh6xxHXlqGnfSIumpT9L75qRkqH063Si4h8+L0wFLo6KdZaza HxKBjjNfB0nJJgFjeALCD2jLMKUSQmseL3+bkdlgj2sDc+gS+5rTsCYt+jLze1wWf/LmW/MtB0 TNk= X-IronPort-AV: E=Sophos;i="5.77,456,1596524400"; d="scan'208";a="32677742" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 06 Nov 2020 02:28:35 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Fri, 6 Nov 2020 02:28:35 -0700 Received: from m18063-ThinkPad-T460p.microchip.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Fri, 6 Nov 2020 02:28:30 -0700 From: Claudiu Beznea To: , , , , , CC: , , , , , Claudiu Beznea Subject: [PATCH v3 04/11] clk: at91: clk-master: add 5th divisor for mck master Date: Fri, 6 Nov 2020 11:27:57 +0200 Message-ID: <1604654884-30339-5-git-send-email-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1604654884-30339-1-git-send-email-claudiu.beznea@microchip.com> References: <1604654884-30339-1-git-send-email-claudiu.beznea@microchip.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Eugen Hristev clk-master can have 5 divisors with a field width of 3 bits on some products. Change the mask and number of divisors accordingly. Reported-by: Mihai Sain Signed-off-by: Eugen Hristev Signed-off-by: Claudiu Beznea --- drivers/clk/at91/clk-master.c | 2 +- drivers/clk/at91/pmc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/at91/clk-master.c b/drivers/clk/at91/clk-master.c index bd0d8a69a2cf..aafd003b30cf 100644 --- a/drivers/clk/at91/clk-master.c +++ b/drivers/clk/at91/clk-master.c @@ -15,7 +15,7 @@ #define MASTER_PRES_MASK 0x7 #define MASTER_PRES_MAX MASTER_PRES_MASK #define MASTER_DIV_SHIFT 8 -#define MASTER_DIV_MASK 0x3 +#define MASTER_DIV_MASK 0x7 #define PMC_MCR 0x30 #define PMC_MCR_ID_MSK GENMASK(3, 0) diff --git a/drivers/clk/at91/pmc.h b/drivers/clk/at91/pmc.h index 7b86affc6d7c..0a9364bde339 100644 --- a/drivers/clk/at91/pmc.h +++ b/drivers/clk/at91/pmc.h @@ -48,7 +48,7 @@ extern const struct clk_master_layout at91sam9x5_master_layout; struct clk_master_characteristics { struct clk_range output; - u32 divisors[4]; + u32 divisors[5]; u8 have_div3_pres; };