aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndriy Skulysh <askulysh@gmail.com>2006-09-27 00:07:38 -0400
committerPaul Mundt <lethal@linux-sh.org>2006-09-27 00:07:38 -0400
commit4bcac20a7a01d49dffb5e88a8140efa34927c383 (patch)
treec931d2d1ef979b431f297265ea386083e13aeefa
parente4c2cfee5d5cf3e4c16b423be23551aeddf2717b (diff)
sh: hp6xx mach-type cleanups.
Some minor cleanups for the updated consolidated hp6xx mach-type. Signed-off-by: Andriy Skulysh <askulysh@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r--arch/sh/Makefile2
-rw-r--r--drivers/video/hitfb.c15
-rw-r--r--sound/oss/sh_dac_audio.c34
3 files changed, 17 insertions, 34 deletions
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index e467a450662b..66cf0ea6d38f 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -113,7 +113,7 @@ incdir-$(CONFIG_SH_SOLUTION_ENGINE) := se
113incdir-$(CONFIG_SH_7751_SOLUTION_ENGINE) := se7751 113incdir-$(CONFIG_SH_7751_SOLUTION_ENGINE) := se7751
114incdir-$(CONFIG_SH_7300_SOLUTION_ENGINE) := se7300 114incdir-$(CONFIG_SH_7300_SOLUTION_ENGINE) := se7300
115incdir-$(CONFIG_SH_73180_SOLUTION_ENGINE) := se73180 115incdir-$(CONFIG_SH_73180_SOLUTION_ENGINE) := se73180
116incdir-$(CONFIG_SH_HP600) := hp6xx 116incdir-$(CONFIG_SH_HP6XX) := hp6xx
117 117
118ifneq ($(machdir-y),) 118ifneq ($(machdir-y),)
119core-y += arch/sh/boards/$(machdir-y)/ 119core-y += arch/sh/boards/$(machdir-y)/
diff --git a/drivers/video/hitfb.c b/drivers/video/hitfb.c
index 4cc6b454265e..c6ac0dcd8854 100644
--- a/drivers/video/hitfb.c
+++ b/drivers/video/hitfb.c
@@ -28,10 +28,8 @@
28#include <asm/io.h> 28#include <asm/io.h>
29#include <asm/hd64461/hd64461.h> 29#include <asm/hd64461/hd64461.h>
30 30
31#ifdef MACH_HP600
32#include <asm/cpu/dac.h> 31#include <asm/cpu/dac.h>
33#include <asm/hp6xx/hp6xx.h> 32#include <asm/hp6xx/hp6xx.h>
34#endif
35 33
36#define WIDTH 640 34#define WIDTH 640
37 35
@@ -192,12 +190,6 @@ int hitfb_blank(int blank_mode, struct fb_info *info)
192 unsigned short v; 190 unsigned short v;
193 191
194 if (blank_mode) { 192 if (blank_mode) {
195#ifdef MACH_HP600
196 sh_dac_disable(DAC_LCD_BRIGHTNESS);
197 v = fb_readw(HD64461_GPBDR);
198 v |= HD64461_GPBDR_LCDOFF;
199 fb_writew(v, HD64461_GPBDR);
200#endif
201 v = fb_readw(HD64461_LDR1); 193 v = fb_readw(HD64461_LDR1);
202 v &= ~HD64461_LDR1_DON; 194 v &= ~HD64461_LDR1_DON;
203 fb_writew(v, HD64461_LDR1); 195 fb_writew(v, HD64461_LDR1);
@@ -213,12 +205,7 @@ int hitfb_blank(int blank_mode, struct fb_info *info)
213 v = fb_readw(HD64461_STBCR); 205 v = fb_readw(HD64461_STBCR);
214 v &= ~HD64461_STBCR_SLCDST; 206 v &= ~HD64461_STBCR_SLCDST;
215 fb_writew(v, HD64461_STBCR); 207 fb_writew(v, HD64461_STBCR);
216#ifdef MACH_HP600 208
217 sh_dac_enable(DAC_LCD_BRIGHTNESS);
218 v = fb_readw(HD64461_GPBDR);
219 v &= ~HD64461_GPBDR_LCDOFF;
220 fb_writew(v, HD64461_GPBDR);
221#endif
222 v = fb_readw(HD64461_LDR1); 209 v = fb_readw(HD64461_LDR1);
223 v |= HD64461_LDR1_DON; 210 v |= HD64461_LDR1_DON;
224 fb_writew(v, HD64461_LDR1); 211 fb_writew(v, HD64461_LDR1);
diff --git a/sound/oss/sh_dac_audio.c b/sound/oss/sh_dac_audio.c
index 7b168d85f4ab..ae7fccc510a1 100644
--- a/sound/oss/sh_dac_audio.c
+++ b/sound/oss/sh_dac_audio.c
@@ -6,18 +6,15 @@
6#include <linux/fs.h> 6#include <linux/fs.h>
7#include <linux/sound.h> 7#include <linux/sound.h>
8#include <linux/soundcard.h> 8#include <linux/soundcard.h>
9#include <linux/interrupt.h>
9#include <asm/io.h> 10#include <asm/io.h>
10#include <asm/uaccess.h> 11#include <asm/uaccess.h>
11#include <asm/irq.h> 12#include <asm/irq.h>
12#include <asm/delay.h> 13#include <asm/delay.h>
13#include <linux/interrupt.h>
14
15#include <asm/cpu/dac.h> 14#include <asm/cpu/dac.h>
16 15#include <asm/machvec.h>
17#ifdef MACH_HP600
18#include <asm/hp6xx/hp6xx.h> 16#include <asm/hp6xx/hp6xx.h>
19#include <asm/hd64461/hd64461.h> 17#include <asm/hd64461/hd64461.h>
20#endif
21 18
22#define MODNAME "sh_dac_audio" 19#define MODNAME "sh_dac_audio"
23 20
@@ -71,26 +68,25 @@ static void dac_audio_sync(void)
71 68
72static void dac_audio_start(void) 69static void dac_audio_start(void)
73{ 70{
74#ifdef MACH_HP600 71 if (mach_is_hp6xx()) {
75 u16 v; 72 u16 v = inw(HD64461_GPADR);
76 v = inw(HD64461_GPADR); 73 v &= ~HD64461_GPADR_SPEAKER;
77 v &= ~HD64461_GPADR_SPEAKER; 74 outw(v, HD64461_GPADR);
78 outw(v, HD64461_GPADR); 75 }
79#endif 76
80 sh_dac_enable(CONFIG_SOUND_SH_DAC_AUDIO_CHANNEL); 77 sh_dac_enable(CONFIG_SOUND_SH_DAC_AUDIO_CHANNEL);
81 ctrl_outw(TMU1_TCR_INIT, TMU1_TCR); 78 ctrl_outw(TMU1_TCR_INIT, TMU1_TCR);
82} 79}
83static void dac_audio_stop(void) 80static void dac_audio_stop(void)
84{ 81{
85#ifdef MACH_HP600
86 u16 v;
87#endif
88 dac_audio_stop_timer(); 82 dac_audio_stop_timer();
89#ifdef MACH_HP600 83
90 v = inw(HD64461_GPADR); 84 if (mach_is_hp6xx()) {
91 v |= HD64461_GPADR_SPEAKER; 85 u16 v = inw(HD64461_GPADR);
92 outw(v, HD64461_GPADR); 86 v |= HD64461_GPADR_SPEAKER;
93#endif 87 outw(v, HD64461_GPADR);
88 }
89
94 sh_dac_disable(CONFIG_SOUND_SH_DAC_AUDIO_CHANNEL); 90 sh_dac_disable(CONFIG_SOUND_SH_DAC_AUDIO_CHANNEL);
95} 91}
96 92