From b3d46271e20f2890099f64edd0c52bb7e0e15008 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 11 Mar 2013 11:43:52 -0700 Subject: [PATCH] 3.4-stable patches added patches: arm-7663-1-perf-fix-armv7-evtype_mask-to-include-nsh-bit.patch drm-radeon-add-primary-dac-adj-quirk-for-r200-board.patch hwmon-pmbus-ltc2978-fix-peak-attribute-handling.patch hwmon-pmbus-ltc2978-use-detected-chip-id-to-select.patch hwmon-sht15-check-return-value-of-regulator_enable.patch --- ...armv7-evtype_mask-to-include-nsh-bit.patch | 34 ++++++ ...primary-dac-adj-quirk-for-r200-board.patch | 37 ++++++ ...-ltc2978-fix-peak-attribute-handling.patch | 113 ++++++++++++++++++ ...c2978-use-detected-chip-id-to-select.patch | 32 +++++ ...eck-return-value-of-regulator_enable.patch | 36 ++++++ queue-3.4/series | 5 + 6 files changed, 257 insertions(+) create mode 100644 queue-3.4/arm-7663-1-perf-fix-armv7-evtype_mask-to-include-nsh-bit.patch create mode 100644 queue-3.4/drm-radeon-add-primary-dac-adj-quirk-for-r200-board.patch create mode 100644 queue-3.4/hwmon-pmbus-ltc2978-fix-peak-attribute-handling.patch create mode 100644 queue-3.4/hwmon-pmbus-ltc2978-use-detected-chip-id-to-select.patch create mode 100644 queue-3.4/hwmon-sht15-check-return-value-of-regulator_enable.patch diff --git a/queue-3.4/arm-7663-1-perf-fix-armv7-evtype_mask-to-include-nsh-bit.patch b/queue-3.4/arm-7663-1-perf-fix-armv7-evtype_mask-to-include-nsh-bit.patch new file mode 100644 index 00000000000..6e0e7073cfc --- /dev/null +++ b/queue-3.4/arm-7663-1-perf-fix-armv7-evtype_mask-to-include-nsh-bit.patch @@ -0,0 +1,34 @@ +From f2fe09b055e2549de41fb107b34c60bac4a1b0cf Mon Sep 17 00:00:00 2001 +From: Will Deacon +Date: Thu, 28 Feb 2013 17:49:11 +0100 +Subject: ARM: 7663/1: perf: fix ARMv7 EVTYPE_MASK to include NSH bit + +From: Will Deacon + +commit f2fe09b055e2549de41fb107b34c60bac4a1b0cf upstream. + +Masked out PMXEVTYPER.NSH means that we can't enable profiling at PL2, +regardless of the settings in the HDCR. + +This patch fixes the broken mask. + +Reported-by: Christoffer Dall +Signed-off-by: Will Deacon +Signed-off-by: Russell King +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/kernel/perf_event_v7.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm/kernel/perf_event_v7.c ++++ b/arch/arm/kernel/perf_event_v7.c +@@ -775,7 +775,7 @@ static const unsigned armv7_a7_perf_cach + /* + * PMXEVTYPER: Event selection reg + */ +-#define ARMV7_EVTYPE_MASK 0xc00000ff /* Mask for writable bits */ ++#define ARMV7_EVTYPE_MASK 0xc80000ff /* Mask for writable bits */ + #define ARMV7_EVTYPE_EVENT 0xff /* Mask for EVENT bits */ + + /* diff --git a/queue-3.4/drm-radeon-add-primary-dac-adj-quirk-for-r200-board.patch b/queue-3.4/drm-radeon-add-primary-dac-adj-quirk-for-r200-board.patch new file mode 100644 index 00000000000..226bcfb669c --- /dev/null +++ b/queue-3.4/drm-radeon-add-primary-dac-adj-quirk-for-r200-board.patch @@ -0,0 +1,37 @@ +From e8fc41377f5037ff7a661ea06adc05f1daec1548 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Wed, 27 Feb 2013 12:01:58 -0500 +Subject: drm/radeon: add primary dac adj quirk for R200 board + +From: Alex Deucher + +commit e8fc41377f5037ff7a661ea06adc05f1daec1548 upstream. + +vbios values are wrong leading to colors that are +too bright. Use the default values instead. + +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/radeon_combios.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +--- a/drivers/gpu/drm/radeon/radeon_combios.c ++++ b/drivers/gpu/drm/radeon/radeon_combios.c +@@ -958,6 +958,15 @@ struct radeon_encoder_primary_dac *radeo + found = 1; + } + ++ /* quirks */ ++ /* Radeon 9100 (R200) */ ++ if ((dev->pdev->device == 0x514D) && ++ (dev->pdev->subsystem_vendor == 0x174B) && ++ (dev->pdev->subsystem_device == 0x7149)) { ++ /* vbios value is bad, use the default */ ++ found = 0; ++ } ++ + if (!found) /* fallback to defaults */ + radeon_legacy_get_primary_dac_info_from_table(rdev, p_dac); + diff --git a/queue-3.4/hwmon-pmbus-ltc2978-fix-peak-attribute-handling.patch b/queue-3.4/hwmon-pmbus-ltc2978-fix-peak-attribute-handling.patch new file mode 100644 index 00000000000..3e54ef38a8f --- /dev/null +++ b/queue-3.4/hwmon-pmbus-ltc2978-fix-peak-attribute-handling.patch @@ -0,0 +1,113 @@ +From dbd712c2272764a536e29ad6841dba74989a39d9 Mon Sep 17 00:00:00 2001 +From: Guenter Roeck +Date: Thu, 21 Feb 2013 09:33:25 -0800 +Subject: hwmon: (pmbus/ltc2978) Fix peak attribute handling + +From: Guenter Roeck + +commit dbd712c2272764a536e29ad6841dba74989a39d9 upstream. + +Peak attributes were not initialized and cleared correctly. +Also, temp2_max is only supported on page 0 and thus does not need to be +an array. + +Signed-off-by: Guenter Roeck +Acked-by: Jean Delvare +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/hwmon/pmbus/ltc2978.c | 28 +++++++++++++++------------- + 1 file changed, 15 insertions(+), 13 deletions(-) + +--- a/drivers/hwmon/pmbus/ltc2978.c ++++ b/drivers/hwmon/pmbus/ltc2978.c +@@ -62,7 +62,7 @@ struct ltc2978_data { + int temp_min, temp_max; + int vout_min[8], vout_max[8]; + int iout_max[2]; +- int temp2_max[2]; ++ int temp2_max; + struct pmbus_driver_info info; + }; + +@@ -204,10 +204,9 @@ static int ltc3880_read_word_data(struct + ret = pmbus_read_word_data(client, page, + LTC3880_MFR_TEMPERATURE2_PEAK); + if (ret >= 0) { +- if (lin11_to_val(ret) +- > lin11_to_val(data->temp2_max[page])) +- data->temp2_max[page] = ret; +- ret = data->temp2_max[page]; ++ if (lin11_to_val(ret) > lin11_to_val(data->temp2_max)) ++ data->temp2_max = ret; ++ ret = data->temp2_max; + } + break; + case PMBUS_VIRT_READ_VIN_MIN: +@@ -248,11 +247,11 @@ static int ltc2978_write_word_data(struc + + switch (reg) { + case PMBUS_VIRT_RESET_IOUT_HISTORY: +- data->iout_max[page] = 0x7fff; ++ data->iout_max[page] = 0x7c00; + ret = ltc2978_clear_peaks(client, page, data->id); + break; + case PMBUS_VIRT_RESET_TEMP2_HISTORY: +- data->temp2_max[page] = 0x7fff; ++ data->temp2_max = 0x7c00; + ret = ltc2978_clear_peaks(client, page, data->id); + break; + case PMBUS_VIRT_RESET_VOUT_HISTORY: +@@ -262,12 +261,12 @@ static int ltc2978_write_word_data(struc + break; + case PMBUS_VIRT_RESET_VIN_HISTORY: + data->vin_min = 0x7bff; +- data->vin_max = 0; ++ data->vin_max = 0x7c00; + ret = ltc2978_clear_peaks(client, page, data->id); + break; + case PMBUS_VIRT_RESET_TEMP_HISTORY: + data->temp_min = 0x7bff; +- data->temp_max = 0x7fff; ++ data->temp_max = 0x7c00; + ret = ltc2978_clear_peaks(client, page, data->id); + break; + default: +@@ -321,10 +320,11 @@ static int ltc2978_probe(struct i2c_clie + info = &data->info; + info->write_word_data = ltc2978_write_word_data; + +- data->vout_min[0] = 0xffff; + data->vin_min = 0x7bff; ++ data->vin_max = 0x7c00; + data->temp_min = 0x7bff; +- data->temp_max = 0x7fff; ++ data->temp_max = 0x7c00; ++ data->temp2_max = 0x7c00; + + switch (id->driver_data) { + case ltc2978: +@@ -336,7 +336,6 @@ static int ltc2978_probe(struct i2c_clie + for (i = 1; i < 8; i++) { + info->func[i] = PMBUS_HAVE_VOUT + | PMBUS_HAVE_STATUS_VOUT; +- data->vout_min[i] = 0xffff; + } + break; + case ltc3880: +@@ -352,11 +351,14 @@ static int ltc2978_probe(struct i2c_clie + | PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT + | PMBUS_HAVE_POUT + | PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP; +- data->vout_min[1] = 0xffff; ++ data->iout_max[0] = 0x7c00; ++ data->iout_max[1] = 0x7c00; + break; + default: + return -ENODEV; + } ++ for (i = 0; i < info->pages; i++) ++ data->vout_min[i] = 0xffff; + + return pmbus_do_probe(client, id, info); + } diff --git a/queue-3.4/hwmon-pmbus-ltc2978-use-detected-chip-id-to-select.patch b/queue-3.4/hwmon-pmbus-ltc2978-use-detected-chip-id-to-select.patch new file mode 100644 index 00000000000..c3da7dd3d22 --- /dev/null +++ b/queue-3.4/hwmon-pmbus-ltc2978-use-detected-chip-id-to-select.patch @@ -0,0 +1,32 @@ +From f366fccd0809f13ba20d64cae3c83f7338c88af7 Mon Sep 17 00:00:00 2001 +From: Guenter Roeck +Date: Thu, 21 Feb 2013 10:49:40 -0800 +Subject: hwmon: (pmbus/ltc2978) Use detected chip ID to select supported functionality + +From: Guenter Roeck + +commit f366fccd0809f13ba20d64cae3c83f7338c88af7 upstream. + +We read the chip ID from the chip, use it to determine if the chip ID provided +to the driver is correct, and report it if wrong. We should also use the +correct chip ID to select supported functionality. + +Signed-off-by: Guenter Roeck +Acked-by: Jean Delvare +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/hwmon/pmbus/ltc2978.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/hwmon/pmbus/ltc2978.c ++++ b/drivers/hwmon/pmbus/ltc2978.c +@@ -326,7 +326,7 @@ static int ltc2978_probe(struct i2c_clie + data->temp_max = 0x7c00; + data->temp2_max = 0x7c00; + +- switch (id->driver_data) { ++ switch (data->id) { + case ltc2978: + info->read_word_data = ltc2978_read_word_data; + info->pages = 8; diff --git a/queue-3.4/hwmon-sht15-check-return-value-of-regulator_enable.patch b/queue-3.4/hwmon-sht15-check-return-value-of-regulator_enable.patch new file mode 100644 index 00000000000..c92901cb862 --- /dev/null +++ b/queue-3.4/hwmon-sht15-check-return-value-of-regulator_enable.patch @@ -0,0 +1,36 @@ +From 3e78080f81481aa8340374d5a37ae033c1cf4272 Mon Sep 17 00:00:00 2001 +From: Mark Brown +Date: Sat, 2 Mar 2013 15:33:30 +0800 +Subject: hwmon: (sht15) Check return value of regulator_enable() + +From: Mark Brown + +commit 3e78080f81481aa8340374d5a37ae033c1cf4272 upstream. + +Not having power is a pretty serious error so check that we are able to +enable the supply and error out if we can't. + +Signed-off-by: Mark Brown +Signed-off-by: Guenter Roeck + +--- + drivers/hwmon/sht15.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +--- a/drivers/hwmon/sht15.c ++++ b/drivers/hwmon/sht15.c +@@ -926,7 +926,13 @@ static int __devinit sht15_probe(struct + if (voltage) + data->supply_uV = voltage; + +- regulator_enable(data->reg); ++ ret = regulator_enable(data->reg); ++ if (ret != 0) { ++ dev_err(&pdev->dev, ++ "failed to enable regulator: %d\n", ret); ++ return ret; ++ } ++ + /* + * Setup a notifier block to update this if another device + * causes the voltage to change diff --git a/queue-3.4/series b/queue-3.4/series index 2475f95a016..ae7147eb690 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -16,3 +16,8 @@ ath9k_hw-improve-reset-reliability-after-errors.patch md-protect-against-crash-upon-fsync-on-ro-array.patch md-fix-two-bugs-when-attempting-to-resize-raid0-array.patch md-raid0-fix-error-return-from-create_stripe_zones.patch +hwmon-sht15-check-return-value-of-regulator_enable.patch +hwmon-pmbus-ltc2978-fix-peak-attribute-handling.patch +hwmon-pmbus-ltc2978-use-detected-chip-id-to-select.patch +drm-radeon-add-primary-dac-adj-quirk-for-r200-board.patch +arm-7663-1-perf-fix-armv7-evtype_mask-to-include-nsh-bit.patch -- 2.47.3