summaryrefslogtreecommitdiff
path: root/common/altera.c
diff options
context:
space:
mode:
authorroy zang <tie-fei.zang@freescale.com>2006-11-29 09:45:03 +0800
committerZang Tiefei <roy@bus.ap.freescale.net>2006-11-29 09:45:03 +0800
commit6bd87c0aeea441c49d59fd542b84a9be88d08b17 (patch)
treee450a5f1e69a78a203a1e15167d7fefa43c5ce7e /common/altera.c
parent0a8eb59983047ae3bcc0babf3ee4d10d01abe7da (diff)
parentd2c83f549378fb3fc34cb3c2e62fd772fbf8b68b (diff)
downloadu-boot-imx-6bd87c0aeea441c49d59fd542b84a9be88d08b17.zip
u-boot-imx-6bd87c0aeea441c49d59fd542b84a9be88d08b17.tar.gz
u-boot-imx-6bd87c0aeea441c49d59fd542b84a9be88d08b17.tar.bz2
Solve the copyright conflicts when merging 'master' into hpc2.
Merge branch 'master' into hpc2 Conflicts: drivers/cfi_flash.c
Diffstat (limited to 'common/altera.c')
-rw-r--r--common/altera.c27
1 files changed, 23 insertions, 4 deletions
diff --git a/common/altera.c b/common/altera.c
index ebd5038..06e8a95 100644
--- a/common/altera.c
+++ b/common/altera.c
@@ -50,15 +50,20 @@ int altera_load( Altera_desc *desc, void *buf, size_t bsize )
{
int ret_val = FPGA_FAIL; /* assume a failure */
- if (!altera_validate (desc, __FUNCTION__)) {
+ if (!altera_validate (desc, (char *)__FUNCTION__)) {
printf ("%s: Invalid device descriptor\n", __FUNCTION__);
} else {
switch (desc->family) {
case Altera_ACEX1K:
+ case Altera_CYC2:
#if (CONFIG_FPGA & CFG_ACEX1K)
PRINTF ("%s: Launching the ACEX1K Loader...\n",
__FUNCTION__);
ret_val = ACEX1K_load (desc, buf, bsize);
+#elif (CONFIG_FPGA & CFG_CYCLON2)
+ PRINTF ("%s: Launching the CYCLON II Loader...\n",
+ __FUNCTION__);
+ ret_val = CYC2_load (desc, buf, bsize);
#else
printf ("%s: No support for ACEX1K devices.\n",
__FUNCTION__);
@@ -78,7 +83,7 @@ int altera_dump( Altera_desc *desc, void *buf, size_t bsize )
{
int ret_val = FPGA_FAIL; /* assume a failure */
- if (!altera_validate (desc, __FUNCTION__)) {
+ if (!altera_validate (desc, (char *)__FUNCTION__)) {
printf ("%s: Invalid device descriptor\n", __FUNCTION__);
} else {
switch (desc->family) {
@@ -106,13 +111,16 @@ int altera_info( Altera_desc *desc )
{
int ret_val = FPGA_FAIL;
- if (altera_validate (desc, __FUNCTION__)) {
+ if (altera_validate (desc, (char *)__FUNCTION__)) {
printf ("Family: \t");
switch (desc->family) {
case Altera_ACEX1K:
printf ("ACEX1K\n");
break;
/* Add new family types here */
+ case Altera_CYC2:
+ printf ("CYCLON II\n");
+ break;
default:
printf ("Unknown family type, %d\n", desc->family);
}
@@ -147,8 +155,11 @@ int altera_info( Altera_desc *desc )
printf ("Device Function Table @ 0x%p\n", desc->iface_fns);
switch (desc->family) {
case Altera_ACEX1K:
+ case Altera_CYC2:
#if (CONFIG_FPGA & CFG_ACEX1K)
ACEX1K_info (desc);
+#elif (CONFIG_FPGA & CFG_CYCLON2)
+ CYC2_info (desc);
#else
/* just in case */
printf ("%s: No support for ACEX1K devices.\n",
@@ -176,7 +187,7 @@ int altera_reloc( Altera_desc *desc, ulong reloc_offset)
{
int ret_val = FPGA_FAIL; /* assume a failure */
- if (!altera_validate (desc, __FUNCTION__)) {
+ if (!altera_validate (desc, (char *)__FUNCTION__)) {
printf ("%s: Invalid device descriptor\n", __FUNCTION__);
} else {
switch (desc->family) {
@@ -188,6 +199,14 @@ int altera_reloc( Altera_desc *desc, ulong reloc_offset)
__FUNCTION__);
#endif
break;
+ case Altera_CYC2:
+#if (CONFIG_FPGA & CFG_CYCLON2)
+ ret_val = CYC2_reloc (desc, reloc_offset);
+#else
+ printf ("%s: No support for CYCLON II devices.\n",
+ __FUNCTION__);
+#endif
+ break;
/* Add new family types here */
default:
printf ("%s: Unsupported family type, %d\n",