Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions arch/arm/dts/shikra-cqs-evk-u-boot.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,53 @@
&{/soc@0/sram@c11e000} {
compatible = "qcom,shikra-imem", "syscon", "simple-mfd";
};

/* Keep the console and QUPFW storage paths in the SPL device tree. */
&gcc {
bootph-all;
};

&tlmm {
bootph-all;
};

&qup_uart0_default {
bootph-all;
};

&sdc1_state_on {
bootph-all;
};

&sdc1_state_off {
bootph-all;
};

&sdhc_1 {
bootph-all;
};

&qupv3_0 {
u-boot,qupfw-storage = <&sdhc_1>;
bootph-all;
};

&uart0 {
bootph-all;
};

&rpm {
bootph-all;

glink-edge {
bootph-all;

rpm-requests {
bootph-all;

clock-controller {
bootph-all;
};
};
};
};
22 changes: 21 additions & 1 deletion arch/arm/mach-snapdragon/mem_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@ static struct mm_region rbx_mem_map[2 * CONFIG_NR_DRAM_BANKS + 2] = { { 0 } };

struct mm_region *mem_map = rbx_mem_map;

#if defined(CONFIG_SPL_BUILD)
enum qcom_memmap_source qcom_memmap_source __section(".data") = 0;
#endif

/*
* SPL platforms whose pre-DRAM address map differs from the common Qualcomm
* map may override this hook.
*/
struct mm_region *__weak qcom_spl_mem_map(void)
{
return NULL;
}

static void build_mem_map(void)
{
int i, j;
Expand Down Expand Up @@ -96,10 +109,12 @@ static void build_mem_map(void)
#endif
}

#if !defined(CONFIG_SPL_BUILD)
u64 get_page_table_size(void)
{
return SZ_1M;
}
#endif

struct mem_resource_attrs {
fdt_addr_t start;
Expand Down Expand Up @@ -230,14 +245,19 @@ static void configure_reserved_memory(void)
*/
void enable_caches(void)
{
struct mm_region *spl_mem_map;
u64 tlb_addr = gd->arch.tlb_addr;
u64 tlb_size = gd->arch.tlb_size;
u64 pt_size;
ulong carveout_start;

gd->arch.tlb_fillptr = tlb_addr;

build_mem_map();
spl_mem_map = qcom_spl_mem_map();
if (spl_mem_map)
mem_map = spl_mem_map;
else
build_mem_map();

icache_enable();

Expand Down
4 changes: 4 additions & 0 deletions arch/arm/mach-snapdragon/qcom-priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

#include <stdbool.h>

struct mm_region;

/**
* enum qcom_boot_source - Track where we got loaded from.
* Used for capsule update logic.
Expand Down Expand Up @@ -40,4 +42,6 @@ static inline void qcom_configure_capsule_updates(void) {}

int qcom_parse_memory(const void *fdt, bool fdt_is_internal);

struct mm_region *qcom_spl_mem_map(void);

#endif /* __QCOM_PRIV_H__ */
3 changes: 3 additions & 0 deletions board/qualcomm/shikra/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# SPDX-License-Identifier: GPL-2.0

obj-$(CONFIG_SPL) := spl-shikra.o
18 changes: 18 additions & 0 deletions board/qualcomm/shikra/shikra-spl-wrap-elf.lds
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* SPDX-License-Identifier: GPL-2.0
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*/
PHDRS {
ptype PT_LOAD FLAGS(0x7);
}

ENTRY(_entry)

SECTIONS {
. = CONFIG_PLATFORM_ELFENTRY;
_entry = . ;
data : {
*(.data)
. = ALIGN(4);
} :ptype
}
Loading