1 /* $NetBSD: pciide_piccolo.h_reg.h,v 1.0 2008/04/28 00:00:00 djb */
4 * Copyright (c) 2009 The NetBSD Foundation, Inc.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
16 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
17 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
18 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
20 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 * POSSIBILITY OF SUCH DAMAGE.
30 * Register definitions for the Toshiba PICCOLO, by SWAG!
33 #define PICCOLO_PIO_TIMING 0x50
34 #define PICCOLO_DMA_TIMING 0x5c
36 #define PICCOLO_PIO_MASK 0xffffe088
37 #define PICCOLO_DMA_MASK 0xffffe088
38 #define PICCOLO_UDMA_MASK 0x78ffe088
43 * first digit is command active, next two are front porch and back porch
44 * command active >= minimum for mode
45 * front porch + back porch + command active >= cycle time for mode
46 * values below may need adjustment
48 static const u_int32_t piccolo_pio_times
[]
50 /* programmed actual */
55 0x0200, /* PIO 4, 150ns cycle (120ns is spec), 90ns command active (70ns is spec), 30ns setup and hold */
60 static const u_int32_t piccolo_sw_dma_times
[]
62 /* programmed actual */
66 static const u_int32_t piccolo_mw_dma_times
[]
68 /* programmed actual */
75 /* XXX Is MSB UDMA enable? Can't set it. Seems to work without being set. */
76 static const u_int32_t piccolo_udma_times
[]
78 /* programmed actual */
81 0x82000000 /* UDMA 2, 120ns cycle (117ns is spec), 60ns command active (55ns is spec), 30ns setup and hold */