soc/mediatek: Move struct mtk_auxadc_regs to auxadc_common.h

The AUXADC register definitions are the same for all MediaTek SoCs, so
we move struct mtk_auxadc_regs to auxadc_common.h.

TEST=build pass.
BUG=b:233720142

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I48978a93137a7de42f8ea2873be3130cb8f534f3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66123
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
This commit is contained in:
Rex-BC Chen 2022-07-25 16:02:21 +08:00 committed by Paul Fagerburg
parent 8a039031dd
commit a8c9674c42
5 changed files with 11 additions and 44 deletions

View File

@ -3,6 +3,17 @@
#ifndef _MTK_ADC_COMMON_H
#define _MTK_ADC_COMMON_H
struct mtk_auxadc_regs {
uint32_t con0;
uint32_t con1;
uint32_t con1_set;
uint32_t con1_clr;
uint32_t con2;
uint32_t data[16];
uint32_t reserved[16];
uint32_t misc;
};
/* Return voltage in uVolt */
unsigned int auxadc_get_voltage_uv(unsigned int channel);
#endif

View File

@ -7,17 +7,6 @@
#include <soc/infracfg.h>
#include <stdint.h>
typedef struct mtk_auxadc_regs {
uint32_t con0;
uint32_t con1;
uint32_t con1_set;
uint32_t con1_clr;
uint32_t con2;
uint32_t data[16];
uint32_t reserved[16];
uint32_t misc;
} mtk_auxadc_regs;
static struct mt8183_infracfg_regs *const mtk_infracfg = mt8183_infracfg;
#endif

View File

@ -12,17 +12,6 @@
#include <soc/infracfg.h>
#include <stdint.h>
typedef struct mtk_auxadc_regs {
uint32_t con0;
uint32_t con1;
uint32_t con1_set;
uint32_t con1_clr;
uint32_t con2;
uint32_t data[16];
uint32_t reserved[16];
uint32_t misc;
} mtk_auxadc_regs;
static struct mt8186_infracfg_ao_regs *const mtk_infracfg = mt8186_infracfg_ao;
#endif

View File

@ -7,17 +7,6 @@
#include <soc/infracfg.h>
#include <stdint.h>
typedef struct mtk_auxadc_regs {
uint32_t con0;
uint32_t con1;
uint32_t con1_set;
uint32_t con1_clr;
uint32_t con2;
uint32_t data[16];
uint32_t reserved[16];
uint32_t misc;
} mtk_auxadc_regs;
static struct mt8192_infracfg_regs *const mtk_infracfg = mt8192_infracfg;
#endif

View File

@ -7,17 +7,6 @@
#include <soc/infracfg.h>
#include <stdint.h>
typedef struct mtk_auxadc_regs {
uint32_t con0;
uint32_t con1;
uint32_t con1_set;
uint32_t con1_clr;
uint32_t con2;
uint32_t data[16];
uint32_t reserved[16];
uint32_t misc;
} mtk_auxadc_regs;
static struct mt8195_infracfg_ao_regs *const mtk_infracfg = mt8195_infracfg_ao;
#endif