spin_lock_irqsave(&card->lock, flags);
- card->broadcast_channel_allocated = (card->driver->get_features(card) &
- FEATURE_CHANNEL_31_ALLOCATED) != 0;
+ card->broadcast_channel_allocated = card->broadcast_channel_auto_allocated;
card->node_id = node_id;
/*
* Update node_id before generation to prevent anybody from using
break;
case CSR_PRIORITY_BUDGET:
- if (!(card->driver->get_features(card) &
- FEATURE_PRIORITY_BUDGET))
+ if (!card->priority_budget_implemented)
rcode = RCODE_ADDRESS_ERROR;
else if (tcode == TCODE_READ_QUADLET_REQUEST)
*data = cpu_to_be32(card->driver->
#define BROADCAST_CHANNEL_INITIAL (1 << 31 | 31)
#define BROADCAST_CHANNEL_VALID (1 << 30)
-#define FEATURE_PRIORITY_BUDGET 0x01
-#define FEATURE_CHANNEL_31_ALLOCATED 0x02
-
#define CSR_STATE_BIT_CMSTR (1 << 8)
#define CSR_STATE_BIT_ABDICATE (1 << 10)
u32 (*read_csr_reg)(struct fw_card *card, int csr_offset);
void (*write_csr_reg)(struct fw_card *card, int csr_offset, u32 value);
- unsigned int (*get_features)(struct fw_card *card);
-
struct fw_iso_context *
(*allocate_iso_context)(struct fw_card *card,
int type, int channel, size_t header_size);
int request_generation; /* for timestamping incoming requests */
unsigned quirks;
unsigned int pri_req_max;
- unsigned int features;
u32 bus_time;
bool is_root;
if (version >= OHCI_VERSION_1_1) {
reg_write(ohci, OHCI1394_InitialChannelsAvailableHi,
0xfffffffe);
- ohci->features |= FEATURE_CHANNEL_31_ALLOCATED;
+ card->broadcast_channel_auto_allocated = true;
}
/* Get implemented bits of the priority arbitration request counter. */
reg_write(ohci, OHCI1394_FairnessControl, 0x3f);
ohci->pri_req_max = reg_read(ohci, OHCI1394_FairnessControl) & 0x3f;
reg_write(ohci, OHCI1394_FairnessControl, 0);
- if (ohci->pri_req_max != 0)
- ohci->features |= FEATURE_PRIORITY_BUDGET;
+ card->priority_budget_implemented = ohci->pri_req_max != 0;
ar_context_run(&ohci->ar_request_ctx);
ar_context_run(&ohci->ar_response_ctx);
}
}
-static unsigned int ohci_get_features(struct fw_card *card)
-{
- struct fw_ohci *ohci = fw_ohci(card);
-
- return ohci->features;
-}
-
static void copy_iso_headers(struct iso_context *ctx, void *p)
{
int i = ctx->header_length;
.enable_phys_dma = ohci_enable_phys_dma,
.read_csr_reg = ohci_read_csr_reg,
.write_csr_reg = ohci_write_csr_reg,
- .get_features = ohci_get_features,
.allocate_iso_context = ohci_allocate_iso_context,
.free_iso_context = ohci_free_iso_context,
bool bm_abdicate; /* value of csr_abdicate before last bus reset */
bool csr_abdicate; /* visible in CSR STATE_CLEAR/SET registers */
+ bool priority_budget_implemented; /* controller feature */
+ bool broadcast_channel_auto_allocated; /* controller feature */
+
bool broadcast_channel_allocated;
u32 broadcast_channel;
__be32 topology_map[(CSR_TOPOLOGY_MAP_END - CSR_TOPOLOGY_MAP) / 4];