]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
board: nios2: Check if flash is configured before calling early_flash_cmd_reset()
authorEzequiel Garcia <ezequiel.garcia@free-electrons.com>
Tue, 28 Jan 2014 10:19:06 +0000 (07:19 -0300)
committerTom Rini <trini@ti.com>
Wed, 29 Jan 2014 21:44:18 +0000 (16:44 -0500)
commit07e2822d158940a0e8ba45b6ab0344ffa1011a07
treec33e055f64d1f816e461db693164e867d1305bf7
parent3d83efbce9c5c0e4f318afd62960b780216f53f0
board: nios2: Check if flash is configured before calling early_flash_cmd_reset()

If CONFIG_CFI_FLASH_MTD is not defined, then we shouldn't perform the
flash early reset.

This commit fixes the following build error:

  nios2-generic.c: In function `__early_flash_cmd_reset':
  nios2-generic.c:23: error: `AMD_CMD_RESET' undeclared (first use in this function)
  nios2-generic.c:23: error: (Each undeclared identifier is reported only once
  nios2-generic.c:23: error: for each function it appears in.)
  nios2-generic.c:24: error: `FLASH_CMD_RESET' undeclared (first use in this function)

which was introduced by:

  commit a113fb39df43546c704aa8eba55720da9a9dfedd
  Author: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
  Date:   Fri Dec 20 18:34:53 2013 -0300

  board: nios2: Add CONFIG_CFI_FLASH_MTD guard to flash.h header include

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Cc: Thomas Chou <thomas@wytron.com.tw>
Reported-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
board/altera/nios2-generic/nios2-generic.c