Deleted Added
full compact
ata-dma.c (56744) ata-dma.c (56754)
1/*-
2 * Copyright (c) 1998,1999,2000 S�ren Schmidt
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
1/*-
2 * Copyright (c) 1998,1999,2000 S�ren Schmidt
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * $FreeBSD: head/sys/dev/ata/ata-dma.c 56744 2000-01-28 13:35:43Z sos $
28 * $FreeBSD: head/sys/dev/ata/ata-dma.c 56754 2000-01-28 15:57:13Z sos $
29 */
30
31#include "pci.h"
32#include "apm.h"
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/buf.h>
36#include <sys/malloc.h>

--- 6 unchanged lines hidden (view full) ---

43#include <pci/pcivar.h>
44#endif
45#if NAPM > 0
46#include <machine/apm_bios.h>
47#endif
48#include <dev/ata/ata-all.h>
49#include <dev/ata/ata-disk.h>
50
29 */
30
31#include "pci.h"
32#include "apm.h"
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/buf.h>
36#include <sys/malloc.h>

--- 6 unchanged lines hidden (view full) ---

43#include <pci/pcivar.h>
44#endif
45#if NAPM > 0
46#include <machine/apm_bios.h>
47#endif
48#include <dev/ata/ata-all.h>
49#include <dev/ata/ata-disk.h>
50
51#if NPCI > 0
52
51/* prototypes */
52static void promise_timing(struct ata_softc *, int32_t, int32_t);
53static void hpt366_timing(struct ata_softc *, int32_t, int32_t);
54
55/* misc defines */
56#ifdef __alpha__
57#undef vtophys
58#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)va)
59#endif
60
53/* prototypes */
54static void promise_timing(struct ata_softc *, int32_t, int32_t);
55static void hpt366_timing(struct ata_softc *, int32_t, int32_t);
56
57/* misc defines */
58#ifdef __alpha__
59#undef vtophys
60#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)va)
61#endif
62
61#if NPCI > 0
62
63void
64ata_dmainit(struct ata_softc *scp, int32_t device,
65 int32_t apiomode, int32_t wdmamode, int32_t udmamode)
66{
67 int32_t devno = (scp->unit << 1) + ATA_DEV(device);
68 int32_t error;
69
70 /* set our most pessimistic default mode */

--- 576 unchanged lines hidden (view full) ---

647 default: timing = 0x0120d9d9;
648 }
649 }
650 pci_write_config(scp->dev, 0x40 + (devno << 2) , timing, 4);
651}
652
653#else /* NPCI > 0 */
654
63void
64ata_dmainit(struct ata_softc *scp, int32_t device,
65 int32_t apiomode, int32_t wdmamode, int32_t udmamode)
66{
67 int32_t devno = (scp->unit << 1) + ATA_DEV(device);
68 int32_t error;
69
70 /* set our most pessimistic default mode */

--- 576 unchanged lines hidden (view full) ---

647 default: timing = 0x0120d9d9;
648 }
649 }
650 pci_write_config(scp->dev, 0x40 + (devno << 2) , timing, 4);
651}
652
653#else /* NPCI > 0 */
654
655int32_t
655void
656ata_dmainit(struct ata_softc *scp, int32_t device,
657 int32_t piomode, int32_t wdmamode, int32_t udmamode)
658{
656ata_dmainit(struct ata_softc *scp, int32_t device,
657 int32_t piomode, int32_t wdmamode, int32_t udmamode)
658{
659 return -1;
660}
661
662int32_t
663ata_dmasetup(struct ata_softc *scp, int32_t device,
664 int8_t *data, int32_t count, int32_t flags)
665{
666 return -1;
667}

--- 19 unchanged lines hidden ---
659}
660
661int32_t
662ata_dmasetup(struct ata_softc *scp, int32_t device,
663 int8_t *data, int32_t count, int32_t flags)
664{
665 return -1;
666}

--- 19 unchanged lines hidden ---