File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -313,12 +313,25 @@ static void lk2nd_parse_device_node(const void *fdt)
313313#endif
314314}
315315
316+ #ifdef LK1ST_DTB
317+ INCFILE (lk1st_dtb , lk1st_dtb_size , LK1ST_DTB );
318+ #endif
319+
320+ static void * lk2nd_get_fdt (void )
321+ {
322+ #ifdef LK1ST_DTB
323+ return lk1st_dtb ;
324+ #else
325+ return (void * ) lk_boot_args [2 ];
326+ #endif
327+ }
328+
316329int lk2nd_fdt_parse_early_uart (void )
317330{
318331 int offset , len ;
319332 const uint32_t * val ;
333+ void * fdt = lk2nd_get_fdt ();
320334
321- void * fdt = (void * ) lk_boot_args [2 ];
322335 if (!fdt || dev_tree_check_header (fdt ))
323336 return -1 ; // Will be reported later again. Hopefully.
324337
@@ -335,7 +348,7 @@ int lk2nd_fdt_parse_early_uart(void)
335348
336349static void lk2nd_fdt_parse (void )
337350{
338- void * fdt = ( void * ) lk_boot_args [ 2 ] ;
351+ void * fdt = lk2nd_get_fdt () ;
339352 if (!fdt )
340353 return ;
341354
Original file line number Diff line number Diff line change @@ -22,6 +22,12 @@ MODULES += lk2nd/smp
2222DEFINES += SMP_SPIN_TABLE_BASE=$(SMP_SPIN_TABLE_BASE )
2323endif
2424
25+ ifneq ($(LK1ST_DTB ) ,)
26+ LK1ST_DTB_PATH := dts/$(TARGET ) /$(LK1ST_DTB ) .dtb
27+ $(BUILDDIR ) /$(LOCAL_DIR ) /lk2nd-device.o : $(BUILDDIR ) /$(LK1ST_DTB_PATH )
28+ CFLAGS += -DLK1ST_DTB=\"$(LK1ST_DTB_PATH ) \"
29+ endif
30+
2531ifneq ($(LK1ST_PANEL ) ,)
2632# Filter out original panel implementation
2733OBJS := $(filter-out target/$(TARGET ) /oem_panel.o, $(OBJS ) )
You can’t perform that action at this time.
0 commit comments