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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat,  9 Mar 2019 07:26:35 +0530
From:   Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
To:     linux@...linux.org.uk, xuwei5@...ilicon.com
Cc:     linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linus.walleij@...aro.org, daniel.thompson@...aro.org,
        peter.griffin@...aro.org, guodong.xu@...aro.org,
        haojian.zhuang@...aro.org,
        Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
Subject: [PATCH 2/2] arm64: dts: hisilicon: Add reset properties for HI6220 I2C and SPI

Both I2C and SPI needs to be taken out of reset before being used. Earlier,
we relied on the bootloader to do the job but a more cleaner approach would
be to handle the reset in kernel. Hence, add the reset properties to
the nodes to let the corresponding drivers take the peripherals out of
reset.

Suggested-by: Daniel Thompson <daniel.thompson@...aro.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
---
 arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
index 108e2a4227f6..b071dc466374 100644
--- a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
+++ b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
@@ -730,6 +730,8 @@
 			pinctrl-0 = <&spi0_pmx_func &spi0_cfg_func>;
 			num-cs = <1>;
 			cs-gpios = <&gpio6 2 0>;
+			resets = <&sys_ctrl PERIPH_RSTEN3_SSP>;
+			reset-names = "reset";
 			status = "disabled";
 		};
 
@@ -741,6 +743,8 @@
 			i2c-sda-hold-time-ns = <300>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&i2c0_pmx_func &i2c0_cfg_func>;
+			resets = <&sys_ctrl PERIPH_RSTEN3_I2C0>;
+			reset-names = "reset";
 			status = "disabled";
 		};
 
@@ -752,6 +756,8 @@
 			i2c-sda-hold-time-ns = <300>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&i2c1_pmx_func &i2c1_cfg_func>;
+			resets = <&sys_ctrl PERIPH_RSTEN3_I2C1>;
+			reset-names = "reset";
 			status = "disabled";
 		};
 
@@ -763,6 +769,8 @@
 			i2c-sda-hold-time-ns = <300>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&i2c2_pmx_func &i2c2_cfg_func>;
+			resets = <&sys_ctrl PERIPH_RSTEN3_I2C2>;
+			reset-names = "reset";
 			status = "disabled";
 		};
 
-- 
2.17.1

Powered by blists - more mailing lists