2001-07-14 00:38:51 +00:00
|
|
|
/* $NecBSD: bshw_machdep.c,v 1.8.12.6 2001/06/29 06:28:05 honda Exp $ */
|
2003-08-24 17:55:58 +00:00
|
|
|
|
|
|
|
#include <sys/cdefs.h>
|
|
|
|
__FBSDID("$FreeBSD$");
|
2001-02-27 12:34:01 +00:00
|
|
|
/* $NetBSD$ */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* [NetBSD for NEC PC-98 series]
|
2001-07-14 00:38:51 +00:00
|
|
|
* Copyright (c) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
2001-02-27 12:34:01 +00:00
|
|
|
* NetBSD/pc98 porting staff. All rights reserved.
|
|
|
|
*
|
2001-07-14 00:38:51 +00:00
|
|
|
* Copyright (c) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
2001-02-27 12:34:01 +00:00
|
|
|
* Naofumi HONDA. All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
* 3. The name of the author may not be used to endorse or promote products
|
|
|
|
* derived from this software without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
|
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
|
|
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
|
|
|
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
|
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
|
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
|
|
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
|
|
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
* POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "opt_ddb.h"
|
|
|
|
|
|
|
|
#include <sys/param.h>
|
|
|
|
#include <sys/systm.h>
|
|
|
|
#include <sys/kernel.h>
|
2001-07-14 00:38:51 +00:00
|
|
|
#if defined(__FreeBSD__) && __FreeBSD_version > 500001
|
2001-02-27 12:34:01 +00:00
|
|
|
#include <sys/bio.h>
|
2001-07-14 00:38:51 +00:00
|
|
|
#endif /* __ FreeBSD__ */
|
2001-02-27 12:34:01 +00:00
|
|
|
#include <sys/buf.h>
|
|
|
|
#include <sys/queue.h>
|
|
|
|
#include <sys/malloc.h>
|
|
|
|
#include <sys/errno.h>
|
|
|
|
|
|
|
|
#include <vm/vm.h>
|
|
|
|
|
|
|
|
#ifdef __NetBSD__
|
2001-07-14 00:38:51 +00:00
|
|
|
#include <sys/device.h>
|
|
|
|
|
2001-02-27 12:34:01 +00:00
|
|
|
#include <machine/bus.h>
|
|
|
|
#include <machine/intr.h>
|
|
|
|
|
|
|
|
#include <dev/scsipi/scsi_all.h>
|
|
|
|
#include <dev/scsipi/scsipi_all.h>
|
|
|
|
#include <dev/scsipi/scsiconf.h>
|
|
|
|
#include <dev/scsipi/scsi_disk.h>
|
|
|
|
|
|
|
|
#include <machine/dvcfg.h>
|
|
|
|
#include <machine/physio_proc.h>
|
|
|
|
|
|
|
|
#include <i386/Cbus/dev/scsi_low.h>
|
|
|
|
|
|
|
|
#include <dev/ic/wd33c93reg.h>
|
|
|
|
#include <i386/Cbus/dev/ct/ctvar.h>
|
2001-07-14 00:38:51 +00:00
|
|
|
#include <i386/Cbus/dev/ct/ct_machdep.h>
|
2001-02-27 12:34:01 +00:00
|
|
|
#include <i386/Cbus/dev/ct/bshwvar.h>
|
|
|
|
#endif /* __NetBSD__ */
|
|
|
|
|
|
|
|
#ifdef __FreeBSD__
|
|
|
|
#include <machine/bus.h>
|
|
|
|
#include <machine/clock.h>
|
|
|
|
#include <machine/md_var.h>
|
|
|
|
|
2004-03-13 19:46:27 +00:00
|
|
|
#include <compat/netbsd/dvcfg.h>
|
|
|
|
#include <compat/netbsd/physio_proc.h>
|
2001-02-27 12:34:01 +00:00
|
|
|
|
|
|
|
#include <cam/scsi/scsi_low.h>
|
|
|
|
|
2001-06-14 11:05:48 +00:00
|
|
|
#include <dev/ic/wd33c93reg.h>
|
2001-02-27 12:34:01 +00:00
|
|
|
#include <dev/ct/ctvar.h>
|
2001-07-14 00:38:51 +00:00
|
|
|
#include <dev/ct/ct_machdep.h>
|
2001-02-27 12:34:01 +00:00
|
|
|
#include <dev/ct/bshwvar.h>
|
2001-07-14 00:38:51 +00:00
|
|
|
|
|
|
|
#include <vm/pmap.h>
|
|
|
|
#endif /* __FreeBSD__ */
|
|
|
|
|
|
|
|
#define BSHW_IO_CONTROL_FLAGS 0
|
|
|
|
|
|
|
|
u_int bshw_io_control = BSHW_IO_CONTROL_FLAGS;
|
|
|
|
int bshw_data_read_bytes = 4096;
|
|
|
|
int bshw_data_write_bytes = 4096;
|
|
|
|
|
|
|
|
/*********************************************************
|
|
|
|
* OS dep part
|
|
|
|
*********************************************************/
|
|
|
|
#ifdef __NetBSD__
|
|
|
|
#define BSHW_PAGE_SIZE NBPG
|
|
|
|
#endif /* __NetBSD__ */
|
|
|
|
|
|
|
|
#ifdef __FreeBSD__
|
|
|
|
#define BSHW_PAGE_SIZE PAGE_SIZE
|
|
|
|
typedef unsigned long vaddr_t;
|
2001-02-27 12:34:01 +00:00
|
|
|
#endif /* __FreeBSD__ */
|
|
|
|
|
|
|
|
/*********************************************************
|
|
|
|
* GENERIC MACHDEP FUNCTIONS
|
|
|
|
*********************************************************/
|
|
|
|
void
|
2001-07-14 00:38:51 +00:00
|
|
|
bshw_synch_setup(ct, ti)
|
2001-02-27 12:34:01 +00:00
|
|
|
struct ct_softc *ct;
|
2001-07-14 00:38:51 +00:00
|
|
|
struct targ_info *ti;
|
2001-02-27 12:34:01 +00:00
|
|
|
{
|
2001-07-14 00:38:51 +00:00
|
|
|
struct ct_bus_access_handle *chp = &ct->sc_ch;
|
2001-02-27 12:34:01 +00:00
|
|
|
struct ct_targ_info *cti = (void *) ti;
|
|
|
|
struct bshw_softc *bs = ct->ct_hw;
|
|
|
|
struct bshw *hw = bs->sc_hw;
|
|
|
|
|
2001-07-14 00:38:51 +00:00
|
|
|
if (hw->hw_sregaddr == 0)
|
2001-02-27 12:34:01 +00:00
|
|
|
return;
|
|
|
|
|
2001-07-14 00:38:51 +00:00
|
|
|
ct_cr_write_1(chp, hw->hw_sregaddr + ti->ti_id, cti->cti_syncreg);
|
2001-02-27 12:34:01 +00:00
|
|
|
if (hw->hw_flags & BSHW_DOUBLE_DMACHAN)
|
|
|
|
{
|
2001-07-14 00:38:51 +00:00
|
|
|
ct_cr_write_1(chp, hw->hw_sregaddr + ti->ti_id + 8,
|
2001-02-27 12:34:01 +00:00
|
|
|
cti->cti_syncreg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
bshw_bus_reset(ct)
|
|
|
|
struct ct_softc *ct;
|
|
|
|
{
|
|
|
|
struct scsi_low_softc *slp = &ct->sc_sclow;
|
2001-07-14 00:38:51 +00:00
|
|
|
struct ct_bus_access_handle *chp = &ct->sc_ch;
|
2001-02-27 12:34:01 +00:00
|
|
|
struct bshw_softc *bs = ct->ct_hw;
|
|
|
|
struct bshw *hw = bs->sc_hw;
|
|
|
|
bus_addr_t offs;
|
|
|
|
u_int8_t regv;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
/* open hardware busmaster mode */
|
2001-07-14 00:38:51 +00:00
|
|
|
if (hw->hw_dma_init != NULL && ((*hw->hw_dma_init)(ct)) != 0)
|
2001-02-27 12:34:01 +00:00
|
|
|
{
|
2001-07-14 00:38:51 +00:00
|
|
|
printf("%s: change mode using external DMA (%x)\n",
|
|
|
|
slp->sl_xname, (u_int)ct_cr_read_1(chp, 0x37));
|
2001-02-27 12:34:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* clear hardware synch registers */
|
2001-07-14 00:38:51 +00:00
|
|
|
offs = hw->hw_sregaddr;
|
2001-02-27 12:34:01 +00:00
|
|
|
if (offs != 0)
|
|
|
|
{
|
|
|
|
for (i = 0; i < 8; i ++, offs ++)
|
|
|
|
{
|
2001-07-14 00:38:51 +00:00
|
|
|
ct_cr_write_1(chp, offs, 0);
|
2001-02-27 12:34:01 +00:00
|
|
|
if ((hw->hw_flags & BSHW_DOUBLE_DMACHAN) != 0)
|
2001-07-14 00:38:51 +00:00
|
|
|
ct_cr_write_1(chp, offs + 8, 0);
|
2001-02-27 12:34:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* disable interrupt & assert reset */
|
2001-07-14 00:38:51 +00:00
|
|
|
regv = ct_cr_read_1(chp, wd3s_mbank);
|
2001-02-27 12:34:01 +00:00
|
|
|
regv |= MBR_RST;
|
|
|
|
regv &= ~MBR_IEN;
|
2001-07-14 00:38:51 +00:00
|
|
|
ct_cr_write_1(chp, wd3s_mbank, regv);
|
2001-02-27 12:34:01 +00:00
|
|
|
|
2001-07-14 00:38:51 +00:00
|
|
|
SCSI_LOW_DELAY(500000);
|
2001-02-27 12:34:01 +00:00
|
|
|
|
|
|
|
/* reset signal off */
|
|
|
|
regv &= ~MBR_RST;
|
2001-07-14 00:38:51 +00:00
|
|
|
ct_cr_write_1(chp, wd3s_mbank, regv);
|
2001-02-27 12:34:01 +00:00
|
|
|
|
|
|
|
/* interrupt enable */
|
|
|
|
regv |= MBR_IEN;
|
2001-07-14 00:38:51 +00:00
|
|
|
ct_cr_write_1(chp, wd3s_mbank, regv);
|
2001-02-27 12:34:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* probe */
|
|
|
|
int
|
2001-07-14 00:38:51 +00:00
|
|
|
bshw_read_settings(chp, bs)
|
|
|
|
struct ct_bus_access_handle *chp;
|
2001-02-27 12:34:01 +00:00
|
|
|
struct bshw_softc *bs;
|
|
|
|
{
|
|
|
|
static int irq_tbl[] = { 3, 5, 6, 9, 12, 13 };
|
|
|
|
|
2001-07-14 00:38:51 +00:00
|
|
|
bs->sc_hostid = (ct_cr_read_1(chp, wd3s_auxc) & AUXCR_HIDM);
|
|
|
|
bs->sc_irq = irq_tbl[(ct_cr_read_1(chp, wd3s_auxc) >> 3) & 7];
|
|
|
|
bs->sc_drq = ct_cmdp_read_1(chp) & 3;
|
2001-02-27 12:34:01 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************
|
|
|
|
* DMA PIO TRANSFER (SMIT)
|
|
|
|
*********************************************************/
|
|
|
|
#define LC_SMIT_TIMEOUT 2 /* 2 sec: timeout for a fifo status ready */
|
|
|
|
#define LC_SMIT_OFFSET 0x1000
|
|
|
|
#define LC_FSZ DEV_BSIZE
|
|
|
|
#define LC_SFSZ 0x0c
|
|
|
|
#define LC_REST (LC_FSZ - LC_SFSZ)
|
|
|
|
|
|
|
|
#define BSHW_LC_FSET 0x36
|
|
|
|
#define BSHW_LC_FCTRL 0x44
|
|
|
|
#define FCTRL_EN 0x01
|
|
|
|
#define FCTRL_WRITE 0x02
|
|
|
|
|
|
|
|
#define SF_ABORT 0x08
|
|
|
|
#define SF_RDY 0x10
|
|
|
|
|
2002-03-20 02:08:01 +00:00
|
|
|
static __inline void bshw_lc_smit_start(struct ct_softc *, int, u_int);
|
|
|
|
static __inline void bshw_lc_smit_stop(struct ct_softc *);
|
|
|
|
static int bshw_lc_smit_fstat(struct ct_softc *, int, int);
|
2001-02-27 12:34:01 +00:00
|
|
|
|
|
|
|
static __inline void
|
|
|
|
bshw_lc_smit_stop(ct)
|
|
|
|
struct ct_softc *ct;
|
|
|
|
{
|
2001-07-14 00:38:51 +00:00
|
|
|
struct ct_bus_access_handle *chp = &ct->sc_ch;
|
2001-02-27 12:34:01 +00:00
|
|
|
|
2001-07-14 00:38:51 +00:00
|
|
|
ct_cr_write_1(chp, BSHW_LC_FCTRL, 0);
|
|
|
|
ct_cmdp_write_1(chp, CMDP_DMER);
|
2001-02-27 12:34:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static __inline void
|
|
|
|
bshw_lc_smit_start(ct, count, direction)
|
|
|
|
struct ct_softc *ct;
|
|
|
|
int count;
|
|
|
|
u_int direction;
|
|
|
|
{
|
2001-07-14 00:38:51 +00:00
|
|
|
struct ct_bus_access_handle *chp = &ct->sc_ch;
|
2001-02-27 12:34:01 +00:00
|
|
|
u_int8_t pval, val;
|
|
|
|
|
2001-07-14 00:38:51 +00:00
|
|
|
val = ct_cr_read_1(chp, BSHW_LC_FSET);
|
|
|
|
cthw_set_count(chp, count);
|
2001-02-27 12:34:01 +00:00
|
|
|
|
|
|
|
pval = FCTRL_EN;
|
|
|
|
if (direction == SCSI_LOW_WRITE)
|
|
|
|
pval |= (val & 0xe0) | FCTRL_WRITE;
|
2001-07-14 00:38:51 +00:00
|
|
|
ct_cr_write_1(chp, BSHW_LC_FCTRL, pval);
|
|
|
|
ct_cr_write_1(chp, wd3s_cmd, WD3S_TFR_INFO);
|
2001-02-27 12:34:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
bshw_lc_smit_fstat(ct, wc, read)
|
|
|
|
struct ct_softc *ct;
|
|
|
|
int wc, read;
|
|
|
|
{
|
2001-07-14 00:38:51 +00:00
|
|
|
struct ct_bus_access_handle *chp = &ct->sc_ch;
|
2001-02-27 12:34:01 +00:00
|
|
|
u_int8_t stat;
|
|
|
|
|
|
|
|
while (wc -- > 0)
|
|
|
|
{
|
2001-07-14 00:38:51 +00:00
|
|
|
chp->ch_bus_weight(chp);
|
|
|
|
stat = ct_cmdp_read_1(chp);
|
2001-02-27 12:34:01 +00:00
|
|
|
if (read == SCSI_LOW_READ)
|
|
|
|
{
|
|
|
|
if ((stat & SF_RDY) != 0)
|
|
|
|
return 0;
|
|
|
|
if ((stat & SF_ABORT) != 0)
|
|
|
|
return EIO;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if ((stat & SF_ABORT) != 0)
|
|
|
|
return EIO;
|
|
|
|
if ((stat & SF_RDY) != 0)
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
printf("%s: SMIT fifo status timeout\n", ct->sc_sclow.sl_xname);
|
|
|
|
return EIO;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
bshw_smit_xfer_stop(ct)
|
|
|
|
struct ct_softc *ct;
|
|
|
|
{
|
|
|
|
struct scsi_low_softc *slp = &ct->sc_sclow;
|
|
|
|
struct bshw_softc *bs = ct->ct_hw;
|
|
|
|
struct targ_info *ti;
|
|
|
|
struct sc_p *sp = &slp->sl_scp;
|
|
|
|
u_int count;
|
|
|
|
|
|
|
|
bshw_lc_smit_stop(ct);
|
|
|
|
|
2001-07-14 00:38:51 +00:00
|
|
|
ti = slp->sl_Tnexus;
|
2001-02-27 12:34:01 +00:00
|
|
|
if (ti == NULL)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (ti->ti_phase == PH_DATA)
|
|
|
|
{
|
2001-07-14 00:38:51 +00:00
|
|
|
count = cthw_get_count(&ct->sc_ch);
|
|
|
|
if (count < bs->sc_sdatalen)
|
2001-02-27 12:34:01 +00:00
|
|
|
{
|
|
|
|
if (sp->scp_direction == SCSI_LOW_READ &&
|
2001-07-14 00:38:51 +00:00
|
|
|
count != bs->sc_edatalen)
|
2001-02-27 12:34:01 +00:00
|
|
|
goto bad;
|
2001-07-14 00:38:51 +00:00
|
|
|
|
|
|
|
count = bs->sc_sdatalen - count;
|
|
|
|
if (count > (u_int) sp->scp_datalen)
|
|
|
|
goto bad;
|
|
|
|
|
|
|
|
sp->scp_data += count;
|
|
|
|
sp->scp_datalen -= count;
|
2001-02-27 12:34:01 +00:00
|
|
|
}
|
2001-07-14 00:38:51 +00:00
|
|
|
else if (count > bs->sc_sdatalen)
|
2001-02-27 12:34:01 +00:00
|
|
|
{
|
2001-07-14 00:38:51 +00:00
|
|
|
bad:
|
|
|
|
printf("%s: smit_xfer_end: cnt error\n", slp->sl_xname);
|
|
|
|
slp->sl_error |= PDMAERR;
|
2001-02-27 12:34:01 +00:00
|
|
|
}
|
2001-07-14 00:38:51 +00:00
|
|
|
scsi_low_data_finish(slp);
|
2001-02-27 12:34:01 +00:00
|
|
|
}
|
|
|
|
else
|
2001-07-14 00:38:51 +00:00
|
|
|
{
|
|
|
|
printf("%s: smit_xfer_end: phase miss\n", slp->sl_xname);
|
|
|
|
slp->sl_error |= PDMAERR;
|
|
|
|
}
|
2001-02-27 12:34:01 +00:00
|
|
|
}
|
|
|
|
|
2001-07-14 00:38:51 +00:00
|
|
|
int
|
2001-02-27 12:34:01 +00:00
|
|
|
bshw_smit_xfer_start(ct)
|
|
|
|
struct ct_softc *ct;
|
|
|
|
{
|
|
|
|
struct scsi_low_softc *slp = &ct->sc_sclow;
|
2001-07-14 00:38:51 +00:00
|
|
|
struct ct_bus_access_handle *chp = &ct->sc_ch;
|
2001-02-27 12:34:01 +00:00
|
|
|
struct bshw_softc *bs = ct->ct_hw;
|
|
|
|
struct sc_p *sp = &slp->sl_scp;
|
2001-07-14 00:38:51 +00:00
|
|
|
struct targ_info *ti = slp->sl_Tnexus;
|
2001-02-27 12:34:01 +00:00
|
|
|
struct ct_targ_info *cti = (void *) ti;
|
2001-07-14 00:38:51 +00:00
|
|
|
u_int datalen, count, io_control;
|
|
|
|
int wc;
|
2001-02-27 12:34:01 +00:00
|
|
|
u_int8_t *data;
|
|
|
|
|
2001-07-14 00:38:51 +00:00
|
|
|
io_control = bs->sc_io_control | bshw_io_control;
|
|
|
|
if ((io_control & BSHW_SMIT_BLOCK) != 0)
|
|
|
|
return EINVAL;
|
|
|
|
|
|
|
|
if ((slp->sl_scp.scp_datalen % DEV_BSIZE) != 0)
|
|
|
|
return EINVAL;
|
|
|
|
|
2001-02-27 12:34:01 +00:00
|
|
|
datalen = sp->scp_datalen;
|
2001-07-14 00:38:51 +00:00
|
|
|
if (slp->sl_scp.scp_direction == SCSI_LOW_READ)
|
|
|
|
{
|
|
|
|
if ((io_control & BSHW_READ_INTERRUPT_DRIVEN) != 0 &&
|
|
|
|
datalen > bshw_data_read_bytes)
|
|
|
|
datalen = bshw_data_read_bytes;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if ((io_control & BSHW_WRITE_INTERRUPT_DRIVEN) != 0 &&
|
|
|
|
datalen > bshw_data_write_bytes)
|
|
|
|
datalen = bshw_data_write_bytes;
|
|
|
|
}
|
|
|
|
|
|
|
|
bs->sc_sdatalen = datalen;
|
|
|
|
data = sp->scp_data;
|
|
|
|
wc = LC_SMIT_TIMEOUT * 1024 * 1024;
|
2001-02-27 12:34:01 +00:00
|
|
|
|
2001-07-14 00:38:51 +00:00
|
|
|
ct_cr_write_1(chp, wd3s_ctrl, ct->sc_creg | CR_DMA);
|
|
|
|
bshw_lc_smit_start(ct, datalen, sp->scp_direction);
|
2001-02-27 12:34:01 +00:00
|
|
|
|
|
|
|
if (sp->scp_direction == SCSI_LOW_READ)
|
|
|
|
{
|
|
|
|
do
|
|
|
|
{
|
|
|
|
if (bshw_lc_smit_fstat(ct, wc, SCSI_LOW_READ))
|
|
|
|
break;
|
|
|
|
|
|
|
|
count = (datalen > LC_FSZ ? LC_FSZ : datalen);
|
2001-07-14 00:38:51 +00:00
|
|
|
bus_space_read_region_4(chp->ch_memt, chp->ch_memh,
|
2001-02-27 12:34:01 +00:00
|
|
|
LC_SMIT_OFFSET, (u_int32_t *) data, count >> 2);
|
|
|
|
data += count;
|
|
|
|
datalen -= count;
|
|
|
|
}
|
|
|
|
while (datalen > 0);
|
|
|
|
|
2001-07-14 00:38:51 +00:00
|
|
|
bs->sc_edatalen = datalen;
|
2001-02-27 12:34:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
do
|
|
|
|
{
|
|
|
|
if (bshw_lc_smit_fstat(ct, wc, SCSI_LOW_WRITE))
|
|
|
|
break;
|
|
|
|
if (cti->cti_syncreg == 0)
|
|
|
|
{
|
|
|
|
/* XXX:
|
|
|
|
* If async transfer, reconfirm a scsi phase
|
|
|
|
* again. Unless C bus might hang up.
|
|
|
|
*/
|
|
|
|
if (bshw_lc_smit_fstat(ct, wc, SCSI_LOW_WRITE))
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
count = (datalen > LC_SFSZ ? LC_SFSZ : datalen);
|
2001-07-14 00:38:51 +00:00
|
|
|
bus_space_write_region_4(chp->ch_memt, chp->ch_memh,
|
2001-02-27 12:34:01 +00:00
|
|
|
LC_SMIT_OFFSET, (u_int32_t *) data, count >> 2);
|
|
|
|
data += count;
|
|
|
|
datalen -= count;
|
|
|
|
|
|
|
|
if (bshw_lc_smit_fstat(ct, wc, SCSI_LOW_WRITE))
|
|
|
|
break;
|
|
|
|
|
|
|
|
count = (datalen > LC_REST ? LC_REST : datalen);
|
2001-07-14 00:38:51 +00:00
|
|
|
bus_space_write_region_4(chp->ch_memt, chp->ch_memh,
|
2001-02-27 12:34:01 +00:00
|
|
|
LC_SMIT_OFFSET + LC_SFSZ,
|
|
|
|
(u_int32_t *) data, count >> 2);
|
|
|
|
data += count;
|
|
|
|
datalen -= count;
|
|
|
|
}
|
|
|
|
while (datalen > 0);
|
|
|
|
}
|
2001-07-14 00:38:51 +00:00
|
|
|
return 0;
|
2001-02-27 12:34:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*********************************************************
|
|
|
|
* DMA TRANSFER (BS)
|
|
|
|
*********************************************************/
|
2001-07-14 00:38:51 +00:00
|
|
|
static __inline void bshw_dma_write_1 \
|
2002-03-20 02:08:01 +00:00
|
|
|
(struct ct_bus_access_handle *, bus_addr_t, u_int8_t);
|
|
|
|
static void bshw_dmastart(struct ct_softc *);
|
|
|
|
static void bshw_dmadone(struct ct_softc *);
|
2001-02-27 12:34:01 +00:00
|
|
|
|
2001-07-14 00:38:51 +00:00
|
|
|
int
|
2001-02-27 12:34:01 +00:00
|
|
|
bshw_dma_xfer_start(ct)
|
|
|
|
struct ct_softc *ct;
|
|
|
|
{
|
|
|
|
struct scsi_low_softc *slp = &ct->sc_sclow;
|
|
|
|
struct sc_p *sp = &slp->sl_scp;
|
2001-07-14 00:38:51 +00:00
|
|
|
struct ct_bus_access_handle *chp = &ct->sc_ch;
|
2001-02-27 12:34:01 +00:00
|
|
|
struct bshw_softc *bs = ct->ct_hw;
|
|
|
|
vaddr_t va, endva, phys, nphys;
|
2001-07-14 00:38:51 +00:00
|
|
|
u_int io_control;
|
|
|
|
|
|
|
|
io_control = bs->sc_io_control | bshw_io_control;
|
|
|
|
if ((io_control & BSHW_DMA_BLOCK) != 0 && sp->scp_datalen < 256)
|
|
|
|
return EINVAL;
|
2001-02-27 12:34:01 +00:00
|
|
|
|
2001-07-14 00:38:51 +00:00
|
|
|
ct_cr_write_1(chp, wd3s_ctrl, ct->sc_creg | CR_DMA);
|
2001-02-27 12:34:01 +00:00
|
|
|
phys = vtophys((vaddr_t) sp->scp_data);
|
|
|
|
if (phys >= bs->sc_minphys)
|
|
|
|
{
|
|
|
|
/* setup segaddr */
|
|
|
|
bs->sc_segaddr = bs->sc_bounce_phys;
|
|
|
|
/* setup seglen */
|
|
|
|
bs->sc_seglen = sp->scp_datalen;
|
|
|
|
if (bs->sc_seglen > bs->sc_bounce_size)
|
|
|
|
bs->sc_seglen = bs->sc_bounce_size;
|
|
|
|
/* setup bufp */
|
|
|
|
bs->sc_bufp = bs->sc_bounce_addr;
|
|
|
|
if (sp->scp_direction == SCSI_LOW_WRITE)
|
|
|
|
bcopy(sp->scp_data, bs->sc_bufp, bs->sc_seglen);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* setup segaddr */
|
|
|
|
bs->sc_segaddr = (u_int8_t *) phys;
|
|
|
|
/* setup seglen */
|
2001-07-14 00:38:51 +00:00
|
|
|
endva = (vaddr_t) round_page((vaddr_t) sp->scp_data + sp->scp_datalen);
|
2001-02-27 12:34:01 +00:00
|
|
|
for (va = (vaddr_t) sp->scp_data; ; phys = nphys)
|
|
|
|
{
|
2001-07-14 00:38:51 +00:00
|
|
|
if ((va += BSHW_PAGE_SIZE) >= endva)
|
2001-02-27 12:34:01 +00:00
|
|
|
{
|
|
|
|
bs->sc_seglen = sp->scp_datalen;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
nphys = vtophys(va);
|
2001-07-14 00:38:51 +00:00
|
|
|
if (phys + BSHW_PAGE_SIZE != nphys || nphys >= bs->sc_minphys)
|
2001-02-27 12:34:01 +00:00
|
|
|
{
|
|
|
|
bs->sc_seglen =
|
|
|
|
(u_int8_t *) trunc_page(va) - sp->scp_data;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/* setup bufp */
|
|
|
|
bs->sc_bufp = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
bshw_dmastart(ct);
|
2001-07-14 00:38:51 +00:00
|
|
|
cthw_set_count(chp, bs->sc_seglen);
|
|
|
|
ct_cr_write_1(chp, wd3s_cmd, WD3S_TFR_INFO);
|
|
|
|
return 0;
|
2001-02-27 12:34:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
bshw_dma_xfer_stop(ct)
|
|
|
|
struct ct_softc *ct;
|
|
|
|
{
|
|
|
|
struct scsi_low_softc *slp = &ct->sc_sclow;
|
|
|
|
struct sc_p *sp = &slp->sl_scp;
|
|
|
|
struct bshw_softc *bs = ct->ct_hw;
|
|
|
|
struct targ_info *ti;
|
|
|
|
u_int count, transbytes;
|
|
|
|
|
|
|
|
bshw_dmadone(ct);
|
|
|
|
|
2001-07-14 00:38:51 +00:00
|
|
|
ti = slp->sl_Tnexus;
|
2001-02-27 12:34:01 +00:00
|
|
|
if (ti == NULL)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (ti->ti_phase == PH_DATA)
|
|
|
|
{
|
2001-07-14 00:38:51 +00:00
|
|
|
count = cthw_get_count(&ct->sc_ch);
|
2001-02-27 12:34:01 +00:00
|
|
|
if (count < (u_int) bs->sc_seglen)
|
|
|
|
{
|
|
|
|
transbytes = bs->sc_seglen - count;
|
|
|
|
if (bs->sc_bufp != NULL &&
|
|
|
|
sp->scp_direction == SCSI_LOW_READ)
|
|
|
|
bcopy(bs->sc_bufp, sp->scp_data, transbytes);
|
|
|
|
|
|
|
|
sp->scp_data += transbytes;
|
|
|
|
sp->scp_datalen -= transbytes;
|
|
|
|
}
|
2001-07-14 00:38:51 +00:00
|
|
|
else if (count > (u_int) bs->sc_seglen)
|
2001-02-27 12:34:01 +00:00
|
|
|
{
|
2001-07-14 00:38:51 +00:00
|
|
|
printf("%s: port data %x != seglen %x\n",
|
|
|
|
slp->sl_xname, count, bs->sc_seglen);
|
|
|
|
slp->sl_error |= PDMAERR;
|
2001-02-27 12:34:01 +00:00
|
|
|
}
|
|
|
|
|
2001-07-14 00:38:51 +00:00
|
|
|
scsi_low_data_finish(slp);
|
2001-02-27 12:34:01 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
printf("%s: extra DMA interrupt\n", slp->sl_xname);
|
2001-07-14 00:38:51 +00:00
|
|
|
slp->sl_error |= PDMAERR;
|
2001-02-27 12:34:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bs->sc_bufp = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* common dma settings */
|
|
|
|
#undef DMA1_SMSK
|
|
|
|
#define DMA1_SMSK (0x15)
|
|
|
|
#undef DMA1_MODE
|
|
|
|
#define DMA1_MODE (0x17)
|
|
|
|
#undef DMA1_FFC
|
|
|
|
#define DMA1_FFC (0x19)
|
|
|
|
#undef DMA1_CHN
|
|
|
|
#define DMA1_CHN(c) (0x01 + ((c) << 2))
|
|
|
|
|
|
|
|
#define DMA37SM_SET 0x04
|
|
|
|
#define DMA37MD_WRITE 0x04
|
|
|
|
#define DMA37MD_READ 0x08
|
|
|
|
#define DMA37MD_SINGLE 0x40
|
|
|
|
|
2001-07-14 00:38:51 +00:00
|
|
|
static bus_addr_t dmapageport[4] = { 0x27, 0x21, 0x23, 0x25 };
|
|
|
|
|
|
|
|
static __inline void
|
|
|
|
bshw_dma_write_1(chp, port, val)
|
|
|
|
struct ct_bus_access_handle *chp;
|
|
|
|
bus_addr_t port;
|
|
|
|
u_int8_t val;
|
|
|
|
{
|
|
|
|
|
|
|
|
CT_BUS_WEIGHT(chp);
|
|
|
|
outb(port, val);
|
|
|
|
}
|
|
|
|
|
2001-02-27 12:34:01 +00:00
|
|
|
static void
|
|
|
|
bshw_dmastart(ct)
|
|
|
|
struct ct_softc *ct;
|
|
|
|
{
|
|
|
|
struct scsi_low_softc *slp = &ct->sc_sclow;
|
|
|
|
struct bshw_softc *bs = ct->ct_hw;
|
2001-07-14 00:38:51 +00:00
|
|
|
struct ct_bus_access_handle *chp = &ct->sc_ch;
|
2001-02-27 12:34:01 +00:00
|
|
|
int chan = bs->sc_drq;
|
2001-07-14 00:38:51 +00:00
|
|
|
bus_addr_t waport;
|
|
|
|
u_int8_t regv, *phys = bs->sc_segaddr;
|
2001-02-27 12:34:01 +00:00
|
|
|
u_int nbytes = bs->sc_seglen;
|
|
|
|
|
2001-07-14 00:38:51 +00:00
|
|
|
/* flush cpu cache */
|
|
|
|
(*bs->sc_dmasync_before) (ct);
|
|
|
|
|
2001-02-27 12:34:01 +00:00
|
|
|
/*
|
|
|
|
* Program one of DMA channels 0..3. These are
|
|
|
|
* byte mode channels.
|
|
|
|
*/
|
|
|
|
/* set dma channel mode, and reset address ff */
|
|
|
|
|
|
|
|
if (slp->sl_scp.scp_direction == SCSI_LOW_READ)
|
2001-07-14 00:38:51 +00:00
|
|
|
regv = DMA37MD_WRITE | DMA37MD_SINGLE | chan;
|
2001-02-27 12:34:01 +00:00
|
|
|
else
|
2001-07-14 00:38:51 +00:00
|
|
|
regv = DMA37MD_READ | DMA37MD_SINGLE | chan;
|
|
|
|
|
|
|
|
bshw_dma_write_1(chp, DMA1_MODE, regv);
|
|
|
|
bshw_dma_write_1(chp, DMA1_FFC, 0);
|
2001-02-27 12:34:01 +00:00
|
|
|
|
|
|
|
/* send start address */
|
|
|
|
waport = DMA1_CHN(chan);
|
2001-07-14 00:38:51 +00:00
|
|
|
bshw_dma_write_1(chp, waport, (u_int) phys);
|
|
|
|
bshw_dma_write_1(chp, waport, ((u_int) phys) >> 8);
|
|
|
|
bshw_dma_write_1(chp, dmapageport[chan], ((u_int) phys) >> 16);
|
2001-02-27 12:34:01 +00:00
|
|
|
|
|
|
|
/* send count */
|
2001-07-14 00:38:51 +00:00
|
|
|
bshw_dma_write_1(chp, waport + 2, --nbytes);
|
|
|
|
bshw_dma_write_1(chp, waport + 2, nbytes >> 8);
|
2001-02-27 12:34:01 +00:00
|
|
|
|
|
|
|
/* vendor unique hook */
|
2001-07-14 00:38:51 +00:00
|
|
|
if (bs->sc_hw->hw_dma_start)
|
|
|
|
(*bs->sc_hw->hw_dma_start)(ct);
|
2001-02-27 12:34:01 +00:00
|
|
|
|
2001-07-14 00:38:51 +00:00
|
|
|
bshw_dma_write_1(chp, DMA1_SMSK, chan);
|
|
|
|
ct_cmdp_write_1(chp, CMDP_DMES);
|
2001-02-27 12:34:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
bshw_dmadone(ct)
|
|
|
|
struct ct_softc *ct;
|
|
|
|
{
|
|
|
|
struct bshw_softc *bs = ct->ct_hw;
|
2001-07-14 00:38:51 +00:00
|
|
|
struct ct_bus_access_handle *chp = &ct->sc_ch;
|
2001-02-27 12:34:01 +00:00
|
|
|
|
2001-07-14 00:38:51 +00:00
|
|
|
bshw_dma_write_1(chp, DMA1_SMSK, (bs->sc_drq | DMA37SM_SET));
|
|
|
|
ct_cmdp_write_1(chp, CMDP_DMER);
|
2001-02-27 12:34:01 +00:00
|
|
|
|
|
|
|
/* vendor unique hook */
|
2001-07-14 00:38:51 +00:00
|
|
|
if (bs->sc_hw->hw_dma_stop)
|
|
|
|
(*bs->sc_hw->hw_dma_stop) (ct);
|
2001-02-27 12:34:01 +00:00
|
|
|
|
2001-07-14 00:38:51 +00:00
|
|
|
/* flush cpu cache */
|
|
|
|
(*bs->sc_dmasync_after) (ct);
|
2001-02-27 12:34:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**********************************************
|
|
|
|
* VENDOR UNIQUE DMA FUNCS
|
|
|
|
**********************************************/
|
2002-03-20 02:08:01 +00:00
|
|
|
static int bshw_dma_init_sc98(struct ct_softc *);
|
|
|
|
static void bshw_dma_start_sc98(struct ct_softc *);
|
|
|
|
static void bshw_dma_stop_sc98(struct ct_softc *);
|
|
|
|
static int bshw_dma_init_texa(struct ct_softc *);
|
|
|
|
static void bshw_dma_start_elecom(struct ct_softc *);
|
|
|
|
static void bshw_dma_stop_elecom(struct ct_softc *);
|
2001-02-27 12:34:01 +00:00
|
|
|
|
|
|
|
static int
|
|
|
|
bshw_dma_init_texa(ct)
|
|
|
|
struct ct_softc *ct;
|
|
|
|
{
|
2001-07-14 00:38:51 +00:00
|
|
|
struct ct_bus_access_handle *chp = &ct->sc_ch;
|
2001-02-27 12:34:01 +00:00
|
|
|
u_int8_t regval;
|
|
|
|
|
2001-07-14 00:38:51 +00:00
|
|
|
if ((regval = ct_cr_read_1(chp, 0x37)) & 0x08)
|
2001-02-27 12:34:01 +00:00
|
|
|
return 0;
|
|
|
|
|
2001-07-14 00:38:51 +00:00
|
|
|
ct_cr_write_1(chp, 0x37, regval | 0x08);
|
|
|
|
regval = ct_cr_read_1(chp, 0x3f);
|
|
|
|
ct_cr_write_1(chp, 0x3f, regval | 0x08);
|
2001-02-27 12:34:01 +00:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
bshw_dma_init_sc98(ct)
|
|
|
|
struct ct_softc *ct;
|
|
|
|
{
|
2001-07-14 00:38:51 +00:00
|
|
|
struct ct_bus_access_handle *chp = &ct->sc_ch;
|
2001-02-27 12:34:01 +00:00
|
|
|
|
2001-07-14 00:38:51 +00:00
|
|
|
if (ct_cr_read_1(chp, 0x37) & 0x08)
|
2001-02-27 12:34:01 +00:00
|
|
|
return 0;
|
|
|
|
|
|
|
|
/* If your card is SC98 with bios ver 1.01 or 1.02 under no PCI */
|
2001-07-14 00:38:51 +00:00
|
|
|
ct_cr_write_1(chp, 0x37, 0x1a);
|
|
|
|
ct_cr_write_1(chp, 0x3f, 0x1a);
|
2001-02-27 12:34:01 +00:00
|
|
|
#if 0
|
|
|
|
/* only valid for IO */
|
2001-07-14 00:38:51 +00:00
|
|
|
ct_cr_write_1(chp, 0x40, 0xf4);
|
|
|
|
ct_cr_write_1(chp, 0x41, 0x9);
|
|
|
|
ct_cr_write_1(chp, 0x43, 0xff);
|
|
|
|
ct_cr_write_1(chp, 0x46, 0x4e);
|
|
|
|
|
|
|
|
ct_cr_write_1(chp, 0x48, 0xf4);
|
|
|
|
ct_cr_write_1(chp, 0x49, 0x9);
|
|
|
|
ct_cr_write_1(chp, 0x4b, 0xff);
|
|
|
|
ct_cr_write_1(chp, 0x4e, 0x4e);
|
2001-02-27 12:34:01 +00:00
|
|
|
#endif
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
bshw_dma_start_sc98(ct)
|
|
|
|
struct ct_softc *ct;
|
|
|
|
{
|
2001-07-14 00:38:51 +00:00
|
|
|
struct ct_bus_access_handle *chp = &ct->sc_ch;
|
2001-02-27 12:34:01 +00:00
|
|
|
|
2001-07-14 00:38:51 +00:00
|
|
|
ct_cr_write_1(chp, 0x73, 0x32);
|
|
|
|
ct_cr_write_1(chp, 0x74, 0x23);
|
2001-02-27 12:34:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
bshw_dma_stop_sc98(ct)
|
|
|
|
struct ct_softc *ct;
|
|
|
|
{
|
2001-07-14 00:38:51 +00:00
|
|
|
struct ct_bus_access_handle *chp = &ct->sc_ch;
|
2001-02-27 12:34:01 +00:00
|
|
|
|
2001-07-14 00:38:51 +00:00
|
|
|
ct_cr_write_1(chp, 0x73, 0x43);
|
|
|
|
ct_cr_write_1(chp, 0x74, 0x34);
|
2001-02-27 12:34:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
bshw_dma_start_elecom(ct)
|
|
|
|
struct ct_softc *ct;
|
|
|
|
{
|
2001-07-14 00:38:51 +00:00
|
|
|
struct ct_bus_access_handle *chp = &ct->sc_ch;
|
|
|
|
u_int8_t tmp = ct_cr_read_1(chp, 0x4c);
|
2001-02-27 12:34:01 +00:00
|
|
|
|
2001-07-14 00:38:51 +00:00
|
|
|
ct_cr_write_1(chp, 0x32, tmp & 0xdf);
|
2001-02-27 12:34:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
bshw_dma_stop_elecom(ct)
|
|
|
|
struct ct_softc *ct;
|
|
|
|
{
|
2001-07-14 00:38:51 +00:00
|
|
|
struct ct_bus_access_handle *chp = &ct->sc_ch;
|
|
|
|
u_int8_t tmp = ct_cr_read_1(chp, 0x4c);
|
2001-02-27 12:34:01 +00:00
|
|
|
|
2001-07-14 00:38:51 +00:00
|
|
|
ct_cr_write_1(chp, 0x32, tmp | 0x20);
|
2001-02-27 12:34:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static struct bshw bshw_generic = {
|
|
|
|
BSHW_SYNC_RELOAD,
|
|
|
|
|
|
|
|
0,
|
|
|
|
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct bshw bshw_sc98 = {
|
|
|
|
BSHW_DOUBLE_DMACHAN,
|
|
|
|
|
|
|
|
0x60,
|
|
|
|
|
|
|
|
bshw_dma_init_sc98,
|
|
|
|
bshw_dma_start_sc98,
|
|
|
|
bshw_dma_stop_sc98,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct bshw bshw_texa = {
|
|
|
|
BSHW_DOUBLE_DMACHAN,
|
|
|
|
|
|
|
|
0x60,
|
|
|
|
|
|
|
|
bshw_dma_init_texa,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct bshw bshw_elecom = {
|
|
|
|
0,
|
|
|
|
|
|
|
|
0x38,
|
|
|
|
|
|
|
|
NULL,
|
|
|
|
bshw_dma_start_elecom,
|
|
|
|
bshw_dma_stop_elecom,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct bshw bshw_lc_smit = {
|
|
|
|
BSHW_SMFIFO | BSHW_DOUBLE_DMACHAN,
|
|
|
|
|
|
|
|
0x60,
|
|
|
|
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct bshw bshw_lha20X = {
|
|
|
|
BSHW_DOUBLE_DMACHAN,
|
|
|
|
|
|
|
|
0x60,
|
|
|
|
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
};
|
|
|
|
|
|
|
|
/* hw tabs */
|
|
|
|
static dvcfg_hw_t bshw_hwsel_array[] = {
|
|
|
|
/* 0x00 */ &bshw_generic,
|
|
|
|
/* 0x01 */ &bshw_sc98,
|
|
|
|
/* 0x02 */ &bshw_texa,
|
|
|
|
/* 0x03 */ &bshw_elecom,
|
|
|
|
/* 0x04 */ &bshw_lc_smit,
|
|
|
|
/* 0x05 */ &bshw_lha20X,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct dvcfg_hwsel bshw_hwsel = {
|
|
|
|
DVCFG_HWSEL_SZ(bshw_hwsel_array),
|
|
|
|
bshw_hwsel_array
|
|
|
|
};
|