aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-14 17:16:36 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-14 17:16:36 -0800
commitae0a0dc50ea601c3c8f03a2c0b068872db58d626 (patch)
tree61bf79995b77ab93a3b77d26f4685b22976352b1 /arch
parentd96524e48315ede2b9d61726ffe1139987b3cf47 (diff)
parent9ceea8edb0a970c9e57a742efaf4fd7a5aae9881 (diff)
downloadhistory-ae0a0dc50ea601c3c8f03a2c0b068872db58d626.tar.gz
Merge bk://bk.arm.linux.org.uk/linux-2.6-rmk
into ppc970.osdl.org:/home/torvalds/v2.6/linux
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-s3c2410/clock.c60
-rw-r--r--arch/arm/mach-s3c2410/clock.h6
-rw-r--r--arch/arm/mach-s3c2410/cpu.c31
-rw-r--r--arch/arm/mach-s3c2410/cpu.h3
-rw-r--r--arch/arm/mach-s3c2410/mach-bast.c1
-rw-r--r--arch/arm/mach-s3c2410/mach-h1940.c2
-rw-r--r--arch/arm/mach-s3c2410/mach-rx3715.c4
-rw-r--r--arch/arm/mach-s3c2410/mach-smdk2410.c1
-rw-r--r--arch/arm/mach-s3c2410/mach-vr1000.c2
-rw-r--r--arch/arm/mach-s3c2410/s3c2410.c12
-rw-r--r--arch/arm/mach-s3c2410/s3c2410.h4
-rw-r--r--arch/arm/mach-s3c2410/s3c2440.c35
-rw-r--r--arch/arm/mach-s3c2410/s3c2440.h4
-rw-r--r--arch/arm/mm/ioremap.c2
-rw-r--r--arch/arm/mm/proc-v6.S1
-rw-r--r--arch/arm/vfp/entry.S2
16 files changed, 109 insertions, 61 deletions
diff --git a/arch/arm/mach-s3c2410/clock.c b/arch/arm/mach-s3c2410/clock.c
index 107c12abc2681b..f6d7470fe531aa 100644
--- a/arch/arm/mach-s3c2410/clock.c
+++ b/arch/arm/mach-s3c2410/clock.c
@@ -60,7 +60,7 @@ static DECLARE_MUTEX(clocks_sem);
/* old functions */
-void inline s3c2410_clk_enable(unsigned int clocks, unsigned int enable)
+void inline s3c24xx_clk_enable(unsigned int clocks, unsigned int enable)
{
unsigned long clkcon;
unsigned long flags;
@@ -88,9 +88,9 @@ static int clk_null_enable(struct clk *clk, int enable)
return 0;
}
-int s3c2410_clkcon_enable(struct clk *clk, int enable)
+int s3c24xx_clkcon_enable(struct clk *clk, int enable)
{
- s3c2410_clk_enable(clk->ctrlbit, enable);
+ s3c24xx_clk_enable(clk->ctrlbit, enable);
return 0;
}
@@ -264,90 +264,90 @@ static struct clk init_clocks[] = {
{ .name = "nand",
.id = -1,
.parent = &clk_h,
- .enable = s3c2410_clkcon_enable,
+ .enable = s3c24xx_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_NAND
},
{ .name = "lcd",
.id = -1,
.parent = &clk_h,
- .enable = s3c2410_clkcon_enable,
+ .enable = s3c24xx_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_LCDC
},
{ .name = "usb-host",
.id = -1,
.parent = &clk_h,
- .enable = s3c2410_clkcon_enable,
+ .enable = s3c24xx_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_USBH
},
{ .name = "usb-device",
.id = -1,
.parent = &clk_h,
- .enable = s3c2410_clkcon_enable,
+ .enable = s3c24xx_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_USBD
},
{ .name = "timers",
.parent = &clk_p,
- .enable = s3c2410_clkcon_enable,
+ .enable = s3c24xx_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_PWMT
},
{ .name = "sdi",
.id = -1,
.parent = &clk_p,
- .enable = s3c2410_clkcon_enable,
+ .enable = s3c24xx_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_SDI
},
{ .name = "uart",
.id = 0,
.parent = &clk_p,
- .enable = s3c2410_clkcon_enable,
+ .enable = s3c24xx_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_UART0
},
{ .name = "uart",
.id = 1,
.parent = &clk_p,
- .enable = s3c2410_clkcon_enable,
+ .enable = s3c24xx_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_UART1
},
{ .name = "uart",
.id = 2,
.parent = &clk_p,
- .enable = s3c2410_clkcon_enable,
+ .enable = s3c24xx_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_UART2
},
{ .name = "gpio",
.id = -1,
.parent = &clk_p,
- .enable = s3c2410_clkcon_enable,
+ .enable = s3c24xx_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_GPIO
},
{ .name = "rtc",
.id = -1,
.parent = &clk_p,
- .enable = s3c2410_clkcon_enable,
+ .enable = s3c24xx_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_RTC
},
{ .name = "adc",
.id = -1,
.parent = &clk_p,
- .enable = s3c2410_clkcon_enable,
+ .enable = s3c24xx_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_ADC
},
{ .name = "i2c",
.id = -1,
.parent = &clk_p,
- .enable = s3c2410_clkcon_enable,
+ .enable = s3c24xx_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_IIC
},
{ .name = "iis",
.id = -1,
.parent = &clk_p,
- .enable = s3c2410_clkcon_enable,
+ .enable = s3c24xx_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_IIS
},
{ .name = "spi",
.id = -1,
.parent = &clk_p,
- .enable = s3c2410_clkcon_enable,
+ .enable = s3c24xx_clkcon_enable,
.ctrlbit = S3C2410_CLKCON_SPI
},
{ .name = "watchdog",
@@ -359,7 +359,7 @@ static struct clk init_clocks[] = {
/* initialise the clock system */
-int s3c2410_register_clock(struct clk *clk)
+int s3c24xx_register_clock(struct clk *clk)
{
clk->owner = THIS_MODULE;
atomic_set(&clk->used, 0);
@@ -378,7 +378,7 @@ int s3c2410_register_clock(struct clk *clk)
/* initalise all the clocks */
-int __init s3c2410_init_clocks(void)
+int __init s3c24xx_setup_clocks(void)
{
struct clk *clkp = init_clocks;
int ptr;
@@ -403,28 +403,28 @@ int __init s3c2410_init_clocks(void)
* and of course, this looks neater
*/
- s3c2410_clk_enable(S3C2410_CLKCON_NAND, 0);
- s3c2410_clk_enable(S3C2410_CLKCON_USBH, 0);
- s3c2410_clk_enable(S3C2410_CLKCON_USBD, 0);
- s3c2410_clk_enable(S3C2410_CLKCON_ADC, 0);
- s3c2410_clk_enable(S3C2410_CLKCON_IIC, 0);
- s3c2410_clk_enable(S3C2410_CLKCON_SPI, 0);
+ s3c24xx_clk_enable(S3C2410_CLKCON_NAND, 0);
+ s3c24xx_clk_enable(S3C2410_CLKCON_USBH, 0);
+ s3c24xx_clk_enable(S3C2410_CLKCON_USBD, 0);
+ s3c24xx_clk_enable(S3C2410_CLKCON_ADC, 0);
+ s3c24xx_clk_enable(S3C2410_CLKCON_IIC, 0);
+ s3c24xx_clk_enable(S3C2410_CLKCON_SPI, 0);
/* assume uart clocks are correctly setup */
/* register our clocks */
- if (s3c2410_register_clock(&clk_f) < 0)
+ if (s3c24xx_register_clock(&clk_f) < 0)
printk(KERN_ERR "failed to register cpu fclk\n");
- if (s3c2410_register_clock(&clk_h) < 0)
+ if (s3c24xx_register_clock(&clk_h) < 0)
printk(KERN_ERR "failed to register cpu hclk\n");
- if (s3c2410_register_clock(&clk_p) < 0)
+ if (s3c24xx_register_clock(&clk_p) < 0)
printk(KERN_ERR "failed to register cpu pclk\n");
for (ptr = 0; ptr < ARRAY_SIZE(init_clocks); ptr++, clkp++) {
- ret = s3c2410_register_clock(clkp);
+ ret = s3c24xx_register_clock(clkp);
if (ret < 0) {
printk(KERN_ERR "Failed to register clock %s (%d)\n",
clkp->name, ret);
diff --git a/arch/arm/mach-s3c2410/clock.h b/arch/arm/mach-s3c2410/clock.h
index f66d901ad3bb54..eae2c83375697f 100644
--- a/arch/arm/mach-s3c2410/clock.h
+++ b/arch/arm/mach-s3c2410/clock.h
@@ -41,7 +41,7 @@ extern unsigned long s3c24xx_fclk;
* Please DO NOT use these outside of arch/arm/mach-s3c2410
*/
-extern int s3c2410_clkcon_enable(struct clk *clk, int enable);
-extern int s3c2410_register_clock(struct clk *clk);
-extern int s3c2410_init_clocks(void);
+extern int s3c24xx_clkcon_enable(struct clk *clk, int enable);
+extern int s3c24xx_register_clock(struct clk *clk);
+extern int s3c24xx_setup_clocks(void);
diff --git a/arch/arm/mach-s3c2410/cpu.c b/arch/arm/mach-s3c2410/cpu.c
index df07f2ee33f752..0a66065360c88e 100644
--- a/arch/arm/mach-s3c2410/cpu.c
+++ b/arch/arm/mach-s3c2410/cpu.c
@@ -47,6 +47,7 @@ struct cpu_table {
unsigned long idmask;
void (*map_io)(struct map_desc *mach_desc, int size);
void (*init_uarts)(struct s3c2410_uartcfg *cfg, int no);
+ void (*init_clocks)(int xtal);
int (*init)(void);
const char *name;
};
@@ -63,6 +64,7 @@ static struct cpu_table cpu_ids[] __initdata = {
.idcode = 0x32410000,
.idmask = 0xffffffff,
.map_io = s3c2410_map_io,
+ .init_clocks = s3c2410_init_clocks,
.init_uarts = s3c2410_init_uarts,
.init = s3c2410_init,
.name = name_s3c2410
@@ -71,6 +73,7 @@ static struct cpu_table cpu_ids[] __initdata = {
.idcode = 0x32410002,
.idmask = 0xffffffff,
.map_io = s3c2410_map_io,
+ .init_clocks = s3c2410_init_clocks,
.init_uarts = s3c2410_init_uarts,
.init = s3c2410_init,
.name = name_s3c2410a
@@ -79,6 +82,7 @@ static struct cpu_table cpu_ids[] __initdata = {
.idcode = 0x32440000,
.idmask = 0xffffffff,
.map_io = s3c2440_map_io,
+ .init_clocks = s3c2440_init_clocks,
.init_uarts = s3c2440_init_uarts,
.init = s3c2440_init,
.name = name_s3c2440
@@ -87,6 +91,7 @@ static struct cpu_table cpu_ids[] __initdata = {
.idcode = 0x32440001,
.idmask = 0xffffffff,
.map_io = s3c2440_map_io,
+ .init_clocks = s3c2440_init_clocks,
.init_uarts = s3c2440_init_uarts,
.init = s3c2440_init,
.name = name_s3c2440a
@@ -132,7 +137,7 @@ void s3c24xx_set_board(struct s3c24xx_board *b)
struct clk **ptr = b->clocks;;
for (i = b->clocks_count; i > 0; i--, ptr++)
- s3c2410_register_clock(*ptr);
+ s3c24xx_register_clock(*ptr);
}
}
@@ -165,6 +170,29 @@ void __init s3c24xx_init_io(struct map_desc *mach_desc, int size)
(cpu->map_io)(mach_desc, size);
}
+/* s3c24xx_init_clocks
+ *
+ * Initialise the clock subsystem and associated information from the
+ * given master crystal value.
+ *
+ * xtal = 0 -> use default PLL crystal value (normally 12MHz)
+ * != 0 -> PLL crystal value in Hz
+*/
+
+void __init s3c24xx_init_clocks(int xtal)
+{
+ if (xtal != 0)
+ s3c24xx_xtal = xtal;
+
+ if (cpu == NULL)
+ panic("s3c24xx_init_clocks: no cpu setup?\n");
+
+ if (cpu->init_clocks == NULL)
+ panic("s3c24xx_init_clocks: cpu has no clock init\n");
+ else
+ (cpu->init_clocks)(xtal);
+}
+
void __init s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no)
{
if (cpu == NULL)
@@ -175,6 +203,7 @@ void __init s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no)
} else
(cpu->init_uarts)(cfg, no);
}
+
static int __init s3c_arch_init(void)
{
int ret;
diff --git a/arch/arm/mach-s3c2410/cpu.h b/arch/arm/mach-s3c2410/cpu.h
index d7b2c61d11c674..4418be659fd13d 100644
--- a/arch/arm/mach-s3c2410/cpu.h
+++ b/arch/arm/mach-s3c2410/cpu.h
@@ -14,6 +14,7 @@
* 18-Oct-2004 BJD Moved board struct into this file
* 04-Jan-2005 BJD New uart initialisation
* 10-Jan-2005 BJD Moved generic init here, specific to cpu headers
+ * 14-Jan-2005 BJD Added s3c24xx_init_clocks() call
*/
#define IODESC_ENT(x) { S3C2410_VA_##x, S3C2410_PA_##x, S3C2410_SZ_##x, MT_DEVICE }
@@ -35,6 +36,8 @@ extern void s3c24xx_init_io(struct map_desc *mach_desc, int size);
extern void s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no);
+extern void s3c24xx_init_clocks(int xtal);
+
/* the board structure is used at first initialsation time
* to get info such as the devices to register for this
* board. This is done because platfrom_add_devices() cannot
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c
index a6c05555445f5e..908a1d49382443 100644
--- a/arch/arm/mach-s3c2410/mach-bast.c
+++ b/arch/arm/mach-s3c2410/mach-bast.c
@@ -263,6 +263,7 @@ void __init bast_map_io(void)
s3c24xx_uclk.parent = &s3c24xx_clkout1;
s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc));
+ s3c24xx_init_clocks(0);
s3c24xx_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs));
s3c24xx_set_board(&bast_board);
usb_simtec_init();
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c
index 9044d287e03a03..e834c00c301985 100644
--- a/arch/arm/mach-s3c2410/mach-h1940.c
+++ b/arch/arm/mach-s3c2410/mach-h1940.c
@@ -22,6 +22,7 @@
* 04-Nov-2004 BJD Change for new serial clock
* 04-Jan-2005 BJD Updated uart init call
* 10-Jan-2005 BJD Removed include of s3c2410.h
+ * 14-Jan-2005 BJD Added clock init
*/
#include <linux/kernel.h>
@@ -103,6 +104,7 @@ static struct s3c24xx_board h1940_board __initdata = {
void __init h1940_map_io(void)
{
s3c24xx_init_io(h1940_iodesc, ARRAY_SIZE(h1940_iodesc));
+ s3c24xx_init_clocks(0);
s3c24xx_init_uarts(h1940_uartcfgs, ARRAY_SIZE(h1940_uartcfgs));
s3c24xx_set_board(&h1940_board);
}
diff --git a/arch/arm/mach-s3c2410/mach-rx3715.c b/arch/arm/mach-s3c2410/mach-rx3715.c
index 38241c908bbd9c..cd8d4ff93fbd85 100644
--- a/arch/arm/mach-s3c2410/mach-rx3715.c
+++ b/arch/arm/mach-s3c2410/mach-rx3715.c
@@ -13,6 +13,7 @@
* 16-Sep-2004 BJD Copied from mach-h1940.c
* 25-Oct-2004 BJD Updates for 2.6.10-rc1
* 10-Jan-2005 BJD Removed include of s3c2410.h s3c2440.h
+ * 14-Jan-2005 BJD Added new clock init
*/
#include <linux/kernel.h>
@@ -91,9 +92,8 @@ static struct s3c24xx_board rx3715_board __initdata = {
void __init rx3715_map_io(void)
{
- s3c24xx_xtal = 16934000;
-
s3c24xx_init_io(rx3715_iodesc, ARRAY_SIZE(rx3715_iodesc));
+ s3c24xx_init_clocks(16934000);
s3c24xx_init_uarts(rx3715_uartcfgs, ARRAY_SIZE(rx3715_uartcfgs));
s3c24xx_set_board(&rx3715_board);
}
diff --git a/arch/arm/mach-s3c2410/mach-smdk2410.c b/arch/arm/mach-s3c2410/mach-smdk2410.c
index ac95647362f674..cd272f79f06eca 100644
--- a/arch/arm/mach-s3c2410/mach-smdk2410.c
+++ b/arch/arm/mach-s3c2410/mach-smdk2410.c
@@ -97,6 +97,7 @@ static struct s3c24xx_board smdk2410_board __initdata = {
void __init smdk2410_map_io(void)
{
s3c24xx_init_io(smdk2410_iodesc, ARRAY_SIZE(smdk2410_iodesc));
+ s3c24xx_init_clocks(0);
s3c24xx_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs));
s3c24xx_set_board(&smdk2410_board);
}
diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c
index 47108f13f652a5..3ff3cc140cf322 100644
--- a/arch/arm/mach-s3c2410/mach-vr1000.c
+++ b/arch/arm/mach-s3c2410/mach-vr1000.c
@@ -20,6 +20,7 @@
* 04-Nov-2004 BJD Clock and serial configuration update
* 04-Jan-2005 BJD Updated uart init call
* 10-Jan-2005 BJD Removed include of s3c2410.h
+ * 14-Jan-2005 BJD Added clock init
*/
#include <linux/kernel.h>
@@ -205,6 +206,7 @@ void __init vr1000_map_io(void)
s3c24xx_uclk.parent = &s3c24xx_clkout1;
s3c24xx_init_io(vr1000_iodesc, ARRAY_SIZE(vr1000_iodesc));
+ s3c24xx_init_clocks(0);
s3c24xx_init_uarts(vr1000_uartcfgs, ARRAY_SIZE(vr1000_uartcfgs));
s3c24xx_set_board(&vr1000_board);
usb_simtec_init();
diff --git a/arch/arm/mach-s3c2410/s3c2410.c b/arch/arm/mach-s3c2410/s3c2410.c
index 0d0fb36d7b58a9..b8270f26b08492 100644
--- a/arch/arm/mach-s3c2410/s3c2410.c
+++ b/arch/arm/mach-s3c2410/s3c2410.c
@@ -151,19 +151,19 @@ void __init s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no)
*
* register the standard cpu IO areas, and any passed in from the
* machine specific initialisation.
- *
- * this function also sets the initial clock frequencies from the
- * settings passed in
*/
void __init s3c2410_map_io(struct map_desc *mach_desc, int mach_size)
{
- unsigned long tmp;
-
/* register our io-tables */
iotable_init(s3c2410_iodesc, ARRAY_SIZE(s3c2410_iodesc));
iotable_init(mach_desc, mach_size);
+}
+
+void __init s3c2410_init_clocks(int xtal)
+{
+ unsigned long tmp;
/* now we've got our machine bits initialised, work out what
* clocks we've got */
@@ -188,7 +188,7 @@ void __init s3c2410_map_io(struct map_desc *mach_desc, int mach_size)
* console to use them
*/
- s3c2410_init_clocks();
+ s3c24xx_setup_clocks();
}
int __init s3c2410_init(void)
diff --git a/arch/arm/mach-s3c2410/s3c2410.h b/arch/arm/mach-s3c2410/s3c2410.h
index 93f7a27e3cb80c..4d5312a4820965 100644
--- a/arch/arm/mach-s3c2410/s3c2410.h
+++ b/arch/arm/mach-s3c2410/s3c2410.h
@@ -16,6 +16,7 @@
* 17-Oct-2004 BJD Moved board out to cpu
* 04-Jan-2005 BJD Changed uart init
* 10-Jan-2005 BJD Removed timer to cpu.h, moved 2410 specific bits here
+ * 14-Jan-2005 BJD Added s3c2410_init_clocks call
*/
#ifdef CONFIG_CPU_S3C2410
@@ -26,7 +27,10 @@ extern void s3c2410_map_io(struct map_desc *mach_desc, int size);
extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no);
+extern void s3c2410_init_clocks(int xtal);
+
#else
+#define s3c2410_init_clocks NULL
#define s3c2410_init_uarts NULL
#define s3c2410_map_io NULL
#define s3c2410_init NULL
diff --git a/arch/arm/mach-s3c2410/s3c2440.c b/arch/arm/mach-s3c2410/s3c2440.c
index 74cfb2c79f7046..58146b8f65741d 100644
--- a/arch/arm/mach-s3c2410/s3c2440.c
+++ b/arch/arm/mach-s3c2410/s3c2440.c
@@ -1,6 +1,6 @@
/* linux/arch/arm/mach-s3c2410/s3c2440.c
*
- * Copyright (c) 2004 Simtec Electronics
+ * Copyright (c) 2004-2005 Simtec Electronics
* Ben Dooks <ben@simtec.co.uk>
*
* Samsung S3C2440 Mobile CPU support
@@ -16,6 +16,8 @@
* 09-Nov-2004 BJD Added sysdev for power management
* 04-Nov-2004 BJD New serial registration
* 15-Nov-2004 BJD Rename the i2c device for the s3c2440
+ * 14-Jan-2005 BJD Moved clock init code into seperate function
+ * 14-Jan-2005 BJD Removed un-used clock bits
*/
#include <linux/kernel.h>
@@ -48,10 +50,6 @@
#include "cpu.h"
#include "pm.h"
-int s3c2440_clock_tick_rate = 12*1000*1000; /* current timers at 12MHz */
-
-/* clock info */
-unsigned long s3c2440_hdiv;
static struct map_desc s3c2440_iodesc[] __initdata = {
IODESC_ENT(USBHOST),
@@ -155,13 +153,13 @@ void __init s3c2440_init_uarts(struct s3c2410_uartcfg *cfg, int no)
static struct clk s3c2440_clk_cam = {
.name = "camera",
- .enable = s3c2410_clkcon_enable,
+ .enable = s3c24xx_clkcon_enable,
.ctrlbit = S3C2440_CLKCON_CAMERA
};
static struct clk s3c2440_clk_ac97 = {
.name = "ac97",
- .enable = s3c2410_clkcon_enable,
+ .enable = s3c24xx_clkcon_enable,
.ctrlbit = S3C2440_CLKCON_CAMERA
};
@@ -204,13 +202,20 @@ static struct sys_device s3c2440_sysdev = {
void __init s3c2440_map_io(struct map_desc *mach_desc, int size)
{
- unsigned long clkdiv;
- unsigned long camdiv;
-
/* register our io-tables */
iotable_init(s3c2440_iodesc, ARRAY_SIZE(s3c2440_iodesc));
iotable_init(mach_desc, size);
+ /* rename any peripherals used differing from the s3c2410 */
+
+ s3c_device_i2c.name = "s3c2440-i2c";
+}
+
+void __init s3c2440_init_clocks(int xtal)
+{
+ unsigned long clkdiv;
+ unsigned long camdiv;
+ int s3c2440_hdiv = 1;
/* now we've got our machine bits initialised, work out what
* clocks we've got */
@@ -254,22 +259,18 @@ void __init s3c2440_map_io(struct map_desc *mach_desc, int size)
* console to use them, and to add new ones after the initialisation
*/
- s3c2410_init_clocks();
+ s3c24xx_setup_clocks();
/* add s3c2440 specific clocks */
s3c2440_clk_cam.parent = clk_get(NULL, "hclk");
s3c2440_clk_ac97.parent = clk_get(NULL, "pclk");
- s3c2410_register_clock(&s3c2440_clk_ac97);
- s3c2410_register_clock(&s3c2440_clk_cam);
+ s3c24xx_register_clock(&s3c2440_clk_ac97);
+ s3c24xx_register_clock(&s3c2440_clk_cam);
clk_disable(&s3c2440_clk_ac97);
clk_disable(&s3c2440_clk_cam);
-
- /* rename any peripherals used differing from the s3c2410 */
-
- s3c_device_i2c.name = "s3c2440-i2c";
}
int __init s3c2440_init(void)
diff --git a/arch/arm/mach-s3c2410/s3c2440.h b/arch/arm/mach-s3c2410/s3c2440.h
index 760cee377c8892..29cb6df65a481b 100644
--- a/arch/arm/mach-s3c2410/s3c2440.h
+++ b/arch/arm/mach-s3c2410/s3c2440.h
@@ -14,6 +14,7 @@
* 04-Nov-2004 BJD Added s3c2440_init_uarts()
* 04-Jan-2005 BJD Moved uart init to cpu code
* 10-Jan-2005 BJD Moved 2440 specific init here
+ * 14-Jan-2005 BJD Split the clock initialisation code
*/
#ifdef CONFIG_CPU_S3C2440
@@ -24,7 +25,10 @@ extern void s3c2440_map_io(struct map_desc *mach_desc, int size);
extern void s3c2440_init_uarts(struct s3c2410_uartcfg *cfg, int no);
+extern void s3c2440_init_clocks(int xtal);
+
#else
+#define s3c2440_init_clocks NULL
#define s3c2440_init_uarts NULL
#define s3c2440_map_io NULL
#define s3c2440_init NULL
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index 49a57b9f033b70..00bb8fd37a59f1 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -148,7 +148,7 @@ __ioremap(unsigned long phys_addr, size_t size, unsigned long flags,
*/
offset = phys_addr & ~PAGE_MASK;
phys_addr &= PAGE_MASK;
- size = PAGE_ALIGN(last_addr) - phys_addr;
+ size = PAGE_ALIGN(last_addr + 1) - phys_addr;
/*
* Ok, go for it..
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S
index 40b63b945dd497..0aa73d4147838b 100644
--- a/arch/arm/mm/proc-v6.S
+++ b/arch/arm/mm/proc-v6.S
@@ -105,6 +105,7 @@ ENTRY(cpu_v6_dcache_clean_area)
ENTRY(cpu_v6_switch_mm)
mov r2, #0
ldr r1, [r1, #MM_CONTEXT_ID] @ get mm->context.id
+ mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB
mcr p15, 0, r2, c7, c10, 4 @ drain write buffer
mcr p15, 0, r0, c2, c0, 0 @ set TTB 0
mcr p15, 0, r1, c13, c0, 1 @ set context ID
diff --git a/arch/arm/vfp/entry.S b/arch/arm/vfp/entry.S
index e9e583b2bb20c2..e73c8deca592c6 100644
--- a/arch/arm/vfp/entry.S
+++ b/arch/arm/vfp/entry.S
@@ -17,7 +17,7 @@
*/
#include <linux/linkage.h>
#include <linux/init.h>
-#include <asm/thread_info.h>
+#include <asm/constants.h>
#include <asm/vfpmacros.h>
.globl do_vfp