openwrt/target/linux/ramips/patches-5.10
Chuanhong Guo 2f024b7933 ramips: mt7621: do memory detection on KSEG1
It's reported that current memory detection code occasionally detects
larger memory under some bootloaders.
Current memory detection code tests whether address space wraps around
on KSEG0, which is unreliable because it's cached.

Rewrite memory size detection to perform the same test on KSEG1 instead.
While at it, this patch also does the following two things:
1. use a fixed pattern instead of a random function pointer as the magic
   value.
2. add an additional memory write and a second comparison as part of the
   test to prevent possible smaller memory detection result due to
   leftover values in memory.

Fixes: 6d91ddf517 ("ramips: mt7621: add support for memory detection")
Reported-by: Rui Salvaterra <rsalvaterra@gmail.com>
Tested-by: Rui Salvaterra <rsalvaterra@gmail.com>
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2022-02-14 11:59:12 +08:00
..
020-mips-ralink-manage-low-reset-lines.patch ramips: 5.10: rename patches to follow guide 2021-03-06 11:24:12 +01:00
200-add-ralink-eth.patch kernel: bump 5.10 to 5.10.75 2021-10-21 00:17:36 +02:00
201-MIPS-ralink-rt288x-select-MIPS_AUTO_PFN_OFFSET.patch ramips: rt288x: replace hack with a kconfig change 2021-04-15 00:00:54 +08:00
203-staging-mt7621-pci-phy-kconfig-select-regmap-mmio.patch ramips: 5.10: port and refresh patches, ralink drv 2021-03-06 11:24:12 +01:00
300-mt7620-export-chip-version-and-pkg.patch ramips: 5.10: copy patches from 5.4 2021-03-06 11:24:12 +01:00
311-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch ramips: 5.10: port and refresh patches, ralink drv 2021-03-06 11:24:12 +01:00
312-MIPS-ralink-add-cpu-frequency-scaling.patch ramips: 5.10: port and refresh patches, ralink drv 2021-03-06 11:24:12 +01:00
314-MIPS-add-bootargs-override-property.patch ramips: 5.10: port and refresh patches, ralink drv 2021-03-06 11:24:12 +01:00
315-owrt-hack-fix-mt7688-cache-issue.patch ramips: 5.10: port and refresh patches, ralink drv 2021-03-06 11:24:12 +01:00
316-arch-mips-do-not-select-illegal-access-driver-by-def.patch ramips: 5.10: rename patches to follow guide 2021-03-06 11:24:12 +01:00
320-MIPS-add-support-for-buggy-MT7621S-core-detection.patch ramips: replace mt7621s hack with upstream patch 2021-04-17 21:56:05 +02:00
322-mt7621-fix-cpu-clk-add-clkdev.patch ramips: replace mt7621s hack with upstream patch 2021-04-17 21:56:05 +02:00
323-mt7621-memory-detect.patch kernel: bump 5.10 to 5.10.42 2021-06-06 00:24:07 +02:00
324-mt7621-perfctr-fix.patch ramips: 5.10: rename patches to follow guide 2021-03-06 11:24:12 +01:00
325-mt7621-fix-memory-detect.patch ramips: mt7621: do memory detection on KSEG1 2022-02-14 11:59:12 +08:00
400-mtd-cfi-cmdset-0002-force-word-write.patch ramips: 5.10: rename patches to follow guide 2021-03-06 11:24:12 +01:00
405-mtd-spi-nor-Add-support-for-BoHong-bh25q128as.patch kernel: 5.10: drop broken-flash-reset patch 2022-01-28 21:03:10 +08:00
410-mtd-rawnand-add-driver-support-for-MT7621-nand-flash.patch ramips: mt7621_nand: fix writing upper half of fdm data 2022-01-13 18:33:06 +01:00
411-dt-bindings-add-documentation-for-mt7621-nand-driver.patch ramips: 5.10: rename patches to follow guide 2021-03-06 11:24:12 +01:00
700-net-ethernet-mediatek-support-net-labels.patch kernel: bump 5.10 to 5.10.98 2022-02-11 23:17:40 +01:00
710-at803x.patch kernel: bump 5.10 to 5.10.76 2021-10-30 21:17:20 +02:00
720-Revert-net-phy-simplify-phy_link_change-arguments.patch kernel: bump 5.10 to 5.10.83 2021-12-12 21:11:30 +01:00
721-NET-no-auto-carrier-off-support.patch kernel: bump 5.10 to 5.10.80 2021-11-19 09:40:29 +00:00
801-DT-Add-documentation-for-gpio-ralink.patch ramips: gpio-ralink: use ngpios, not ralink,num-gpios 2021-04-15 00:00:54 +08:00
802-GPIO-MIPS-ralink-add-gpio-driver-for-ralink-SoC.patch ramips: gpio-ralink: use ngpios, not ralink,num-gpios 2021-04-15 00:00:54 +08:00
803-gpio-ralink-Add-support-for-GPIO-as-interrupt-contro.patch ramips: 5.10: rename patches to follow guide 2021-03-06 11:24:12 +01:00
804-staging-mt7621-pinctrl-use-ngpios-not-num-gpios.patch ramips: gpio-ralink: use ngpios, not ralink,num-gpios 2021-04-15 00:00:54 +08:00
805-pinctrl-AW9523.patch ramips: add AW9523 I2C GPIO expander driver 2021-06-27 21:40:15 +02:00
810-uvc-add-iPassion-iP2970-support.patch kernel: bump 5.10 to 5.10.92 2022-01-16 20:51:14 +01:00
820-DT-Add-documentation-for-spi-rt2880.patch ramips: 5.10: rename patches to follow guide 2021-03-06 11:24:12 +01:00
821-SPI-ralink-add-Ralink-SoC-spi-driver.patch ramips: 5.10: port and refresh patches, ralink drv 2021-03-06 11:24:12 +01:00
825-i2c-MIPS-adds-ralink-I2C-driver.patch ramips: 5.10: port and refresh patches, ralink drv 2021-03-06 11:24:12 +01:00
830-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch ramips: 5.10: port and refresh patches, ralink drv 2021-03-06 11:24:12 +01:00
835-asoc-add-mt7620-support.patch ramips: fix ralink_i2s_debugfs_remove declaration 2021-11-20 21:08:25 +01:00
840-serial-add-ugly-custom-baud-rate-hack.patch kernel: bump 5.10 to 5.10.80 2021-11-19 09:40:29 +00:00
845-pwm-add-mediatek-support.patch ramips: 5.10: port and refresh patches, ralink drv 2021-03-06 11:24:12 +01:00
850-awake-rt305x-dwc2-controller.patch ramips: 5.10: port and refresh patches, ralink drv 2021-03-06 11:24:12 +01:00
855-linkit_bootstrap.patch ramips: 5.10: port and refresh patches, ralink drv 2021-03-06 11:24:12 +01:00