OpenBIC
OpenSource Bridge-IC
hal_jtag.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef HAL_JTAG_H
18#define HAL_JTAG_H
19
20#include <drivers/jtag.h>
21
39};
40
42
43struct jtag_xfer {
44 uint8_t op; // Operation type, e.g. ir, dr
45 int length;
46 uint8_t tdi[512];
47 uint16_t tdi_bits;
48 uint8_t tdo[512];
49 uint16_t tdo_bits;
51} __attribute__((__packed__));
52
53void jtag_set_tap(uint8_t data, uint8_t bitlength);
54void jtag_shift_data(struct jtag_xfer *xfer);
55void jtag_tck_cycle(uint8_t cycle);
56
57#endif
void jtag_tck_cycle(uint8_t cycle)
Definition: hal_jtag.c:41
struct jtag_xfer __attribute__((__packed__))
Definition: hal_i2c_target.h:28
void jtag_set_tap(uint8_t data, uint8_t bitlength)
Definition: hal_jtag.c:52
JTAG_OP
Definition: hal_jtag.h:41
@ JTAG_OP_IR
Definition: hal_jtag.h:41
@ JTAG_OP_DR
Definition: hal_jtag.h:41
bmc_jtag_endstate
Definition: hal_jtag.h:22
@ JTAG_STATE_SHIFTIR
Definition: hal_jtag.h:34
@ JTAG_STATE_IDLE
Definition: hal_jtag.h:24
@ JTAG_STATE_SELECTIR
Definition: hal_jtag.h:32
@ JTAG_STATE_PAUSEDR
Definition: hal_jtag.h:29
@ JTAG_STATE_SELECTDR
Definition: hal_jtag.h:25
@ JTAG_STATE_CAPTUREDR
Definition: hal_jtag.h:26
@ JTAG_STATE_SHIFTDR
Definition: hal_jtag.h:27
@ JTAG_STATE_EXIT1DR
Definition: hal_jtag.h:28
@ JTAG_STATE_UPDATEIR
Definition: hal_jtag.h:38
@ JTAG_STATE_TLRESET
Definition: hal_jtag.h:23
@ JTAG_STATE_EXIT2IR
Definition: hal_jtag.h:37
@ JTAG_STATE_EXIT2DR
Definition: hal_jtag.h:30
@ JTAG_STATE_CAPTUREIR
Definition: hal_jtag.h:33
@ JTAG_STATE_UPDATEDR
Definition: hal_jtag.h:31
@ JTAG_STATE_EXIT1IR
Definition: hal_jtag.h:35
@ JTAG_STATE_PAUSEIR
Definition: hal_jtag.h:36
void jtag_shift_data(struct jtag_xfer *xfer)
Definition: hal_jtag.c:90
uint8_t data[]
Definition: isl69259.c:2
Definition: hal_jtag.h:43
uint16_t tdi_bits
Definition: hal_jtag.h:47
uint8_t tdi[512]
Definition: hal_jtag.h:46
uint8_t tdo[512]
Definition: hal_jtag.h:48
uint8_t end_tap_state
Definition: hal_jtag.h:50
uint8_t op
Definition: hal_jtag.h:44
uint16_t tdo_bits
Definition: hal_jtag.h:49
int length
Definition: hal_jtag.h:45