diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-19 16:18:39 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-19 16:18:39 -0500 |
commit | 59b8175c771040afcd4ad67022b0cc80c216b866 (patch) | |
tree | 4ef5935bee1e342716d49b9d4b99e3fa835526e6 /include/asm-arm/plat-s3c24xx | |
parent | 920841d8d1d61bc12b43f95a579a5374f6d98f81 (diff) | |
parent | 3b0eb4a195a124567cd0dd6f700f8388def542c6 (diff) |
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (117 commits)
[ARM] 4058/2: iop32x: set ->broken_parity_status on n2100 onboard r8169 ports
[ARM] 4140/1: AACI stability add ac97 timeout and retries
[ARM] 4139/1: AACI record support
[ARM] 4138/1: AACI: multiple channel support for IRQ handling
[ARM] 4211/1: Provide a defconfig for ns9xxx
[ARM] 4210/1: base for new machine type "NetSilicon NS9360"
[ARM] 4222/1: S3C2443: Remove reference to missing S3C2443_PM
[ARM] 4221/1: S3C2443: DMA support
[ARM] 4220/1: S3C24XX: DMA system initialised from sysdev
[ARM] 4219/1: S3C2443: DMA source definitions
[ARM] 4218/1: S3C2412: fix CONFIG_CPU_S3C2412_ONLY wrt to S3C2443
[ARM] 4217/1: S3C24XX: remove the dma channel show at startup
[ARM] 4090/2: avoid clash between PXA and SA1111 defines
[ARM] 4216/1: add .gitignore entries for ARM specific files
[ARM] 4214/2: S3C2410: Add Armzone QT2410
[ARM] 4215/1: s3c2410 usb device: per-platform vbus_draw
[ARM] 4213/1: S3C2410 - Update definition of ADCTSC_XY_PST
[ARM] 4098/1: ARM: rtc_lock only used with rtc_cmos
[ARM] 4137/1: Add kexec support
[ARM] 4201/1: SMP barriers pair needed for the secondary boot process
...
Fix up conflict due to typedef removal in sound/arm/aaci.h
Diffstat (limited to 'include/asm-arm/plat-s3c24xx')
-rw-r--r-- | include/asm-arm/plat-s3c24xx/clock.h | 63 | ||||
-rw-r--r-- | include/asm-arm/plat-s3c24xx/common-smdk.h | 15 | ||||
-rw-r--r-- | include/asm-arm/plat-s3c24xx/cpu.h | 70 | ||||
-rw-r--r-- | include/asm-arm/plat-s3c24xx/devs.h | 51 | ||||
-rw-r--r-- | include/asm-arm/plat-s3c24xx/dma.h | 77 | ||||
-rw-r--r-- | include/asm-arm/plat-s3c24xx/irq.h | 107 | ||||
-rw-r--r-- | include/asm-arm/plat-s3c24xx/pm.h | 73 | ||||
-rw-r--r-- | include/asm-arm/plat-s3c24xx/s3c2400.h | 31 | ||||
-rw-r--r-- | include/asm-arm/plat-s3c24xx/s3c2410.h | 31 | ||||
-rw-r--r-- | include/asm-arm/plat-s3c24xx/s3c2412.h | 29 | ||||
-rw-r--r-- | include/asm-arm/plat-s3c24xx/s3c2440.h | 17 | ||||
-rw-r--r-- | include/asm-arm/plat-s3c24xx/s3c2442.h | 17 | ||||
-rw-r--r-- | include/asm-arm/plat-s3c24xx/s3c2443.h | 32 |
13 files changed, 613 insertions, 0 deletions
diff --git a/include/asm-arm/plat-s3c24xx/clock.h b/include/asm-arm/plat-s3c24xx/clock.h new file mode 100644 index 000000000000..f6135dbb9fa9 --- /dev/null +++ b/include/asm-arm/plat-s3c24xx/clock.h | |||
@@ -0,0 +1,63 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/clock.h | ||
2 | * linux/arch/arm/mach-s3c2410/clock.h | ||
3 | * | ||
4 | * Copyright (c) 2004-2005 Simtec Electronics | ||
5 | * http://www.simtec.co.uk/products/SWLINUX/ | ||
6 | * Written by Ben Dooks, <ben@simtec.co.uk> | ||
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 | struct clk { | ||
14 | struct list_head list; | ||
15 | struct module *owner; | ||
16 | struct clk *parent; | ||
17 | const char *name; | ||
18 | int id; | ||
19 | int usage; | ||
20 | unsigned long rate; | ||
21 | unsigned long ctrlbit; | ||
22 | |||
23 | int (*enable)(struct clk *, int enable); | ||
24 | int (*set_rate)(struct clk *c, unsigned long rate); | ||
25 | unsigned long (*get_rate)(struct clk *c); | ||
26 | unsigned long (*round_rate)(struct clk *c, unsigned long rate); | ||
27 | int (*set_parent)(struct clk *c, struct clk *parent); | ||
28 | }; | ||
29 | |||
30 | /* other clocks which may be registered by board support */ | ||
31 | |||
32 | extern struct clk s3c24xx_dclk0; | ||
33 | extern struct clk s3c24xx_dclk1; | ||
34 | extern struct clk s3c24xx_clkout0; | ||
35 | extern struct clk s3c24xx_clkout1; | ||
36 | extern struct clk s3c24xx_uclk; | ||
37 | |||
38 | extern struct clk clk_usb_bus; | ||
39 | |||
40 | /* core clock support */ | ||
41 | |||
42 | extern struct clk clk_f; | ||
43 | extern struct clk clk_h; | ||
44 | extern struct clk clk_p; | ||
45 | extern struct clk clk_mpll; | ||
46 | extern struct clk clk_upll; | ||
47 | extern struct clk clk_xtal; | ||
48 | |||
49 | /* exports for arch/arm/mach-s3c2410 | ||
50 | * | ||
51 | * Please DO NOT use these outside of arch/arm/mach-s3c2410 | ||
52 | */ | ||
53 | |||
54 | extern struct mutex clocks_mutex; | ||
55 | |||
56 | extern int s3c2410_clkcon_enable(struct clk *clk, int enable); | ||
57 | |||
58 | extern int s3c24xx_register_clock(struct clk *clk); | ||
59 | |||
60 | extern int s3c24xx_setup_clocks(unsigned long xtal, | ||
61 | unsigned long fclk, | ||
62 | unsigned long hclk, | ||
63 | unsigned long pclk); | ||
diff --git a/include/asm-arm/plat-s3c24xx/common-smdk.h b/include/asm-arm/plat-s3c24xx/common-smdk.h new file mode 100644 index 000000000000..58d9094c935c --- /dev/null +++ b/include/asm-arm/plat-s3c24xx/common-smdk.h | |||
@@ -0,0 +1,15 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/common-smdk.h | ||
2 | * | ||
3 | * Copyright (c) 2006 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * Common code for SMDK2410 and SMDK2440 boards | ||
7 | * | ||
8 | * http://www.fluff.org/ben/smdk2440/ | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | extern void smdk_machine_init(void); | ||
diff --git a/include/asm-arm/plat-s3c24xx/cpu.h b/include/asm-arm/plat-s3c24xx/cpu.h new file mode 100644 index 000000000000..15dd18810905 --- /dev/null +++ b/include/asm-arm/plat-s3c24xx/cpu.h | |||
@@ -0,0 +1,70 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/cpu.h | ||
2 | * | ||
3 | * Copyright (c) 2004-2005 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * Header file for S3C24XX 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 | |||
13 | /* todo - fix when rmk changes iodescs to use `void __iomem *` */ | ||
14 | |||
15 | #define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE } | ||
16 | |||
17 | #ifndef MHZ | ||
18 | #define MHZ (1000*1000) | ||
19 | #endif | ||
20 | |||
21 | #define print_mhz(m) ((m) / MHZ), ((m / 1000) % 1000) | ||
22 | |||
23 | /* forward declaration */ | ||
24 | struct s3c24xx_uart_resources; | ||
25 | struct platform_device; | ||
26 | struct s3c2410_uartcfg; | ||
27 | struct map_desc; | ||
28 | |||
29 | /* core initialisation functions */ | ||
30 | |||
31 | extern void s3c24xx_init_irq(void); | ||
32 | |||
33 | extern void s3c24xx_init_io(struct map_desc *mach_desc, int size); | ||
34 | |||
35 | extern void s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
36 | |||
37 | extern void s3c24xx_init_clocks(int xtal); | ||
38 | |||
39 | extern void s3c24xx_init_uartdevs(char *name, | ||
40 | struct s3c24xx_uart_resources *res, | ||
41 | struct s3c2410_uartcfg *cfg, int no); | ||
42 | |||
43 | /* the board structure is used at first initialsation time | ||
44 | * to get info such as the devices to register for this | ||
45 | * board. This is done because platfrom_add_devices() cannot | ||
46 | * be called from the map_io entry. | ||
47 | */ | ||
48 | |||
49 | struct s3c24xx_board { | ||
50 | struct platform_device **devices; | ||
51 | unsigned int devices_count; | ||
52 | |||
53 | struct clk **clocks; | ||
54 | unsigned int clocks_count; | ||
55 | }; | ||
56 | |||
57 | extern void s3c24xx_set_board(struct s3c24xx_board *board); | ||
58 | |||
59 | /* timer for 2410/2440 */ | ||
60 | |||
61 | struct sys_timer; | ||
62 | extern struct sys_timer s3c24xx_timer; | ||
63 | |||
64 | /* system device classes */ | ||
65 | |||
66 | extern struct sysdev_class s3c2410_sysclass; | ||
67 | extern struct sysdev_class s3c2412_sysclass; | ||
68 | extern struct sysdev_class s3c2440_sysclass; | ||
69 | extern struct sysdev_class s3c2442_sysclass; | ||
70 | extern struct sysdev_class s3c2443_sysclass; | ||
diff --git a/include/asm-arm/plat-s3c24xx/devs.h b/include/asm-arm/plat-s3c24xx/devs.h new file mode 100644 index 000000000000..dddf485fc067 --- /dev/null +++ b/include/asm-arm/plat-s3c24xx/devs.h | |||
@@ -0,0 +1,51 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/devs.h | ||
2 | * | ||
3 | * Copyright (c) 2004 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * Header file for s3c2410 standard platform devices | ||
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 | #include <linux/platform_device.h> | ||
13 | |||
14 | struct s3c24xx_uart_resources { | ||
15 | struct resource *resources; | ||
16 | unsigned long nr_resources; | ||
17 | }; | ||
18 | |||
19 | extern struct s3c24xx_uart_resources s3c2410_uart_resources[]; | ||
20 | |||
21 | extern struct platform_device *s3c24xx_uart_devs[]; | ||
22 | extern struct platform_device *s3c24xx_uart_src[]; | ||
23 | |||
24 | extern struct platform_device s3c_device_usb; | ||
25 | extern struct platform_device s3c_device_lcd; | ||
26 | extern struct platform_device s3c_device_wdt; | ||
27 | extern struct platform_device s3c_device_i2c; | ||
28 | extern struct platform_device s3c_device_iis; | ||
29 | extern struct platform_device s3c_device_rtc; | ||
30 | extern struct platform_device s3c_device_adc; | ||
31 | extern struct platform_device s3c_device_sdi; | ||
32 | |||
33 | extern struct platform_device s3c_device_spi0; | ||
34 | extern struct platform_device s3c_device_spi1; | ||
35 | |||
36 | extern struct platform_device s3c_device_nand; | ||
37 | |||
38 | extern struct platform_device s3c_device_timer0; | ||
39 | extern struct platform_device s3c_device_timer1; | ||
40 | extern struct platform_device s3c_device_timer2; | ||
41 | extern struct platform_device s3c_device_timer3; | ||
42 | |||
43 | extern struct platform_device s3c_device_usbgadget; | ||
44 | |||
45 | /* s3c2440 specific devices */ | ||
46 | |||
47 | #ifdef CONFIG_CPU_S3C2440 | ||
48 | |||
49 | extern struct platform_device s3c_device_camif; | ||
50 | |||
51 | #endif | ||
diff --git a/include/asm-arm/plat-s3c24xx/dma.h b/include/asm-arm/plat-s3c24xx/dma.h new file mode 100644 index 000000000000..2c59406435e5 --- /dev/null +++ b/include/asm-arm/plat-s3c24xx/dma.h | |||
@@ -0,0 +1,77 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/dma.h | ||
2 | * | ||
3 | * Copyright (C) 2006 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * Samsung S3C24XX DMA 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 | |||
13 | extern struct sysdev_class dma_sysclass; | ||
14 | extern struct s3c2410_dma_chan s3c2410_chans[S3C2410_DMA_CHANNELS]; | ||
15 | |||
16 | #define DMA_CH_VALID (1<<31) | ||
17 | #define DMA_CH_NEVER (1<<30) | ||
18 | |||
19 | struct s3c24xx_dma_addr { | ||
20 | unsigned long from; | ||
21 | unsigned long to; | ||
22 | }; | ||
23 | |||
24 | /* struct s3c24xx_dma_map | ||
25 | * | ||
26 | * this holds the mapping information for the channel selected | ||
27 | * to be connected to the specified device | ||
28 | */ | ||
29 | |||
30 | struct s3c24xx_dma_map { | ||
31 | const char *name; | ||
32 | struct s3c24xx_dma_addr hw_addr; | ||
33 | |||
34 | unsigned long channels[S3C2410_DMA_CHANNELS]; | ||
35 | }; | ||
36 | |||
37 | struct s3c24xx_dma_selection { | ||
38 | struct s3c24xx_dma_map *map; | ||
39 | unsigned long map_size; | ||
40 | unsigned long dcon_mask; | ||
41 | |||
42 | void (*select)(struct s3c2410_dma_chan *chan, | ||
43 | struct s3c24xx_dma_map *map); | ||
44 | }; | ||
45 | |||
46 | extern int s3c24xx_dma_init_map(struct s3c24xx_dma_selection *sel); | ||
47 | |||
48 | /* struct s3c24xx_dma_order_ch | ||
49 | * | ||
50 | * channel map for one of the `enum dma_ch` dma channels. the list | ||
51 | * entry contains a set of low-level channel numbers, orred with | ||
52 | * DMA_CH_VALID, which are checked in the order in the array. | ||
53 | */ | ||
54 | |||
55 | struct s3c24xx_dma_order_ch { | ||
56 | unsigned int list[S3C2410_DMA_CHANNELS]; /* list of channels */ | ||
57 | unsigned int flags; /* flags */ | ||
58 | }; | ||
59 | |||
60 | /* struct s3c24xx_dma_order | ||
61 | * | ||
62 | * information provided by either the core or the board to give the | ||
63 | * dma system a hint on how to allocate channels | ||
64 | */ | ||
65 | |||
66 | struct s3c24xx_dma_order { | ||
67 | struct s3c24xx_dma_order_ch channels[DMACH_MAX]; | ||
68 | }; | ||
69 | |||
70 | extern int s3c24xx_dma_order_set(struct s3c24xx_dma_order *map); | ||
71 | |||
72 | /* DMA init code, called from the cpu support code */ | ||
73 | |||
74 | extern int s3c2410_dma_init(void); | ||
75 | |||
76 | extern int s3c24xx_dma_init(unsigned int channels, unsigned int irq, | ||
77 | unsigned int stride); | ||
diff --git a/include/asm-arm/plat-s3c24xx/irq.h b/include/asm-arm/plat-s3c24xx/irq.h new file mode 100644 index 000000000000..8af6d9579b31 --- /dev/null +++ b/include/asm-arm/plat-s3c24xx/irq.h | |||
@@ -0,0 +1,107 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/irq.h | ||
2 | * | ||
3 | * Copyright (c) 2004-2005 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * Header file for S3C24XX CPU IRQ 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 | |||
13 | #define irqdbf(x...) | ||
14 | #define irqdbf2(x...) | ||
15 | |||
16 | #define EXTINT_OFF (IRQ_EINT4 - 4) | ||
17 | |||
18 | extern struct irq_chip s3c_irq_level_chip; | ||
19 | |||
20 | static inline void | ||
21 | s3c_irqsub_mask(unsigned int irqno, unsigned int parentbit, | ||
22 | int subcheck) | ||
23 | { | ||
24 | unsigned long mask; | ||
25 | unsigned long submask; | ||
26 | |||
27 | submask = __raw_readl(S3C2410_INTSUBMSK); | ||
28 | mask = __raw_readl(S3C2410_INTMSK); | ||
29 | |||
30 | submask |= (1UL << (irqno - IRQ_S3CUART_RX0)); | ||
31 | |||
32 | /* check to see if we need to mask the parent IRQ */ | ||
33 | |||
34 | if ((submask & subcheck) == subcheck) { | ||
35 | __raw_writel(mask | parentbit, S3C2410_INTMSK); | ||
36 | } | ||
37 | |||
38 | /* write back masks */ | ||
39 | __raw_writel(submask, S3C2410_INTSUBMSK); | ||
40 | |||
41 | } | ||
42 | |||
43 | static inline void | ||
44 | s3c_irqsub_unmask(unsigned int irqno, unsigned int parentbit) | ||
45 | { | ||
46 | unsigned long mask; | ||
47 | unsigned long submask; | ||
48 | |||
49 | submask = __raw_readl(S3C2410_INTSUBMSK); | ||
50 | mask = __raw_readl(S3C2410_INTMSK); | ||
51 | |||
52 | submask &= ~(1UL << (irqno - IRQ_S3CUART_RX0)); | ||
53 | mask &= ~parentbit; | ||
54 | |||
55 | /* write back masks */ | ||
56 | __raw_writel(submask, S3C2410_INTSUBMSK); | ||
57 | __raw_writel(mask, S3C2410_INTMSK); | ||
58 | } | ||
59 | |||
60 | |||
61 | static inline void | ||
62 | s3c_irqsub_maskack(unsigned int irqno, unsigned int parentmask, unsigned int group) | ||
63 | { | ||
64 | unsigned int bit = 1UL << (irqno - IRQ_S3CUART_RX0); | ||
65 | |||
66 | s3c_irqsub_mask(irqno, parentmask, group); | ||
67 | |||
68 | __raw_writel(bit, S3C2410_SUBSRCPND); | ||
69 | |||
70 | /* only ack parent if we've got all the irqs (seems we must | ||
71 | * ack, all and hope that the irq system retriggers ok when | ||
72 | * the interrupt goes off again) | ||
73 | */ | ||
74 | |||
75 | if (1) { | ||
76 | __raw_writel(parentmask, S3C2410_SRCPND); | ||
77 | __raw_writel(parentmask, S3C2410_INTPND); | ||
78 | } | ||
79 | } | ||
80 | |||
81 | static inline void | ||
82 | s3c_irqsub_ack(unsigned int irqno, unsigned int parentmask, unsigned int group) | ||
83 | { | ||
84 | unsigned int bit = 1UL << (irqno - IRQ_S3CUART_RX0); | ||
85 | |||
86 | __raw_writel(bit, S3C2410_SUBSRCPND); | ||
87 | |||
88 | /* only ack parent if we've got all the irqs (seems we must | ||
89 | * ack, all and hope that the irq system retriggers ok when | ||
90 | * the interrupt goes off again) | ||
91 | */ | ||
92 | |||
93 | if (1) { | ||
94 | __raw_writel(parentmask, S3C2410_SRCPND); | ||
95 | __raw_writel(parentmask, S3C2410_INTPND); | ||
96 | } | ||
97 | } | ||
98 | |||
99 | /* exported for use in arch/arm/mach-s3c2410 */ | ||
100 | |||
101 | #ifdef CONFIG_PM | ||
102 | extern int s3c_irq_wake(unsigned int irqno, unsigned int state); | ||
103 | #else | ||
104 | #define s3c_irq_wake NULL | ||
105 | #endif | ||
106 | |||
107 | extern int s3c_irqext_type(unsigned int irq, unsigned int type); | ||
diff --git a/include/asm-arm/plat-s3c24xx/pm.h b/include/asm-arm/plat-s3c24xx/pm.h new file mode 100644 index 000000000000..cc623667e48a --- /dev/null +++ b/include/asm-arm/plat-s3c24xx/pm.h | |||
@@ -0,0 +1,73 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/pm.h | ||
2 | * | ||
3 | * Copyright (c) 2004 Simtec Electronics | ||
4 | * Written by Ben Dooks, <ben@simtec.co.uk> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | /* s3c2410_pm_init | ||
12 | * | ||
13 | * called from board at initialisation time to setup the power | ||
14 | * management | ||
15 | */ | ||
16 | |||
17 | #ifdef CONFIG_PM | ||
18 | |||
19 | extern __init int s3c2410_pm_init(void); | ||
20 | |||
21 | #else | ||
22 | |||
23 | static inline int s3c2410_pm_init(void) | ||
24 | { | ||
25 | return 0; | ||
26 | } | ||
27 | #endif | ||
28 | |||
29 | /* configuration for the IRQ mask over sleep */ | ||
30 | extern unsigned long s3c_irqwake_intmask; | ||
31 | extern unsigned long s3c_irqwake_eintmask; | ||
32 | |||
33 | /* IRQ masks for IRQs allowed to go to sleep (see irq.c) */ | ||
34 | extern unsigned long s3c_irqwake_intallow; | ||
35 | extern unsigned long s3c_irqwake_eintallow; | ||
36 | |||
37 | /* per-cpu sleep functions */ | ||
38 | |||
39 | extern void (*pm_cpu_prep)(void); | ||
40 | extern void (*pm_cpu_sleep)(void); | ||
41 | |||
42 | /* Flags for PM Control */ | ||
43 | |||
44 | extern unsigned long s3c_pm_flags; | ||
45 | |||
46 | /* from sleep.S */ | ||
47 | |||
48 | extern int s3c2410_cpu_save(unsigned long *saveblk); | ||
49 | extern void s3c2410_cpu_suspend(void); | ||
50 | extern void s3c2410_cpu_resume(void); | ||
51 | |||
52 | extern unsigned long s3c2410_sleep_save_phys; | ||
53 | |||
54 | /* sleep save info */ | ||
55 | |||
56 | struct sleep_save { | ||
57 | void __iomem *reg; | ||
58 | unsigned long val; | ||
59 | }; | ||
60 | |||
61 | #define SAVE_ITEM(x) \ | ||
62 | { .reg = (x) } | ||
63 | |||
64 | extern void s3c2410_pm_do_save(struct sleep_save *ptr, int count); | ||
65 | extern void s3c2410_pm_do_restore(struct sleep_save *ptr, int count); | ||
66 | |||
67 | #ifdef CONFIG_PM | ||
68 | extern int s3c24xx_irq_suspend(struct sys_device *dev, pm_message_t state); | ||
69 | extern int s3c24xx_irq_resume(struct sys_device *dev); | ||
70 | #else | ||
71 | #define s3c24xx_irq_suspend NULL | ||
72 | #define s3c24xx_irq_resume NULL | ||
73 | #endif | ||
diff --git a/include/asm-arm/plat-s3c24xx/s3c2400.h b/include/asm-arm/plat-s3c24xx/s3c2400.h new file mode 100644 index 000000000000..3a5a16821af8 --- /dev/null +++ b/include/asm-arm/plat-s3c24xx/s3c2400.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/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 | |||
18 | extern int s3c2400_init(void); | ||
19 | |||
20 | extern void s3c2400_map_io(struct map_desc *mach_desc, int size); | ||
21 | |||
22 | extern void s3c2400_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
23 | |||
24 | extern 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 | ||
diff --git a/include/asm-arm/plat-s3c24xx/s3c2410.h b/include/asm-arm/plat-s3c24xx/s3c2410.h new file mode 100644 index 000000000000..36de0b835873 --- /dev/null +++ b/include/asm-arm/plat-s3c24xx/s3c2410.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/s3c2410.h | ||
2 | * | ||
3 | * Copyright (c) 2004 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * Header file for s3c2410 machine directory | ||
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 | |||
14 | #ifdef CONFIG_CPU_S3C2410 | ||
15 | |||
16 | extern int s3c2410_init(void); | ||
17 | |||
18 | extern void s3c2410_map_io(struct map_desc *mach_desc, int size); | ||
19 | |||
20 | extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
21 | |||
22 | extern void s3c2410_init_clocks(int xtal); | ||
23 | |||
24 | extern int s3c2410_baseclk_add(void); | ||
25 | |||
26 | #else | ||
27 | #define s3c2410_init_clocks NULL | ||
28 | #define s3c2410_init_uarts NULL | ||
29 | #define s3c2410_map_io NULL | ||
30 | #define s3c2410_init NULL | ||
31 | #endif | ||
diff --git a/include/asm-arm/plat-s3c24xx/s3c2412.h b/include/asm-arm/plat-s3c24xx/s3c2412.h new file mode 100644 index 000000000000..3ec97685e781 --- /dev/null +++ b/include/asm-arm/plat-s3c24xx/s3c2412.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/s3c2412.h | ||
2 | * | ||
3 | * Copyright (c) 2006 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * Header file for s3c2412 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 | |||
13 | #ifdef CONFIG_CPU_S3C2412 | ||
14 | |||
15 | extern int s3c2412_init(void); | ||
16 | |||
17 | extern void s3c2412_map_io(struct map_desc *mach_desc, int size); | ||
18 | |||
19 | extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
20 | |||
21 | extern void s3c2412_init_clocks(int xtal); | ||
22 | |||
23 | extern int s3c2412_baseclk_add(void); | ||
24 | #else | ||
25 | #define s3c2412_init_clocks NULL | ||
26 | #define s3c2412_init_uarts NULL | ||
27 | #define s3c2412_map_io NULL | ||
28 | #define s3c2412_init NULL | ||
29 | #endif | ||
diff --git a/include/asm-arm/plat-s3c24xx/s3c2440.h b/include/asm-arm/plat-s3c24xx/s3c2440.h new file mode 100644 index 000000000000..107853bf9481 --- /dev/null +++ b/include/asm-arm/plat-s3c24xx/s3c2440.h | |||
@@ -0,0 +1,17 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/s3c2440.h | ||
2 | * | ||
3 | * Copyright (c) 2004-2005 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * Header file for s3c2440 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 | |||
13 | #ifdef CONFIG_CPU_S3C2440 | ||
14 | extern int s3c2440_init(void); | ||
15 | #else | ||
16 | #define s3c2440_init NULL | ||
17 | #endif | ||
diff --git a/include/asm-arm/plat-s3c24xx/s3c2442.h b/include/asm-arm/plat-s3c24xx/s3c2442.h new file mode 100644 index 000000000000..451a23a2092a --- /dev/null +++ b/include/asm-arm/plat-s3c24xx/s3c2442.h | |||
@@ -0,0 +1,17 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/s3c2442.h | ||
2 | * | ||
3 | * Copyright (c) 2006 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * Header file for s3c2442 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 | |||
13 | #ifdef CONFIG_CPU_S3C2442 | ||
14 | extern int s3c2442_init(void); | ||
15 | #else | ||
16 | #define s3c2442_init NULL | ||
17 | #endif | ||
diff --git a/include/asm-arm/plat-s3c24xx/s3c2443.h b/include/asm-arm/plat-s3c24xx/s3c2443.h new file mode 100644 index 000000000000..11d83b5c84e6 --- /dev/null +++ b/include/asm-arm/plat-s3c24xx/s3c2443.h | |||
@@ -0,0 +1,32 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/s3c2443.h | ||
2 | * | ||
3 | * Copyright (c) 2004-2005 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * Header file for s3c2443 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 | |||
13 | #ifdef CONFIG_CPU_S3C2443 | ||
14 | |||
15 | struct s3c2410_uartcfg; | ||
16 | |||
17 | extern int s3c2443_init(void); | ||
18 | |||
19 | extern void s3c2443_map_io(struct map_desc *mach_desc, int size); | ||
20 | |||
21 | extern void s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
22 | |||
23 | extern void s3c2443_init_clocks(int xtal); | ||
24 | |||
25 | extern int s3c2443_baseclk_add(void); | ||
26 | |||
27 | #else | ||
28 | #define s3c2443_init_clocks NULL | ||
29 | #define s3c2443_init_uarts NULL | ||
30 | #define s3c2443_map_io NULL | ||
31 | #define s3c2443_init NULL | ||
32 | #endif | ||