File: xscom.h

package info (click to toggle)
skiboot 6.7.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 35,060 kB
  • sloc: ansic: 214,818; sh: 11,529; python: 3,418; cpp: 3,135; makefile: 1,773; perl: 1,479; asm: 1,445; tcl: 1,147; pascal: 107
file content (26 lines) | stat: -rw-r--r-- 701 bytes parent folder | download | duplicates (8)
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
// SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
/* Copyright 2014-2017 IBM Corp.
 */

#ifndef __XSCOM_H
#define __XSCOM_H

#include <stdint.h>

extern int xscom_read(uint32_t chip_id, uint64_t addr, uint64_t *val);
extern int xscom_write(uint32_t chip_id, uint64_t addr, uint64_t val);

extern int xscom_read_ex(uint32_t ex_target_id, uint64_t addr, uint64_t *val);
extern int xscom_write_ex(uint32_t ex_target_id, uint64_t addr, uint64_t val);

extern void xscom_for_each_chip(void (*cb)(uint32_t chip_id));

extern bool xscom_readable(uint64_t addr);

extern uint32_t xscom_init(void);

#ifndef PPC_BIT
#define PPC_BIT(bit)		(0x8000000000000000UL >> (bit))
#endif

#endif /* __XSCOM_H */