Commit f8a11725 authored by ntfreak's avatar ntfreak
Browse files

- added new device to luminary flash driver

- only use SYSRESETREQ on affected luminary parts

git-svn-id: svn://svn.berlios.de/openocd/trunk@630 b42882b7-edfa-0310-969c-e2dbd0fdcd60
parent 95efa83e
...@@ -81,6 +81,11 @@ struct { ...@@ -81,6 +81,11 @@ struct {
{ {
{0x01,"LM3S101"}, {0x01,"LM3S101"},
{0x02,"LM3S102"}, {0x02,"LM3S102"},
{0x03,"LM3S1625"},
{0x04,"LM3S1626"},
{0x05,"LM3S1627"},
{0x06,"LM3S1607"},
{0x10,"LM3S1776"},
{0x19,"LM3S300"}, {0x19,"LM3S300"},
{0x11,"LM3S301"}, {0x11,"LM3S301"},
{0x12,"LM3S310"}, {0x12,"LM3S310"},
...@@ -106,10 +111,20 @@ struct { ...@@ -106,10 +111,20 @@ struct {
{0x39,"LM3S808"}, {0x39,"LM3S808"},
{0x32,"LM3S811"}, {0x32,"LM3S811"},
{0x33,"LM3S812"}, {0x33,"LM3S812"},
/*{0x33,"LM3S2616"},*/
{0x34,"LM3S815"}, {0x34,"LM3S815"},
{0x36,"LM3S817"}, {0x36,"LM3S817"},
{0x37,"LM3S818"}, {0x37,"LM3S818"},
{0x35,"LM3S828"}, {0x35,"LM3S828"},
{0x39,"LM3S2276"},
{0x3A,"LM3S2776"},
{0x43,"LM3S3651"},
{0x44,"LM3S3739"},
{0x45,"LM3S3749"},
{0x46,"LM3S3759"},
{0x48,"LM3S3768"},
{0x49,"LM3S3748"},
{0x50,"LM3S2678"},
{0x51,"LM3S2110"}, {0x51,"LM3S2110"},
{0x52,"LM3S2739"}, {0x52,"LM3S2739"},
{0x53,"LM3S2651"}, {0x53,"LM3S2651"},
...@@ -133,6 +148,8 @@ struct { ...@@ -133,6 +148,8 @@ struct {
{0x76,"LM3S6537"}, {0x76,"LM3S6537"},
{0x77,"LM3S6753"}, {0x77,"LM3S6753"},
{0x78,"LM3S6952"}, {0x78,"LM3S6952"},
{0x80,"LM3S2671"},
{0x81,"LM3S5632"},
{0x82,"LM3S6422"}, {0x82,"LM3S6422"},
{0x83,"LM3S6633"}, {0x83,"LM3S6633"},
{0x84,"LM3S2139"}, {0x84,"LM3S2139"},
...@@ -140,17 +157,30 @@ struct { ...@@ -140,17 +157,30 @@ struct {
{0x86,"LM3S8738"}, {0x86,"LM3S8738"},
{0x88,"LM3S8938"}, {0x88,"LM3S8938"},
{0x89,"LM3S6938"}, {0x89,"LM3S6938"},
{0x8A,"LM3S5652"},
{0x8B,"LM3S6637"}, {0x8B,"LM3S6637"},
{0x8C,"LM3S8933"}, {0x8C,"LM3S8933"},
{0x8D,"LM3S8733"}, {0x8D,"LM3S8733"},
{0x8E,"LM3S8538"}, {0x8E,"LM3S8538"},
{0x8F,"LM3S2948"}, {0x8F,"LM3S2948"},
{0x91,"LM3S5662"},
{0x96,"LM3S5732"},
{0x97,"LM3S5737"},
{0x99,"LM3S5747"},
{0x9A,"LM3S5752"},
{0x9B,"LM3S5757"},
{0x9C,"LM3S5762"},
{0x9D,"LM3S5767"},
{0xA0,"LM3S5739"},
{0xA1,"LM3S6100"}, {0xA1,"LM3S6100"},
{0xA2,"LM3S2410"}, {0xA2,"LM3S2410"},
{0xA3,"LM3S6730"}, {0xA3,"LM3S6730"},
{0xA4,"LM3S2730"}, {0xA4,"LM3S2730"},
{0xA5,"LM3S6420"}, {0xA5,"LM3S6420"},
{0xA6,"LM3S8962"}, {0xA6,"LM3S8962"},
{0xA7,"LM3S5749"},
{0xA8,"LM3S5769"},
{0xA9,"LM3S5768"},
{0xB3,"LM3S1635"}, {0xB3,"LM3S1635"},
{0xB4,"LM3S1850"}, {0xB4,"LM3S1850"},
{0xB5,"LM3S1960"}, {0xB5,"LM3S1960"},
...@@ -200,10 +230,13 @@ struct { ...@@ -200,10 +230,13 @@ struct {
{0,"Unknown part"} {0,"Unknown part"}
}; };
char * StellarisClassname[2] = char * StellarisClassname[5] =
{ {
"Sandstorm", "Sandstorm",
"Fury" "Fury",
"Unknown",
"DustDevil",
"Tempest"
}; };
/*************************************************************************** /***************************************************************************
......
...@@ -673,6 +673,7 @@ int cortex_m3_assert_reset(target_t *target) ...@@ -673,6 +673,7 @@ int cortex_m3_assert_reset(target_t *target)
armv7m_common_t *armv7m = target->arch_info; armv7m_common_t *armv7m = target->arch_info;
cortex_m3_common_t *cortex_m3 = armv7m->arch_info; cortex_m3_common_t *cortex_m3 = armv7m->arch_info;
swjdp_common_t *swjdp = &cortex_m3->swjdp_info; swjdp_common_t *swjdp = &cortex_m3->swjdp_info;
int assert_srst = TRUE;
LOG_DEBUG("target->state: %s", target_state_strings[target->state]); LOG_DEBUG("target->state: %s", target_state_strings[target->state]);
...@@ -712,12 +713,33 @@ int cortex_m3_assert_reset(target_t *target) ...@@ -712,12 +713,33 @@ int cortex_m3_assert_reset(target_t *target)
if (strcmp(cortex_m3->variant, "lm3s") == 0) if (strcmp(cortex_m3->variant, "lm3s") == 0)
{ {
/* this causes the luminary device to reset using the watchdog */ /* get revision of lm3s target, only early silicon has this issue
ahbap_write_system_atomic_u32(swjdp, NVIC_AIRCR, AIRCR_VECTKEY | AIRCR_SYSRESETREQ ); * Fury Rev B, DustDevil Rev B, Tempest all ok */
LOG_DEBUG("Using Luminary Reset: SYSRESETREQ");
u32 did0;
if (target_read_u32(target, 0x400fe000, &did0) == ERROR_OK)
{
switch ((did0 >> 16) & 0xff)
{
case 0:
/* all Sandstorm suffer issue */
assert_srst = FALSE;
break;
case 1:
case 3:
/* only Fury/DustDevil rev A suffer reset problems */
if (((did0 >> 8) & 0xff) == 0)
assert_srst = FALSE;
break;
}
}
} }
else
if (assert_srst == TRUE)
{ {
/* default to asserting srst */
if (jtag_reset_config & RESET_SRST_PULLS_TRST) if (jtag_reset_config & RESET_SRST_PULLS_TRST)
{ {
jtag_add_reset(1, 1); jtag_add_reset(1, 1);
...@@ -727,6 +749,12 @@ int cortex_m3_assert_reset(target_t *target) ...@@ -727,6 +749,12 @@ int cortex_m3_assert_reset(target_t *target)
jtag_add_reset(0, 1); jtag_add_reset(0, 1);
} }
} }
else
{
/* this causes the luminary device to reset using the watchdog */
ahbap_write_system_atomic_u32(swjdp, NVIC_AIRCR, AIRCR_VECTKEY | AIRCR_SYSRESETREQ );
LOG_DEBUG("Using Luminary Reset: SYSRESETREQ");
}
target->state = TARGET_RESET; target->state = TARGET_RESET;
jtag_add_sleep(50000); jtag_add_sleep(50000);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment