Lines Matching defs:card

44 #define ohci_info(ohci, f, args...)	dev_info(ohci->card.device, f, ##args)
45 #define ohci_notice(ohci, f, args...) dev_notice(ohci->card.device, f, ##args)
46 #define ohci_err(ohci, f, args...) dev_err(ohci->card.device, f, ##args)
179 struct fw_card card;
234 static inline struct fw_ohci *fw_ohci(struct fw_card *card)
236 return container_of(card, struct fw_ohci, card);
672 static int ohci_read_phy_reg(struct fw_card *card, int addr)
674 struct fw_ohci *ohci = fw_ohci(card);
684 static int ohci_update_phy_reg(struct fw_card *card, int addr,
687 struct fw_ohci *ohci = fw_ohci(card);
722 struct device *dev = ctx->ohci->card.device;
824 dma_sync_single_for_cpu(ctx->ohci->card.device,
830 dma_sync_single_for_cpu(ctx->ohci->card.device,
932 fw_core_handle_request(&ohci->card, &p);
934 fw_core_handle_response(&ohci->card, &p);
960 dma_sync_single_for_device(ctx->ohci->card.device,
1017 struct device *dev = ohci->card.device;
1153 desc = dma_alloc_coherent(ctx->ohci->card.device, PAGE_SIZE,
1210 struct fw_card *card = &ctx->ohci->card;
1214 dma_free_coherent(card->device, PAGE_SIZE, desc,
1411 payload_bus = dma_map_single(ohci->card.device,
1415 if (dma_mapping_error(ohci->card.device, payload_bus)) {
1443 dma_unmap_single(ohci->card.device, payload_bus,
1490 dma_unmap_single(ohci->card.device, packet->payload_bus,
1546 packet->callback(packet, &ohci->card, packet->ack);
1581 fw_core_handle_response(&ohci->card, &response);
1629 fw_core_handle_response(&ohci->card, &response);
1638 packet->callback(packet, &ctx->ohci->card, packet->ack);
1659 fw_core_handle_request(&ctx->ohci->card, packet);
1661 fw_core_handle_response(&ctx->ohci->card, packet);
1667 packet->callback(packet, &ctx->ohci->card, packet->ack);
1689 packet->callback(packet, &ctx->ohci->card, packet->ack);
1891 reg = ohci_read_phy_reg(&ohci->card, 4);
1896 reg = ohci_read_phy_reg(&ohci->card, 1);
2095 dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE,
2100 fw_core_handle_bus_reset(&ohci->card, ohci->node_id, generation,
2309 static int ohci_enable(struct fw_card *card,
2312 struct fw_ohci *ohci = fw_ohci(card);
2318 ohci_err(ohci, "failed to reset ohci card\n");
2328 * a JMicron PCIe card), we have to try again sometimes.
2386 card->broadcast_channel_auto_allocated = true;
2393 card->priority_budget_implemented = ohci->pri_req_max != 0;
2404 ret = ohci_update_phy_reg(card, 4, 0, PHY_LINK_ACTIVE | PHY_CONTENDER);
2429 dma_alloc_coherent(ohci->card.device, CONFIG_ROM_SIZE,
2482 fw_schedule_bus_reset(&ohci->card, false, true);
2487 static int ohci_set_config_rom(struct fw_card *card,
2494 ohci = fw_ohci(card);
2524 dma_alloc_coherent(ohci->card.device, CONFIG_ROM_SIZE,
2559 dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE,
2570 fw_schedule_bus_reset(&ohci->card, true, true);
2575 static void ohci_send_request(struct fw_card *card, struct fw_packet *packet)
2577 struct fw_ohci *ohci = fw_ohci(card);
2582 static void ohci_send_response(struct fw_card *card, struct fw_packet *packet)
2584 struct fw_ohci *ohci = fw_ohci(card);
2589 static int ohci_cancel_packet(struct fw_card *card, struct fw_packet *packet)
2591 struct fw_ohci *ohci = fw_ohci(card);
2602 dma_unmap_single(ohci->card.device, packet->payload_bus,
2608 packet->callback(packet, &ohci->card, packet->ack);
2616 static int ohci_enable_phys_dma(struct fw_card *card,
2619 struct fw_ohci *ohci = fw_ohci(card);
2656 static u32 ohci_read_csr(struct fw_card *card, int csr_offset)
2658 struct fw_ohci *ohci = fw_ohci(card);
2707 static void ohci_write_csr(struct fw_card *card, int csr_offset, u32 value)
2709 struct fw_ohci *ohci = fw_ohci(card);
2824 dma_sync_single_range_for_cpu(context->ohci->card.device,
2863 dma_sync_single_range_for_cpu(context->ohci->card.device,
2880 dma_sync_single_range_for_cpu(ctx->context.ohci->card.device,
2918 dma_sync_single_range_for_cpu(context->ohci->card.device,
2976 static struct fw_iso_context *ohci_allocate_iso_context(struct fw_card *card,
2979 struct fw_ohci *ohci = fw_ohci(card);
3126 struct fw_ohci *ohci = fw_ohci(base->card);
3151 struct fw_ohci *ohci = fw_ohci(base->card);
3188 struct fw_ohci *ohci = fw_ohci(base->card);
3317 dma_sync_single_range_for_device(ctx->context.ohci->card.device,
3345 struct device *device = ctx->context.ohci->card.device;
3463 dma_sync_single_range_for_device(ctx->context.ohci->card.device,
3615 fw_card_initialize(&ohci->card, &ohci_driver, &dev->dev);
3676 ohci->misc_buffer = dma_alloc_coherent(ohci->card.device,
3751 err = fw_card_add(&ohci->card, max_receive, link_speed, guid);
3757 "added OHCI v%x.%x device as card %d, "
3759 version >> 16, version & 0xff, ohci->card.index,
3781 dma_free_coherent(ohci->card.device, PAGE_SIZE,
3809 fw_core_remove_card(&ohci->card);
3820 dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE,
3823 dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE,
3827 dma_free_coherent(ohci->card.device, PAGE_SIZE,
3880 reg_write(ohci, OHCI1394_GUIDLo, (u32)ohci->card.guid);
3881 reg_write(ohci, OHCI1394_GUIDHi, (u32)(ohci->card.guid >> 32));
3884 err = ohci_enable(&ohci->card, NULL, 0);