]> git.sur5r.net Git - u-boot/blobdiff - drivers/mtd/spi/spi_flash.c
Merge branch 'master' of git://git.denx.de/u-boot-spi
[u-boot] / drivers / mtd / spi / spi_flash.c
index 5e5bd5d533688e059bf6206d755def448c37dd42..0ed2317554783e8f0e2b828ca177b2f4f4d3e5ba 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * SPI Flash Core
  *
@@ -5,8 +6,6 @@
  * Copyright (C) 2013 Jagannadha Sutradharudu Teki, Xilinx Inc.
  * Copyright (C) 2010 Reinhard Meyer, EMK Elektronik
  * Copyright (C) 2008 Atmel Corporation
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -21,8 +20,6 @@
 
 #include "sf_internal.h"
 
-DECLARE_GLOBAL_DATA_PTR;
-
 static void spi_flash_addr(u32 addr, u8 *cmd)
 {
        /* cmd[0] is actual command */
@@ -1205,14 +1202,15 @@ int spi_flash_scan(struct spi_flash *flash)
        flash->shift = (flash->dual_flash & SF_DUAL_PARALLEL_FLASH) ? 1 : 0;
        flash->page_size = info->page_size;
        /*
-        * The Spansion S25FL032P and S25FL064P have 256b pages, yet use the
-        * 0x4d00 Extended JEDEC code. The rest of the Spansion flashes with
-        * the 0x4d00 Extended JEDEC code have 512b pages. All of the others
-        * have 256b pages.
+        * The Spansion S25FS512S, S25FL032P and S25FL064P have 256b pages,
+        * yet use the 0x4d00 Extended JEDEC code. The rest of the Spansion
+        * flashes with the 0x4d00 Extended JEDEC code have 512b pages.
+        * All of the others have 256b pages.
         */
        if (JEDEC_EXT(info) == 0x4d00) {
                if ((JEDEC_ID(info) != 0x0215) &&
-                   (JEDEC_ID(info) != 0x0216))
+                   (JEDEC_ID(info) != 0x0216) &&
+                   (JEDEC_ID(info) != 0x0220))
                        flash->page_size = 512;
        }
        flash->page_size <<= flash->shift;