ppc/85xx: Clean up use of LAWAR defines
PATCH 1/1 ppc/85xx: Clean up use of LAWAR defines
On 85xx platforms we shouldn't be using any LAWAR_* defines but using the LAW_* ones provided by fsl-law.h. Rename any such uses and limit the LAWAR_ to the 83xx platform as the only user so we will get compile errors in the future.
Signed-off-by Kumar Gala <[email protected]>
--- board/atum8548/law.c | 2 +- board/freescale/mpc8536ds/law.c | 6 +++--- board/freescale/mpc8540ads/law.c | 2 +- board/freescale/mpc8544ds/law.c | 6 +++--- board/freescale/mpc8560ads/law.c | 2 +- board/freescale/mpc8572ds/law.c | 6 +++--- board/freescale/p1_p2_rdb/law.c | 4 ++-- board/freescale/p2020ds/law.c | 6 +++--- board/pm854/law.c | 2 +- board/pm856/law.c | 2 +- board/socrates/law.c | 4 ++-- board/stx/stxgp3/law.c | 2 +- board/stx/stxssa/law.c | 2 +- board/xes/xpedite5200/law.c | 2 +- include/asm-ppc/mmu.h | 9 ++------- 15 files changed, 26 insertions(+), 31 deletions(-)
board/atum8548/law.c +1 -1
@@ -49,7 +49,7 @@struct law_entry law_table[] = {SET_LAW (CONFIG_SYS_PCI1_MEM_PHYS ,LAW_SIZE_512M ,LAW_TRGT_IF_PCI_1 ), -SET_LAW (CONFIG_SYS_PCI1_IO_PHYS ,LAWAR_SIZE_1M ,LAW_TRGT_IF_PCI_1 ), +SET_LAW (CONFIG_SYS_PCI1_IO_PHYS ,LAW_SIZE_1M ,LAW_TRGT_IF_PCI_1 ),SET_LAW (CONFIG_SYS_PCI2_MEM_PHYS ,LAW_SIZE_512M ,LAW_TRGT_IF_PCI_2 ),SET_LAW (CONFIG_SYS_PCI2_IO_PHYS ,LAW_SIZE_1M ,LAW_TRGT_IF_PCI_2 ),SET_LAW (CONFIG_SYS_PCIE1_MEM_PHYS ,LAW_SIZE_512M ,LAW_TRGT_IF_PCIE_1 ),
board/freescale/mpc8536ds/law.c +3 -3
@@ -31,11 +31,11 @@ struct law_entry law_table[] = {SET_LAW (CONFIG_SYS_PCI1_MEM_PHYS ,LAW_SIZE_256M ,LAW_TRGT_IF_PCI ),SET_LAW (CONFIG_SYS_PCI1_IO_PHYS ,LAW_SIZE_64K ,LAW_TRGT_IF_PCI ),SET_LAW (CONFIG_SYS_FLASH_BASE_PHYS ,LAW_SIZE_256M ,LAW_TRGT_IF_LBC ), -SET_LAW (CONFIG_SYS_PCIE1_MEM_PHYS ,LAWAR_SIZE_128M ,LAW_TRGT_IF_PCIE_1 ), +SET_LAW (CONFIG_SYS_PCIE1_MEM_PHYS ,LAW_SIZE_128M ,LAW_TRGT_IF_PCIE_1 ),SET_LAW (CONFIG_SYS_PCIE1_IO_PHYS ,LAW_SIZE_64K ,LAW_TRGT_IF_PCIE_1 ), -SET_LAW (CONFIG_SYS_PCIE2_MEM_PHYS ,LAWAR_SIZE_128M ,LAW_TRGT_IF_PCIE_2 ), +SET_LAW (CONFIG_SYS_PCIE2_MEM_PHYS ,LAW_SIZE_128M ,LAW_TRGT_IF_PCIE_2 ),SET_LAW (CONFIG_SYS_PCIE2_IO_PHYS ,LAW_SIZE_64K ,LAW_TRGT_IF_PCIE_2 ), -SET_LAW (CONFIG_SYS_PCIE3_MEM_PHYS ,LAWAR_SIZE_512M ,LAW_TRGT_IF_PCIE_3 ), +SET_LAW (CONFIG_SYS_PCIE3_MEM_PHYS ,LAW_SIZE_512M ,LAW_TRGT_IF_PCIE_3 ),SET_LAW (CONFIG_SYS_PCIE3_IO_PHYS ,LAW_SIZE_64K ,LAW_TRGT_IF_PCIE_3 ),SET_LAW (PIXIS_BASE_PHYS ,LAW_SIZE_4K ,LAW_TRGT_IF_LBC ), SET_LAW(CONFIG_SYS_NAND_BASE_PHYS, LAW_SIZE_1M, LAW_TRGT_IF_LBC),
board/freescale/mpc8540ads/law.c +1 -1
@@ -52,7 +52,7 @@ struct law_entry law_table[] = {/* This is not so much the SDRAM map as it is the whole localbus map. */ SET_LAW (CONFIG_SYS_LBC_SDRAM_BASE ,LAW_SIZE_256M ,LAW_TRGT_IF_LBC ),SET_LAW (CONFIG_SYS_PCI1_IO_PHYS ,LAW_SIZE_1M ,LAW_TRGT_IF_PCI ), - SET_LAW(CONFIG_SYS_RIO_MEM_PHYS, LAWAR_SIZE_512M, LAW_TRGT_IF_RIO), + SET_LAW(CONFIG_SYS_RIO_MEM_PHYS, LAW_SIZE_512M, LAW_TRGT_IF_RIO), };int num_law_entries =ARRAY_SIZE (law_table);
board/freescale/mpc8544ds/law.c +3 -3
@@ -30,10 +30,10 @@struct law_entry law_table[] = {SET_LAW (CONFIG_SYS_PCI1_MEM_PHYS ,LAW_SIZE_512M ,LAW_TRGT_IF_PCI ),SET_LAW (CONFIG_SYS_PCI1_IO_PHYS ,LAW_SIZE_64K ,LAW_TRGT_IF_PCI ), -SET_LAW (CONFIG_SYS_LBC_NONCACHE_BASE ,LAWAR_SIZE_128M ,LAW_TRGT_IF_LBC ), -SET_LAW (CONFIG_SYS_PCIE1_MEM_PHYS ,LAWAR_SIZE_256M ,LAW_TRGT_IF_PCIE_1 ), +SET_LAW (CONFIG_SYS_LBC_NONCACHE_BASE ,LAW_SIZE_128M ,LAW_TRGT_IF_LBC ), +SET_LAW (CONFIG_SYS_PCIE1_MEM_PHYS ,LAW_SIZE_256M ,LAW_TRGT_IF_PCIE_1 ),SET_LAW (CONFIG_SYS_PCIE1_IO_PHYS ,LAW_SIZE_64K ,LAW_TRGT_IF_PCIE_1 ), -SET_LAW (CONFIG_SYS_PCIE2_MEM_PHYS ,LAWAR_SIZE_512M ,LAW_TRGT_IF_PCIE_2 ), +SET_LAW (CONFIG_SYS_PCIE2_MEM_PHYS ,LAW_SIZE_512M ,LAW_TRGT_IF_PCIE_2 ),SET_LAW (CONFIG_SYS_PCIE2_IO_PHYS ,LAW_SIZE_64K ,LAW_TRGT_IF_PCIE_2 ),/* contains both PCIE3 MEM & IO space */ SET_LAW (CONFIG_SYS_PCIE3_MEM_PHYS ,LAW_SIZE_4M ,LAW_TRGT_IF_PCIE_3 ),
board/freescale/mpc8560ads/law.c +1 -1
@@ -52,7 +52,7 @@ struct law_entry law_table[] = {/* This is not so much the SDRAM map as it is the whole localbus map. */ SET_LAW (CONFIG_SYS_LBC_SDRAM_BASE ,LAW_SIZE_256M ,LAW_TRGT_IF_LBC ),SET_LAW (CONFIG_SYS_PCI1_IO_PHYS ,LAW_SIZE_1M ,LAW_TRGT_IF_PCI ), - SET_LAW(CONFIG_SYS_RIO_MEM_PHYS, LAWAR_SIZE_512M, LAW_TRGT_IF_RIO), + SET_LAW(CONFIG_SYS_RIO_MEM_PHYS, LAW_SIZE_512M, LAW_TRGT_IF_RIO), };int num_law_entries =ARRAY_SIZE (law_table);
board/freescale/mpc8572ds/law.c +3 -3
@@ -29,11 +29,11 @@struct law_entry law_table[] = {SET_LAW (CONFIG_SYS_FLASH_BASE_PHYS ,LAW_SIZE_256M ,LAW_TRGT_IF_LBC ), -SET_LAW (CONFIG_SYS_PCIE1_MEM_PHYS ,LAWAR_SIZE_512M ,LAW_TRGT_IF_PCIE_1 ), +SET_LAW (CONFIG_SYS_PCIE1_MEM_PHYS ,LAW_SIZE_512M ,LAW_TRGT_IF_PCIE_1 ),SET_LAW (CONFIG_SYS_PCIE1_IO_PHYS ,LAW_SIZE_64K ,LAW_TRGT_IF_PCIE_1 ), -SET_LAW (CONFIG_SYS_PCIE2_MEM_PHYS ,LAWAR_SIZE_512M ,LAW_TRGT_IF_PCIE_2 ), +SET_LAW (CONFIG_SYS_PCIE2_MEM_PHYS ,LAW_SIZE_512M ,LAW_TRGT_IF_PCIE_2 ),SET_LAW (CONFIG_SYS_PCIE2_IO_PHYS ,LAW_SIZE_64K ,LAW_TRGT_IF_PCIE_2 ), -SET_LAW (CONFIG_SYS_PCIE3_MEM_PHYS ,LAWAR_SIZE_512M ,LAW_TRGT_IF_PCIE_3 ), +SET_LAW (CONFIG_SYS_PCIE3_MEM_PHYS ,LAW_SIZE_512M ,LAW_TRGT_IF_PCIE_3 ),SET_LAW (CONFIG_SYS_PCIE3_IO_PHYS ,LAW_SIZE_64K ,LAW_TRGT_IF_PCIE_3 ),SET_LAW (PIXIS_BASE_PHYS ,LAW_SIZE_4K ,LAW_TRGT_IF_LBC ),SET_LAW (CONFIG_SYS_NAND_BASE_PHYS ,LAW_SIZE_1M ,LAW_TRGT_IF_LBC ),
board/freescale/p1_p2_rdb/law.c +2 -2
@@ -26,9 +26,9 @@struct law_entry law_table[] = {SET_LAW (CONFIG_SYS_FLASH_BASE_PHYS ,LAW_SIZE_16M ,LAW_TRGT_IF_LBC ), -SET_LAW (CONFIG_SYS_PCIE1_MEM_PHYS ,LAWAR_SIZE_512M ,LAW_TRGT_IF_PCIE_1 ), +SET_LAW (CONFIG_SYS_PCIE1_MEM_PHYS ,LAW_SIZE_512M ,LAW_TRGT_IF_PCIE_1 ),SET_LAW (CONFIG_SYS_PCIE1_IO_PHYS ,LAW_SIZE_64K ,LAW_TRGT_IF_PCIE_1 ), -SET_LAW (CONFIG_SYS_PCIE2_MEM_PHYS ,LAWAR_SIZE_512M ,LAW_TRGT_IF_PCIE_2 ), +SET_LAW (CONFIG_SYS_PCIE2_MEM_PHYS ,LAW_SIZE_512M ,LAW_TRGT_IF_PCIE_2 ),SET_LAW (CONFIG_SYS_PCIE2_IO_PHYS ,LAW_SIZE_64K ,LAW_TRGT_IF_PCIE_2 ),SET_LAW (CONFIG_SYS_VSC7385_BASE_PHYS ,LAW_SIZE_128K ,LAW_TRGT_IF_LBC ),SET_LAW (CONFIG_SYS_NAND_BASE_PHYS ,LAW_SIZE_1M ,LAW_TRGT_IF_LBC ),
board/freescale/p2020ds/law.c +3 -3
@@ -29,11 +29,11 @@struct law_entry law_table[] = {SET_LAW (CONFIG_SYS_FLASH_BASE_PHYS ,LAW_SIZE_256M ,LAW_TRGT_IF_LBC ), -SET_LAW (CONFIG_SYS_PCIE1_MEM_PHYS ,LAWAR_SIZE_512M ,LAW_TRGT_IF_PCIE_1 ), +SET_LAW (CONFIG_SYS_PCIE1_MEM_PHYS ,LAW_SIZE_512M ,LAW_TRGT_IF_PCIE_1 ),SET_LAW (CONFIG_SYS_PCIE1_IO_PHYS ,LAW_SIZE_64K ,LAW_TRGT_IF_PCIE_1 ), -SET_LAW (CONFIG_SYS_PCIE2_MEM_PHYS ,LAWAR_SIZE_512M ,LAW_TRGT_IF_PCIE_2 ), +SET_LAW (CONFIG_SYS_PCIE2_MEM_PHYS ,LAW_SIZE_512M ,LAW_TRGT_IF_PCIE_2 ),SET_LAW (CONFIG_SYS_PCIE2_IO_PHYS ,LAW_SIZE_64K ,LAW_TRGT_IF_PCIE_2 ), -SET_LAW (CONFIG_SYS_PCIE3_MEM_PHYS ,LAWAR_SIZE_512M ,LAW_TRGT_IF_PCIE_3 ), +SET_LAW (CONFIG_SYS_PCIE3_MEM_PHYS ,LAW_SIZE_512M ,LAW_TRGT_IF_PCIE_3 ),SET_LAW (CONFIG_SYS_PCIE3_IO_PHYS ,LAW_SIZE_64K ,LAW_TRGT_IF_PCIE_3 ),SET_LAW (PIXIS_BASE_PHYS ,LAW_SIZE_4K ,LAW_TRGT_IF_LBC ),SET_LAW (CONFIG_SYS_NAND_BASE_PHYS ,LAW_SIZE_1M ,LAW_TRGT_IF_LBC ),
board/pm854/law.c +1 -1
@@ -52,7 +52,7 @@ struct law_entry law_table[] = {/* This is not so much the SDRAM map as it is the whole localbus map. */ SET_LAW (CONFIG_SYS_LBC_SDRAM_BASE ,LAW_SIZE_256M ,LAW_TRGT_IF_LBC ),SET_LAW (CONFIG_SYS_PCI1_IO_PHYS ,LAW_SIZE_16M ,LAW_TRGT_IF_PCI ), - SET_LAW(CONFIG_SYS_RIO_MEM_BASE, LAWAR_SIZE_512M, LAW_TRGT_IF_RIO), + SET_LAW(CONFIG_SYS_RIO_MEM_BASE, LAW_SIZE_512M, LAW_TRGT_IF_RIO), };int num_law_entries =ARRAY_SIZE (law_table);
board/pm856/law.c +1 -1
@@ -52,7 +52,7 @@ struct law_entry law_table[] = {/* This is not so much the SDRAM map as it is the whole localbus map. */ SET_LAW (CONFIG_SYS_LBC_SDRAM_BASE ,LAW_SIZE_256M ,LAW_TRGT_IF_LBC ),SET_LAW (CONFIG_SYS_PCI1_IO_PHYS ,LAW_SIZE_16M ,LAW_TRGT_IF_PCI ), - SET_LAW(CONFIG_SYS_RIO_MEM_BASE, LAWAR_SIZE_512M, LAW_TRGT_IF_RIO), + SET_LAW(CONFIG_SYS_RIO_MEM_BASE, LAW_SIZE_512M, LAW_TRGT_IF_RIO), };int num_law_entries =ARRAY_SIZE (law_table);
board/socrates/law.c +2 -2
@@ -52,9 +52,9 @@ struct law_entry law_table[] = { SET_LAW(CONFIG_SYS_LBC_FLASH_BASE, LAW_SIZE_64M, LAW_TRGT_IF_LBC), SET_LAW(CONFIG_SYS_PCI1_IO_PHYS, LAW_SIZE_16M, LAW_TRGT_IF_PCI),#if defined(CONFIG_SYS_FPGA_BASE ) -SET_LAW (CONFIG_SYS_FPGA_BASE ,LAWAR_SIZE_1M ,LAW_TRGT_IF_LBC ), +SET_LAW (CONFIG_SYS_FPGA_BASE ,LAW_SIZE_1M ,LAW_TRGT_IF_LBC ), #endif - SET_LAW(CONFIG_SYS_LIME_BASE, LAWAR_SIZE_64M, LAW_TRGT_IF_LBC), + SET_LAW(CONFIG_SYS_LIME_BASE, LAW_SIZE_64M, LAW_TRGT_IF_LBC), };int num_law_entries =ARRAY_SIZE (law_table);
board/stx/stxgp3/law.c +1 -1
@@ -52,7 +52,7 @@ struct law_entry law_table[] = {/* This is not so much the SDRAM map as it is the whole localbus map. */ SET_LAW (CONFIG_SYS_LBC_SDRAM_BASE ,LAW_SIZE_256M ,LAW_TRGT_IF_LBC ),SET_LAW (CONFIG_SYS_PCI1_IO_PHYS ,LAW_SIZE_16M ,LAW_TRGT_IF_PCI ), - SET_LAW(CONFIG_SYS_RIO_MEM_BASE, LAWAR_SIZE_512M, LAW_TRGT_IF_RIO), + SET_LAW(CONFIG_SYS_RIO_MEM_BASE, LAW_SIZE_512M, LAW_TRGT_IF_RIO), };int num_law_entries =ARRAY_SIZE (law_table);
board/stx/stxssa/law.c +1 -1
@@ -54,7 +54,7 @@ struct law_entry law_table[] = {SET_LAW (CONFIG_SYS_PCI1_IO_PHYS ,LAW_SIZE_16M ,LAW_TRGT_IF_PCI_1 ),SET_LAW (CONFIG_SYS_PCI2_IO_PHYS ,LAW_SIZE_16M ,LAW_TRGT_IF_PCI_2 ),/* Map the whole localbus, including flash and reset latch. */ - SET_LAW(CONFIG_SYS_LBC_OPTION_BASE, LAWAR_SIZE_256M, LAW_TRGT_IF_LBC), + SET_LAW(CONFIG_SYS_LBC_OPTION_BASE, LAW_SIZE_256M, LAW_TRGT_IF_LBC), };int num_law_entries =ARRAY_SIZE (law_table);
board/xes/xpedite5200/law.c +1 -1
@@ -40,7 +40,7 @@ struct law_entry law_table[] = { SET_LAW(CONFIG_SYS_NAND_BASE, LAW_SIZE_1M, LAW_TRGT_IF_LBC),#if CONFIG_SYS_PCI1_MEM_PHYS SET_LAW(CONFIG_SYS_PCI1_MEM_PHYS, LAW_SIZE_1G, LAW_TRGT_IF_PCI_1), - SET_LAW(CONFIG_SYS_PCI1_IO_PHYS, LAWAR_SIZE_8M, LAW_TRGT_IF_PCI_1), + SET_LAW(CONFIG_SYS_PCI1_IO_PHYS, LAW_SIZE_8M, LAW_TRGT_IF_PCI_1),#endif #if CONFIG_SYS_PCI2_MEM_PHYS SET_LAW(CONFIG_SYS_PCI2_MEM_PHYS, LAW_SIZE_256M, LAW_TRGT_IF_PCI_2),
include/asm-ppc/mmu.h +2 -7
@@ -504,13 +504,7 @@ extern int num_tlb_entries;#endif #endif -#if defined(CONFIG_MPC86xx) -#define LAWBAR_BASE_ADDR 0x00FFFFFF -#define LAWAR_TRGT_IF 0x01F00000 -#else -#define LAWBAR_BASE_ADDR 0x000FFFFF -#define LAWAR_TRGT_IF 0x00F00000 -#endif +#ifdef CONFIG_MPC83xx#define LAWAR_EN 0x80000000#define LAWAR_SIZE 0x0000003F
@@ -554,6 +548,7 @@ extern int num_tlb_entries;#define LAWAR_SIZE_8G (LAWAR_SIZE_BASE+22)#define LAWAR_SIZE_16G (LAWAR_SIZE_BASE+23)#define LAWAR_SIZE_32G (LAWAR_SIZE_BASE+24) +#endif #ifdef CONFIG_440 /* General */
Signature · 1 line
1.6.0.6
PATCH 1/1 Fix "ppc/85xx: Clean up use of LAWAR defines" breakage
Commit 002741ae86 modified include/asm-ppc/mmu.h such that the LAWAR_ defines were only enabled for the 83xx platform, but they are also needed on MPC512x system. Enabling these for E300 systems seems thus more appropriate.
Signed-off-by Wolfgang Denk <[email protected]>
---
Build tested for all 521x, 83xx, 85xx and 86xx systems.
include/asm-ppc/mmu.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/asm-ppc/mmu.h +1 -1
@@ -504,7 +504,7 @@ extern int num_tlb_entries;#endif #endif -#ifdef CONFIG_MPC83xx +#ifdef CONFIG_E300 #define LAWAR_EN 0x80000000#define LAWAR_SIZE 0x0000003F
Signature · 1 line
1.6.0.6