diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dma/mv_xor.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/dvo_ch7017.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_dma.c | 23 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_reg.h | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_bios.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 21 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_sdvo.c | 3 | ||||
-rw-r--r-- | drivers/hwmon/s3c-hwmon.c | 2 | ||||
-rw-r--r-- | drivers/platform/x86/intel_ips.c | 36 | ||||
-rw-r--r-- | drivers/platform/x86/intel_ips.h | 21 | ||||
-rw-r--r-- | drivers/spi/coldfire_qspi.c | 2 | ||||
-rw-r--r-- | drivers/spi/omap2_mcspi.c | 39 | ||||
-rw-r--r-- | drivers/staging/zram/zram_drv.c | 6 |
13 files changed, 152 insertions, 17 deletions
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c index 411d5bf50fc4..a25f5f61e0e0 100644 --- a/drivers/dma/mv_xor.c +++ b/drivers/dma/mv_xor.c | |||
@@ -449,7 +449,7 @@ mv_xor_slot_cleanup(struct mv_xor_chan *mv_chan) | |||
449 | static void mv_xor_tasklet(unsigned long data) | 449 | static void mv_xor_tasklet(unsigned long data) |
450 | { | 450 | { |
451 | struct mv_xor_chan *chan = (struct mv_xor_chan *) data; | 451 | struct mv_xor_chan *chan = (struct mv_xor_chan *) data; |
452 | __mv_xor_slot_cleanup(chan); | 452 | mv_xor_slot_cleanup(chan); |
453 | } | 453 | } |
454 | 454 | ||
455 | static struct mv_xor_desc_slot * | 455 | static struct mv_xor_desc_slot * |
diff --git a/drivers/gpu/drm/i915/dvo_ch7017.c b/drivers/gpu/drm/i915/dvo_ch7017.c index af70337567ce..d3e8c540f778 100644 --- a/drivers/gpu/drm/i915/dvo_ch7017.c +++ b/drivers/gpu/drm/i915/dvo_ch7017.c | |||
@@ -242,7 +242,7 @@ fail: | |||
242 | 242 | ||
243 | static enum drm_connector_status ch7017_detect(struct intel_dvo_device *dvo) | 243 | static enum drm_connector_status ch7017_detect(struct intel_dvo_device *dvo) |
244 | { | 244 | { |
245 | return connector_status_unknown; | 245 | return connector_status_connected; |
246 | } | 246 | } |
247 | 247 | ||
248 | static enum drm_mode_status ch7017_mode_valid(struct intel_dvo_device *dvo, | 248 | static enum drm_mode_status ch7017_mode_valid(struct intel_dvo_device *dvo, |
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index e6800819bca8..cb900dc83d95 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include "i915_drm.h" | 34 | #include "i915_drm.h" |
35 | #include "i915_drv.h" | 35 | #include "i915_drv.h" |
36 | #include "i915_trace.h" | 36 | #include "i915_trace.h" |
37 | #include "../../../platform/x86/intel_ips.h" | ||
37 | #include <linux/pci.h> | 38 | #include <linux/pci.h> |
38 | #include <linux/vgaarb.h> | 39 | #include <linux/vgaarb.h> |
39 | #include <linux/acpi.h> | 40 | #include <linux/acpi.h> |
@@ -1871,6 +1872,26 @@ out_unlock: | |||
1871 | EXPORT_SYMBOL_GPL(i915_gpu_turbo_disable); | 1872 | EXPORT_SYMBOL_GPL(i915_gpu_turbo_disable); |
1872 | 1873 | ||
1873 | /** | 1874 | /** |
1875 | * Tells the intel_ips driver that the i915 driver is now loaded, if | ||
1876 | * IPS got loaded first. | ||
1877 | * | ||
1878 | * This awkward dance is so that neither module has to depend on the | ||
1879 | * other in order for IPS to do the appropriate communication of | ||
1880 | * GPU turbo limits to i915. | ||
1881 | */ | ||
1882 | static void | ||
1883 | ips_ping_for_i915_load(void) | ||
1884 | { | ||
1885 | void (*link)(void); | ||
1886 | |||
1887 | link = symbol_get(ips_link_to_i915_driver); | ||
1888 | if (link) { | ||
1889 | link(); | ||
1890 | symbol_put(ips_link_to_i915_driver); | ||
1891 | } | ||
1892 | } | ||
1893 | |||
1894 | /** | ||
1874 | * i915_driver_load - setup chip and create an initial config | 1895 | * i915_driver_load - setup chip and create an initial config |
1875 | * @dev: DRM device | 1896 | * @dev: DRM device |
1876 | * @flags: startup flags | 1897 | * @flags: startup flags |
@@ -2075,6 +2096,8 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) | |||
2075 | dev_priv->mchdev_lock = &mchdev_lock; | 2096 | dev_priv->mchdev_lock = &mchdev_lock; |
2076 | spin_unlock(&mchdev_lock); | 2097 | spin_unlock(&mchdev_lock); |
2077 | 2098 | ||
2099 | ips_ping_for_i915_load(); | ||
2100 | |||
2078 | return 0; | 2101 | return 0; |
2079 | 2102 | ||
2080 | out_workqueue_free: | 2103 | out_workqueue_free: |
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 878fc766a12c..cb8f43429279 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
@@ -2471,6 +2471,9 @@ | |||
2471 | # define MARIUNIT_CLOCK_GATE_DISABLE (1 << 18) | 2471 | # define MARIUNIT_CLOCK_GATE_DISABLE (1 << 18) |
2472 | # define SVSMUNIT_CLOCK_GATE_DISABLE (1 << 1) | 2472 | # define SVSMUNIT_CLOCK_GATE_DISABLE (1 << 1) |
2473 | 2473 | ||
2474 | #define PCH_3DCGDIS1 0x46024 | ||
2475 | # define VFMUNIT_CLOCK_GATE_DISABLE (1 << 11) | ||
2476 | |||
2474 | #define FDI_PLL_FREQ_CTL 0x46030 | 2477 | #define FDI_PLL_FREQ_CTL 0x46030 |
2475 | #define FDI_PLL_FREQ_CHANGE_REQUEST (1<<24) | 2478 | #define FDI_PLL_FREQ_CHANGE_REQUEST (1<<24) |
2476 | #define FDI_PLL_FREQ_LOCK_LIMIT_MASK 0xfff00 | 2479 | #define FDI_PLL_FREQ_LOCK_LIMIT_MASK 0xfff00 |
@@ -2588,6 +2591,13 @@ | |||
2588 | #define ILK_DISPLAY_CHICKEN2 0x42004 | 2591 | #define ILK_DISPLAY_CHICKEN2 0x42004 |
2589 | #define ILK_DPARB_GATE (1<<22) | 2592 | #define ILK_DPARB_GATE (1<<22) |
2590 | #define ILK_VSDPFD_FULL (1<<21) | 2593 | #define ILK_VSDPFD_FULL (1<<21) |
2594 | #define ILK_DISPLAY_CHICKEN_FUSES 0x42014 | ||
2595 | #define ILK_INTERNAL_GRAPHICS_DISABLE (1<<31) | ||
2596 | #define ILK_INTERNAL_DISPLAY_DISABLE (1<<30) | ||
2597 | #define ILK_DISPLAY_DEBUG_DISABLE (1<<29) | ||
2598 | #define ILK_HDCP_DISABLE (1<<25) | ||
2599 | #define ILK_eDP_A_DISABLE (1<<24) | ||
2600 | #define ILK_DESKTOP (1<<23) | ||
2591 | #define ILK_DSPCLK_GATE 0x42020 | 2601 | #define ILK_DSPCLK_GATE 0x42020 |
2592 | #define ILK_DPARB_CLK_GATE (1<<5) | 2602 | #define ILK_DPARB_CLK_GATE (1<<5) |
2593 | /* According to spec this bit 7/8/9 of 0x42020 should be set to enable FBC */ | 2603 | /* According to spec this bit 7/8/9 of 0x42020 should be set to enable FBC */ |
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c index 2b2078695d2a..b0b1200ed650 100644 --- a/drivers/gpu/drm/i915/intel_bios.c +++ b/drivers/gpu/drm/i915/intel_bios.c | |||
@@ -270,7 +270,7 @@ parse_general_features(struct drm_i915_private *dev_priv, | |||
270 | general->ssc_freq ? 66 : 48; | 270 | general->ssc_freq ? 66 : 48; |
271 | else if (IS_GEN5(dev) || IS_GEN6(dev)) | 271 | else if (IS_GEN5(dev) || IS_GEN6(dev)) |
272 | dev_priv->lvds_ssc_freq = | 272 | dev_priv->lvds_ssc_freq = |
273 | general->ssc_freq ? 120 : 100; | 273 | general->ssc_freq ? 100 : 120; |
274 | else | 274 | else |
275 | dev_priv->lvds_ssc_freq = | 275 | dev_priv->lvds_ssc_freq = |
276 | general->ssc_freq ? 100 : 96; | 276 | general->ssc_freq ? 100 : 96; |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index d9b7092439ef..fca523288aca 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -5379,6 +5379,23 @@ static int intel_encoder_clones(struct drm_device *dev, int type_mask) | |||
5379 | return index_mask; | 5379 | return index_mask; |
5380 | } | 5380 | } |
5381 | 5381 | ||
5382 | static bool has_edp_a(struct drm_device *dev) | ||
5383 | { | ||
5384 | struct drm_i915_private *dev_priv = dev->dev_private; | ||
5385 | |||
5386 | if (!IS_MOBILE(dev)) | ||
5387 | return false; | ||
5388 | |||
5389 | if ((I915_READ(DP_A) & DP_DETECTED) == 0) | ||
5390 | return false; | ||
5391 | |||
5392 | if (IS_GEN5(dev) && | ||
5393 | (I915_READ(ILK_DISPLAY_CHICKEN_FUSES) & ILK_eDP_A_DISABLE)) | ||
5394 | return false; | ||
5395 | |||
5396 | return true; | ||
5397 | } | ||
5398 | |||
5382 | static void intel_setup_outputs(struct drm_device *dev) | 5399 | static void intel_setup_outputs(struct drm_device *dev) |
5383 | { | 5400 | { |
5384 | struct drm_i915_private *dev_priv = dev->dev_private; | 5401 | struct drm_i915_private *dev_priv = dev->dev_private; |
@@ -5396,7 +5413,7 @@ static void intel_setup_outputs(struct drm_device *dev) | |||
5396 | if (HAS_PCH_SPLIT(dev)) { | 5413 | if (HAS_PCH_SPLIT(dev)) { |
5397 | dpd_is_edp = intel_dpd_is_edp(dev); | 5414 | dpd_is_edp = intel_dpd_is_edp(dev); |
5398 | 5415 | ||
5399 | if (IS_MOBILE(dev) && (I915_READ(DP_A) & DP_DETECTED)) | 5416 | if (has_edp_a(dev)) |
5400 | intel_dp_init(dev, DP_A); | 5417 | intel_dp_init(dev, DP_A); |
5401 | 5418 | ||
5402 | if (dpd_is_edp && (I915_READ(PCH_DP_D) & DP_DETECTED)) | 5419 | if (dpd_is_edp && (I915_READ(PCH_DP_D) & DP_DETECTED)) |
@@ -5825,6 +5842,8 @@ void intel_init_clock_gating(struct drm_device *dev) | |||
5825 | I915_WRITE(PCH_3DCGDIS0, | 5842 | I915_WRITE(PCH_3DCGDIS0, |
5826 | MARIUNIT_CLOCK_GATE_DISABLE | | 5843 | MARIUNIT_CLOCK_GATE_DISABLE | |
5827 | SVSMUNIT_CLOCK_GATE_DISABLE); | 5844 | SVSMUNIT_CLOCK_GATE_DISABLE); |
5845 | I915_WRITE(PCH_3DCGDIS1, | ||
5846 | VFMUNIT_CLOCK_GATE_DISABLE); | ||
5828 | } | 5847 | } |
5829 | 5848 | ||
5830 | I915_WRITE(PCH_DSPCLK_GATE_D, dspclk_gate); | 5849 | I915_WRITE(PCH_DSPCLK_GATE_D, dspclk_gate); |
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index 27e63abf2a73..6bc42fa2a6ec 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c | |||
@@ -2040,13 +2040,14 @@ intel_sdvo_dvi_init(struct intel_sdvo *intel_sdvo, int device) | |||
2040 | SDVO_COLORIMETRY_RGB256); | 2040 | SDVO_COLORIMETRY_RGB256); |
2041 | connector->connector_type = DRM_MODE_CONNECTOR_HDMIA; | 2041 | connector->connector_type = DRM_MODE_CONNECTOR_HDMIA; |
2042 | 2042 | ||
2043 | intel_sdvo_add_hdmi_properties(intel_sdvo_connector); | ||
2044 | intel_sdvo->is_hdmi = true; | 2043 | intel_sdvo->is_hdmi = true; |
2045 | } | 2044 | } |
2046 | intel_sdvo->base.clone_mask = ((1 << INTEL_SDVO_NON_TV_CLONE_BIT) | | 2045 | intel_sdvo->base.clone_mask = ((1 << INTEL_SDVO_NON_TV_CLONE_BIT) | |
2047 | (1 << INTEL_ANALOG_CLONE_BIT)); | 2046 | (1 << INTEL_ANALOG_CLONE_BIT)); |
2048 | 2047 | ||
2049 | intel_sdvo_connector_init(intel_sdvo_connector, intel_sdvo); | 2048 | intel_sdvo_connector_init(intel_sdvo_connector, intel_sdvo); |
2049 | if (intel_sdvo->is_hdmi) | ||
2050 | intel_sdvo_add_hdmi_properties(intel_sdvo_connector); | ||
2050 | 2051 | ||
2051 | return true; | 2052 | return true; |
2052 | } | 2053 | } |
diff --git a/drivers/hwmon/s3c-hwmon.c b/drivers/hwmon/s3c-hwmon.c index 05248f2d7581..92b42db43bcf 100644 --- a/drivers/hwmon/s3c-hwmon.c +++ b/drivers/hwmon/s3c-hwmon.c | |||
@@ -234,7 +234,6 @@ static int s3c_hwmon_create_attr(struct device *dev, | |||
234 | attr->index = channel; | 234 | attr->index = channel; |
235 | attr->dev_attr.attr.name = attrs->in_name; | 235 | attr->dev_attr.attr.name = attrs->in_name; |
236 | attr->dev_attr.attr.mode = S_IRUGO; | 236 | attr->dev_attr.attr.mode = S_IRUGO; |
237 | attr->dev_attr.attr.owner = THIS_MODULE; | ||
238 | attr->dev_attr.show = s3c_hwmon_ch_show; | 237 | attr->dev_attr.show = s3c_hwmon_ch_show; |
239 | 238 | ||
240 | ret = device_create_file(dev, &attr->dev_attr); | 239 | ret = device_create_file(dev, &attr->dev_attr); |
@@ -252,7 +251,6 @@ static int s3c_hwmon_create_attr(struct device *dev, | |||
252 | attr->index = channel; | 251 | attr->index = channel; |
253 | attr->dev_attr.attr.name = attrs->label_name; | 252 | attr->dev_attr.attr.name = attrs->label_name; |
254 | attr->dev_attr.attr.mode = S_IRUGO; | 253 | attr->dev_attr.attr.mode = S_IRUGO; |
255 | attr->dev_attr.attr.owner = THIS_MODULE; | ||
256 | attr->dev_attr.show = s3c_hwmon_label_show; | 254 | attr->dev_attr.show = s3c_hwmon_label_show; |
257 | 255 | ||
258 | ret = device_create_file(dev, &attr->dev_attr); | 256 | ret = device_create_file(dev, &attr->dev_attr); |
diff --git a/drivers/platform/x86/intel_ips.c b/drivers/platform/x86/intel_ips.c index c44a5e8b8b82..f0b3ad13c273 100644 --- a/drivers/platform/x86/intel_ips.c +++ b/drivers/platform/x86/intel_ips.c | |||
@@ -75,6 +75,7 @@ | |||
75 | #include <drm/i915_drm.h> | 75 | #include <drm/i915_drm.h> |
76 | #include <asm/msr.h> | 76 | #include <asm/msr.h> |
77 | #include <asm/processor.h> | 77 | #include <asm/processor.h> |
78 | #include "intel_ips.h" | ||
78 | 79 | ||
79 | #define PCI_DEVICE_ID_INTEL_THERMAL_SENSOR 0x3b32 | 80 | #define PCI_DEVICE_ID_INTEL_THERMAL_SENSOR 0x3b32 |
80 | 81 | ||
@@ -245,6 +246,7 @@ | |||
245 | #define thm_writel(off, val) writel((val), ips->regmap + (off)) | 246 | #define thm_writel(off, val) writel((val), ips->regmap + (off)) |
246 | 247 | ||
247 | static const int IPS_ADJUST_PERIOD = 5000; /* ms */ | 248 | static const int IPS_ADJUST_PERIOD = 5000; /* ms */ |
249 | static bool late_i915_load = false; | ||
248 | 250 | ||
249 | /* For initial average collection */ | 251 | /* For initial average collection */ |
250 | static const int IPS_SAMPLE_PERIOD = 200; /* ms */ | 252 | static const int IPS_SAMPLE_PERIOD = 200; /* ms */ |
@@ -339,6 +341,9 @@ struct ips_driver { | |||
339 | u64 orig_turbo_ratios; | 341 | u64 orig_turbo_ratios; |
340 | }; | 342 | }; |
341 | 343 | ||
344 | static bool | ||
345 | ips_gpu_turbo_enabled(struct ips_driver *ips); | ||
346 | |||
342 | /** | 347 | /** |
343 | * ips_cpu_busy - is CPU busy? | 348 | * ips_cpu_busy - is CPU busy? |
344 | * @ips: IPS driver struct | 349 | * @ips: IPS driver struct |
@@ -517,7 +522,7 @@ static void ips_disable_cpu_turbo(struct ips_driver *ips) | |||
517 | */ | 522 | */ |
518 | static bool ips_gpu_busy(struct ips_driver *ips) | 523 | static bool ips_gpu_busy(struct ips_driver *ips) |
519 | { | 524 | { |
520 | if (!ips->gpu_turbo_enabled) | 525 | if (!ips_gpu_turbo_enabled(ips)) |
521 | return false; | 526 | return false; |
522 | 527 | ||
523 | return ips->gpu_busy(); | 528 | return ips->gpu_busy(); |
@@ -532,7 +537,7 @@ static bool ips_gpu_busy(struct ips_driver *ips) | |||
532 | */ | 537 | */ |
533 | static void ips_gpu_raise(struct ips_driver *ips) | 538 | static void ips_gpu_raise(struct ips_driver *ips) |
534 | { | 539 | { |
535 | if (!ips->gpu_turbo_enabled) | 540 | if (!ips_gpu_turbo_enabled(ips)) |
536 | return; | 541 | return; |
537 | 542 | ||
538 | if (!ips->gpu_raise()) | 543 | if (!ips->gpu_raise()) |
@@ -549,7 +554,7 @@ static void ips_gpu_raise(struct ips_driver *ips) | |||
549 | */ | 554 | */ |
550 | static void ips_gpu_lower(struct ips_driver *ips) | 555 | static void ips_gpu_lower(struct ips_driver *ips) |
551 | { | 556 | { |
552 | if (!ips->gpu_turbo_enabled) | 557 | if (!ips_gpu_turbo_enabled(ips)) |
553 | return; | 558 | return; |
554 | 559 | ||
555 | if (!ips->gpu_lower()) | 560 | if (!ips->gpu_lower()) |
@@ -1454,6 +1459,31 @@ out_err: | |||
1454 | return false; | 1459 | return false; |
1455 | } | 1460 | } |
1456 | 1461 | ||
1462 | static bool | ||
1463 | ips_gpu_turbo_enabled(struct ips_driver *ips) | ||
1464 | { | ||
1465 | if (!ips->gpu_busy && late_i915_load) { | ||
1466 | if (ips_get_i915_syms(ips)) { | ||
1467 | dev_info(&ips->dev->dev, | ||
1468 | "i915 driver attached, reenabling gpu turbo\n"); | ||
1469 | ips->gpu_turbo_enabled = !(thm_readl(THM_HTS) & HTS_GTD_DIS); | ||
1470 | } | ||
1471 | } | ||
1472 | |||
1473 | return ips->gpu_turbo_enabled; | ||
1474 | } | ||
1475 | |||
1476 | void | ||
1477 | ips_link_to_i915_driver() | ||
1478 | { | ||
1479 | /* We can't cleanly get at the various ips_driver structs from | ||
1480 | * this caller (the i915 driver), so just set a flag saying | ||
1481 | * that it's time to try getting the symbols again. | ||
1482 | */ | ||
1483 | late_i915_load = true; | ||
1484 | } | ||
1485 | EXPORT_SYMBOL_GPL(ips_link_to_i915_driver); | ||
1486 | |||
1457 | static DEFINE_PCI_DEVICE_TABLE(ips_id_table) = { | 1487 | static DEFINE_PCI_DEVICE_TABLE(ips_id_table) = { |
1458 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, | 1488 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, |
1459 | PCI_DEVICE_ID_INTEL_THERMAL_SENSOR), }, | 1489 | PCI_DEVICE_ID_INTEL_THERMAL_SENSOR), }, |
diff --git a/drivers/platform/x86/intel_ips.h b/drivers/platform/x86/intel_ips.h new file mode 100644 index 000000000000..73299beff5b3 --- /dev/null +++ b/drivers/platform/x86/intel_ips.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2010 Intel Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License along with | ||
14 | * this program; if not, write to the Free Software Foundation, Inc., | ||
15 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
16 | * | ||
17 | * The full GNU General Public License is included in this distribution in | ||
18 | * the file called "COPYING". | ||
19 | */ | ||
20 | |||
21 | void ips_link_to_i915_driver(void); | ||
diff --git a/drivers/spi/coldfire_qspi.c b/drivers/spi/coldfire_qspi.c index 052b3c7fa6a0..8856bcca9d29 100644 --- a/drivers/spi/coldfire_qspi.c +++ b/drivers/spi/coldfire_qspi.c | |||
@@ -317,7 +317,7 @@ static void mcfqspi_work(struct work_struct *work) | |||
317 | msg = container_of(mcfqspi->msgq.next, struct spi_message, | 317 | msg = container_of(mcfqspi->msgq.next, struct spi_message, |
318 | queue); | 318 | queue); |
319 | 319 | ||
320 | list_del_init(&mcfqspi->msgq); | 320 | list_del_init(&msg->queue); |
321 | spin_unlock_irqrestore(&mcfqspi->lock, flags); | 321 | spin_unlock_irqrestore(&mcfqspi->lock, flags); |
322 | 322 | ||
323 | spi = msg->spi; | 323 | spi = msg->spi; |
diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c index 2a651e61bfbf..951a160fc27f 100644 --- a/drivers/spi/omap2_mcspi.c +++ b/drivers/spi/omap2_mcspi.c | |||
@@ -1305,10 +1305,49 @@ static int __exit omap2_mcspi_remove(struct platform_device *pdev) | |||
1305 | /* work with hotplug and coldplug */ | 1305 | /* work with hotplug and coldplug */ |
1306 | MODULE_ALIAS("platform:omap2_mcspi"); | 1306 | MODULE_ALIAS("platform:omap2_mcspi"); |
1307 | 1307 | ||
1308 | #ifdef CONFIG_SUSPEND | ||
1309 | /* | ||
1310 | * When SPI wake up from off-mode, CS is in activate state. If it was in | ||
1311 | * unactive state when driver was suspend, then force it to unactive state at | ||
1312 | * wake up. | ||
1313 | */ | ||
1314 | static int omap2_mcspi_resume(struct device *dev) | ||
1315 | { | ||
1316 | struct spi_master *master = dev_get_drvdata(dev); | ||
1317 | struct omap2_mcspi *mcspi = spi_master_get_devdata(master); | ||
1318 | struct omap2_mcspi_cs *cs; | ||
1319 | |||
1320 | omap2_mcspi_enable_clocks(mcspi); | ||
1321 | list_for_each_entry(cs, &omap2_mcspi_ctx[master->bus_num - 1].cs, | ||
1322 | node) { | ||
1323 | if ((cs->chconf0 & OMAP2_MCSPI_CHCONF_FORCE) == 0) { | ||
1324 | |||
1325 | /* | ||
1326 | * We need to toggle CS state for OMAP take this | ||
1327 | * change in account. | ||
1328 | */ | ||
1329 | MOD_REG_BIT(cs->chconf0, OMAP2_MCSPI_CHCONF_FORCE, 1); | ||
1330 | __raw_writel(cs->chconf0, cs->base + OMAP2_MCSPI_CHCONF0); | ||
1331 | MOD_REG_BIT(cs->chconf0, OMAP2_MCSPI_CHCONF_FORCE, 0); | ||
1332 | __raw_writel(cs->chconf0, cs->base + OMAP2_MCSPI_CHCONF0); | ||
1333 | } | ||
1334 | } | ||
1335 | omap2_mcspi_disable_clocks(mcspi); | ||
1336 | return 0; | ||
1337 | } | ||
1338 | #else | ||
1339 | #define omap2_mcspi_resume NULL | ||
1340 | #endif | ||
1341 | |||
1342 | static const struct dev_pm_ops omap2_mcspi_pm_ops = { | ||
1343 | .resume = omap2_mcspi_resume, | ||
1344 | }; | ||
1345 | |||
1308 | static struct platform_driver omap2_mcspi_driver = { | 1346 | static struct platform_driver omap2_mcspi_driver = { |
1309 | .driver = { | 1347 | .driver = { |
1310 | .name = "omap2_mcspi", | 1348 | .name = "omap2_mcspi", |
1311 | .owner = THIS_MODULE, | 1349 | .owner = THIS_MODULE, |
1350 | .pm = &omap2_mcspi_pm_ops | ||
1312 | }, | 1351 | }, |
1313 | .remove = __exit_p(omap2_mcspi_remove), | 1352 | .remove = __exit_p(omap2_mcspi_remove), |
1314 | }; | 1353 | }; |
diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c index 8c3c057aa847..d0e9e0207539 100644 --- a/drivers/staging/zram/zram_drv.c +++ b/drivers/staging/zram/zram_drv.c | |||
@@ -435,12 +435,6 @@ static int zram_make_request(struct request_queue *queue, struct bio *bio) | |||
435 | int ret = 0; | 435 | int ret = 0; |
436 | struct zram *zram = queue->queuedata; | 436 | struct zram *zram = queue->queuedata; |
437 | 437 | ||
438 | if (unlikely(!zram->init_done)) { | ||
439 | set_bit(BIO_UPTODATE, &bio->bi_flags); | ||
440 | bio_endio(bio, 0); | ||
441 | return 0; | ||
442 | } | ||
443 | |||
444 | if (!valid_io_request(zram, bio)) { | 438 | if (!valid_io_request(zram, bio)) { |
445 | zram_stat64_inc(zram, &zram->stats.invalid_io); | 439 | zram_stat64_inc(zram, &zram->stats.invalid_io); |
446 | bio_io_error(bio); | 440 | bio_io_error(bio); |