Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/iomd Sad point .... remove RC7500 support from ...



details:   https://anonhg.NetBSD.org/src/rev/7a79e3d9e791
branches:  trunk
changeset: 516161:7a79e3d9e791
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Wed Oct 17 23:28:19 2001 +0000

description:
Sad point .... remove RC7500 support from the iomd directory in the
arch/arm/iomd/* .... the RC7500 isnt really an iomd/vidc machine but has
different video/audio chip and was kind of hardwired/hacked into the other
chip drivers.

diffstat:

 sys/arch/arm/iomd/beep.c               |   45 +------------
 sys/arch/arm/iomd/console/vidcrender.c |  113 +-------------------------------
 sys/arch/arm/iomd/iomd_clock.c         |   12 +---
 sys/arch/arm/iomd/iomd_iic.S           |   10 +--
 sys/arch/arm/iomd/lmcaudio.c           |    7 +-
 sys/arch/arm/iomd/vidc.h               |   24 +------
 sys/arch/arm/iomd/vidc20config.c       |   93 +--------------------------
 sys/arch/arm/iomd/vidcaudio.c          |    6 +-
 8 files changed, 12 insertions(+), 298 deletions(-)

diffs (truncated from 614 to 300 lines):

diff -r a17de6373a31 -r 7a79e3d9e791 sys/arch/arm/iomd/beep.c
--- a/sys/arch/arm/iomd/beep.c  Wed Oct 17 23:21:44 2001 +0000
+++ b/sys/arch/arm/iomd/beep.c  Wed Oct 17 23:28:19 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: beep.c,v 1.1 2001/10/05 22:27:40 reinoud Exp $ */
+/*     $NetBSD: beep.c,v 1.2 2001/10/17 23:28:19 reinoud Exp $ */
 
 /*
  * Copyright (c) 1995 Mark Brinicombe
@@ -32,8 +32,6 @@
 /*
  * Simple beep sounds using VIDC
  *
- * Added support for digital serial sound interface with
- * NS LMC1982 for RC7500
  */
 
 /*
@@ -62,9 +60,6 @@
 #include <arm/iomd/waveform.h>
 #include <arm/iomd/iomdreg.h>
 #include <arm/iomd/iomdvar.h>
-#ifdef RC7500
-#include <arm/iomd/lmc1982.h>
-#endif
 
 #include "beep.h"
 #include "locators.h"
@@ -156,14 +151,6 @@
 
        bcopy(beep_waveform, (void *)sc->sc_buffer0, sizeof(beep_waveform));
 
-#ifdef RC7500
-       /*
-        * Convert 8-bit data in 2's complement.  We should really
-        * need to convert 8 bits to 16 bits.
-        */
-       conv_jap((char *)sc->sc_buffer0, sizeof(beep_waveform));
-#endif
-
        /* Reset the sound DMA channel */
        IOMD_WRITE_WORD(IOMD_SD0CURA, sc->sc_sound_cur0);
        IOMD_WRITE_WORD(IOMD_SD0ENDA, sc->sc_sound_end0 | 0xc0000000);
@@ -176,11 +163,7 @@
        sc->sc_ih.ih_func = beepintr;
        sc->sc_ih.ih_arg = sc;
        sc->sc_ih.ih_level = IPL_AUDIO;
-#ifdef RC7500
-       sc->sc_ih.ih_name = "serial snd dma";
-#else
        sc->sc_ih.ih_name = "dma snd ch 0";
-#endif
 
        if (irq_claim(sdma_channel, &sc->sc_ih))
                panic("Cannot claim IRQ %d for beep%d\n", sdma_channel, parent->dv_unit);
@@ -196,7 +179,6 @@
        WriteWord(vidc_base, VIDC_SFR | 32);
 /*     WriteWord(vidc_base, VIDC_SCR | 0x05);*/
 
-#ifndef RC7500
        /* Set the stereo postions to centred for all channels */
        WriteWord(vidc_base, VIDC_SIR0 | SIR_CENTRE);
        WriteWord(vidc_base, VIDC_SIR1 | SIR_CENTRE);
@@ -206,31 +188,6 @@
        WriteWord(vidc_base, VIDC_SIR5 | SIR_CENTRE);
        WriteWord(vidc_base, VIDC_SIR6 | SIR_CENTRE);
        WriteWord(vidc_base, VIDC_SIR7 | SIR_CENTRE);
-#endif
-
-#ifdef RC7500
-       /*
-        * Enable serial sound.  The digital serial sound interface
-        * consists of 16 bits sample on each channel.  The waveform
-        * data used to generate beep sound is a 8-bits sample.  I
-        * really don't care, since it's just beep sound.
-        */
-       outl(vidc_base, VIDC_SCR | 0x03);
-
-       /*
-        * Video LCD and Serial Sound Mux control.  - Japanese format.
-        */
-       IOMD_WRITE_BYTE(IOMD_VIDMUX, 0x02);
-
-       volume_ctl(VINPUTSEL, VIN1);
-       volume_ctl(VLOUD, 0);
-       volume_ctl(VBASS, VDBM0);
-       volume_ctl(VTREB, VDBM0);
-       volume_ctl(VLEFT, 24);
-       volume_ctl(VRIGHT, 24);
-       volume_ctl(VMODE, VSTEREO);
-       volume_ctl(VDIN, 0);
-#endif
 }
 
 
diff -r a17de6373a31 -r 7a79e3d9e791 sys/arch/arm/iomd/console/vidcrender.c
--- a/sys/arch/arm/iomd/console/vidcrender.c    Wed Oct 17 23:21:44 2001 +0000
+++ b/sys/arch/arm/iomd/console/vidcrender.c    Wed Oct 17 23:28:19 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vidcrender.c,v 1.1 2001/10/05 22:27:45 reinoud Exp $   */
+/*     $NetBSD: vidcrender.c,v 1.2 2001/10/17 23:28:20 reinoud Exp $   */
 
 /*
  * Copyright (c) 1996 Mark Brinicombe
@@ -162,49 +162,14 @@
 /* The table of modes is separately compiled */
 extern struct vidc_mode vidcmodes[];
 #else /* HARDCODEDMODES */
-#ifdef RC7500
-static struct vidc_mode vidcmodes[] = {
-       {31500,/**/48,  84, 30, 640,  30, 0,/**/3, 28, 0, 480, 0, 9,/**/0,/**/3},
-       {36000,/**/72,  84, 34, 800,  34, 0,/**/2, 22, 0, 600, 0, 1,/**/0,/**/3},
-};
-#else /* RC7500 */
+
 /* We have a hard compiled table of modes and a list of definable modes */
 static struct vidc_mode vidcmodes[] = {
        {32500,/**/52,  64, 30, 640,  30, 14,/**/3, 28, 0, 480, 0, 9,/**/0,/**/3},
        {65000,/**/128, 36, 60, 1024, 60 ,36,/**/6, 29, 0, 768, 0, 3,/**/0,/**/3},
 };
-#endif /* RC7500 */
 #endif /* HARDCODEDMODES */
 
-#ifdef RC7500
-struct vfreq {
-       u_int frqcon;
-       int freq;
-};
-
-static struct vfreq vfreq[] = {
-       { VIDFREQ_25_18, 25175},
-       { VIDFREQ_25_18, 25180},
-       { VIDFREQ_28_32, 28320},
-       { VIDFREQ_31_50, 31500},
-       { VIDFREQ_36_00, 36000},
-       { VIDFREQ_40_00, 40000},
-       { VIDFREQ_44_90, 44900},
-       { VIDFREQ_50_00, 50000},
-       { VIDFREQ_65_00, 65000},
-       { VIDFREQ_72_00, 72000},
-       { VIDFREQ_75_00, 75000},
-       { VIDFREQ_77_00, 77000},
-       { VIDFREQ_80_00, 80000},
-       { VIDFREQ_94_50, 94500},
-       { VIDFREQ_110_0, 110000},
-       { VIDFREQ_120_0, 120000},
-       { VIDFREQ_130_0, 130000}
-};
-
-#define NFREQ  (sizeof (vfreq) / sizeof(struct vfreq))
-u_int vfreqcon = 0;
-#else /* RC7500 */
 
 struct fsyn {
        int r, v, f;
@@ -223,7 +188,7 @@
        { 12, 35, 70000 },
        { 0,   0, 00000 }
 };
-#endif /* RC7500 */
+
 
 /*#define mod(x)       (((x) > 0) ? (x) : (-x))*/
 
@@ -336,11 +301,9 @@
 {    
        register int acc;
        int bpp_mask;
-#ifndef RC7500
         int ereg;
 
        int best_r, best_v, best_match;
-#endif
 
 /*
  * Find out what bit mask we need to or with the vidc20 control register
@@ -357,29 +320,6 @@
        newmode = *mode;
        vidc_currentmode = &newmode;
 
-#ifdef RC7500
-       {
-               int i;
-               int old, new;
-               u_int nfreq;
-
-               old = vfreq[0].freq;
-               nfreq = vfreq[0].frqcon;
-               for (i = 0; i < (NFREQ - 1); i++) {
-                       new = vfreq[i].freq - mode->pixel_rate;
-                       if (new < 0)
-                               new = -new;
-                       if (new < old) {
-                               nfreq = vfreq[i].frqcon;
-                               old = new;
-                       }
-                       if (new == 0)
-                               break;
-               }
-               nfreq |= (vfreqcon & 0xf0);
-               vfreqcon = nfreq;
-       }
-#else /* RC7500 */
     /* Program the VCO Look up a preferred value before choosing one */
        {
                int least_error = mod(fsyn_pref[0].f - vidc_currentmode->pixel_rate);
@@ -425,30 +365,10 @@
 /*
        printf ( "best_v = %d  best_r = %d best_f = %d\n", best_v, best_r, best_match );
 */
-#endif /* RC7500 */
 
        if (vc==vconsole_current) {
-#ifdef RC7500
-               outb(FREQCON, vfreqcon);
-               /*
-                * Need to program the control register first.
-                */
-               if (dispsize>1024*1024) {
-                       if (vidc_currentmode->hder>=800)
-                               vidc_write(VIDC_CONREG, 7<<8 | bpp_mask<<5);
-                       else
-                               vidc_write(VIDC_CONREG, 6<<8 | bpp_mask<<5);
-               } else {
-                       vidc_write(VIDC_CONREG, 7<<8 | bpp_mask<<5);
-               }
+               vidc_write(VIDC_FSYNREG, (best_v-1)<<8 | (best_r-1)<<0);
 
-               /*
-                * We don't use VIDC_FSYNREG.  Program it low.
-                */
-               vidc_write(VIDC_FSYNREG, 0x2020);
-#else /* RC7500 */
-               vidc_write(VIDC_FSYNREG, (best_v-1)<<8 | (best_r-1)<<0);
-#endif /* RC7500 */
                acc=0;
                acc+=vidc_currentmode->hswr;    vidc_write(VIDC_HSWR, (acc - 8 ) & (~1));
                acc+=vidc_currentmode->hbsr;    vidc_write(VIDC_HBSR, (acc - 12) & (~1));
@@ -465,13 +385,6 @@
                acc+=vidc_currentmode->vber;    vidc_write(VIDC_VBER, (acc - 1));
                acc+=vidc_currentmode->vcr;     vidc_write(VIDC_VCR,  (acc - 1));
 
-#ifdef RC7500
-               vidc_write(VIDC_DCTL, vidc_currentmode->hder>>2 | 1<<16 | 1<<12);
-               if (vidc_currentmode->hder>=800)
-                       vidc_write(VIDC_EREG, 0x41<<12);
-               else
-                       vidc_write(VIDC_EREG, 0x51<<12);
-#else
                IOMD_WRITE_WORD(IOMD_FSIZE, vidc_currentmode->vcr
                    + vidc_currentmode->vswr
                    + vidc_currentmode->vber
@@ -496,7 +409,6 @@
                } else {
                        vidc_write(VIDC_CONREG, 7<<8 | bpp_mask<<5);
                }
-#endif
        }
 
        R_DATA->mode = *vidc_currentmode;
@@ -975,15 +887,6 @@
 vidcrender_cls(vc)
        struct vconsole *vc;
 {
-#ifdef RC7500
-       dispstart = dispbase;
-       dispend = dispstart+dispsize;
-    
-       IOMD_WRITE_WORD(IOMD_VIDINIT, dispstart-ptov);
-       IOMD_WRITE_WORD(IOMD_VIDSTART, dispstart-ptov);
-       IOMD_WRITE_WORD(IOMD_VIDEND, (dispend-transfersize)-ptov);
-#endif
-    
        vidcrendermc_cls ( (char *)dispstart, (char *)dispstart+R_DATA->screensize, R_DATA->backfillcolour );
     /*
        memset((char *)dispstart,
@@ -1216,16 +1119,13 @@
 vidcrender_cursorintr(arg)
        void *arg;
 {
-#ifndef RC7500
        struct vconsole *vc = arg;
-#endif
        if ( cursor_flash==0 )
                return 0;
 
        /*
         * We don't need this.
         */
-#ifndef RC7500
        if (vconsole_blankcounter >= 0)
                vconsole_blankcounter--;
 
@@ -1233,7 +1133,6 @@
                vconsole_blankcounter=vconsole_blankinit;
                vidcrender_blank ( vc, BLANK_OFF );
        }
-#endif
 
        cursorcounter--;



Home | Main Index | Thread Index | Old Index