lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20151002191804.GS12338@codeaurora.org>
Date:	Fri, 2 Oct 2015 12:18:04 -0700
From:	Stephen Boyd <sboyd@...eaurora.org>
To:	Mike Looijmans <mike.looijmans@...ic.nl>
Cc:	linux-clk@...r.kernel.org, mturquette@...libre.com,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] Add driver for the si514 clock generator chip

On 10/02, Mike Looijmans wrote:
> This patch adds the driver and devicetree documentation for the
> Silicon Labs SI514 clock generator chip. This is an I2C controlled
> oscillator capable of generating clock signals ranging from 100kHz
> to 250MHz.
> 
> Signed-off-by: Mike Looijmans <mike.looijmans@...ic.nl>
> ---

Applied to clk-next. We can handle any stuff about assigned rates
in a follow up patch.

Also, I squashed in this for some cleanup.

diff --git a/drivers/clk/clk-si514.c b/drivers/clk/clk-si514.c
index 779aebcd884b..6af7dce54241 100644
--- a/drivers/clk/clk-si514.c
+++ b/drivers/clk/clk-si514.c
@@ -16,7 +16,6 @@
  * GNU General Public License for more details.
  */
 
-#include <linux/clk.h>
 #include <linux/clk-provider.h>
 #include <linux/delay.h>
 #include <linux/module.h>
@@ -87,14 +86,11 @@ static int si514_get_muldiv(struct clk_si514 *data,
 	if (err)
 		return err;
 
-	settings->m_frac =
-		reg[0] |
-		((u32)reg[1] << 8) |
-		((u32)reg[2] << 16) |
-		((u32)(reg[3] & 0x1F) << 24);
-	settings->m_int = ((reg[4] & 0x3f) << 3) | (reg[3] >> 5);
+	settings->m_frac = reg[0] | reg[1] << 8 | reg[2] << 16 |
+			   (reg[3] & 0x1F) << 24;
+	settings->m_int = (reg[4] & 0x3f) << 3 | reg[3] >> 5;
 	settings->ls_div_bits = (reg[6] >> 4) & 0x07;
-	settings->hs_div = ((u16)(reg[6] & 0x03) << 8) | reg[5];
+	settings->hs_div = (reg[6] & 0x03) << 8 | reg[5];
 	return 0;
 }
 
@@ -132,7 +128,7 @@ static int si514_set_muldiv(struct clk_si514 *data,
 	reg[0] = settings->m_frac;
 	reg[1] = settings->m_frac >> 8;
 	reg[2] = settings->m_frac >> 16;
-	reg[3] = (settings->m_frac >> 24) | (settings->m_int << 5);
+	reg[3] = settings->m_frac >> 24 | settings->m_int << 5;
 	reg[4] = settings->m_int >> 3;
 	reg[5] = settings->hs_div;
 	reg[6] = (settings->hs_div >> 8) | (settings->ls_div_bits << 4);
-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ