summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2443/clock.c
Commit message (Collapse)AuthorAgeFilesLines
* ARM: S3C2443: move mach-s3c2443/* into mach-s3c24xx/Kukjin Kim2012-03-031-222/+0
| | | | | | | | | | This patch moves S3C2443 stuff into mach-s3c24xx/ directory so that we can merge the s3c24 series' directories to the just one mach-s3c24xx/ directory. Cc: Ben Dooks <ben-linux@fluff.org> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
* driver-core: remove sysdev.h usage.Kay Sievers2011-12-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sysdev.h file should not be needed by any in-kernel code, so remove the .h file from these random files that seem to still want to include it. The sysdev code will be going away soon, so this include needs to be removed no matter what. Cc: Jiandong Zheng <jdzheng@broadcom.com> Cc: Scott Branden <sbranden@broadcom.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Kukjin Kim <kgene.kim@samsung.com> Cc: David Brown <davidb@codeaurora.org> Cc: Daniel Walker <dwalker@fifo99.com> Cc: Bryan Huntsman <bryanh@codeaurora.org> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Wan ZongShun <mcuos.com@gmail.com> Cc: Haavard Skinnemoen <hskinnemoen@gmail.com> Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Cc: "Venkatesh Pallipadi Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Matthew Garrett <mjg@redhat.com> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
* ARM: S3C2443: Remove redundant s3c_register_clocks call for init_clocksAxel Lin2011-10-141-7/+0
| | | | | | | | | | | | | Since commit af337f3e633a198034a99450416257ddf2307497 "ARM: S3C2443: Move parts of the clock code to common clock file", the init_clocks array is moved to arch/arm/plat-s3c24xx/s3c2443-clock.c. Now we call s3c_register_clocks for init_clocks in s3c2443_common_init_clocks. Thus we can remove the empty init_clocks array here and remove the redundant s3c_register_clocks call for init_clocks in s3c2443_init_clocks. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
* ARM: S3C24XX: use clk_get_rate to init fclk in common_setup_clocksHeiko Stuebner2011-10-141-9/+2
| | | | | | | | | | | | | Previously the fclk rate was calculated by dividing the pll through the divider value of the armdiv. With a real armdiv clk in place it's possible to simply read its value, which does essentially the same. This change makes the whole fdiv_fn function pointers supplied to s3c2443_common_init_clocks and s3c2443_common_setup_clocks obsolete, so remove it too. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
* ARM: S3C2443: Move clk_arm and clk_armdiv to common codeHeiko St?bner2011-10-141-83/+2
| | | | | | | | | | The system-layout of the armdiv and armclk is common to S3C2443/S3C2416/S3C2450 and only differs in the array of possible dividers. Therefore it is possible to reuse the clock definitions for all of these SoCs. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
* ARM: S3C24XX: Add infrastructure to transmit armdiv to common codeHeiko Stuebner2011-10-141-1/+3
| | | | | | | | This is needed for making the armdiv clock common to S3C2443 and S3C2416/2450. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
* ARM: S3C2443: Add hsspi-clock from pclk and rename S3C2443 hsspi sclkHeiko Stuebner2011-10-041-1/+1
| | | | | | | This clock is common to S3C2443/2416/2450. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
* ARM: S3C2443: Move i2s clock definitions to common codeHeiko Stuebner2011-10-041-53/+0
| | | | | | | | S3C2416/S3C2450 use the same clocks for their i2s blocks and can therefore reuse the existing ones. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
* ARM: S3C2443: Fix bit-reset in setrate of clk_armdivHeiko Stuebner2011-09-261-1/+1
| | | | | | | | The changed statement should set the old armdiv bits to 0 and not everything else, before setting the new value. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
* ARM: S3C24XX: Add clkdev supportThomas Abraham2011-07-201-12/+4
| | | | | Signed-off-by: Thomas Abraham <thomas.ab@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
* ARM: S3C24XX: Add address map and clock definitions for HSMMC0Yauhen Kharuzhy2011-01-061-2/+2
| | | | | | | | | | | | | | Define maps for HSMMC devices. S3C2443 has one HSMMC device with base address 0x4A800000. S3C2416 has HSMMC0 at 0x4AC00000 and HSMMC1 at 0x4A800000. So suppose that S3C2443 has only HSMMC1. Define clock for hsmmc0 device and register it. Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
* Merge branch 'for-linus' of ↵Linus Torvalds2010-05-201-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (44 commits) vlynq: make whole Kconfig-menu dependant on architecture add descriptive comment for TIF_MEMDIE task flag declaration. EEPROM: max6875: Header file cleanup EEPROM: 93cx6: Header file cleanup EEPROM: Header file cleanup agp: use NULL instead of 0 when pointer is needed rtc-v3020: make bitfield unsigned PCI: make bitfield unsigned jbd2: use NULL instead of 0 when pointer is needed cciss: fix shadows sparse warning doc: inode uses a mutex instead of a semaphore. uml: i386: Avoid redefinition of NR_syscalls fix "seperate" typos in comments cocbalt_lcdfb: correct sections doc: Change urls for sparse Powerpc: wii: Fix typo in comment i2o: cleanup some exit paths Documentation/: it's -> its where appropriate UML: Fix compiler warning due to missing task_struct declaration UML: add kernel.h include to signal.c ...
| * fix "seperate" typos in commentsAnand Gadiyar2010-05-101-1/+1
| | | | | | | | | | | | | | s/seperate/separate Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | ARM: S3C2443: Move parts of the clock code to common clock fileBen Dooks2010-05-101-446/+6
| | | | | | | | | | | | | | | | | | | | To share code with some of the newer parts such as the S3C2416, move parts of arch/arm/mach-s3c2443/clock.c to a common file called arch/arm/plat-s3c24xx/s3c2443-clock.c. Update the build configuration to deal with this new file. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* | ARM: SAMSUNG: Add s3c_disable_clocks() and tidy init+disable usageBen Dooks2010-05-101-23/+4
|/ | | | | | | | Add s3c_disable_clocks() and change the clock registration code to use the s3c_register_clocks() followed by s3c_disable_clocks() instead of the loops it was using. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* ARM: S3C2443: Add set_rate and round_rate calls for armdiv clockBen Dooks2010-03-071-20/+73
| | | | | | | Add set_rate and round_rate calls to armdiv for future use with cpu frequency scaling. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* ARM: S3C2443: Remove #if 0 for clk_mpllBen Dooks2010-03-071-8/+0
| | | | | | | The clk_mpll has long been moved into common clock code, remove the code completely instead of the nasty #if 0 block. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* ARM: S3C2443: Update notes on MPLLREF clockBen Dooks2010-03-071-2/+4
| | | | | | Add note on MPLLREF clock source and why it cannot be easily removed. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* ARM: S3C2443: Further clksrc-clk conversionsBen Dooks2010-03-071-125/+62
| | | | | | | | Move more of the core clocks that where left over from the last commit as they are much more core to the system operation. This should allow for easier tracking of any problems. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* ARM: S3C2443: Change to using plat-samsung clksrc-clk implementationBen Dooks2010-03-071-387/+126
| | | | | | | | | The S3C2443 clock code could easily make use of the clksrc implementation in plat-samsung for many of the clocks. Make the clocks that easily move to clksrc-clk over, update any initialisation and remove the old register definitions from the header file (it is only being used once). Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* ARM: S3C2443: Use common clock gate codeBen Dooks2010-01-301-35/+13
| | | | | | | Add common clock gate code for each of the S3C2443 clock gate code. Whether to move this elsewhere will be decided later. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* ARM: SAMSUNG: Add call to register array of clocksBen Dooks2010-01-151-8/+1
| | | | | | | | Add s3c_register_clocks() to register an array of clocks, printing an error message if there is a problem. Replace all points in the code where this could be used. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* ARM: SAMSUNG: Reduce size of struct clk.Ben Dooks2010-01-151-29/+59
| | | | | | | | | | | | | | | Reduce the size of struct clk by 12 bytes and make defining clocks with common implementation functions easier by moving the set_rate, get_rate, round_rate and set_parent calls into a new structure called 'struct clk_ops' and using that instead. This change does make a few clocks larger as they need their own clk_ops, but this is outweighed by the number of clocks with either no ops or having a common set of ops. Update all the users of this. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* [ARM] S3C: Remove unnecessary <linux/delay.h> includesBen Dooks2008-12-181-1/+0
| | | | | | | | As per Russell King's last review comment, find and remove all unnecessary includes of <linux/delay.h> in the files that do not need them. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* [ARM] S3C: Update time initialisation to fix S3C64XX time problemsBen Dooks2008-12-161-0/+2
| | | | | | | | | | | | | The S3C64XX timer is running at the wrong rate due to the assumptions made in the timer initialisation about the way the pwm dividers work. This means that time on the S3C64XX runs twice as fast as it should. Fix the problem by moving to using the clk framework to setup the pwm timer clock muxes, as the pwm-clock code has all the necessary knowledge of how the timer clock inputs are routed. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* [ARM] S3C64XX: Add initial clock frameworkBen Dooks2008-12-151-14/+1
| | | | | | | | Add the initial clocks definitions for the s3c6400 and s3c6410. Move the epll and ext clock from the s3c2443 support into the common code. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* [ARM] S3C24XX: Update clock data on resumeBen Dooks2008-12-151-10/+25
| | | | | | | | | Update the clock settings on resume for suspend/resume support so that if the boot loader changes anything or the system's PLL is reset then we return with the correct settings. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* Merge branch 'for-rmk-fixes' of git://aeryn.fluff.org.uk/bjdooks/linuxRussell King2008-10-171-2/+1
|\
| * [ARM] S3C2443: Fix HCLK rateBen Dooks2008-10-161-2/+1
| | | | | | | | | | | | | | | | | | Fix the calculation of HCLK on the S3C2443, it should not have been passed through S3C2443_CLKDIV0_HALF_HCLK. Re-work of original patch from Wei Shuai <cpuwolf@gmail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* | Merge branch 's3c-move' into develRussell King2008-10-141-3/+3
|\ \ | |/ |/| | | | | | | Conflicts: arch/arm/mach-versatile/core.c
| * [ARM] S3C24XX: Additional include movesBen Dooks2008-10-071-1/+1
| | | | | | | | | | | | Continue moving the include files into arch/arm Signed-off-by: Ben Dooks <ben-linux@fluff.org>
| * [ARM] S3C24XX: Move files out of include/asm-arm/plat-s3c*Ben Dooks2008-10-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | First move of items out of include/asm-arm/plat-s3c* to their new homes under arch/arm/plat-s3c/include/plat and arch/arm/plat-s3c24xx/include/plat directories. Note, we have to create a dummy arch/arm/plat-s3c/Makefile to allow us to add arch/arm/plat-s3c/include/plat to the path. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* | [ARM] Convert asm/io.h to linux/io.hRussell King2008-09-061-1/+1
|/ | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/machRussell King2008-08-071-2/+2
| | | | | | This just leaves include/asm-arm/plat-* to deal with. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Remove asm/hardware.h, use asm/arch/hardware.h insteadRussell King2008-08-071-1/+1
| | | | | | | | | Remove includes of asm/hardware.h in addition to asm/arch/hardware.h. Then, since asm/hardware.h only exists to include asm/arch/hardware.h, update everything to directly include asm/arch/hardware.h and remove asm/hardware.h. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] S3C2443: Add prediv clk and fix setting of h and p clocksBen Dooks2008-07-071-6/+33
| | | | | | | | Update the S3C2443 clock support to add the prediv clock that is sourced via a divider from msysclk. Also fix the setting of p and h clocks from this prediv clock. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* [ARM] S3C2443: Add armdiv and arm clocksBen Dooks2008-07-071-1/+53
| | | | | | | Add the armdiv and arm clocks to the S3C2443 clock framework and ensure they are correctly setup. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* [ARM] S3C2443: Fix s3c2443_clkcon_enable_p() using wrong register.Ben Dooks2008-07-071-1/+1
| | | | | | | | s3c2443_clkcon_enable_p() was reading from the correct register S3C2443_PCLKCON, but then writing the value back to the wrong register S3C2443_HCLKCON. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* Fix misspellings of "system", "controller", "interrupt" and "necessary".Robert P. J. Day2007-10-191-1/+1
| | | | | | | | Fix the various misspellings of "system", controller", "interrupt" and "[un]necessary". Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
* [ARM] 4414/1: S3C2443: sparse fix for clock.cBen Dooks2007-05-301-2/+1
| | | | | | | | | | | | | Fix sparse warnings in the arch/arm/mach-s3c2443/clock.c, including an bug in initialising the cf clock initialiser where two values are being set for the ctrlbit. arch/arm/mach-s3c2443/clock.c:397:12: warning: symbol 'clk_usb_bus_host' was not declared. Should it be static? arch/arm/mach-s3c2443/clock.c:760:4: error: Initializer entry defined twice arch/arm/mach-s3c2443/clock.c:761:4: also defined here Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 4396/1: S3C2443: Add missing HCLK clocksBen Dooks2007-05-201-1/+21
| | | | | | | | Add the clocks missing form HCLKCON back into the set of clocks being registered at initalisation time. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 4365/1: Add AC97 clock to s3c2443 machineGraeme Gregory2007-05-111-0/+4
| | | | | | | | | This adds the ac97 clock to the s3c2443 machine files. It seems to have been simply missed out previously. Signed-off-by: Graeme Gregory <gg@opensource.wolfsonmicro.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 4198/2: S3C2443: arch/arm/mach-s3c2443 and related supportBen Dooks2007-02-161-0/+1007
Add arch/arm/mach-s3c2443 for support of the Samsung S3C2443 SoC This patch adds the core CPU support, clock framework, times and initial IRQ support, as well as adding the directory into the build tree. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
OpenPOWER on IntegriCloud