Skip to contentSkip to conversation

snapdragon: Add DRAM detection & FDT fixup

PATCH New Ramon Fried 2 participants 4 messages Jul 31, 2018 – Aug 11, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 snapdragon: Add DRAM detection & FDT fixup

Fixup the Linux FDT with the detection of onboard DRAM as provided by SBL (Secondary boot loader) by reading the shared-memory region.

---
v2: fixed compiler warning introduced because missing include

 arch/arm/mach-snapdragon/Makefile            |  1 +
 arch/arm/mach-snapdragon/dram.c              | 98 ++++++++++++++++++++
 arch/arm/mach-snapdragon/include/mach/dram.h | 12 +++
 3 files changed, 111 insertions(+)
 create mode 100644 arch/arm/mach-snapdragon/dram.c
 create mode 100644 arch/arm/mach-snapdragon/include/mach/dram.h
arch/arm/mach-snapdragon/Makefile +1 -0
index 1d35fea912..f375d07d03 100644
@@ -9,3 +9,4 @@ obj-$(CONFIG_TARGET_DRAGONBOARD410C) += sysmap-apq8016.o
 obj-$(CONFIG_TARGET_DRAGONBOARD410C) += pinctrl-apq8016.o
 obj-$(CONFIG_TARGET_DRAGONBOARD410C) += pinctrl-snapdragon.o
 obj-y += clock-snapdragon.o
+obj-y += dram.o
arch/arm/mach-snapdragon/dram.c new file +98 -0

98 lines not on this page · raw message

arch/arm/mach-snapdragon/include/mach/dram.h new file +12 -0
new file mode 100644
index 0000000000..0a9eedda41
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Snapdragon DRAM
+ * Copyright (C) 2018 Ramon Fried <[email protected]>
+ */
+
+#ifndef DRAM_H
+#define DRAM_H
+
+int msm_fixup_memory(void *blob);
+
+#endif
Signature · 1 line
2.18.0
#1 lore raw

PATCH v2 2/2 db410c: Fixup DRAM

Call the MSM DRAM detection and fixup function to support dynamic detection of onboard memory.

---
v2: fixed compiler warning introduced because missing include

 board/qualcomm/dragonboard410c/dragonboard410c.c | 3 +++
 1 file changed, 3 insertions(+)
board/qualcomm/dragonboard410c/dragonboard410c.c +3 -0
index e7ead57f0d..4f0b999e50 100644
@@ -10,6 +10,7 @@
 #include <usb.h>
 #include <asm/gpio.h>
 #include <fdt_support.h>
+#include <asm/arch/dram.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -180,6 +181,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 					   fix[i].property, mac, ARP_HLEN, 1);
 	}
 
+	msm_fixup_memory(blob);
+
 	return 0;
 }
 
Signature · 1 line
2.18.0
#2 lore raw

PATCH v2 2/2 db410c: Fixup DRAM

Quoted 4 lines · Ramon Fried

Call the MSM DRAM detection and fixup function to support dynamic detection of onboard memory.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180810/2285191c/attachment.sig>
#3 lore raw

PATCH v2 1/2 snapdragon: Add DRAM detection & FDT fixup

In reply to Ramon Fried
Quoted 5 lines · Ramon Fried

Fixup the Linux FDT with the detection of onboard DRAM as provided by SBL (Secondary boot loader) by reading the shared-memory region.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180810/82833564/attachment.sig>