1. 15 Aug, 2012 5 commits
  2. 13 Aug, 2012 2 commits
    • Arnd Bergmann's avatar
      ARM: mv78xx0: fix win_cfg_base prototype · e18287d3
      Arnd Bergmann authored
      Patch b6d1c33a "ARM: Orion: Consolidate the address map setup" tried
      to merge the address map for the four orion platforms, but apparently
      got it wrong for mv78xx0. Admittedly I don't understand what this
      code actually does, but it's clear that the current version is
      wrong.
      
      Without this patch, building mv78xx0_defconfig results in:
      
      arch/arm/mach-mv78xx0/addr-map.c:59:2: warning: initialization from incompatible pointer type [enabled by default]
      arch/arm/mach-mv78xx0/addr-map.c:59:2: warning: (near initialization for 'addr_map_cfg.win_cfg_base') [enabled by default]
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Cc: Michael Walle <michael@walle.cc>
      Cc: Nicolas Pitre <nico@linaro.org>
      e18287d3
    • Timo Kokkonen's avatar
      ARM: OMAP: dmtimers: Fix locking issue in omap_dm_timer_request*() · c5491d1a
      Timo Kokkonen authored
      Calling omap_dm_timer_prepare while the spinlock is held is not
      allowed as sleeping functions are called later on during the
      preparation (namely within clk_get()).
      
      dm_timer_lock is only required for protecting the
      omap_timer_list. After the timer is marked as reserved, the lock is no
      longer needed and should be freed.
      Signed-off-by: default avatarTimo Kokkonen <timo.t.kokkonen@iki.fi>
      Cc: Tarun Kanti DebBarma <tarun.kanti@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      c5491d1a
  3. 11 Aug, 2012 1 commit
  4. 10 Aug, 2012 8 commits
    • Arnd Bergmann's avatar
      ARM: davinci: remove broken ntosd2_init_i2c · de923430
      Arnd Bergmann authored
      ntosd2_init_i2c walks the ntosd2_i2c_info array, which it expects to
      be populated with at least one member. gcc correctly warns about
      the out-of-bounds access here.
      
      Since this can not possibly work, it's better to disable i2c
      support entirely on this board.
      
      Without this patch, building davinci_all_defconfig results in:
      
      arch/arm/mach-davinci/board-neuros-osd2.c: In function 'davinci_ntosd2_init':
      arch/arm/mach-davinci/board-neuros-osd2.c:187:20: warning: array subscript is above array bounds [-Warray-bounds]
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarSekhar Nori <nsekhar@ti.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Cc: Andrey Porodko <panda@chelcom.ru>
      de923430
    • Arnd Bergmann's avatar
      ARM: s3c24xx: enable CONFIG_BUG for tct_hammer · 15b5eb2d
      Arnd Bergmann authored
      Disabling CONFIG_BUG creates an insane amount of build warnings, which
      makes it useless to check for building defconfigs to see if new
      warnings show up.
      
      Without this patch, building tct_hammer_defconfig results in:
      
      net/packet/af_packet.c: In function 'tpacket_rcv':
      net/packet/af_packet.c:1889:30: warning: 'hdrlen' may be used uninitialized in this function [-Wuninitialized]
      net/core/ethtool.c: In function 'ethtool_get_feature_mask':
      net/core/ethtool.c:213:1: warning: control reaches end of non-void function [-Wreturn-type]
      block/cfq-iosched.c: In function 'cfq_async_queue_prio':
      block/cfq-iosched.c:2914:1: warning: control reaches end of non-void function [-Wreturn-type]
      mm/bootmem.c: In function 'mark_bootmem':
      mm/bootmem.c:352:1: warning: control reaches end of non-void function [-Wreturn-type]
      net/core/dev.c: In function 'skb_warn_bad_offload':
      net/core/dev.c:1904:33: warning: unused variable 'null_features' [-Wunused-variable]
      drivers/mtd/chips/cfi_probe.c: In function 'cfi_chip_setup':
      include/linux/mtd/cfi.h:489:3: warning: 'r.x[0]' may be used uninitialized in this function [-Wuninitialized]
      include/linux/mtd/map.h:394:11: note: 'r.x[0]' was declared here
      include/linux/mtd/cfi.h:489:3: warning: 'r.x[0]' may be used uninitialized in this function [-Wuninitialized]
      (and many more)
      
      The size of vmlinux increases by 1.78% because of this:
      
      size obj-arm/vmlinux.nobug
         text    data     bss     dec     hex filename
         2108474  116916   55352 2280742  22cd26 obj-arm/vmlinux
      size obj-arm/vmlinux.bug
         text    data     bss     dec     hex filename
         2150804  116916   53696 2321416  236c08 obj-arm/vmlinux
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarKukjin Kim <kgene.kim@samsung.com>
      Cc: Ben Dooks <ben-linux@fluff.org>
      15b5eb2d
    • Arnd Bergmann's avatar
      Merge branch 'testing/new-warnings' into fixes · b64456a4
      Arnd Bergmann authored
      These patches all fix bugs that were newly introduced in v3.6-rc1
      and found because they cause a gcc warning with one of the ARM
      defconfigs. Most of them are harmless, but since we're trying
      to get rid of all warnings eventually, we can start with the ones
      that were not there before.
      
      * testing/new-warnings:
        omap-rng: fix use of SIMPLE_DEV_PM_OPS
        spi/s3c64xx: improve error handling
        mtd/omap2: fix dmaengine_slave_config error handling
        gpio: em: do not discard em_gio_irq_domain_cleanup
        ARM: exynos: exynos_pm_add_dev_to_genpd may be unused
        usb/ohci-omap: remove unused variable
        mfd/asic3: fix asic3_mfd_probe return value
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      b64456a4
    • Arnd Bergmann's avatar
      omap-rng: fix use of SIMPLE_DEV_PM_OPS · 59596df6
      Arnd Bergmann authored
      omap_rng_suspend and omap_rng_resume are unused if CONFIG_PM is enabled
      but CONFIG_PM_SLEEP is disabled. I found this while building all defconfig
      files on ARM. It's not clear to me if this is the right solution, but
      at least it makes the code consistent again.
      
      Without this patch, building omap1_defconfig results in:
      
      drivers/char/hw_random/omap-rng.c:165:12: warning: 'omap_rng_suspend' defined but not used [-Wunused-function]
      drivers/char/hw_random/omap-rng.c:171:12: warning: 'omap_rng_resume' defined but not used [-Wunused-function]
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarKevin Hilman <khilman@ti.com>
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      59596df6
    • Arnd Bergmann's avatar
      spi/s3c64xx: improve error handling · 4732cc63
      Arnd Bergmann authored
      When a device tree definition os an s3c64xx SPI master is missing
      a "controller-data" subnode, the newly added s3c64xx_get_slave_ctrldata
      function might use uninitialized memory in place of that node,
      which was correctly reported by gcc.
      
      Without this patch, building s3c6400_defconfig results in:
      
      drivers/spi/spi-s3c64xx.c: In function 's3c64xx_get_slave_ctrldata.isra.25':
      drivers/spi/spi-s3c64xx.c:841:5: warning: 'data_np' may be used uninitialized in this function [-Wuninitialized]
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarThomas Abraham <thomas.abraham@linaro.org>
      Acked-by: default avatarKukjin Kim <kgene.kim@samsung.com>
      Cc: Jaswinder Singh <jaswinder.singh@linaro.org>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      4732cc63
    • Arnd Bergmann's avatar
      mtd/omap2: fix dmaengine_slave_config error handling · d680e2c1
      Arnd Bergmann authored
      The newly added dmaengine support in the omap2 nand driver
      potentially causes an undefined return value from the
      omap_nand_probe function when dmaengine_slave_config
      reports an error. Let's handle this by returning the
      same error back to the caller.
      
      Without this patch, building omap2plus_defconfig results in:
      
      drivers/mtd/nand/omap2.c: In function 'omap_nand_probe':
      drivers/mtd/nand/omap2.c:1154:6: warning: 'err' may be used uninitialized in this function [-Wuninitialized]
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Grazvydas Ignotas <notasas@gmail.com>
      d680e2c1
    • Arnd Bergmann's avatar
      gpio: em: do not discard em_gio_irq_domain_cleanup · 38eaed32
      Arnd Bergmann authored
      The newly added gpio-em driver marks its em_gio_irq_domain_cleanup
      function as __devexit, which would lead to that function being
      discarded in case CONFIG_HOTPLUG is disabled. However, the function
      is also called by the error handling logic em_gio_probe, which
      would cause a jump into a NULL pointer if it was removed from the
      kernel or module.
      
      Without this patch, building kzm9d_defconfig results in:
      
      WARNING: drivers/gpio/built-in.o(.devinit.text+0x330): Section mismatch in reference from the function em_gio_probe() to the function .devexit.text:em_gio_irq_domain_cleanup()
      The function __devinit em_gio_probe() references
      a function __devexit em_gio_irq_domain_cleanup().
      This is often seen when error handling in the init function
      uses functionality in the exit path.
      The fix is often to remove the __devexit annotation of
      em_gio_irq_domain_cleanup() so it may be used outside an exit section.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Magnus Damm <damm@opensource.se>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      38eaed32
    • Arnd Bergmann's avatar
      ARM: exynos: exynos_pm_add_dev_to_genpd may be unused · 8ab08c0c
      Arnd Bergmann authored
      exynos_pm_add_dev_to_genpd is used if one or more out of a large
      number of Kconfig symbols are enabled. However the new
      exynos_defconfig selects none of those, so the function becomes
      unused. Marking it so lets the compiler automatically discard
      it.
      
      Without this patch, building exynos_defconfig results in:
      
      arch/arm/mach-exynos/pm_domains.c:118:123: warning: 'exynos_pm_add_dev_to_genpd' defined but not used [-Wunused-function]
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarThomas Abraham <thomas.abraham@linaro.org>
      Acked-by: default avatarKukjin Kim <kgene.kim@samsung.com>
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      8ab08c0c
  5. 09 Aug, 2012 10 commits
    • Rajendra Nayak's avatar
      ARM: OMAP4: Register the OPP table only for 4430 device · 196449de
      Rajendra Nayak authored
      The 4430 OPP table was being registered for all other OMAP4 variants
      too, like 4460 and 4470 causing issues with cpufreq driver
      enabled. 4460 and 4470 devices have different OPPs as compared to
      4430, and they should be populated seperately. As long as that
      happens, let the OPP table registeration happen only on 4430 device.
      Signed-off-by: default avatarRajendra Nayak <rnayak@ti.com>
      Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
      196449de
    • Rajendra Nayak's avatar
      cpufreq: OMAP: Handle missing frequency table on SMP systems · 1b865214
      Rajendra Nayak authored
      On OMAP4, if the first CPU fails to get a valid frequency table (this
      could happen if the platform does not register any OPP table), the
      subsequent CPU instances end up dealing with a NULL freq_table and
      crash.
      
      Check for an already existing freq_table, before trying to create one,
      and increment the freq_table_users only if the table is sucessfully
      created.
      Signed-off-by: default avatarRajendra Nayak <rnayak@ti.com>
      Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
      Cc: <linux-pm@vger.kernel.org>
      Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
      1b865214
    • Santosh Shilimkar's avatar
      ARM: OMAP4: sleep: Save the complete used register stack frame · 5b6e3eb5
      Santosh Shilimkar authored
      OMAP4 sleep entry code even though itself don't use many CPU registers
      makes call to the v7_flush_dcache_all() which uses them. Since
      v7_flush_dcache_all() doesn't make use of stack, the caller must take
      care of the stack frame. Otherwise it will lead to corrupted stack frame.
      
      Fix it by saving used registers.
      Reported-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
      5b6e3eb5
    • Arnd Bergmann's avatar
      ARM: imx: gpmi-nand depends on mxs-dma · a3349377
      Arnd Bergmann authored
      It is not currently possible to build the gpmi-nand driver without
      also building the mxs-dma driver. Clarify this Kconfig and enable
      both in the defconfig file so we can build it again with both enabled.
      
      drivers/built-in.o: In function `gpmi_dma_filter':
      clk-fixed-factor.c:(.text+0xafc18): undefined reference to `mxs_dma_is_apbh'
      make[1]: *** [vmlinux] Error 1
      make: *** [sub-make] Error 2
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarDirk Behme <dirk.behme@de.bosch.com>
      Cc: Shawn Guo <shawn.guo@linaro.org>
      Cc: Sascha Hauer <kernel@pengutronix.de>
      a3349377
    • Arnd Bergmann's avatar
      ARM: integrator: include <linux/export.h> · b434f5c9
      Arnd Bergmann authored
      Without this patch, building integrator_defconfig results in:
      
      arch/arm/mach-integrator/core.c:150:1: warning: data definition has no type or storage class [enabled by default]
      arch/arm/mach-integrator/core.c:150:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [-Wimplicit-int]
      arch/arm/mach-integrator/core.c:150:1: warning: parameter names (without types) in function declaration [enabled by default]
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      b434f5c9
    • Arnd Bergmann's avatar
      ARM: s3c24xx: use new PWM driver · 35e79061
      Arnd Bergmann authored
      The samsung PWM driver has moved to the new PWM subsystem, which
      changed the Kconfig symbol for that driver, but the rx1950 and
      gta02 boards still uses the old one.
      
      Without this patch, building s3c2410_defconfig results in:
      
      arch/arm/mach-s3c24xx/built-in.o: In function `rx1950_lcd_power':
      arch/arm/mach-s3c24xx/mach-rx1950.c:430: undefined reference to `pwm_config'
      arch/arm/mach-s3c24xx/mach-rx1950.c:431: undefined reference to `pwm_disable'
      arch/arm/mach-s3c24xx/mach-rx1950.c:437: undefined reference to `pwm_config'
      arch/arm/mach-s3c24xx/mach-rx1950.c:438: undefined reference to `pwm_enable'
      arch/arm/mach-s3c24xx/built-in.o: In function `rx1950_backlight_exit':
      arch/arm/mach-s3c24xx/mach-rx1950.c:504: undefined reference to `pwm_free'
      arch/arm/mach-s3c24xx/built-in.o: In function `rx1950_backlight_init':
      arch/arm/mach-s3c24xx/mach-rx1950.c:487: undefined reference to `pwm_request'
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Reported-by: default avatarTushar Behera <tushar.behera@linaro.org>
      Cc: Kukjin Kim <kgene.kim@samsung.com>
      35e79061
    • Arnd Bergmann's avatar
      ARM: sa1100: include linux/io.h in hackkit leds code · 9c97738c
      Arnd Bergmann authored
      The sa1100 definition of the io_p2v macro has changed in v3.6, and this one
      file stopped working because of that.
      
      Without this patch, building hackkit_defconfig results in:
      
      arch/arm/mach-sa1100/leds-hackkit.c: In function 'hackkit_leds_event':
      arch/arm/mach-sa1100/leds-hackkit.c:39:4: error: implicit declaration of function 'IOMEM' [-Werror=implicit-function-declaration]
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Russell King <linux@arm.linux.org.uk>
      9c97738c
    • Arnd Bergmann's avatar
      Input: eeti_ts: pass gpio value instead of IRQ · 4eef6cbf
      Arnd Bergmann authored
      The EETI touchscreen asserts its IRQ line as soon as it has data in its
      internal buffers. The line is automatically deasserted once all data has
      been read via I2C. Hence, the driver has to monitor the GPIO line and
      cannot simply rely on the interrupt handler reception.
      
      In the current implementation of the driver, irq_to_gpio() is used to
      determine the GPIO number from the i2c_client's IRQ value.
      
      As irq_to_gpio() is not available on all platforms, this patch changes
      this and makes the driver ignore the passed in IRQ. Instead, a GPIO is
      added to the platform_data struct and gpio_to_irq is used to derive the
      IRQ from that GPIO. If this fails, bail out. The driver is only able to
      work in environments where the touchscreen GPIO can be mapped to an
      IRQ.
      
      Without this patch, building raumfeld_defconfig results in:
      
      drivers/input/touchscreen/eeti_ts.c: In function 'eeti_ts_irq_active':
      drivers/input/touchscreen/eeti_ts.c:65:2: error: implicit declaration of function 'irq_to_gpio' [-Werror=implicit-function-declaration]
      Signed-off-by: default avatarDaniel Mack <zonque@gmail.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: stable@vger.kernel.org (v3.2+)
      Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
      Cc: Sven Neumann <s.neumann@raumfeld.com>
      Cc: linux-input@vger.kernel.org
      Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
      4eef6cbf
    • Arnd Bergmann's avatar
      ARM: pxa: remove irq_to_gpio from ezx-pcap driver · 59ee93a5
      Arnd Bergmann authored
      The irq_to_gpio function was removed from the pxa platform
      in linux-3.2, and this driver has been broken since.
      
      There is actually no in-tree user of this driver that adds
      this platform device, but the driver can and does get enabled
      on some platforms.
      
      Without this patch, building ezx_defconfig results in:
      
      drivers/mfd/ezx-pcap.c: In function 'pcap_isr_work':
      drivers/mfd/ezx-pcap.c:205:2: error: implicit declaration of function 'irq_to_gpio' [-Werror=implicit-function-declaration]
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarHaojian Zhuang <haojian.zhuang@gmail.com>
      Cc: stable@vger.kernel.org (v3.2+)
      Cc: Samuel Ortiz <sameo@linux.intel.com>
      Cc: Daniel Ribeiro <drwyrm@gmail.com>
      59ee93a5
    • Stephen Warren's avatar
      ARM: tegra: more regulator fixes for Harmony · 798bd59c
      Stephen Warren authored
      Commit 3d55c29f "ARM: tegra: harmony: add regulator supply name and its
      input supply" was supposed to fix all the problems with regulators on
      Harmony. However, it appears that I only tested it when booting using
      board files, not when booting using device tree. This change fixes two
      problems with regulators when booting using device tree:
      
      1) That patch only created the vdd_sys regulator when booting using a
         board file. Since this is the root of the whole regulator tree, this
         caused no regulators to successfully initialize when booting using
         device tree. The registration of vdd_sys is moved to fix this.
      
      2) When booting use DT, the regulator core sets has_full_constraints,
         which in turn causes the core to turn off any regulators not marked
         as always on. Some of the affected regulators are required for basic
         system operation. To solve this, add always on constraints to all
         relevant regulators. This doesn't affect booting using a board file
         since nothing sets has_full_constraints in that case.
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      798bd59c
  6. 08 Aug, 2012 5 commits
    • Arnd Bergmann's avatar
      usb/ohci-omap: remove unused variable · bb1a5805
      Arnd Bergmann authored
      Commit c2e935a7 "USB: move transceiver from ehci_hcd and ohci_hcd to
      hcd and rename it as phy" removed the last use of the "ohci" variable
      in the usb_hcd_omap_remove function, but left the variable in place
      unused.
      
      Without this patch, building omap1_defconfig results in:
      
      In file included from drivers/usb/host/ohci-hcd.c:1013:0:
      drivers/usb/host/ohci-omap.c: In function 'usb_hcd_omap_remove':
      drivers/usb/host/ohci-omap.c:406:19: warning: unused variable 'ohci' [-Wunused-variable]
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Richard Zhao <richard.zhao@freescale.com>
      bb1a5805
    • Arnd Bergmann's avatar
      mfd/asic3: fix asic3_mfd_probe return value · b2f0fa82
      Arnd Bergmann authored
      In commit 4f304245 "mfd: Set asic3 DS1WM clock_rate", a possible
      path through asic3_mfd_probe was introduced that would lead to
      an unpredictable return value, if everything succeeds but there
      are pdata->leds is NULL. This was reported correctly by gcc.
      
      Without this patch, building magician_defconfig results in:
      
      drivers/mfd/asic3.c: In function 'asic3_mfd_probe':
      drivers/mfd/asic3.c:940:2: warning: 'ret' may be used uninitialized in this function [-Wuninitialized]
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Paul Parsons <lost.distance@yahoo.com>
      Cc: Philipp Zabel <philipp.zabel@gmail.com>
      Cc: Samuel Ortiz <sameo@linux.intel.com>
      b2f0fa82
    • Vaibhav Hiremath's avatar
      ARM: OMAP2+: cpu: Add am33xx device under cpu_class_is_omap2 · 90f7f9ac
      Vaibhav Hiremath authored
      AM33XX device falls under omap2 class, so make cpu_class_is_omap2()
      macro true by adding soc_is_am33xx() to existing list of cpu/soc
      check.
      
      This is required to unblock the basic boot support on AM335x platform.
      
      Having done that, we still need to sort out properly from
      common zImage point of view without having to maintain this
      cpu/soc_is_xxx list.
      Signed-off-by: default avatarVaibhav Hiremath <hvaibhav@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      90f7f9ac
    • Jan Luebbe's avatar
      omap: Fix multi.h when only ARCH_OMAP3 and SOC_AM33XX are selected · 6c691b5d
      Jan Luebbe authored
      When only ARCH_OMAP3 (or -2,-4,...) and SOC_AM33XX are selected, multi.h
      doesn't set MULTI_OMAP2. In this case, cpu.h will simply define
      cpu_is_omap24xx() as 1.
      
      This causes problems for example for omap_hwmod.c:omap_hwmod_init which
      checks for cpu_is_omap24xx() first, using the wrong soc_ops for AM33xx.
      
      Fix this by defining MULTI_OMAP2 when using SOC_AM33XX together with
      something else.
      Signed-off-by: default avatarJan Luebbe <jlu@pengutronix.de>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      6c691b5d
    • Jon Hunter's avatar
      ARM: OMAP2+: Fix dmtimer set source clock failure · 54f32a35
      Jon Hunter authored
      Calling the dmtimer function omap_dm_timer_set_source() fails if following a
      call to pm_runtime_put() to disable the timer. For example the following
      sequence would fail to set the parent clock ...
      
      	omap_dm_timer_stop(gptimer);
      	omap_dm_timer_set_source(gptimer, OMAP_TIMER_SRC_32_KHZ);
      
      The following error message would be seen ...
      
      omap_dm_timer_set_source: failed to set timer_32k_ck as parent
      
      The problem is that, by design, pm_runtime_put() simply decrements the usage
      count and returns before the timer has actually been disabled. Therefore,
      setting the parent clock failed because the timer was still active when the
      trying to set the parent clock. Setting a parent clock will fail if the clock
      you are setting the parent of has a non-zero usage count. To ensure that this
      does not fail use pm_runtime_put_sync() when disabling the timer.
      
      Note that this will not be seen on OMAP1 devices, because these devices do
      not use the clock framework for dmtimers.
      Signed-off-by: default avatarJon Hunter <jon-hunter@ti.com>
      Acked-by: default avatarKevin Hilman <khilman@ti.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      54f32a35
  7. 07 Aug, 2012 9 commits