28 #define ROM16(x) le16_to_cpu(*(u16 *)&(x))
29 #define ROM32(x) le32_to_cpu(*(u32 *)&(x))
41 u8 *mxms = mxms_data(mxm);
52 nv_debug(mxm,
"unknown version %d.%d\n", mxms[4], mxms[5]);
65 return *(
u16 *)&mxms_data(mxm)[6];
72 u8 *mxms = mxms_data(mxm),
sum = 0;
85 u8 *mxms = mxms_data(mxm);
86 if (*(
u32 *)mxms != 0x5f4d584d) {
87 nv_debug(mxm,
"signature invalid\n");
101 u8 *mxms = mxms_data(mxm);
104 while (desc < fini) {
125 entries = (
ROM32(desc[0]) & 0x01f00000) >> 20;
134 entries = (desc[1] & 0xf0) >> 4;
142 entries = desc[1] & 0x07;
145 nv_debug(mxm,
"unknown descriptor type %d\n", type);
150 static const char * mxms_desc_name[] = {
151 "ODS",
"SCCS",
"TS",
"IPS",
152 "GSD",
"VSS",
"BCS",
"FCS",
157 nv_debug(mxm,
"%4s: ", mxms_desc_name[type]);
158 for (j = headerlen - 1; j >= 0; j--)
163 for (i = 0; i <
entries; i++, dump += recordlen) {
165 for (j = recordlen - 1; j >= 0; j--)
171 if (types & (1 << type)) {
172 if (!
exec(mxm, desc, info))
176 desc += headerlen + (entries * recordlen);
189 desc->
outp_type = (data & 0x00000000000000f0ULL) >> 4;
190 desc->
ddc_port = (data & 0x0000000000000f00ULL) >> 8;
191 desc->
conn_type = (data & 0x000000000001f000ULL) >> 12;
192 desc->
dig_conn = (data & 0x0000000000780000ULL) >> 19;