Kumar Gala | f2f5d7b | 2010-05-22 17:25:47 -0500 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2010 Freescale Semiconductor, Inc. |
| 3 | * |
| 4 | * See file CREDITS for list of people who contributed to this |
| 5 | * project. |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU General Public License as |
| 9 | * published by the Free Software Foundation; either version 2 of |
| 10 | * the License, or (at your option) any later version. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this program; if not, write to the Free Software |
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 20 | * MA 02111-1307 USA |
| 21 | */ |
| 22 | #ifndef __PIXIS_H_ |
| 23 | #define __PIXIS_H_ 1 |
| 24 | |
| 25 | /* PIXIS register set. */ |
| 26 | #if defined(CONFIG_MPC8536DS) |
| 27 | typedef struct pixis { |
| 28 | u8 id; |
| 29 | u8 ver; |
| 30 | u8 pver; |
| 31 | u8 csr; |
| 32 | u8 rst; |
| 33 | u8 rst2; |
| 34 | u8 aux1; |
| 35 | u8 spd; |
| 36 | u8 aux2; |
| 37 | u8 csr2; |
| 38 | u8 watch; |
| 39 | u8 led; |
| 40 | u8 pwr; |
| 41 | u8 res[3]; |
| 42 | u8 vctl; |
| 43 | u8 vstat; |
| 44 | u8 vcfgen0; |
| 45 | u8 vcfgen1; |
| 46 | u8 vcore0; |
| 47 | u8 res1; |
| 48 | u8 vboot; |
| 49 | u8 vspeed[3]; |
| 50 | u8 sclk[3]; |
| 51 | u8 dclk[3]; |
| 52 | u8 i2cdacr; |
| 53 | u8 vcoreacc[4]; |
| 54 | u8 vcorecnt[3]; |
| 55 | u8 vcoremax[2]; |
| 56 | u8 vplatacc[4]; |
| 57 | u8 vplatcnt[3]; |
| 58 | u8 vplatmax[2]; |
| 59 | u8 vtempacc[4]; |
| 60 | u8 vtempcnt[3]; |
| 61 | u8 vtempmax[2]; |
| 62 | u8 res2[4]; |
| 63 | } __attribute__ ((packed)) pixis_t; |
| 64 | |
| 65 | #elif defined(CONFIG_MPC8544DS) |
| 66 | typedef struct pixis { |
| 67 | u8 id; |
| 68 | u8 ver; |
| 69 | u8 pver; |
| 70 | u8 csr; |
| 71 | u8 rst; |
| 72 | u8 pwr; |
| 73 | u8 aux1; |
| 74 | u8 spd; |
| 75 | u8 res[8]; |
| 76 | u8 vctl; |
| 77 | u8 vstat; |
| 78 | u8 vcfgen0; |
| 79 | u8 vcfgen1; |
| 80 | u8 vcore0; |
| 81 | u8 res1; |
| 82 | u8 vboot; |
| 83 | u8 vspeed[2]; |
| 84 | u8 vclkh; |
| 85 | u8 vclkl; |
| 86 | u8 watch; |
| 87 | u8 led; |
| 88 | u8 vspeed2; |
| 89 | u8 res2[34]; |
| 90 | } __attribute__ ((packed)) pixis_t; |
| 91 | |
| 92 | #elif defined(CONFIG_MPC8572DS) |
| 93 | typedef struct pixis { |
| 94 | u8 id; |
| 95 | u8 ver; |
| 96 | u8 pver; |
| 97 | u8 csr; |
| 98 | u8 rst; |
| 99 | u8 pwr1; |
| 100 | u8 aux1; |
| 101 | u8 spd; |
| 102 | u8 aux2; |
| 103 | u8 res[7]; |
| 104 | u8 vctl; |
| 105 | u8 vstat; |
| 106 | u8 vcfgen0; |
| 107 | u8 vcfgen1; |
| 108 | u8 vcore0; |
| 109 | u8 res1; |
| 110 | u8 vboot; |
| 111 | u8 vspeed[3]; |
| 112 | u8 res2[2]; |
| 113 | u8 sclk[3]; |
| 114 | u8 dclk[3]; |
| 115 | u8 res3[2]; |
| 116 | u8 watch; |
| 117 | u8 led; |
| 118 | u8 res4[25]; |
| 119 | } __attribute__ ((packed)) pixis_t; |
| 120 | |
| 121 | #elif defined(CONFIG_MPC8610HPCD) |
| 122 | typedef struct pixis { |
| 123 | u8 id; |
| 124 | u8 ver; /* also called arch */ |
| 125 | u8 pver; |
| 126 | u8 csr; |
| 127 | u8 rst; |
| 128 | u8 pwr; |
| 129 | u8 aux; |
| 130 | u8 spd; |
| 131 | u8 brdcfg0; |
| 132 | u8 brdcfg1; |
| 133 | u8 res[4]; |
| 134 | u8 led; |
| 135 | u8 serno; |
| 136 | u8 vctl; |
| 137 | u8 vstat; |
| 138 | u8 vcfgen0; |
| 139 | u8 vcfgen1; |
| 140 | u8 vcore0; |
| 141 | u8 res1; |
| 142 | u8 vboot; |
| 143 | u8 vspeed[2]; |
| 144 | u8 res2; |
| 145 | u8 sclk[3]; |
| 146 | u8 res3; |
| 147 | u8 watch; |
| 148 | u8 res4[33]; |
| 149 | } __attribute__ ((packed)) pixis_t; |
| 150 | |
| 151 | #elif defined(CONFIG_MPC8641HPCN) |
| 152 | typedef struct pixis { |
| 153 | u8 id; |
| 154 | u8 ver; |
| 155 | u8 pver; |
| 156 | u8 csr; |
| 157 | u8 rst; |
| 158 | u8 pwr; |
| 159 | u8 aux; |
| 160 | u8 spd; |
| 161 | u8 res[8]; |
| 162 | u8 vctl; |
| 163 | u8 vstat; |
| 164 | u8 vcfgen0; |
| 165 | u8 vcfgen1; |
| 166 | u8 vcore0; |
| 167 | u8 res1; |
| 168 | u8 vboot; |
| 169 | u8 vspeed[2]; |
| 170 | u8 vclkh; |
| 171 | u8 vclkl; |
| 172 | u8 watch; |
| 173 | u8 res3[36]; |
| 174 | } __attribute__ ((packed)) pixis_t; |
| 175 | #else |
| 176 | #error Need to define pixis_t for this board |
| 177 | #endif |
| 178 | |
| 179 | /* Pointer to the PIXIS register set */ |
| 180 | #define pixis ((pixis_t *)PIXIS_BASE) |
| 181 | |
| 182 | #endif /* __PIXIS_H_ */ |