From 5b1efd0176c2e32a5f6766175e518ccfc45239a6 Mon Sep 17 00:00:00 2001 From: Santeri Salko Date: Thu, 13 Jan 2011 15:21:06 +0200 Subject: str9xpec: Find flash controller from the chain. Find the flash controller by position since it is before the core, not after it. This fixes the problem that str9xpec enable_turbo (or any other str9xpec command) did not work. (See my post in http://forum.sparkfun.com/viewtopic.php?f=18&t=25542) Signed-off-by: Santeri Salko --- src/flash/nor/str9xpec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/flash') diff --git a/src/flash/nor/str9xpec.c b/src/flash/nor/str9xpec.c index 18761c2f..c06e6d16 100644 --- a/src/flash/nor/str9xpec.c +++ b/src/flash/nor/str9xpec.c @@ -306,7 +306,8 @@ FLASH_BANK_COMMAND_HANDLER(str9xpec_flash_bank_command) arm7_9 = armv4_5->arch_info; jtag_info = &arm7_9->jtag_info; - str9xpec_info->tap = bank->target->tap; + /* The core is the next tap after the flash controller in the chain */ + str9xpec_info->tap = jtag_tap_by_position(jtag_info->tap->abs_chain_position - 1); str9xpec_info->isc_enable = 0; str9xpec_build_block_list(bank); -- cgit v1.2.3