diff options
author | John Crispin <blogic@openwrt.org> | 2016-04-26 11:43:57 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2016-04-26 11:43:57 +0000 |
commit | 1c711ac05e058c56349bed70fabed0ac30124396 (patch) | |
tree | 5118f03928420cf06024591ba21c6eea6553f009 | |
parent | 518aa56669618d97429d8f8c62c4a162a53bc3b1 (diff) | |
download | master-187ad058-1c711ac05e058c56349bed70fabed0ac30124396.tar.gz master-187ad058-1c711ac05e058c56349bed70fabed0ac30124396.tar.bz2 master-187ad058-1c711ac05e058c56349bed70fabed0ac30124396.zip |
cns3xxx: backport pci fix for cns3xxx_write_config
Fix is required to properly set pci config bits.
Original Patch: https://patchwork.ozlabs.org/patch/596170/
Signed-off-by: Pushpal Sidhu <psidhu@gateworks.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@49248 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | target/linux/cns3xxx/patches-4.4/033-CNS3xxx-Fix-PCI-cns3xxx_write_config.patch | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/target/linux/cns3xxx/patches-4.4/033-CNS3xxx-Fix-PCI-cns3xxx_write_config.patch b/target/linux/cns3xxx/patches-4.4/033-CNS3xxx-Fix-PCI-cns3xxx_write_config.patch new file mode 100644 index 0000000000..3f5ab06ba5 --- /dev/null +++ b/target/linux/cns3xxx/patches-4.4/033-CNS3xxx-Fix-PCI-cns3xxx_write_config.patch @@ -0,0 +1,19 @@ +--- a/arch/arm/mach-cns3xxx/pcie.c ++++ b/arch/arm/mach-cns3xxx/pcie.c +@@ -220,13 +220,13 @@ static void cns3xxx_write_config(struct + u32 mask = (0x1ull << (size * 8)) - 1; + int shift = (where % 4) * 8; + +- v = readl_relaxed(base + (where & 0xffc)); ++ v = readl_relaxed(base); + + v &= ~(mask << shift); + v |= (val & mask) << shift; + +- writel_relaxed(v, base + (where & 0xffc)); +- readl_relaxed(base + (where & 0xffc)); ++ writel_relaxed(v, base); ++ readl_relaxed(base); + } + + static void __init cns3xxx_pcie_hw_init(struct cns3xxx_pcie *cnspci) |