Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert #994 "Merge up to b9f5262d42f00c563750bfacea97640cda9afbdc from upstream" #1007

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions LICENSES/license-rules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ OpenOCD, can be broken down into:

File format examples::

Valid-License-Identifier: GPL-2.0
Valid-License-Identifier: GPL-2.0-only
Valid-License-Identifier: GPL-2.0-or-later
SPDX-URL: https://spdx.org/licenses/GPL-2.0.html
Expand All @@ -181,6 +182,8 @@ OpenOCD, can be broken down into:
tag/value pairs into a comment according to the placement
guidelines in the licensing rules documentation.
For 'GNU General Public License (GPL) version 2 only' use:
SPDX-License-Identifier: GPL-2.0
or
SPDX-License-Identifier: GPL-2.0-only
For 'GNU General Public License (GPL) version 2 or any later version' use:
SPDX-License-Identifier: GPL-2.0-or-later
Expand Down
3 changes: 3 additions & 0 deletions LICENSES/preferred/GPL-2.0
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Valid-License-Identifier: GPL-2.0
Valid-License-Identifier: GPL-2.0-only
Valid-License-Identifier: GPL-2.0-or-later
SPDX-URL: https://spdx.org/licenses/GPL-2.0.html
Expand All @@ -6,6 +7,8 @@ Usage-Guide:
tag/value pairs into a comment according to the placement
guidelines in the licensing rules documentation.
For 'GNU General Public License (GPL) version 2 only' use:
SPDX-License-Identifier: GPL-2.0
or
SPDX-License-Identifier: GPL-2.0-only
For 'GNU General Public License (GPL) version 2 or any later version' use:
SPDX-License-Identifier: GPL-2.0-or-later
Expand Down
1 change: 0 additions & 1 deletion contrib/60-openocd.rules
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ ATTRS{idVendor}=="303a", ATTRS{idProduct}=="1001", MODE="660", GROUP="plugdev",
ATTRS{idVendor}=="303a", ATTRS{idProduct}=="1002", MODE="660", GROUP="plugdev", TAG+="uaccess"

# ANGIE USB-JTAG Adapter
ATTRS{idVendor}=="584e", ATTRS{idProduct}=="414f", MODE="660", GROUP="plugdev", TAG+="uaccess"
ATTRS{idVendor}=="584e", ATTRS{idProduct}=="424e", MODE="660", GROUP="plugdev", TAG+="uaccess"
ATTRS{idVendor}=="584e", ATTRS{idProduct}=="4255", MODE="660", GROUP="plugdev", TAG+="uaccess"
ATTRS{idVendor}=="584e", ATTRS{idProduct}=="4355", MODE="660", GROUP="plugdev", TAG+="uaccess"
Expand Down
3 changes: 0 additions & 3 deletions contrib/firmware/angie/c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,3 @@ clean:

bin: angie_firmware.ihx
makebin -p angie_firmware.ihx angie_firmware.bin

hex: angie_firmware.ihx
$(PACKIHX) angie_firmware.ihx > fx2.hex
2 changes: 1 addition & 1 deletion contrib/firmware/angie/c/include/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
#define PIN_SDA IOD0
#define PIN_SCL IOD1
#define PIN_SDA_DIR IOD2
#define PIN_SCL_DIR IOD3
/* PD3 Not Connected */
/* PD4 Not Connected */
/* PD5 Not Connected */
/* PD6 Not Connected */
Expand Down
2 changes: 1 addition & 1 deletion contrib/firmware/angie/c/include/usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#define DESCRIPTOR_TYPE_STRING 0x03
#define DESCRIPTOR_TYPE_INTERFACE 0x04
#define DESCRIPTOR_TYPE_ENDPOINT 0x05
#define DESCRIPTOR_TYPE_INTERFACE_ASSOCIATION 0x0B

#define STR_DESCR(len, ...) { (len) * 2 + 2, DESCRIPTOR_TYPE_STRING, { __VA_ARGS__ } }

Expand Down Expand Up @@ -129,7 +130,6 @@ struct setup_data {
* the USB module */
extern volatile bool ep1_out;
extern volatile bool ep1_in;
extern volatile bool ep6_out;

extern volatile __xdata __at 0xE6B8 struct setup_data setup_data;

Expand Down
20 changes: 10 additions & 10 deletions contrib/firmware/angie/c/src/gpif.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,25 @@
/****************************** GPIF PROGRAM CODE ********************************/
/* DO NOT EDIT ... */
const char wavedata[128] = {
// Wave 0
/* Wave 0 */
/* LenBr */ 0x01, 0x3F, 0x01, 0x01, 0x01, 0x01, 0x01, 0x07,
/* Opcode*/ 0x02, 0x07, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00,
/* Output*/ 0x04, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
/* LFun */ 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
// Wave 1
/* Wave 1 */
/* LenBr */ 0x88, 0x01, 0x3F, 0x01, 0x01, 0x01, 0x01, 0x07,
/* Opcode*/ 0x01, 0x02, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,
/* Output*/ 0x07, 0x05, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
/* LFun */ 0x09, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x3F,
/* Wave 2 */
/* LenBr */ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x07,
/* Opcode*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* Output*/ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
/* Output*/ 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
/* LFun */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
// Wave 2
/* Wave 3 */
/* LenBr */ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x07,
/* Opcode*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* Output*/ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
/* LFun */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
// Wave 3
/* LenBr */ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x07,
/* Opcode*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* Output*/ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
/* Output*/ 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07,
/* LFun */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
};
/* END DO NOT EDIT */
Expand Down
7 changes: 0 additions & 7 deletions contrib/firmware/angie/c/src/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@

void start_cd(void)
{
PIN_SCL_DIR = 0;
PIN_SDA_DIR = 0;
delay_us(10);
PIN_SDA = 0; //SDA = 1;
delay_us(1);
PIN_SCL = 0; //SCL = 1;
Expand All @@ -43,10 +40,6 @@ void stop_cd(void)
delay_us(1);
PIN_SDA = 1;
delay_us(1);
PIN_SDA_DIR = 1;
delay_us(1);
PIN_SCL_DIR = 1;
delay_us(1);
}

void clock_cd(void)
Expand Down
50 changes: 22 additions & 28 deletions contrib/firmware/angie/c/src/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,36 +157,30 @@ void command_loop(void)
cmd_id_index = 0;
payload_index_in = 0;

/* Wait until host sends Bulk-OUT packet */
while ((!ep1_out) && (!ep6_out))
/* Wait until host sends EP1 Bulk-OUT packet */
while (!ep1_out)
;
if (ep6_out) {
/* Execute I2C command */
i2c_recieve();
ep6_out = false;
}
if (ep1_out) {
ep1_out = false;
/* Execute the commands */
last_command = false;
while (!last_command)
last_command = execute_command();

/* Send back EP1 Bulk-IN packet if required */
if (payload_index_in > 0) {
EP1INBC = payload_index_in;
syncdelay(3);

while (!ep1_in)
;
ep1_in = false;
}

/* Re-arm EP1-OUT after command execution */
EP1OUTBC = 0;
syncdelay(3);
EP1OUTBC = 0;
ep1_out = false;

/* Execute the commands */
last_command = false;
while (!last_command)
last_command = execute_command();

/* Send back EP6 Bulk-IN packet if required */
if (payload_index_in > 0) {
EP1INBC = payload_index_in;
syncdelay(3);

while (!ep1_in)
;
ep1_in = false;
}

/* Re-arm EP1-OUT after command execution */
EP1OUTBC = 0;
syncdelay(3);
EP1OUTBC = 0;
syncdelay(3);
}
}
25 changes: 22 additions & 3 deletions contrib/firmware/angie/c/src/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
*/
volatile bool ep1_out;
volatile bool ep1_in;
volatile bool ep6_out;

volatile __xdata __at 0xE6B8 struct setup_data setup_data;

Expand All @@ -43,7 +42,7 @@ __code struct usb_device_descriptor device_descriptor = {
.bdeviceprotocol = 0x01,
.bmaxpacketsize0 = 64,
.idvendor = 0x584e,
.idproduct = 0x414f,
.idproduct = 0x424e,
.bcddevice = 0x0000,
.imanufacturer = 1,
.iproduct = 2,
Expand All @@ -66,6 +65,17 @@ __code struct usb_config_descriptor config_descriptor = {
.maxpower = 50 /* 100 mA */
};

__code struct usb_interface_association_descriptor interface_association_descriptor = {
.blength = sizeof(struct usb_interface_association_descriptor),
.bdescriptortype = DESCRIPTOR_TYPE_INTERFACE_ASSOCIATION,
.bfirstinterface = 0x01,
.binterfacecount = 0x02,
.bfunctionclass = 0x02,
.bfunctionsubclass = 0x00,
.bfunctionprotocol = 0x00,
.ifunction = 0x00
};

__code struct usb_interface_descriptor interface_descriptor00 = {
.blength = sizeof(struct usb_interface_descriptor),
.bdescriptortype = DESCRIPTOR_TYPE_INTERFACE,
Expand Down Expand Up @@ -196,24 +206,27 @@ void ep0out_isr(void)__interrupt EP0OUT_ISR
void ep1in_isr(void)__interrupt EP1IN_ISR
{
ep1_in = true;

EXIF &= ~0x10; /* Clear USBINT: Main global interrupt */
EPIRQ = 0x04; /* Clear individual EP1IN IRQ */
}
void ep1out_isr(void)__interrupt EP1OUT_ISR
{
ep1_out = true;

EXIF &= ~0x10; /* Clear USBINT: Main global interrupt */
EPIRQ = 0x08; /* Clear individual EP1OUT IRQ */
}
void ep2_isr(void)__interrupt EP2_ISR
{
ep1_out = false; /* Does nothing but required by the compiler */
}
void ep4_isr(void)__interrupt EP4_ISR
{
}
void ep6_isr(void)__interrupt EP6_ISR
{
ep6_out = true;
i2c_recieve();
EXIF &= ~0x10; /* Clear USBINT: Main global interrupt */
EPIRQ = 0x40; /* Clear individual EP6OUT IRQ */

Expand Down Expand Up @@ -873,6 +886,9 @@ void io_init(void)
PORTACFG = 0x01; /* 0: normal ou 1: alternate function (each bit) */
OEA = 0xEF; /* all OUT exept INIT_B IN */
IOA = 0xFF;
PIN_RDWR_B = 1;
PIN_CSI_B = 1;
PIN_PROGRAM_B = 1;

/* PORT B */
OEB = 0xEF; /* all OUT exept TDO */
Expand All @@ -883,6 +899,8 @@ void io_init(void)
PIN_TDI = 0;
PIN_SRST = 1;



/* PORT C */
PORTCCFG = 0x00; /* 0: normal ou 1: alternate function (each bit) */
OEC = 0xFF;
Expand All @@ -891,4 +909,5 @@ void io_init(void)
/* PORT D */
OED = 0xFF;
IOD = 0xFF;
PIN_SDA_DIR = 0;
}
1 change: 0 additions & 1 deletion contrib/firmware/angie/hdl/src/angie_bitstream.ucf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ net SRST LOC = 'P61' ;
net SDA LOC = 'P50' ;
net SCL LOC = 'P51' ;
net SDA_DIR LOC = 'P56' ;
net SCL_DIR LOC = 'P57' ;

net SI_TDO LOC = 'P16' ;
net SO_TRST LOC = 'P32' ;
Expand Down
19 changes: 6 additions & 13 deletions contrib/firmware/angie/hdl/src/angie_bitstream.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ entity S609 is port(
SDA : inout std_logic;
SDA_DIR : in std_logic;
SCL : in std_logic;
SCL_DIR : in std_logic;

FTP : out std_logic_vector(7 downto 0); -- Test points
FTP : out std_logic_vector(7 downto 0):=(others => '1'); -- Test points
SI_TDO : in std_logic;
ST_0 : out std_logic;
ST_1 : out std_logic;
Expand Down Expand Up @@ -56,6 +55,8 @@ begin
ST_0 <= '0';
ST_1 <= '1';

ST_4 <= '0';

--TDO:
TDO <= not SI_TDO;

Expand All @@ -74,22 +75,14 @@ SO_SDA_OUT <= SDA;

process(SDA_DIR)
begin
if(SDA_DIR = '0') then
ST_5 <= '0';
else
if(SDA_DIR = '1') then
ST_5 <= '1';
end if;
end process;

process(SCL_DIR)
begin
if(SCL_DIR = '0') then
ST_4 <= '0';
else
ST_4 <= '1';
ST_5 <= '0';
end if;
end process;


--Points de test:
FTP(0) <= SDA;
FTP(1) <= SCL;
Expand Down
2 changes: 0 additions & 2 deletions doc/manual/helper.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ command handlers and helpers:
- @c CMD_NAME - invoked command name
- @c CMD_ARGC - the number of command arguments
- @c CMD_ARGV - array of command argument strings
- @c CMD_JIMTCL_ARGV - array containing the Jim_Obj equivalent of command
argument in @c CMD_ARGV.

@section helpercmdregister Command Registration

Expand Down
9 changes: 4 additions & 5 deletions doc/openocd.texi
Original file line number Diff line number Diff line change
Expand Up @@ -11826,14 +11826,13 @@ This feature is not well implemented and tested yet.
@end deffn

@deffn {Command} {xtensa exe} <ascii-encoded hexadecimal instruction bytes>
Execute one arbitrary instruction provided as an ascii string. The string represents an integer
number of instruction bytes, thus its length must be even. The instruction can be of any width
that is valid for the Xtensa core configuration.
Execute arbitrary instruction(s) provided as an ascii string. The string represents an integer
number of instruction bytes, thus its length must be even.
@end deffn

@deffn {Command} {xtensa dm} (address) [value]
Read or write Xtensa Debug Module (DM) registers. @var{address} is required for both reads
and writes and is a 4-byte-aligned value typically between 0 and 0x3ffc. @var{value} is specified
Read or write Xtensa Debug Module (DM) registers. @var{address} is required for both reads
and writes and is a 4-byte-aligned value typically between 0 and 0x3ffc. @var{value} is specified
only for write accesses.
@end deffn

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-or-later OR GFDL-1.2-no-invariants-or-later

Bus 002 Device 105: ID 584e:414f NanoXplore, SAS. ANGIE Adapter
Bus 001 Device 029: ID 584e:424e NanoXplore, SAS. ANGIE Adapter
Device Descriptor:
bLength 18
bDescriptorType 1
Expand All @@ -10,7 +10,7 @@ Device Descriptor:
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x584e
idProduct 0x414f
idProduct 0x424e
bcdDevice 0.00
iManufacturer 1 NanoXplore, SAS.
iProduct 2 ANGIE Adapter
Expand All @@ -26,6 +26,15 @@ Device Descriptor:
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 1
bInterfaceCount 2
bFunctionClass 2 Communications
bFunctionSubClass 0
bFunctionProtocol 0
iFunction 0
Interface Descriptor:
bLength 9
bDescriptorType 4
Expand Down
Loading
Loading