From 4f80d5f87ba6317d3271e8a883815893f2b7d4a2 Mon Sep 17 00:00:00 2001 From: Marcel Telka Date: Fri, 6 Jun 2003 08:11:41 +0000 Subject: [PATCH] 2003-06-06 Marcel Telka MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * src/bus/sh7727.c (bus_params_t): Fixed cs array length. (setup_address): Removed address shift by BASE. (sh7727_bus_read_end): Simplified CS handling. (new_sh7727_bus): Fixed CS signal searching (thanks to Rainer Dörken). git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@472 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- jtag/ChangeLog | 7 +++++++ jtag/NEWS | 1 + jtag/THANKS | 1 + jtag/src/bus/sh7727.c | 26 ++++++++++---------------- 4 files changed, 19 insertions(+), 16 deletions(-) diff --git a/jtag/ChangeLog b/jtag/ChangeLog index 529f1fe8..d37b9f29 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,3 +1,10 @@ +2003-06-06 Marcel Telka + + * src/bus/sh7727.c (bus_params_t): Fixed cs array length. + (setup_address): Removed address shift by BASE. + (sh7727_bus_read_end): Simplified CS handling. + (new_sh7727_bus): Fixed CS signal searching (thanks to Rainer Dörken). + 2003-06-03 Marcel Telka * include/cfi.h (detect_cfi): Macro removed. diff --git a/jtag/NEWS b/jtag/NEWS index e007752a..c385034f 100644 --- a/jtag/NEWS +++ b/jtag/NEWS @@ -2,6 +2,7 @@ $Id$ * Fixed bug with SELECT, AUTOFD, and STROBE signals handling (bug 745824). * Added new commands 'peek' and 'poke' (patch 747447, Matan Ziv-Av). + * Fixed bugs in SH7727 bus driver (thanks to Rainer Dörken). * Minor bugs fixed. jtag-0.4 (2003-05-29): diff --git a/jtag/THANKS b/jtag/THANKS index 2a5a29fc..fae525f0 100644 --- a/jtag/THANKS +++ b/jtag/THANKS @@ -2,6 +2,7 @@ $Id$ Ian Campbell Alex (d18c7db) +Rainer Dörken Chris Ellec Jachym Holecek August Hörandl diff --git a/jtag/src/bus/sh7727.c b/jtag/src/bus/sh7727.c index 17157882..a93acf17 100644 --- a/jtag/src/bus/sh7727.c +++ b/jtag/src/bus/sh7727.c @@ -34,14 +34,12 @@ #include "chain.h" #include "bssignal.h" -#define BASE 0x1000000 - typedef struct { chain_t *chain; part_t *part; signal_t *a[26]; signal_t *d[32]; - signal_t *cs[6]; + signal_t *cs[7]; signal_t *we[4]; signal_t *rdwr; signal_t *rd; @@ -62,8 +60,6 @@ setup_address( bus_t *bus, uint32_t a ) int i; part_t *p = PART; - a += BASE; - for (i = 0; i < 26; i++) part_set_signal( p, A[i], 1, (a >> i) & 1 ); } @@ -145,19 +141,15 @@ static uint32_t sh7727_bus_read_end( bus_t *bus ) { part_t *p = PART; - int cs[8]; int i; uint32_t d = 0; - for (i = 0; i < 8; i++) - cs[i] = 1; - - part_set_signal( p, CS[0], 1, cs[0] ); - part_set_signal( p, CS[2], 1, cs[2] ); - part_set_signal( p, CS[3], 1, cs[3] ); - part_set_signal( p, CS[4], 1, cs[4] ); - part_set_signal( p, CS[5], 1, cs[5] ); - part_set_signal( p, CS[6], 1, cs[6] ); + part_set_signal( p, CS[0], 1, 1 ); + part_set_signal( p, CS[2], 1, 1 ); + part_set_signal( p, CS[3], 1, 1 ); + part_set_signal( p, CS[4], 1, 1 ); + part_set_signal( p, CS[5], 1, 1 ); + part_set_signal( p, CS[6], 1, 1 ); part_set_signal( p, RD, 1, 1 ); chain_shift_data_registers( CHAIN, 1 ); @@ -290,7 +282,9 @@ new_sh7727_bus( chain_t *chain, int pn ) break; } } - for (i = 0; i < 6; i++) { + for (i = 0; i < 7; i++) { + if (i == 1) + continue; sprintf( buff, "CS%d", i ); CS[i] = part_find_signal( PART, buff ); if (!CS[i]) {