summaryrefslogtreecommitdiff
path: root/src/southbridge/intel/lynxpoint/hsio/hsio.h
blob: 689ef4a05b016b3de3eb0df4c367ad49c980fa81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/* SPDX-License-Identifier: GPL-2.0-or-later */

#ifndef SOUTHBRIDGE_INTEL_LYNXPOINT_HSIO_H
#define SOUTHBRIDGE_INTEL_LYNXPOINT_HSIO_H

#include <southbridge/intel/lynxpoint/iobp.h>
#include <types.h>

struct hsio_table_row {
	uint32_t addr;
	uint32_t and;
	uint32_t or;
};

static inline void hsio_update(const uint32_t addr, const uint32_t and, const uint32_t or)
{
	pch_iobp_update(addr, and, or);
}

static inline void hsio_update_row(const struct hsio_table_row row)
{
	hsio_update(row.addr, row.and, row.or);
}

void hsio_xhci_shared_update(const uint32_t addr, const uint32_t and, const uint32_t or);
void hsio_sata_shared_update(const uint32_t addr, const uint32_t and, const uint32_t or);

static inline void hsio_sata_shared_update_row(const struct hsio_table_row row)
{
	hsio_sata_shared_update(row.addr, row.and, row.or);
}

static inline void hsio_xhci_shared_update_row(const struct hsio_table_row row)
{
	hsio_xhci_shared_update(row.addr, row.and, row.or);
}

void program_hsio_sata_lpt_h_cx(const bool is_mobile);
void program_hsio_xhci_lpt_h_cx(void);
void program_hsio_igbe_lpt_h_cx(void);

void program_hsio_sata_lpt_lp_bx(const bool is_mobile);
void program_hsio_xhci_lpt_lp_bx(void);
void program_hsio_igbe_lpt_lp_bx(void);

#endif