summaryrefslogtreecommitdiff
path: root/src/soc/qualcomm/sc7180/carve_out.c
blob: 960b923bcc755c0453d4fa048b2319dc1e16062f (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
28
/* SPDX-License-Identifier: GPL-2.0-only */

#include <arch/stages.h>
#include <soc/mmu_common.h>
#include <soc/symbols.h>
#include <device/mmio.h>
#include <string.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;
	}
}