devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 59/75] ARM: l2c: prima2: remove cache size override
       [not found] ` <20140328151249.GJ7528-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
@ 2014-03-28 15:19   ` Russell King
       [not found]     ` <E1WTYZ6-0007Gr-6r-eh5Bv4kxaXIANfyc6IWni62ZND6+EDdj@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Russell King @ 2014-03-28 15:19 UTC (permalink / raw)
  To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Barry Song, devicetree-u79uwXL29TY76Z2rM5mHXA

Signed-off-by: Russell King <rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
---
 arch/arm/boot/dts/marco.dtsi  |  2 +-
 arch/arm/boot/dts/prima2.dtsi |  2 +-
 arch/arm/mach-prima2/l2x0.c   | 34 +---------------------------------
 3 files changed, 3 insertions(+), 35 deletions(-)

diff --git a/arch/arm/boot/dts/marco.dtsi b/arch/arm/boot/dts/marco.dtsi
index 1579c3491ccd..247879aa1224 100644
--- a/arch/arm/boot/dts/marco.dtsi
+++ b/arch/arm/boot/dts/marco.dtsi
@@ -36,7 +36,7 @@
 		ranges = <0x40000000 0x40000000 0xa0000000>;
 
 		l2-cache-controller@c0030000 {
-			compatible = "sirf,marco-pl310-cache", "arm,pl310-cache";
+			compatible = "arm,pl310-cache";
 			reg = <0xc0030000 0x1000>;
 			interrupts = <0 59 0>;
 			arm,tag-latency = <1 1 1>;
diff --git a/arch/arm/boot/dts/prima2.dtsi b/arch/arm/boot/dts/prima2.dtsi
index 0e219932d7cc..29b578727b0a 100644
--- a/arch/arm/boot/dts/prima2.dtsi
+++ b/arch/arm/boot/dts/prima2.dtsi
@@ -48,7 +48,7 @@
 		ranges = <0x40000000 0x40000000 0x80000000>;
 
 		l2-cache-controller@80040000 {
-			compatible = "arm,pl310-cache", "sirf,prima2-pl310-cache";
+			compatible = "arm,pl310-cache";
 			reg = <0x80040000 0x1000>;
 			interrupts = <59>;
 			arm,tag-latency = <1 1 1>;
diff --git a/arch/arm/mach-prima2/l2x0.c b/arch/arm/mach-prima2/l2x0.c
index 3a4eda45171e..09f68f046830 100644
--- a/arch/arm/mach-prima2/l2x0.c
+++ b/arch/arm/mach-prima2/l2x0.c
@@ -8,42 +8,10 @@
 
 #include <linux/init.h>
 #include <linux/kernel.h>
-#include <linux/of.h>
 #include <asm/hardware/cache-l2x0.h>
 
-struct l2x0_aux
-{
-	u32 val;
-	u32 mask;
-};
-
-static struct l2x0_aux prima2_l2x0_aux __initconst = {
-	.val = L2C_AUX_CTRL_WAY_SIZE(2),
-	.mask =	0,
-};
-
-static struct l2x0_aux marco_l2x0_aux __initconst = {
-	.val = L2C_AUX_CTRL_WAY_SIZE(2) | L310_AUX_CTRL_ASSOCIATIVITY_16,
-	.mask = L2X0_AUX_CTRL_MASK,
-};
-
-static struct of_device_id sirf_l2x0_ids[] __initconst = {
-	{ .compatible = "sirf,prima2-pl310-cache", .data = &prima2_l2x0_aux, },
-	{ .compatible = "sirf,marco-pl310-cache", .data = &marco_l2x0_aux, },
-	{},
-};
-
 static int __init sirfsoc_l2x0_init(void)
 {
-	struct device_node *np;
-	const struct l2x0_aux *aux;
-
-	np = of_find_matching_node(NULL, sirf_l2x0_ids);
-	if (np) {
-		aux = of_match_node(sirf_l2x0_ids, np)->data;
-		return l2x0_of_init(aux->val, aux->mask);
-	}
-
-	return 0;
+	return l2x0_of_init(0, ~0);
 }
 early_initcall(sirfsoc_l2x0_init);
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 68/75] ARM: l2c: add L2C-310 power control DT properties
       [not found] <20140328151249.GJ7528@n2100.arm.linux.org.uk>
       [not found] ` <20140328151249.GJ7528-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
@ 2014-03-28 15:20 ` Russell King
  2014-03-28 15:20 ` [PATCH 74/75] ARM: l2c: always enable low power modes Russell King
  2 siblings, 0 replies; 11+ messages in thread
From: Russell King @ 2014-03-28 15:20 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Rob Landley, Shawn Guo, Sascha Hauer, devicetree, linux-doc

Add two new properties for setting thte L3 power control register.  Two
new properties are added:

	arm,dynamic-clk-gating
	arm,standby-mode

iMX6 sets both these, add the properties there.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 Documentation/devicetree/bindings/arm/l2cc.txt |  2 ++
 arch/arm/boot/dts/imx6qdl.dtsi                 |  2 ++
 arch/arm/boot/dts/imx6sl.dtsi                  |  2 ++
 arch/arm/mm/cache-l2x0.c                       | 10 ++++++++++
 4 files changed, 16 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/l2cc.txt b/Documentation/devicetree/bindings/arm/l2cc.txt
index b513cb8196fe..e0dd400ecea6 100644
--- a/Documentation/devicetree/bindings/arm/l2cc.txt
+++ b/Documentation/devicetree/bindings/arm/l2cc.txt
@@ -40,6 +40,8 @@ implementations of the L2 cache controller with compatible programming models.
 - arm,filter-ranges : <start length> Starting address and length of window to
   filter. Addresses in the filter window are directed to the M1 port. Other
   addresses will go to the M0 port.
+- arm,dynamic-clk-gating : Enables dynamic clock gating (PL310)
+- arm,standby-mode : Enables standby mode (PL310)
 - interrupts : 1 combined interrupt.
 - cache-id-part: cache id part number to be used if it is not present
   on hardware
diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
index fb28b2ecb1db..dea6ee66a01e 100644
--- a/arch/arm/boot/dts/imx6qdl.dtsi
+++ b/arch/arm/boot/dts/imx6qdl.dtsi
@@ -114,6 +114,8 @@
 			cache-level = <2>;
 			arm,tag-latency = <4 2 3>;
 			arm,data-latency = <4 2 3>;
+			arm,dynamic-clk-gating;
+			arm,standby-mode;
 		};
 
 		pcie: pcie@0x01000000 {
diff --git a/arch/arm/boot/dts/imx6sl.dtsi b/arch/arm/boot/dts/imx6sl.dtsi
index 28558f1aaf2d..8094ac1cedc5 100644
--- a/arch/arm/boot/dts/imx6sl.dtsi
+++ b/arch/arm/boot/dts/imx6sl.dtsi
@@ -81,6 +81,8 @@
 			cache-level = <2>;
 			arm,tag-latency = <4 2 3>;
 			arm,data-latency = <4 2 3>;
+			arm,dynamic-clk-gating;
+			arm,standby-mode;
 		};
 
 		pmu {
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index 462675847cb7..655a363918f5 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -906,6 +906,7 @@ static void __init l2c310_of_parse(const struct device_node *np,
 	u32 data[3] = { 0, 0, 0 };
 	u32 tag[3] = { 0, 0, 0 };
 	u32 filter[2] = { 0, 0 };
+	u32 val;
 
 	of_property_read_u32_array(np, "arm,tag-latency", tag, ARRAY_SIZE(tag));
 	if (tag[0] && tag[1] && tag[2])
@@ -932,6 +933,15 @@ static void __init l2c310_of_parse(const struct device_node *np,
 		writel_relaxed((filter[0] & ~(SZ_1M - 1)) | L310_ADDR_FILTER_EN,
 			       l2x0_base + L310_ADDR_FILTER_START);
 	}
+
+	val = 0;
+	if (of_property_read_bool(np, "arm,dynamic-clk-gating"))
+		val |= L310_DYNAMIC_CLK_GATING_EN;
+	if (of_property_read_bool(np, "arm,standby-mode"))
+		val |= L310_STNDBY_MODE_EN;
+
+	if (val)
+		l2c_write_sec(val, l2x0_base, L310_POWER_CTRL);
 }
 
 static const struct l2c_init_data of_l2c310_data __initconst = {
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 74/75] ARM: l2c: always enable low power modes
       [not found] <20140328151249.GJ7528@n2100.arm.linux.org.uk>
       [not found] ` <20140328151249.GJ7528-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
  2014-03-28 15:20 ` [PATCH 68/75] ARM: l2c: add L2C-310 power control DT properties Russell King
@ 2014-03-28 15:20 ` Russell King
  2014-03-28 15:42   ` Rob Herring
  2 siblings, 1 reply; 11+ messages in thread
From: Russell King @ 2014-03-28 15:20 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Rob Landley, devicetree, linux-doc

Always enable the L2C low power modes on L2C-310 R3P0 and newer parts.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 Documentation/devicetree/bindings/arm/l2cc.txt |  2 --
 arch/arm/mm/cache-l2x0.c                       | 22 ++++++++++++----------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/Documentation/devicetree/bindings/arm/l2cc.txt b/Documentation/devicetree/bindings/arm/l2cc.txt
index e0dd400ecea6..b513cb8196fe 100644
--- a/Documentation/devicetree/bindings/arm/l2cc.txt
+++ b/Documentation/devicetree/bindings/arm/l2cc.txt
@@ -40,8 +40,6 @@ implementations of the L2 cache controller with compatible programming models.
 - arm,filter-ranges : <start length> Starting address and length of window to
   filter. Addresses in the filter window are directed to the M1 port. Other
   addresses will go to the M0 port.
-- arm,dynamic-clk-gating : Enables dynamic clock gating (PL310)
-- arm,standby-mode : Enables standby mode (PL310)
 - interrupts : 1 combined interrupt.
 - cache-id-part: cache id part number to be used if it is not present
   on hardware
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index 700a66260f94..b1f103d402be 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -752,6 +752,18 @@ static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock)
 			1 + (prefetch & L310_PREFETCH_CTRL_OFFSET_MASK));
 	}
 
+	/* r3p0 or later has power control register */
+	if (rev >= L310_CACHE_ID_RTL_R3P0) {
+		u32 power_ctrl;
+
+		l2c_write_sec(L310_DYNAMIC_CLK_GATING_EN | L310_STNDBY_MODE_EN,
+			      base, L310_POWER_CTRL);
+		power_ctrl = readl_relaxed(base + L310_POWER_CTRL);
+		pr_info("L2C-310: dynamic clock gating %sabled, standby mode %sabled\n",
+			power_ctrl & L310_DYNAMIC_CLK_GATING_EN ? "en" : "dis",
+			power_ctrl & L310_STNDBY_MODE_EN ? "en" : "dis");
+	}
+
 	l2c_enable(base, aux, num_lock);
 
 	if (aux & L310_AUX_CTRL_FULL_LINE_ZERO) {
@@ -1033,7 +1045,6 @@ static void __init l2c310_of_parse(const struct device_node *np,
 	u32 data[3] = { 0, 0, 0 };
 	u32 tag[3] = { 0, 0, 0 };
 	u32 filter[2] = { 0, 0 };
-	u32 val;
 
 	of_property_read_u32_array(np, "arm,tag-latency", tag, ARRAY_SIZE(tag));
 	if (tag[0] && tag[1] && tag[2])
@@ -1060,15 +1071,6 @@ static void __init l2c310_of_parse(const struct device_node *np,
 		writel_relaxed((filter[0] & ~(SZ_1M - 1)) | L310_ADDR_FILTER_EN,
 			       l2x0_base + L310_ADDR_FILTER_START);
 	}
-
-	val = 0;
-	if (of_property_read_bool(np, "arm,dynamic-clk-gating"))
-		val |= L310_DYNAMIC_CLK_GATING_EN;
-	if (of_property_read_bool(np, "arm,standby-mode"))
-		val |= L310_STNDBY_MODE_EN;
-
-	if (val)
-		l2c_write_sec(val, l2x0_base, L310_POWER_CTRL);
 }
 
 static const struct l2c_init_data of_l2c310_data __initconst = {
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 74/75] ARM: l2c: always enable low power modes
  2014-03-28 15:20 ` [PATCH 74/75] ARM: l2c: always enable low power modes Russell King
@ 2014-03-28 15:42   ` Rob Herring
  2014-03-28 15:51     ` Russell King - ARM Linux
  0 siblings, 1 reply; 11+ messages in thread
From: Rob Herring @ 2014-03-28 15:42 UTC (permalink / raw)
  To: Russell King
  Cc: linux-arm-kernel, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Rob Landley, devicetree, linux-doc

On Fri, Mar 28, 2014 at 10:20 AM, Russell King
<rmk+kernel@arm.linux.org.uk> wrote:
> Always enable the L2C low power modes on L2C-310 R3P0 and newer parts.

I assume you want to squash this with patch 68/75? Or you are still
debating whether we want to do this or not? Given that it is r3px
only, that should greatly reduce any chance of breakage to newer
platforms.

Rob

>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  Documentation/devicetree/bindings/arm/l2cc.txt |  2 --
>  arch/arm/mm/cache-l2x0.c                       | 22 ++++++++++++----------
>  2 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/arm/l2cc.txt b/Documentation/devicetree/bindings/arm/l2cc.txt
> index e0dd400ecea6..b513cb8196fe 100644
> --- a/Documentation/devicetree/bindings/arm/l2cc.txt
> +++ b/Documentation/devicetree/bindings/arm/l2cc.txt
> @@ -40,8 +40,6 @@ implementations of the L2 cache controller with compatible programming models.
>  - arm,filter-ranges : <start length> Starting address and length of window to
>    filter. Addresses in the filter window are directed to the M1 port. Other
>    addresses will go to the M0 port.
> -- arm,dynamic-clk-gating : Enables dynamic clock gating (PL310)
> -- arm,standby-mode : Enables standby mode (PL310)
>  - interrupts : 1 combined interrupt.
>  - cache-id-part: cache id part number to be used if it is not present
>    on hardware
> diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
> index 700a66260f94..b1f103d402be 100644
> --- a/arch/arm/mm/cache-l2x0.c
> +++ b/arch/arm/mm/cache-l2x0.c
> @@ -752,6 +752,18 @@ static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock)
>                         1 + (prefetch & L310_PREFETCH_CTRL_OFFSET_MASK));
>         }
>
> +       /* r3p0 or later has power control register */
> +       if (rev >= L310_CACHE_ID_RTL_R3P0) {
> +               u32 power_ctrl;
> +
> +               l2c_write_sec(L310_DYNAMIC_CLK_GATING_EN | L310_STNDBY_MODE_EN,
> +                             base, L310_POWER_CTRL);
> +               power_ctrl = readl_relaxed(base + L310_POWER_CTRL);
> +               pr_info("L2C-310: dynamic clock gating %sabled, standby mode %sabled\n",
> +                       power_ctrl & L310_DYNAMIC_CLK_GATING_EN ? "en" : "dis",
> +                       power_ctrl & L310_STNDBY_MODE_EN ? "en" : "dis");
> +       }
> +
>         l2c_enable(base, aux, num_lock);
>
>         if (aux & L310_AUX_CTRL_FULL_LINE_ZERO) {
> @@ -1033,7 +1045,6 @@ static void __init l2c310_of_parse(const struct device_node *np,
>         u32 data[3] = { 0, 0, 0 };
>         u32 tag[3] = { 0, 0, 0 };
>         u32 filter[2] = { 0, 0 };
> -       u32 val;
>
>         of_property_read_u32_array(np, "arm,tag-latency", tag, ARRAY_SIZE(tag));
>         if (tag[0] && tag[1] && tag[2])
> @@ -1060,15 +1071,6 @@ static void __init l2c310_of_parse(const struct device_node *np,
>                 writel_relaxed((filter[0] & ~(SZ_1M - 1)) | L310_ADDR_FILTER_EN,
>                                l2x0_base + L310_ADDR_FILTER_START);
>         }
> -
> -       val = 0;
> -       if (of_property_read_bool(np, "arm,dynamic-clk-gating"))
> -               val |= L310_DYNAMIC_CLK_GATING_EN;
> -       if (of_property_read_bool(np, "arm,standby-mode"))
> -               val |= L310_STNDBY_MODE_EN;
> -
> -       if (val)
> -               l2c_write_sec(val, l2x0_base, L310_POWER_CTRL);
>  }
>
>  static const struct l2c_init_data of_l2c310_data __initconst = {
> --
> 1.8.3.1
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 74/75] ARM: l2c: always enable low power modes
  2014-03-28 15:42   ` Rob Herring
@ 2014-03-28 15:51     ` Russell King - ARM Linux
  2014-04-04 16:53       ` Sören Brinkmann
  0 siblings, 1 reply; 11+ messages in thread
From: Russell King - ARM Linux @ 2014-03-28 15:51 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-arm-kernel, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Rob Landley, devicetree, linux-doc

On Fri, Mar 28, 2014 at 10:42:54AM -0500, Rob Herring wrote:
> On Fri, Mar 28, 2014 at 10:20 AM, Russell King
> <rmk+kernel@arm.linux.org.uk> wrote:
> > Always enable the L2C low power modes on L2C-310 R3P0 and newer parts.
> 
> I assume you want to squash this with patch 68/75? Or you are still
> debating whether we want to do this or not? Given that it is r3px
> only, that should greatly reduce any chance of breakage to newer
> platforms.

I will eventually - I've kept it separate for the time being to give
more options.  Let's see how people get on with it - it'll be running
through Olof's builder later today, and there's some other people
wanting to take it for a spin.

-- 
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 59/75] ARM: l2c: prima2: remove cache size override
       [not found]     ` <E1WTYZ6-0007Gr-6r-eh5Bv4kxaXIANfyc6IWni62ZND6+EDdj@public.gmane.org>
@ 2014-04-04 13:40       ` Barry Song
       [not found]         ` <CAGsJ_4yUNET5mWEUH-KEtA1ei49Fo2aC20Wmb-jXhs0vF7HSYw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Barry Song @ 2014-04-04 13:40 UTC (permalink / raw)
  To: Russell King
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Rob Herring,
	Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	devicetree-u79uwXL29TY76Z2rM5mHXA, DL-SHA-WorkGroupLinux

2014-03-28 23:19 GMT+08:00 Russell King <rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>:
> Signed-off-by: Russell King <rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
> ---
>  arch/arm/boot/dts/marco.dtsi  |  2 +-
>  arch/arm/boot/dts/prima2.dtsi |  2 +-
>  arch/arm/mach-prima2/l2x0.c   | 34 +---------------------------------
>  3 files changed, 3 insertions(+), 35 deletions(-)
>
> diff --git a/arch/arm/boot/dts/marco.dtsi b/arch/arm/boot/dts/marco.dtsi
> index 1579c3491ccd..247879aa1224 100644
> --- a/arch/arm/boot/dts/marco.dtsi
> +++ b/arch/arm/boot/dts/marco.dtsi
> @@ -36,7 +36,7 @@
>                 ranges = <0x40000000 0x40000000 0xa0000000>;
>
>                 l2-cache-controller@c0030000 {
> -                       compatible = "sirf,marco-pl310-cache", "arm,pl310-cache";
> +                       compatible = "arm,pl310-cache";
>                         reg = <0xc0030000 0x1000>;
>                         interrupts = <0 59 0>;
>                         arm,tag-latency = <1 1 1>;
> diff --git a/arch/arm/boot/dts/prima2.dtsi b/arch/arm/boot/dts/prima2.dtsi
> index 0e219932d7cc..29b578727b0a 100644
> --- a/arch/arm/boot/dts/prima2.dtsi
> +++ b/arch/arm/boot/dts/prima2.dtsi
> @@ -48,7 +48,7 @@
>                 ranges = <0x40000000 0x40000000 0x80000000>;
>
>                 l2-cache-controller@80040000 {
> -                       compatible = "arm,pl310-cache", "sirf,prima2-pl310-cache";
> +                       compatible = "arm,pl310-cache";
>                         reg = <0x80040000 0x1000>;
>                         interrupts = <59>;
>                         arm,tag-latency = <1 1 1>;
> diff --git a/arch/arm/mach-prima2/l2x0.c b/arch/arm/mach-prima2/l2x0.c
> index 3a4eda45171e..09f68f046830 100644
> --- a/arch/arm/mach-prima2/l2x0.c
> +++ b/arch/arm/mach-prima2/l2x0.c
> @@ -8,42 +8,10 @@
>
>  #include <linux/init.h>
>  #include <linux/kernel.h>
> -#include <linux/of.h>
>  #include <asm/hardware/cache-l2x0.h>
>
> -struct l2x0_aux
> -{
> -       u32 val;
> -       u32 mask;
> -};
> -
> -static struct l2x0_aux prima2_l2x0_aux __initconst = {
> -       .val = L2C_AUX_CTRL_WAY_SIZE(2),
> -       .mask = 0,
> -};
> -
> -static struct l2x0_aux marco_l2x0_aux __initconst = {
> -       .val = L2C_AUX_CTRL_WAY_SIZE(2) | L310_AUX_CTRL_ASSOCIATIVITY_16,
> -       .mask = L2X0_AUX_CTRL_MASK,
> -};
> -
> -static struct of_device_id sirf_l2x0_ids[] __initconst = {
> -       { .compatible = "sirf,prima2-pl310-cache", .data = &prima2_l2x0_aux, },
> -       { .compatible = "sirf,marco-pl310-cache", .data = &marco_l2x0_aux, },
> -       {},
> -};
> -
>  static int __init sirfsoc_l2x0_init(void)
>  {
> -       struct device_node *np;
> -       const struct l2x0_aux *aux;
> -
> -       np = of_find_matching_node(NULL, sirf_l2x0_ids);
> -       if (np) {
> -               aux = of_match_node(sirf_l2x0_ids, np)->data;
> -               return l2x0_of_init(aux->val, aux->mask);
> -       }
> -
> -       return 0;
> +       return l2x0_of_init(0, ~0);

Russell, as i mailed you before, pre-set L2 has disabled
write_combined, here we can make the bit restored.

>  }
>  early_initcall(sirfsoc_l2x0_init);
> --
> 1.8.3.1
>

-barry
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 59/75] ARM: l2c: prima2: remove cache size override
       [not found]         ` <CAGsJ_4yUNET5mWEUH-KEtA1ei49Fo2aC20Wmb-jXhs0vF7HSYw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-04-04 14:10           ` Russell King - ARM Linux
       [not found]             ` <20140404141034.GC7528-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Russell King - ARM Linux @ 2014-04-04 14:10 UTC (permalink / raw)
  To: Barry Song
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Rob Herring,
	Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	devicetree-u79uwXL29TY76Z2rM5mHXA, DL-SHA-WorkGroupLinux

On Fri, Apr 04, 2014 at 09:40:31PM +0800, Barry Song wrote:
> 2014-03-28 23:19 GMT+08:00 Russell King <rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>:
> > Signed-off-by: Russell King <rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
> > ---
> >  arch/arm/boot/dts/marco.dtsi  |  2 +-
> >  arch/arm/boot/dts/prima2.dtsi |  2 +-
> >  arch/arm/mach-prima2/l2x0.c   | 34 +---------------------------------
> >  3 files changed, 3 insertions(+), 35 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/marco.dtsi b/arch/arm/boot/dts/marco.dtsi
> > index 1579c3491ccd..247879aa1224 100644
> > --- a/arch/arm/boot/dts/marco.dtsi
> > +++ b/arch/arm/boot/dts/marco.dtsi
> > @@ -36,7 +36,7 @@
> >                 ranges = <0x40000000 0x40000000 0xa0000000>;
> >
> >                 l2-cache-controller@c0030000 {
> > -                       compatible = "sirf,marco-pl310-cache", "arm,pl310-cache";
> > +                       compatible = "arm,pl310-cache";
> >                         reg = <0xc0030000 0x1000>;
> >                         interrupts = <0 59 0>;
> >                         arm,tag-latency = <1 1 1>;
> > diff --git a/arch/arm/boot/dts/prima2.dtsi b/arch/arm/boot/dts/prima2.dtsi
> > index 0e219932d7cc..29b578727b0a 100644
> > --- a/arch/arm/boot/dts/prima2.dtsi
> > +++ b/arch/arm/boot/dts/prima2.dtsi
> > @@ -48,7 +48,7 @@
> >                 ranges = <0x40000000 0x40000000 0x80000000>;
> >
> >                 l2-cache-controller@80040000 {
> > -                       compatible = "arm,pl310-cache", "sirf,prima2-pl310-cache";
> > +                       compatible = "arm,pl310-cache";
> >                         reg = <0x80040000 0x1000>;
> >                         interrupts = <59>;
> >                         arm,tag-latency = <1 1 1>;
> > diff --git a/arch/arm/mach-prima2/l2x0.c b/arch/arm/mach-prima2/l2x0.c
> > index 3a4eda45171e..09f68f046830 100644
> > --- a/arch/arm/mach-prima2/l2x0.c
> > +++ b/arch/arm/mach-prima2/l2x0.c
> > @@ -8,42 +8,10 @@
> >
> >  #include <linux/init.h>
> >  #include <linux/kernel.h>
> > -#include <linux/of.h>
> >  #include <asm/hardware/cache-l2x0.h>
> >
> > -struct l2x0_aux
> > -{
> > -       u32 val;
> > -       u32 mask;
> > -};
> > -
> > -static struct l2x0_aux prima2_l2x0_aux __initconst = {
> > -       .val = L2C_AUX_CTRL_WAY_SIZE(2),
> > -       .mask = 0,
> > -};
> > -
> > -static struct l2x0_aux marco_l2x0_aux __initconst = {
> > -       .val = L2C_AUX_CTRL_WAY_SIZE(2) | L310_AUX_CTRL_ASSOCIATIVITY_16,
> > -       .mask = L2X0_AUX_CTRL_MASK,
> > -};
> > -
> > -static struct of_device_id sirf_l2x0_ids[] __initconst = {
> > -       { .compatible = "sirf,prima2-pl310-cache", .data = &prima2_l2x0_aux, },
> > -       { .compatible = "sirf,marco-pl310-cache", .data = &marco_l2x0_aux, },
> > -       {},
> > -};
> > -
> >  static int __init sirfsoc_l2x0_init(void)
> >  {
> > -       struct device_node *np;
> > -       const struct l2x0_aux *aux;
> > -
> > -       np = of_find_matching_node(NULL, sirf_l2x0_ids);
> > -       if (np) {
> > -               aux = of_match_node(sirf_l2x0_ids, np)->data;
> > -               return l2x0_of_init(aux->val, aux->mask);
> > -       }
> > -
> > -       return 0;
> > +       return l2x0_of_init(0, ~0);
> 
> Russell, as i mailed you before, pre-set L2 has disabled
> write_combined, here we can make the bit restored.

*Sigh*.  This is what your final email said on the subject:

  [Barry Song]
  Anyway, it seems I can drop the whole mach-prima2/l2x0.c if I use 0 as the
  aux_val. For aux_mask, let me zero those bits I really want to zero.

which to me means "I need to figure out what we need to do here, and I'll
eventually send you a patch".

It's really quite simple.  I've done nothing (as you can see if you compare
this to what I sent you originally) because you've done nothing to help me.
If you want me to do something different here, send me what you need.
Otherwise, I'm not going to change it, because I don't know what you want
here.

-- 
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 59/75] ARM: l2c: prima2: remove cache size override
       [not found]             ` <20140404141034.GC7528-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
@ 2014-04-04 14:56               ` Barry Song
  0 siblings, 0 replies; 11+ messages in thread
From: Barry Song @ 2014-04-04 14:56 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Rob Herring,
	Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	devicetree-u79uwXL29TY76Z2rM5mHXA, DL-SHA-WorkGroupLinux

2014-04-04 22:10 GMT+08:00 Russell King - ARM Linux <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>:
> On Fri, Apr 04, 2014 at 09:40:31PM +0800, Barry Song wrote:
>> 2014-03-28 23:19 GMT+08:00 Russell King <rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>:
>> > Signed-off-by: Russell King <rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
>> > ---
>> >  arch/arm/boot/dts/marco.dtsi  |  2 +-
>> >  arch/arm/boot/dts/prima2.dtsi |  2 +-
>> >  arch/arm/mach-prima2/l2x0.c   | 34 +---------------------------------
>> >  3 files changed, 3 insertions(+), 35 deletions(-)
>> >
>> > diff --git a/arch/arm/boot/dts/marco.dtsi b/arch/arm/boot/dts/marco.dtsi
>> > index 1579c3491ccd..247879aa1224 100644
>> > --- a/arch/arm/boot/dts/marco.dtsi
>> > +++ b/arch/arm/boot/dts/marco.dtsi
>> > @@ -36,7 +36,7 @@
>> >                 ranges = <0x40000000 0x40000000 0xa0000000>;
>> >
>> >                 l2-cache-controller@c0030000 {
>> > -                       compatible = "sirf,marco-pl310-cache", "arm,pl310-cache";
>> > +                       compatible = "arm,pl310-cache";
>> >                         reg = <0xc0030000 0x1000>;
>> >                         interrupts = <0 59 0>;
>> >                         arm,tag-latency = <1 1 1>;
>> > diff --git a/arch/arm/boot/dts/prima2.dtsi b/arch/arm/boot/dts/prima2.dtsi
>> > index 0e219932d7cc..29b578727b0a 100644
>> > --- a/arch/arm/boot/dts/prima2.dtsi
>> > +++ b/arch/arm/boot/dts/prima2.dtsi
>> > @@ -48,7 +48,7 @@
>> >                 ranges = <0x40000000 0x40000000 0x80000000>;
>> >
>> >                 l2-cache-controller@80040000 {
>> > -                       compatible = "arm,pl310-cache", "sirf,prima2-pl310-cache";
>> > +                       compatible = "arm,pl310-cache";
>> >                         reg = <0x80040000 0x1000>;
>> >                         interrupts = <59>;
>> >                         arm,tag-latency = <1 1 1>;
>> > diff --git a/arch/arm/mach-prima2/l2x0.c b/arch/arm/mach-prima2/l2x0.c
>> > index 3a4eda45171e..09f68f046830 100644
>> > --- a/arch/arm/mach-prima2/l2x0.c
>> > +++ b/arch/arm/mach-prima2/l2x0.c
>> > @@ -8,42 +8,10 @@
>> >
>> >  #include <linux/init.h>
>> >  #include <linux/kernel.h>
>> > -#include <linux/of.h>
>> >  #include <asm/hardware/cache-l2x0.h>
>> >
>> > -struct l2x0_aux
>> > -{
>> > -       u32 val;
>> > -       u32 mask;
>> > -};
>> > -
>> > -static struct l2x0_aux prima2_l2x0_aux __initconst = {
>> > -       .val = L2C_AUX_CTRL_WAY_SIZE(2),
>> > -       .mask = 0,
>> > -};
>> > -
>> > -static struct l2x0_aux marco_l2x0_aux __initconst = {
>> > -       .val = L2C_AUX_CTRL_WAY_SIZE(2) | L310_AUX_CTRL_ASSOCIATIVITY_16,
>> > -       .mask = L2X0_AUX_CTRL_MASK,
>> > -};
>> > -
>> > -static struct of_device_id sirf_l2x0_ids[] __initconst = {
>> > -       { .compatible = "sirf,prima2-pl310-cache", .data = &prima2_l2x0_aux, },
>> > -       { .compatible = "sirf,marco-pl310-cache", .data = &marco_l2x0_aux, },
>> > -       {},
>> > -};
>> > -
>> >  static int __init sirfsoc_l2x0_init(void)
>> >  {
>> > -       struct device_node *np;
>> > -       const struct l2x0_aux *aux;
>> > -
>> > -       np = of_find_matching_node(NULL, sirf_l2x0_ids);
>> > -       if (np) {
>> > -               aux = of_match_node(sirf_l2x0_ids, np)->data;
>> > -               return l2x0_of_init(aux->val, aux->mask);
>> > -       }
>> > -
>> > -       return 0;
>> > +       return l2x0_of_init(0, ~0);
>>
>> Russell, as i mailed you before, pre-set L2 has disabled
>> write_combined, here we can make the bit restored.
>
> *Sigh*.  This is what your final email said on the subject:
>
>   [Barry Song]
>   Anyway, it seems I can drop the whole mach-prima2/l2x0.c if I use 0 as the
>   aux_val. For aux_mask, let me zero those bits I really want to zero.

yes. it is my final mail on the subject.

>
> which to me means "I need to figure out what we need to do here, and I'll
> eventually send you a patch".

it was because i missed your this mail and patch in mail list when i
got that mail. so i said i would send a patch to follow your
requirement.
but since you already had one here, i will not.

>
> It's really quite simple.  I've done nothing (as you can see if you compare
> this to what I sent you originally) because you've done nothing to help me.
> If you want me to do something different here, send me what you need.
> Otherwise, I'm not going to change it, because I don't know what you want
> here.
>

i was not asking why you have not done anything. i was just remarking
when i found this mail today.
about what i want here,  my 1st goal is making aux_mask 0xfdffffff.
my 2nd goal is making mach-prima2/l2x0.c disappear and moving
l2x0_of_init to mach-prima2/common.c.

-barry
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 74/75] ARM: l2c: always enable low power modes
  2014-03-28 15:51     ` Russell King - ARM Linux
@ 2014-04-04 16:53       ` Sören Brinkmann
  2014-04-04 19:17         ` Russell King - ARM Linux
  0 siblings, 1 reply; 11+ messages in thread
From: Sören Brinkmann @ 2014-04-04 16:53 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Mark Rutland, devicetree, Pawel Moll, linux-doc, Ian Campbell,
	Rob Herring, Rob Landley, Kumar Gala, linux-arm-kernel

On Fri, 2014-03-28 at 03:51PM +0000, Russell King - ARM Linux wrote:
> On Fri, Mar 28, 2014 at 10:42:54AM -0500, Rob Herring wrote:
> > On Fri, Mar 28, 2014 at 10:20 AM, Russell King
> > <rmk+kernel@arm.linux.org.uk> wrote:
> > > Always enable the L2C low power modes on L2C-310 R3P0 and newer parts.
> > 
> > I assume you want to squash this with patch 68/75? Or you are still
> > debating whether we want to do this or not? Given that it is r3px
> > only, that should greatly reduce any chance of breakage to newer
> > platforms.
> 
> I will eventually - I've kept it separate for the time being to give
> more options.  Let's see how people get on with it - it'll be running
> through Olof's builder later today, and there's some other people
> wanting to take it for a spin.

A while back I suggested altering those bits, but that was turned down:
https://lkml.org/lkml/2013/3/1/350

Are there any numbers available on how enabling these features impacts
the system? I'm a little bit concerned of always enabling them
unconditionally, in case it increases latency for some use cases. I
think I'd prefer the DT approach, unless the impact is reported to be
negligible - which it likely is, I guess.

	Thanks,
	Sören



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 74/75] ARM: l2c: always enable low power modes
  2014-04-04 16:53       ` Sören Brinkmann
@ 2014-04-04 19:17         ` Russell King - ARM Linux
  2014-04-04 20:47           ` Sören Brinkmann
  0 siblings, 1 reply; 11+ messages in thread
From: Russell King - ARM Linux @ 2014-04-04 19:17 UTC (permalink / raw)
  To: Sören Brinkmann
  Cc: Rob Herring, Mark Rutland, devicetree, Pawel Moll, Ian Campbell,
	linux-doc, Rob Herring, Rob Landley, Kumar Gala,
	linux-arm-kernel

On Fri, Apr 04, 2014 at 09:53:29AM -0700, Sören Brinkmann wrote:
> On Fri, 2014-03-28 at 03:51PM +0000, Russell King - ARM Linux wrote:
> > On Fri, Mar 28, 2014 at 10:42:54AM -0500, Rob Herring wrote:
> > > On Fri, Mar 28, 2014 at 10:20 AM, Russell King
> > > <rmk+kernel@arm.linux.org.uk> wrote:
> > > > Always enable the L2C low power modes on L2C-310 R3P0 and newer parts.
> > > 
> > > I assume you want to squash this with patch 68/75? Or you are still
> > > debating whether we want to do this or not? Given that it is r3px
> > > only, that should greatly reduce any chance of breakage to newer
> > > platforms.
> > 
> > I will eventually - I've kept it separate for the time being to give
> > more options.  Let's see how people get on with it - it'll be running
> > through Olof's builder later today, and there's some other people
> > wanting to take it for a spin.
> 
> A while back I suggested altering those bits, but that was turned down:
> https://lkml.org/lkml/2013/3/1/350

As I said yesterday, please use a different archive website, preferably
one which works.  lkml.org has been broken in various ways for a couple
of days now, and quoting unreachable URLs isn't useful for discussion
purposes.

-- 
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 74/75] ARM: l2c: always enable low power modes
  2014-04-04 19:17         ` Russell King - ARM Linux
@ 2014-04-04 20:47           ` Sören Brinkmann
  0 siblings, 0 replies; 11+ messages in thread
From: Sören Brinkmann @ 2014-04-04 20:47 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Mark Rutland, devicetree, Pawel Moll, linux-doc, Ian Campbell,
	Rob Herring, Rob Landley, Kumar Gala, linux-arm-kernel

On Fri, 2014-04-04 at 08:17PM +0100, Russell King - ARM Linux wrote:
> On Fri, Apr 04, 2014 at 09:53:29AM -0700, Sören Brinkmann wrote:
> > On Fri, 2014-03-28 at 03:51PM +0000, Russell King - ARM Linux wrote:
> > > On Fri, Mar 28, 2014 at 10:42:54AM -0500, Rob Herring wrote:
> > > > On Fri, Mar 28, 2014 at 10:20 AM, Russell King
> > > > <rmk+kernel@arm.linux.org.uk> wrote:
> > > > > Always enable the L2C low power modes on L2C-310 R3P0 and newer parts.
> > > > 
> > > > I assume you want to squash this with patch 68/75? Or you are still
> > > > debating whether we want to do this or not? Given that it is r3px
> > > > only, that should greatly reduce any chance of breakage to newer
> > > > platforms.
> > > 
> > > I will eventually - I've kept it separate for the time being to give
> > > more options.  Let's see how people get on with it - it'll be running
> > > through Olof's builder later today, and there's some other people
> > > wanting to take it for a spin.
> > 
> > A while back I suggested altering those bits, but that was turned down:
> > https://lkml.org/lkml/2013/3/1/350
> 
> As I said yesterday, please use a different archive website, preferably
> one which works.  lkml.org has been broken in various ways for a couple
> of days now, and quoting unreachable URLs isn't useful for discussion
> purposes.

It worked when I pulled the link. Anyway, the thread at gmane:
http://thread.gmane.org/gmane.linux.kernel/1449544/focus=1450475

	Sören



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-04-04 20:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20140328151249.GJ7528@n2100.arm.linux.org.uk>
     [not found] ` <20140328151249.GJ7528-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2014-03-28 15:19   ` [PATCH 59/75] ARM: l2c: prima2: remove cache size override Russell King
     [not found]     ` <E1WTYZ6-0007Gr-6r-eh5Bv4kxaXIANfyc6IWni62ZND6+EDdj@public.gmane.org>
2014-04-04 13:40       ` Barry Song
     [not found]         ` <CAGsJ_4yUNET5mWEUH-KEtA1ei49Fo2aC20Wmb-jXhs0vF7HSYw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-04 14:10           ` Russell King - ARM Linux
     [not found]             ` <20140404141034.GC7528-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2014-04-04 14:56               ` Barry Song
2014-03-28 15:20 ` [PATCH 68/75] ARM: l2c: add L2C-310 power control DT properties Russell King
2014-03-28 15:20 ` [PATCH 74/75] ARM: l2c: always enable low power modes Russell King
2014-03-28 15:42   ` Rob Herring
2014-03-28 15:51     ` Russell King - ARM Linux
2014-04-04 16:53       ` Sören Brinkmann
2014-04-04 19:17         ` Russell King - ARM Linux
2014-04-04 20:47           ` Sören Brinkmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).