arm: mvebu: maxbcm: Fix compilation warning and add Spansion SPI NOR support
authorStefan Roese <sr@denx.de>
Mon, 19 Jan 2015 10:33:39 +0000 (11:33 +0100)
committerLuka Perkov <luka.perkov@sartura.hr>
Fri, 6 Feb 2015 16:25:08 +0000 (17:25 +0100)
This patch fixes the following compilation warning for maxbcm:

Building maxbcm board...
   text    data     bss     dec     hex filename
 160075    6596   38240  204911   3206f ./u-boot
board/maxbcm/maxbcm.c: In function 'reset_phy':
board/maxbcm/maxbcm.c:68:6: warning: unused variable 'reg' [-Wunused-variable]
  u16 reg;
      ^
board/maxbcm/maxbcm.c:66:6: warning: unused variable 'devadr' [-Wunused-variable]
  u16 devadr = CONFIG_PHY_BASE_ADDR;
      ^

Additionally support Spansion SPI NOR flash is added. With larger SPI device
support via the CONFIG_SPI_FLASH_BAR define.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Luka Perkov <luka.perkov@sartura.hr>
board/maxbcm/maxbcm.c
include/configs/maxbcm.h

index a833cc3501f4b2c1e4a6e4a7dcfab2ba32c7276a..46b16ac29ccc843aaeeb85c42818d1638aaff9df 100644 (file)
@@ -142,9 +142,7 @@ int checkboard(void)
 /* Configure and enable MV88E6185 switch */
 void reset_phy(void)
 {
-       u16 devadr = CONFIG_PHY_BASE_ADDR;
        char *name = "neta0";
-       u16 reg;
 
        if (miiphy_set_current_dev(name))
                return;
index 4e962a3604e6355d12bf5d1e82ae3db275a0ec93..5999d6014678afe35743118a91238ed89db5b48b 100644 (file)
@@ -43,6 +43,8 @@
 #define CONFIG_SF_DEFAULT_SPEED                1000000
 #define CONFIG_SF_DEFAULT_MODE         SPI_MODE_3
 #define CONFIG_SPI_FLASH_STMICRO
+#define CONFIG_SPI_FLASH_SPANSION
+#define CONFIG_SPI_FLASH_BAR
 
 /* Environment in SPI NOR flash */
 #define CONFIG_ENV_IS_IN_SPI_FLASH