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