aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-s3c2410/mach-h1940.c29
-rw-r--r--arch/arm/mach-s3c2410/s3c2400.h31
2 files changed, 58 insertions, 2 deletions
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c
index 1c316f14ed94..646a3a5d33a5 100644
--- a/arch/arm/mach-s3c2410/mach-h1940.c
+++ b/arch/arm/mach-s3c2410/mach-h1940.c
@@ -46,10 +46,11 @@
46#include <asm/irq.h> 46#include <asm/irq.h>
47#include <asm/mach-types.h> 47#include <asm/mach-types.h>
48 48
49//#include <asm/debug-ll.h> 49
50#include <asm/arch/regs-serial.h> 50#include <asm/arch/regs-serial.h>
51#include <asm/arch/regs-lcd.h> 51#include <asm/arch/regs-lcd.h>
52 52
53#include <asm/arch/h1940-latch.h>
53#include <asm/arch/fb.h> 54#include <asm/arch/fb.h>
54 55
55#include <linux/serial_core.h> 56#include <linux/serial_core.h>
@@ -59,7 +60,12 @@
59#include "cpu.h" 60#include "cpu.h"
60 61
61static struct map_desc h1940_iodesc[] __initdata = { 62static struct map_desc h1940_iodesc[] __initdata = {
62 /* nothing here yet */ 63 [0] = {
64 .virtual = (unsigned long)H1940_LATCH,
65 .pfn = __phys_to_pfn(H1940_PA_LATCH),
66 .length = SZ_16K,
67 .type = MT_DEVICE
68 },
63}; 69};
64 70
65#define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK 71#define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK
@@ -92,6 +98,25 @@ static struct s3c2410_uartcfg h1940_uartcfgs[] = {
92 } 98 }
93}; 99};
94 100
101/* Board control latch control */
102
103static unsigned int latch_state = H1940_LATCH_DEFAULT;
104
105void h1940_latch_control(unsigned int clear, unsigned int set)
106{
107 unsigned long flags;
108
109 local_irq_save(flags);
110
111 latch_state &= ~clear;
112 latch_state |= set;
113
114 __raw_writel(latch_state, H1940_LATCH);
115
116 local_irq_restore(flags);
117}
118
119EXPORT_SYMBOL_GPL(h1940_latch_control);
95 120
96 121
97/** 122/**
diff --git a/arch/arm/mach-s3c2410/s3c2400.h b/arch/arm/mach-s3c2410/s3c2400.h
new file mode 100644
index 000000000000..8b2394e1ed40
--- /dev/null
+++ b/arch/arm/mach-s3c2410/s3c2400.h
@@ -0,0 +1,31 @@
1/* arch/arm/mach-s3c2410/s3c2400.h
2 *
3 * Copyright (c) 2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Header file for S3C2400 cpu support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 * Modifications:
13 * 09-Fev-2006 LCVR First version, based on s3c2410.h
14*/
15
16#ifdef CONFIG_CPU_S3C2400
17
18extern int s3c2400_init(void);
19
20extern void s3c2400_map_io(struct map_desc *mach_desc, int size);
21
22extern void s3c2400_init_uarts(struct s3c2410_uartcfg *cfg, int no);
23
24extern void s3c2400_init_clocks(int xtal);
25
26#else
27#define s3c2400_init_clocks NULL
28#define s3c2400_init_uarts NULL
29#define s3c2400_map_io NULL
30#define s3c2400_init NULL
31#endif