summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* USB: convert drivers/net/* to use module_usb_driver()Greg Kroah-Hartman2011-11-1844-668/+50Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This converts the drivers in drivers/net/* to use the module_usb_driver() macro which makes the code smaller and a bit simpler. Added bonus is that it removes some unneeded kernel log messages about drivers loading and/or unloading. Cc: Wolfgang Grandegger <wg@grandegger.com> Cc: Samuel Ortiz <samuel@sortiz.org> Cc: Oliver Neukum <oliver@neukum.name> Cc: Peter Korsgaard <jacmet@sunsite.dk> Cc: Petko Manolov <petkan@users.sourceforge.net> Cc: Steve Glendinning <steve.glendinning@smsc.com> Cc: Christian Lamparter <chunkeey@googlemail.com> Cc: "John W. Linville" <linville@tuxdriver.com> Cc: Dan Williams <dcbw@redhat.com> Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Cc: Ivo van Doorn <IvDoorn@gmail.com> Cc: Gertjan van Wingerde <gwingerde@gmail.com> Cc: Helmut Schaa <helmut.schaa@googlemail.com> Cc: Herton Ronaldo Krzesinski <herton@canonical.com> Cc: Hin-Tak Leung <htl10@users.sourceforge.net> Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Chaoming Li <chaoming_li@realsil.com.cn> Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi> Cc: "David S. Miller" <davem@davemloft.net> Cc: Roel Kluin <roel.kluin@gmail.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Jiri Pirko <jpirko@redhat.com> Cc: Pavel Roskin <proski@gnu.org> Cc: Yoann DI-RUZZA <y.diruzza@lim.eu> Cc: George <george0505@realtek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: convert drivers/staging/* to use module_usb_driver()Greg Kroah-Hartman2011-11-1813-268/+13Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This converts the drivers in drivers/staging/* to use the module_usb_driver() macro which makes the code smaller and a bit simpler. Added bonus is that it removes some unneeded kernel log messages about drivers loading and/or unloading. Cc: "David Täht" <d@teklibre.com> Cc: Marek Belisko <marek.belisko@gmail.com> Cc: Al Cho <acho@novell.com> Cc: Forest Bond <forest@alittletooquiet.net> Cc: Pavel Machek <pavel@ucw.cz> Cc: Huajun Li <huajun.li.lee@gmail.com> Cc: Zac Storer <zac.3.14159@gmail.com> Cc: Randy Dunlap <randy.dunlap@oracle.com> Cc: Mauro Carvalho Chehab <mchehab@redhat.com> Cc: edwin_rong <edwin_rong@realsil.com.cn> Cc: Ben Hutchings <ben@decadent.org.uk> Cc: Julia Lawall <julia@diku.dk> Cc: Ilia Mirkin <imirkin@alum.mit.edu> Cc: Joe Perches <joe@perches.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: "John W. Linville" <linville@tuxdriver.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: convert drivers/usb/* to use module_usb_driver()Greg Kroah-Hartman2011-11-1840-675/+40Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This converts the drivers in drivers/usb/* to use the module_usb_driver() macro which makes the code smaller and a bit simpler. Added bonus is that it removes some unneeded kernel log messages about drivers loading and/or unloading. Cc: Simon Arlott <cxacru@fire.lp0.eu> Cc: Duncan Sands <duncan.sands@free.fr> Cc: Matthieu CASTET <castet.matthieu@free.fr> Cc: Stanislaw Gruszka <stf_xl@wp.pl> Cc: Pete Zaitcev <zaitcev@redhat.com> Cc: Oliver Neukum <oliver@neukum.name> Cc: Juergen Stuber <starblue@users.sourceforge.net> Cc: Cesar Miquel <miquel@df.uba.ar> Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Cc: Matthew Wilcox <willy@linux.intel.com> Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi> Cc: Michael Hund <mhund@ld-didactic.de> Cc: Zack Parsons <k3bacon@gmail.com> Cc: Melchior FRANZ <mfranz@aon.at> Cc: Tomoki Sekiyama <tomoki.sekiyama@gmail.com> Cc: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Add helper macro for usb_driver boilerplateGreg Kroah-Hartman2011-11-171-0/+12
| | | | | | | | | | | | | | This patch introduces the module_usb_driver macro which is a convenience macro for USB driver modules similar to module_platform_driver. It is intended to be used by drivers which init/exit section does nothing but register/unregister the USB driver. By using this macro it is possible to eliminate a few lines of boilerplate code per USB driver. Based on work done by Lars-Peter Clausen <lars@metafoo.de> for other busses (i2c and spi). Cc: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio: Use module_spi_driver to register SPI driverLars-Peter Clausen2011-11-1747-567/+47Star
| | | | | | | | | | | Use the newly introduced module_spi_driver macro for registering SPI drivers. This allows us to remove a few lines of boilerplate code. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging:iio: Use module_i2c_driver to register I2C driversLars-Peter Clausen2011-11-1716-207/+16Star
| | | | | | | | | | Use the newly introduced module_i2c_driver macro for registering I2C drivers. This allows us to remove a few lines of boilerplate code. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* SPI: Add helper macro for spi_driver boilerplateLars-Peter Clausen2011-11-171-0/+11
| | | | | | | | | | | | | This patch introduces the module_spi_driver macro which is a convenience macro for SPI driver modules similar to module_platform_driver. It is intended to be used by drivers which init/exit section does nothing but register/unregister the SPI driver. By using this macro it is possible to eliminate a few lines of boilerplate code per SPI driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* I2C: Add helper macro for i2c_driver boilerplateLars-Peter Clausen2011-11-171-0/+13
| | | | | | | | | | | | | | | This patch introduces the module_i2c_driver macro which is a convenience macro for I2C driver modules similar to module_platform_driver. It is intended to be used by drivers which init/exit section does nothing but register/unregister the I2C driver. By using this macro it is possible to eliminate a few lines of boilerplate code per I2C driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* drivercore: Generalize module_platform_driverLars-Peter Clausen2011-11-172-10/+23
| | | | | | | | | | | | | | | | | | | This patch generalizes the module_platform_driver macro and introduces a new module_driver macro. The module_driver macro takes a driver name, a register and a unregister function for this driver type. Using these it construct the module init and exit sections which register and unregister the driver. Since such init/exit sections are commonly found in drivers this macro can be used to eliminate a lot of boilerplate code. The macro is not intended to be used by driver modules directly, instead it should be used to generate bus specific macros for registering drivers like the module_platform_driver macro. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* W1: w1_therm: release the bus during conversion on externally powered devicesMaciej Szmigiero2011-11-171-5/+31
| | | | | | | | | | | | | | | | | | | | | | | | w1_therm devices can either be bus powered or externally powered. When device is bus powered during temperature conversion the bus have to be left high to provide necessary power. Some masters also allow strong power-up to be enabled in this case. Naturally, no communication over bus can occur during that time. However, if device has external power then there is no such restriction, and host can talk to other devices during temperature conversion. There is command which allows us to check how device is powered, this patch uses it to release the bus on externally w1_therm powered devices during temperature conversion. Also, this changes uninterruptible sleeps there into interruptible ones to avoid long uninterruptible sleep if w1 subsystem happens to grab bus for scan during w1_therm_read(). Signed-off-by: Maciej Szmigiero <mhej@o2.pl> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* devtmpfsd: fix task state handlingKautuk Consul2011-11-161-2/+1Star
| | | | | | | | | | | | | | - Set the state to TASK_INTERRUPTIBLE using __set_current_state() instead of set_current_state() as the spin_unlock is an implicit memory barrier. - After return from schedule(), there is no need to set the current state to TASK_RUNNING - a call to schedule() always returns in TASK_RUNNING state. Signed-off-by: Kautuk Consul <consul.kautuk@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* lib: devres: add convenience function to remap a resourceWolfram Sang2011-11-163-0/+55
| | | | | | | | | | | | | | Almost every platform_driver does the three steps get_resource, request_mem_region, ioremap. This does not only lead to a lot of code duplication, but also a huge number of similar error strings and inconsistent error codes on failure. So, introduce a helper function which simplifies remapping a resource and make it hard to do something wrong and add documentation for it. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* lib: devres: add annotations for #endifWolfram Sang2011-11-161-2/+2
| | | | | | | | | While working on devres, I found those make navigating the code a tad easier. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Linux 3.2-rc1Linus Torvalds2011-11-081-3/+3
| | | | | | .. with new name. Because nothing says "really solid kernel release" like naming it after an extinct animal that just happened to be in the news lately.
* Merge branch 'fixes' of ↵Linus Torvalds2011-11-0842-402/+345Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (31 commits) ARM: OMAP: Fix export.h or module.h includes ARM: OMAP: omap_device: Include linux/export.h ARM: OMAP2: Fix H4 matrix keyboard warning ARM: OMAP1: Remove unused omap-alsa.h ARM: OMAP1: Fix warnings about enabling 32 KiHz timer ARM: OMAP2+: timer: Remove omap_device_pm_latency ARM: OMAP2+: clock data: Remove redundant timer clkdev ARM: OMAP: Devkit8000: Remove double omap_mux_init_gpio ARM: OMAP: usb: musb: OMAP: Delete unused function MAINTAINERS: Update linux-omap git repository ARM: OMAP: change get_context_loss_count ret value to int ARM: OMAP4: hsmmc: configure SDMMC1_DR0 properly ARM: OMAP4: hsmmc: Fix Pbias configuration on regulator OFF ARM: OMAP3: hwmod: fix variant registration and remove SmartReflex from common list ARM: OMAP: I2C: Fix omap_register_i2c_bus() return value on success ARM: OMAP: dmtimer: Include linux/module.h ARM: OMAP2+: l3-noc: Include linux/module.h ARM: OMAP2+: devices: Fixes for McPDM ARM: OMAP: Fix errors and warnings when building for one board ARM: OMAP3: PM: restrict erratum i443 handling to OMAP3430 only ...
| * Merge branch 'fixes-modulesplit' into fixesTony Lindgren2011-11-073863-39041/+82624
| |\
| | * ARM: OMAP: Fix export.h or module.h includesTony Lindgren2011-11-074-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 32aaeffbd4a7457bf2f7448b33b5946ff2a960eb (Merge branch 'modsplit-Oct31_2011'...) caused some build errors. Fix these and make sure we always have export.h or module.h included for MODULE_ and EXPORT_SYMBOL users: $ grep -rl ^MODULE_ arch/arm/*omap*/*.c | xargs \ grep -L linux/module.h arch/arm/mach-omap2/dsp.c arch/arm/mach-omap2/mailbox.c arch/arm/mach-omap2/omap-iommu.c arch/arm/mach-omap2/smartreflex.c Also check we either have export.h or module.h included for the files exporting symbols: $ grep -rl EXPORT_SYMBOL arch/arm/*omap*/*.c | xargs \ grep -L linux/export.h | xargs grep -L linux/module.h Cc: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Tony Lindgren <tony@atomide.com>
| | * ARM: OMAP: omap_device: Include linux/export.hAxel Lin2011-11-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Include linux/export.h to fix below build warning: CC arch/arm/plat-omap/omap_device.o arch/arm/plat-omap/omap_device.c:1055: warning: data definition has no type or storage class arch/arm/plat-omap/omap_device.c:1055: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' arch/arm/plat-omap/omap_device.c:1055: warning: parameter names (without types) in function declaration Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
| * | ARM: OMAP2: Fix H4 matrix keyboard warningTony Lindgren2011-11-051-53/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert to use matrix keyboard to remove the warning "Please update the board to use matrix-keypad driver". Based on similar setup in palmtc.c. Note that this patch is compile tested only because of lack of working hardware. Signed-off-by: Tony Lindgren <tony@atomide.com>
| * | ARM: OMAP1: Remove unused omap-alsa.hJarkko Nikula2011-11-052-124/+0Star
| | | | | | | | | | | | | | | | | | | | | There is no use for omap-alsa.h and board-palmz71.c doesn't need it either. Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
| * | ARM: OMAP1: Fix warnings about enabling 32 KiHz timerTony Lindgren2011-11-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix "Enable 32kHz OS timer in order to allow sleep states in idle" warning. We are now compiling in bothe MPU timer and 32 KiHz timer, so this warning is only valid when MPU_TIMER is set and OMAP_DM_TIMER is not set. Signed-off-by: Tony Lindgren <tony@atomide.com>
| * | ARM: OMAP2+: timer: Remove omap_device_pm_latencyBenoit Cousson2011-11-051-11/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | Remove the structure since a default one is now available. Signed-off-by: Benoit Cousson <b-cousson@ti.com> Cc: Kevin Hilman <khilman@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
| * | ARM: OMAP2+: clock data: Remove redundant timer clkdevBenoit Cousson2011-11-054-47/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit 318c3e15cd55c73a26ae22a65a8183655b3003f9 added some "fck" clock alias to timer devices that are not needed anymore since hwmod framework will create them automatically. A warning was added to highlight and thus fix the redundancy. [ 0.616424] omap_timer.1: alias fck already exists [ 0.621948] omap_timer.2: alias fck already exists [ 0.627380] omap_timer.3: alias fck already exists [ 0.632781] omap_timer.4: alias fck already exists [ 0.638214] omap_timer.5: alias fck already exists [ 0.643615] omap_timer.6: alias fck already exists [ 0.649078] omap_timer.7: alias fck already exists [ 0.654479] omap_timer.8: alias fck already exists [ 0.659881] omap_timer.9: alias fck already exists [ 0.665283] omap_timer.10: alias fck already exists [ 0.670776] omap_timer.11: alias fck already exists Remove all the clkdev entries for timer fck alias. Signed-off-by: Benoit Cousson <b-cousson@ti.com> Cc: Tarun Kanti DebBarma <tarun.kanti@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
| * | ARM: OMAP: Devkit8000: Remove double omap_mux_init_gpioThomas Weber2011-11-051-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the init of card detect pin because omap_mux_init_gpio() is called during hsmmc initialization for the write protect and card detect pin. Signed-off-by: Thomas Weber <weber@corscience.de> Signed-off-by: Tony Lindgren <tony@atomide.com>
| * | ARM: OMAP: usb: musb: OMAP: Delete unused functionBjarne Steinsbo2011-11-051-38/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | Not in use anymore. Signed-off-by: Bjarne Steinsbo <bsteinsbo@gmail.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
| * | MAINTAINERS: Update linux-omap git repositoryJarkko Nikula2011-11-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | linux-omap is back at git.kernel.org. Path is the same than before except -2.6 appendix. Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
| * | ARM: OMAP: change get_context_loss_count ret value to intTomi Valkeinen2011-11-059-20/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | get_context_loss_count functions return context loss count as u32, and zero means an error. However, zero is also returned when context has never been lost and could also be returned when the context loss count has wrapped and goes to zero. Change the functions to return an int, with negative value meaning an error. OMAP HSMMC code uses omap_pm_get_dev_context_loss_count(), but as the hsmmc code handles the returned value as an int, with negative value meaning an error, this patch actually fixes hsmmc code also. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Kevin Hilman <khilman@ti.com> Acked-by: Paul Walmsley <paul@pwsan.com> [tony@atomide.com: updated to fix a warning with recent dmtimer changes] Signed-off-by: Tony Lindgren <tony@atomide.com>
| * | ARM: OMAP4: hsmmc: configure SDMMC1_DR0 properlyBalaji T K2011-11-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fix the typo, instead it should be SDMMC1 USBC1 is not related to MMC1 I/Os Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
| * | ARM: OMAP4: hsmmc: Fix Pbias configuration on regulator OFFBalaji T K2011-11-051-12/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MMC1 data line IO's are powered down in before set regulator function. IO's should not be powered ON when regulator is OFF. Keep the IO's in power pown mode after regulator OFF otherwise VMODE_ERROR interrupt is generated due to mismatch in input (regulator) voltage and MMC IO drive voltage. Delete incorrect comments which are not applicable for OMAP4. Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com> Reported-by: Viswanath Puttagunta <vishp@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
| * | ARM: OMAP3: hwmod: fix variant registration and remove SmartReflex from ↵Paul Walmsley2011-11-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | common list Commit d6504acd2125984c61dce24727dd3842d0144015 ("OMAP2+: hwmod: remove OMAP_CHIP*") tests the inverse condition of what it should be testing for the return value from omap_hwmod_register(). This causes several IP blocks to not be registered on several OMAP3 family devices. Fixing that bug also unmasked another bug, originally reported by Chase Maupin <chase.maupin@ti.com> and then subsequently by Abhilash K V <abhilash.kv@ti.com>, which caused SmartReflex IP blocks to be registered on SoCs that don't support them. Thanks to Russell King - ARM Linux <linux@arm.linux.org.uk> for comments on a previous version of the patch. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Chase Maupin <chase.maupin@ti.com> Cc: Abhilash K V <abhilash.kv@ti.com> Cc: Russell King - ARM Linux <linux@arm.linux.org.uk> Signed-off-by: Tony Lindgren <tony@atomide.com>
| * | ARM: OMAP: I2C: Fix omap_register_i2c_bus() return value on successLaurent Pinchart2011-11-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 4d17aeb1c5b2375769446d13012a98e6d265ec13 ("OMAP: I2C: split device registration and convert OMAP2+ to omap_device") makes omap2_i2c_add_bus() return a pointer to an omap_device instead on success instead of 0. This breaks the omap_register_i2c_bus() ABI and results in the igep0020 board code detecting an I2C bus registration error when there is none. Fix the problem by using PTR_RET() instead of PTR_ERR() in omap2_i2c_add_bus(). Reported-by: Alexander Kinzer <a.kinzer@plusoptix.de> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> [tony@atomide.com: updated to return pdev instead of od] Signed-off-by: Tony Lindgren <tony@atomide.com>
| * | ARM: OMAP: dmtimer: Include linux/module.hAxel Lin2011-11-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Include linux/module.h to fix below build error: CC arch/arm/plat-omap/dmtimer.o arch/arm/plat-omap/dmtimer.c:184: warning: data definition has no type or storage class arch/arm/plat-omap/dmtimer.c:184: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' arch/arm/plat-omap/dmtimer.c:184: warning: parameter names (without types) in function declaration arch/arm/plat-omap/dmtimer.c:215: warning: data definition has no type or storage class arch/arm/plat-omap/dmtimer.c:215: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' arch/arm/plat-omap/dmtimer.c:215: warning: parameter names (without types) in function declaration arch/arm/plat-omap/dmtimer.c:228: warning: data definition has no type or storage class arch/arm/plat-omap/dmtimer.c:228: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' arch/arm/plat-omap/dmtimer.c:228: warning: parameter names (without types) in function declaration arch/arm/plat-omap/dmtimer.c:234: warning: data definition has no type or storage class arch/arm/plat-omap/dmtimer.c:234: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' arch/arm/plat-omap/dmtimer.c:234: warning: parameter names (without types) in function declaration arch/arm/plat-omap/dmtimer.c:240: warning: data definition has no type or storage class arch/arm/plat-omap/dmtimer.c:240: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' arch/arm/plat-omap/dmtimer.c:240: warning: parameter names (without types) in function declaration arch/arm/plat-omap/dmtimer.c:248: warning: data definition has no type or storage class arch/arm/plat-omap/dmtimer.c:248: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' arch/arm/plat-omap/dmtimer.c:248: warning: parameter names (without types) in function declaration arch/arm/plat-omap/dmtimer.c:294: warning: data definition has no type or storage class arch/arm/plat-omap/dmtimer.c:294: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' arch/arm/plat-omap/dmtimer.c:294: warning: parameter names (without types) in function declaration arch/arm/plat-omap/dmtimer.c:302: warning: data definition has no type or storage class arch/arm/plat-omap/dmtimer.c:302: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' arch/arm/plat-omap/dmtimer.c:302: warning: parameter names (without types) in function declaration arch/arm/plat-omap/dmtimer.c:316: warning: data definition has no type or storage class arch/arm/plat-omap/dmtimer.c:316: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' arch/arm/plat-omap/dmtimer.c:316: warning: parameter names (without types) in function declaration arch/arm/plat-omap/dmtimer.c:344: warning: data definition has no type or storage class arch/arm/plat-omap/dmtimer.c:344: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' arch/arm/plat-omap/dmtimer.c:344: warning: parameter names (without types) in function declaration arch/arm/plat-omap/dmtimer.c:361: warning: data definition has no type or storage class arch/arm/plat-omap/dmtimer.c:361: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' arch/arm/plat-omap/dmtimer.c:361: warning: parameter names (without types) in function declaration arch/arm/plat-omap/dmtimer.c:380: warning: data definition has no type or storage class arch/arm/plat-omap/dmtimer.c:380: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' arch/arm/plat-omap/dmtimer.c:380: warning: parameter names (without types) in function declaration arch/arm/plat-omap/dmtimer.c:406: warning: data definition has no type or storage class arch/arm/plat-omap/dmtimer.c:406: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' arch/arm/plat-omap/dmtimer.c:406: warning: parameter names (without types) in function declaration arch/arm/plat-omap/dmtimer.c:443: warning: data definition has no type or storage class arch/arm/plat-omap/dmtimer.c:443: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' arch/arm/plat-omap/dmtimer.c:443: warning: parameter names (without types) in function declaration arch/arm/plat-omap/dmtimer.c:468: warning: data definition has no type or storage class arch/arm/plat-omap/dmtimer.c:468: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' arch/arm/plat-omap/dmtimer.c:468: warning: parameter names (without types) in function declaration arch/arm/plat-omap/dmtimer.c:494: warning: data definition has no type or storage class arch/arm/plat-omap/dmtimer.c:494: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' arch/arm/plat-omap/dmtimer.c:494: warning: parameter names (without types) in function declaration arch/arm/plat-omap/dmtimer.c:517: warning: data definition has no type or storage class arch/arm/plat-omap/dmtimer.c:517: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' arch/arm/plat-omap/dmtimer.c:517: warning: parameter names (without types) in function declaration arch/arm/plat-omap/dmtimer.c:534: warning: data definition has no type or storage class arch/arm/plat-omap/dmtimer.c:534: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' arch/arm/plat-omap/dmtimer.c:534: warning: parameter names (without types) in function declaration arch/arm/plat-omap/dmtimer.c:549: warning: data definition has no type or storage class arch/arm/plat-omap/dmtimer.c:549: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' arch/arm/plat-omap/dmtimer.c:549: warning: parameter names (without types) in function declaration arch/arm/plat-omap/dmtimer.c:561: warning: data definition has no type or storage class arch/arm/plat-omap/dmtimer.c:561: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' arch/arm/plat-omap/dmtimer.c:561: warning: parameter names (without types) in function declaration arch/arm/plat-omap/dmtimer.c:572: warning: data definition has no type or storage class arch/arm/plat-omap/dmtimer.c:572: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' arch/arm/plat-omap/dmtimer.c:572: warning: parameter names (without types) in function declaration arch/arm/plat-omap/dmtimer.c:587: warning: data definition has no type or storage class arch/arm/plat-omap/dmtimer.c:587: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' arch/arm/plat-omap/dmtimer.c:587: warning: parameter names (without types) in function declaration arch/arm/plat-omap/dmtimer.c:604: warning: data definition has no type or storage class arch/arm/plat-omap/dmtimer.c:604: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' arch/arm/plat-omap/dmtimer.c:604: warning: parameter names (without types) in function declaration arch/arm/plat-omap/dmtimer.c:746: error: expected declaration specifiers or '...' before string constant arch/arm/plat-omap/dmtimer.c:746: warning: data definition has no type or storage class arch/arm/plat-omap/dmtimer.c:746: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION' arch/arm/plat-omap/dmtimer.c:746: warning: function declaration isn't a prototype arch/arm/plat-omap/dmtimer.c:747: error: expected declaration specifiers or '...' before string constant arch/arm/plat-omap/dmtimer.c:747: warning: data definition has no type or storage class arch/arm/plat-omap/dmtimer.c:747: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE' arch/arm/plat-omap/dmtimer.c:747: warning: function declaration isn't a prototype arch/arm/plat-omap/dmtimer.c:748: error: expected declaration specifiers or '...' before string constant arch/arm/plat-omap/dmtimer.c:748: warning: data definition has no type or storage class arch/arm/plat-omap/dmtimer.c:748: warning: type defaults to 'int' in declaration of 'MODULE_ALIAS' arch/arm/plat-omap/dmtimer.c:748: warning: function declaration isn't a prototype arch/arm/plat-omap/dmtimer.c:749: error: expected declaration specifiers or '...' before string constant arch/arm/plat-omap/dmtimer.c:749: warning: data definition has no type or storage class arch/arm/plat-omap/dmtimer.c:749: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR' arch/arm/plat-omap/dmtimer.c:749: warning: function declaration isn't a prototype make[1]: *** [arch/arm/plat-omap/dmtimer.o] Error 1 make: *** [arch/arm/plat-omap] Error 2 Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
| * | ARM: OMAP2+: l3-noc: Include linux/module.hAxel Lin2011-11-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Include linux/module.h to fix below build error: CC arch/arm/mach-omap2/omap_l3_noc.o arch/arm/mach-omap2/omap_l3_noc.c:240: error: expected ',' or ';' before 'MODULE_DEVICE_TABLE' arch/arm/mach-omap2/omap_l3_noc.c:250: error: 'THIS_MODULE' undeclared here (not in a function) make[1]: *** [arch/arm/mach-omap2/omap_l3_noc.o] Error 1 make: *** [arch/arm/mach-omap2] Error 2 Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
| * | ARM: OMAP2+: devices: Fixes for McPDMPeter Ujfalusi2011-11-051-14/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit f718e2c034bf6ff872106344935006230764cb12 (ARM: OMAP2+: devices: Remove all omap_device_pm_latency structures) removed these structures. Commit 3528c58eb9e818b7821501afa2916eb12131994a (OMAP: omap_device: when building return platform_device instead of omap_device) now returns platform_device instead of omap_device. Fix up the omap-mcpdm init function since this part comes via sound tree, and there has been changes regarding to hwmod/omap_device_build. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> CC: Benoit Cousson <b-cousson@ti.com> CC: Kevin Hilman <khilman@ti.com> [tony@atomide.com: updated comments] Signed-off-by: Tony Lindgren <tony@atomide.com>
| * | ARM: OMAP: Fix errors and warnings when building for one boardSanjeev Premi2011-11-052-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When customizing omap2plus_defconfig to build for only one board (omap3evm), I came across these warnings and errors (filenames truncated): arch/arm/mach-omap2/board-generic.c:76:20: warning: 'omap4_init' defined but not used arch/arm/mach-omap2/built-in.o: In function `omap2420_init_early': arch/arm/mach-omap2/io.c:364: undefined reference to `omap2_set_globals_242x' arch/arm/mach-omap2/io.c:366: undefined reference to `omap2xxx_voltagedomains_init' arch/arm/mach-omap2/io.c:367: undefined reference to `omap242x_powerdomains_init' arch/arm/mach-omap2/io.c:368: undefined reference to `omap242x_clockdomains_init' arch/arm/mach-omap2/io.c:369: undefined reference to `omap2420_hwmod_init' arch/arm/mach-omap2/built-in.o: In function `omap2430_init_early': arch/arm/mach-omap2/io.c:376: undefined reference to `omap2_set_globals_243x' arch/arm/mach-omap2/io.c:378: undefined reference to `omap2xxx_voltagedomains_init' arch/arm/mach-omap2/io.c:379: undefined reference to `omap243x_powerdomains_init' arch/arm/mach-omap2/io.c:380: undefined reference to `omap243x_clockdomains_init' arch/arm/mach-omap2/io.c:381: undefined reference to `omap2430_hwmod_init' arch/arm/mach-omap2/built-in.o: In function `omap4430_init_early': arch/arm/mach-omap2/io.c:436: undefined reference to `omap2_set_globals_443x' arch/arm/mach-omap2/io.c:438: undefined reference to `omap44xx_voltagedomains_init' arch/arm/mach-omap2/io.c:439: undefined reference to `omap44xx_powerdomains_init' arch/arm/mach-omap2/io.c:440: undefined reference to `omap44xx_clockdomains_init' arch/arm/mach-omap2/io.c:441: undefined reference to `omap44xx_hwmod_init' This patch fixes them. Signed-off-by: Sanjeev Premi <premi@ti.com> Acked-by: Thomas Weber <weber@corscience.de> [tony@atomide.com: updated to fix warnings for board-generic.c] Signed-off-by: Tony Lindgren <tony@atomide.com>
| * | Merge branch 'for_3.2/pm-cleanup-2' of ↵Tony Lindgren2011-11-053-39/+53
| |\ \ | | | | | | | | | | | | git://github.com/khilman/linux-omap-pm into fixes
| | * | ARM: OMAP3: PM: restrict erratum i443 handling to OMAP3430 onlyPaul Walmsley2011-10-071-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on the documents that I have here, there doesn't appear to be an equivalent to erratum i443 for OMAP3630, so restrict this one to OMAP34xx chips. Also, explicitly restrict this erratum to EMU and HS devices. Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
| | * | ARM: OMAP3: PM: fix I/O wakeup and I/O chain clock control detectionPaul Walmsley2011-10-073-27/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way that we detect which OMAP3 chips support I/O wakeup and software I/O chain clock control is broken. Currently, I/O wakeup is marked as present for all OMAP3 SoCs other than the AM3505/3517. The TI81xx family of SoCs are at present considered to be OMAP3 SoCs, but don't support I/O wakeup. To resolve this, convert the existing blacklist approach to an explicit, whitelist support, in which only SoCs which are known to support I/O wakeup are listed. (At present, this only includes OMAP34xx, OMAP3503, OMAP3515, OMAP3525, OMAP3530, and OMAP36xx.) Also, the current code incorrectly detects the presence of a software-controllable I/O chain clock on several chips that don't support it. This results in writes to reserved bitfields, unnecessary delays, and console messages on kernels running on those chips: http://www.spinics.net/lists/linux-omap/msg58735.html Convert this test to a feature test with a chip-by-chip whitelist. Thanks to Dave Hylands <dhylands@gmail.com> for reporting this problem and doing some testing to help isolate the cause. Thanks to Steve Sakoman <sakoman@gmail.com> for catching a bug in the first version of this patch. Thanks to Russell King <linux@arm.linux.org.uk> for comments. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Dave Hylands <dhylands@gmail.com> Cc: Steve Sakoman <sakoman@gmail.com> Tested-by: Steve Sakoman <sakoman@gmail.com> Cc: Russell King - ARM Linux <linux@arm.linux.org.uk> Signed-off-by: Kevin Hilman <khilman@ti.com>
| | * | ARM: OMAP3: PM: fix pwrdm_post_transition call sequenceCharulatha V2011-10-071-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The context lost count is modified in omap_sram_idle() path when pwrdm_post_transition() is called. But pwrdm_post_transition() is called only after omap_gpio_resume_after_idle() is called. Correct this so that context lost count is modified before calling omap_gpio_resume_after_idle(). This would be useful when OMAP GPIO save/restore context is called by the OMAP GPIO driver itself. Signed-off-by: Charulatha V <charu@ti.com> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
| * | | Merge branch 'prcm_scm_misc_fixes_3.2' of git://git.pwsan.com/linux-2.6 into ↵Tony Lindgren2011-11-052-9/+12
| |\ \ \ | | | | | | | | | | | | | | | fixes
| | * | | ARM: OMAP: AM35x: remove hwmods that aren't genericAbhilash K V2011-10-071-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removing modules iva, sr1_hwmod, sr2_hwmod, mailbox from the base omap3xxx_hwmods list, so that they can be excluded for am35x. This removes quite a few warnings on boot for AM35x. Signed-off-by: Abhilash K V <abhilash.kv@ti.com> [paul@pwsan.com: dropped 'mailbox class' comments; updated changelog] Signed-off-by: Paul Walmsley <paul@pwsan.com>
| | * | | ARM: OMAP: ctrl: Fix CONTROL_DSIPHY register fieldsArchit Taneja2011-10-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the shift and mask macros for DSIx_PPID fields in CONTROL_DSIPHY. The OMAP4430 Public TRM vV has these fields mentioned correctly. Signed-off-by: Archit Taneja <archit@ti.com> Acked-by: Benoit Cousson <b-cousson@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Paul Walmsley <paul@pwsan.com>
| * | | | Merge branch 'omap_clock_fixes_3.2' of git://git.pwsan.com/linux-2.6 into fixesTony Lindgren2011-11-056-28/+142
| |\ \ \ \
| | * | | | ARM: OMAP3+: Update DPLL Fint range for OMAP36xx and OMAP4xxx devicesJon Hunter2011-10-071-16/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The OMAP36xx and OMAP4xxx DPLLs have a different internal reference clock frequency (fint) operating range than OMAP3430. Update the dpll_test_fint() function to check for the correct frequency ranges for OMAP36xx and OMAP4xxx. For OMAP36xx and OMAP4xxx devices, DPLLs fint range is 0.5MHz to 2.5MHz for j-type DPLLs and otherwise it is 32KHz to 52MHz for all other DPLLs. Signed-off-by: Jon Hunter <jon-hunter@ti.com> Signed-off-by: Paul Walmsley <paul@pwsan.com>
| | * | | | ARM: OMAP4: clock: Add missing clock divider for OCP_ABE_ICLKJon Hunter2011-10-071-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parent clock of the OCP_ABE_ICLK is the AESS_FCLK and the parent clock of the AESS_FCLK is the ABE_FCLK... ABE_FCLK --> AESS_FCLK --> OCP_ABE_ICLK The AESS_FCLK and OCP_ABE_ICLK clocks both have dividers which determine their operational frequency. However, the dividers for the AESS_FCLK and OCP_ABE_ICLK are controlled via a single bit, which is the CM1_ABE_AESS_CLKCTRL[24] bit. When this bit is set to 0, the AESS_FCLK divider is 1 and the OCP_ABE_ICLK divider is 2. Similarly, when this bit is set to 1, the AESS_FCLK divider is 2 and the OCP_ABE_ICLK is 1. The above relationship between the AESS_FCLK and OCP_ABE_ICLK dividers ensure that the OCP_ABE_ICLK clock is always half the frequency of the ABE_CLK... OCP_ABE_ICLK = ABE_FCLK/2 The divider for the OCP_ABE_ICLK is currently missing so add a divider that will ensure the OCP_ABE_ICLK frequency is always half the ABE_FCLK frequency. Signed-off-by: Jon Hunter <jon-hunter@ti.com> Signed-off-by: Paul Walmsley <paul@pwsan.com>
| | * | | | ARM: OMAP4460: Clock: Adding support for 4460 specific clocksPaul Walmsley2011-10-071-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OMAP4460 specific clocks are not getting added as the cpu_is_omap44xx is choosing only OMAP4430 specific clock nodes. Changing it to add to OMAP4460 specific clocks also. This is clocks are required of temperature sensor. Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com> Signed-off-by: Keerthy <j-keerthy@ti.com> Cc: paul@pwsan.com [paul@pwsan.com: updated to apply] Signed-off-by: Paul Walmsley <paul@pwsan.com>
| | * | | | ARM: OMAP3+: dpll: use DPLLs recalc function instead of omap2_get_dpll_rateJon Hunter2011-10-071-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a continuation of Mike Turquette's patch "OMAP3+: use DPLL's round_rate when setting rate". omap3_noncore_dpll_set_rate() and omap3_noncore_dpll_enable() call omap2_get_dpll_rate() explicitly. It may be necessary for some DPLLs to use a different function and so use the DPLLs recalc() function pointer instead. An example is the DPLL_ABE on OMAP4 which can have a 4X multiplier in addition to the usual MN multipler and dividers and therefore uses a different round_rate and recalc function. Signed-off-by: Jon Hunter <jon-hunter@ti.com> Cc: Mike Turquette <mturquette@ti.com> Cc: Misael Lopez Cruz <misael.lopez@ti.com> [paul@pwsan.com: merged this patch with Mike's "use clock's recalc in DPLL handling" patch; also reported by Misael] Signed-off-by: Paul Walmsley <paul@pwsan.com>
| | * | | | ARM: OMAP3+: dpll: assign clk rate from rounded rate during rate setMike Turquette2011-10-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rounded rate can differ from target rate, so to better reflect reality set clk->rate equal to the rounded rate when setting DPLL frequency. This avoids issues where the DPLL frequency is slightly different than what debugfs clock tree reports using the old target rate. An example of a clock that requires this is DPLL_ABE on OMAP4 which can have a 4x multiplier on top of the usual MN dividers depending on register settings. This requires a special round_rate function that might yield a rate different from the initial target. Signed-off-by: Mike Turquette <mturquette@ti.com> Signed-off-by: Jon Hunter <jon-hunter@ti.com> Signed-off-by: Paul Walmsley <paul@pwsan.com>
| | * | | | ARM: OMAP3+: dpll: use DPLL's round_rate when setting rateMike Turquette2011-10-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | omap3_noncore_dpll_set_rate uses omap2_dpll_round_rate explicitly. Instead use the struct clk pointer's round_rate function to allow for DPLL's with special needs. An example of a clock that requires this is DPLL_ABE on OMAP4 which can have a 4x multiplier on top of the usual MN dividers depending on register settings. This requires a special round_rate function that might yield a rate different from the initial target. Signed-off-by: Mike Turquette <mturquette@ti.com> Signed-off-by: Jon Hunter <jon-hunter@ti.com> [paul@pwsan.com: split rate assignment portion into a separate patch] Signed-off-by: Paul Walmsley <paul@pwsan.com>
| | * | | | ARM: OMAP4: clock: round_rate and recalc functions for DPLL_ABEMike Turquette2011-10-074-2/+80
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OMAP4 DPLL_ABE can enable a 4X multipler on top of the normal MN multipler and divider. This is achieved by setting CM_CLKMODE_DPLL_ABE.DPLL_REGM4XEN bit in CKGEN module of CM1. From the OMAP4 TRM: Fdpll = Fref x 2 x (4 x M/(N+1)) in case REGM4XEN bit field is set (only applicable to DPLL_ABE). Add new round_rate() and recalc() functions for OMAP4, that check the setting of REGM4XEN bit and handle this appropriately. The new functions are a simple wrapper on top of the existing omap2_dpll_round_rate() and omap2_dpll_get_rate() functions to handle the REGM4XEN bit. The REGM4XEN bit is only implemented for the ABE DPLL on OMAP4 and so only dpll_abe_ck uses omap4_dpll_regm4xen_round_rate() and omap4_dpll_regm4xen_recalc() functions. Signed-off-by: Mike Turquette <mturquette@ti.com> Tested-by: Jon Hunter <jon-hunter@ti.com> Signed-off-by: Jon Hunter <jon-hunter@ti.com> [paul@pwsan.com: fixed attempt to return a negative from a fn returning unsigned; pass along errors from omap2_dpll_round_rate(); added documentation; added Jon's S-o-b] Signed-off-by: Paul Walmsley <paul@pwsan.com>