snapdragon: Add DRAM detection & FDT fixup
Subsystems (2)
PATCH 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.
--- arch/arm/mach-snapdragon/Makefile | 1 + arch/arm/mach-snapdragon/dram.c | 97 ++++++++++++++++++++ arch/arm/mach-snapdragon/include/mach/dram.h | 12 +++ 3 files changed, 110 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
@@ -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 +97 -0
97 lines not on this page · raw message
arch/arm/mach-snapdragon/include/mach/dram.h new file +12 -0
@@ -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
PATCH 2/2 db410c: Fixup DRAM
Call the MSM DRAM detection and fixup function to support dynamic detection of onboard memory.
--- board/qualcomm/dragonboard410c/dragonboard410c.c | 2 ++ 1 file changed, 2 insertions(+)
board/qualcomm/dragonboard410c/dragonboard410c.c +2 -0
@@ -169,6 +169,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
PATCH 1/2 snapdragon: Add DRAM detection & FDT fixup
In reply to Ramon FriedQuoted 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.
Signed-off-by Ramon Fried <[email protected]>
This breaks 820c and adds a warning on 410c (this is with 2/2 applied as well):
aarch64: + dragonboard820c dragonboard410c
+(dragonboard820c,dragonboard410c) ret = fdt_fixup_memory_banks(blob, bank_start, bank_size, count);
+(dragonboard820c,dragonboard410c) ^~~~~~~~~~~~~~~~~~~~~~
+(dragonboard820c,dragonboard410c) msm_fixup_memory
+(dragonboard410c) msm_fixup_memory(blob); +(dragonboard410c) ^~~~~~~~~~~~~~~~ +(dragonboard410c) fdt_fixup_memory
w+(dragonboard820c,dragonboard410c) ../arch/arm/mach-snapdragon/dram.c: In function 'msm_fixup_memory':
w+(dragonboard820c,dragonboard410c) ../arch/arm/mach-snapdragon/dram.c:91:8: warning: implicit declaration of function 'fdt_fixup_memory_banks'; did you mean 'msm_fixup_memory'? [-Wimplicit-function-declaration] w+(dragonboard410c) ../board/qualcomm/dragonboard410c/dragonboard410c.c: In function 'ft_board_setup':
w+(dragonboard410c) ../board/qualcomm/dragonboard410c/dragonboard410c.c:183:2: warning: implicit declaration of function 'msm_fixup_memory'; did you mean 'fdt_fixup_memory'? [-Wimplicit-function-declaration]
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/20180730/e8dd13de/attachment.sig>
PATCH 1/2 snapdragon: Add DRAM detection & FDT fixup
Quoted 23 lines · Tom Rini
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.
Signed-off-by Ramon Fried <[email protected]>This breaks 820c and adds a warning on 410c (this is with 2/2 applied as well):
aarch64: + dragonboard820c dragonboard410c
+(dragonboard820c,dragonboard410c) ret = fdt_fixup_memory_banks(blob,bank_start,bank_size, count);(quoted diff) +5
-0+(dragonboard820c,dragonboard410c) ^~~~~~~~~~~~~~~~~~~~~~ +(dragonboard820c,dragonboard410c) msm_fixup_memory +(dragonboard410c) msm_fixup_memory(blob); +(dragonboard410c) ^~~~~~~~~~~~~~~~ +(dragonboard410c) fdt_fixup_memoryw+(dragonboard820c,dragonboard410c)
../arch/arm/mach-snapdragon/dram.c:
In function 'msm_fixup_memory':
w+(dragonboard820c,dragonboard410c)../arch/arm/mach-snapdragon/dram.c:91:8: warning: implicit declaration of function 'fdt_fixup_memory_banks'; did you mean 'msm_fixup_memory'?
Quoted 8 lines
[-Wimplicit-function-declaration]
w+(dragonboard410c)../board/qualcomm/dragonboard410c/dragonboard410c.c: In function 'ft_board_setup':
w+(dragonboard410c)../board/qualcomm/dragonboard410c/dragonboard410c.c:183:2: warning:
implicit declaration of function 'msm_fixup_memory'; did you mean 'fdt_fixup_memory'? [-Wimplicit-function-declaration]
Thanks Tom.
Strange. I don't recall it introduced warning message. Will look into it in the evening.
Signature · 1 line
Sent from my Android device with K-9 Mail. Please excuse my brevity.
PATCH 1/2 snapdragon: Add DRAM detection & FDT fixup
Quoted 38 lines · Ramon Fried
Quoted 23 lines · Tom Rini
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.
Signed-off-by Ramon Fried <[email protected]>This breaks 820c and adds a warning on 410c (this is with 2/2 applied as well):
aarch64: + dragonboard820c dragonboard410c
+(dragonboard820c,dragonboard410c) ret = fdt_fixup_memory_banks(blob,bank_start,bank_size, count);(quoted diff) +5
-0+(dragonboard820c,dragonboard410c) ^~~~~~~~~~~~~~~~~~~~~~ +(dragonboard820c,dragonboard410c) msm_fixup_memory +(dragonboard410c) msm_fixup_memory(blob); +(dragonboard410c) ^~~~~~~~~~~~~~~~ +(dragonboard410c) fdt_fixup_memoryw+(dragonboard820c,dragonboard410c)
../arch/arm/mach-snapdragon/dram.c:
In function 'msm_fixup_memory':
w+(dragonboard820c,dragonboard410c)../arch/arm/mach-snapdragon/dram.c:91:8: warning: implicit declaration of function 'fdt_fixup_memory_banks'; did you mean 'msm_fixup_memory'?Quoted 8 lines
[-Wimplicit-function-declaration]
w+(dragonboard410c)../board/qualcomm/dragonboard410c/dragonboard410c.c: In function 'ft_board_setup':
w+(dragonboard410c)../board/qualcomm/dragonboard410c/dragonboard410c.c:183:2: warning:
implicit declaration of function 'msm_fixup_memory'; did you mean 'fdt_fixup_memory'? [-Wimplicit-function-declaration]Thanks Tom.
Strange. I don't recall it introduced warning message. Will look into it in the evening.
Quoted 1 line
Well. you're right, sorry for the problem. resent the patches with the fix.
Thanks,
Ramon.
Quoted 3 lines
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.