CC: bcm53xx: make patches apply again
authorHauke Mehrtens <hauke@openwrt.org>
Tue, 1 Mar 2016 22:11:12 +0000 (22:11 +0000)
committerHauke Mehrtens <hauke@openwrt.org>
Tue, 1 Mar 2016 22:11:12 +0000 (22:11 +0000)
Commit r48849 changed the drivers/mtd/spi-nor/spi-nor.c file and broke
this patch in bcm53xx.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
git-svn-id: svn://svn.openwrt.org/openwrt/branches/chaos_calmer@48871 3c298f89-4303-0410-b956-a3cf2f4a3e73

target/linux/bcm53xx/patches-3.18/003-mtd-spi-nor-from-3.19.patch

index 8150979..e120973 100644 (file)
                if (IS_ERR(jid)) {
                        return PTR_ERR(jid);
                } else if (jid != id) {
-@@ -965,9 +984,9 @@ int spi_nor_scan(struct spi_nor *nor, co
+@@ -965,10 +984,10 @@ int spi_nor_scan(struct spi_nor *nor, co
         * up with the software protection bits set
         */
  
 -      if (JEDEC_MFR(info->jedec_id) == CFI_MFR_ATMEL ||
 -          JEDEC_MFR(info->jedec_id) == CFI_MFR_INTEL ||
+-          JEDEC_MFR(info->jedec_id) == CFI_MFR_MACRONIX ||
 -          JEDEC_MFR(info->jedec_id) == CFI_MFR_SST) {
 +      if (JEDEC_MFR(info) == CFI_MFR_ATMEL ||
 +          JEDEC_MFR(info) == CFI_MFR_INTEL ||
++          JEDEC_MFR(info) == CFI_MFR_MACRONIX ||
 +          JEDEC_MFR(info) == CFI_MFR_SST) {
                write_enable(nor);
                write_sr(nor, 0);
        }
-@@ -982,7 +1001,7 @@ int spi_nor_scan(struct spi_nor *nor, co
+@@ -983,7 +1002,7 @@ int spi_nor_scan(struct spi_nor *nor, co
        mtd->_read = spi_nor_read;
  
        /* nor protection support for STmicro chips */
                mtd->_lock = spi_nor_lock;
                mtd->_unlock = spi_nor_unlock;
        }
-@@ -993,9 +1012,8 @@ int spi_nor_scan(struct spi_nor *nor, co
+@@ -994,9 +1013,8 @@ int spi_nor_scan(struct spi_nor *nor, co
        else
                mtd->_write = spi_nor_write;
  
  
  #ifdef CONFIG_MTD_SPI_NOR_USE_4K_SECTORS
        /* prefer "small sector" erase if possible */
-@@ -1036,7 +1054,7 @@ int spi_nor_scan(struct spi_nor *nor, co
+@@ -1037,7 +1055,7 @@ int spi_nor_scan(struct spi_nor *nor, co
  
        /* Quad/Dual-read mode takes precedence over fast/normal */
        if (mode == SPI_NOR_QUAD && info->flags & SPI_NOR_QUAD_READ) {
                if (ret) {
                        dev_err(dev, "quad mode not supported\n");
                        return ret;
-@@ -1072,7 +1090,7 @@ int spi_nor_scan(struct spi_nor *nor, co
+@@ -1073,7 +1091,7 @@ int spi_nor_scan(struct spi_nor *nor, co
        else if (mtd->size > 0x1000000) {
                /* enable 4-byte addressing if the device exceeds 16MiB */
                nor->addr_width = 4;
                        /* Dedicated 4-byte command set */
                        switch (nor->flash_read) {
                        case SPI_NOR_QUAD:
-@@ -1093,7 +1111,7 @@ int spi_nor_scan(struct spi_nor *nor, co
+@@ -1094,7 +1112,7 @@ int spi_nor_scan(struct spi_nor *nor, co
                        nor->erase_opcode = SPINOR_OP_SE_4B;
                        mtd->erasesize = info->sector_size;
                } else