s3c4510: Read B0SIZE etc. earlier during bus_prepare, so bus_area can return correct values immediately after init

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1021 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Kolja Waschk 17 years ago
parent 63c961420d
commit ffde6167cb

@ -3,7 +3,9 @@
* src/flash/Makefile.am, src/flash/jedec_exp.c, src/flash/detectflash.c,
configure.ac: Experimental new code for flash detection, to be enabled
during configuration with --enable-jedec-exp (disabled by default)
* src/bus/s3c4510x.c: disable debug output (was enabled in 929..)
* src/bus/s3c4510x.c: disable debug output (was enabled in 929..), do a
chain_shift_data_registers before trying to read b0size (fixes the
old problem of B0SIZE unknown, needed for proper flash detection)
* include/register.h, src/tap/register.c, src/discovery.c: report if tdo
seems to be stuck during detect_register_size (ie. "detect").

@ -150,13 +150,6 @@ s3c4510_bus_printinfo( bus_t *bus )
printf( _("Samsung S3C4510B compatibile bus driver via BSR (JTAG part No. %d) RCS0=%ubit\n"), i ,dbus_width );
}
static void
s3c4510_bus_prepare( bus_t *bus )
{
part_set_instruction( PART, "EXTEST" );
chain_shift_instructions( CHAIN );
}
static void s3c4510_bus_setup_ctrl( bus_t *bus, int mode )
{
int k;
@ -177,6 +170,19 @@ static void s3c4510_bus_setup_ctrl( bus_t *bus, int mode )
part_set_signal( p, nOE, 1, (mode & (1 << 16)) ? 1 : 0 );
}
static void
s3c4510_bus_prepare( bus_t *bus )
{
part_set_instruction( PART, "EXTEST" );
chain_shift_instructions( CHAIN );
/* Do one shift_data_registers to capture current values */
s3c4510_bus_setup_ctrl( bus, 0x1FFFF );
chain_shift_data_registers( chain, 1 );
}
static void
s3c4510_bus_read_start( bus_t *bus, uint32_t adr )
{
@ -288,11 +294,9 @@ s3c4510_bus_area( bus_t *bus, uint32_t adr, bus_area_t *area )
area->start = UINT32_C(0x00000000);
area->length = UINT64_C(0x100000000);
// endian = part_get_signal( PART, part_find_signal( PART, "LITTLE" ));
b0size0 = part_get_signal( PART, part_find_signal( PART, "B0SIZE0" ));
if(b0size0==0) // TODO: try again (initialization problem?)
b0size0 = part_get_signal( PART, part_find_signal( PART, "B0SIZE0" ));
b0size1 = part_get_signal( PART, part_find_signal( PART, "B0SIZE1" ));
// endian = part_get_signal( PART, part_find_signal( PART, "LITTLE" ));
b0size0 = part_get_signal( PART, part_find_signal( PART, "B0SIZE0" ));
b0size1 = part_get_signal( PART, part_find_signal( PART, "B0SIZE1" ));
switch ((b0size1 << 1) | b0size0) {
case 1:

Loading…
Cancel
Save