Dynamically changing address alignment to A0 line in S3C4510 bus driver

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@929 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Kolja Waschk 17 years ago
parent cd411e0324
commit 0834af56d9

@ -28,6 +28,7 @@
* doc/UrJTAG.txt: Updates regarding Cygwin ioperm package and readline library
* src/jtag.c: Without readline library, informative output often was printed after prompt, not before
* src/bus/s3c4510x.c: Address alignment on A0..Ax lines changes dynamically with bus width
2008-01-16 Arnim Laeuger <arniml@users.sourceforge.net>

@ -65,7 +65,7 @@
#ifndef DEBUG_LVL2
#define DEBUG_LVL2(x)
#define DEBUG_LVL2(x) x
#endif
/** @brief Bus driver for Samsung S3C4510X */
@ -102,11 +102,18 @@ unsigned char dbus_width = 16; */
static void
setup_address( bus_t *bus, uint32_t a )
{
int i;
int i,so;
part_t *p = PART;
switch(dbus_width)
{
case 32: so=2; break;
case 16: so=1; break;
default: so=0; break;
}
for (i = 0; i < 22; i++)
part_set_signal( p, A[i], 1, (a >> i) & 1 );
part_set_signal( p, A[i], 1, (a >> (i+so)) & 1 );
}
static void
@ -275,13 +282,16 @@ s3c4510_bus_write( bus_t *bus, uint32_t adr, uint32_t data )
static int
s3c4510_bus_area( bus_t *bus, uint32_t adr, bus_area_t *area )
{
int b0size0, b0size1;
int b0size0, b0size1; // , endian;
area->description = NULL;
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" ));
switch ((b0size1 << 1) | b0size0) {
@ -408,6 +418,7 @@ s3c4510_bus_new( char *cmd_params[] )
break;
}
}
nOE = part_find_signal( PART, "nOE" );
if (!nOE) {
printf( _("signal '%s' not found\n"), "nOE" );

Loading…
Cancel
Save