All of lore.kernel.org
 help / color / mirror / Atom feed
* Denys Dmytriyenko : linux/cmem: patch keystone dtsi files to co-exist with new sram driver
@ 2016-11-18 16:31 Arago Project git
  0 siblings, 0 replies; 2+ messages in thread
From: Arago Project git @ 2016-11-18 16:31 UTC (permalink / raw)
  To: meta-ti

Module: meta-ti
Branch: krogoth
Commit: 0e87d6fbf9f9369fe9f43969c8c37b9105f3af5e
URL:    http://arago-project.org/git/meta-ti.git?a=commit;h=0e87d6fbf9f9369fe9f43969c8c37b9105f3af5e

Author: Denys Dmytriyenko <denys@ti.com>
Date:   Fri Nov 18 03:08:02 2016 +0000

linux/cmem: patch keystone dtsi files to co-exist with new sram driver

Signed-off-by: Denys Dmytriyenko <denys@ti.com>

---

 recipes-kernel/linux/cmem.inc                      |    3 +
 ...stone-Remove-reg-entry-from-the-sram-node.patch |   79 ++++++++++++++++++++
 2 files changed, 82 insertions(+), 0 deletions(-)

diff --git a/recipes-kernel/linux/cmem.inc b/recipes-kernel/linux/cmem.inc
index d4edc60..649b59d 100644
--- a/recipes-kernel/linux/cmem.inc
+++ b/recipes-kernel/linux/cmem.inc
@@ -24,6 +24,9 @@ CMEM_DEVICETREE_dra74x = "dra7-evm.dtb dra7-evm-lcd-lg.dtb dra7-evm-lcd-osd.dtb
 # Flag to enable CMEM injection
 RESERVE_CMEM ?= "0"
 
+# Need to patch main keystone dtsi files sram entry
+SRC_URI_append_keystone = "${@base_conditional("RESERVE_CMEM", "1", " file://0001-ARM-dts-keystone-Remove-reg-entry-from-the-sram-node.patch", "", d)}"
+
 # Add correct cmem.dtsi to SRC_URI for each variant for a given machine
 python() {
     old_overrides = d.getVar('OVERRIDES', False)
diff --git a/recipes-kernel/linux/files/0001-ARM-dts-keystone-Remove-reg-entry-from-the-sram-node.patch b/recipes-kernel/linux/files/0001-ARM-dts-keystone-Remove-reg-entry-from-the-sram-node.patch
new file mode 100644
index 0000000..1813986
--- /dev/null
+++ b/recipes-kernel/linux/files/0001-ARM-dts-keystone-Remove-reg-entry-from-the-sram-node.patch
@@ -0,0 +1,79 @@
+From c7e576590e45f9fb86a9d74fa66b4fd4f8eca803 Mon Sep 17 00:00:00 2001
+From: Sam Nelson <sam.nelson@ti.com>
+Date: Fri, 11 Nov 2016 10:32:48 -0500
+Subject: [PATCH] ARM: dts: keystone: Remove reg entry from the sram node
+
+Currently the reg entry reserves the whole MSMC ram range to be used
+only through the mmio-sram driver. (See LCPD-7801)
+
+Given that other modules (like CMEM) also currently reserve memory from
+MSMC, the reg entry which takes over the whole memory breaks those
+functionality. So currently recommending to remove this for now.
+Still the ranges entry will capture the total memory available.
+
+This will allow module like CMEM to reserve and use a non-overlapping
+section of memory not marked reserved by the sub nodes here.
+
+Resolves current issue with CMEM module reporting error allocating MSMC
+memory.
+
+Signed-off-by: Sam Nelson <sam.nelson@ti.com>
+Signed-off-by: Denys Dmytriyenko <denys@ti.com>
+---
+ arch/arm/boot/dts/keystone-k2e.dtsi  | 1 -
+ arch/arm/boot/dts/keystone-k2g.dtsi  | 1 -
+ arch/arm/boot/dts/keystone-k2hk.dtsi | 1 -
+ arch/arm/boot/dts/keystone-k2l.dtsi  | 1 -
+ 4 files changed, 4 deletions(-)
+
+diff --git a/arch/arm/boot/dts/keystone-k2e.dtsi b/arch/arm/boot/dts/keystone-k2e.dtsi
+index 553c423..5b9252a 100644
+--- a/arch/arm/boot/dts/keystone-k2e.dtsi
++++ b/arch/arm/boot/dts/keystone-k2e.dtsi
+@@ -98,7 +98,6 @@
+ 
+ 		msm_ram: msmram@0c000000 {
+ 			compatible = "mmio-sram";
+-			reg = <0x0c000000 0x200000>;
+ 			ranges = <0x0 0x0c000000 0x200000>;
+ 			#address-cells = <1>;
+ 			#size-cells = <1>;
+diff --git a/arch/arm/boot/dts/keystone-k2g.dtsi b/arch/arm/boot/dts/keystone-k2g.dtsi
+index 45faf40..e953d82 100644
+--- a/arch/arm/boot/dts/keystone-k2g.dtsi
++++ b/arch/arm/boot/dts/keystone-k2g.dtsi
+@@ -99,7 +99,6 @@
+ 
+ 		msm_ram: msmram@0c000000 {
+ 			compatible = "mmio-sram";
+-			reg = <0x0c000000 0x100000>;
+ 			ranges = <0x0 0x0c000000 0x100000>;
+ 			#address-cells = <1>;
+ 			#size-cells = <1>;
+diff --git a/arch/arm/boot/dts/keystone-k2hk.dtsi b/arch/arm/boot/dts/keystone-k2hk.dtsi
+index edca6aa..f3f1932 100644
+--- a/arch/arm/boot/dts/keystone-k2hk.dtsi
++++ b/arch/arm/boot/dts/keystone-k2hk.dtsi
+@@ -111,7 +111,6 @@
+ 
+ 		msm_ram: msmram@0c000000 {
+ 			compatible = "mmio-sram";
+-			reg = <0x0c000000 0x600000>;
+ 			ranges = <0x0 0x0c000000 0x600000>;
+ 			#address-cells = <1>;
+ 			#size-cells = <1>;
+diff --git a/arch/arm/boot/dts/keystone-k2l.dtsi b/arch/arm/boot/dts/keystone-k2l.dtsi
+index 76caff6..4ee7439 100644
+--- a/arch/arm/boot/dts/keystone-k2l.dtsi
++++ b/arch/arm/boot/dts/keystone-k2l.dtsi
+@@ -284,7 +284,6 @@
+ 
+ 		msm_ram: msmram@0c000000 {
+ 			compatible = "mmio-sram";
+-			reg = <0x0c000000 0x200000>;
+ 			ranges = <0x0 0x0c000000 0x200000>;
+ 			#address-cells = <1>;
+ 			#size-cells = <1>;
+-- 
+2.7.4
+



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

* Denys Dmytriyenko : linux/cmem: patch keystone dtsi files to co-exist with new sram driver
@ 2016-11-18 16:31 Arago Project git
  0 siblings, 0 replies; 2+ messages in thread
From: Arago Project git @ 2016-11-18 16:31 UTC (permalink / raw)
  To: meta-ti

Module: meta-ti
Branch: master
Commit: b9dbc83d7663d5517fd9cbcf4bb651e039f134a4
URL:    http://arago-project.org/git/meta-ti.git?a=commit;h=b9dbc83d7663d5517fd9cbcf4bb651e039f134a4

Author: Denys Dmytriyenko <denys@ti.com>
Date:   Fri Nov 18 03:08:02 2016 +0000

linux/cmem: patch keystone dtsi files to co-exist with new sram driver

Signed-off-by: Denys Dmytriyenko <denys@ti.com>

---

 recipes-kernel/linux/cmem.inc                      |    3 +
 ...stone-Remove-reg-entry-from-the-sram-node.patch |   79 ++++++++++++++++++++
 2 files changed, 82 insertions(+), 0 deletions(-)

diff --git a/recipes-kernel/linux/cmem.inc b/recipes-kernel/linux/cmem.inc
index d4edc60..649b59d 100644
--- a/recipes-kernel/linux/cmem.inc
+++ b/recipes-kernel/linux/cmem.inc
@@ -24,6 +24,9 @@ CMEM_DEVICETREE_dra74x = "dra7-evm.dtb dra7-evm-lcd-lg.dtb dra7-evm-lcd-osd.dtb
 # Flag to enable CMEM injection
 RESERVE_CMEM ?= "0"
 
+# Need to patch main keystone dtsi files sram entry
+SRC_URI_append_keystone = "${@base_conditional("RESERVE_CMEM", "1", " file://0001-ARM-dts-keystone-Remove-reg-entry-from-the-sram-node.patch", "", d)}"
+
 # Add correct cmem.dtsi to SRC_URI for each variant for a given machine
 python() {
     old_overrides = d.getVar('OVERRIDES', False)
diff --git a/recipes-kernel/linux/files/0001-ARM-dts-keystone-Remove-reg-entry-from-the-sram-node.patch b/recipes-kernel/linux/files/0001-ARM-dts-keystone-Remove-reg-entry-from-the-sram-node.patch
new file mode 100644
index 0000000..1813986
--- /dev/null
+++ b/recipes-kernel/linux/files/0001-ARM-dts-keystone-Remove-reg-entry-from-the-sram-node.patch
@@ -0,0 +1,79 @@
+From c7e576590e45f9fb86a9d74fa66b4fd4f8eca803 Mon Sep 17 00:00:00 2001
+From: Sam Nelson <sam.nelson@ti.com>
+Date: Fri, 11 Nov 2016 10:32:48 -0500
+Subject: [PATCH] ARM: dts: keystone: Remove reg entry from the sram node
+
+Currently the reg entry reserves the whole MSMC ram range to be used
+only through the mmio-sram driver. (See LCPD-7801)
+
+Given that other modules (like CMEM) also currently reserve memory from
+MSMC, the reg entry which takes over the whole memory breaks those
+functionality. So currently recommending to remove this for now.
+Still the ranges entry will capture the total memory available.
+
+This will allow module like CMEM to reserve and use a non-overlapping
+section of memory not marked reserved by the sub nodes here.
+
+Resolves current issue with CMEM module reporting error allocating MSMC
+memory.
+
+Signed-off-by: Sam Nelson <sam.nelson@ti.com>
+Signed-off-by: Denys Dmytriyenko <denys@ti.com>
+---
+ arch/arm/boot/dts/keystone-k2e.dtsi  | 1 -
+ arch/arm/boot/dts/keystone-k2g.dtsi  | 1 -
+ arch/arm/boot/dts/keystone-k2hk.dtsi | 1 -
+ arch/arm/boot/dts/keystone-k2l.dtsi  | 1 -
+ 4 files changed, 4 deletions(-)
+
+diff --git a/arch/arm/boot/dts/keystone-k2e.dtsi b/arch/arm/boot/dts/keystone-k2e.dtsi
+index 553c423..5b9252a 100644
+--- a/arch/arm/boot/dts/keystone-k2e.dtsi
++++ b/arch/arm/boot/dts/keystone-k2e.dtsi
+@@ -98,7 +98,6 @@
+ 
+ 		msm_ram: msmram@0c000000 {
+ 			compatible = "mmio-sram";
+-			reg = <0x0c000000 0x200000>;
+ 			ranges = <0x0 0x0c000000 0x200000>;
+ 			#address-cells = <1>;
+ 			#size-cells = <1>;
+diff --git a/arch/arm/boot/dts/keystone-k2g.dtsi b/arch/arm/boot/dts/keystone-k2g.dtsi
+index 45faf40..e953d82 100644
+--- a/arch/arm/boot/dts/keystone-k2g.dtsi
++++ b/arch/arm/boot/dts/keystone-k2g.dtsi
+@@ -99,7 +99,6 @@
+ 
+ 		msm_ram: msmram@0c000000 {
+ 			compatible = "mmio-sram";
+-			reg = <0x0c000000 0x100000>;
+ 			ranges = <0x0 0x0c000000 0x100000>;
+ 			#address-cells = <1>;
+ 			#size-cells = <1>;
+diff --git a/arch/arm/boot/dts/keystone-k2hk.dtsi b/arch/arm/boot/dts/keystone-k2hk.dtsi
+index edca6aa..f3f1932 100644
+--- a/arch/arm/boot/dts/keystone-k2hk.dtsi
++++ b/arch/arm/boot/dts/keystone-k2hk.dtsi
+@@ -111,7 +111,6 @@
+ 
+ 		msm_ram: msmram@0c000000 {
+ 			compatible = "mmio-sram";
+-			reg = <0x0c000000 0x600000>;
+ 			ranges = <0x0 0x0c000000 0x600000>;
+ 			#address-cells = <1>;
+ 			#size-cells = <1>;
+diff --git a/arch/arm/boot/dts/keystone-k2l.dtsi b/arch/arm/boot/dts/keystone-k2l.dtsi
+index 76caff6..4ee7439 100644
+--- a/arch/arm/boot/dts/keystone-k2l.dtsi
++++ b/arch/arm/boot/dts/keystone-k2l.dtsi
+@@ -284,7 +284,6 @@
+ 
+ 		msm_ram: msmram@0c000000 {
+ 			compatible = "mmio-sram";
+-			reg = <0x0c000000 0x200000>;
+ 			ranges = <0x0 0x0c000000 0x200000>;
+ 			#address-cells = <1>;
+ 			#size-cells = <1>;
+-- 
+2.7.4
+



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

end of thread, other threads:[~2016-11-18 16:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-18 16:31 Denys Dmytriyenko : linux/cmem: patch keystone dtsi files to co-exist with new sram driver Arago Project git
2016-11-18 16:31 Arago Project git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.