blob: 02e4e3bb368b8c5872d78b2769b645e97b05918a (
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
47
48
49
50
51
52
53
54
55
56
57
|
/*
* SWD_UpperPacketLayer.h
* Cypress CapSense FW download upper packet layer interface.
* Supported parts include:
* CY8C40XXX
*
* Copyright (C) 2012-2013 Cypress Semiconductor, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2, and only version 2, as published by the
* Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Contact Cypress Semiconductor at www.cypress.com <ttdrivers@cypress.com>
*
*/
#ifndef __SWD_UPPERPACKETLAYER_H
#define __SWD_UPPERPACKETLAYER_H
#include <linux/slab.h>
/******************************************************************************
* Constant definitions
******************************************************************************/
/* Macro Definitions for Debug and Access Port registers read and write Commands
used in the functions defined in UpperPacketLayer.c */
#define DPACC_DP_CTRLSTAT_READ 0x8D
#define DPACC_DP_IDCODE_READ 0xA5
#define DPACC_AP_CSW_READ 0x87
#define DPACC_AP_TAR_READ 0xAF
#define DPACC_AP_DRW_READ 0x9F
#define DPACC_DP_CTRLSTAT_WRITE 0xA9
#define DPACC_DP_SELECT_WRITE 0xB1
#define DPACC_AP_CSW_WRITE 0xA3
#define DPACC_AP_TAR_WRITE 0x8B
#define DPACC_AP_DRW_WRITE 0xBB
/******************************************************************************
* Function Prototypes
******************************************************************************/
void Read_DAP(u8 swd_DAP_Register, u32 *data_32);
void Write_DAP(u8 swd_DAP_Register, u32 data_32);
u8 Read_IO(u32 addr_32, u32 *data_32);
u8 Write_IO(u32 addr_32, u32 data_32);
#endif /* __SWD_UPPERPACKETLAYER_H */
/* [] END OF FILE */
|