lkml.org 
[lkml]   [2015]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/5] MIPS: ath79: Fix the PCI memory size and offset of window 7
Date
The define AR71XX_PCI_MEM_SIZE miss one window, there is 7 windows,
not 6. To make things clearer, and allow simpler code, derive
AR71XX_PCI_MEM_SIZE from the newly introduced AR71XX_PCI_WIN_COUNT
and AR71XX_PCI_WIN_SIZE.

The define AR71XX_PCI_WIN7_OFFS also add a typo, fix it.

Signed-off-by: Alban Bedel <albeu@free.fr>
---
arch/mips/include/asm/mach-ath79/ar71xx_regs.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
index aa3800c..e2669a8 100644
--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
+++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
@@ -41,7 +41,9 @@
#define AR71XX_RESET_SIZE 0x100

#define AR71XX_PCI_MEM_BASE 0x10000000
-#define AR71XX_PCI_MEM_SIZE 0x07000000
+#define AR71XX_PCI_WIN_COUNT 8
+#define AR71XX_PCI_WIN_SIZE 0x01000000
+#define AR71XX_PCI_MEM_SIZE (AR71XX_PCI_WIN_COUNT * AR71XX_PCI_WIN_SIZE)

#define AR71XX_PCI_WIN0_OFFS 0x10000000
#define AR71XX_PCI_WIN1_OFFS 0x11000000
@@ -50,7 +52,7 @@
#define AR71XX_PCI_WIN4_OFFS 0x14000000
#define AR71XX_PCI_WIN5_OFFS 0x15000000
#define AR71XX_PCI_WIN6_OFFS 0x16000000
-#define AR71XX_PCI_WIN7_OFFS 0x07000000
+#define AR71XX_PCI_WIN7_OFFS 0x17000000

#define AR71XX_PCI_CFG_BASE \
(AR71XX_PCI_MEM_BASE + AR71XX_PCI_WIN7_OFFS + 0x10000)
--
2.0.0


\
 
 \ /
  Last update: 2015-04-17 15:01    [W:0.065 / U:1.968 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site