"reset" problem on S3C2410

hi there,

I own a S3C2410 board and I found a strange problem while running

OpenOCD on it with “wiggler” cable. My openocd.cfg script is listed

below:

source [find parport.cfg]

jtag_khz 500
#jtag_nsrst_delay 100
#jtag_ntrst_delay 100

source [find samsung_s3c2410.cfg]

$_TARGETNAME configure -event reset-init { up2410_init }
$_TARGETNAME configure -event gdb-attach { reset init }

proc up2410_init { } {
	echo "---------- PLL and SDRAM init start ---------"
	mww 0x11111110 0x48000000
	mww 0x00007FFC 0x48000004
	mww 0x00007FFC 0x48000008
	mww 0x00000700 0x4800000c
	mww 0x00000700 0x48000010
	mww 0x00002E50 0x48000014
	mww 0x00002E50 0x48000018
	mww 0x00018005 0x4800001c
	mww 0x00018005 0x48000020
	mww 0x008c04e9 0x48000024
	mww 0x000000b2 0x48000028
	mww 0x00000030 0x4800002c
	mww 0x00000030 0x48000030
	echo "---------- PLL and SDRAM init done ---------"
}

set _NANDNAME $_CHIPNAME.nand
nand device $_NANDNAME s3c2410 $_TARGETNAME

init
reset init

I started openocd and it reported a error:

Info : clock speed 500 kHz
Info : JTAG tap: s3c2410.cpu tap/device found: 0x0032409d (mfg: 0x04e,
part: 0x0324, ver: 0x0)
Info : Embedded ICE version 2
Info : s3c2410.cpu: hardware has 2 breakpoint/watchpoint units
Info : JTAG tap: s3c2410.cpu tap/device found: 0x0032409d (mfg: 0x04e,
part: 0x0324, ver: 0x0)
Error: timed out while waiting for target halted
TARGET: s3c2410.cpu - Not halted

When I telnet to OpenOCD and run “reset”, the board actually can be

reseted and no error reported. But if I typed in “reset halt”, the

board also can be reseted but it cannot be halted:

> > reset halt
JTAG tap: s3c2410.cpu tap/device found: 0x0032409d (mfg: 0x04e, part:
0x0324, ver: 0x0)
timed out while waiting for target halted
TARGET: s3c2410.cpu - Not halted

in procedure 'reset'

And if I run “halt” on it, it also reported a error:

> > halt
Halt timed out, wake up GDB.
timed out while waiting for target halted
in procedure 'halt'

If I use JLink on it, the halt and reset command can be executed

successfully. Is this a bug on parport driver? Thanks.