xref: /aosp_15_r20/external/coreboot/src/southbridge/intel/lynxpoint/hsio/hsio.h (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #ifndef SOUTHBRIDGE_INTEL_LYNXPOINT_HSIO_H
4 #define SOUTHBRIDGE_INTEL_LYNXPOINT_HSIO_H
5 
6 #include <southbridge/intel/lynxpoint/iobp.h>
7 #include <types.h>
8 
9 struct hsio_table_row {
10 	uint32_t addr;
11 	uint32_t and;
12 	uint32_t or;
13 };
14 
hsio_update(const uint32_t addr,const uint32_t and,const uint32_t or)15 static inline void hsio_update(const uint32_t addr, const uint32_t and, const uint32_t or)
16 {
17 	pch_iobp_update(addr, and, or);
18 }
19 
hsio_update_row(const struct hsio_table_row row)20 static inline void hsio_update_row(const struct hsio_table_row row)
21 {
22 	hsio_update(row.addr, row.and, row.or);
23 }
24 
25 void hsio_xhci_shared_update(const uint32_t addr, const uint32_t and, const uint32_t or);
26 void hsio_sata_shared_update(const uint32_t addr, const uint32_t and, const uint32_t or);
27 
hsio_sata_shared_update_row(const struct hsio_table_row row)28 static inline void hsio_sata_shared_update_row(const struct hsio_table_row row)
29 {
30 	hsio_sata_shared_update(row.addr, row.and, row.or);
31 }
32 
hsio_xhci_shared_update_row(const struct hsio_table_row row)33 static inline void hsio_xhci_shared_update_row(const struct hsio_table_row row)
34 {
35 	hsio_xhci_shared_update(row.addr, row.and, row.or);
36 }
37 
38 void program_hsio_sata_lpt_h_cx(const bool is_mobile);
39 void program_hsio_xhci_lpt_h_cx(void);
40 void program_hsio_igbe_lpt_h_cx(void);
41 
42 void program_hsio_sata_lpt_lp_bx(const bool is_mobile);
43 void program_hsio_xhci_lpt_lp_bx(void);
44 void program_hsio_igbe_lpt_lp_bx(void);
45 
46 #endif
47