summaryrefslogtreecommitdiff
path: root/src/soc/mediatek/mt8196/memory.c
blob: 2689e5a6c32fc4364737f9a97d97d692d852e5d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* SPDX-License-Identifier: GPL-2.0-only */

#include <stdint.h>
#include <commonlib/bsd/mem_chip_info.h>
#include <soc/emi.h>

enum mem_chip_type map_to_lpddr_dram_type(uint16_t lpddr_type)
{
	switch (lpddr_type) {
	case TYPE_LPDDR4X:
		return MEM_CHIP_LPDDR4X;
	case TYPE_LPDDR5:
		return MEM_CHIP_LPDDR5;
	case TYPE_LPDDR5X:
		return MEM_CHIP_LPDDR5X;
	default:
		return MEM_CHIP_UNDEFINED;
	}
}