mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
mach-qcom: add support to populate dt nodes for 32-bit platforms
Add support to populate device tree nodes for the new 32-bit platforms under under mach-qcom. Change-Id: I5fd747de84917c16f28f3f72d7b34b5db157637c Signed-off-by: Srinivas Ramana <sramana@codeaurora.org> Signed-off-by: Tengfei Fan <tengfeif@codeaurora.org> Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
This commit is contained in:
parent
f69d3db037
commit
de3e3d848b
3 changed files with 30 additions and 0 deletions
|
|
@ -1,2 +1,3 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
obj-$(CONFIG_SMP) += platsmp.o
|
||||
obj-$(CONFIG_USE_OF) += board-dt.o
|
||||
|
|
|
|||
21
arch/arm/mach-qcom/board-dt.c
Normal file
21
arch/arm/mach-qcom/board-dt.c
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_fdt.h>
|
||||
|
||||
#include "board-dt.h"
|
||||
|
||||
void __init board_dt_populate(struct of_dev_auxdata *adata)
|
||||
{
|
||||
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
|
||||
|
||||
/* Explicitly parent the /soc devices to the root node to preserve
|
||||
* the kernel ABI (sysfs structure, etc) until userspace is updated
|
||||
*/
|
||||
of_platform_populate(of_find_node_by_path("/soc"),
|
||||
of_default_bus_match_table, adata, NULL);
|
||||
}
|
||||
8
arch/arm/mach-qcom/board-dt.h
Normal file
8
arch/arm/mach-qcom/board-dt.h
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/of_platform.h>
|
||||
|
||||
void __init board_dt_populate(struct of_dev_auxdata *adata);
|
||||
Loading…
Reference in a new issue