1230132Suqs# Copyright (c) 2004 - 2008 S��ren Schmidt <sos@FreeBSD.org>
2144331Ssos# All rights reserved.
3144331Ssos#
4144331Ssos# Redistribution and use in source and binary forms, with or without
5144331Ssos# modification, are permitted provided that the following conditions
6144331Ssos# are met:
7144331Ssos# 1. Redistributions of source code must retain the above copyright
8144331Ssos#    notice, this list of conditions and the following disclaimer,
9144331Ssos#    without modification, immediately at the beginning of the file.
10144331Ssos# 2. Redistributions in binary form must reproduce the above copyright
11144331Ssos#    notice, this list of conditions and the following disclaimer in the
12144331Ssos#    documentation and/or other materials provided with the distribution.
13144331Ssos#
14144331Ssos# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15144331Ssos# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16144331Ssos# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17144331Ssos# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18144331Ssos# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19144331Ssos# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20144331Ssos# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21144331Ssos# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22144331Ssos# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23144331Ssos# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24144331Ssos#
25144331Ssos# $FreeBSD$
26144331Ssos
27144331Ssos#include <sys/bus.h>
28144331Ssos#include <sys/kernel.h>
29144331Ssos#include <sys/param.h>
30144331Ssos#include <sys/types.h>
31144331Ssos#include <sys/callout.h>
32144331Ssos#include <sys/sema.h>
33144331Ssos#include <sys/taskqueue.h>
34144331Ssos#include <vm/uma.h>
35144331Ssos#include <machine/bus.h>
36144331Ssos#include <sys/ata.h>
37144331Ssos#include <dev/ata/ata-all.h>
38144331Ssos
39144331SsosINTERFACE ata;
40144331Ssos
41144331SsosCODE {
42200171Smav	static int ata_null_setmode(device_t dev, int target, int mode)
43145642Ssos	{
44145642Ssos
45200171Smav		if (mode > ATA_PIO_MAX)
46200171Smav			return (ATA_PIO_MAX);
47200171Smav		return (mode);
48145642Ssos	}
49145642Ssos};
50200171SmavMETHOD int setmode {
51144331Ssos    device_t    dev;
52200171Smav    int		target;
53200171Smav    int		mode;
54200171Smav}  DEFAULT ata_null_setmode;
55144331Ssos
56202699SrpauloCODE {
57202699Srpaulo	static int ata_null_getrev(device_t dev, int target)
58202699Srpaulo	{
59202699Srpaulo		return (0);
60202699Srpaulo	}
61202699Srpaulo};
62202699Srpaulo
63200171SmavMETHOD int getrev {
64200171Smav    device_t    dev;
65200171Smav    int		target;
66202699Srpaulo} DEFAULT ata_null_getrev;
67200171Smav
68145641SsosMETHOD void reset {
69145641Ssos    device_t    channel;
70145641Ssos} DEFAULT ata_generic_reset;
71145641Ssos
72144331SsosMETHOD int reinit {
73144331Ssos    device_t    dev;
74144331Ssos};
75