diff options
Diffstat (limited to 'arch/arm/mach-s3c2410/include/mach')
-rw-r--r-- | arch/arm/mach-s3c2410/include/mach/pm-core.h | 64 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/include/mach/regs-gpio.h | 10 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/include/mach/timex.h | 24 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/include/mach/vmalloc.h | 20 |
4 files changed, 113 insertions, 5 deletions
diff --git a/arch/arm/mach-s3c2410/include/mach/pm-core.h b/arch/arm/mach-s3c2410/include/mach/pm-core.h new file mode 100644 index 00000000000..70a83b209e2 --- /dev/null +++ b/arch/arm/mach-s3c2410/include/mach/pm-core.h | |||
@@ -0,0 +1,64 @@ | |||
1 | /* linux/arch/arm/mach-s3c2410/include/pm-core.h | ||
2 | * | ||
3 | * Copyright 2008 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * | ||
7 | * S3C24xx - PM core support for arch/arm/plat-s3c/pm.c | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | static inline void s3c_pm_debug_init_uart(void) | ||
15 | { | ||
16 | unsigned long tmp = __raw_readl(S3C2410_CLKCON); | ||
17 | |||
18 | /* re-start uart clocks */ | ||
19 | tmp |= S3C2410_CLKCON_UART0; | ||
20 | tmp |= S3C2410_CLKCON_UART1; | ||
21 | tmp |= S3C2410_CLKCON_UART2; | ||
22 | |||
23 | __raw_writel(tmp, S3C2410_CLKCON); | ||
24 | udelay(10); | ||
25 | } | ||
26 | |||
27 | static inline void s3c_pm_arch_prepare_irqs(void) | ||
28 | { | ||
29 | __raw_writel(s3c_irqwake_intmask, S3C2410_INTMSK); | ||
30 | __raw_writel(s3c_irqwake_eintmask, S3C2410_EINTMASK); | ||
31 | |||
32 | /* ack any outstanding external interrupts before we go to sleep */ | ||
33 | |||
34 | __raw_writel(__raw_readl(S3C2410_EINTPEND), S3C2410_EINTPEND); | ||
35 | __raw_writel(__raw_readl(S3C2410_INTPND), S3C2410_INTPND); | ||
36 | __raw_writel(__raw_readl(S3C2410_SRCPND), S3C2410_SRCPND); | ||
37 | |||
38 | } | ||
39 | |||
40 | static inline void s3c_pm_arch_stop_clocks(void) | ||
41 | { | ||
42 | __raw_writel(0x00, S3C2410_CLKCON); /* turn off clocks over sleep */ | ||
43 | } | ||
44 | |||
45 | static void s3c_pm_show_resume_irqs(int start, unsigned long which, | ||
46 | unsigned long mask); | ||
47 | |||
48 | static inline void s3c_pm_arch_show_resume_irqs(void) | ||
49 | { | ||
50 | S3C_PMDBG("post sleep: IRQs 0x%08x, 0x%08x\n", | ||
51 | __raw_readl(S3C2410_SRCPND), | ||
52 | __raw_readl(S3C2410_EINTPEND)); | ||
53 | |||
54 | s3c_pm_show_resume_irqs(IRQ_EINT0, __raw_readl(S3C2410_SRCPND), | ||
55 | s3c_irqwake_intmask); | ||
56 | |||
57 | s3c_pm_show_resume_irqs(IRQ_EINT4-4, __raw_readl(S3C2410_EINTPEND), | ||
58 | s3c_irqwake_eintmask); | ||
59 | } | ||
60 | |||
61 | static inline void s3c_pm_arch_update_uart(void __iomem *regs, | ||
62 | struct pm_uart_save *save) | ||
63 | { | ||
64 | } | ||
diff --git a/arch/arm/mach-s3c2410/include/mach/regs-gpio.h b/arch/arm/mach-s3c2410/include/mach/regs-gpio.h index ebc85c6dadb..fd672f330bf 100644 --- a/arch/arm/mach-s3c2410/include/mach/regs-gpio.h +++ b/arch/arm/mach-s3c2410/include/mach/regs-gpio.h | |||
@@ -406,31 +406,31 @@ | |||
406 | #define S3C2443_GPE5_SD1_CLK (0x02 << 10) | 406 | #define S3C2443_GPE5_SD1_CLK (0x02 << 10) |
407 | #define S3C2400_GPE5_EINT5 (0x02 << 10) | 407 | #define S3C2400_GPE5_EINT5 (0x02 << 10) |
408 | #define S3C2400_GPE5_TCLK1 (0x03 << 10) | 408 | #define S3C2400_GPE5_TCLK1 (0x03 << 10) |
409 | #define S3C2443_GPE5_AC_BITCLK (0x03 << 10) | ||
409 | 410 | ||
410 | #define S3C2410_GPE6_SDCMD (0x02 << 12) | 411 | #define S3C2410_GPE6_SDCMD (0x02 << 12) |
411 | #define S3C2443_GPE6_SD1_CMD (0x02 << 12) | 412 | #define S3C2443_GPE6_SD1_CMD (0x02 << 12) |
412 | #define S3C2443_GPE6_AC_BITCLK (0x03 << 12) | 413 | #define S3C2443_GPE6_AC_SDI (0x03 << 12) |
413 | #define S3C2400_GPE6_EINT6 (0x02 << 12) | 414 | #define S3C2400_GPE6_EINT6 (0x02 << 12) |
414 | 415 | ||
415 | #define S3C2410_GPE7_SDDAT0 (0x02 << 14) | 416 | #define S3C2410_GPE7_SDDAT0 (0x02 << 14) |
416 | #define S3C2443_GPE5_SD1_DAT0 (0x02 << 14) | 417 | #define S3C2443_GPE5_SD1_DAT0 (0x02 << 14) |
417 | #define S3C2443_GPE7_AC_SDI (0x03 << 14) | 418 | #define S3C2443_GPE7_AC_SDO (0x03 << 14) |
418 | #define S3C2400_GPE7_EINT7 (0x02 << 14) | 419 | #define S3C2400_GPE7_EINT7 (0x02 << 14) |
419 | 420 | ||
420 | #define S3C2410_GPE8_SDDAT1 (0x02 << 16) | 421 | #define S3C2410_GPE8_SDDAT1 (0x02 << 16) |
421 | #define S3C2443_GPE8_SD1_DAT1 (0x02 << 16) | 422 | #define S3C2443_GPE8_SD1_DAT1 (0x02 << 16) |
422 | #define S3C2443_GPE8_AC_SDO (0x03 << 16) | 423 | #define S3C2443_GPE8_AC_SYNC (0x03 << 16) |
423 | #define S3C2400_GPE8_nXDACK0 (0x02 << 16) | 424 | #define S3C2400_GPE8_nXDACK0 (0x02 << 16) |
424 | 425 | ||
425 | #define S3C2410_GPE9_SDDAT2 (0x02 << 18) | 426 | #define S3C2410_GPE9_SDDAT2 (0x02 << 18) |
426 | #define S3C2443_GPE9_SD1_DAT2 (0x02 << 18) | 427 | #define S3C2443_GPE9_SD1_DAT2 (0x02 << 18) |
427 | #define S3C2443_GPE9_AC_SYNC (0x03 << 18) | 428 | #define S3C2443_GPE9_AC_nRESET (0x03 << 18) |
428 | #define S3C2400_GPE9_nXDACK1 (0x02 << 18) | 429 | #define S3C2400_GPE9_nXDACK1 (0x02 << 18) |
429 | #define S3C2400_GPE9_nXBACK (0x03 << 18) | 430 | #define S3C2400_GPE9_nXBACK (0x03 << 18) |
430 | 431 | ||
431 | #define S3C2410_GPE10_SDDAT3 (0x02 << 20) | 432 | #define S3C2410_GPE10_SDDAT3 (0x02 << 20) |
432 | #define S3C2443_GPE10_SD1_DAT3 (0x02 << 20) | 433 | #define S3C2443_GPE10_SD1_DAT3 (0x02 << 20) |
433 | #define S3C2443_GPE10_AC_nRESET (0x03 << 20) | ||
434 | #define S3C2400_GPE10_nXDREQ0 (0x02 << 20) | 434 | #define S3C2400_GPE10_nXDREQ0 (0x02 << 20) |
435 | 435 | ||
436 | #define S3C2410_GPE11_SPIMISO0 (0x02 << 22) | 436 | #define S3C2410_GPE11_SPIMISO0 (0x02 << 22) |
diff --git a/arch/arm/mach-s3c2410/include/mach/timex.h b/arch/arm/mach-s3c2410/include/mach/timex.h new file mode 100644 index 00000000000..fe9ca1ffd51 --- /dev/null +++ b/arch/arm/mach-s3c2410/include/mach/timex.h | |||
@@ -0,0 +1,24 @@ | |||
1 | /* arch/arm/mach-s3c2410/include/mach/timex.h | ||
2 | * | ||
3 | * Copyright (c) 2003-2005 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * S3C2410 - time parameters | ||
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 | |||
13 | #ifndef __ASM_ARCH_TIMEX_H | ||
14 | #define __ASM_ARCH_TIMEX_H | ||
15 | |||
16 | /* CLOCK_TICK_RATE needs to be evaluatable by the cpp, so making it | ||
17 | * a variable is useless. It seems as long as we make our timers an | ||
18 | * exact multiple of HZ, any value that makes a 1->1 correspondence | ||
19 | * for the time conversion functions to/from jiffies is acceptable. | ||
20 | */ | ||
21 | |||
22 | #define CLOCK_TICK_RATE 12000000 | ||
23 | |||
24 | #endif /* __ASM_ARCH_TIMEX_H */ | ||
diff --git a/arch/arm/mach-s3c2410/include/mach/vmalloc.h b/arch/arm/mach-s3c2410/include/mach/vmalloc.h new file mode 100644 index 00000000000..315b0078a34 --- /dev/null +++ b/arch/arm/mach-s3c2410/include/mach/vmalloc.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* arch/arm/mach-s3c2410/include/mach/vmalloc.h | ||
2 | * | ||
3 | * from arch/arm/mach-iop3xx/include/mach/vmalloc.h | ||
4 | * | ||
5 | * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk> | ||
6 | * http://www.simtec.co.uk/products/SWLINUX/ | ||
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 | * S3C2410 vmalloc definition | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASM_ARCH_VMALLOC_H | ||
16 | #define __ASM_ARCH_VMALLOC_H | ||
17 | |||
18 | #define VMALLOC_END (0xE0000000) | ||
19 | |||
20 | #endif /* __ASM_ARCH_VMALLOC_H */ | ||