85xx: Add the concept of CFG_CCSRBAR_PHYS
authorKumar Gala <galak@kernel.crashing.org>
Wed, 30 Jan 2008 20:55:14 +0000 (14:55 -0600)
committerAndrew Fleming-AFLEMING <afleming@freescale.com>
Wed, 26 Mar 2008 16:43:03 +0000 (11:43 -0500)
When we go to 36-bit physical addresses we need to keep the concept of
the physical CCSRBAR address seperate from the virtual one.

For the majority of boards CFG_CCSBAR_PHYS == CFG_CCSRBAR

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
34 files changed:
board/atum8548/tlb.c
board/freescale/mpc8540ads/tlb.c
board/freescale/mpc8541cds/tlb.c
board/freescale/mpc8544ds/tlb.c
board/freescale/mpc8548cds/tlb.c
board/freescale/mpc8555cds/tlb.c
board/freescale/mpc8560ads/tlb.c
board/freescale/mpc8568mds/tlb.c
board/mpc8540eval/tlb.c
board/pm854/tlb.c
board/pm856/tlb.c
board/sbc8548/tlb.c
board/sbc8560/tlb.c
board/stxgp3/tlb.c
board/stxssa/tlb.c
board/tqm85xx/tlb.c
cpu/mpc85xx/cpu_init.c
include/configs/ATUM8548.h
include/configs/MPC8540ADS.h
include/configs/MPC8540EVAL.h
include/configs/MPC8541CDS.h
include/configs/MPC8544DS.h
include/configs/MPC8548CDS.h
include/configs/MPC8555CDS.h
include/configs/MPC8560ADS.h
include/configs/MPC8568MDS.h
include/configs/PM854.h
include/configs/PM856.h
include/configs/SBC8540.h
include/configs/TQM85xx.h
include/configs/sbc8548.h
include/configs/sbc8560.h
include/configs/stxgp3.h
include/configs/stxssa.h

index bb6ce76..1ef4de4 100644 (file)
@@ -82,7 +82,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
         * 0xe210_0000  1M      PCI2 IO
         * 0xe300_0000  1M      PCIe IO
         */
-       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR,
+       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR_PHYS,
                      MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
                      0, 5, BOOKE_PAGESZ_64M, 1),
 };
index 3eaff01..4fe2862 100644 (file)
@@ -87,7 +87,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
         * 0xe000_0000  1M      CCSRBAR
         * 0xe200_0000  16M     PCI1 IO
         */
-       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR,
+       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR_PHYS,
                      MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
                      0, 5, BOOKE_PAGESZ_64M, 1),
 
index 92f759b..c5434a0 100644 (file)
@@ -88,7 +88,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
         * 0xe200_0000  16M     PCI1 IO
         * 0xe300_0000  16M     PCI2 IO
         */
-       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR,
+       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR_PHYS,
                      MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
                      0, 5, BOOKE_PAGESZ_64M, 1),
 
index 34cfb38..61fc609 100644 (file)
@@ -75,7 +75,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
         * 0xe000_0000  1M      CCSRBAR
         * 0xe100_0000  255M    PCI IO range
         */
-       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR,
+       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR_PHYS,
                      MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
                      0, 4, BOOKE_PAGESZ_64M, 1),
 
index b21f71b..ab99af7 100644 (file)
@@ -80,7 +80,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
         * 0xe210_0000  1M      PCI2 IO
         * 0xe300_0000  1M      PCIe IO
         */
-       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR,
+       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR_PHYS,
                      MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
                      0, 5, BOOKE_PAGESZ_64M, 1),
 
index 92f759b..c5434a0 100644 (file)
@@ -88,7 +88,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
         * 0xe200_0000  16M     PCI1 IO
         * 0xe300_0000  16M     PCI2 IO
         */
-       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR,
+       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR_PHYS,
                      MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
                      0, 5, BOOKE_PAGESZ_64M, 1),
 
index 3eaff01..4fe2862 100644 (file)
@@ -87,7 +87,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
         * 0xe000_0000  1M      CCSRBAR
         * 0xe200_0000  16M     PCI1 IO
         */
-       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR,
+       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR_PHYS,
                      MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
                      0, 5, BOOKE_PAGESZ_64M, 1),
 
index 225fc94..a866c52 100644 (file)
@@ -74,7 +74,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
         * 0xe200_0000  8M      PCI1 IO
         * 0xe280_0000  8M      PCIe IO
         */
-       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR,
+       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR_PHYS,
                      MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
                      0, 3, BOOKE_PAGESZ_64M, 1),
 
index f041236..1003bf6 100644 (file)
@@ -27,7 +27,7 @@
 #include <asm/mmu.h>
 
 struct fsl_e_tlb_entry tlb_table[] = {
-       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR,
+       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR_PHYS,
                      MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
                      0, 1, BOOKE_PAGESZ_1M, 1),
 
index 5d87537..a7f3813 100644 (file)
@@ -87,7 +87,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
         * 0xe000_0000  1M      CCSRBAR
         * 0xe200_0000  16M     PCI1 IO
         */
-       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR,
+       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR_PHYS,
                      MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
                      0, 5, BOOKE_PAGESZ_64M, 1),
 
index 5d87537..a7f3813 100644 (file)
@@ -87,7 +87,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
         * 0xe000_0000  1M      CCSRBAR
         * 0xe200_0000  16M     PCI1 IO
         */
-       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR,
+       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR_PHYS,
                      MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
                      0, 5, BOOKE_PAGESZ_64M, 1),
 
index 8d6625e..6314005 100644 (file)
@@ -81,7 +81,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
         * 0xe0000000   1M      CCSRBAR
         * 0xe2000000   16M     PCI1 IO
         */
-       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR,
+       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR_PHYS,
                      MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
                      0, 4, BOOKE_PAGESZ_64M, 1),
 
index 155ff64..d073399 100644 (file)
@@ -28,7 +28,7 @@
 
 struct fsl_e_tlb_entry tlb_table[] = {
 /* TLB for CCSRBAR (IMMR) */
-       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR,
+       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR_PHYS,
                      MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
                      0, 1, BOOKE_PAGESZ_1M, 1),
 
index 529f230..d410416 100644 (file)
@@ -87,7 +87,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
         * 0xe000_0000  1M      CCSRBAR
         * 0xe200_0000  16M     PCI1 IO
         */
-       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR,
+       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR_PHYS,
                      MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
                      0, 5, BOOKE_PAGESZ_64M, 1),
 
index 46b1440..86cbd11 100644 (file)
@@ -88,7 +88,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
         * 0xe200_0000  16M     PCI1 IO
         * 0xe300_0000  16M     PCI2 IO
         */
-       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR,
+       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR_PHYS,
                      MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
                      0, 5, BOOKE_PAGESZ_64M, 1),
 
index a178cfe..ad26cae 100644 (file)
@@ -91,7 +91,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
         * 0xe000_0000  1M      CCSRBAR
         * 0xe200_0000  16M     PCI1 IO
         */
-       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR,
+       SET_TLB_ENTRY(1, CFG_CCSRBAR, CFG_CCSRBAR_PHYS,
                      MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
                      0, 6, BOOKE_PAGESZ_64M, 1),
 
index c0ff1d5..5f02e0e 100644 (file)
@@ -127,12 +127,12 @@ void config_8560_ioports (volatile ccsr_cpm_t * cpm)
 /* We run cpu_init_early_f in AS = 1 */
 void cpu_init_early_f(void)
 {
-       set_tlb(0, CFG_CCSRBAR, CFG_CCSRBAR,
+       set_tlb(0, CFG_CCSRBAR, CFG_CCSRBAR_PHYS,
                MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
                1, 0, BOOKE_PAGESZ_4K, 0);
 
        /* set up CCSR if we want it moved */
-#if (CFG_CCSRBAR_DEFAULT != CFG_CCSRBAR)
+#if (CFG_CCSRBAR_DEFAULT != CFG_CCSRBAR_PHYS)
        {
                u32 temp;
 
@@ -141,7 +141,7 @@ void cpu_init_early_f(void)
                        1, 1, BOOKE_PAGESZ_4K, 0);
 
                temp = in_be32((volatile u32 *)CFG_CCSRBAR_DEFAULT);
-               out_be32((volatile u32 *)CFG_CCSRBAR_DEFAULT, CFG_CCSRBAR >> 12);
+               out_be32((volatile u32 *)CFG_CCSRBAR_DEFAULT, CFG_CCSRBAR_PHYS >> 12);
 
                temp = in_be32((volatile u32 *)CFG_CCSRBAR);
        }
index c14376e..0d644da 100644 (file)
@@ -96,6 +96,7 @@
  */
 #define CFG_CCSRBAR_DEFAULT    0xff700000      /* CCSRBAR Default */
 #define CFG_CCSRBAR            0xe0000000      /* relocated CCSRBAR */
+#define CFG_CCSRBAR_PHYS       CFG_CCSRBAR     /* physical addr of CCSRBAR */
 #define CFG_IMMR               CFG_CCSRBAR     /* PQII uses CFG_IMMR */
 
 #define PCI_SPEED              33333000        /* CPLD currenlty does not have PCI setup info */
index 5ea7b25..85934d7 100644 (file)
  */
 #define CFG_CCSRBAR_DEFAULT    0xff700000      /* CCSRBAR Default */
 #define CFG_CCSRBAR            0xe0000000      /* relocated CCSRBAR */
+#define CFG_CCSRBAR_PHYS       CFG_CCSRBAR     /* physical addr of CCSRBAR */
 #define CFG_IMMR               CFG_CCSRBAR     /* PQII uses CFG_IMMR */
 
 
index 174215c..77eea73 100644 (file)
@@ -83,6 +83,7 @@
  */
 #define CFG_CCSRBAR_DEFAULT    0xff700000      /* CCSRBAR Default      */
 #define CFG_CCSRBAR            0xe0000000      /* relocated CCSRBAR    */
+#define CFG_CCSRBAR_PHYS       CFG_CCSRBAR     /* physical addr of CCSRBAR */
 #define CFG_IMMR               CFG_CCSRBAR     /* PQII uses CFG_IMMR   */
 
 #define CFG_DDR_SDRAM_BASE     0x00000000      /* DDR is system memory  */
index 7334088..f1a86e6 100644 (file)
@@ -82,6 +82,7 @@ extern unsigned long get_clock_freq(void);
  */
 #define CFG_CCSRBAR_DEFAULT    0xff700000      /* CCSRBAR Default */
 #define CFG_CCSRBAR            0xe0000000      /* relocated CCSRBAR */
+#define CFG_CCSRBAR_PHYS       CFG_CCSRBAR     /* physical addr of CCSRBAR */
 #define CFG_IMMR               CFG_CCSRBAR     /* PQII uses CFG_IMMR */
 
 /*
index a894209..c83d9e2 100644 (file)
@@ -98,6 +98,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
  */
 #define CFG_CCSRBAR_DEFAULT    0xff700000      /* CCSRBAR Default */
 #define CFG_CCSRBAR            0xe0000000      /* relocated CCSRBAR */
+#define CFG_CCSRBAR_PHYS       CFG_CCSRBAR     /* physical addr of CCSRBAR */
 #define CFG_IMMR               CFG_CCSRBAR     /* PQII uses CFG_IMMR */
 
 #define CFG_PCI1_ADDR          (CFG_CCSRBAR+0x8000)
index a3db9f4..2d44df4 100644 (file)
@@ -96,6 +96,7 @@ extern unsigned long get_clock_freq(void);
  */
 #define CFG_CCSRBAR_DEFAULT    0xff700000      /* CCSRBAR Default */
 #define CFG_CCSRBAR            0xe0000000      /* relocated CCSRBAR */
+#define CFG_CCSRBAR_PHYS       CFG_CCSRBAR     /* physical addr of CCSRBAR */
 #define CFG_IMMR               CFG_CCSRBAR     /* PQII uses CFG_IMMR */
 
 #define CFG_PCI1_ADDR  (CFG_CCSRBAR+0x8000)
index 93877ae..fa0f7b3 100644 (file)
@@ -82,6 +82,7 @@ extern unsigned long get_clock_freq(void);
  */
 #define CFG_CCSRBAR_DEFAULT    0xff700000      /* CCSRBAR Default */
 #define CFG_CCSRBAR            0xe0000000      /* relocated CCSRBAR */
+#define CFG_CCSRBAR_PHYS       CFG_CCSRBAR     /* physical addr of CCSRBAR */
 #define CFG_IMMR               CFG_CCSRBAR     /* PQII uses CFG_IMMR */
 
 /*
index 08884b3..e30302c 100644 (file)
@@ -95,6 +95,7 @@
  */
 #define CFG_CCSRBAR_DEFAULT    0xff700000      /* CCSRBAR Default */
 #define CFG_CCSRBAR            0xe0000000      /* relocated CCSRBAR */
+#define CFG_CCSRBAR_PHYS       CFG_CCSRBAR     /* physical addr of CCSRBAR */
 #define CFG_IMMR               CFG_CCSRBAR     /* PQII uses CFG_IMMR */
 
 
index a12d193..7bb20e5 100644 (file)
@@ -90,6 +90,7 @@ extern unsigned long get_clock_freq(void);
  */
 #define CFG_CCSRBAR_DEFAULT    0xff700000      /* CCSRBAR Default */
 #define CFG_CCSRBAR            0xe0000000      /* relocated CCSRBAR */
+#define CFG_CCSRBAR_PHYS       CFG_CCSRBAR     /* physical addr of CCSRBAR */
 #define CFG_IMMR               CFG_CCSRBAR     /* PQII uses CFG_IMMR */
 
 #define CFG_PCI1_ADDR           (CFG_CCSRBAR+0x8000)
index 819bee7..bd058fc 100644 (file)
@@ -92,6 +92,7 @@
  */
 #define CFG_CCSRBAR_DEFAULT    0xff700000      /* CCSRBAR Default */
 #define CFG_CCSRBAR            0xe0000000      /* relocated CCSRBAR */
+#define CFG_CCSRBAR_PHYS       CFG_CCSRBAR     /* physical addr of CCSRBAR */
 #define CFG_IMMR               CFG_CCSRBAR     /* PQII uses CFG_IMMR */
 
 
index 8902f42..38a26dc 100644 (file)
@@ -94,6 +94,7 @@
  */
 #define CFG_CCSRBAR_DEFAULT    0xff700000      /* CCSRBAR Default */
 #define CFG_CCSRBAR            0xe0000000      /* relocated CCSRBAR */
+#define CFG_CCSRBAR_PHYS       CFG_CCSRBAR     /* physical addr of CCSRBAR */
 #define CFG_IMMR               CFG_CCSRBAR     /* PQII uses CFG_IMMR */
 
 
index 2bbfe9a..946b3c2 100644 (file)
@@ -99,6 +99,7 @@
 #else
   #define CFG_CCSRBAR          0xff700000      /* default CCSRBAR      */
 #endif
+#define CFG_CCSRBAR_PHYS       CFG_CCSRBAR     /* physical addr of CCSRBAR */
 #define CFG_IMMR               CFG_CCSRBAR     /* PQII uses CFG_IMMR   */
 
 #define CFG_DDR_SDRAM_BASE     0x00000000      /* DDR is system memory  */
index 21e8baf..fca5f74 100644 (file)
@@ -89,6 +89,7 @@
  */
 #define CFG_CCSRBAR_DEFAULT    0xFF700000      /* CCSRBAR Default      */
 #define CFG_CCSRBAR            0xE0000000      /* relocated CCSRBAR    */
+#define CFG_CCSRBAR_PHYS       CFG_CCSRBAR     /* physical addr of CCSRBAR */
 #define CFG_IMMR               CFG_CCSRBAR     /* PQII uses CFG_IMMR   */
 
 /*
index 516203a..49a7234 100644 (file)
@@ -87,6 +87,7 @@
  */
 #define CFG_CCSRBAR_DEFAULT    0xff700000      /* CCSRBAR Default */
 #define CFG_CCSRBAR            0xe0000000      /* relocated CCSRBAR */
+#define CFG_CCSRBAR_PHYS       CFG_CCSRBAR     /* physical addr of CCSRBAR */
 #define CFG_IMMR               CFG_CCSRBAR     /* PQII uses CFG_IMMR */
 
 #define CFG_PCI1_ADDR  (CFG_CCSRBAR+0x8000)
index f9ede5f..81a1e07 100644 (file)
@@ -93,6 +93,7 @@
 #else
   #define CFG_CCSRBAR          0xff700000      /* default CCSRBAR      */
 #endif
+#define CFG_CCSRBAR_PHYS       CFG_CCSRBAR     /* physical addr of CCSRBAR */
 #define CFG_IMMR               CFG_CCSRBAR     /* PQII uses CFG_IMMR   */
 
 #define CFG_DDR_SDRAM_BASE     0x00000000      /* DDR is system memory  */
index 047e1cf..fc5d0cc 100644 (file)
 #define CFG_CCSRBAR_DEFAULT    0xff700000      /* CCSRBAR Default      */
 #endif
 #define CFG_CCSRBAR             0xfdf00000      /* relocated CCSRBAR    */
+#define CFG_CCSRBAR_PHYS       CFG_CCSRBAR     /* physical addr of CCSRBAR */
 #define CFG_IMMR               CFG_CCSRBAR     /* PQII uses CFG_IMMR   */
 
 
index e09dd71..15f690a 100644 (file)
 #define CFG_CCSRBAR_DEFAULT    0xff700000      /* CCSRBAR Default      */
 #endif
 #define CFG_CCSRBAR            0xe0000000      /* relocated CCSRBAR    */
+#define CFG_CCSRBAR_PHYS       CFG_CCSRBAR     /* physical addr of CCSRBAR */
 #define CFG_IMMR               CFG_CCSRBAR     /* PQII uses CFG_IMMR   */