Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFS Gluon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
firmware
FFS Gluon
Commits
1ccd24df
Commit
1ccd24df
authored
8 years ago
by
Matthias Schiffer
Browse files
Options
Downloads
Patches
Plain Diff
generic: mtd: spi-nor: always disable software protection
Fixes unwriteable flash when the bootloader leaves it protected.
parent
d5f5ce74
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
patches/openwrt/0020-generic-mtd-spi-nor-always-disable-software-protection.patch
+50
-0
50 additions, 0 deletions
...eric-mtd-spi-nor-always-disable-software-protection.patch
with
50 additions
and
0 deletions
patches/openwrt/0020-generic-mtd-spi-nor-always-disable-software-protection.patch
0 → 100644
+
50
−
0
View file @
1ccd24df
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sat, 26 Mar 2016 13:20:41 +0100
Subject: generic: mtd: spi-nor: always disable software protection
Fixes unwriteable flash when the bootloader leaves it protected.
diff --git a/target/linux/generic/patches-3.18/462-m25p80-always-disable-software-protection.patch b/target/linux/generic/patches-3.18/462-m25p80-always-disable-software-protection.patch
new file mode 100644
index 0000000..7be7d0f
--- /dev/null
+++ b/target/linux/generic/patches-3.18/462-m25p80-always-disable-software-protection.patch
@@ -0,0 +1,22 @@
+--- a/drivers/mtd/spi-nor/spi-nor.c
++++ b/drivers/mtd/spi-nor/spi-nor.c
+@@ -957,15 +957,11 @@ int spi_nor_scan(struct spi_nor *nor, co
+
+ /*
+ * Atmel, SST and Intel/Numonyx serial nor tend to power
+- * up with the software protection bits set
++ * up with the software protection bits set;
++ * others may be left protected by the bootloader
+ */
+-
+- if (JEDEC_MFR(info->jedec_id) == CFI_MFR_ATMEL ||
+- JEDEC_MFR(info->jedec_id) == CFI_MFR_INTEL ||
+- JEDEC_MFR(info->jedec_id) == CFI_MFR_SST) {
+- write_enable(nor);
+- write_sr(nor, 0);
+- }
++ write_enable(nor);
++ write_sr(nor, 0);
+
+ if (!mtd->name)
+ mtd->name = dev_name(dev);
diff --git a/target/linux/generic/patches-3.18/462-m25p80-mx-disable-software-protection.patch b/target/linux/generic/patches-3.18/462-m25p80-mx-disable-software-protection.patch
deleted file mode 100644
index d7d7eec..0000000
--- a/target/linux/generic/patches-3.18/462-m25p80-mx-disable-software-protection.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/drivers/mtd/spi-nor/spi-nor.c
-+++ b/drivers/mtd/spi-nor/spi-nor.c
-@@ -962,6 +962,7 @@ int spi_nor_scan(struct spi_nor *nor, co
-
- 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) {
- write_enable(nor);
- write_sr(nor, 0);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment