diff --git a/port/board/afc-bpm/v3_1/ipmi_oem.c b/port/board/afc-bpm/v3_1/ipmi_oem.c index 156342f05..7d8382b1f 100644 --- a/port/board/afc-bpm/v3_1/ipmi_oem.c +++ b/port/board/afc-bpm/v3_1/ipmi_oem.c @@ -163,54 +163,3 @@ IPMI_HANDLER(ipmi_oem_cmd_gpio_pin, NETFN_CUSTOM_OEM, IPMI_OEM_CMD_GPIO_PIN, ipm rsp->data_len = len; } - -/* ADN4604 IPMI Control commands */ -#ifdef MODULE_ADN4604 - -#include "adn4604.h" - -/* This command may take a while to execute and hold the IPMI transaction */ -IPMI_HANDLER(ipmi_oem_adn4604_cfg_output, NETFN_CUSTOM_OEM, IPMI_OEM_CMD_ADN4604_SET_OUTPUT_CFG, ipmi_msg *req, ipmi_msg* rsp) -{ - int len = rsp->data_len = 0; - - /* @todo Read port status before setting the new configuration */ - extern adn_connect_map_t con; - uint8_t map; - uint8_t output = req->data[1]; - uint8_t input = req->data[2]; - uint8_t enable = req->data[3]; - - if (output % 2) { - *((uint8_t *)&con+(output/2)) &= 0x0F; - *((uint8_t *)&con+(output/2)) |= (input << 4) & 0xF0; - } else { - *((uint8_t *)&con+(output/2)) &= 0xF0; - *((uint8_t *)&con+(output/2)) |= input & 0x0F; - } - - map = ( req->data[0] == 0 ) ? ADN_XPT_MAP0_CON_REG : ADN_XPT_MAP1_CON_REG; - - adn4604_xpt_config( map , con ); - - if ( enable ) { - adn4604_tx_control( output, TX_ENABLED ); - } else { - adn4604_tx_control( output, TX_DISABLED ); - } - - adn4604_update(); - - rsp->data_len = len; - rsp->completion_code = IPMI_CC_OK; -} - -IPMI_HANDLER(ipmi_oem_adn4604_reset, NETFN_CUSTOM_OEM, IPMI_OEM_CMD_ADN4604_RESET, ipmi_msg *req, ipmi_msg* rsp) -{ - adn4604_reset(); - - rsp->data_len = 0; - rsp->completion_code = IPMI_CC_OK; -} - -#endif diff --git a/port/board/afc-bpm/v3_1/ipmi_oem.h b/port/board/afc-bpm/v3_1/ipmi_oem.h index 304806e27..495985399 100644 --- a/port/board/afc-bpm/v3_1/ipmi_oem.h +++ b/port/board/afc-bpm/v3_1/ipmi_oem.h @@ -44,11 +44,6 @@ #define NETFN_CUSTOM_OEM 0x30 #define IPMI_OEM_CMD_I2C_TRANSFER 0x00 - -#define IPMI_OEM_CMD_ADN4604_SET_OUTPUT_CFG 0x01 -#define IPMI_OEM_CMD_ADN4604_GET_OUTPUT_CFG 0x02 -#define IPMI_OEM_CMD_ADN4604_RESET 0x03 - #define IPMI_OEM_CMD_GPIO_PIN 0x04 /** * @} diff --git a/port/board/afc-timing/ipmi_oem.c b/port/board/afc-timing/ipmi_oem.c index bc3780cbe..969379480 100644 --- a/port/board/afc-timing/ipmi_oem.c +++ b/port/board/afc-timing/ipmi_oem.c @@ -163,54 +163,3 @@ IPMI_HANDLER(ipmi_oem_cmd_gpio_pin, NETFN_CUSTOM_OEM, IPMI_OEM_CMD_GPIO_PIN, ipm rsp->data_len = len; } - -/* ADN4604 IPMI Control commands */ -#ifdef MODULE_ADN4604 - -#include "adn4604.h" - -/* This command may take a while to execute and hold the IPMI transaction */ -IPMI_HANDLER(ipmi_oem_adn4604_cfg_output, NETFN_CUSTOM_OEM, IPMI_OEM_CMD_ADN4604_SET_OUTPUT_CFG, ipmi_msg *req, ipmi_msg* rsp) -{ - int len = rsp->data_len = 0; - - /* @todo Read port status before setting the new configuration */ - extern adn_connect_map_t con; - uint8_t map; - uint8_t output = req->data[1]; - uint8_t input = req->data[2]; - uint8_t enable = req->data[3]; - - if (output % 2) { - *((uint8_t *)&con+(output/2)) &= 0x0F; - *((uint8_t *)&con+(output/2)) |= (input << 4) & 0xF0; - } else { - *((uint8_t *)&con+(output/2)) &= 0xF0; - *((uint8_t *)&con+(output/2)) |= input & 0x0F; - } - - map = ( req->data[0] == 0 ) ? ADN_XPT_MAP0_CON_REG : ADN_XPT_MAP1_CON_REG; - - adn4604_xpt_config( map , con ); - - if ( enable ) { - adn4604_tx_control( output, TX_ENABLED ); - } else { - adn4604_tx_control( output, TX_DISABLED ); - } - - adn4604_update(); - - rsp->data_len = len; - rsp->completion_code = IPMI_CC_OK; -} - -IPMI_HANDLER(ipmi_oem_adn4604_reset, NETFN_CUSTOM_OEM, IPMI_OEM_CMD_ADN4604_RESET, ipmi_msg *req, ipmi_msg* rsp) -{ - adn4604_reset(); - - rsp->data_len = 0; - rsp->completion_code = IPMI_CC_OK; -} - -#endif diff --git a/port/board/afc-timing/ipmi_oem.h b/port/board/afc-timing/ipmi_oem.h index 3db59ba5f..312d21546 100644 --- a/port/board/afc-timing/ipmi_oem.h +++ b/port/board/afc-timing/ipmi_oem.h @@ -44,11 +44,6 @@ #define NETFN_CUSTOM_OEM 0x30 #define IPMI_OEM_CMD_I2C_TRANSFER 0x00 - -#define IPMI_OEM_CMD_ADN4604_SET_OUTPUT_CFG 0x01 -#define IPMI_OEM_CMD_ADN4604_GET_OUTPUT_CFG 0x02 -#define IPMI_OEM_CMD_ADN4604_RESET 0x03 - #define IPMI_OEM_CMD_GPIO_PIN 0x04 /** * @}