Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / arch / arm / mach-s3c2410 / s3c2410.c
index b8270f2..0a2013a 100644 (file)
@@ -17,7 +17,8 @@
  *     21-Aug-2004 BJD  Added new struct s3c2410_board handler
  *     28-Sep-2004 BJD  Updates for new serial port bits
  *     04-Nov-2004 BJD  Updated UART configuration process
- *     10-Jan-2004 BJD  Removed s3c2410_clock_tick_rate
+ *     10-Jan-2005 BJD  Removed s3c2410_clock_tick_rate
+ *     13-Aug-2005 DA   Removed UART from initial I/O mappings
 */
 
 #include <linux/kernel.h>
@@ -26,7 +27,7 @@
 #include <linux/list.h>
 #include <linux/timer.h>
 #include <linux/init.h>
-#include <linux/device.h>
+#include <linux/platform_device.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -49,10 +50,9 @@ static struct map_desc s3c2410_iodesc[] __initdata = {
        IODESC_ENT(USBHOST),
        IODESC_ENT(CLKPWR),
        IODESC_ENT(LCD),
-       IODESC_ENT(UART),
        IODESC_ENT(TIMER),
        IODESC_ENT(ADC),
-       IODESC_ENT(WATCHDOG)
+       IODESC_ENT(WATCHDOG),
 };
 
 static struct resource s3c_uart0_resource[] = {
@@ -125,9 +125,6 @@ static struct platform_device *uart_devices[] __initdata = {
        &s3c_uart2
 };
 
-/* store our uart devices for the serial driver console */
-struct platform_device *s3c2410_uart_devices[3];
-
 static int s3c2410_uart_count = 0;
 
 /* uart registration process */
@@ -164,31 +161,32 @@ void __init s3c2410_map_io(struct map_desc *mach_desc, int mach_size)
 void __init s3c2410_init_clocks(int xtal)
 {
        unsigned long tmp;
+       unsigned long fclk;
+       unsigned long hclk;
+       unsigned long pclk;
 
        /* now we've got our machine bits initialised, work out what
         * clocks we've got */
 
-       s3c24xx_fclk = s3c2410_get_pll(__raw_readl(S3C2410_MPLLCON),
-                                      s3c24xx_xtal);
+       fclk = s3c2410_get_pll(__raw_readl(S3C2410_MPLLCON), xtal);
 
        tmp = __raw_readl(S3C2410_CLKDIVN);
 
        /* work out clock scalings */
 
-       s3c24xx_hclk = s3c24xx_fclk / ((tmp & S3C2410_CLKDIVN_HDIVN) ? 2 : 1);
-       s3c24xx_pclk = s3c24xx_hclk / ((tmp & S3C2410_CLKDIVN_PDIVN) ? 2 : 1);
+       hclk = fclk / ((tmp & S3C2410_CLKDIVN_HDIVN) ? 2 : 1);
+       pclk = hclk / ((tmp & S3C2410_CLKDIVN_PDIVN) ? 2 : 1);
 
        /* print brieft summary of clocks, etc */
 
        printk("S3C2410: core %ld.%03ld MHz, memory %ld.%03ld MHz, peripheral %ld.%03ld MHz\n",
-              print_mhz(s3c24xx_fclk), print_mhz(s3c24xx_hclk),
-              print_mhz(s3c24xx_pclk));
+              print_mhz(fclk), print_mhz(hclk), print_mhz(pclk));
 
        /* initialise the clocks here, to allow other things like the
         * console to use them
         */
 
-       s3c24xx_setup_clocks();
+       s3c24xx_setup_clocks(xtal, fclk, hclk, pclk);
 }
 
 int __init s3c2410_init(void)