]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blame - drivers/staging/media/atomisp/include/asm/intel_mid_pcihelpers.h
Merge remote-tracking branches 'asoc/topic/ac97', 'asoc/topic/ac97-mfd', 'asoc/topic...
[mirror_ubuntu-focal-kernel.git] / drivers / staging / media / atomisp / include / asm / intel_mid_pcihelpers.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
a49d2536
AC
2/*
3 * Access to message bus through three registers
4 * in CUNIT(0:0:0) PCI configuration space.
5 * MSGBUS_CTRL_REG(0xD0):
6 * 31:24 = message bus opcode
7 * 23:16 = message bus port
8 * 15:8 = message bus address, low 8 bits.
9 * 7:4 = message bus byte enables
10 * MSGBUS_CTRL_EXT_REG(0xD8):
11 * 31:8 = message bus address, high 24 bits.
12 * MSGBUS_DATA_REG(0xD4):
13 * hold the data for write or read
14 */
15#define PCI_ROOT_MSGBUS_CTRL_REG 0xD0
16#define PCI_ROOT_MSGBUS_DATA_REG 0xD4
17#define PCI_ROOT_MSGBUS_CTRL_EXT_REG 0xD8
18#define PCI_ROOT_MSGBUS_READ 0x10
19#define PCI_ROOT_MSGBUS_WRITE 0x11
20#define PCI_ROOT_MSGBUS_DWORD_ENABLE 0xf0
21
22/* In BYT platform for all internal PCI devices d3 delay
23 * of 3 ms is sufficient. Default value of 10 ms is overkill.
24 */
25#define INTERNAL_PCI_PM_D3_WAIT 3
26
27#define ISP_SUB_CLASS 0x80
28#define SUB_CLASS_MASK 0xFF00
29
30u32 intel_mid_msgbus_read32_raw(u32 cmd);
31u32 intel_mid_msgbus_read32(u8 port, u32 addr);
32void intel_mid_msgbus_write32_raw(u32 cmd, u32 data);
33void intel_mid_msgbus_write32(u8 port, u32 addr, u32 data);
34u32 intel_mid_msgbus_read32_raw_ext(u32 cmd, u32 cmd_ext);
35void intel_mid_msgbus_write32_raw_ext(u32 cmd, u32 cmd_ext, u32 data);
36u32 intel_mid_soc_stepping(void);
37int intel_mid_dw_i2c_acquire_ownership(void);
38int intel_mid_dw_i2c_release_ownership(void);