|
|
|
/*
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* Copyright (C) 2002 ETC s.r.o.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
|
|
* 02111-1307, USA.
|
|
|
|
*
|
|
|
|
* Written by Marcel Telka <marcel@telka.sk>, 2002.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PART_H
|
|
|
|
#define PART_H
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "bssignal.h"
|
|
|
|
#include "instruction.h"
|
|
|
|
#include "data_register.h"
|
|
|
|
#include "bsbit.h"
|
|
|
|
|
|
|
|
#define MAXLEN_MANUFACTURER 25
|
|
|
|
#define MAXLEN_PART 20
|
|
|
|
#define MAXLEN_STEPPING 8
|
|
|
|
|
|
|
|
typedef struct part part_t;
|
|
|
|
|
|
|
|
struct part {
|
|
|
|
tap_register *id;
|
|
|
|
char *alias; /* djf refdes */
|
|
|
|
char manufacturer[MAXLEN_MANUFACTURER + 1];
|
|
|
|
char part[MAXLEN_PART + 1];
|
|
|
|
char stepping[MAXLEN_STEPPING + 1];
|
|
|
|
signal_t *signals;
|
|
|
|
salias_t *saliases;
|
|
|
|
int instruction_length;
|
|
|
|
instruction *instructions;
|
|
|
|
instruction *active_instruction;
|
|
|
|
data_register *data_registers;
|
|
|
|
int boundary_length;
|
|
|
|
bsbit_t **bsbits;
|
|
|
|
};
|
|
|
|
|
|
|
|
part_t *part_alloc( const tap_register *id );
|
|
|
|
void part_free( part_t *p );
|
2003-04-29 Marcel Telka <marcel@telka.sk>
* data/MANUFACTURERS: Added new manufacturer: DEC.
* src/jtag.c (jtag_create_jtagdir): Changed permissions for jtag directory.
* include/part.h (part_alloc, read_part): Changed return type from `part *' to `part_t *'.
(struct parts): Changed parts member type from `part **' to `part_t **'.
(parts_alloc): Changed return type from `parts *' to `parts_t *'.
* src/bus/ixp425.c (select_flash, unselect_flash, setup_address, set_data_in, setup_data):
Changed first parameter type from `part *' to `part_t *'.
* src/bus/pxa250.c (setup_address, set_data_in, setup_data): Ditto.
* src/bus/sa1110.c (setup_address, set_data_in, setup_data): Ditto.
* include/bus.h: Replaced static bus_driver_t architecture with dynamic bus_t.
Removed direct chain_t dependency. Added `params' and `prepare' members.
All related functions' parameter types changed.
* src/bus/ixp425.c (bus_params_t): New structure typedef.
(CHAIN, PART): New macros.
(ixp425_bus_prepare, ixp425_bus_free, new_ixp425_bus): New functions.
(ixp425_bus_driver, ixp425_bus): Renamed `ixp425_bus_driver' to `ixp425_bus' and updated
for new bus driver architecture.
* src/bus/pxa250.c (bus_params_t): New structure typedef.
(CHAIN, PART): New macros.
(pxa250_bus_prepare, pxa250_bus_free, new_pxa250_bus): New functions.
(pxa250_bus_driver, pxa250_bus): Renamed `pxa250_bus_driver' to `pxa250_bus' and updated
for new bus driver architecture.
* src/bus/sa1110.c (bus_params_t): New structure typedef.
(CHAIN, PART): New macros.
(sa1110_bus_prepare, sa1110_bus_free, new_sa1110_bus): New functions.
(sa1110_bus_driver, sa1110_bus): Renamed `sa1110_bus_driver' to `sa1110_bus' and updated
for new bus driver architecture.
* src/readmem.c (detectflash, readmem): Moved JTAG chain initialization to bus->prepare().
* src/flash.c (flashcheck): Ditto.
(flashmsbin, flashmem): Removed BYPASS instruction setup.
* src/jtag.c (bus_driver, bus): Replaced `bus_driver' with `bus' global variable.
(jtag_parse_line, main): Added `bus' deallocation.
* src/flash.h (flash_driver_t): Changed parameter type for all function members from
`chain_t*' to `bus_t *'.
All function callers changed.
git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@423 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
22 years ago
|
|
|
part_t *read_part( FILE *f, tap_register_t *idr );
|
|
|
|
instruction *part_find_instruction( part_t *p, const char *iname );
|
|
|
|
data_register *part_find_data_register( part_t *p, const char *drname );
|
2003-05-21 Marcel Telka <marcel@telka.sk>
* include/part.h (part_find_signal): New function declaration.
(part_set_signal, part_get_signal): Changed parameter signal name to signal pointer.
* src/part/part.c (part_find_signal): New function.
(part_set_signal, part_get_signal): Removed signal searching, used supplied pointer to signal.
* po/POTFILES.in: Added src/bus/ixp425.c, src/bus/pxa2x0.c, and src/bus/sa1110.c.
* src/bus/ixp425.c (bus_params_t, select_flash, unselect_flash, setup_address, set_data_in)
(setup_data, ixp425_bus_read_start, ixp425_bus_read_next, ixp425_bus_read_end, ixp425_bus_write)
(new_ixp425_bus): Optimized signal searching to increase bus access speed.
* src/bus/pxa2x0.c (bus_params_t, setup_address, set_data_in, setup_data, pxa250_bus_read_start)
(pxa250_bus_read_next, pxa250_bus_read_end, pxa250_bus_write, new_pxa250_bus): Ditto.
* src/bus/sa1110.c (bus_params_t, setup_address, set_data_in, setup_data, sa1110_bus_read_start)
(sa1110_bus_read_next, sa1110_bus_read_end, sa1110_bus_write, new_sa1110_bus): Ditto.
(sa1110_bus_width): Updated part_get_signal() function call. Added explicit signal search.
* src/cmd/get.c (cmd_get_run): Ditto.
* src/cmd/set.c (cmd_set_run): Updated part_set_signal() function call. Added explicit signal search.
git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@435 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
22 years ago
|
|
|
signal_t *part_find_signal( part_t *p, const char *signalname );
|
|
|
|
void part_set_instruction( part_t *p, const char *iname );
|
2003-05-21 Marcel Telka <marcel@telka.sk>
* include/part.h (part_find_signal): New function declaration.
(part_set_signal, part_get_signal): Changed parameter signal name to signal pointer.
* src/part/part.c (part_find_signal): New function.
(part_set_signal, part_get_signal): Removed signal searching, used supplied pointer to signal.
* po/POTFILES.in: Added src/bus/ixp425.c, src/bus/pxa2x0.c, and src/bus/sa1110.c.
* src/bus/ixp425.c (bus_params_t, select_flash, unselect_flash, setup_address, set_data_in)
(setup_data, ixp425_bus_read_start, ixp425_bus_read_next, ixp425_bus_read_end, ixp425_bus_write)
(new_ixp425_bus): Optimized signal searching to increase bus access speed.
* src/bus/pxa2x0.c (bus_params_t, setup_address, set_data_in, setup_data, pxa250_bus_read_start)
(pxa250_bus_read_next, pxa250_bus_read_end, pxa250_bus_write, new_pxa250_bus): Ditto.
* src/bus/sa1110.c (bus_params_t, setup_address, set_data_in, setup_data, sa1110_bus_read_start)
(sa1110_bus_read_next, sa1110_bus_read_end, sa1110_bus_write, new_sa1110_bus): Ditto.
(sa1110_bus_width): Updated part_get_signal() function call. Added explicit signal search.
* src/cmd/get.c (cmd_get_run): Ditto.
* src/cmd/set.c (cmd_set_run): Updated part_set_signal() function call. Added explicit signal search.
git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@435 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
22 years ago
|
|
|
void part_set_signal( part_t *p, signal_t *s, int out, int val );
|
|
|
|
int part_get_signal( part_t *p, signal_t *s );
|
|
|
|
void part_print( part_t *p );
|
|
|
|
|
|
|
|
typedef struct parts parts_t;
|
|
|
|
|
|
|
|
struct parts {
|
|
|
|
int len;
|
2003-04-29 Marcel Telka <marcel@telka.sk>
* data/MANUFACTURERS: Added new manufacturer: DEC.
* src/jtag.c (jtag_create_jtagdir): Changed permissions for jtag directory.
* include/part.h (part_alloc, read_part): Changed return type from `part *' to `part_t *'.
(struct parts): Changed parts member type from `part **' to `part_t **'.
(parts_alloc): Changed return type from `parts *' to `parts_t *'.
* src/bus/ixp425.c (select_flash, unselect_flash, setup_address, set_data_in, setup_data):
Changed first parameter type from `part *' to `part_t *'.
* src/bus/pxa250.c (setup_address, set_data_in, setup_data): Ditto.
* src/bus/sa1110.c (setup_address, set_data_in, setup_data): Ditto.
* include/bus.h: Replaced static bus_driver_t architecture with dynamic bus_t.
Removed direct chain_t dependency. Added `params' and `prepare' members.
All related functions' parameter types changed.
* src/bus/ixp425.c (bus_params_t): New structure typedef.
(CHAIN, PART): New macros.
(ixp425_bus_prepare, ixp425_bus_free, new_ixp425_bus): New functions.
(ixp425_bus_driver, ixp425_bus): Renamed `ixp425_bus_driver' to `ixp425_bus' and updated
for new bus driver architecture.
* src/bus/pxa250.c (bus_params_t): New structure typedef.
(CHAIN, PART): New macros.
(pxa250_bus_prepare, pxa250_bus_free, new_pxa250_bus): New functions.
(pxa250_bus_driver, pxa250_bus): Renamed `pxa250_bus_driver' to `pxa250_bus' and updated
for new bus driver architecture.
* src/bus/sa1110.c (bus_params_t): New structure typedef.
(CHAIN, PART): New macros.
(sa1110_bus_prepare, sa1110_bus_free, new_sa1110_bus): New functions.
(sa1110_bus_driver, sa1110_bus): Renamed `sa1110_bus_driver' to `sa1110_bus' and updated
for new bus driver architecture.
* src/readmem.c (detectflash, readmem): Moved JTAG chain initialization to bus->prepare().
* src/flash.c (flashcheck): Ditto.
(flashmsbin, flashmem): Removed BYPASS instruction setup.
* src/jtag.c (bus_driver, bus): Replaced `bus_driver' with `bus' global variable.
(jtag_parse_line, main): Added `bus' deallocation.
* src/flash.h (flash_driver_t): Changed parameter type for all function members from
`chain_t*' to `bus_t *'.
All function callers changed.
git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@423 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
22 years ago
|
|
|
part_t **parts;
|
|
|
|
};
|
|
|
|
|
2003-04-29 Marcel Telka <marcel@telka.sk>
* data/MANUFACTURERS: Added new manufacturer: DEC.
* src/jtag.c (jtag_create_jtagdir): Changed permissions for jtag directory.
* include/part.h (part_alloc, read_part): Changed return type from `part *' to `part_t *'.
(struct parts): Changed parts member type from `part **' to `part_t **'.
(parts_alloc): Changed return type from `parts *' to `parts_t *'.
* src/bus/ixp425.c (select_flash, unselect_flash, setup_address, set_data_in, setup_data):
Changed first parameter type from `part *' to `part_t *'.
* src/bus/pxa250.c (setup_address, set_data_in, setup_data): Ditto.
* src/bus/sa1110.c (setup_address, set_data_in, setup_data): Ditto.
* include/bus.h: Replaced static bus_driver_t architecture with dynamic bus_t.
Removed direct chain_t dependency. Added `params' and `prepare' members.
All related functions' parameter types changed.
* src/bus/ixp425.c (bus_params_t): New structure typedef.
(CHAIN, PART): New macros.
(ixp425_bus_prepare, ixp425_bus_free, new_ixp425_bus): New functions.
(ixp425_bus_driver, ixp425_bus): Renamed `ixp425_bus_driver' to `ixp425_bus' and updated
for new bus driver architecture.
* src/bus/pxa250.c (bus_params_t): New structure typedef.
(CHAIN, PART): New macros.
(pxa250_bus_prepare, pxa250_bus_free, new_pxa250_bus): New functions.
(pxa250_bus_driver, pxa250_bus): Renamed `pxa250_bus_driver' to `pxa250_bus' and updated
for new bus driver architecture.
* src/bus/sa1110.c (bus_params_t): New structure typedef.
(CHAIN, PART): New macros.
(sa1110_bus_prepare, sa1110_bus_free, new_sa1110_bus): New functions.
(sa1110_bus_driver, sa1110_bus): Renamed `sa1110_bus_driver' to `sa1110_bus' and updated
for new bus driver architecture.
* src/readmem.c (detectflash, readmem): Moved JTAG chain initialization to bus->prepare().
* src/flash.c (flashcheck): Ditto.
(flashmsbin, flashmem): Removed BYPASS instruction setup.
* src/jtag.c (bus_driver, bus): Replaced `bus_driver' with `bus' global variable.
(jtag_parse_line, main): Added `bus' deallocation.
* src/flash.h (flash_driver_t): Changed parameter type for all function members from
`chain_t*' to `bus_t *'.
All function callers changed.
git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@423 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
22 years ago
|
|
|
parts_t *parts_alloc( void );
|
|
|
|
void parts_free( parts_t *ps );
|
|
|
|
int parts_add_part( parts_t *ps, part_t *p );
|
|
|
|
void parts_set_instruction( parts_t *ps, const char *iname );
|
|
|
|
void parts_print( parts_t *ps );
|
|
|
|
|
|
|
|
#endif /* PART_H */
|