| 1 | /*************************************************************************** |
|---|
| 2 | * Copyright (c) 2003-2011, Broadcom Corporation |
|---|
| 3 | * All Rights Reserved |
|---|
| 4 | * Confidential Property of Broadcom Corporation |
|---|
| 5 | * |
|---|
| 6 | * THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE |
|---|
| 7 | * AGREEMENT BETWEEN THE USER AND BROADCOM. YOU HAVE NO RIGHT TO USE OR |
|---|
| 8 | * EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. |
|---|
| 9 | * |
|---|
| 10 | * $brcm_Workfile: bhab_3117.c $ |
|---|
| 11 | * $brcm_Revision: Hydra_Software_Devel/9 $ |
|---|
| 12 | * $brcm_Date: 5/27/11 4:41p $ |
|---|
| 13 | * |
|---|
| 14 | * |
|---|
| 15 | * Revision History: |
|---|
| 16 | * |
|---|
| 17 | * $brcm_Log: /magnum/basemodules/hab/3117/bhab_3117.c $ |
|---|
| 18 | * |
|---|
| 19 | * Hydra_Software_Devel/9 5/27/11 4:41p atanugul |
|---|
| 20 | * SW3461-3: Initializer for BHAB_3461_GetConfigSettings and |
|---|
| 21 | * BHAB_3461_SetConfigSettings |
|---|
| 22 | * |
|---|
| 23 | * Hydra_Software_Devel/8 5/6/11 3:49p atanugul |
|---|
| 24 | * SW3128-2: Added support to configure TM_MTSIF_CTRL - Transport Control |
|---|
| 25 | * Register for BCM3128 |
|---|
| 26 | * |
|---|
| 27 | * Hydra_Software_Devel/7 5/2/11 6:34p mward |
|---|
| 28 | * SW3128-8: missing initializer for isSpi. |
|---|
| 29 | * |
|---|
| 30 | * Hydra_Software_Devel/6 12/2/10 7:31p VISHK |
|---|
| 31 | * SW7405-5037: To make the i2c address programmable for the slave |
|---|
| 32 | * device(LNA) of 31xx frontend chip. |
|---|
| 33 | * |
|---|
| 34 | * Hydra_Software_Devel/5 10/5/09 10:46a vishk |
|---|
| 35 | * SW7405-2851: 31xx: Add support to configure the Watchdog feature of |
|---|
| 36 | * 31xx. |
|---|
| 37 | * |
|---|
| 38 | * Hydra_Software_Devel/4 3/10/09 1:45p vishk |
|---|
| 39 | * PR 46431: Add support for BCM3117, BCM3114, and BCM3112 |
|---|
| 40 | * |
|---|
| 41 | * Hydra_Software_Devel/3 1/29/09 7:14p vishk |
|---|
| 42 | * PR 46431: ADS PI: Add support for BCM3117, BCM3114, and BCM3112. |
|---|
| 43 | * PR 46436: AOB PI: Add support for BCM3117 and BCM3114 |
|---|
| 44 | * |
|---|
| 45 | * Removed GetLockStateChangeEventHandle. |
|---|
| 46 | * |
|---|
| 47 | * Hydra_Software_Devel/2 1/16/09 7:20p vishk |
|---|
| 48 | * PR 46431: ADS PI: Add support for BCM3117, BCM3114, and BCM3112. |
|---|
| 49 | * PR 46436: AOB PI: Add support for BCM3117 and BCM3114 |
|---|
| 50 | * |
|---|
| 51 | * Hydra_Software_Devel/1 10/20/08 2:51p gmohile |
|---|
| 52 | * PR 47386 : Checkin initial version |
|---|
| 53 | * |
|---|
| 54 | ***************************************************************************/ |
|---|
| 55 | |
|---|
| 56 | #include "bhab.h" |
|---|
| 57 | #include "bhab_priv.h" |
|---|
| 58 | #include "bhab_3117.h" |
|---|
| 59 | #include "bhab_31xx_priv.h" |
|---|
| 60 | |
|---|
| 61 | BDBG_MODULE(bhab_3117); |
|---|
| 62 | |
|---|
| 63 | |
|---|
| 64 | static const BHAB_Settings defDevSettings = |
|---|
| 65 | { |
|---|
| 66 | 0x66, /* chipAddr */ |
|---|
| 67 | NULL, /* interruptEnableFunc */ |
|---|
| 68 | NULL, /* interruptEnableFuncParam */ |
|---|
| 69 | /* API function table */ |
|---|
| 70 | { |
|---|
| 71 | BHAB_31xx_Open, |
|---|
| 72 | BHAB_31xx_Close, |
|---|
| 73 | BHAB_31xx_InitAp, |
|---|
| 74 | BHAB_31xx_GetApStatus, |
|---|
| 75 | BHAB_31xx_GetApVersion, |
|---|
| 76 | BHAB_31xx_ReadRegister, |
|---|
| 77 | BHAB_31xx_WriteRegister, |
|---|
| 78 | BHAB_31xx_ReadMemory, |
|---|
| 79 | BHAB_31xx_WriteMemory, |
|---|
| 80 | BHAB_31xx_ReadMbox, |
|---|
| 81 | BHAB_31xx_WriteMbox, |
|---|
| 82 | BHAB_31xx_HandleInterrupt_isr, |
|---|
| 83 | BHAB_31xx_ProcessInterruptEvent, |
|---|
| 84 | BHAB_31xx_EnableLockInterrupt, |
|---|
| 85 | BHAB_31xx_InstallInterruptCallback, |
|---|
| 86 | BHAB_31xx_UnInstallInterruptCallback, |
|---|
| 87 | BHAB_31xx_SendHabCommand, |
|---|
| 88 | BHAB_31xx_GetInterruptEventHandle, |
|---|
| 89 | BHAB_31xx_GetWatchDogTimer, |
|---|
| 90 | BHAB_31xx_SetWatchDogTimer, |
|---|
| 91 | BHAB_31xx_GetNmiConfig, |
|---|
| 92 | BHAB_31xx_SetNmiConfig, |
|---|
| 93 | NULL, /* BHAB_3461_GetConfigSettings */ |
|---|
| 94 | NULL /* BHAB_3461_SetConfigSettings */ |
|---|
| 95 | }, |
|---|
| 96 | 0x60, /* slaveChipAddr */ |
|---|
| 97 | false, /* isSpi */ |
|---|
| 98 | false /* isMtsif */ |
|---|
| 99 | }; |
|---|
| 100 | |
|---|
| 101 | |
|---|
| 102 | /****************************************************************************** |
|---|
| 103 | BHAB_3117_GetDefaultSettings() |
|---|
| 104 | ******************************************************************************/ |
|---|
| 105 | BERR_Code BHAB_3117_GetDefaultSettings( |
|---|
| 106 | BHAB_Settings *pDefSettings /* [out] default settings */ |
|---|
| 107 | ) |
|---|
| 108 | { |
|---|
| 109 | *pDefSettings = defDevSettings; |
|---|
| 110 | return BERR_SUCCESS; |
|---|
| 111 | } |
|---|