1 /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 3 * bbc.h: Defines for BootBus Controller found 4 * systems. 5 * 6 * Copyright (C) 2000 David S. Miller (davem@r 7 */ 8 9 #ifndef _SPARC64_BBC_H 10 #define _SPARC64_BBC_H 11 12 /* Register sizes are indicated by "B" (Byte, 13 * "H" (Half-word, 2 bytes), "W" (Word, 4 byte 14 * "Q" (Quad, 8 bytes) inside brackets. 15 */ 16 17 #define BBC_AID 0x00 /* [B] Agent I 18 #define BBC_DEVP 0x01 /* [B] Device 19 #define BBC_ARB 0x02 /* [B] Arbitra 20 #define BBC_QUIESCE 0x03 /* [B] Quiesce 21 #define BBC_WDACTION 0x04 /* [B] Watchdo 22 #define BBC_SPG 0x06 /* [B] Soft PO 23 #define BBC_SXG 0x07 /* [B] Soft XI 24 #define BBC_PSRC 0x08 /* [W] POR Sou 25 #define BBC_XSRC 0x0c /* [B] XIR Sou 26 #define BBC_CSC 0x0d /* [B] Clock S 27 #define BBC_ES_CTRL 0x0e /* [H] Energy 28 #define BBC_ES_ACT 0x10 /* [W] E* Asse 29 #define BBC_ES_DACT 0x14 /* [B] E* De-A 30 #define BBC_ES_DABT 0x15 /* [B] E* De-A 31 #define BBC_ES_ABT 0x16 /* [H] E* Asse 32 #define BBC_ES_PST 0x18 /* [W] E* PLL 33 #define BBC_ES_FSL 0x1c /* [W] E* Freq 34 #define BBC_EBUST 0x20 /* [Q] EBUS Ti 35 #define BBC_JTAG_CMD 0x28 /* [W] JTAG+ C 36 #define BBC_JTAG_CTRL 0x2c /* [B] JTAG+ C 37 #define BBC_I2C_SEL 0x2d /* [B] I2C Sel 38 #define BBC_I2C_0_S1 0x2e /* [B] I2C ctr 39 #define BBC_I2C_0_S0 0x2f /* [B] I2C ctr 40 #define BBC_I2C_1_S1 0x30 /* [B] I2C ctr 41 #define BBC_I2C_1_S0 0x31 /* [B] I2C ctr 42 #define BBC_KBD_BEEP 0x32 /* [B] Keyboar 43 #define BBC_KBD_BCNT 0x34 /* [W] Keyboar 44 45 #define BBC_REGS_SIZE 0x40 46 47 /* There is a 2K scratch ram area at offset 0x 48 * we will use it for anything. 49 */ 50 51 /* Agent ID register. This register shows the 52 * for the processors. The value returned dep 53 * cpu is reading the register. 54 */ 55 #define BBC_AID_ID 0x07 /* Safari ID 56 #define BBC_AID_RESV 0xf8 /* Reserved 57 58 /* Device Present register. One can determine 59 * present in the machine by interrogating thi 60 */ 61 #define BBC_DEVP_CPU0 0x01 /* Processor 0 62 #define BBC_DEVP_CPU1 0x02 /* Processor 1 63 #define BBC_DEVP_CPU2 0x04 /* Processor 2 64 #define BBC_DEVP_CPU3 0x08 /* Processor 3 65 #define BBC_DEVP_RESV 0xf0 /* Reserved 66 67 /* Arbitration register. This register is use 68 * the BBC from a particular cpu. 69 */ 70 #define BBC_ARB_CPU0 0x01 /* Enable cpu 71 #define BBC_ARB_CPU1 0x02 /* Enable cpu 72 #define BBC_ARB_CPU2 0x04 /* Enable cpu 73 #define BBC_ARB_CPU3 0x08 /* Enable cpu 74 #define BBC_ARB_RESV 0xf0 /* Reserved 75 76 /* Quiesce register. Bus and BBC segments for 77 * with this register, ie. for hot plugging. 78 */ 79 #define BBC_QUIESCE_S02 0x01 /* Quiesce Saf 80 #define BBC_QUIESCE_S13 0x02 /* Quiesce Saf 81 #define BBC_QUIESCE_B02 0x04 /* Quiesce BBC 82 #define BBC_QUIESCE_B13 0x08 /* Quiesce BBC 83 #define BBC_QUIESCE_FD0 0x10 /* Disable Fat 84 #define BBC_QUIESCE_FD1 0x20 /* Disable Fat 85 #define BBC_QUIESCE_FD2 0x40 /* Disable Fat 86 #define BBC_QUIESCE_FD3 0x80 /* Disable Fat 87 88 /* Watchdog Action register. When the watchdo 89 * a line is enabled to the BBC. The action B 90 * is asserted can be controlled by this regis 91 */ 92 #define BBC_WDACTION_RST 0x01 /* When set, w 93 * When clear, 94 */ 95 #define BBC_WDACTION_RESV 0xfe /* Reserved */ 96 97 /* Soft_POR_GEN register. The POR (Power On R 98 * for specific processors or all processors v 99 */ 100 #define BBC_SPG_CPU0 0x01 /* Assert POR for 101 #define BBC_SPG_CPU1 0x02 /* Assert POR for 102 #define BBC_SPG_CPU2 0x04 /* Assert POR for 103 #define BBC_SPG_CPU3 0x08 /* Assert POR for 104 #define BBC_SPG_CPUALL 0x10 /* Reset all proc 105 * the entire sys 106 */ 107 #define BBC_SPG_RESV 0xe0 /* Reserved 108 109 /* Soft_XIR_GEN register. The XIR (eXternally 110 * may be asserted to specific processors via 111 */ 112 #define BBC_SXG_CPU0 0x01 /* Assert XIR for 113 #define BBC_SXG_CPU1 0x02 /* Assert XIR for 114 #define BBC_SXG_CPU2 0x04 /* Assert XIR for 115 #define BBC_SXG_CPU3 0x08 /* Assert XIR for 116 #define BBC_SXG_RESV 0xf0 /* Reserved 117 118 /* POR Source register. One may identify the 119 * reset by reading this register. 120 */ 121 #define BBC_PSRC_SPG0 0x0001 /* CPU 0 reset 122 #define BBC_PSRC_SPG1 0x0002 /* CPU 1 reset 123 #define BBC_PSRC_SPG2 0x0004 /* CPU 2 reset 124 #define BBC_PSRC_SPG3 0x0008 /* CPU 3 reset 125 #define BBC_PSRC_SPGSYS 0x0010 /* System reset 126 #define BBC_PSRC_JTAG 0x0020 /* System reset 127 #define BBC_PSRC_BUTTON 0x0040 /* System reset 128 #define BBC_PSRC_PWRUP 0x0080 /* System reset 129 #define BBC_PSRC_FE0 0x0100 /* CPU 0 report 130 #define BBC_PSRC_FE1 0x0200 /* CPU 1 report 131 #define BBC_PSRC_FE2 0x0400 /* CPU 2 report 132 #define BBC_PSRC_FE3 0x0800 /* CPU 3 report 133 #define BBC_PSRC_FE4 0x1000 /* Schizo repor 134 #define BBC_PSRC_FE5 0x2000 /* Safari devic 135 #define BBC_PSRC_FE6 0x4000 /* CPMS reporte 136 #define BBC_PSRC_SYNTH 0x8000 /* System reset 137 * were updated 138 */ 139 #define BBC_PSRC_WDT 0x10000 /* System reset 140 #define BBC_PSRC_RSC 0x20000 /* System reset 141 * device 142 */ 143 144 /* XIR Source register. The source of an XIR 145 * be determined via this register. 146 */ 147 #define BBC_XSRC_SXG0 0x01 /* CPU 0 recei 148 #define BBC_XSRC_SXG1 0x02 /* CPU 1 recei 149 #define BBC_XSRC_SXG2 0x04 /* CPU 2 recei 150 #define BBC_XSRC_SXG3 0x08 /* CPU 3 recei 151 #define BBC_XSRC_JTAG 0x10 /* All CPUs re 152 #define BBC_XSRC_W_OR_B 0x20 /* All CPUs re 153 * a) Super I/ 154 * b) XIR push 155 */ 156 #define BBC_XSRC_RESV 0xc0 /* Reserved 157 158 /* Clock Synthesizers Control register. This 159 * programming interface to the two clock synt 160 */ 161 #define BBC_CSC_SLOAD 0x01 /* Directly co 162 #define BBC_CSC_SDATA 0x02 /* Directly co 163 #define BBC_CSC_SCLOCK 0x04 /* Directly co 164 #define BBC_CSC_RESV 0x78 /* Reserved 165 #define BBC_CSC_RST 0x80 /* Generate sy 166 167 /* Energy Star Control register. This registe 168 * clock frequency change trigger to the main 169 * the processors). The transition occurs whe 170 * go from 0 to 1, only one bit must be set at 171 * occurs. Basically the sequence of events i 172 * a) Choose new frequency: full, 1/2 or 1/32 173 * b) Program this desired frequency into the 174 * c) Set the same value in this register. 175 * d) 16 system clocks later, clear this regis 176 */ 177 #define BBC_ES_CTRL_1_1 0x01 /* Ful 178 #define BBC_ES_CTRL_1_2 0x02 /* 1/2 179 #define BBC_ES_CTRL_1_32 0x20 /* 1/3 180 #define BBC_ES_RESV 0xdc /* Res 181 182 /* Energy Star Assert Change Time register. T 183 * of BBC clock cycles (which is half the syst 184 * the detection of FREEZE_ACK being asserted 185 * the CLK_CHANGE_L[2:0] signals. 186 */ 187 #define BBC_ES_ACT_VAL 0xff 188 189 /* Energy Star Assert Bypass Time register. T 190 * of BBC clock cycles (which is half the syst 191 * the assertion of the CLK_CHANGE_L[2:0] sign 192 * the ESTAR_PLL_BYPASS signal. 193 */ 194 #define BBC_ES_ABT_VAL 0xffff 195 196 /* Energy Star PLL Settle Time register. This 197 * BBC clock cycles (which is half the system 198 * de-assertion of CLK_CHANGE_L[2:0] and the d 199 * signal. 200 */ 201 #define BBC_ES_PST_VAL 0xffffffff 202 203 /* Energy Star Frequency Switch Latency regist 204 * BBC clocks between the de-assertion of CLK_ 205 * edge of the Safari clock at the new frequen 206 */ 207 #define BBC_ES_FSL_VAL 0xffffffff 208 209 /* Keyboard Beep control register. This is a 210 * beep sound. 211 */ 212 #define BBC_KBD_BEEP_ENABLE 0x01 /* Enable 213 #define BBC_KBD_BEEP_RESV 0xfe /* Reserv 214 215 /* Keyboard Beep Counter register. There is a 216 * the BBC which runs at half the system clock 217 * determines when the audio sound is generate 218 * 10 is set, the audio beep will oscillate at 219 * generator automatically selects a different 220 * is changed via Energy Star. 221 */ 222 #define BBC_KBD_BCNT_BITS 0x0007fc00 223 #define BBC_KBC_BCNT_RESV 0xfff803ff 224 225 #endif /* _SPARC64_BBC_H */ 226 227
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.