orion5x: allow overriding default mappings windows
PATCH 1/1 orion5x: allow overriding default mappings windows
Turn all ORION5X_DEF{ADR,SZ}_xxx macros into ORION5X_{ADR,SZ}_xxx and allow defining them from board code to override defaults. This is particularly useful for defining board-specific FLASH address and size in board header file rather than having to tweak orion5x code.
--- arch/arm/cpu/arm926ejs/orion5x/cpu.c | 40 ++++++------ arch/arm/include/asm/arch-orion5x/cpu.h | 98 ++++++++++++++++++++++++------- 2 files changed, 97 insertions(+), 41 deletions(-)
arch/arm/cpu/arm926ejs/orion5x/cpu.c +20 -20
@@ -87,56 +87,56 @@ int orion5x_config_adr_windows(void) (struct orion5x_win_registers *)ORION5X_CPU_WIN_BASE ;/* Window 0: PCIE MEM address space */ -writel (ORION5X_CPU_WIN_CTRL_DATA (ORION5X_DEFSZ_PCIE_MEM , +writel (ORION5X_CPU_WIN_CTRL_DATA (ORION5X_SZ_PCIE_MEM ,ORION5X_TARGET_PCIE ,ORION5X_ATTR_PCIE_MEM ,ORION5X_WIN_ENABLE ), &winregs[0 ].ctrl); -writel (ORION5X_DEFADR_PCIE_MEM , &winregs[0 ].base); -writel (ORION5X_DEFADR_PCIE_MEM_REMAP_LO , &winregs[0 ].remap_lo); -writel (ORION5X_DEFADR_PCIE_MEM_REMAP_HI , &winregs[0 ].remap_hi); +writel (ORION5X_ADR_PCIE_MEM , &winregs[0 ].base); +writel (ORION5X_ADR_PCIE_MEM_REMAP_LO , &winregs[0 ].remap_lo); +writel (ORION5X_ADR_PCIE_MEM_REMAP_HI , &winregs[0 ].remap_hi);/* Window 1: PCIE IO address space */ -writel (ORION5X_CPU_WIN_CTRL_DATA (ORION5X_DEFSZ_PCIE_IO , +writel (ORION5X_CPU_WIN_CTRL_DATA (ORION5X_SZ_PCIE_IO ,ORION5X_TARGET_PCIE ,ORION5X_ATTR_PCIE_IO ,ORION5X_WIN_ENABLE ), &winregs[1 ].ctrl); -writel (ORION5X_DEFADR_PCIE_IO , &winregs[1 ].base); -writel (ORION5X_DEFADR_PCIE_IO_REMAP_LO , &winregs[1 ].remap_lo); -writel (ORION5X_DEFADR_PCIE_IO_REMAP_HI , &winregs[1 ].remap_hi); +writel (ORION5X_ADR_PCIE_IO , &winregs[1 ].base); +writel (ORION5X_ADR_PCIE_IO_REMAP_LO , &winregs[1 ].remap_lo); +writel (ORION5X_ADR_PCIE_IO_REMAP_HI , &winregs[1 ].remap_hi);/* Window 2: PCI MEM address space */ -writel (ORION5X_CPU_WIN_CTRL_DATA (ORION5X_DEFSZ_PCI_MEM , +writel (ORION5X_CPU_WIN_CTRL_DATA (ORION5X_SZ_PCI_MEM ,ORION5X_TARGET_PCI ,ORION5X_ATTR_PCI_MEM ,ORION5X_WIN_ENABLE ), &winregs[2 ].ctrl); -writel (ORION5X_DEFADR_PCI_MEM , &winregs[2 ].base); +writel (ORION5X_ADR_PCI_MEM , &winregs[2 ].base);/* Window 3: PCI IO address space */ -writel (ORION5X_CPU_WIN_CTRL_DATA (ORION5X_DEFSZ_PCI_IO , +writel (ORION5X_CPU_WIN_CTRL_DATA (ORION5X_SZ_PCI_IO ,ORION5X_TARGET_PCI ,ORION5X_ATTR_PCI_IO ,ORION5X_WIN_ENABLE ), &winregs[3 ].ctrl); -writel (ORION5X_DEFADR_PCI_IO , &winregs[3 ].base); +writel (ORION5X_ADR_PCI_IO , &winregs[3 ].base);/* Window 4: DEV_CS0 address space */ -writel (ORION5X_CPU_WIN_CTRL_DATA (ORION5X_DEFSZ_DEV_CS0 , +writel (ORION5X_CPU_WIN_CTRL_DATA (ORION5X_SZ_DEV_CS0 ,ORION5X_TARGET_DEVICE ,ORION5X_ATTR_DEV_CS0 ,ORION5X_WIN_ENABLE ), &winregs[4 ].ctrl); -writel (ORION5X_DEFADR_DEV_CS0 , &winregs[4 ].base); +writel (ORION5X_ADR_DEV_CS0 , &winregs[4 ].base);/* Window 5: DEV_CS1 address space */ -writel (ORION5X_CPU_WIN_CTRL_DATA (ORION5X_DEFSZ_DEV_CS1 , +writel (ORION5X_CPU_WIN_CTRL_DATA (ORION5X_SZ_DEV_CS1 ,ORION5X_TARGET_DEVICE ,ORION5X_ATTR_DEV_CS1 ,ORION5X_WIN_ENABLE ), &winregs[5 ].ctrl); -writel (ORION5X_DEFADR_DEV_CS1 , &winregs[5 ].base); +writel (ORION5X_ADR_DEV_CS1 , &winregs[5 ].base);/* Window 6: DEV_CS2 address space */ -writel (ORION5X_CPU_WIN_CTRL_DATA (ORION5X_DEFSZ_DEV_CS2 , +writel (ORION5X_CPU_WIN_CTRL_DATA (ORION5X_SZ_DEV_CS2 ,ORION5X_TARGET_DEVICE ,ORION5X_ATTR_DEV_CS2 ,ORION5X_WIN_ENABLE ), &winregs[6 ].ctrl); -writel (ORION5X_DEFADR_DEV_CS2 , &winregs[6 ].base); +writel (ORION5X_ADR_DEV_CS2 , &winregs[6 ].base);/* Window 7: BOOT Memory address space */ -writel (ORION5X_CPU_WIN_CTRL_DATA (ORION5X_DEFSZ_BOOTROM , +writel (ORION5X_CPU_WIN_CTRL_DATA (ORION5X_SZ_BOOTROM ,ORION5X_TARGET_DEVICE ,ORION5X_ATTR_BOOTROM ,ORION5X_WIN_ENABLE ), &winregs[7 ].ctrl); -writel (ORION5X_DEFADR_BOOTROM , &winregs[7 ].base); +writel (ORION5X_ADR_BOOTROM , &winregs[7 ].base);return 0 ; }
arch/arm/include/asm/arch-orion5x/cpu.h +77 -21
112 lines not on this page · raw message
Signature · 1 line
1.6.4.4
PATCH 1/1 orion5x: allow overriding default mappings windows
Hi all,
Le 13/07/2010 09:04, Albert Aribaud a ?crit :
Quoted 8 lines
Turn all ORION5X_DEF{ADR,SZ}_xxx macros into ORION5X_{ADR,SZ}_xxx and allow defining them from board code to override defaults. This is particularly useful for defining board-specific FLASH address and size in board header file rather than having to tweak orion5x code.
Signed-off-by Albert Aribaud<[email protected]>---
This patch is needed by Rogan Dawes for supporting dns323, which requires the BOOTCS window to be mapped differently from what is defined in Orion5x for ED Mini V2.
Does it require someone's ack?
If not, what should I do next to get it in?
Amicalement,
Signature · 1 line
Albert.
PATCH 1/1 orion5x: allow overriding default mappings windows
Quoted 23 lines
-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Albert ARIBAUD
Sent: Sunday, August 08, 2010 2:13 PM
To: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH] orion5x: allow overriding default mappings windowsHi all,
Le 13/07/2010 09:04, Albert Aribaud a ?crit :
Quoted 8 lines
Turn all ORION5X_DEF{ADR,SZ}_xxx macros into ORION5X_{ADR,SZ}_xxx and allow defining them from board code to override defaults. This is particularly useful for defining board-specific FLASH address and size in board header file rather than having to tweak orion5x code.
Signed-off-by Albert Aribaud<[email protected]>---
Quoted 8 lines
This patch is needed by Rogan Dawes for supporting dns323, which requires the BOOTCS window to be mapped differently from what is defined
in Orion5x for ED Mini V2.Does it require someone's ack?
If not, what should I do next to get it in?
All well done Albert, I am pulling them. Thanks for your good work
Regards..
Prafulla . .
PATCH 1/1 orion5x: allow overriding default mappings windows
Le 09/08/2010 07:39, Prafulla Wadaskar a ?crit :
Quoted 28 lines
Quoted 28 lines
-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Albert ARIBAUD
Sent: Sunday, August 08, 2010 2:13 PM
To: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH] orion5x: allow overriding default mappings windowsHi all,
Le 13/07/2010 09:04, Albert Aribaud a ?crit :
Quoted 8 lines
Turn all ORION5X_DEF{ADR,SZ}_xxx macros into ORION5X_{ADR,SZ}_xxx and allow defining them from board code to override defaults. This is particularly useful for defining board-specific FLASH address and size in board header file rather than having to tweak orion5x code.
Signed-off-by Albert Aribaud<[email protected]>---
This patch is needed by Rogan Dawes for supporting dns323, which requires the BOOTCS window to be mapped differently from what is defined
in Orion5x for ED Mini V2.
Quoted 8 lines
Quoted 3 lines
Does it require someone's ack?
If not, what should I do next to get it in?
All well done Albert, I am pulling them. Thanks for your good work
Regards..
Prafulla . .
Thanks Prafulla!
Amicalement,
Signature · 1 line
Albert.
PATCH 1/1 orion5x: allow overriding default mappings windows
In reply to Albert AribaudDear Albert Aribaud,
Quoted 11 lines · In message <[email protected]> you wrote:
Turn all ORION5X_DEF{ADR,SZ}_xxx macros into ORION5X_{ADR,SZ}_xxx and allow defining them from board code to override defaults. This is particularly useful for defining board-specific FLASH address and size in board header file rather than having to tweak orion5x code.
Signed-off-by Albert Aribaud <[email protected]>--- arch/arm/cpu/arm926ejs/orion5x/cpu.c | 40 ++++++------ arch/arm/include/asm/arch-orion5x/cpu.h | 98 ++++++++++++++++++++++++------- 2 files changed, 97 insertions(+), 41 deletions(-)
Applied to u-boot-arm #master. Thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Beware of the Turing Tar-pit in which everything is possible but nothing of interest is easy.