This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / arch / arm / mach-s3c2410 / mach-bast.c
index 7e6257c..f752669 100644 (file)
@@ -18,8 +18,6 @@
  *     05-Sep-2003 BJD  Moved to v2.6 kernel
  *     06-Jan-2003 BJD  Updates for <arch/map.h>
  *     18-Jan-2003 BJD  Added serial port configuration
- *     05-Oct-2004 BJD  Power management code
- *     04-Nov-2004 BJD  Updated serial port clocks
 */
 
 #include <linux/kernel.h>
@@ -35,7 +33,6 @@
 #include <asm/mach/irq.h>
 
 #include <asm/arch/bast-map.h>
-#include <asm/arch/bast-irq.h>
 
 #include <asm/hardware.h>
 #include <asm/io.h>
 
 //#include <asm/debug-ll.h>
 #include <asm/arch/regs-serial.h>
-#include <asm/arch/regs-gpio.h>
-#include <asm/arch/regs-mem.h>
 
 #include "s3c2410.h"
-#include "clock.h"
 #include "devs.h"
 #include "cpu.h"
 #include "usb-simtec.h"
-#include "pm.h"
-
-#define COPYRIGHT ", (c) 2004 Simtec Electronics"
 
 /* macros for virtual address mods for the io space entries */
 #define VA_C5(item) ((item) + BAST_VAM_CS5)
@@ -155,50 +146,35 @@ static struct map_desc bast_iodesc[] __initdata = {
 #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
 #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
 
-static struct s3c24xx_uart_clksrc bast_serial_clocks[] = {
-       [0] = {
-               .name           = "uclk",
-               .divisor        = 1,
-               .min_baud       = 0,
-               .max_baud       = 0,
-       },
-       [1] = {
-               .name           = "pclk",
-               .divisor        = 1,
-               .min_baud       = 0,
-               .max_baud       = 0.
-       }
-};
-
+/* base baud rate for all our UARTs */
+static unsigned long bast_serial_clock = 24*1000*1000;
 
 static struct s3c2410_uartcfg bast_uartcfgs[] = {
        [0] = {
                .hwport      = 0,
                .flags       = 0,
+               .clock       = &bast_serial_clock,
                .ucon        = UCON,
                .ulcon       = ULCON,
                .ufcon       = UFCON,
-               .clocks      = bast_serial_clocks,
-               .clocks_size = ARRAY_SIZE(bast_serial_clocks)
        },
        [1] = {
                .hwport      = 1,
                .flags       = 0,
+
+               .clock       = &bast_serial_clock,
                .ucon        = UCON,
                .ulcon       = ULCON,
                .ufcon       = UFCON,
-               .clocks      = bast_serial_clocks,
-               .clocks_size = ARRAY_SIZE(bast_serial_clocks)
        },
        /* port 2 is not actually used */
        [2] = {
                .hwport      = 2,
                .flags       = 0,
+               .clock       = &bast_serial_clock,
                .ucon        = UCON,
                .ulcon       = ULCON,
                .ufcon       = UFCON,
-               .clocks      = bast_serial_clocks,
-               .clocks_size = ARRAY_SIZE(bast_serial_clocks)
        }
 };
 
@@ -231,39 +207,16 @@ static struct platform_device *bast_devices[] __initdata = {
        &bast_device_nor
 };
 
-static struct clk *bast_clocks[] = {
-       &s3c24xx_dclk0,
-       &s3c24xx_dclk1,
-       &s3c24xx_clkout0,
-       &s3c24xx_clkout1,
-       &s3c24xx_uclk,
-};
-
-static struct s3c24xx_board bast_board __initdata = {
+static struct s3c2410_board bast_board __initdata = {
        .devices       = bast_devices,
-       .devices_count = ARRAY_SIZE(bast_devices),
-       .clocks        = bast_clocks,
-       .clocks_count  = ARRAY_SIZE(bast_clocks)
+       .devices_count = ARRAY_SIZE(bast_devices)
 };
 
 void __init bast_map_io(void)
 {
-       /* initialise the clocks */
-
-       s3c24xx_dclk0.parent = NULL;
-       s3c24xx_dclk0.rate   = 12*1000*1000;
-
-       s3c24xx_dclk1.parent = NULL;
-       s3c24xx_dclk1.rate   = 24*1000*1000;
-
-       s3c24xx_clkout0.parent  = &s3c24xx_dclk0;
-       s3c24xx_clkout1.parent  = &s3c24xx_dclk1;
-
-       s3c24xx_uclk.parent  = &s3c24xx_clkout1;
-
        s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc));
        s3c2410_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs));
-       s3c24xx_set_board(&bast_board);
+       s3c2410_set_board(&bast_board);
        usb_simtec_init();
 }
 
@@ -272,39 +225,16 @@ void __init bast_init_irq(void)
        s3c2410_init_irq();
 }
 
-#ifdef CONFIG_PM
-
-/* bast_init_machine
- *
- * enable the power management functions for the EB2410ITX
-*/
-
-static __init void bast_init_machine(void)
+void __init bast_init_time(void)
 {
-       unsigned long gstatus4;
-
-       printk(KERN_INFO "BAST Power Manangement" COPYRIGHT "\n");
-
-       gstatus4  = (__raw_readl(S3C2410_BANKCON7) & 0x3) << 30;
-       gstatus4 |= (__raw_readl(S3C2410_BANKCON6) & 0x3) << 28;
-       gstatus4 |= (__raw_readl(S3C2410_BANKSIZE) & S3C2410_BANKSIZE_MASK);
-
-       __raw_writel(gstatus4, S3C2410_GSTATUS4);
-
-       s3c2410_pm_init();
+       s3c2410_init_time();
 }
 
-#else
-#define bast_init_machine NULL
-#endif
-
-
 MACHINE_START(BAST, "Simtec-BAST")
      MAINTAINER("Ben Dooks <ben@simtec.co.uk>")
      BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, S3C2410_VA_UART)
      BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100)
      MAPIO(bast_map_io)
      INITIRQ(bast_init_irq)
-       .init_machine   = bast_init_machine,
-     .timer            = &s3c2410_timer,
+     INITTIME(bast_init_time)
 MACHINE_END