mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-15 17:28:15 +00:00
83d290c56f
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
90 lines
1.6 KiB
C
90 lines
1.6 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (c) 2016 Google, Inc
|
|
*
|
|
* From Coreboot src/soc/intel/broadwell/include/soc/gpio.h
|
|
*/
|
|
|
|
#ifndef __ASM_ARCH_GPIO
|
|
#define __ASM_ARCH_GPIO
|
|
|
|
#define GPIO_PER_BANK 32
|
|
#define GPIO_BANKS 3
|
|
|
|
struct broadwell_bank_platdata {
|
|
uint16_t base_addr;
|
|
const char *bank_name;
|
|
int bank;
|
|
};
|
|
|
|
/* PCH-LP GPIOBASE Registers */
|
|
struct pch_lp_gpio_regs {
|
|
u32 own[GPIO_BANKS];
|
|
u32 reserved0;
|
|
|
|
u16 pirq_to_ioxapic;
|
|
u16 reserved1[3];
|
|
u32 blink;
|
|
u32 ser_blink;
|
|
|
|
u32 ser_blink_cmdsts;
|
|
u32 ser_blink_data;
|
|
u16 gpi_nmi_en;
|
|
u16 gpi_nmi_sts;
|
|
u32 reserved2;
|
|
|
|
u32 gpi_route[GPIO_BANKS];
|
|
u32 reserved3;
|
|
|
|
u32 reserved4[4];
|
|
|
|
u32 alt_gpi_smi_sts;
|
|
u32 alt_gpi_smi_en;
|
|
u32 reserved5[2];
|
|
|
|
u32 rst_sel[GPIO_BANKS];
|
|
u32 reserved6;
|
|
|
|
u32 reserved9[3];
|
|
u32 gpio_gc;
|
|
|
|
u32 gpi_is[GPIO_BANKS];
|
|
u32 reserved10;
|
|
|
|
u32 gpi_ie[GPIO_BANKS];
|
|
u32 reserved11;
|
|
|
|
u32 reserved12[24];
|
|
|
|
struct {
|
|
u32 conf_a;
|
|
u32 conf_b;
|
|
} config[GPIO_BANKS * GPIO_PER_BANK];
|
|
};
|
|
check_member(pch_lp_gpio_regs, gpi_ie[0], 0x90);
|
|
check_member(pch_lp_gpio_regs, config[0], 0x100);
|
|
|
|
enum {
|
|
CONFA_MODE_SHIFT = 0,
|
|
CONFA_MODE_GPIO = 1 << CONFA_MODE_SHIFT,
|
|
|
|
CONFA_DIR_SHIFT = 2,
|
|
CONFA_DIR_INPUT = 1 << CONFA_DIR_SHIFT,
|
|
|
|
CONFA_INVERT_SHIFT = 3,
|
|
CONFA_INVERT = 1 << CONFA_INVERT_SHIFT,
|
|
|
|
CONFA_TRIGGER_SHIFT = 4,
|
|
CONFA_TRIGGER_LEVEL = 1 << CONFA_TRIGGER_SHIFT,
|
|
|
|
CONFA_LEVEL_SHIFT = 30,
|
|
CONFA_LEVEL_HIGH = 1UL << CONFA_LEVEL_SHIFT,
|
|
|
|
CONFA_OUTPUT_SHIFT = 31,
|
|
CONFA_OUTPUT_HIGH = 1UL << CONFA_OUTPUT_SHIFT,
|
|
|
|
CONFB_SENSE_SHIFT = 2,
|
|
CONFB_SENSE_DISABLE = 1 << CONFB_SENSE_SHIFT,
|
|
};
|
|
|
|
#endif
|