diff options
Diffstat (limited to 'arch/arm/plat-s3c24xx/include/plat')
-rw-r--r-- | arch/arm/plat-s3c24xx/include/plat/audio-simtec.h | 37 | ||||
-rw-r--r-- | arch/arm/plat-s3c24xx/include/plat/dma-plat.h | 84 | ||||
-rw-r--r-- | arch/arm/plat-s3c24xx/include/plat/mci.h | 9 | ||||
-rw-r--r-- | arch/arm/plat-s3c24xx/include/plat/pm-core.h | 64 | ||||
-rw-r--r-- | arch/arm/plat-s3c24xx/include/plat/s3c2440.h | 17 | ||||
-rw-r--r-- | arch/arm/plat-s3c24xx/include/plat/s3c2442.h | 17 | ||||
-rw-r--r-- | arch/arm/plat-s3c24xx/include/plat/s3c244x.h | 37 |
7 files changed, 83 insertions, 182 deletions
diff --git a/arch/arm/plat-s3c24xx/include/plat/audio-simtec.h b/arch/arm/plat-s3c24xx/include/plat/audio-simtec.h new file mode 100644 index 000000000000..de5e88fdcb31 --- /dev/null +++ b/arch/arm/plat-s3c24xx/include/plat/audio-simtec.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* arch/arm/plat-s3c24xx/include/plat/audio-simtec.h | ||
2 | * | ||
3 | * Copyright 2008 Simtec Electronics | ||
4 | * http://armlinux.simtec.co.uk/ | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * Simtec Audio support. | ||
12 | */ | ||
13 | |||
14 | /** | ||
15 | * struct s3c24xx_audio_simtec_pdata - platform data for simtec audio | ||
16 | * @use_mpllin: Select codec clock from MPLLin | ||
17 | * @output_cdclk: Need to output CDCLK to the codec | ||
18 | * @have_mic: Set if we have a MIC socket | ||
19 | * @have_lout: Set if we have a LineOut socket | ||
20 | * @amp_gpio: GPIO pin to enable the AMP | ||
21 | * @amp_gain: Option GPIO to control AMP gain | ||
22 | */ | ||
23 | struct s3c24xx_audio_simtec_pdata { | ||
24 | unsigned int use_mpllin:1; | ||
25 | unsigned int output_cdclk:1; | ||
26 | |||
27 | unsigned int have_mic:1; | ||
28 | unsigned int have_lout:1; | ||
29 | |||
30 | int amp_gpio; | ||
31 | int amp_gain[2]; | ||
32 | |||
33 | void (*startup)(void); | ||
34 | }; | ||
35 | |||
36 | extern int simtec_audio_add(const char *codec_name, bool has_lr_routing, | ||
37 | struct s3c24xx_audio_simtec_pdata *pdata); | ||
diff --git a/arch/arm/plat-s3c24xx/include/plat/dma-plat.h b/arch/arm/plat-s3c24xx/include/plat/dma-plat.h deleted file mode 100644 index 9565ead1bc9b..000000000000 --- a/arch/arm/plat-s3c24xx/include/plat/dma-plat.h +++ /dev/null | |||
@@ -1,84 +0,0 @@ | |||
1 | /* linux/arch/arm/plat-s3c24xx/include/plat/dma-plat.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 | #include <plat/dma-core.h> | ||
14 | |||
15 | extern struct sysdev_class dma_sysclass; | ||
16 | extern struct s3c2410_dma_chan s3c2410_chans[S3C_DMA_CHANNELS]; | ||
17 | |||
18 | #define DMA_CH_VALID (1<<31) | ||
19 | #define DMA_CH_NEVER (1<<30) | ||
20 | |||
21 | struct s3c24xx_dma_addr { | ||
22 | unsigned long from; | ||
23 | unsigned long to; | ||
24 | }; | ||
25 | |||
26 | /* struct s3c24xx_dma_map | ||
27 | * | ||
28 | * this holds the mapping information for the channel selected | ||
29 | * to be connected to the specified device | ||
30 | */ | ||
31 | |||
32 | struct s3c24xx_dma_map { | ||
33 | const char *name; | ||
34 | struct s3c24xx_dma_addr hw_addr; | ||
35 | |||
36 | unsigned long channels[S3C_DMA_CHANNELS]; | ||
37 | unsigned long channels_rx[S3C_DMA_CHANNELS]; | ||
38 | }; | ||
39 | |||
40 | struct s3c24xx_dma_selection { | ||
41 | struct s3c24xx_dma_map *map; | ||
42 | unsigned long map_size; | ||
43 | unsigned long dcon_mask; | ||
44 | |||
45 | void (*select)(struct s3c2410_dma_chan *chan, | ||
46 | struct s3c24xx_dma_map *map); | ||
47 | |||
48 | void (*direction)(struct s3c2410_dma_chan *chan, | ||
49 | struct s3c24xx_dma_map *map, | ||
50 | enum s3c2410_dmasrc dir); | ||
51 | }; | ||
52 | |||
53 | extern int s3c24xx_dma_init_map(struct s3c24xx_dma_selection *sel); | ||
54 | |||
55 | /* struct s3c24xx_dma_order_ch | ||
56 | * | ||
57 | * channel map for one of the `enum dma_ch` dma channels. the list | ||
58 | * entry contains a set of low-level channel numbers, orred with | ||
59 | * DMA_CH_VALID, which are checked in the order in the array. | ||
60 | */ | ||
61 | |||
62 | struct s3c24xx_dma_order_ch { | ||
63 | unsigned int list[S3C_DMA_CHANNELS]; /* list of channels */ | ||
64 | unsigned int flags; /* flags */ | ||
65 | }; | ||
66 | |||
67 | /* struct s3c24xx_dma_order | ||
68 | * | ||
69 | * information provided by either the core or the board to give the | ||
70 | * dma system a hint on how to allocate channels | ||
71 | */ | ||
72 | |||
73 | struct s3c24xx_dma_order { | ||
74 | struct s3c24xx_dma_order_ch channels[DMACH_MAX]; | ||
75 | }; | ||
76 | |||
77 | extern int s3c24xx_dma_order_set(struct s3c24xx_dma_order *map); | ||
78 | |||
79 | /* DMA init code, called from the cpu support code */ | ||
80 | |||
81 | extern int s3c2410_dma_init(void); | ||
82 | |||
83 | extern int s3c24xx_dma_init(unsigned int channels, unsigned int irq, | ||
84 | unsigned int stride); | ||
diff --git a/arch/arm/plat-s3c24xx/include/plat/mci.h b/arch/arm/plat-s3c24xx/include/plat/mci.h index 36aaa10fad06..2ac2b21ec490 100644 --- a/arch/arm/plat-s3c24xx/include/plat/mci.h +++ b/arch/arm/plat-s3c24xx/include/plat/mci.h | |||
@@ -40,4 +40,13 @@ struct s3c24xx_mci_pdata { | |||
40 | unsigned short vdd); | 40 | unsigned short vdd); |
41 | }; | 41 | }; |
42 | 42 | ||
43 | /** | ||
44 | * s3c24xx_mci_set_platdata - set platform data for mmc/sdi device | ||
45 | * @pdata: The platform data | ||
46 | * | ||
47 | * Copy the platform data supplied by @pdata so that this can be marked | ||
48 | * __initdata. | ||
49 | */ | ||
50 | extern void s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata *pdata); | ||
51 | |||
43 | #endif /* _ARCH_NCI_H */ | 52 | #endif /* _ARCH_NCI_H */ |
diff --git a/arch/arm/plat-s3c24xx/include/plat/pm-core.h b/arch/arm/plat-s3c24xx/include/plat/pm-core.h deleted file mode 100644 index fb45dd9adca5..000000000000 --- a/arch/arm/plat-s3c24xx/include/plat/pm-core.h +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | /* linux/arch/arm/plat-s3c24xx/include/plat/pll.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/plat-s3c24xx/include/plat/s3c2440.h b/arch/arm/plat-s3c24xx/include/plat/s3c2440.h deleted file mode 100644 index 107853bf9481..000000000000 --- a/arch/arm/plat-s3c24xx/include/plat/s3c2440.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
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/arch/arm/plat-s3c24xx/include/plat/s3c2442.h b/arch/arm/plat-s3c24xx/include/plat/s3c2442.h deleted file mode 100644 index 451a23a2092a..000000000000 --- a/arch/arm/plat-s3c24xx/include/plat/s3c2442.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
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/arch/arm/plat-s3c24xx/include/plat/s3c244x.h b/arch/arm/plat-s3c24xx/include/plat/s3c244x.h new file mode 100644 index 000000000000..307248d1ccbb --- /dev/null +++ b/arch/arm/plat-s3c24xx/include/plat/s3c244x.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* linux/arch/arm/plat-s3c24xx/include/plat/s3c244x.h | ||
2 | * | ||
3 | * Copyright (c) 2004-2005 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * Header file for S3C2440 and 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 | #if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442) | ||
14 | |||
15 | extern void s3c244x_map_io(void); | ||
16 | |||
17 | extern void s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
18 | |||
19 | extern void s3c244x_init_clocks(int xtal); | ||
20 | |||
21 | #else | ||
22 | #define s3c244x_init_clocks NULL | ||
23 | #define s3c244x_init_uarts NULL | ||
24 | #define s3c244x_map_io NULL | ||
25 | #endif | ||
26 | |||
27 | #ifdef CONFIG_CPU_S3C2440 | ||
28 | extern int s3c2440_init(void); | ||
29 | #else | ||
30 | #define s3c2440_init NULL | ||
31 | #endif | ||
32 | |||
33 | #ifdef CONFIG_CPU_S3C2442 | ||
34 | extern int s3c2442_init(void); | ||
35 | #else | ||
36 | #define s3c2442_init NULL | ||
37 | #endif | ||