| /* |
| * Copyright (C) 2018 MediaTek Inc. |
| * |
| * This program is free software: you can redistribute it and/or modify |
| * it under the terms of the GNU General Public License version 2 as |
| * published by the Free Software Foundation. |
| * |
| * This program is distributed in the hope that it will be useful, |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| * GNU General Public License for more details. |
| */ |
| |
| #ifndef __PLF_INIT_H__ |
| #define __PLF_INIT_H__ |
| |
| #include <linux/module.h> |
| #include <linux/device.h> |
| #include <linux/miscdevice.h> |
| #include <linux/kallsyms.h> |
| |
| /* |
| * MET External Symbol |
| */ |
| extern struct miscdevice met_device; |
| |
| #ifdef MET_AP_EMI |
| #include <mtk_dramc.h> |
| extern unsigned int get_dram_data_rate(void); /* in Mhz */ |
| extern int get_ddr_type(void); |
| extern void *mt_cen_emi_base_get(void); |
| extern void *mt_chn_emi_base_get(void); |
| extern void *get_cur_ddr_ratio(void); |
| |
| /* New APIs for mt_dramc_nao base get */ |
| extern void *mt_dramc_nao_chn_base_get(int channel); |
| extern void *mt_ddrphy_chn_base_get(int channel); |
| extern void *mt_dramc_chn_base_get(int channel); |
| |
| extern unsigned int (*get_dram_data_rate_symbol)(void); /* in Mhz */ |
| extern unsigned int (*get_ddr_type_symbol)(void); /* in Mhz */ |
| |
| extern void *(*mt_cen_emi_base_get_symbol)(void); |
| extern void *(*mt_chn_emi_base_get_symbol)(int chn); |
| |
| /* New APIs for mt_dramc_nao base get */ |
| extern void *(*mt_dramc_nao_chn_base_get_symbol)(int channel); |
| extern void *(*mt_ddrphy_chn_base_get_symbol)(int channel); |
| extern void *(*mt_dramc_chn_base_get_symbol)(int channel); |
| |
| extern unsigned int (*get_cur_ddr_ratio_symbol)(void); |
| |
| #endif |
| |
| /* |
| * MET devices declaration |
| */ |
| |
| #ifdef MET_AP_EMI |
| extern struct metdevice met_emi; |
| extern struct metdevice met_sspm_emi; |
| #endif |
| |
| #endif /*__PLF_INIT_H__*/ |