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