summaryrefslogtreecommitdiff
path: root/software/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_open.c
diff options
context:
space:
mode:
Diffstat (limited to 'software/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_open.c')
-rw-r--r--software/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_open.c41
1 files changed, 30 insertions, 11 deletions
diff --git a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_open.c b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_open.c
index 373edc4..c162907 100644
--- a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_open.c
+++ b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_open.c
@@ -2,7 +2,7 @@
File: oct6100_chip_open.c
- Copyright (c) 2001-2008 Octasic Inc.
+ Copyright (c) 2001-2009 Octasic Inc.
Description:
@@ -24,9 +24,9 @@ You should have received a copy of the GNU General Public License
along with the OCT6100 GPL API; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-$Octasic_Release: OCT612xAPI-01.01.01 $
+$Octasic_Release: OCT612xAPI-01.02.01 $
-$Octasic_Revision: 353 $
+$Octasic_Revision: 364 $
\*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
@@ -181,6 +181,8 @@ UINT32 Oct6100ChipOpenDef(
f_pChipOpen->ulNumMemoryChips = 1;
f_pChipOpen->ulMemoryChipSize = cOCT6100_MEMORY_CHIP_SIZE_64MB;
+
+
/* Set the tail displacement to zero. */
f_pChipOpen->ulTailDisplacement = 0;
@@ -220,7 +222,7 @@ UINT32 Oct6100ChipOpenDef(
f_pChipOpen->InterruptConfig.ulErrorMemoryConfig = cOCT6100_INTERRUPT_NO_TIMEOUT;
f_pChipOpen->InterruptConfig.ulFatalGeneralConfig = cOCT6100_INTERRUPT_NO_TIMEOUT;
f_pChipOpen->InterruptConfig.ulFatalMemoryConfig = cOCT6100_INTERRUPT_NO_TIMEOUT;
- f_pChipOpen->InterruptConfig.ulFatalMemoryConfig = cOCT6100_INTERRUPT_NO_TIMEOUT;
+
f_pChipOpen->InterruptConfig.ulErrorH100Config = cOCT6100_INTERRUPT_NO_TIMEOUT;
f_pChipOpen->InterruptConfig.ulErrorOverflowToneEventsConfig = cOCT6100_INTERRUPT_NO_TIMEOUT;
@@ -337,7 +339,7 @@ UINT32 Oct6100ChipOpen(
ulResult = Oct6100ApiBootFc2Pll( f_pApiInstance );
if ( ulResult != cOCT6100_ERR_OK )
return ulResult;
-
+
/* Program the FC1 PLL. */
ulResult = Oct6100ApiProgramFc1Pll( f_pApiInstance );
if ( ulResult != cOCT6100_ERR_OK )
@@ -352,7 +354,7 @@ UINT32 Oct6100ChipOpen(
ulResult = Oct6100ApiBootFc1Pll( f_pApiInstance );
if ( ulResult != cOCT6100_ERR_OK )
return ulResult;
-
+
/* Boot the SDRAM. */
ulResult = Oct6100ApiBootSdram( f_pApiInstance );
if ( ulResult != cOCT6100_ERR_OK )
@@ -457,7 +459,13 @@ UINT32 Oct6100ChipOpen(
return ulResult;
}
- return cOCT6100_ERR_OK;
+ /* Return a warning to the user if the AF BIST failed but everything else succeeded. */
+ if ( ( f_pApiInstance->pSharedInfo->IntrptManage.fAfBistFailedOnBoot == TRUE )
+
+ )
+ return cOCT6100_WARNING_OPEN_FUNCTIONAL_BIST_FAILED;
+ else
+ return cOCT6100_ERR_OK;
}
@@ -1048,6 +1056,8 @@ UINT32 Oct6100ApiCheckChipConfiguration(
if (ulTempVar != cOCT6100_ERR_OK)
return ulTempVar;
+
+
/* Check the acoustic echo activation flag. */
if ( f_pChipOpen->fEnableAcousticEcho != TRUE &&
f_pChipOpen->fEnableAcousticEcho != FALSE )
@@ -1345,6 +1355,8 @@ UINT32 Oct6100ApiCopyChipConfiguration(
pSharedInfo->ChipConfig.byNumMemoryChips = (UINT8)( f_pChipOpen->ulNumMemoryChips & 0xFF );
pSharedInfo->ChipConfig.ulMemoryChipSize = f_pChipOpen->ulMemoryChipSize;
+
+
pSharedInfo->ChipConfig.usTailDisplacement = (UINT16)( f_pChipOpen->ulTailDisplacement & 0xFFFF );
pSharedInfo->ChipConfig.fEnableAcousticEcho = (UINT8)( f_pChipOpen->fEnableAcousticEcho & 0xFF );
/* Resource allocation parameters. */
@@ -1521,6 +1533,8 @@ UINT32 Oct6100ApiInitializeMiscellaneousVariables(
pSharedInfo->ImageInfo.fIdleCodeDetectionConfiguration = FALSE;
pSharedInfo->ImageInfo.fSinLevel = TRUE;
+ pSharedInfo->ImageInfo.fPerChannelPlayoutControl = FALSE;
+
pSharedInfo->ImageInfo.usMaxNumberOfChannels = 0;
pSharedInfo->ImageInfo.ulToneProfileNumber = cOCT6100_INVALID_VALUE;
pSharedInfo->ImageInfo.ulBuildId = cOCT6100_INVALID_VALUE;
@@ -3183,7 +3197,7 @@ UINT32 Oct6100ApiLoadImage(
}
/* Write the image in external memory. */
- ulNumWrites = pSharedInfo->ChipConfig.ulImageSize / 2;
+ ulNumWrites = (pSharedInfo->ChipConfig.ulImageSize / 2) + (pSharedInfo->ChipConfig.ulImageSize % 2);
BurstParams.ulWriteAddress = cOCT6100_IMAGE_FILE_BASE;
BurstParams.pusWriteData = pSharedInfo->MiscVars.ausSuperArray;
@@ -4459,7 +4473,12 @@ UINT32 Oct6100ApiProgramNLP(
{
/* Verify if the bist succeeded. */
if ( ( usReadData & 0xFFFF ) != 0x0000 )
- return cOCT6100_ERR_OPEN_FUNCTIONAL_BIST_FAILED;
+ {
+
+
+ /* Remember that the BIST ran at open chip failed. A warning will be returned to the user. */
+ pSharedInfo->IntrptManage.fAfBistFailedOnBoot = TRUE;
+ }
ulAfCpuUp = TRUE;
}
@@ -5936,8 +5955,8 @@ UINT32 Oct6100ApiRandomMemoryWrite(
if ( ( usReadData & ulDataMask ) != ( Oct6100ApiGenerateNumber( f_pApiInstance, i, 0xFFFF ) & ulDataMask ) )
return f_ulErrorCode;
}
-
-
+
+
return cOCT6100_ERR_OK;
}