3 Broadcom Sonics Silicon Backplane bus SPROM data modification tool
5 Copyright (c) 2006-2007 Michael Buesch <m@bues.ch>
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
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.
17 You should have received a copy of the GNU General Public License
18 along with this program; see the file COPYING. If not, write to
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA.
24 #ifndef SSB_SPROMTOOL_H_
25 #define SSB_SPROMTOOL_H_
30 #define SPROM_SIZE 128 /* bytes */
31 #define SPROM4_SIZE 440
119 #define BIT(i) (1U << (i))
121 #define MASK_1 BIT(1)
122 #define MASK_2 BIT(2)
123 #define MASK_3 BIT(3)
124 #define MASK_4 BIT(4)
125 #define MASK_5 BIT(5)
126 #define MASK_8 BIT(8)
128 #define MASK_1_2 MASK_1 | MASK_2 /* Revs 1 - 2 */
129 #define MASK_1_3 MASK_1_2 | MASK_3 /* Revs 1 - 3 */
130 #define MASK_2_3 MASK_2 | MASK_3 /* Revs 2 - 3 */
131 #define MASK_4_5 MASK_4 | MASK_5 /* Revs 4 - 5 */
132 #define MASK_1_5 MASK_1_3 | MASK_4_5 /* Revs 1 - 5 */
133 #define MASK_1_8 MASK_1_5 | MASK_8 /* Revs 1 - 5, 8 */
135 struct cmdline_vparm {
150 struct cmdline_args {
157 #define MAX_VPARM 512
158 struct cmdline_vparm vparm[MAX_VPARM];
173 extern struct cmdline_args cmdargs;
175 #endif /* SSB_SPROMTOOL_H_ */