|
@@ -32,7 +32,7 @@
|
|
#include <spartan2.h>
|
|
#include <spartan2.h>
|
|
#include <spartan3.h>
|
|
#include <spartan3.h>
|
|
|
|
|
|
-#if (CONFIG_FPGA & CFG_FPGA_XILINX)
|
|
|
|
|
|
+#if defined(CONFIG_FPGA) && defined(CONFIG_FPGA_XILINX)
|
|
|
|
|
|
#if 0
|
|
#if 0
|
|
#define FPGA_DEBUG
|
|
#define FPGA_DEBUG
|
|
@@ -59,7 +59,7 @@ int xilinx_load (Xilinx_desc * desc, void *buf, size_t bsize)
|
|
} else
|
|
} else
|
|
switch (desc->family) {
|
|
switch (desc->family) {
|
|
case Xilinx_Spartan2:
|
|
case Xilinx_Spartan2:
|
|
-#if (CONFIG_FPGA & CFG_SPARTAN2)
|
|
|
|
|
|
+#if defined(CONFIG_FPGA_SPARTAN2)
|
|
PRINTF ("%s: Launching the Spartan-II Loader...\n",
|
|
PRINTF ("%s: Launching the Spartan-II Loader...\n",
|
|
__FUNCTION__);
|
|
__FUNCTION__);
|
|
ret_val = Spartan2_load (desc, buf, bsize);
|
|
ret_val = Spartan2_load (desc, buf, bsize);
|
|
@@ -69,7 +69,7 @@ int xilinx_load (Xilinx_desc * desc, void *buf, size_t bsize)
|
|
#endif
|
|
#endif
|
|
break;
|
|
break;
|
|
case Xilinx_Spartan3:
|
|
case Xilinx_Spartan3:
|
|
-#if (CONFIG_FPGA & CFG_SPARTAN3)
|
|
|
|
|
|
+#if defined(CONFIG_FPGA_SPARTAN3)
|
|
PRINTF ("%s: Launching the Spartan-III Loader...\n",
|
|
PRINTF ("%s: Launching the Spartan-III Loader...\n",
|
|
__FUNCTION__);
|
|
__FUNCTION__);
|
|
ret_val = Spartan3_load (desc, buf, bsize);
|
|
ret_val = Spartan3_load (desc, buf, bsize);
|
|
@@ -79,7 +79,7 @@ int xilinx_load (Xilinx_desc * desc, void *buf, size_t bsize)
|
|
#endif
|
|
#endif
|
|
break;
|
|
break;
|
|
case Xilinx_Virtex2:
|
|
case Xilinx_Virtex2:
|
|
-#if (CONFIG_FPGA & CFG_VIRTEX2)
|
|
|
|
|
|
+#if defined(CONFIG_FPGA_VIRTEX2)
|
|
PRINTF ("%s: Launching the Virtex-II Loader...\n",
|
|
PRINTF ("%s: Launching the Virtex-II Loader...\n",
|
|
__FUNCTION__);
|
|
__FUNCTION__);
|
|
ret_val = Virtex2_load (desc, buf, bsize);
|
|
ret_val = Virtex2_load (desc, buf, bsize);
|
|
@@ -106,7 +106,7 @@ int xilinx_dump (Xilinx_desc * desc, void *buf, size_t bsize)
|
|
} else
|
|
} else
|
|
switch (desc->family) {
|
|
switch (desc->family) {
|
|
case Xilinx_Spartan2:
|
|
case Xilinx_Spartan2:
|
|
-#if (CONFIG_FPGA & CFG_SPARTAN2)
|
|
|
|
|
|
+#if defined(CONFIG_FPGA_SPARTAN2)
|
|
PRINTF ("%s: Launching the Spartan-II Reader...\n",
|
|
PRINTF ("%s: Launching the Spartan-II Reader...\n",
|
|
__FUNCTION__);
|
|
__FUNCTION__);
|
|
ret_val = Spartan2_dump (desc, buf, bsize);
|
|
ret_val = Spartan2_dump (desc, buf, bsize);
|
|
@@ -116,7 +116,7 @@ int xilinx_dump (Xilinx_desc * desc, void *buf, size_t bsize)
|
|
#endif
|
|
#endif
|
|
break;
|
|
break;
|
|
case Xilinx_Spartan3:
|
|
case Xilinx_Spartan3:
|
|
-#if (CONFIG_FPGA & CFG_SPARTAN3)
|
|
|
|
|
|
+#if defined(CONFIG_FPGA_SPARTAN3)
|
|
PRINTF ("%s: Launching the Spartan-III Reader...\n",
|
|
PRINTF ("%s: Launching the Spartan-III Reader...\n",
|
|
__FUNCTION__);
|
|
__FUNCTION__);
|
|
ret_val = Spartan3_dump (desc, buf, bsize);
|
|
ret_val = Spartan3_dump (desc, buf, bsize);
|
|
@@ -126,7 +126,7 @@ int xilinx_dump (Xilinx_desc * desc, void *buf, size_t bsize)
|
|
#endif
|
|
#endif
|
|
break;
|
|
break;
|
|
case Xilinx_Virtex2:
|
|
case Xilinx_Virtex2:
|
|
-#if (CONFIG_FPGA & CFG_VIRTEX2)
|
|
|
|
|
|
+#if defined( CONFIG_FPGA_VIRTEX2)
|
|
PRINTF ("%s: Launching the Virtex-II Reader...\n",
|
|
PRINTF ("%s: Launching the Virtex-II Reader...\n",
|
|
__FUNCTION__);
|
|
__FUNCTION__);
|
|
ret_val = Virtex2_dump (desc, buf, bsize);
|
|
ret_val = Virtex2_dump (desc, buf, bsize);
|
|
@@ -198,7 +198,7 @@ int xilinx_info (Xilinx_desc * desc)
|
|
printf ("Device Function Table @ 0x%p\n", desc->iface_fns);
|
|
printf ("Device Function Table @ 0x%p\n", desc->iface_fns);
|
|
switch (desc->family) {
|
|
switch (desc->family) {
|
|
case Xilinx_Spartan2:
|
|
case Xilinx_Spartan2:
|
|
-#if (CONFIG_FPGA & CFG_SPARTAN2)
|
|
|
|
|
|
+#if defined(CONFIG_FPGA_SPARTAN2)
|
|
Spartan2_info (desc);
|
|
Spartan2_info (desc);
|
|
#else
|
|
#else
|
|
/* just in case */
|
|
/* just in case */
|
|
@@ -207,7 +207,7 @@ int xilinx_info (Xilinx_desc * desc)
|
|
#endif
|
|
#endif
|
|
break;
|
|
break;
|
|
case Xilinx_Spartan3:
|
|
case Xilinx_Spartan3:
|
|
-#if (CONFIG_FPGA & CFG_SPARTAN3)
|
|
|
|
|
|
+#if defined(CONFIG_FPGA_SPARTAN3)
|
|
Spartan3_info (desc);
|
|
Spartan3_info (desc);
|
|
#else
|
|
#else
|
|
/* just in case */
|
|
/* just in case */
|
|
@@ -216,7 +216,7 @@ int xilinx_info (Xilinx_desc * desc)
|
|
#endif
|
|
#endif
|
|
break;
|
|
break;
|
|
case Xilinx_Virtex2:
|
|
case Xilinx_Virtex2:
|
|
-#if (CONFIG_FPGA & CFG_VIRTEX2)
|
|
|
|
|
|
+#if defined(CONFIG_FPGA_VIRTEX2)
|
|
Virtex2_info (desc);
|
|
Virtex2_info (desc);
|
|
#else
|
|
#else
|
|
/* just in case */
|
|
/* just in case */
|
|
@@ -249,7 +249,7 @@ int xilinx_reloc (Xilinx_desc * desc, ulong reloc_offset)
|
|
} else
|
|
} else
|
|
switch (desc->family) {
|
|
switch (desc->family) {
|
|
case Xilinx_Spartan2:
|
|
case Xilinx_Spartan2:
|
|
-#if (CONFIG_FPGA & CFG_SPARTAN2)
|
|
|
|
|
|
+#if defined(CONFIG_FPGA_SPARTAN2)
|
|
ret_val = Spartan2_reloc (desc, reloc_offset);
|
|
ret_val = Spartan2_reloc (desc, reloc_offset);
|
|
#else
|
|
#else
|
|
printf ("%s: No support for Spartan-II devices.\n",
|
|
printf ("%s: No support for Spartan-II devices.\n",
|
|
@@ -257,7 +257,7 @@ int xilinx_reloc (Xilinx_desc * desc, ulong reloc_offset)
|
|
#endif
|
|
#endif
|
|
break;
|
|
break;
|
|
case Xilinx_Spartan3:
|
|
case Xilinx_Spartan3:
|
|
-#if (CONFIG_FPGA & CFG_SPARTAN3)
|
|
|
|
|
|
+#if defined(CONFIG_FPGA_SPARTAN3)
|
|
ret_val = Spartan3_reloc (desc, reloc_offset);
|
|
ret_val = Spartan3_reloc (desc, reloc_offset);
|
|
#else
|
|
#else
|
|
printf ("%s: No support for Spartan-III devices.\n",
|
|
printf ("%s: No support for Spartan-III devices.\n",
|
|
@@ -265,7 +265,7 @@ int xilinx_reloc (Xilinx_desc * desc, ulong reloc_offset)
|
|
#endif
|
|
#endif
|
|
break;
|
|
break;
|
|
case Xilinx_Virtex2:
|
|
case Xilinx_Virtex2:
|
|
-#if (CONFIG_FPGA & CFG_VIRTEX2)
|
|
|
|
|
|
+#if defined(CONFIG_FPGA_VIRTEX2)
|
|
ret_val = Virtex2_reloc (desc, reloc_offset);
|
|
ret_val = Virtex2_reloc (desc, reloc_offset);
|
|
#else
|
|
#else
|
|
printf ("%s: No support for Virtex-II devices.\n",
|
|
printf ("%s: No support for Virtex-II devices.\n",
|
|
@@ -308,4 +308,4 @@ static int xilinx_validate (Xilinx_desc * desc, char *fn)
|
|
return ret_val;
|
|
return ret_val;
|
|
}
|
|
}
|
|
|
|
|
|
-#endif /* CONFIG_FPGA & CFG_FPGA_XILINX */
|
|
|
|
|
|
+#endif /* CONFIG_FPGA && CONFIG_FPGA_XILINX */
|