The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/bhnd/bhndreg.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*-
    2  * SPDX-License-Identifier: ISC
    3  *
    4  * Copyright (c) 2015-2016 Landon Fuller <landon@landonf.org>
    5  * Copyright (c) 2010 Broadcom Corporation
    6  * All rights reserved.
    7  *
    8  * Portions of this file were derived from the sbchipc.h header contributed by
    9  * Broadcom to to the Linux staging repository, as well as later revisions of
   10  * sbchipc.h distributed with the Asus RT-N16 firmware source code release.
   11  * 
   12  * Permission to use, copy, modify, and/or distribute this software for any
   13  * purpose with or without fee is hereby granted, provided that the above
   14  * copyright notice and this permission notice appear in all copies.
   15  *
   16  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
   17  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
   18  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
   19  * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
   20  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
   21  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
   22  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
   23  *
   24  * $FreeBSD$
   25  */
   26 
   27 #ifndef _BHND_BHNDREG_H_
   28 #define _BHND_BHNDREG_H_
   29 
   30 /**
   31  * The default address at which the ChipCommon core is mapped on all siba(4)
   32  * devices, and most (all?) bcma(4) devices.
   33  */
   34 #define BHND_DEFAULT_CHIPC_ADDR 0x18000000
   35 
   36 /**
   37  * The standard size of a primary BHND_PORT_DEVICE or BHND_PORT_AGENT
   38  * register block.
   39  */
   40 #define BHND_DEFAULT_CORE_SIZE  0x1000
   41 
   42 /**
   43  * The standard size of the siba(4) and bcma(4) enumeration space.
   44  */
   45 #define BHND_DEFAULT_ENUM_SIZE  0x00100000
   46 
   47 /*
   48  * Common per-core clock control/status register available on PMU-equipped
   49  * devices.
   50  * 
   51  * Clock Mode           Name    Description
   52  * High Throughput      (HT)    Full bandwidth, low latency. Generally supplied
   53  *                              from PLL.
   54  * Active Low Power     (ALP)   Register access, low speed DMA.
   55  * Idle Low Power       (ILP)   No interconnect activity, or if long latency
   56  *                              is permitted.
   57  */
   58 #define BHND_CLK_CTL_ST                 0x1e0           /**< clock control and status */
   59 #define BHND_CCS_FORCEALP               0x00000001      /**< force ALP request */
   60 #define BHND_CCS_FORCEHT                0x00000002      /**< force HT request */
   61 #define BHND_CCS_FORCEILP               0x00000004      /**< force ILP request */
   62 #define BHND_CCS_FORCE_MASK             0x0000000F
   63 
   64 #define BHND_CCS_ALPAREQ                0x00000008      /**< ALP Avail Request */
   65 #define BHND_CCS_HTAREQ                 0x00000010      /**< HT Avail Request */
   66 #define BHND_CCS_AREQ_MASK              0x00000018
   67 
   68 #define BHND_CCS_FORCEHWREQOFF          0x00000020      /**< Force HW Clock Request Off */
   69 
   70 #define BHND_CCS_ERSRC_REQ_MASK         0x00000700      /**< external resource requests */
   71 #define BHND_CCS_ERSRC_REQ_SHIFT        8
   72 #define BHND_CCS_ERSRC_MAX              2               /**< maximum ERSRC value (corresponding to bits 0-2) */
   73 
   74 #define BHND_CCS_ALPAVAIL               0x00010000      /**< ALP is available */
   75 #define BHND_CCS_HTAVAIL                0x00020000      /**< HT is available */
   76 #define BHND_CCS_AVAIL_MASK             0x00030000
   77 
   78 #define BHND_CCS_BP_ON_APL              0x00040000      /**< RO: Backplane is running on ALP clock */
   79 #define BHND_CCS_BP_ON_HT               0x00080000      /**< RO: Backplane is running on HT clock */
   80 #define BHND_CCS_ERSRC_STS_MASK         0x07000000      /**< external resource status */
   81 #define BHND_CCS_ERSRC_STS_SHIFT        24
   82 
   83 #define BHND_CCS0_HTAVAIL               0x00010000      /**< HT avail in chipc and pcmcia on 4328a0 */
   84 #define BHND_CCS0_ALPAVAIL              0x00020000      /**< ALP avail in chipc and pcmcia on 4328a0 */
   85 
   86 #define BHND_CCS_GET_FLAG(_value, _flag)        \
   87         (((_value) & _flag) != 0)
   88 #define BHND_CCS_GET_BITS(_value, _field)       \
   89         (((_value) & _field ## _MASK) >> _field ## _SHIFT)
   90 #define BHND_CCS_SET_BITS(_value, _field)       \
   91         (((_value) << _field ## _SHIFT) & _field ## _MASK)
   92 
   93 #endif /* _BHND_BHNDREG_H_ */

Cache object: cbba6d6e06721b0130a437c8e596717e


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.