]> git.sur5r.net Git - u-boot/blobdiff - board/sbc8548/sbc8548.c
pci/fsl_pci_init: Fold pci_setup_indirect into fsl_pci_init
[u-boot] / board / sbc8548 / sbc8548.c
index 519b0f749d315c3635970d046dcad66de639f22a..978d91b4f2c89e0f9df0a7f45b9f629366e558ed 100644 (file)
@@ -29,7 +29,7 @@
 #include <pci.h>
 #include <asm/processor.h>
 #include <asm/immap_85xx.h>
-#include <asm/immap_fsl_pci.h>
+#include <asm/fsl_pci.h>
 #include <asm/fsl_ddr_sdram.h>
 #include <spd_sdram.h>
 #include <miiphy.h>
@@ -184,12 +184,12 @@ sdram_init(void)
         * MPC8548 uses "new" 15-16 style addressing.
         */
        lsdmr_common = CONFIG_SYS_LBC_LSDMR_COMMON;
-       lsdmr_common |= CONFIG_SYS_LBC_LSDMR_BSMA1516;
+       lsdmr_common |= LSDMR_BSMA1516;
 
        /*
         * Issue PRECHARGE ALL command.
         */
-       lbc->lsdmr = lsdmr_common | CONFIG_SYS_LBC_LSDMR_OP_PCHALL;
+       lbc->lsdmr = lsdmr_common | LSDMR_OP_PCHALL;
        asm("sync;msync");
        *sdram_addr = 0xff;
        ppcDcbf((unsigned long) sdram_addr);
@@ -199,7 +199,7 @@ sdram_init(void)
         * Issue 8 AUTO REFRESH commands.
         */
        for (idx = 0; idx < 8; idx++) {
-               lbc->lsdmr = lsdmr_common | CONFIG_SYS_LBC_LSDMR_OP_ARFRSH;
+               lbc->lsdmr = lsdmr_common | LSDMR_OP_ARFRSH;
                asm("sync;msync");
                *sdram_addr = 0xff;
                ppcDcbf((unsigned long) sdram_addr);
@@ -209,7 +209,7 @@ sdram_init(void)
        /*
         * Issue 8 MODE-set command.
         */
-       lbc->lsdmr = lsdmr_common | CONFIG_SYS_LBC_LSDMR_OP_MRW;
+       lbc->lsdmr = lsdmr_common | LSDMR_OP_MRW;
        asm("sync;msync");
        *sdram_addr = 0xff;
        ppcDcbf((unsigned long) sdram_addr);
@@ -218,7 +218,7 @@ sdram_init(void)
        /*
         * Issue NORMAL OP command.
         */
-       lbc->lsdmr = lsdmr_common | CONFIG_SYS_LBC_LSDMR_OP_NORMAL;
+       lbc->lsdmr = lsdmr_common | LSDMR_OP_NORMAL;
        asm("sync;msync");
        *sdram_addr = 0xff;
        ppcDcbf((unsigned long) sdram_addr);
@@ -347,9 +347,6 @@ static struct pci_controller pcie1_hose;
 
 int first_free_busno=0;
 
-extern int fsl_pci_setup_inbound_windows(struct pci_region *r);
-extern void fsl_pci_init(struct pci_controller *hose);
-
 void
 pci_init_board(void)
 {
@@ -406,9 +403,8 @@ pci_init_board(void)
                        table->config_device += gd->reloc_off;
 
                hose->first_busno=first_free_busno;
-               pci_setup_indirect(hose, (int) &pci->cfg_addr, (int) &pci->cfg_data);
 
-               fsl_pci_init(hose);
+               fsl_pci_init(hose, (u32)&pci->cfg_addr, (u32)&pci->cfg_data);
                first_free_busno=hose->last_busno+1;
                printf ("PCI on bus %02x - %02x\n",hose->first_busno,hose->last_busno);
 #ifdef CONFIG_PCIX_CHECK
@@ -470,7 +466,7 @@ pci_init_board(void)
                               CONFIG_SYS_PCI_MEMORY_BUS,
                               CONFIG_SYS_PCI_MEMORY_PHYS,
                               CONFIG_SYS_PCI_MEMORY_SIZE,
-                              PCI_REGION_MEM | PCI_REGION_MEMORY);
+                              PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
 
                /* outbound memory */
                pci_set_region(r++,
@@ -489,9 +485,8 @@ pci_init_board(void)
                hose->region_count = r - hose->regions;
 
                hose->first_busno=first_free_busno;
-               pci_setup_indirect(hose, (int) &pci->cfg_addr, (int) &pci->cfg_data);
 
-               fsl_pci_init(hose);
+               fsl_pci_init(hose, (u32)&pci->cfg_addr, (u32)&pci->cfg_data);
                printf ("PCIE on bus %d - %d\n",hose->first_busno,hose->last_busno);
 
                first_free_busno=hose->last_busno+1;
@@ -512,9 +507,6 @@ int last_stage_init(void)
 }
 
 #if defined(CONFIG_OF_BOARD_SETUP)
-extern void ft_fsl_pci_setup(void *blob, const char *pci_alias,
-                       struct pci_controller *hose);
-
 void ft_board_setup(void *blob, bd_t *bd)
 {
        ft_cpu_setup(blob, bd);