mkurumel | a9d225b | 2020-09-14 23:28:53 +0530 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #include <arch/stages.h> |
| 4 | #include <soc/mmu_common.h> |
| 5 | #include <soc/symbols.h> |
| 6 | #include <device/mmio.h> |
| 7 | #include <string.h> |
| 8 | |
| 9 | #define MODEM_ID_LTE 0x004c5445 |
| 10 | #define MODEM_ID_WIFI 0x57494649 |
| 11 | |
| 12 | bool soc_modem_carve_out(void **start, void **end) |
| 13 | { |
| 14 | uint32_t modem_id = read32(_modem_id); |
| 15 | |
| 16 | switch (modem_id) { |
| 17 | case MODEM_ID_LTE: |
| 18 | *start = _dram_modem_wifi_only; |
| 19 | *end = _edram_modem_extra; |
| 20 | return true; |
| 21 | case MODEM_ID_WIFI: |
| 22 | *start = _dram_modem_wifi_only; |
| 23 | *end = _edram_modem_wifi_only; |
| 24 | return true; |
| 25 | default: |
| 26 | return false; |
| 27 | } |
| 28 | } |