~ubuntu-branches/ubuntu/karmic/linux-ports/karmic

« back to all changes in this revision

Viewing changes to arch/arm/mach-s3c2412/s3c2412.c

  • Committer: Bazaar Package Importer
  • Author(s): Luke Yelavich, Luke Yelavich, Michael Casadevall, Tim Gardner, Upstream Kernel Changes
  • Date: 2009-05-06 18:18:55 UTC
  • Revision ID: james.westby@ubuntu.com-20090506181855-t00baeevpnvd9o7a
Tags: 2.6.30-1.1
[ Luke Yelavich ]
* initial release for karmic
* SAUCE: rebase-ports - adjust for the karmic ports kernel
* SAUCE: rebase-ports - also remove abi dirs/files on rebase
* Update configs after rebase against mainline Jaunty tree
* [Config] Disable CONFIG_BLK_DEV_UB and CONFIG_USB_LIBUSUAL as per
  mainline jaunty
* forward-port patch to drbd for powerpc compilation
* [Config] disable CONFIG_LENOVO_SL_LAPTOP for i386 due to FTBFS
* add .o files found in arch/powerpc/lib to all powerpc kernel header
  packages
* [Config] enable CONFIG_DRM_I915_KMS for i386 as per karmic mainline

[ Michael Casadevall ]

* Disable kgdb on sparc64
* [sparc] [Config] Disable GPIO LEDS
* [ia64] Rename -ia64-generic to -ia64 in line with other architectures
* Correct kernel image path for sparc builds
* [hppa] Fix HPPA config files to build modules for all udebian

Rebase on top of karmic mainline 2.6.30-1.1

[ Tim Gardner ]

* [Config] armel: disable staging drivers, fixes FTBS
* [Config] armel imx51: Disable CONFIG_MTD_NAND_MXC, fixes FTBS

[ Upstream Kernel Changes ]

* mpt2sas: Change reset_type enum to avoid namespace collision.
  Submitted upstream.

* Initial release after rebasing against v2.6.30-rc3

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
#include <linux/list.h>
17
17
#include <linux/timer.h>
18
18
#include <linux/init.h>
 
19
#include <linux/clk.h>
19
20
#include <linux/delay.h>
20
21
#include <linux/sysdev.h>
21
22
#include <linux/serial_core.h>
33
34
#include <mach/reset.h>
34
35
#include <mach/idle.h>
35
36
 
 
37
#include <plat/cpu-freq.h>
 
38
 
36
39
#include <mach/regs-clock.h>
37
40
#include <plat/regs-serial.h>
38
41
#include <mach/regs-power.h>
39
42
#include <mach/regs-gpio.h>
40
43
#include <mach/regs-gpioj.h>
41
44
#include <mach/regs-dsc.h>
42
 
#include <asm/plat-s3c24xx/regs-spi.h>
 
45
#include <plat/regs-spi.h>
43
46
#include <mach/regs-s3c2412.h>
44
47
 
45
48
#include <plat/s3c2412.h>
47
50
#include <plat/devs.h>
48
51
#include <plat/clock.h>
49
52
#include <plat/pm.h>
 
53
#include <plat/pll.h>
50
54
 
51
55
#ifndef CONFIG_CPU_S3C2412_ONLY
52
56
void __iomem *s3c24xx_va_gpio2 = S3C24XX_VA_GPIO;
136
140
 * machine specific initialisation.
137
141
*/
138
142
 
139
 
void __init s3c2412_map_io(struct map_desc *mach_desc, int mach_size)
 
143
void __init s3c2412_map_io(void)
140
144
{
141
145
        /* move base of IO */
142
146
 
153
157
        /* register our io-tables */
154
158
 
155
159
        iotable_init(s3c2412_iodesc, ARRAY_SIZE(s3c2412_iodesc));
156
 
        iotable_init(mach_desc, mach_size);
157
160
}
158
161
 
159
 
void __init s3c2412_init_clocks(int xtal)
 
162
void __init_or_cpufreq s3c2412_setup_clocks(void)
160
163
{
 
164
        struct clk *xtal_clk;
161
165
        unsigned long tmp;
 
166
        unsigned long xtal;
162
167
        unsigned long fclk;
163
168
        unsigned long hclk;
164
169
        unsigned long pclk;
165
170
 
 
171
        xtal_clk = clk_get(NULL, "xtal");
 
172
        xtal = clk_get_rate(xtal_clk);
 
173
        clk_put(xtal_clk);
 
174
 
166
175
        /* now we've got our machine bits initialised, work out what
167
176
         * clocks we've got */
168
177
 
169
 
        fclk = s3c2410_get_pll(__raw_readl(S3C2410_MPLLCON), xtal*2);
 
178
        fclk = s3c24xx_get_pll(__raw_readl(S3C2410_MPLLCON), xtal * 2);
170
179
 
171
180
        clk_mpll.rate = fclk;
172
181
 
183
192
        printk("S3C2412: core %ld.%03ld MHz, memory %ld.%03ld MHz, peripheral %ld.%03ld MHz\n",
184
193
               print_mhz(fclk), print_mhz(hclk), print_mhz(pclk));
185
194
 
 
195
        s3c24xx_setup_clocks(fclk, hclk, pclk);
 
196
}
 
197
 
 
198
void __init s3c2412_init_clocks(int xtal)
 
199
{
186
200
        /* initialise the clocks here, to allow other things like the
187
201
         * console to use them
188
202
         */
189
203
 
190
 
        s3c24xx_setup_clocks(xtal, fclk, hclk, pclk);
 
204
        s3c24xx_register_baseclocks(xtal);
 
205
        s3c2412_setup_clocks();
191
206
        s3c2412_baseclk_add();
192
207
}
193
208