Merge branches 'acpi-soc', 'acpi-wdat' and 'acpi-cppc'
* acpi-soc: ACPI: APD: Fix HID for Hisilicon Hip07/08 ACPI / LPSS: Only call pwm_add_table() for the first PWM controller * acpi-wdat: ACPI / watchdog: Fix init failure with overlapping register regions * acpi-cppc: mailbox: pcc: Fix crash when request PCC channel 0
This commit is contained in:
commit
3de559d4df
|
@ -180,8 +180,8 @@ static const struct acpi_device_id acpi_apd_device_ids[] = {
|
|||
{ "APMC0D0F", APD_ADDR(xgene_i2c_desc) },
|
||||
{ "BRCM900D", APD_ADDR(vulcan_spi_desc) },
|
||||
{ "CAV900D", APD_ADDR(vulcan_spi_desc) },
|
||||
{ "HISI0A21", APD_ADDR(hip07_i2c_desc) },
|
||||
{ "HISI0A22", APD_ADDR(hip08_i2c_desc) },
|
||||
{ "HISI02A1", APD_ADDR(hip07_i2c_desc) },
|
||||
{ "HISI02A2", APD_ADDR(hip08_i2c_desc) },
|
||||
#endif
|
||||
{ }
|
||||
};
|
||||
|
|
|
@ -85,6 +85,7 @@ static const struct lpss_device_desc lpss_dma_desc = {
|
|||
};
|
||||
|
||||
struct lpss_private_data {
|
||||
struct acpi_device *adev;
|
||||
void __iomem *mmio_base;
|
||||
resource_size_t mmio_size;
|
||||
unsigned int fixed_clk_rate;
|
||||
|
@ -155,6 +156,12 @@ static struct pwm_lookup byt_pwm_lookup[] = {
|
|||
|
||||
static void byt_pwm_setup(struct lpss_private_data *pdata)
|
||||
{
|
||||
struct acpi_device *adev = pdata->adev;
|
||||
|
||||
/* Only call pwm_add_table for the first PWM controller */
|
||||
if (!adev->pnp.unique_id || strcmp(adev->pnp.unique_id, "1"))
|
||||
return;
|
||||
|
||||
if (!acpi_dev_present("INT33FD", NULL, -1))
|
||||
pwm_add_table(byt_pwm_lookup, ARRAY_SIZE(byt_pwm_lookup));
|
||||
}
|
||||
|
@ -180,6 +187,12 @@ static struct pwm_lookup bsw_pwm_lookup[] = {
|
|||
|
||||
static void bsw_pwm_setup(struct lpss_private_data *pdata)
|
||||
{
|
||||
struct acpi_device *adev = pdata->adev;
|
||||
|
||||
/* Only call pwm_add_table for the first PWM controller */
|
||||
if (!adev->pnp.unique_id || strcmp(adev->pnp.unique_id, "1"))
|
||||
return;
|
||||
|
||||
pwm_add_table(bsw_pwm_lookup, ARRAY_SIZE(bsw_pwm_lookup));
|
||||
}
|
||||
|
||||
|
@ -456,6 +469,7 @@ static int acpi_lpss_create_device(struct acpi_device *adev,
|
|||
goto err_out;
|
||||
}
|
||||
|
||||
pdata->adev = adev;
|
||||
pdata->dev_desc = dev_desc;
|
||||
|
||||
if (dev_desc->setup)
|
||||
|
|
|
@ -86,7 +86,12 @@ void __init acpi_watchdog_init(void)
|
|||
|
||||
found = false;
|
||||
resource_list_for_each_entry(rentry, &resource_list) {
|
||||
if (resource_contains(rentry->res, &res)) {
|
||||
if (rentry->res->flags == res.flags &&
|
||||
resource_overlaps(rentry->res, &res)) {
|
||||
if (res.start < rentry->res->start)
|
||||
rentry->res->start = res.start;
|
||||
if (res.end > rentry->res->end)
|
||||
rentry->res->end = res.end;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@ static struct mbox_controller pcc_mbox_ctrl = {};
|
|||
*/
|
||||
static struct mbox_chan *get_pcc_channel(int id)
|
||||
{
|
||||
if (id < 0 || id > pcc_mbox_ctrl.num_chans)
|
||||
if (id < 0 || id >= pcc_mbox_ctrl.num_chans)
|
||||
return ERR_PTR(-ENOENT);
|
||||
|
||||
return &pcc_mbox_channels[id];
|
||||
|
|
Loading…
Reference in New Issue