* correct some naming after deeper investigation of

linux drm driver.  Seems radeon_hd isn't limited to the
  standard 0xa0 i2c slave address.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42762 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Alexander von Gluck IV 2011-09-21 21:36:00 +00:00
parent 6655050606
commit e40c00685c
4 changed files with 13 additions and 11 deletions

View File

@ -142,7 +142,7 @@ struct gpio_info {
bool valid;
bool hw_capable;
uint8 pin;
uint8 i2c_slave_addr;
uint32 mask_scl_reg;
uint32 mask_sda_reg;

View File

@ -567,6 +567,7 @@ detect_connectors()
// set up i2c gpio information for connector
radeon_gpu_i2c_setup(connector_index,
i2c_config->ucAccess);
break;
case ATOM_HPD_INT_RECORD_TYPE:
// TODO : HPD (Hot Plug)
@ -704,10 +705,10 @@ debug_connectors()
ERROR("Connector #%" B_PRIu32 ")\n", id);
ERROR(" + connector: %s\n", get_connector_name(connector_type));
ERROR(" + encoder: %s\n", get_encoder_name(encoder_type));
ERROR(" + i2c slave address: 0x%" B_PRIX8 "\n",
gConnector[id]->connector_gpio.i2c_slave_addr);
ERROR(" + gpio valid: %s\n",
(gConnector[id]->connector_gpio.valid) ? "true" : "false");
ERROR(" + gpio pin: 0x%" B_PRIX8 "\n",
gConnector[id]->connector_gpio.pin);
}
}
ERROR("==========================================\n");

View File

@ -344,7 +344,7 @@ get_i2c_signals(void* cookie, int* _clock, int* _data)
*_data = (sda != 0);
//TRACE("%s: GPIO 0x%" B_PRIX8 ", clock: %d, data: %d\n",
// __func__, info->pin, *_clock, *_data);
// __func__, info->i2c_slave_addr, *_clock, *_data);
return B_OK;
}
@ -367,7 +367,7 @@ set_i2c_signals(void* cookie, int clock, int data)
Write32(OUT, info->a_sda_reg, data);
//TRACE("%s: GPIO 0x%" B_PRIX8 ", clock: %d, data: %d\n",
// __func__, info->pin, clock, data);
// __func__, info->i2c_slave_addr, clock, data);
return B_OK;
}
@ -402,11 +402,11 @@ radeon_gpu_read_edid(uint32 connector, edid1_info *edid)
status_t
radeon_gpu_i2c_setup(uint32 id, uint8 gpio_pin)
radeon_gpu_i2c_setup(uint32 id, uint8 i2c_slave_addr)
{
// aka radeon_lookup_i2c_gpio
TRACE("%s: Path #%" B_PRId32 ": GPIO Pin 0x%" B_PRIx8 "\n", __func__,
id, gpio_pin);
TRACE("%s: Path #%" B_PRId32 ": i2c slave: 0x%" B_PRIx8 "\n", __func__,
id, i2c_slave_addr);
int index = GetIndexIntoMasterTable(DATA, GPIO_I2C_Info);
uint8 frev;
@ -434,7 +434,7 @@ radeon_gpu_i2c_setup(uint32 id, uint8 gpio_pin)
// TODO : if DCE 4 and i == 7 ... manual override for evergreen
// TODO : if DCE 3 and i == 4 ... manual override
if (gpio->sucI2cId.ucAccess != gpio_pin)
if (gpio->sucI2cId.ucAccess != i2c_slave_addr)
continue;
// populate gpio information
@ -442,7 +442,8 @@ radeon_gpu_i2c_setup(uint32 id, uint8 gpio_pin)
gConnector[id]->connector_gpio.hw_capable
= (gpio->sucI2cId.sbfAccess.bfHW_Capable) ? true : false;
gConnector[id]->connector_gpio.pin = gpio_pin;
// slave address of i2c endpoint
gConnector[id]->connector_gpio.i2c_slave_addr = i2c_slave_addr;
// GPIO mask (Allows software to control the GPIO pad)
// 0 = chip access; 1 = only software;

View File

@ -169,7 +169,7 @@ uint32 radeon_gpu_mc_idlecheck();
status_t radeon_gpu_mc_setup();
status_t radeon_gpu_irq_setup();
bool radeon_gpu_read_edid(uint32 connector, edid1_info *edid);
status_t radeon_gpu_i2c_setup(uint32 id, uint8 gpio_pin);
status_t radeon_gpu_i2c_setup(uint32 id, uint8 i2c_slave_addr);
#endif