aboutsummaryrefslogtreecommitdiff
path: root/board/gdsys
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2017-06-16 13:06:26 -0400
committerTom Rini <trini@konsulko.com>2017-06-23 10:38:05 -0400
commit3a97763aab781196bcc34e6fbc3eb81c12ccf2eb (patch)
tree84ce0a9bde7cc4189f9da74879088069ef887312 /board/gdsys
parent964a34e6020f51b67fe818c50a1d3bb1b90ac054 (diff)
downloadu-boot-3a97763aab781196bcc34e6fbc3eb81c12ccf2eb.zip
u-boot-3a97763aab781196bcc34e6fbc3eb81c12ccf2eb.tar.gz
u-boot-3a97763aab781196bcc34e6fbc3eb81c12ccf2eb.tar.bz2
controlcenterd_36BIT_SDCARD: Fix unused variable warning
On the controlcenterd_36BIT_SDCARD config we get a warning about prg_stage1_prepare being unused. Move the declaration closer to usage and hide under the existing #if tests. Cc: Dirk Eibach <eibach@gdsys.de> Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'board/gdsys')
-rw-r--r--board/gdsys/p1022/controlcenterd-id.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/board/gdsys/p1022/controlcenterd-id.c b/board/gdsys/p1022/controlcenterd-id.c
index db8a917..95f11fb 100644
--- a/board/gdsys/p1022/controlcenterd-id.c
+++ b/board/gdsys/p1022/controlcenterd-id.c
@@ -142,20 +142,6 @@ static int hre_err = HRE_E_OK;
#define IS_VAR_HREG(spec) (((spec) & 0x38) == 0x10)
#define HREG_IDX(spec) ((spec) & (IS_PCR_HREG(spec) ? 0x1f : 0x7))
-
-static const uint8_t prg_stage1_prepare[] = {
- 0x00, 0x20, 0x00, 0x00, /* opcode: SYNC f0 */
- 0x00, 0x24, 0x00, 0x00, /* opcode: SYNC f1 */
- 0x01, 0x80, 0x00, 0x00, /* opcode: CHECK0 PCR0 */
- 0x81, 0x22, 0x00, 0x00, /* opcode: LOAD PCR0, f0 */
- 0x01, 0x84, 0x00, 0x00, /* opcode: CHECK0 PCR1 */
- 0x81, 0x26, 0x10, 0x00, /* opcode: LOAD PCR1, f1 */
- 0x01, 0x88, 0x00, 0x00, /* opcode: CHECK0 PCR2 */
- 0x81, 0x2a, 0x20, 0x00, /* opcode: LOAD PCR2, f2 */
- 0x01, 0x8c, 0x00, 0x00, /* opcode: CHECK0 PCR3 */
- 0x81, 0x2e, 0x30, 0x00, /* opcode: LOAD PCR3, f3 */
-};
-
static const uint8_t vendor[] = "Guntermann & Drunck";
/**
@@ -931,6 +917,19 @@ end:
#endif
#if defined(CCDM_FIRST_STAGE) || (defined CCDM_AUTO_FIRST_STAGE)
+static const uint8_t prg_stage1_prepare[] = {
+ 0x00, 0x20, 0x00, 0x00, /* opcode: SYNC f0 */
+ 0x00, 0x24, 0x00, 0x00, /* opcode: SYNC f1 */
+ 0x01, 0x80, 0x00, 0x00, /* opcode: CHECK0 PCR0 */
+ 0x81, 0x22, 0x00, 0x00, /* opcode: LOAD PCR0, f0 */
+ 0x01, 0x84, 0x00, 0x00, /* opcode: CHECK0 PCR1 */
+ 0x81, 0x26, 0x10, 0x00, /* opcode: LOAD PCR1, f1 */
+ 0x01, 0x88, 0x00, 0x00, /* opcode: CHECK0 PCR2 */
+ 0x81, 0x2a, 0x20, 0x00, /* opcode: LOAD PCR2, f2 */
+ 0x01, 0x8c, 0x00, 0x00, /* opcode: CHECK0 PCR3 */
+ 0x81, 0x2e, 0x30, 0x00, /* opcode: LOAD PCR3, f3 */
+};
+
static int first_stage_actions(void)
{
int result = 0;