(no subject)
Brought to you by:
aeb,
bencollins
From: Pieter W. <Pieter.Willems@FillFactory.com> - 2003-05-06 08:52:07
|
Hello, I would like to make some changes to the config rom for my my FireWire application. I Found that the definition of it is located in the ohci1394.c file in the function ohci_init_config_rom(). I used it to change the textual descriptor of the root directory and the vendor ID. I also added a Module Hw Version with it.=20 But I still have a few problems. -I would like to create a unit directory with 2 leaves. It would have to look a little like this: =09 -- unit directory |_ Unit spec ID =3D myname (0xmyvalue) |_ Unit Sw Version =3D 0xmyvalue I don't realy know how to do this. Do you have any ideas? This is the code of my ohci_init_config_rom() so far: static void ohci_init_config_rom(struct ti_ohci *ohci) { struct config_rom_ptr cr; memset(&cr, 0, sizeof(cr)); memset(ohci->csr_config_rom_cpu, 0, sizeof (ohci->csr_config_rom_cpu)); cr.data =3D ohci->csr_config_rom_cpu; /* Bus info block */ cf_unit_begin(&cr, 0); cf_put_1quad(&cr, reg_read(ohci, OHCI1394_BusID)); cf_put_1quad(&cr, reg_read(ohci, OHCI1394_BusOptions)); cf_put_1quad(&cr, reg_read(ohci, OHCI1394_GUIDHi)); cf_put_1quad(&cr, reg_read(ohci, OHCI1394_GUIDLo)); cf_unit_end(&cr); DBGMSG(ohci->id, "GUID: %08x:%08x", reg_read(ohci, OHCI1394_GUIDHi), reg_read(ohci, OHCI1394_GUIDLo)); /* IEEE P1212 suggests the initial ROM header CRC should only * cover the header itself (and not the entire ROM). Since we do * this, then we can make our bus_info_len the same as the CRC * length. */ ohci->csr_config_rom_cpu[0] |=3D cpu_to_be32( (be32_to_cpu(ohci->csr_config_rom_cpu[0]) & 0x00ff0000) << 8); reg_write(ohci, OHCI1394_ConfigROMhdr, be32_to_cpu(ohci->csr_config_rom_cpu[0])); /* Root directory */ cf_unit_begin(&cr, 1); /* Vendor ID */ cf_put_keyval(&cr, 0x03, 0x00094B); cf_put_refer(&cr, 0x81, 2); /* Textual description unit */ cf_put_keyval(&cr, 0x0c, 0x0083c0); /* Node capabilities */ /* NOTE: Add other unit referers here, and append at bottom */ //cf_put_keyval(&cr, 0x04, 0x991029); //cf_put_keyval(&cr, 0x0A, 0x00094B); cf_put_keyval(&cr, 0x0B, 0x000802); cf_unit_end(&cr); /* Textual description - "Linux 1394" */ cf_unit_begin(&cr, 2); cf_put_keyval(&cr, 0, 0); cf_put_1quad(&cr, 0); cf_put_str(&cr, "FillFactory NV"); cf_unit_end(&cr); ohci->csr_config_rom_length =3D cr.data - ohci->csr_config_rom_cpu; } Thanks already! Pieter |