summaryrefslogtreecommitdiff
path: root/drivers/firewire/ohci.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2010-06-12 20:30:21 +0200
committerStefan Richter <stefanr@s5r6.in-berlin.de>2010-06-19 13:01:41 +0200
commitdb3c9cc105ee844f6cd7a1beb9926fb8e9a093ae (patch)
tree5fe981b7be4ffb97a506e23836d6c81a61dc8c91 /drivers/firewire/ohci.c
parente847cc832bab50aad939a0c30414cd986637564d (diff)
firewire: replace get_features card driver hook
by feature variables in the fw_card struct. The hook appeared to be an unnecessary abstraction in the card driver interface. Cleaner would be to pass those feature flags as arguments to fw_card_initialize() or fw_card_add(), but the FairnessControl register is in the SCLK domain and may therefore not be accessible while Link Power Status is off, i.e. before the card->driver->enable call from fw_card_add(). Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/ohci.c')
-rw-r--r--drivers/firewire/ohci.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c
index 2abdb3268a10..09bba9315de9 100644
--- a/drivers/firewire/ohci.c
+++ b/drivers/firewire/ohci.c
@@ -172,7 +172,6 @@ struct fw_ohci {
int request_generation; /* for timestamping incoming requests */
unsigned quirks;
unsigned int pri_req_max;
- unsigned int features;
u32 bus_time;
bool is_root;
@@ -1753,15 +1752,14 @@ static int ohci_enable(struct fw_card *card,
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);
@@ -2132,13 +2130,6 @@ static void ohci_write_csr_reg(struct fw_card *card, int csr_offset, u32 value)
}
}
-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;
@@ -2578,7 +2569,6 @@ static const struct fw_card_driver ohci_driver = {
.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,