ACPI fixes for v4.13-rc4
- Fix a device ID of Hisilicon Hip07/08 in the ACPI APD (AMD SoC) driver (Hanjun Guo). - Fix list corruption (introduced during the 4.11 cycle) in the ACPI LPSS (Intel SoC) driver (Hans de Goede). - Fix PCC mailbox handling code crash during initialization when PCCT is not present and PCC channel 0 is requested (Hoan Tran). - Fix a WDAT watchdog initialization issue causing platform device creation to fail due to partially overlapping address ranges in resources (Ryan Kennedy). -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJZg3FsAAoJEILEb/54YlRxmowQAIjFSnojQPMu1Gd8qSvnO5j/ 5XqE1ohkb/0sfkY6uLPX/mDU7fEZHr+rz3bLVgU7BPumcqQ9rxi8P+1M0zl3ccIe KxGaRF0zL3TVnLzzxcQUprdCLBVJH+bu7uiNMvFq0pLrKCKMT1SdVwG9HsZeDsQD IdpACI4UkdQ840KwOXePpvlmOI03ThHZAcJn9TrmupA90teF/j/pqdV25A8+yWo3 4Yxmh7Exd1wW5B6IFMMxmM8WhOB8Q0X50Wehsg2Yi16HddjI9IEwg+KnsgRRiodw L+eDQgg6wUNJ2swVu7G/7KdvA4BDV5ZYbEo6gc0NZAhs0pTm4M6kMwa4i0OQ572r WzhFrHfIuqyDMzSPJp9l5D38wgmIykMkX2dYKMi+sxnyi3ZgagAOlmYbmsPzhFWL TrEhd7fJ687xtC991mLfNyWM7cr7mpFJL+eB9sOospBmF/xjFBlwvtNZI6dYhoDh ON6E3QQ6/G/5XQQPF+SKBrMNllCs+N1hefvZiG9SD2i5u+m31Vd3WLDHoqHMcASu oX7+PuvasBJNAVM/lMtbKtXcyHNfYRvzWBqkMkQPNIkmMfdXgI8g8ZNpj2R+onfd RPJFp/IsF8FSjLA4Q/BMduLd/qjz7wZdIjuZZO/9eFOHVh8wBOt2ZfaFUjA00OmE lKG8r1pui+P6e4o8OkO1 =ZD/q -----END PGP SIGNATURE----- Merge tag 'acpi-4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These fix two issues in the ACPI SoC drivers (Intel LPSS and AMD APD), a crash in the PCC mailbox initialization code and a WDAT watchdog initialization failure. Specifics: - Fix a device ID of Hisilicon Hip07/08 in the ACPI APD (AMD SoC) driver (Hanjun Guo). - Fix list corruption (introduced during the 4.11 cycle) in the ACPI LPSS (Intel SoC) driver (Hans de Goede). - Fix PCC mailbox handling code crash during initialization when PCCT is not present and PCC channel 0 is requested (Hoan Tran). - Fix a WDAT watchdog initialization issue causing platform device creation to fail due to partially overlapping address ranges in resources (Ryan Kennedy)" * tag 'acpi-4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: APD: Fix HID for Hisilicon Hip07/08 mailbox: pcc: Fix crash when request PCC channel 0 ACPI / watchdog: Fix init failure with overlapping register regions ACPI / LPSS: Only call pwm_add_table() for the first PWM controller
This commit is contained in:
commit
8d3fe85f07
@ -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
Block a user