Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1657261 > unrolled thread

[PATCH 0/2] ARM/arm64: sunxi: convert CCU raw numbers to macros

Started byChen-Yu Tsai <wens@csie.org>
First post2017-06-05 06:40 +0200
Last post2017-06-05 10:20 +0200
Articles 6 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/2] ARM/arm64: sunxi: convert CCU raw numbers to macros Chen-Yu Tsai <wens@csie.org> - 2017-06-05 06:40 +0200
    [PATCH 1/2] ARM: sunxi: h3-h5: Convert R_CCU raw numbers to macros Chen-Yu Tsai <wens@csie.org> - 2017-06-05 06:40 +0200
      Re: [PATCH 1/2] ARM: sunxi: h3-h5: Convert R_CCU raw numbers to  macros kbuild test robot <lkp@intel.com> - 2017-06-05 09:10 +0200
    [PATCH 2/2] arm64: allwinner: a64: Convert CCU raw number references to macros Chen-Yu Tsai <wens@csie.org> - 2017-06-05 06:40 +0200
    Re: [PATCH 0/2] ARM/arm64: sunxi: convert CCU raw numbers to macros Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-06-05 10:20 +0200
      Re: [PATCH 0/2] ARM/arm64: sunxi: convert CCU raw numbers to macros Chen-Yu Tsai <wens@csie.org> - 2017-06-05 10:20 +0200

#1657261 — [PATCH 0/2] ARM/arm64: sunxi: convert CCU raw numbers to macros

FromChen-Yu Tsai <wens@csie.org>
Date2017-06-05 06:40 +0200
Subject[PATCH 0/2] ARM/arm64: sunxi: convert CCU raw numbers to macros
Message-ID<tORY5-6z0-11@gated-at.bofh.it>
Hi Maxime,

These are some clean up patches for 4.12. They convert raw number
references for the CCU and R_CCU nodes, from when the CCU/R_CCU stuff
was first added, to the defined macros in the device tree header files.

These affect the A64 and H3/H5.

These are based on our sunxi/fixes-for-4.12 branch. Once these are merged,
I think it's time to send off pull requests for our fixes branches.

ChenYu

Chen-Yu Tsai (2):
  ARM: sunxi: h3-h5: Convert R_CCU raw numbers to macros
  arm64: allwinner: a64: Convert CCU raw number references to macros

 arch/arm/boot/dts/sunxi-h3-h5.dtsi            |  8 +++---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 35 ++++++++++++++-------------
 2 files changed, 23 insertions(+), 20 deletions(-)

-- 
2.11.0

[toc] | [next] | [standalone]


#1657262 — [PATCH 1/2] ARM: sunxi: h3-h5: Convert R_CCU raw numbers to macros

FromChen-Yu Tsai <wens@csie.org>
Date2017-06-05 06:40 +0200
Subject[PATCH 1/2] ARM: sunxi: h3-h5: Convert R_CCU raw numbers to macros
Message-ID<tORY6-6z0-17@gated-at.bofh.it>
In reply to#1657261
Now that the R_CCU device tree binding headers have been merged, we
can convert the raw number references in the device trees to use the
defined macros.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sunxi-h3-h5.dtsi | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
index d4f600dbb7eb..e2f4e029d483 100644
--- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi
+++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
@@ -41,8 +41,10 @@
  */
 
 #include <dt-bindings/clock/sun8i-h3-ccu.h>
+#include <dt-bindings/clock/sun8i-r-ccu.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/reset/sun8i-h3-ccu.h>
+#include <dt-bindings/reset/sun8i-r-ccu.h>
 
 / {
 	interrupt-parent = <&gic>;
@@ -574,9 +576,9 @@
 
 		ir: ir@01f02000 {
 			compatible = "allwinner,sun5i-a13-ir";
-			clocks = <&r_ccu 4>, <&r_ccu 11>;
+			clocks = <&r_ccu CLK_APB0_IR>, <&r_ccu CLK_IR>;
 			clock-names = "apb", "ir";
-			resets = <&r_ccu 0>;
+			resets = <&r_ccu RST_IR>;
 			interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
 			reg = <0x01f02000 0x40>;
 			status = "disabled";
@@ -586,7 +588,7 @@
 			compatible = "allwinner,sun8i-h3-r-pinctrl";
 			reg = <0x01f02c00 0x400>;
 			interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&r_ccu 3>, <&osc24M>, <&osc32k>;
+			clocks = <&r_ccu CLK_APB0_PIO>, <&osc24M>, <&osc32k>;
 			clock-names = "apb", "hosc", "losc";
 			gpio-controller;
 			#gpio-cells = <3>;
-- 
2.11.0

[toc] | [prev] | [next] | [standalone]


#1657314 — Re: [PATCH 1/2] ARM: sunxi: h3-h5: Convert R_CCU raw numbers to macros

Fromkbuild test robot <lkp@intel.com>
Date2017-06-05 09:10 +0200
SubjectRe: [PATCH 1/2] ARM: sunxi: h3-h5: Convert R_CCU raw numbers to macros
Message-ID<tOUjf-8cR-7@gated-at.bofh.it>
In reply to#1657262

[Multipart message — attachments visible in raw view] — view raw

Hi Chen-Yu,

[auto build test ERROR on robh/for-next]
[also build test ERROR on v4.12-rc4 next-20170602]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Chen-Yu-Tsai/ARM-arm64-sunxi-convert-CCU-raw-numbers-to-macros/20170605-124326
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm-hisi_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=arm 

All errors (new ones prefixed by >>):

>> Error: arch/arm/boot/dts/sunxi-h3-h5.dtsi:580.21-22 syntax error
   FATAL ERROR: Unable to parse input tree

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[toc] | [prev] | [next] | [standalone]


#1657263 — [PATCH 2/2] arm64: allwinner: a64: Convert CCU raw number references to macros

FromChen-Yu Tsai <wens@csie.org>
Date2017-06-05 06:40 +0200
Subject[PATCH 2/2] arm64: allwinner: a64: Convert CCU raw number references to macros
Message-ID<tORY6-6z0-19@gated-at.bofh.it>
In reply to#1657261
The A64 device tree file has some remnants of raw number references
to the CCU node, likely from when the CCU bindings and device tree
changes were first merged.

Convert these, and the R_CCU ones, to use the proper defined macros
from their respective device tree binding header files.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 35 ++++++++++++++-------------
 1 file changed, 18 insertions(+), 17 deletions(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 166c9ef884dc..373df5ee1c23 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -43,6 +43,7 @@
  */
 
 #include <dt-bindings/clock/sun50i-a64-ccu.h>
+#include <dt-bindings/clock/sun8-r-ccu.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/reset/sun50i-a64-ccu.h>
 
@@ -303,8 +304,8 @@
 			interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
 			reg-shift = <2>;
 			reg-io-width = <4>;
-			clocks = <&ccu 67>;
-			resets = <&ccu 46>;
+			clocks = <&ccu CLK_BUS_UART0>;
+			resets = <&ccu RST_BUS_UART0>;
 			status = "disabled";
 		};
 
@@ -314,8 +315,8 @@
 			interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
 			reg-shift = <2>;
 			reg-io-width = <4>;
-			clocks = <&ccu 68>;
-			resets = <&ccu 47>;
+			clocks = <&ccu CLK_BUS_UART1>;
+			resets = <&ccu RST_BUS_UART1>;
 			status = "disabled";
 		};
 
@@ -325,8 +326,8 @@
 			interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
 			reg-shift = <2>;
 			reg-io-width = <4>;
-			clocks = <&ccu 69>;
-			resets = <&ccu 48>;
+			clocks = <&ccu CLK_BUS_UART2>;
+			resets = <&ccu RST_BUS_UART2>;
 			status = "disabled";
 		};
 
@@ -336,8 +337,8 @@
 			interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
 			reg-shift = <2>;
 			reg-io-width = <4>;
-			clocks = <&ccu 70>;
-			resets = <&ccu 49>;
+			clocks = <&ccu CLK_BUS_UART3>;
+			resets = <&ccu RST_BUS_UART3>;
 			status = "disabled";
 		};
 
@@ -347,8 +348,8 @@
 			interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
 			reg-shift = <2>;
 			reg-io-width = <4>;
-			clocks = <&ccu 71>;
-			resets = <&ccu 50>;
+			clocks = <&ccu CLK_BUS_UART4>;
+			resets = <&ccu RST_BUS_UART4>;
 			status = "disabled";
 		};
 
@@ -356,8 +357,8 @@
 			compatible = "allwinner,sun6i-a31-i2c";
 			reg = <0x01c2ac00 0x400>;
 			interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&ccu 63>;
-			resets = <&ccu 42>;
+			clocks = <&ccu CLK_BUS_I2C0>;
+			resets = <&ccu RST_BUS_I2C0>;
 			status = "disabled";
 			#address-cells = <1>;
 			#size-cells = <0>;
@@ -367,8 +368,8 @@
 			compatible = "allwinner,sun6i-a31-i2c";
 			reg = <0x01c2b000 0x400>;
 			interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&ccu 64>;
-			resets = <&ccu 43>;
+			clocks = <&ccu CLK_BUS_I2C1>;
+			resets = <&ccu RST_BUS_I2C1>;
 			status = "disabled";
 			#address-cells = <1>;
 			#size-cells = <0>;
@@ -378,8 +379,8 @@
 			compatible = "allwinner,sun6i-a31-i2c";
 			reg = <0x01c2b400 0x400>;
 			interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&ccu 65>;
-			resets = <&ccu 44>;
+			clocks = <&ccu CLK_BUS_I2C2>;
+			resets = <&ccu RST_BUS_I2C2>;
 			status = "disabled";
 			#address-cells = <1>;
 			#size-cells = <0>;
@@ -417,7 +418,7 @@
 			compatible = "allwinner,sun50i-a64-r-pinctrl";
 			reg = <0x01f02c00 0x400>;
 			interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&r_ccu 3>, <&osc24M>, <&osc32k>;
+			clocks = <&r_ccu CLK_APB0_PIO>, <&osc24M>, <&osc32k>;
 			clock-names = "apb", "hosc", "losc";
 			gpio-controller;
 			#gpio-cells = <3>;
-- 
2.11.0

[toc] | [prev] | [next] | [standalone]


#1657348

FromMaxime Ripard <maxime.ripard@free-electrons.com>
Date2017-06-05 10:20 +0200
Message-ID<tOVp0-nU-15@gated-at.bofh.it>
In reply to#1657261

[Multipart message — attachments visible in raw view] — view raw

On Mon, Jun 05, 2017 at 12:32:22PM +0800, Chen-Yu Tsai wrote:
> Hi Maxime,
> 
> These are some clean up patches for 4.12. They convert raw number
> references for the CCU and R_CCU nodes, from when the CCU/R_CCU stuff
> was first added, to the defined macros in the device tree header files.
> 
> These affect the A64 and H3/H5.
> 
> These are based on our sunxi/fixes-for-4.12 branch. Once these are merged,
> I think it's time to send off pull requests for our fixes branches.
> 
> ChenYu

Applied both, thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[toc] | [prev] | [next] | [standalone]


#1657359

FromChen-Yu Tsai <wens@csie.org>
Date2017-06-05 10:20 +0200
Message-ID<tOVp1-nU-41@gated-at.bofh.it>
In reply to#1657348
On Mon, Jun 5, 2017 at 4:14 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> On Mon, Jun 05, 2017 at 12:32:22PM +0800, Chen-Yu Tsai wrote:
>> Hi Maxime,
>>
>> These are some clean up patches for 4.12. They convert raw number
>> references for the CCU and R_CCU nodes, from when the CCU/R_CCU stuff
>> was first added, to the defined macros in the device tree header files.
>>
>> These affect the A64 and H3/H5.
>>
>> These are based on our sunxi/fixes-for-4.12 branch. Once these are merged,
>> I think it's time to send off pull requests for our fixes branches.
>>
>> ChenYu
>
> Applied both, thanks!
> Maxime

Argh... Could you fix the build break on patch 1? It's simply

    sed -i -e 's/RST_IR/RST_APB0_IR/' arch/arm/boot/dts/sunxi-h3-h5.dtsi

Thanks
ChenYu

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web