soc/mediatek/common: Move GPIO definition to the common directory
To reduce duplicate gpio_base.h in each SoC folder, move gpio_base.h to mediatek/common folder. TEST=Build pass BUG=b:317009620 Change-Id: I815df8a3083cf04b821165ec834ca98ee71a0c78 Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83988 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yidi Lin <yidilin@google.com> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
This commit is contained in:
		@@ -1,7 +1,7 @@
 | 
			
		||||
/* SPDX-License-Identifier: GPL-2.0-only OR MIT */
 | 
			
		||||
 | 
			
		||||
#ifndef SOC_MEDIATEK_MT8195_GPIO_BASE_H
 | 
			
		||||
#define SOC_MEDIATEK_MT8195_GPIO_BASE_H
 | 
			
		||||
#ifndef SOC_MEDIATEK_COMMON_GPIO_BASE_H
 | 
			
		||||
#define SOC_MEDIATEK_COMMON_GPIO_BASE_H
 | 
			
		||||
 | 
			
		||||
#include <stdint.h>
 | 
			
		||||
 | 
			
		||||
@@ -1,11 +0,0 @@
 | 
			
		||||
/* SPDX-License-Identifier: GPL-2.0-only */
 | 
			
		||||
#ifndef SOC_MEDIATEK_MT8173_GPIO_BASE_H
 | 
			
		||||
#define SOC_MEDIATEK_MT8173_GPIO_BASE_H
 | 
			
		||||
 | 
			
		||||
#include <stdint.h>
 | 
			
		||||
 | 
			
		||||
typedef struct {
 | 
			
		||||
	u32 id;
 | 
			
		||||
} gpio_t;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
@@ -1,18 +0,0 @@
 | 
			
		||||
/* SPDX-License-Identifier: GPL-2.0-only */
 | 
			
		||||
#ifndef SOC_MEDIATEK_MT8183_GPIO_BASE_H
 | 
			
		||||
#define SOC_MEDIATEK_MT8183_GPIO_BASE_H
 | 
			
		||||
 | 
			
		||||
#include <stdint.h>
 | 
			
		||||
 | 
			
		||||
typedef union {
 | 
			
		||||
	u32 raw;
 | 
			
		||||
	struct {
 | 
			
		||||
		u32 id     : 8;
 | 
			
		||||
		u32 flag   : 3;
 | 
			
		||||
		u32 bit    : 5;
 | 
			
		||||
		u32 base   : 8;
 | 
			
		||||
		u32 offset : 8;
 | 
			
		||||
	};
 | 
			
		||||
} gpio_t;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
@@ -1,24 +0,0 @@
 | 
			
		||||
/* SPDX-License-Identifier: GPL-2.0-only */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * This file is created based on MT8186 Functional Specification
 | 
			
		||||
 * Chapter number: 5.1
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef SOC_MEDIATEK_MT8186_GPIO_BASE_H
 | 
			
		||||
#define SOC_MEDIATEK_MT8186_GPIO_BASE_H
 | 
			
		||||
 | 
			
		||||
#include <stdint.h>
 | 
			
		||||
 | 
			
		||||
typedef union {
 | 
			
		||||
	u32 raw;
 | 
			
		||||
	struct {
 | 
			
		||||
		u32 id     : 8;
 | 
			
		||||
		u32 flag   : 3;
 | 
			
		||||
		u32 bit    : 5;
 | 
			
		||||
		u32 base   : 8;
 | 
			
		||||
		u32 offset : 8;
 | 
			
		||||
	};
 | 
			
		||||
} gpio_t;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
@@ -1,24 +0,0 @@
 | 
			
		||||
/* SPDX-License-Identifier: GPL-2.0-only OR MIT */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * This file is created based on MT8188 Functional Specification
 | 
			
		||||
 * Chapter number: 5.2
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef SOC_MEDIATEK_MT8188_GPIO_BASE_H
 | 
			
		||||
#define SOC_MEDIATEK_MT8188_GPIO_BASE_H
 | 
			
		||||
 | 
			
		||||
#include <stdint.h>
 | 
			
		||||
 | 
			
		||||
typedef union {
 | 
			
		||||
	u32 raw;
 | 
			
		||||
	struct {
 | 
			
		||||
		u32 id     : 8;
 | 
			
		||||
		u32 flag   : 3;
 | 
			
		||||
		u32 bit    : 5;
 | 
			
		||||
		u32 base   : 8;
 | 
			
		||||
		u32 offset : 8;
 | 
			
		||||
	};
 | 
			
		||||
} gpio_t;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
@@ -1,19 +0,0 @@
 | 
			
		||||
/* SPDX-License-Identifier: GPL-2.0-only */
 | 
			
		||||
 | 
			
		||||
#ifndef SOC_MEDIATEK_MT8192_GPIO_BASE_H
 | 
			
		||||
#define SOC_MEDIATEK_MT8192_GPIO_BASE_H
 | 
			
		||||
 | 
			
		||||
#include <stdint.h>
 | 
			
		||||
 | 
			
		||||
typedef union {
 | 
			
		||||
	u32 raw;
 | 
			
		||||
	struct {
 | 
			
		||||
		u32 id     : 8;
 | 
			
		||||
		u32 flag   : 3;
 | 
			
		||||
		u32 bit    : 5;
 | 
			
		||||
		u32 base   : 8;
 | 
			
		||||
		u32 offset : 8;
 | 
			
		||||
	};
 | 
			
		||||
} gpio_t;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
		Reference in New Issue
	
	Block a user