xtensa: fix ibreakenable register update
authorMax Filippov <jcmvbkbc@gmail.com>
Sun, 3 Mar 2013 23:40:42 +0000 (03:40 +0400)
committerChris Zankel <chris@zankel.net>
Thu, 9 May 2013 08:07:09 +0000 (01:07 -0700)
Only set the register when there is at least one ibreak register,
otherwise the build fails:
arch/xtensa/kernel/head.S:105: Error: invalid register 'ibreakenable'
for 'wsr' instruction
arch/xtensa/platforms/iss/setup.c:67: Error: invalid register
'ibreakenable' for 'wsr' instruction

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
arch/xtensa/kernel/head.S
arch/xtensa/platforms/iss/setup.c
arch/xtensa/platforms/xt2000/setup.c
arch/xtensa/platforms/xtfpga/setup.c

index df88f98737f4f139968cdd0a2758c7132854f4a9..4566683abc8dd5a26c159002cfcd2fdac9439600 100644 (file)
@@ -86,7 +86,9 @@ ENTRY(_startup)
        /* Clear debugging registers. */
 
 #if XCHAL_HAVE_DEBUG
+#if XCHAL_NUM_IBREAK > 0
        wsr     a0, ibreakenable
+#endif
        wsr     a0, icount
        movi    a1, 15
        wsr     a0, icountlevel
index e1700102f35ee8039d66661250f1a41ca26fc5d0..b68916fd0d7a53a1562faf50774ea3d1506aff8a 100644 (file)
@@ -64,7 +64,9 @@ void platform_restart(void)
                             "wsr       a2, icountlevel\n\t"
                             "movi      a2, 0\n\t"
                             "wsr       a2, icount\n\t"
+#if XCHAL_NUM_IBREAK > 0
                             "wsr       a2, ibreakenable\n\t"
+#endif
                             "wsr       a2, lcount\n\t"
                             "movi      a2, 0x1f\n\t"
                             "wsr       a2, ps\n\t"
index c7d90f17886e1fd86a1fc17df51bab8cbd2c939d..f9bc8796629089a540c892109a46a9fe19f68568 100644 (file)
@@ -69,7 +69,9 @@ void platform_restart(void)
                              "wsr      a2, icountlevel\n\t"
                              "movi     a2, 0\n\t"
                              "wsr      a2, icount\n\t"
+#if XCHAL_NUM_IBREAK > 0
                              "wsr      a2, ibreakenable\n\t"
+#endif
                              "wsr      a2, lcount\n\t"
                              "movi     a2, 0x1f\n\t"
                              "wsr      a2, ps\n\t"
index 9d888a2a5755c1ad039bbfe1ced240b6598d0b0f..96ef8eeb064e745694d6ec7912904838364e31fe 100644 (file)
@@ -60,7 +60,9 @@ void platform_restart(void)
                              "wsr      a2, icountlevel\n\t"
                              "movi     a2, 0\n\t"
                              "wsr      a2, icount\n\t"
+#if XCHAL_NUM_IBREAK > 0
                              "wsr      a2, ibreakenable\n\t"
+#endif
                              "wsr      a2, lcount\n\t"
                              "movi     a2, 0x1f\n\t"
                              "wsr      a2, ps\n\t"