From f669c270e31ba3b9f3660a8489bcb42706c54ada Mon Sep 17 00:00:00 2001 From: "Igor Zalatov (from Citadel PC)" Date: Tue, 19 Apr 2022 21:46:21 +0300 Subject: [PATCH] Add xtx-spi-nor-bpnum4 patch --- .../patches/16-xtx-spi-nor-bpnum4.patch | 28 +++++++++++++++++++ ...0_gk7205v200_disable_second_spi_bus.patch} | 0 2 files changed, 28 insertions(+) create mode 100644 br-ext-chip-goke/board/gk7205v200/kernel/patches/16-xtx-spi-nor-bpnum4.patch rename br-ext-chip-goke/board/gk7205v200/kernel/patches/{16_gk7205v200_disable_second_spi_bus.patch => 20_gk7205v200_disable_second_spi_bus.patch} (100%) diff --git a/br-ext-chip-goke/board/gk7205v200/kernel/patches/16-xtx-spi-nor-bpnum4.patch b/br-ext-chip-goke/board/gk7205v200/kernel/patches/16-xtx-spi-nor-bpnum4.patch new file mode 100644 index 00000000..5adb998b --- /dev/null +++ b/br-ext-chip-goke/board/gk7205v200/kernel/patches/16-xtx-spi-nor-bpnum4.patch @@ -0,0 +1,28 @@ +--- a/drivers/mtd/spi-nor/spi-nor.c ++++ b/drivers/mtd/spi-nor/spi-nor.c +@@ -2258,7 +2258,6 @@ + switch (JEDEC_MFR(info)) { + case SNOR_MFR_GD: + case SNOR_MFR_FM: +- case SNOR_MFR_XTX: + case SNOR_MFR_ESMT: + case SNOR_MFR_EON: + case SNOR_MFR_SPANSION: +@@ -2273,12 +2272,17 @@ + nor->level = bsp_bp_to_level(nor, info, BP_NUM_4); + break; + case SNOR_MFR_MACRONIX: ++ + /* BP bit convert to lock level */ + if (chipsize <= _8M) + nor->level = bsp_bp_to_level(nor, info, BP_NUM_3); + else + nor->level = bsp_bp_to_level(nor, info, BP_NUM_4); + break; ++ case SNOR_MFR_XTX: ++ /* BP bit convert to lock level */ ++ nor->level = bsp_bp_to_level(nor, info, BP_NUM_4); ++ break; + default: + goto usage; + } diff --git a/br-ext-chip-goke/board/gk7205v200/kernel/patches/16_gk7205v200_disable_second_spi_bus.patch b/br-ext-chip-goke/board/gk7205v200/kernel/patches/20_gk7205v200_disable_second_spi_bus.patch similarity index 100% rename from br-ext-chip-goke/board/gk7205v200/kernel/patches/16_gk7205v200_disable_second_spi_bus.patch rename to br-ext-chip-goke/board/gk7205v200/kernel/patches/20_gk7205v200_disable_second_spi_bus.patch