root/trunk/libffado/src/libieee1394/configrom.cpp

Revision 736, 19.5 kB (checked in by ppalmers, 13 years ago)

fix some stuff that was not merged correctly

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 /*
2  * Copyright (C) 2005-2007 by Daniel Wagner
3  * Copyright (C) 2005-2007 by Jonathan Woithe
4  * Copyright (C) 2005-2007 by Pieter Palmers
5  *
6  * This file is part of FFADO
7  * FFADO = Free Firewire (pro-)audio drivers for linux
8  *
9  * FFADO is based upon FreeBoB
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public
13  * License version 2.1, as published by the Free Software Foundation;
14  *
15  * This library is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with this library; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
23  * MA 02110-1301 USA
24  */
25
26 #include "configrom.h"
27 #include "ieee1394service.h"
28
29 #include <stdio.h>
30 #include <string.h>
31
32 #include <iostream>
33 #include <iomanip>
34
35 using namespace std;
36
37 IMPL_DEBUG_MODULE( ConfigRom, ConfigRom, DEBUG_LEVEL_NORMAL );
38
39 static int busRead( struct csr1212_csr* csr,
40                     u_int64_t addr,
41                     u_int16_t length,
42                     void* buffer,
43                     void* private_data );
44
45 static int getMaxRom( u_int32_t* bus_info_data,
46                       void* private_data );
47
48 static struct csr1212_bus_ops configrom_csr1212_ops = {
49     busRead,
50     0,
51     0,
52     getMaxRom
53 };
54
55 struct config_csr_info {
56     Ieee1394Service* service;
57     fb_nodeid_t      nodeId;
58 };
59
60 //-------------------------------------------------------------
61
62 ConfigRom::ConfigRom( Ieee1394Service& ieee1394service, fb_nodeid_t nodeId )
63     : Control::Element("ConfigRom")
64     , m_1394Service( &ieee1394service )
65     , m_nodeId( nodeId )
66     , m_avcDevice( false ) // FIXME: this does not seem veryu
67     , m_guid( 0 )
68     , m_vendorName( "" )
69     , m_modelName( "" )
70     , m_vendorId( 0 )
71     , m_modelId( 0 )
72     , m_unit_specifier_id( 0 )
73     , m_unit_version( 0 )
74     , m_isIsoResourceManager( false )
75     , m_isCycleMasterCapable( false )
76     , m_isSupportIsoOperations( false )
77     , m_isBusManagerCapable( false )
78     , m_cycleClkAcc( 0 )
79     , m_maxRec( 0 )
80     , m_nodeVendorId( 0 )
81     , m_chipIdHi( 0 )
82     , m_chipIdLow( 0 )
83     , m_vendorNameKv( 0 )
84     , m_modelNameKv( 0 )
85     , m_csr( 0 )
86 {
87 }
88
89 ConfigRom::ConfigRom()
90     : Control::Element("ConfigRom")
91     , m_1394Service( 0 )
92     , m_nodeId( -1 )
93     , m_avcDevice( false ) // FIXME: this does not seem veryu
94     , m_guid( 0 )
95     , m_vendorName( "" )
96     , m_modelName( "" )
97     , m_vendorId( 0 )
98     , m_modelId( 0 )
99     , m_unit_specifier_id( 0 )
100     , m_unit_version( 0 )
101     , m_isIsoResourceManager( false )
102     , m_isCycleMasterCapable( false )
103     , m_isSupportIsoOperations( false )
104     , m_isBusManagerCapable( false )
105     , m_cycleClkAcc( 0 )
106     , m_maxRec( 0 )
107     , m_nodeVendorId( 0 )
108     , m_chipIdHi( 0 )
109     , m_chipIdLow( 0 )
110     , m_vendorNameKv( 0 )
111     , m_modelNameKv( 0 )
112     , m_csr( 0 )
113 {
114 }
115
116 ConfigRom::~ConfigRom()
117 {
118 }
119
120 bool
121 ConfigRom::operator == ( const ConfigRom& rhs )
122 {
123     return m_guid == rhs.m_guid;
124 }
125
126 bool
127 ConfigRom::compareGUID( const ConfigRom& a, const ConfigRom& b ) {
128     return a.getGuid() > b.getGuid();
129 }
130
131 bool
132 ConfigRom::initialize()
133 {
134      struct config_csr_info csr_info;
135      csr_info.service = m_1394Service;
136      csr_info.nodeId = 0xffc0 | m_nodeId;
137
138      m_csr = csr1212_create_csr( &configrom_csr1212_ops,
139                                  5 * sizeof(fb_quadlet_t),   // XXX Why 5 ?!?
140                                  &csr_info );
141     if (!m_csr || csr1212_parse_csr( m_csr ) != CSR1212_SUCCESS) {
142         debugError( "Could not parse config rom of node %d on port %d\n", m_nodeId, m_1394Service->getPort() );
143         if (m_csr) {
144             csr1212_destroy_csr(m_csr);
145             m_csr = 0;
146         }
147         return false;
148     }
149
150     // Process Bus_Info_Block
151     m_isIsoResourceManager = CSR1212_BE32_TO_CPU(m_csr->bus_info_data[2] ) >> 31;
152     m_isCycleMasterCapable = ( CSR1212_BE32_TO_CPU(m_csr->bus_info_data[2] ) >> 30 ) & 0x1;
153     m_isSupportIsoOperations = ( CSR1212_BE32_TO_CPU(m_csr->bus_info_data[2] ) >> 29 ) & 0x1;
154     m_isBusManagerCapable = ( CSR1212_BE32_TO_CPU(m_csr->bus_info_data[2] ) >> 28 ) & 0x1;
155     m_cycleClkAcc = ( CSR1212_BE32_TO_CPU(m_csr->bus_info_data[2] ) >> 16 ) & 0xff;
156     m_maxRec = ( CSR1212_BE32_TO_CPU( m_csr->bus_info_data[2] ) >> 12 ) & 0xf;
157     m_nodeVendorId = ( CSR1212_BE32_TO_CPU( m_csr->bus_info_data[3] ) >> 8 );
158     m_chipIdHi = ( CSR1212_BE32_TO_CPU( m_csr->bus_info_data[3] ) ) & 0xff;
159     m_chipIdLow = CSR1212_BE32_TO_CPU( m_csr->bus_info_data[4] );
160
161     // Process Root Directory
162     processRootDirectory(m_csr);
163
164     if ( m_vendorNameKv ) {
165         int len = ( m_vendorNameKv->value.leaf.len - 2) * sizeof( quadlet_t );
166         char* buf = new char[len+2];
167         memcpy( buf,
168                 ( void* )CSR1212_TEXTUAL_DESCRIPTOR_LEAF_DATA( m_vendorNameKv ),
169                 len );
170
171     while ((buf + len - 1) == '\0') {
172             len--;
173         }
174         // \todo XXX seems a bit strage to do this but the nodemgr.c code does
175         // it. try to figure out why this is needed (or not)
176     buf[len++] = ' ';
177     buf[len] = '\0';
178
179
180         debugOutput( DEBUG_LEVEL_VERBOSE, "Vendor name: '%s'\n", buf );
181         m_vendorName = buf;
182         delete[] buf;
183     }
184     if ( m_modelNameKv ) {
185         int len = ( m_modelNameKv->value.leaf.len - 2) * sizeof( quadlet_t );
186         char* buf = new char[len+2];
187         memcpy( buf,
188                 ( void* )CSR1212_TEXTUAL_DESCRIPTOR_LEAF_DATA( m_modelNameKv ),
189                 len );
190     while ((buf + len - 1) == '\0') {
191             len--;
192         }
193         // \todo XXX for edirol fa-66 it seems somehow broken. see above
194         // todo as well.
195     buf[len++] = ' ';
196     buf[len] = '\0';
197
198         debugOutput( DEBUG_LEVEL_VERBOSE, "Model name: '%s'\n", buf);
199         m_modelName = buf;
200         delete[] buf;
201     }
202
203     m_guid = ((u_int64_t)CSR1212_BE32_TO_CPU(m_csr->bus_info_data[3]) << 32)
204              | CSR1212_BE32_TO_CPU(m_csr->bus_info_data[4]);
205
206     if ( m_vendorNameKv ) {
207         csr1212_release_keyval( m_vendorNameKv );
208         m_vendorNameKv = 0;
209     }
210     if ( m_modelNameKv ) {
211         csr1212_release_keyval( m_modelNameKv );
212         m_modelNameKv = 0;
213     }
214     if ( m_csr ) {
215         csr1212_destroy_csr(m_csr);
216         m_csr = 0;
217     }
218     return true;
219 }
220
221 static int
222 busRead( struct csr1212_csr* csr,
223          u_int64_t addr,
224          u_int16_t length,
225          void* buffer,
226          void* private_data )
227 {
228     struct config_csr_info* csr_info = (struct config_csr_info*) private_data;
229
230     int nb_retries = 5;
231
232     while ( nb_retries--
233             && !csr_info->service->read( csr_info->nodeId,
234                                          addr,
235                                          (size_t)length/4,
236                                          ( quadlet_t* )buffer)  )
237     {// failed, retry
238     }
239
240     if (nb_retries > -1) return 0; // success
241     else return -1; // failure
242 }
243
244 static int
245 getMaxRom( u_int32_t* bus_info_data,
246            void* /*private_data*/)
247 {
248     return (CSR1212_BE32_TO_CPU( bus_info_data[2] ) >> 8) & 0x3;
249 }
250
251
252 void
253 ConfigRom::processUnitDirectory( struct csr1212_csr* csr,
254                                  struct csr1212_keyval* ud_kv,
255                                  unsigned int *id )
256 {
257     struct csr1212_dentry *dentry;
258     struct csr1212_keyval *kv;
259     unsigned int last_key_id = 0;
260
261     debugOutput( DEBUG_LEVEL_VERBOSE, "process unit directory:\n" );
262     csr1212_for_each_dir_entry(csr, kv, ud_kv, dentry) {
263     switch (kv->key.id) {
264         case CSR1212_KV_ID_VENDOR:
265         if (kv->key.type == CSR1212_KV_TYPE_IMMEDIATE) {
266                     debugOutput( DEBUG_LEVEL_VERBOSE,
267                                  "\tvendor_id = 0x%08x\n",
268                                  kv->value.immediate);
269                     m_vendorId = kv->value.immediate;
270         }
271         break;
272
273         case CSR1212_KV_ID_MODEL:
274                 debugOutput( DEBUG_LEVEL_VERBOSE,
275                              "\tmodel_id = 0x%08x\n",
276                              kv->value.immediate);
277                 m_modelId = kv->value.immediate;
278         break;
279
280         case CSR1212_KV_ID_SPECIFIER_ID:
281                 debugOutput( DEBUG_LEVEL_VERBOSE,
282                              "\tspecifier_id = 0x%08x\n",
283                              kv->value.immediate);
284                 m_unit_specifier_id = kv->value.immediate;
285         break;
286
287         case CSR1212_KV_ID_VERSION:
288                 debugOutput( DEBUG_LEVEL_VERBOSE,
289                              "\tversion = 0x%08x\n",
290                              kv->value.immediate);
291                 m_unit_version = kv->value.immediate;
292                 if ( m_unit_specifier_id == 0x0000a02d ) // XXX
293                 {
294                     m_avcDevice = true; // FIXME: disable this check for the moment
295                     if ( kv->value.immediate == 0x14001 ) {
296                         m_avcDevice = true;
297                     }
298                 }
299         break;
300
301         case CSR1212_KV_ID_DESCRIPTOR:
302         if (kv->key.type == CSR1212_KV_TYPE_LEAF &&
303             CSR1212_DESCRIPTOR_LEAF_TYPE(kv) == 0 &&
304             CSR1212_DESCRIPTOR_LEAF_SPECIFIER_ID(kv) == 0 &&
305             CSR1212_TEXTUAL_DESCRIPTOR_LEAF_WIDTH(kv) == 0 &&
306             CSR1212_TEXTUAL_DESCRIPTOR_LEAF_CHAR_SET(kv) == 0 &&
307             CSR1212_TEXTUAL_DESCRIPTOR_LEAF_LANGUAGE(kv) == 0)
308         {
309             switch (last_key_id) {
310             case CSR1212_KV_ID_VENDOR:
311                 csr1212_keep_keyval(kv);
312                             m_vendorNameKv = kv;
313                 break;
314
315             case CSR1212_KV_ID_MODEL:
316                             m_modelNameKv = kv;
317                 csr1212_keep_keyval(kv);
318                 break;
319
320             }
321         } /* else if (kv->key.type == CSR1212_KV_TYPE_DIRECTORY) ... */
322         break;
323
324         case CSR1212_KV_ID_DEPENDENT_INFO:
325         if (kv->key.type == CSR1212_KV_TYPE_DIRECTORY) {
326             /* This should really be done in SBP2 as this is
327              * doing SBP2 specific parsing. */
328             processUnitDirectory(csr, kv, id);
329         }
330
331         break;
332
333         default:
334         break;
335     }
336     last_key_id = kv->key.id;
337     }
338 }
339
340 void
341 ConfigRom::processRootDirectory(struct csr1212_csr* csr)
342 {
343     unsigned int ud_id = 0;
344     struct csr1212_dentry *dentry;
345     struct csr1212_keyval *kv;
346     unsigned int last_key_id = 0;
347
348     csr1212_for_each_dir_entry(csr, kv, csr->root_kv, dentry) {
349     switch (kv->key.id) {
350         case CSR1212_KV_ID_VENDOR:
351                 debugOutput( DEBUG_LEVEL_VERBOSE,
352                              "vendor id = 0x%08x\n", kv->value.immediate);
353         break;
354
355         case CSR1212_KV_ID_NODE_CAPABILITIES:
356                 debugOutput( DEBUG_LEVEL_VERBOSE,
357                              "capabilities = 0x%08x\n", kv->value.immediate);
358         break;
359
360         case CSR1212_KV_ID_UNIT:
361         processUnitDirectory(csr, kv, &ud_id);
362         break;
363
364         case CSR1212_KV_ID_DESCRIPTOR:
365         if (last_key_id == CSR1212_KV_ID_VENDOR) {
366             if (kv->key.type == CSR1212_KV_TYPE_LEAF &&
367             CSR1212_DESCRIPTOR_LEAF_TYPE(kv) == 0 &&
368             CSR1212_DESCRIPTOR_LEAF_SPECIFIER_ID(kv) == 0 &&
369             CSR1212_TEXTUAL_DESCRIPTOR_LEAF_WIDTH(kv) == 0 &&
370             CSR1212_TEXTUAL_DESCRIPTOR_LEAF_CHAR_SET(kv) == 0 &&
371             CSR1212_TEXTUAL_DESCRIPTOR_LEAF_LANGUAGE(kv) == 0)
372                     {
373                         m_vendorNameKv = kv;
374             csr1212_keep_keyval(kv);
375             }
376         }
377         break;
378     }
379     last_key_id = kv->key.id;
380     }
381
382 }
383
384 const fb_nodeid_t
385 ConfigRom::getNodeId() const
386 {
387     return m_nodeId;
388 }
389
390 const fb_octlet_t
391 ConfigRom::getGuid() const
392 {
393     return m_guid;
394 }
395
396 const Glib::ustring
397 ConfigRom::getGuidString() const
398 {
399     char* buf;
400     asprintf( &buf, "%08x%08x",
401               ( unsigned int ) ( getGuid() >> 32 ),
402               ( unsigned int ) ( getGuid() & 0xffffffff ) );
403     Glib::ustring result = buf;
404     free( buf );
405     return result;
406 }
407  
408 const Glib::ustring
409 ConfigRom::getModelName() const
410 {
411     return m_modelName;
412 }
413
414 const Glib::ustring
415 ConfigRom::getVendorName() const
416 {
417     return m_vendorName;
418 }
419
420 const unsigned int
421 ConfigRom::getModelId() const
422 {
423     return m_modelId;
424 }
425
426 const unsigned int
427 ConfigRom::getVendorId() const
428 {
429     return m_vendorId;
430 }
431
432 const unsigned int
433 ConfigRom::getUnitSpecifierId() const
434 {
435     return m_unit_specifier_id;
436 }
437
438 const unsigned int
439 ConfigRom::getUnitVersion() const
440 {
441     return m_unit_version;
442 }
443
444 bool
445 ConfigRom::updatedNodeId()
446 {
447     debugOutput( DEBUG_LEVEL_VERBOSE,
448                  "Checking for updated node id for device with GUID 0x%016llX...\n",
449                  getGuid());
450
451     struct csr1212_csr* csr = NULL;
452     for ( fb_nodeid_t nodeId = 0;
453           nodeId < m_1394Service->getNodeCount();
454           ++nodeId )
455     {
456         struct config_csr_info csr_info;
457         csr_info.service = m_1394Service;
458         csr_info.nodeId = 0xffc0 | nodeId;
459         debugOutput( DEBUG_LEVEL_VERBOSE, "Looking at node %d...\n", nodeId);
460
461         csr = csr1212_create_csr( &configrom_csr1212_ops,
462                                   5 * sizeof(fb_quadlet_t),   // XXX Why 5 ?!?
463                                   &csr_info );
464
465         if (!csr || csr1212_parse_csr( csr ) != CSR1212_SUCCESS) {
466             debugWarning( "Failed to get/parse CSR\n");
467             if (csr) {
468                 csr1212_destroy_csr(csr);
469                 csr = NULL;
470             }
471             continue;
472         }
473
474         octlet_t guid =
475             ((u_int64_t)CSR1212_BE32_TO_CPU(csr->bus_info_data[3]) << 32)
476             | CSR1212_BE32_TO_CPU(csr->bus_info_data[4]);
477
478         debugOutput( DEBUG_LEVEL_VERBOSE,
479                         " Node has GUID 0x%016llX\n",
480                         guid);
481
482         if ( guid == getGuid() ) {
483             debugOutput( DEBUG_LEVEL_VERBOSE, "GUID matches ours\n");
484             if ( nodeId != getNodeId() ) {
485                 debugOutput( DEBUG_LEVEL_VERBOSE,
486                              "Device with GUID 0x%016llX changed node id "
487                              "from %d to %d\n",
488                              getGuid(),
489                              getNodeId(),
490                              nodeId );
491                 m_nodeId = nodeId;
492             } else {
493                 debugOutput( DEBUG_LEVEL_VERBOSE,
494                              "Device with GUID 0x%016llX kept node id %d\n",
495                              getGuid(),
496                              getNodeId());
497             }
498             if (csr) {
499                 csr1212_destroy_csr(csr);
500                 csr = NULL;
501             }
502             return true;
503         }
504     }
505
506     if (csr) {
507         csr1212_destroy_csr(csr);
508     }
509
510     debugOutput( DEBUG_LEVEL_NORMAL,
511                  "Device with GUID 0x%08x%08x could not be found on "
512                  "the bus anymore (removed?)\n",
513                  m_guid >> 32,
514                  m_guid & 0xffffffff );
515     return false;
516 }
517
518 void
519 ConfigRom::printConfigRom() const
520 {
521     using namespace std;
522     debugOutput(DEBUG_LEVEL_NORMAL, "Config ROM\n" );
523     debugOutput(DEBUG_LEVEL_NORMAL, "\tCurrent Node Id:\t%d\n",       getNodeId() );
524     debugOutput(DEBUG_LEVEL_NORMAL, "\tGUID:\t\t\t0x%016llX\n",       getGuid());
525     debugOutput(DEBUG_LEVEL_NORMAL, "\tVendor Name:\t\t%s\n",         getVendorName().c_str() );
526     debugOutput(DEBUG_LEVEL_NORMAL, "\tModel Name:\t\t%s\n",          getModelName().c_str() );
527     debugOutput(DEBUG_LEVEL_NORMAL, "\tNode Vendor ID:\t\t0x%06x\n",  getNodeVendorId() );
528     debugOutput(DEBUG_LEVEL_NORMAL, "\tModel Id:\t\t0x%08x\n",        getModelId() );
529     debugOutput(DEBUG_LEVEL_NORMAL, "\tUnit Specifier ID:\t0x%06x\n",  getUnitSpecifierId() );
530     debugOutput(DEBUG_LEVEL_NORMAL, "\tUnit version:\t\t0x%08x\n",        getUnitVersion() );
531     debugOutput(DEBUG_LEVEL_NORMAL, "\tISO resource manager:\t%d\n",  isIsoResourseManager() );
532     debugOutput(DEBUG_LEVEL_NORMAL, "\tCycle master capable:\t%d\n",  isSupportsIsoOperations() );
533     debugOutput(DEBUG_LEVEL_NORMAL, "\tBus manager capable:\t%d\n",   isBusManagerCapable() );
534     debugOutput(DEBUG_LEVEL_NORMAL, "\tCycle clock accuracy:\t%d\n", getCycleClockAccurancy() );
535     debugOutput(DEBUG_LEVEL_NORMAL, "\tMax rec:\t\t%d (max asy payload: %d bytes)\n",
536             getMaxRec(), getAsyMaxPayload() );
537 }
538
539 unsigned short
540 ConfigRom::getAsyMaxPayload() const
541 {
542     // XXX use pow instead?
543     return 1 << ( m_maxRec + 1 );
544 }
545
546 bool
547 ConfigRom::serialize( Glib::ustring path, Util::IOSerialize& ser )
548 {
549     bool result;
550     result  = ser.write( path + "m_nodeId", m_nodeId );
551     result &= ser.write( path + "m_avcDevice",  m_avcDevice );
552     result &= ser.write( path + "m_guid", m_guid );
553     result &= ser.write( path + "m_vendorName", Glib::ustring( m_vendorName ) );
554     result &= ser.write( path + "m_modelName", Glib::ustring( m_modelName ) );
555     result &= ser.write( path + "m_vendorId", m_vendorId );
556     result &= ser.write( path + "m_modelId", m_modelId );
557     result &= ser.write( path + "m_unit_specifier_id", m_unit_specifier_id );
558     result &= ser.write( path + "m_unit_version",  m_unit_version );
559     result &= ser.write( path + "m_isIsoResourceManager", m_isIsoResourceManager );
560     result &= ser.write( path + "m_isCycleMasterCapable", m_isCycleMasterCapable );
561     result &= ser.write( path + "m_isSupportIsoOperations", m_isSupportIsoOperations );
562     result &= ser.write( path + "m_isBusManagerCapable", m_isBusManagerCapable );
563     result &= ser.write( path + "m_cycleClkAcc", m_cycleClkAcc );
564     result &= ser.write( path + "m_maxRec", m_maxRec );
565     result &= ser.write( path + "m_nodeVendorId", m_nodeVendorId );
566     result &= ser.write( path + "m_chipIdHi", m_chipIdHi );
567     result &= ser.write( path + "m_chipIdLow", m_chipIdLow );
568     return result;
569 }
570
571 ConfigRom*
572 ConfigRom::deserialize( Glib::ustring path, Util::IODeserialize& deser, Ieee1394Service& ieee1394Service )
573 {
574     ConfigRom* pConfigRom = new ConfigRom;
575     if ( !pConfigRom ) {
576         return 0;
577     }
578
579     pConfigRom->m_1394Service = &ieee1394Service;
580
581     bool result;
582     result  = deser.read( path + "m_nodeId", pConfigRom->m_nodeId );
583     result &= deser.read( path + "m_avcDevice", pConfigRom->m_avcDevice );
584     result &= deser.read( path + "m_guid", pConfigRom->m_guid );
585     result &= deser.read( path + "m_vendorName", pConfigRom->m_vendorName );
586     result &= deser.read( path + "m_modelName", pConfigRom->m_modelName );
587     result &= deser.read( path + "m_vendorId", pConfigRom->m_vendorId );
588     result &= deser.read( path + "m_modelId", pConfigRom->m_modelId );
589     result &= deser.read( path + "m_unit_specifier_id", pConfigRom->m_unit_specifier_id );
590     result &= deser.read( path + "m_unit_version", pConfigRom->m_unit_version );
591     result &= deser.read( path + "m_isIsoResourceManager", pConfigRom->m_isIsoResourceManager );
592     result &= deser.read( path + "m_isCycleMasterCapable", pConfigRom->m_isCycleMasterCapable );
593     result &= deser.read( path + "m_isSupportIsoOperations", pConfigRom->m_isSupportIsoOperations );
594     result &= deser.read( path + "m_isBusManagerCapable", pConfigRom->m_isBusManagerCapable );
595     result &= deser.read( path + "m_cycleClkAcc", pConfigRom->m_cycleClkAcc );
596     result &= deser.read( path + "m_maxRec", pConfigRom->m_maxRec );
597     result &= deser.read( path + "m_nodeVendorId", pConfigRom->m_nodeVendorId );
598     result &= deser.read( path + "m_chipIdHi", pConfigRom->m_chipIdHi );
599     result &= deser.read( path + "m_chipIdLow", pConfigRom->m_chipIdLow );
600
601     if ( !result ) {
602         delete pConfigRom;
603         return 0;
604     }
605
606     return pConfigRom;
607 }
608
609 bool
610 ConfigRom::setNodeId( fb_nodeid_t nodeId )
611 {
612     m_nodeId = nodeId;
613     return true;
614 }
Note: See TracBrowser for help on using the browser.