Skip to content

Commit

Permalink
lk2nd: device: dts: Include model in all lk2nd device DTs
Browse files Browse the repository at this point in the history
It looks like there are more and more SoCs that crash in some cases if the
model is missing in the DT. To avoid potential trouble caused by this,
include the model in all the lk2nd device DTs.

Set it to the DTB name, so it actually has some value (can use it to check
which DTB was selected).
  • Loading branch information
stephan-gh committed Sep 19, 2024
1 parent 9929766 commit 8226cb8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 1 addition & 4 deletions lk2nd/device/dts/lk2nd.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include <dt-bindings/arm/qcom,ids.h>
#include <dt-bindings/lk2nd/gpio.h>
#include <dt-bindings/lk2nd/key-codes.h>
#include <config.h>

/ {
/*
Expand All @@ -11,9 +10,7 @@
* This is a hack to include the model property in all device trees
* of affected platforms.
*/
#if defined TARGET_MSM8952 || defined TARGET_MSM8953
model = "";
#endif
model = _DTB_NAME_;

lk2nd: lk2nd { };

Expand Down
1 change: 1 addition & 0 deletions make/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@ $(BUILDDIR)/%.dtb: %.dts
@$(MKDIR)
@echo compiling $<
$(NOECHO)$(TOOLCHAIN_PREFIX)cpp -nostdinc -undef -x assembler-with-cpp \
-D_DTB_NAME_=\"$(basename $(notdir $<))\" \
$(DT_INCLUDES) $< -MD -MT $@ -MF $@.d -o $@.dts
$(NOECHO)dtc -O dtb -I dts --align 16 -o $@ $@.dts

0 comments on commit 8226cb8

Please sign in to comment.