1 /* $NetBSD: pciide_piccolo.h_reg.h,v 1.0 2008/04/28 00:00:00 djb */ 2 3 /* 4 * Copyright (c) 2009 The NetBSD Foundation, Inc. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 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. 15 * 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. 27 */ 28 29 /* 30 * Register definitions for the Toshiba PICCOLO, by SWAG! 31 */ 32 33 #define PICCOLO_PIO_TIMING 0x50 34 #define PICCOLO_DMA_TIMING 0x5c 35 36 #define PICCOLO_PIO_MASK 0xffffe088 37 #define PICCOLO_DMA_MASK 0xffffe088 38 #define PICCOLO_UDMA_MASK 0x78ffe088 39 40 /* TIMING SWAG!!! */ 41 42 /* 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 47 */ 48 static const u_int32_t piccolo_pio_times[] 49 __unused = { 50 /* programmed actual */ 51 0x0566, 52 0x0433, 53 0x0311, 54 0x0201, 55 0x0200, /* PIO 4, 150ns cycle (120ns is spec), 90ns command active (70ns is spec), 30ns setup and hold */ 56 0x0100 57 58 }; 59 60 static const u_int32_t piccolo_sw_dma_times[] 61 __unused = { 62 /* programmed actual */ 63 0x0f77 64 }; 65 66 static const u_int32_t piccolo_mw_dma_times[] 67 __unused = { 68 /* programmed actual */ 69 0x0655, 70 0x0200, 71 0x0200, 72 0x0100 73 }; 74 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[] 77 __unused = { 78 /* programmed actual */ 79 0x84000222, 80 0x83000111, 81 0x82000000 /* UDMA 2, 120ns cycle (117ns is spec), 60ns command active (55ns is spec), 30ns setup and hold */ 82 }; 83