Merge branch 'master' of github:OpenIPC/firmware

pull/172/head
Igor Zalatov (from Citadel PC) 2022-02-08 13:59:43 +03:00
commit 553bb37548
2 changed files with 30 additions and 12 deletions

View File

@ -1,5 +1,14 @@
--- a/drivers/mtd/spi-nor/spi-nor.c --- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -1107,7 +1107,7 @@
.reads[SNOR_MIDX_1_1_4] = SNOR_OP_READ(0, 8, SPINOR_OP_READ_1_1_4),
.reads[SNOR_MIDX_1_4_4] = SNOR_OP_READ(0, 24, SPINOR_OP_READ_1_4_4),
- .wr_modes = SNOR_WR_MODES,
+ .wr_modes = SNOR_MODE_1_1_1,
.page_programs[SNOR_MIDX_1_1_1] = SPINOR_OP_PP,
.page_programs[SNOR_MIDX_1_1_4] = SPINOR_OP_PP_1_1_4,
@@ -2251,6 +2251,8 @@ @@ -2251,6 +2251,8 @@
/* read the BP bit in RDSR to check whether nor is lock or not */ /* read the BP bit in RDSR to check whether nor is lock or not */
switch (JEDEC_MFR(info)) { switch (JEDEC_MFR(info)) {
@ -9,6 +18,15 @@
case SNOR_MFR_ESMT: case SNOR_MFR_ESMT:
case SNOR_MFR_EON: case SNOR_MFR_EON:
case SNOR_MFR_SPANSION: case SNOR_MFR_SPANSION:
@@ -2607,6 +2609,8 @@
/* NOR protection support for STmicro/Micron chips and similar */
if (JEDEC_MFR(info) == SNOR_MFR_MICRON ||
JEDEC_MFR(info) == SNOR_MFR_WINBOND ||
+ JEDEC_MFR(info) == SNOR_MFR_XTX ||
+ JEDEC_MFR(info) == SNOR_MFR_FM ||
info->flags & SPI_NOR_HAS_LOCK) {
nor->flash_lock = stm_lock;
nor->flash_unlock = stm_unlock;
--- a/include/linux/mtd/spi-nor.h --- a/include/linux/mtd/spi-nor.h
+++ b/include/linux/mtd/spi-nor.h +++ b/include/linux/mtd/spi-nor.h
@@ -31,6 +31,7 @@ @@ -31,6 +31,7 @@

View File

@ -1,18 +1,18 @@
#!/bin/sh #!/bin/sh
soc=$(fw_printenv -n soc) || (>&2 echo "SOC not defined in U-Boot ENV"; exit 1) soc=$(fw_printenv -n soc) || (>&2 echo "SOC not defined in U-Boot ENV"; exit 1)
vendor=$(fw_printenv -n vendor) || (>&2 echo "Vendor not defined in U-Boot ENV"; exit 1) manufacturer=$(fw_printenv -n manufacturer) || (>&2 echo "Manufacturer not defined in U-Boot ENV"; exit 1)
# devid=$(fw_printenv -n devid) || (>&2 echo "Device ID not defined in U-Boot ENV"; exit 1) # devid=$(fw_printenv -n devid) || (>&2 echo "Device ID not defined in U-Boot ENV"; exit 1)
case ${vendor} in case ${manufacturer} in
anjoy) Anjoy)
case ${soc} in case ${soc} in
ssc335|ssc337|ssc337de) ssc335|ssc337|ssc337de)
gpio="ircut1=78 ircut2=79 light=61" gpio="ircut1=78 ircut2=79 light=61"
;; ;;
esac esac
;; ;;
camhi|hichip|xin) Camhi|Hichip|Xin)
case ${soc} in case ${soc} in
hi3516ev200|gk7205v200) hi3516ev200|gk7205v200)
gpio="usb_ena=-9" gpio="usb_ena=-9"
@ -25,7 +25,7 @@ case ${vendor} in
;; ;;
esac esac
;; ;;
herospeed|longsee|cantonk) Herospeed|Longsee|Cantonk)
case ${soc} in case ${soc} in
hi3516ev200|gk7205v200) hi3516ev200|gk7205v200)
gpio="ircut1=12 ircut2=13 irctl=4 alm_in=15 alm_out=14" gpio="ircut1=12 ircut2=13 irctl=4 alm_in=15 alm_out=14"
@ -38,14 +38,14 @@ case ${vendor} in
;; ;;
esac esac
;; ;;
jabsco) Jabsco)
case ${soc} in case ${soc} in
hi3516ev200|gk7205v200) hi3516ev200|gk7205v200)
gpio="ircut1=52 ircut2=53 irstatus=9" gpio="ircut1=52 ircut2=53 irstatus=9"
;; ;;
esac esac
;; ;;
jvt) Jvt)
case ${soc} in case ${soc} in
hi3516cv200) hi3516cv200)
gpio="ircut1=64 ircut2=65 light=62" gpio="ircut1=64 ircut2=65 light=62"
@ -55,28 +55,28 @@ case ${vendor} in
;; ;;
esac esac
;; ;;
juan|sannce) Juan|Sannce)
case ${soc} in case ${soc} in
hi3518ev200) hi3518ev200)
gpio="ircut1=65 ircut2=64 irstatus=-62" gpio="ircut1=65 ircut2=64 irstatus=-62"
;; ;;
esac esac
;; ;;
tiandy) Tiandy)
case ${soc} in case ${soc} in
hi3518ev200) hi3518ev200)
gpio="ircut1=78 ircut2=79 irctl=37" gpio="ircut1=78 ircut2=79 irctl=37"
;; ;;
esac esac
;; ;;
uniview) Uniview)
case ${soc} in case ${soc} in
hi3516ev300|gk7205v300) hi3516ev300|gk7205v300)
gpio="ircut1=63 ircut2=67 reset=" gpio="ircut1=63 ircut2=67 reset="
;; ;;
esac esac
;; ;;
xm) Xiongmai)
case ${soc} in case ${soc} in
hi3516ev200|gk7205v200) hi3516ev200|gk7205v200)
gpio="ircut1=8 ircut=29 irstatus=15 irctl=16 alm_in=4,53 alm_out=55 eth_act=14 eth_sta=12 reset=0" gpio="ircut1=8 ircut=29 irstatus=15 irctl=16 alm_in=4,53 alm_out=55 eth_act=14 eth_sta=12 reset=0"
@ -95,7 +95,7 @@ case ${vendor} in
;; ;;
esac esac
;; ;;
zenotech|videopark) Zenotech|Videopark)
case ${soc} in case ${soc} in
hi3516ev300|gk7205v300) hi3516ev300|gk7205v300)
gpio="ircut1=40 ircut2=41 irctl=65" gpio="ircut1=40 ircut2=41 irctl=65"