/*-
* Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Andrew Doran.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _TC_STICREG_H_
#define _TC_STICREG_H_
/*
* PixelStamp command packets take this general format:
*
* command word
* plane mask & primitive count
* always zero
* update method
*
* per-packet context (optional):
* line width
* xy mask
* cliping rectangle min & max
* rgb constant
* z constant
*
* per-primitive context (optional):
* xy mask
* xy mask address
* primitive data (vertices, spans info, video)
* line width
* halfspace equals conditions
* rgb flat, or rgb{1,2,3} smooth
* z flat, or z{1,2,3} smooth
*/
/*
* Bit definitions for stic_regs::int. Three four-bit wide fields, for
* error (E), vertical-blank (V), and packet-done (P) intererupts,
* respectively. The low-order three bits of each field are interrupt
* enable, condition flagged, and nybble write enable. The top bit of each
* field is unused.
*/
#define STIC_INT_E_EN 0x00000001
#define STIC_INT_E 0x00000002
#define STIC_INT_E_WE 0x00000004
/*
* On DMA: reading from a STIC poll register causes load & execution of
* the packet at the correspoinding physical address. Either STAMP_OK
* or STAMP_BUSY will be returned to indicate status.
*
* The STIC sees only 23-bits (8MB) of address space. Bits 21-22 in
* physical address space map to bits 27-28, and bits 15-20 map to bits
* 18-23 in the STIC's warped view of the word. On the PXG, the STIC
* sees only the onboard SRAM (so any `physical addresses' are offsets
* into the beginning of the SRAM).
*/