From 55d5dda36701cda2857f38ba7d60bd40f2c5e51a Mon Sep 17 00:00:00 2001 From: Octasic Inc Date: Mon, 20 Mar 2006 17:11:56 +0200 Subject: importing OCT612x-01.00-PR40 --- .../oct6100api/oct6100_api/oct6100_chip_open.c | 38 +++++++--------------- 1 file changed, 12 insertions(+), 26 deletions(-) (limited to 'software/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_open.c') diff --git a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_open.c b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_open.c index 59c05a1..dd54e2c 100644 --- a/software/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_open.c +++ b/software/octdeviceapi/oct6100api/oct6100_api/oct6100_chip_open.c @@ -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.00-PR39 $ +$Octasic_Release: OCT612xAPI-01.00-PR40 $ -$Octasic_Revision: 308 $ +$Octasic_Revision: 310 $ \*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ @@ -861,8 +861,7 @@ UINT32 Oct6100ApiCheckChipConfiguration( return cOCT6100_ERR_OPEN_MAX_RW_ACCESSES; /* Check the clocks. */ - if ( f_pChipOpen->ulUpclkFreq != cOCT6100_UPCLK_FREQ_33_33_MHZ && - f_pChipOpen->ulUpclkFreq != cOCT6100_UPCLK_FREQ_66_67_MHZ ) + if ( f_pChipOpen->ulUpclkFreq != cOCT6100_UPCLK_FREQ_33_33_MHZ ) return cOCT6100_ERR_OPEN_UP_CLK_FREQ; if ( f_pChipOpen->ulMemClkFreq != cOCT6100_MCLK_FREQ_133_MHZ && @@ -1064,6 +1063,10 @@ UINT32 Oct6100ApiCheckChipConfiguration( if ( f_pChipOpen->ulMaxTsiCncts > cOCT6100_MAX_TSI_CNCTS ) return cOCT6100_ERR_OPEN_MAX_TSI_CNCTS; + + if ( f_pChipOpen->ulMaxBiDirChannels > 255 ) + return cOCT6100_ERR_OPEN_MAX_BIDIR_CHANNELS; + if ( f_pChipOpen->ulMaxBiDirChannels > (f_pChipOpen->ulMaxChannels / 2) ) return cOCT6100_ERR_OPEN_MAX_BIDIR_CHANNELS; @@ -2298,28 +2301,11 @@ UINT32 Oct6100ApiBootFc2Pll( /* Select upclk directly as ref source for fc2pll. */ WriteParams.ulWriteAddress = 0x134; - if ( pChipConfig->ulUpclkFreq == cOCT6100_UPCLK_FREQ_66_67_MHZ ) - { - WriteParams.usWriteData = 0x0002; - - mOCT6100_DRIVER_WRITE_API( WriteParams, ulResult ); - if ( ulResult != cOCT6100_ERR_OK ) - return ulResult; - - /* Remove the reset */ - WriteParams.usWriteData = 0x0102; - mOCT6100_DRIVER_WRITE_API( WriteParams, ulResult ); - if ( ulResult != cOCT6100_ERR_OK ) - return ulResult; - } - else /* pChipConfig->ulUpclkFreq == cOCT6100_UPCLK_FREQ_33_33_MHZ */ - { - WriteParams.usWriteData = 0x0001; - - mOCT6100_DRIVER_WRITE_API( WriteParams, ulResult ); - if ( ulResult != cOCT6100_ERR_OK ) - return ulResult; - } + WriteParams.usWriteData = 0x0001; + + mOCT6100_DRIVER_WRITE_API( WriteParams, ulResult ); + if ( ulResult != cOCT6100_ERR_OK ) + return ulResult; /* Setup fc2pll. */ WriteParams.ulWriteAddress = 0x132; -- cgit v1.2.3