driver/pci: Fix compiling error
authorYork Sun <yorksun@freescale.com>
Mon, 8 Oct 2012 07:44:04 +0000 (07:44 +0000)
committerAndy Fleming <afleming@freescale.com>
Mon, 22 Oct 2012 19:31:14 +0000 (14:31 -0500)
Fix compiling error in case CONFIG_SYS_PCIE2_MEM_VIRT or CONFIG_SYS_PCIE3_MEM_VIRT
not defined.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
drivers/pci/fsl_pci_init.c

index 20dabf3..86ccbe7 100644 (file)
@@ -276,14 +276,18 @@ static void fsl_pcie_boot_master_release_slave(int port)
                release_addr = CONFIG_SYS_PCIE1_MEM_VIRT
                        + CONFIG_SRIO_PCIE_BOOT_BRR_OFFSET;
                break;
+#ifdef CONFIG_SYS_PCIE2_MEM_VIRT
        case 2:
                release_addr = CONFIG_SYS_PCIE2_MEM_VIRT
                        + CONFIG_SRIO_PCIE_BOOT_BRR_OFFSET;
                break;
+#endif
+#ifdef CONFIG_SYS_PCIE3_MEM_VIRT
        case 3:
                release_addr = CONFIG_SYS_PCIE3_MEM_VIRT
                        + CONFIG_SRIO_PCIE_BOOT_BRR_OFFSET;
                break;
+#endif
        default:
                release_addr = 0;
                break;