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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <E1ZEEu5-0000pi-OV@luxik.cdi.cz>
Date:	Sun, 12 Jul 2015 11:25:37 +0200
From:	Martin Devera <devik@....cz>
To:	unlisted-recipients:; (no To-header on input)
Subject: [PATCH 2/2] Add clock support for NXP LPC32XX SPI

Clock support for SPIs on LPC32XX SoC.
---
 arch/arm/mach-lpc32xx/clock.c |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/arm/mach-lpc32xx/clock.c b/arch/arm/mach-lpc32xx/clock.c
index dd5d6f5..672c9b3 100644
--- a/arch/arm/mach-lpc32xx/clock.c
+++ b/arch/arm/mach-lpc32xx/clock.c
@@ -683,6 +683,24 @@ static struct clk clk_i2c2 = {
 	.get_rate	= local_return_parent_rate,
 };
 
+static struct clk clk_spi1 = {
+	.parent		= &clk_hclk,
+	.enable		= local_onoff_enable,
+	.enable_reg	= LPC32XX_CLKPWR_SPI_CLK_CTRL,
+	.enable_mask	= LPC32XX_CLKPWR_SPICLK_SPI1CLK_EN|
+				LPC32XX_CLKPWR_SPICLK_USE_SPI1,
+	.get_rate	= local_return_parent_rate,
+};
+
+static struct clk clk_spi2 = {
+	.parent		= &clk_hclk,
+	.enable		= local_onoff_enable,
+	.enable_reg	= LPC32XX_CLKPWR_SPI_CLK_CTRL,
+	.enable_mask	= LPC32XX_CLKPWR_SPICLK_SPI2CLK_EN|
+				LPC32XX_CLKPWR_SPICLK_USE_SPI2,
+	.get_rate	= local_return_parent_rate,
+};
+
 static struct clk clk_ssp0 = {
 	.parent		= &clk_hclk,
 	.enable		= local_onoff_enable,
@@ -1217,6 +1235,8 @@ static struct clk_lookup lookups[] = {
 	CLKDEV_INIT("400a0000.i2c", NULL, &clk_i2c0),
 	CLKDEV_INIT("400a8000.i2c", NULL, &clk_i2c1),
 	CLKDEV_INIT("31020300.i2c", NULL, &clk_i2c2),
+	CLKDEV_INIT("20088000.spi", NULL, &clk_spi1),
+	CLKDEV_INIT("20090000.spi", NULL, &clk_spi2),
 	CLKDEV_INIT("dev:ssp0", NULL, &clk_ssp0),
 	CLKDEV_INIT("dev:ssp1", NULL, &clk_ssp1),
 	CLKDEV_INIT("40050000.key", NULL, &clk_kscan),
-- 
1.7.10.4

--
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