199767f8919635c4928607450d9e0abb932109ceToomas Soome * Copyright (c) 2003 Hidetoshi Shimokawa
199767f8919635c4928607450d9e0abb932109ceToomas Soome * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa
199767f8919635c4928607450d9e0abb932109ceToomas Soome * All rights reserved.
199767f8919635c4928607450d9e0abb932109ceToomas Soome * Redistribution and use in source and binary forms, with or without
199767f8919635c4928607450d9e0abb932109ceToomas Soome * modification, are permitted provided that the following conditions
199767f8919635c4928607450d9e0abb932109ceToomas Soome * 1. Redistributions of source code must retain the above copyright
199767f8919635c4928607450d9e0abb932109ceToomas Soome * notice, this list of conditions and the following disclaimer.
199767f8919635c4928607450d9e0abb932109ceToomas Soome * 2. Redistributions in binary form must reproduce the above copyright
199767f8919635c4928607450d9e0abb932109ceToomas Soome * notice, this list of conditions and the following disclaimer in the
199767f8919635c4928607450d9e0abb932109ceToomas Soome * documentation and/or other materials provided with the distribution.
199767f8919635c4928607450d9e0abb932109ceToomas Soome * 3. All advertising materials mentioning features or use of this software
199767f8919635c4928607450d9e0abb932109ceToomas Soome * must display the acknowledgement as bellow:
199767f8919635c4928607450d9e0abb932109ceToomas Soome * This product includes software developed by K. Kobayashi and H. Shimokawa
199767f8919635c4928607450d9e0abb932109ceToomas Soome * 4. The name of the author may not be used to endorse or promote products
199767f8919635c4928607450d9e0abb932109ceToomas Soome * derived from this software without specific prior written permission.
199767f8919635c4928607450d9e0abb932109ceToomas Soome * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
199767f8919635c4928607450d9e0abb932109ceToomas Soome * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
199767f8919635c4928607450d9e0abb932109ceToomas Soome * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
199767f8919635c4928607450d9e0abb932109ceToomas Soome * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
199767f8919635c4928607450d9e0abb932109ceToomas Soome * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
199767f8919635c4928607450d9e0abb932109ceToomas Soome * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
199767f8919635c4928607450d9e0abb932109ceToomas Soome * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
199767f8919635c4928607450d9e0abb932109ceToomas Soome * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
199767f8919635c4928607450d9e0abb932109ceToomas Soome * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
199767f8919635c4928607450d9e0abb932109ceToomas Soome * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
199767f8919635c4928607450d9e0abb932109ceToomas Soome * POSSIBILITY OF SUCH DAMAGE.
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define OHCI_MAX_DMA_CH (0x4 + OHCI_DMA_ITCH + OHCI_DMA_IRCH)
199767f8919635c4928607450d9e0abb932109ceToomas Soome/* for PCI */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define FWOHCI_DMA_WRITE(x, y) ((x) = htole32(y))
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define FWOHCI_DMA_SET(x, y) ((x) |= htole32(y))
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define FWOHCI_DMA_CLEAR(x, y) ((x) &= htole32(~(y)))
199767f8919635c4928607450d9e0abb932109ceToomas Soome fwohcireg_t rom_hdr; /* config ROM ptr. 0x18 */
199767f8919635c4928607450d9e0abb932109ceToomas Soome fwohcireg_t config_rom; /* config ROM map 0x34 */
199767f8919635c4928607450d9e0abb932109ceToomas Soome fwohcireg_t post_wr_lo; /* post write addr lo 0x38 */
199767f8919635c4928607450d9e0abb932109ceToomas Soome fwohcireg_t post_wr_hi; /* post write addr hi 0x3c */
199767f8919635c4928607450d9e0abb932109ceToomas Soome fwohcireg_t hcc_cntl_set; /* HCC control set 0x50 */
199767f8919635c4928607450d9e0abb932109ceToomas Soome fwohcireg_t hcc_cntl_clr; /* HCC control clr 0x54 */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define OHCI_HCC_BIBIV (1U << 31) /* BIBimage Valid */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define OHCI_HCC_BIGEND (1 << 30) /* noByteSwapData */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define OHCI_HCC_PRPHY (1 << 23) /* programPhyEnable */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define OHCI_HCC_PHYEN (1 << 22) /* aPhyEnhanceEnable */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define OHCI_HCC_POSTWR (1 << 18) /* postedWriteEnable */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define OHCI_HCC_LINKEN (1 << 17) /* linkEnable */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define OHCI_HCC_RESET (1 << 16) /* softReset */
199767f8919635c4928607450d9e0abb932109ceToomas Soome fwohcireg_t ir_mask_hi_set; /* ir mask hi set 0x70 */
199767f8919635c4928607450d9e0abb932109ceToomas Soome fwohcireg_t ir_mask_hi_clr; /* ir mask hi set 0x74 */
199767f8919635c4928607450d9e0abb932109ceToomas Soome fwohcireg_t ir_mask_lo_set; /* ir mask hi set 0x78 */
199767f8919635c4928607450d9e0abb932109ceToomas Soome fwohcireg_t ir_mask_lo_clr; /* ir mask hi set 0x7c */
199767f8919635c4928607450d9e0abb932109ceToomas Soome fwohcireg_t fairness; /* fairness control 0xdc */
199767f8919635c4928607450d9e0abb932109ceToomas Soome fwohcireg_t link_cntl_clr; /* Chip control clear 0xe4*/
199767f8919635c4928607450d9e0abb932109ceToomas Soome fwohcireg_t cycle_timer; /* Cycle Timer 0xf0 */
199767f8919635c4928607450d9e0abb932109ceToomas Soome fwohcireg_t areq_hi; /* Async req. filter hi 0x100 */
199767f8919635c4928607450d9e0abb932109ceToomas Soome fwohcireg_t areq_hi_clr; /* Async req. filter hi 0x104 */
199767f8919635c4928607450d9e0abb932109ceToomas Soome fwohcireg_t areq_lo; /* Async req. filter lo 0x108 */
199767f8919635c4928607450d9e0abb932109ceToomas Soome fwohcireg_t areq_lo_clr; /* Async req. filter lo 0x10c */
199767f8919635c4928607450d9e0abb932109ceToomas Soome fwohcireg_t preq_hi; /* Async req. filter hi 0x110 */
199767f8919635c4928607450d9e0abb932109ceToomas Soome fwohcireg_t preq_hi_clr; /* Async req. filter hi 0x114 */
199767f8919635c4928607450d9e0abb932109ceToomas Soome fwohcireg_t preq_lo; /* Async req. filter lo 0x118 */
199767f8919635c4928607450d9e0abb932109ceToomas Soome fwohcireg_t preq_lo_clr; /* Async req. filter lo 0x11c */
199767f8919635c4928607450d9e0abb932109ceToomas Soome fwohcireg_t pys_upper; /* Physical Upper bound 0x120 */
199767f8919635c4928607450d9e0abb932109ceToomas Soome fwohcireg_t dummy7[23]; /* dummy 0x124-0x17c */
199767f8919635c4928607450d9e0abb932109ceToomas Soome /* 0x180, 0x184, 0x188, 0x18c */
199767f8919635c4928607450d9e0abb932109ceToomas Soome /* 0x190, 0x194, 0x198, 0x19c */
199767f8919635c4928607450d9e0abb932109ceToomas Soome /* 0x1a0, 0x1a4, 0x1a8, 0x1ac */
199767f8919635c4928607450d9e0abb932109ceToomas Soome /* 0x1b0, 0x1b4, 0x1b8, 0x1bc */
199767f8919635c4928607450d9e0abb932109ceToomas Soome /* 0x1c0, 0x1c4, 0x1c8, 0x1cc */
199767f8919635c4928607450d9e0abb932109ceToomas Soome /* 0x1d0, 0x1d4, 0x1d8, 0x1dc */
199767f8919635c4928607450d9e0abb932109ceToomas Soome /* 0x1e0, 0x1e4, 0x1e8, 0x1ec */
199767f8919635c4928607450d9e0abb932109ceToomas Soome /* 0x1f0, 0x1f4, 0x1f8, 0x1fc */
199767f8919635c4928607450d9e0abb932109ceToomas Soome /* 0x200, 0x204, 0x208, 0x20c */
199767f8919635c4928607450d9e0abb932109ceToomas Soome /* 0x210, 0x204, 0x208, 0x20c */
199767f8919635c4928607450d9e0abb932109ceToomas Soome /* 0x400, 0x404, 0x408, 0x40c */
199767f8919635c4928607450d9e0abb932109ceToomas Soome /* 0x410, 0x404, 0x408, 0x40c */