aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-11-03 10:46:05 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-11-03 10:46:05 -0500
commitfcef24d38e8f974673d158866e60763ac4f2161b (patch)
tree74feffbf738f4ac0dba8e9d2376f0a7371ce2791
parent78e1e34056f6508a24d08a2a020cd7b124eacdc8 (diff)
parent620abe28776d8cec0a275fac25e254c1f0bc1c73 (diff)
Merge branch 'fixes-s3c-2632-rc5' of git://git.fluff.org/bjdooks/linux
* 'fixes-s3c-2632-rc5' of git://git.fluff.org/bjdooks/linux: ARM: S3C2410: Fix sparse warnings in arch/arm/mach-s3c2410/gpio.c ARM: S3C2440: mini2440: Fix spare warnings ARM: S3C24XX: Fix warnings in arch/arm/plat-s3c24xx/gpio.c ARM: S3C2440: mini2440: Fix missing CONFIG_S3C_DEV_USB_HOST ARM: S3C24XX: arch/arm/plat-s3c24xx: Move dereference after NULL test ARM: S3C: Fix adc function exports ARM: S3C2410: Fix link if CONFIG_S3C2410_IOTIMING is not set ARM: S3C24XX: Introduce S3C2442B CPU ARM: S3C24XX: Define a macro to avoid compilation error ARM: S3C: Add info for supporting circular DMA buffers ARM: S3C64XX: Set rate of crystal mux ARM: S3C64XX: Fix S3C64XX_CLKDIV0_ARM_MASK value
-rw-r--r--arch/arm/mach-s3c2410/gpio.c1
-rw-r--r--arch/arm/mach-s3c2410/include/mach/dma.h7
-rw-r--r--arch/arm/mach-s3c2440/Kconfig1
-rw-r--r--arch/arm/mach-s3c2440/mach-mini2440.c4
-rw-r--r--arch/arm/mach-s3c6400/include/mach/dma.h5
-rw-r--r--arch/arm/plat-s3c24xx/adc.c2
-rw-r--r--arch/arm/plat-s3c24xx/cpu.c10
-rw-r--r--arch/arm/plat-s3c24xx/dma.c6
-rw-r--r--arch/arm/plat-s3c24xx/gpio.c1
-rw-r--r--arch/arm/plat-s3c24xx/include/plat/cpu-freq-core.h9
-rw-r--r--arch/arm/plat-s3c24xx/include/plat/s3c2410.h1
-rw-r--r--arch/arm/plat-s3c64xx/include/plat/regs-clock.h4
-rw-r--r--arch/arm/plat-s3c64xx/s3c6400-clock.c3
-rw-r--r--sound/soc/s3c24xx/s3c24xx-pcm.c17
14 files changed, 59 insertions, 12 deletions
diff --git a/arch/arm/mach-s3c2410/gpio.c b/arch/arm/mach-s3c2410/gpio.c
index 7974afca297c..9664e011dae2 100644
--- a/arch/arm/mach-s3c2410/gpio.c
+++ b/arch/arm/mach-s3c2410/gpio.c
@@ -28,6 +28,7 @@
28#include <linux/io.h> 28#include <linux/io.h>
29 29
30#include <mach/hardware.h> 30#include <mach/hardware.h>
31#include <mach/gpio-fns.h>
31#include <asm/irq.h> 32#include <asm/irq.h>
32 33
33#include <mach/regs-gpio.h> 34#include <mach/regs-gpio.h>
diff --git a/arch/arm/mach-s3c2410/include/mach/dma.h b/arch/arm/mach-s3c2410/include/mach/dma.h
index c3a2629e0ded..92e2687009ea 100644
--- a/arch/arm/mach-s3c2410/include/mach/dma.h
+++ b/arch/arm/mach-s3c2410/include/mach/dma.h
@@ -110,6 +110,8 @@ enum s3c2410_dma_loadst {
110 * waiting for reloads */ 110 * waiting for reloads */
111#define S3C2410_DMAF_AUTOSTART (1<<1) /* auto-start if buffer queued */ 111#define S3C2410_DMAF_AUTOSTART (1<<1) /* auto-start if buffer queued */
112 112
113#define S3C2410_DMAF_CIRCULAR (1 << 2) /* no circular dma support */
114
113/* dma buffer */ 115/* dma buffer */
114 116
115struct s3c2410_dma_buf; 117struct s3c2410_dma_buf;
@@ -194,4 +196,9 @@ struct s3c2410_dma_chan {
194 196
195typedef unsigned long dma_device_t; 197typedef unsigned long dma_device_t;
196 198
199static inline bool s3c_dma_has_circular(void)
200{
201 return false;
202}
203
197#endif /* __ASM_ARCH_DMA_H */ 204#endif /* __ASM_ARCH_DMA_H */
diff --git a/arch/arm/mach-s3c2440/Kconfig b/arch/arm/mach-s3c2440/Kconfig
index d7bba919a77e..a8b69d77571b 100644
--- a/arch/arm/mach-s3c2440/Kconfig
+++ b/arch/arm/mach-s3c2440/Kconfig
@@ -103,6 +103,7 @@ config MACH_MINI2440
103 select LEDS_TRIGGER_BACKLIGHT 103 select LEDS_TRIGGER_BACKLIGHT
104 select SND_S3C24XX_SOC_S3C24XX_UDA134X 104 select SND_S3C24XX_SOC_S3C24XX_UDA134X
105 select S3C_DEV_NAND 105 select S3C_DEV_NAND
106 select S3C_DEV_USB_HOST
106 help 107 help
107 Say Y here to select support for the MINI2440. Is a 10cm x 10cm board 108 Say Y here to select support for the MINI2440. Is a 10cm x 10cm board
108 available via various sources. It can come with a 3.5" or 7" touch LCD. 109 available via various sources. It can come with a 3.5" or 7" touch LCD.
diff --git a/arch/arm/mach-s3c2440/mach-mini2440.c b/arch/arm/mach-s3c2440/mach-mini2440.c
index ec71a6965786..1c3382fefdd2 100644
--- a/arch/arm/mach-s3c2440/mach-mini2440.c
+++ b/arch/arm/mach-s3c2440/mach-mini2440.c
@@ -144,7 +144,7 @@ static struct s3c2410_udc_mach_info mini2440_udc_cfg __initdata = {
144 .type = (S3C2410_LCDCON1_TFT16BPP |\ 144 .type = (S3C2410_LCDCON1_TFT16BPP |\
145 S3C2410_LCDCON1_TFT) 145 S3C2410_LCDCON1_TFT)
146 146
147struct s3c2410fb_display mini2440_lcd_cfg[] __initdata = { 147static struct s3c2410fb_display mini2440_lcd_cfg[] __initdata = {
148 [0] = { /* mini2440 + 3.5" TFT + touchscreen */ 148 [0] = { /* mini2440 + 3.5" TFT + touchscreen */
149 _LCD_DECLARE( 149 _LCD_DECLARE(
150 7, /* The 3.5 is quite fast */ 150 7, /* The 3.5 is quite fast */
@@ -191,7 +191,7 @@ struct s3c2410fb_display mini2440_lcd_cfg[] __initdata = {
191#define S3C2410_GPCCON_MASK(x) (3 << ((x) * 2)) 191#define S3C2410_GPCCON_MASK(x) (3 << ((x) * 2))
192#define S3C2410_GPDCON_MASK(x) (3 << ((x) * 2)) 192#define S3C2410_GPDCON_MASK(x) (3 << ((x) * 2))
193 193
194struct s3c2410fb_mach_info mini2440_fb_info __initdata = { 194static struct s3c2410fb_mach_info mini2440_fb_info __initdata = {
195 .displays = &mini2440_lcd_cfg[0], /* not constant! see init */ 195 .displays = &mini2440_lcd_cfg[0], /* not constant! see init */
196 .num_displays = 1, 196 .num_displays = 1,
197 .default_display = 0, 197 .default_display = 0,
diff --git a/arch/arm/mach-s3c6400/include/mach/dma.h b/arch/arm/mach-s3c6400/include/mach/dma.h
index 1067619f0ba0..004edab23954 100644
--- a/arch/arm/mach-s3c6400/include/mach/dma.h
+++ b/arch/arm/mach-s3c6400/include/mach/dma.h
@@ -68,6 +68,11 @@ static __inline__ int s3c_dma_has_circular(void)
68 68
69#define S3C2410_DMAF_CIRCULAR (1 << 0) 69#define S3C2410_DMAF_CIRCULAR (1 << 0)
70 70
71static inline bool s3c_dma_has_circular(void)
72{
73 return false;
74}
75
71#include <plat/dma.h> 76#include <plat/dma.h>
72 77
73#endif /* __ASM_ARCH_IRQ_H */ 78#endif /* __ASM_ARCH_IRQ_H */
diff --git a/arch/arm/plat-s3c24xx/adc.c b/arch/arm/plat-s3c24xx/adc.c
index 4d36b784fb8b..df47322492d5 100644
--- a/arch/arm/plat-s3c24xx/adc.c
+++ b/arch/arm/plat-s3c24xx/adc.c
@@ -189,7 +189,7 @@ int s3c_adc_read(struct s3c_adc_client *client, unsigned int ch)
189err: 189err:
190 return ret; 190 return ret;
191} 191}
192EXPORT_SYMBOL_GPL(s3c_adc_convert); 192EXPORT_SYMBOL_GPL(s3c_adc_read);
193 193
194static void s3c_adc_default_select(struct s3c_adc_client *client, 194static void s3c_adc_default_select(struct s3c_adc_client *client,
195 unsigned select) 195 unsigned select)
diff --git a/arch/arm/plat-s3c24xx/cpu.c b/arch/arm/plat-s3c24xx/cpu.c
index 5447e60f3936..4af9dd948793 100644
--- a/arch/arm/plat-s3c24xx/cpu.c
+++ b/arch/arm/plat-s3c24xx/cpu.c
@@ -61,6 +61,7 @@ static const char name_s3c2410[] = "S3C2410";
61static const char name_s3c2412[] = "S3C2412"; 61static const char name_s3c2412[] = "S3C2412";
62static const char name_s3c2440[] = "S3C2440"; 62static const char name_s3c2440[] = "S3C2440";
63static const char name_s3c2442[] = "S3C2442"; 63static const char name_s3c2442[] = "S3C2442";
64static const char name_s3c2442b[] = "S3C2442B";
64static const char name_s3c2443[] = "S3C2443"; 65static const char name_s3c2443[] = "S3C2443";
65static const char name_s3c2410a[] = "S3C2410A"; 66static const char name_s3c2410a[] = "S3C2410A";
66static const char name_s3c2440a[] = "S3C2440A"; 67static const char name_s3c2440a[] = "S3C2440A";
@@ -112,6 +113,15 @@ static struct cpu_table cpu_ids[] __initdata = {
112 .name = name_s3c2442 113 .name = name_s3c2442
113 }, 114 },
114 { 115 {
116 .idcode = 0x32440aab,
117 .idmask = 0xffffffff,
118 .map_io = s3c244x_map_io,
119 .init_clocks = s3c244x_init_clocks,
120 .init_uarts = s3c244x_init_uarts,
121 .init = s3c2442_init,
122 .name = name_s3c2442b
123 },
124 {
115 .idcode = 0x32412001, 125 .idcode = 0x32412001,
116 .idmask = 0xffffffff, 126 .idmask = 0xffffffff,
117 .map_io = s3c2412_map_io, 127 .map_io = s3c2412_map_io,
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c
index 196b19123653..f046f8c51084 100644
--- a/arch/arm/plat-s3c24xx/dma.c
+++ b/arch/arm/plat-s3c24xx/dma.c
@@ -208,14 +208,14 @@ s3c2410_dma_loadbuffer(struct s3c2410_dma_chan *chan,
208{ 208{
209 unsigned long reload; 209 unsigned long reload;
210 210
211 pr_debug("s3c2410_chan_loadbuffer: loading buff %p (0x%08lx,0x%06x)\n",
212 buf, (unsigned long)buf->data, buf->size);
213
214 if (buf == NULL) { 211 if (buf == NULL) {
215 dmawarn("buffer is NULL\n"); 212 dmawarn("buffer is NULL\n");
216 return -EINVAL; 213 return -EINVAL;
217 } 214 }
218 215
216 pr_debug("s3c2410_chan_loadbuffer: loading buff %p (0x%08lx,0x%06x)\n",
217 buf, (unsigned long)buf->data, buf->size);
218
219 /* check the state of the channel before we do anything */ 219 /* check the state of the channel before we do anything */
220 220
221 if (chan->load_state == S3C2410_DMALOAD_1LOADED) { 221 if (chan->load_state == S3C2410_DMALOAD_1LOADED) {
diff --git a/arch/arm/plat-s3c24xx/gpio.c b/arch/arm/plat-s3c24xx/gpio.c
index 95df059b5a1d..5467470badfd 100644
--- a/arch/arm/plat-s3c24xx/gpio.c
+++ b/arch/arm/plat-s3c24xx/gpio.c
@@ -29,6 +29,7 @@
29#include <linux/io.h> 29#include <linux/io.h>
30 30
31#include <mach/hardware.h> 31#include <mach/hardware.h>
32#include <mach/gpio-fns.h>
32#include <asm/irq.h> 33#include <asm/irq.h>
33 34
34#include <mach/regs-gpio.h> 35#include <mach/regs-gpio.h>
diff --git a/arch/arm/plat-s3c24xx/include/plat/cpu-freq-core.h b/arch/arm/plat-s3c24xx/include/plat/cpu-freq-core.h
index efeb025affc7..c776120b99e6 100644
--- a/arch/arm/plat-s3c24xx/include/plat/cpu-freq-core.h
+++ b/arch/arm/plat-s3c24xx/include/plat/cpu-freq-core.h
@@ -222,7 +222,9 @@ extern struct clk *s3c_cpufreq_clk_get(struct device *, const char *);
222/* S3C2410 and compatible exported functions */ 222/* S3C2410 and compatible exported functions */
223 223
224extern void s3c2410_cpufreq_setrefresh(struct s3c_cpufreq_config *cfg); 224extern void s3c2410_cpufreq_setrefresh(struct s3c_cpufreq_config *cfg);
225extern void s3c2410_set_fvco(struct s3c_cpufreq_config *cfg);
225 226
227#ifdef CONFIG_S3C2410_IOTIMING
226extern int s3c2410_iotiming_calc(struct s3c_cpufreq_config *cfg, 228extern int s3c2410_iotiming_calc(struct s3c_cpufreq_config *cfg,
227 struct s3c_iotimings *iot); 229 struct s3c_iotimings *iot);
228 230
@@ -231,8 +233,11 @@ extern int s3c2410_iotiming_get(struct s3c_cpufreq_config *cfg,
231 233
232extern void s3c2410_iotiming_set(struct s3c_cpufreq_config *cfg, 234extern void s3c2410_iotiming_set(struct s3c_cpufreq_config *cfg,
233 struct s3c_iotimings *iot); 235 struct s3c_iotimings *iot);
234 236#else
235extern void s3c2410_set_fvco(struct s3c_cpufreq_config *cfg); 237#define s3c2410_iotiming_calc NULL
238#define s3c2410_iotiming_get NULL
239#define s3c2410_iotiming_set NULL
240#endif /* CONFIG_S3C2410_IOTIMING */
236 241
237/* S3C2412 compatible routines */ 242/* S3C2412 compatible routines */
238 243
diff --git a/arch/arm/plat-s3c24xx/include/plat/s3c2410.h b/arch/arm/plat-s3c24xx/include/plat/s3c2410.h
index b6deeef8f663..82ab4aad1bbe 100644
--- a/arch/arm/plat-s3c24xx/include/plat/s3c2410.h
+++ b/arch/arm/plat-s3c24xx/include/plat/s3c2410.h
@@ -27,6 +27,7 @@ extern void s3c2410_init_clocks(int xtal);
27#define s3c2410_init_uarts NULL 27#define s3c2410_init_uarts NULL
28#define s3c2410_map_io NULL 28#define s3c2410_map_io NULL
29#define s3c2410_init NULL 29#define s3c2410_init NULL
30#define s3c2410a_init NULL
30#endif 31#endif
31 32
32extern int s3c2410_baseclk_add(void); 33extern int s3c2410_baseclk_add(void);
diff --git a/arch/arm/plat-s3c64xx/include/plat/regs-clock.h b/arch/arm/plat-s3c64xx/include/plat/regs-clock.h
index a8777a755dfa..ff46e7fa957a 100644
--- a/arch/arm/plat-s3c64xx/include/plat/regs-clock.h
+++ b/arch/arm/plat-s3c64xx/include/plat/regs-clock.h
@@ -51,8 +51,8 @@
51#define S3C6400_CLKDIV0_HCLK_SHIFT (8) 51#define S3C6400_CLKDIV0_HCLK_SHIFT (8)
52#define S3C6400_CLKDIV0_MPLL_MASK (0x1 << 4) 52#define S3C6400_CLKDIV0_MPLL_MASK (0x1 << 4)
53#define S3C6400_CLKDIV0_MPLL_SHIFT (4) 53#define S3C6400_CLKDIV0_MPLL_SHIFT (4)
54#define S3C6400_CLKDIV0_ARM_MASK (0x3 << 0) 54#define S3C6400_CLKDIV0_ARM_MASK (0x7 << 0)
55#define S3C6410_CLKDIV0_ARM_MASK (0x7 << 0) 55#define S3C6410_CLKDIV0_ARM_MASK (0xf << 0)
56#define S3C6400_CLKDIV0_ARM_SHIFT (0) 56#define S3C6400_CLKDIV0_ARM_SHIFT (0)
57 57
58/* CLKDIV1 */ 58/* CLKDIV1 */
diff --git a/arch/arm/plat-s3c64xx/s3c6400-clock.c b/arch/arm/plat-s3c64xx/s3c6400-clock.c
index 9745852261e0..6ffa21eb1b91 100644
--- a/arch/arm/plat-s3c64xx/s3c6400-clock.c
+++ b/arch/arm/plat-s3c64xx/s3c6400-clock.c
@@ -677,6 +677,9 @@ void __init_or_cpufreq s3c6400_setup_clocks(void)
677 677
678 printk(KERN_DEBUG "%s: xtal is %ld\n", __func__, xtal); 678 printk(KERN_DEBUG "%s: xtal is %ld\n", __func__, xtal);
679 679
680 /* For now assume the mux always selects the crystal */
681 clk_ext_xtal_mux.parent = xtal_clk;
682
680 epll = s3c6400_get_epll(xtal); 683 epll = s3c6400_get_epll(xtal);
681 mpll = s3c6400_get_pll(xtal, __raw_readl(S3C_MPLL_CON)); 684 mpll = s3c6400_get_pll(xtal, __raw_readl(S3C_MPLL_CON));
682 apll = s3c6400_get_pll(xtal, __raw_readl(S3C_APLL_CON)); 685 apll = s3c6400_get_pll(xtal, __raw_readl(S3C_APLL_CON));
diff --git a/sound/soc/s3c24xx/s3c24xx-pcm.c b/sound/soc/s3c24xx/s3c24xx-pcm.c
index 5cbbdc80fde3..1f35c6fcf5fd 100644
--- a/sound/soc/s3c24xx/s3c24xx-pcm.c
+++ b/sound/soc/s3c24xx/s3c24xx-pcm.c
@@ -75,11 +75,19 @@ static void s3c24xx_pcm_enqueue(struct snd_pcm_substream *substream)
75{ 75{
76 struct s3c24xx_runtime_data *prtd = substream->runtime->private_data; 76 struct s3c24xx_runtime_data *prtd = substream->runtime->private_data;
77 dma_addr_t pos = prtd->dma_pos; 77 dma_addr_t pos = prtd->dma_pos;
78 unsigned int limit;
78 int ret; 79 int ret;
79 80
80 pr_debug("Entered %s\n", __func__); 81 pr_debug("Entered %s\n", __func__);
81 82
82 while (prtd->dma_loaded < prtd->dma_limit) { 83 if (s3c_dma_has_circular()) {
84 limit = (prtd->dma_end - prtd->dma_start) / prtd->dma_period;
85 } else
86 limit = prtd->dma_limit;
87
88 pr_debug("%s: loaded %d, limit %d\n", __func__, prtd->dma_loaded, limit);
89
90 while (prtd->dma_loaded < limit) {
83 unsigned long len = prtd->dma_period; 91 unsigned long len = prtd->dma_period;
84 92
85 pr_debug("dma_loaded: %d\n", prtd->dma_loaded); 93 pr_debug("dma_loaded: %d\n", prtd->dma_loaded);
@@ -123,7 +131,7 @@ static void s3c24xx_audio_buffdone(struct s3c2410_dma_chan *channel,
123 snd_pcm_period_elapsed(substream); 131 snd_pcm_period_elapsed(substream);
124 132
125 spin_lock(&prtd->lock); 133 spin_lock(&prtd->lock);
126 if (prtd->state & ST_RUNNING) { 134 if (prtd->state & ST_RUNNING && !s3c_dma_has_circular()) {
127 prtd->dma_loaded--; 135 prtd->dma_loaded--;
128 s3c24xx_pcm_enqueue(substream); 136 s3c24xx_pcm_enqueue(substream);
129 } 137 }
@@ -164,6 +172,11 @@ static int s3c24xx_pcm_hw_params(struct snd_pcm_substream *substream,
164 printk(KERN_ERR "failed to get dma channel\n"); 172 printk(KERN_ERR "failed to get dma channel\n");
165 return ret; 173 return ret;
166 } 174 }
175
176 /* use the circular buffering if we have it available. */
177 if (s3c_dma_has_circular())
178 s3c2410_dma_setflags(prtd->params->channel,
179 S3C2410_DMAF_CIRCULAR);
167 } 180 }
168 181
169 s3c2410_dma_set_buffdone_fn(prtd->params->channel, 182 s3c2410_dma_set_buffdone_fn(prtd->params->channel,