Skip to content

Commit

Permalink
Remove deprecated code for clock switch configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavosr8 committed Sep 29, 2023
1 parent 467a826 commit b9e4300
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 112 deletions.
51 changes: 0 additions & 51 deletions port/board/afc-bpm/v3_1/ipmi_oem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 0 additions & 5 deletions port/board/afc-bpm/v3_1/ipmi_oem.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
/**
* @}
Expand Down
51 changes: 0 additions & 51 deletions port/board/afc-timing/ipmi_oem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 0 additions & 5 deletions port/board/afc-timing/ipmi_oem.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
/**
* @}
Expand Down

0 comments on commit b9e4300

Please sign in to comment.