]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
86xx: Fix GUR PCI config registers properly.
authorJon Loeliger <jdl@freescale.com>
Wed, 20 Feb 2008 20:22:26 +0000 (14:22 -0600)
committerJon Loeliger <jdl@freescale.com>
Wed, 20 Feb 2008 20:45:09 +0000 (14:45 -0600)
Back in commit 975a083a5ef785c414b35f9c5b8ae25b26b41524 where
I tried to "8610HPCD: Fix typos in two PCI setup registers", I
botched it due to not realizing that 8610 and 8641 had different
Global Utility Register defintions, one of which was like 85xx,
and the other wasn't.  Correct this problem by introducing two
symbols, one for each 86xx SoC, but neither of which is named
anything like 85xx.

My bad.  Lovely Wednesday with git bisect.  You know.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
board/freescale/mpc8610hpcd/mpc8610hpcd.c
board/freescale/mpc8641hpcn/mpc8641hpcn.c
include/asm-ppc/immap_86xx.h

index d5a4f0ee87d8f79458c7f63e69f7c6b8ace9f1aa..16acbbe8ad52b61767c0b2166b56a011f8f6b903 100644 (file)
@@ -280,8 +280,10 @@ void pci_init_board(void)
        volatile immap_t *immap = (immap_t *) CFG_CCSRBAR;
        volatile ccsr_gur_t *gur = &immap->im_gur;
        uint devdisr = gur->devdisr;
-       uint io_sel = (gur->pordevsr & MPC86xx_PORDEVSR_IO_SEL) >> 19;
-       uint host_agent = (gur->porbmsr & MPC86xx_PORBMSR_HA) >> 16;
+       uint io_sel = (gur->pordevsr & MPC8610_PORDEVSR_IO_SEL)
+               >> MPC8610_PORDEVSR_IO_SEL_SHIFT;
+       uint host_agent = (gur->porbmsr & MPC8610_PORBMSR_HA)
+               >> MPC8610_PORBMSR_HA_SHIFT;
 
        printf( " pci_init_board: devdisr=%x, io_sel=%x, host_agent=%x\n",
                devdisr, io_sel, host_agent);
index ae791431d362d13ffee7a245964359983b0135cd..0e451dc35a99bc7e4706b4b17ec3217370636604 100644 (file)
@@ -206,7 +206,8 @@ void pci_init_board(void)
        volatile immap_t *immap = (immap_t *) CFG_CCSRBAR;
        volatile ccsr_gur_t *gur = &immap->im_gur;
        uint devdisr = gur->devdisr;
-       uint io_sel = (gur->pordevsr & MPC86xx_PORDEVSR_IO_SEL) >> 16;
+       uint io_sel = (gur->pordevsr & MPC8641_PORDEVSR_IO_SEL)
+               >> MPC8641_PORDEVSR_IO_SEL_SHIFT;
 
 #ifdef CONFIG_PCI1
 {
@@ -214,7 +215,8 @@ void pci_init_board(void)
        extern void fsl_pci_init(struct pci_controller *hose);
        struct pci_controller *hose = &pci1_hose;
 #ifdef DEBUG
-       uint host1_agent = (gur->porbmsr & MPC86xx_PORBMSR_HA) >> 17;
+       uint host1_agent = (gur->porbmsr & MPC8641_PORBMSR_HA)
+               >> MPC8641_PORBMSR_HA_SHIFT;
        uint pex1_agent = (host1_agent == 0) || (host1_agent == 1);
 #endif
        if ((io_sel == 2 || io_sel == 3 || io_sel == 5
index 6143062e5bde7ab7a94f668be081d926c1e31d41..7526061d5ab7c11240561785701b489523198142 100644 (file)
@@ -1256,10 +1256,16 @@ typedef struct ccsr_rio {
 typedef struct ccsr_gur {
        uint    porpllsr;       /* 0xe0000 - POR PLL ratio status register */
        uint    porbmsr;        /* 0xe0004 - POR boot mode status register */
-#define MPC86xx_PORBMSR_HA      0x00060000
+#define MPC8610_PORBMSR_HA      0x00070000
+#define MPC8610_PORBMSR_HA_SHIFT       16
+#define MPC8641_PORBMSR_HA      0x00060000
+#define MPC8641_PORBMSR_HA_SHIFT       17
        uint    porimpscr;      /* 0xe0008 - POR I/O impedance status and control register */
        uint    pordevsr;       /* 0xe000c - POR I/O device status regsiter */
-#define MPC86xx_PORDEVSR_IO_SEL                0x000F0000
+#define MPC8610_PORDEVSR_IO_SEL                0x00380000
+#define MPC8610_PORDEVSR_IO_SEL_SHIFT          19
+#define MPC8641_PORDEVSR_IO_SEL                0x000F0000
+#define MPC8641_PORDEVSR_IO_SEL_SHIFT          16
 #define MPC86xx_PORDEVSR_CORE1TE       0x00000080 /* ASMP (Core1 addr trans) */
        uint    pordbgmsr;      /* 0xe0010 - POR debug mode status register */
        char    res1[12];