struct fw_card_driver { /* * Enable the given card with the given initial config rom. * This function is expected to activate the card, and either * enable the PHY or set the link_on bit and initiate a bus * reset.
*/ int (*enable)(struct fw_card *card, const __be32 *config_rom, size_t length);
int (*read_phy_reg)(struct fw_card *card, int address); int (*update_phy_reg)(struct fw_card *card, int address, int clear_bits, int set_bits);
/* * Update the config rom for an enabled card. This function * should change the config rom that is presented on the bus * and initiate a bus reset.
*/ int (*set_config_rom)(struct fw_card *card, const __be32 *config_rom, size_t length);
void (*send_request)(struct fw_card *card, struct fw_packet *packet); void (*send_response)(struct fw_card *card, struct fw_packet *packet); /* Calling cancel is valid once a packet has been submitted. */ int (*cancel_packet)(struct fw_card *card, struct fw_packet *packet);
/* * Allow the specified node ID to do direct DMA out and in of * host memory. The card will disable this for all node when * a bus reset happens, so driver need to re-enable this after * bus reset. Returns 0 on success, -ENODEV if the card * doesn't support this, -ESTALE if the generation doesn't * match.
*/ int (*enable_phys_dma)(struct fw_card *card, int node_id, int generation);
u32 (*read_csr)(struct fw_card *card, int csr_offset); void (*write_csr)(struct fw_card *card, int csr_offset, u32 value);
struct fw_iso_context *
(*allocate_iso_context)(struct fw_card *card, int type, int channel, size_t header_size); void (*free_iso_context)(struct fw_iso_context *ctx);
int (*start_iso)(struct fw_iso_context *ctx,
s32 cycle, u32 sync, u32 tags);
int (*set_iso_channels)(struct fw_iso_context *ctx, u64 *channels);
struct fw_node {
u16 node_id;
u8 color;
u8 port_count;
u8 link_on:1;
u8 initiated_reset:1;
u8 b_path:1;
u8 phy_speed:2; /* As in the self ID packet. */
u8 max_speed:2; /* Minimum of all phy-speeds on the path from the
* local node to this node. */
u8 max_depth:4; /* Maximum depth to any leaf node */
u8 max_hops:4; /* Max hops in this sub tree */
struct kref kref;
/* For serializing node topology into a list. */ struct list_head link;
void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation, int self_id_count, u32 *self_ids, bool bm_abdicate); void fw_destroy_nodes(struct fw_card *card);
/* * Check whether new_generation is the immediate successor of old_generation. * Take counter roll-over at 255 (as per OHCI) into account.
*/ staticinlinebool is_next_generation(int new_generation, int old_generation)
{ return (new_generation & 0xff) == ((old_generation + 1) & 0xff);
}
// Convert the value of IEEE 1394 CYCLE_TIME register to the format of timeStamp field in // descriptors of 1394 OHCI. staticinline u32 cycle_time_to_ohci_tstamp(u32 tstamp)
{ return (tstamp & 0x0ffff000) >> 12;
}
#define FW_PHY_CONFIG_NO_NODE_ID -1 #define FW_PHY_CONFIG_CURRENT_GAP_COUNT -1 void fw_send_phy_config(struct fw_card *card, int node_id, int generation, int gap_count);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.