summaryrefslogtreecommitdiff
path: root/src/soc/qualcomm/sc7180/carve_out.c
blob: e129005c12a2de92127298f0a8c14db35c563f49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* SPDX-License-Identifier: GPL-2.0-only */

#include <arch/stages.h>
#include <soc/mmu_common.h>
#include <soc/symbols_common.h>
#include <device/mmio.h>

#define MODEM_ID_LTE 0x004c5445
#define MODEM_ID_WIFI 0x57494649

bool soc_modem_carve_out(void **start, void **end)
{
	uint32_t modem_id = read32(_modem_id);

	switch (modem_id) {
	case MODEM_ID_LTE:
		*start = _dram_modem_wifi_only;
		*end = _edram_modem_extra;
		return true;
	case MODEM_ID_WIFI:
		*start = _dram_modem_wifi_only;
		*end = _edram_modem_wifi_only;
		return true;
	default:
		return false;
	}
}