rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (C) 2018 MediaTek Inc. |
| 3 | * |
| 4 | * This program is free software: you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License version 2 as |
| 6 | * published by the Free Software Foundation. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | */ |
| 13 | |
| 14 | #include <linux/kernel.h> |
| 15 | //#include <linux/module.h> |
| 16 | #include <linux/string.h> |
| 17 | |
| 18 | #include "mtk_dramc.h" |
| 19 | #include "met_ddr.h" |
| 20 | |
| 21 | int met_check_ddr_type(unsigned int DRAM_TYPE) |
| 22 | { |
| 23 | switch (DRAM_TYPE) { |
| 24 | case TYPE_PCDDR3: |
| 25 | case TYPE_LPDDR3: |
| 26 | return MET_DDRTYPE_DDR3; |
| 27 | case TYPE_PCDDR4: |
| 28 | case TYPE_LPDDR4: |
| 29 | case TYPE_LPDDR4X: |
| 30 | case TYPE_LPDDR4P: |
| 31 | return MET_DDRTYPE_DDR4; |
| 32 | } |
| 33 | return MET_DDRTYPE_UNKNOWN; |
| 34 | } |