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> |
Ravi Kumar Bokka | ce97bca | 2021-03-05 16:01:07 +0530 | [diff] [blame] | 5 | #include <soc/symbols_common.h> |
mkurumel | a9d225b | 2020-09-14 23:28:53 +0530 | [diff] [blame] | 6 | #include <device/mmio.h> |
mkurumel | a9d225b | 2020-09-14 23:28:53 +0530 | [diff] [blame] | 7 | |
| 8 | #define MODEM_ID_LTE 0x004c5445 |
| 9 | #define MODEM_ID_WIFI 0x57494649 |
| 10 | |
| 11 | bool soc_modem_carve_out(void **start, void **end) |
| 12 | { |
| 13 | uint32_t modem_id = read32(_modem_id); |
| 14 | |
| 15 | switch (modem_id) { |
| 16 | case MODEM_ID_LTE: |
| 17 | *start = _dram_modem_wifi_only; |
| 18 | *end = _edram_modem_extra; |
| 19 | return true; |
| 20 | case MODEM_ID_WIFI: |
| 21 | *start = _dram_modem_wifi_only; |
| 22 | *end = _edram_modem_wifi_only; |
| 23 | return true; |
| 24 | default: |
| 25 | return false; |
| 26 | } |
| 27 | } |