aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/patches-4.9/0154-lantiq-pci-bar11mask-fix.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2017-02-11 15:52:41 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2017-02-11 23:44:13 +0100
commit863e79f8d5544a8a884375d7e867f350fddca9b9 (patch)
tree6c95efffd7d7db4df17dbfae7d108fdd20b99926 /target/linux/lantiq/patches-4.9/0154-lantiq-pci-bar11mask-fix.patch
parentca9b9969fb3f3853f7c6beb43bd496d90c7efe80 (diff)
downloadupstream-863e79f8d5544a8a884375d7e867f350fddca9b9.tar.gz
upstream-863e79f8d5544a8a884375d7e867f350fddca9b9.tar.bz2
upstream-863e79f8d5544a8a884375d7e867f350fddca9b9.zip
lantiq: add support for kernel 4.9
The following patches were dropped because they are already applied upstream: 0012-pinctrl-lantiq-fix-up-pinmux.patch 0013-MTD-lantiq-xway-fix-invalid-operator.patch 0014-MTD-lantiq-xway-the-latched-command-should-be-persis.patch 0015-MTD-lantiq-xway-remove-endless-loop.patch 0016-MTD-lantiq-xway-add-missing-write_buf-and-read_buf-t.patch 0017-MTD-xway-fix-nand-locking.patch 0044-pinctrl-lantiq-introduce-new-dedicated-devicetree-bi.patch 0045-pinctrl-lantiq-Fix-GPIO-Setup-of-GPIO-Port3.patch 0046-pinctrl-lantiq-2-pins-have-the-wrong-mux-list.patch 0047-irq-fixes.patch 0047-mtd-plat-nand-pass-of-node.patch 0060-usb-dwc2-Add-support-for-Lantiq-ARX-and-XRX-SoCs.patch 0120-MIPS-lantiq-add-support-for-device-tree-file-from-bo.patch 0121-MIPS-lantiq-make-it-possible-to-build-in-no-device-t.patch 122-MIPS-store-the-appended-dtb-address-in-a-variable.patch The PHY driver was reduced to the code adding the LED configuration, the rest is already upstream: 0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch The SPI driver was replaced with the version pending for upstream inclusion: New driver: 0090-spi-add-transfer_status-callback.patch 0091-spi-lantiq-ssc-add-support-for-Lantiq-SSC-SPI-controller.patch Old driver: 0100-spi-add-support-for-Lantiq-SPI-controller.patch Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'target/linux/lantiq/patches-4.9/0154-lantiq-pci-bar11mask-fix.patch')
-rw-r--r--target/linux/lantiq/patches-4.9/0154-lantiq-pci-bar11mask-fix.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/target/linux/lantiq/patches-4.9/0154-lantiq-pci-bar11mask-fix.patch b/target/linux/lantiq/patches-4.9/0154-lantiq-pci-bar11mask-fix.patch
new file mode 100644
index 0000000000..d0acd4bb10
--- /dev/null
+++ b/target/linux/lantiq/patches-4.9/0154-lantiq-pci-bar11mask-fix.patch
@@ -0,0 +1,22 @@
+--- a/arch/mips/pci/pci-lantiq.c
++++ b/arch/mips/pci/pci-lantiq.c
+@@ -61,6 +61,8 @@
+ #define ltq_pci_cfg_w32(x, y) ltq_w32((x), ltq_pci_mapped_cfg + (y))
+ #define ltq_pci_cfg_r32(x) ltq_r32(ltq_pci_mapped_cfg + (x))
+
++extern u32 max_low_pfn;
++
+ __iomem void *ltq_pci_mapped_cfg;
+ static __iomem void *ltq_pci_membase;
+
+@@ -86,8 +88,8 @@ static inline u32 ltq_calc_bar11mask(voi
+ u32 mem, bar11mask;
+
+ /* BAR11MASK value depends on available memory on system. */
+- mem = get_num_physpages() * PAGE_SIZE;
+- bar11mask = (0x0ffffff0 & ~((1 << (fls(mem) - 1)) - 1)) | 8;
++ mem = max_low_pfn << PAGE_SHIFT;
++ bar11mask = ((-roundup_pow_of_two(mem)) & 0x0F000000) | 8;
+
+ return bar11mask;
+ }