aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2010-06-12 14:35:52 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2010-06-19 07:01:41 -0400
commit0fcff4e39323f466a47684d7c8ffa77e1be86c8a (patch)
treecdbe9d239ae59c18a48a34d937da3f658c61e873 /drivers/firewire
parentb384cf18873da1ed100662aa7373edf5883a1c24 (diff)
firewire: rename CSR access driver methods
Rather than "read a Control and Status Registers (CSR) Architecture register" I prefer to say "read a Control and Status Register". Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire')
-rw-r--r--drivers/firewire/core-cdev.c2
-rw-r--r--drivers/firewire/core-transaction.c10
-rw-r--r--drivers/firewire/core.h4
-rw-r--r--drivers/firewire/ohci.c8
4 files changed, 11 insertions, 13 deletions
diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c
index 2e62516a4b15..32a33da64991 100644
--- a/drivers/firewire/core-cdev.c
+++ b/drivers/firewire/core-cdev.c
@@ -1044,7 +1044,7 @@ static int ioctl_get_cycle_timer2(struct client *client, union ioctl_arg *arg)
1044 1044
1045 local_irq_disable(); 1045 local_irq_disable();
1046 1046
1047 cycle_time = card->driver->read_csr_reg(card, CSR_CYCLE_TIME); 1047 cycle_time = card->driver->read_csr(card, CSR_CYCLE_TIME);
1048 1048
1049 switch (a->clk_id) { 1049 switch (a->clk_id) {
1050 case CLOCK_REALTIME: getnstimeofday(&ts); break; 1050 case CLOCK_REALTIME: getnstimeofday(&ts); break;
diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-transaction.c
index b8f6db6a0494..182da69eae44 100644
--- a/drivers/firewire/core-transaction.c
+++ b/drivers/firewire/core-transaction.c
@@ -1026,19 +1026,17 @@ static void handle_registers(struct fw_card *card, struct fw_request *request,
1026 case CSR_BUS_TIME: 1026 case CSR_BUS_TIME:
1027 case CSR_BUSY_TIMEOUT: 1027 case CSR_BUSY_TIMEOUT:
1028 if (tcode == TCODE_READ_QUADLET_REQUEST) 1028 if (tcode == TCODE_READ_QUADLET_REQUEST)
1029 *data = cpu_to_be32(card->driver-> 1029 *data = cpu_to_be32(card->driver->read_csr(card, reg));
1030 read_csr_reg(card, reg));
1031 else if (tcode == TCODE_WRITE_QUADLET_REQUEST) 1030 else if (tcode == TCODE_WRITE_QUADLET_REQUEST)
1032 card->driver->write_csr_reg(card, reg, 1031 card->driver->write_csr(card, reg, be32_to_cpu(*data));
1033 be32_to_cpu(*data));
1034 else 1032 else
1035 rcode = RCODE_TYPE_ERROR; 1033 rcode = RCODE_TYPE_ERROR;
1036 break; 1034 break;
1037 1035
1038 case CSR_RESET_START: 1036 case CSR_RESET_START:
1039 if (tcode == TCODE_WRITE_QUADLET_REQUEST) 1037 if (tcode == TCODE_WRITE_QUADLET_REQUEST)
1040 card->driver->write_csr_reg(card, CSR_STATE_CLEAR, 1038 card->driver->write_csr(card, CSR_STATE_CLEAR,
1041 CSR_STATE_BIT_ABDICATE); 1039 CSR_STATE_BIT_ABDICATE);
1042 else 1040 else
1043 rcode = RCODE_TYPE_ERROR; 1041 rcode = RCODE_TYPE_ERROR;
1044 break; 1042 break;
diff --git a/drivers/firewire/core.h b/drivers/firewire/core.h
index 8280c625170b..3000dd74acfd 100644
--- a/drivers/firewire/core.h
+++ b/drivers/firewire/core.h
@@ -78,8 +78,8 @@ struct fw_card_driver {
78 int (*enable_phys_dma)(struct fw_card *card, 78 int (*enable_phys_dma)(struct fw_card *card,
79 int node_id, int generation); 79 int node_id, int generation);
80 80
81 u32 (*read_csr_reg)(struct fw_card *card, int csr_offset); 81 u32 (*read_csr)(struct fw_card *card, int csr_offset);
82 void (*write_csr_reg)(struct fw_card *card, int csr_offset, u32 value); 82 void (*write_csr)(struct fw_card *card, int csr_offset, u32 value);
83 83
84 struct fw_iso_context * 84 struct fw_iso_context *
85 (*allocate_iso_context)(struct fw_card *card, 85 (*allocate_iso_context)(struct fw_card *card,
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c
index a55cf0911b72..a4bbf3dadf58 100644
--- a/drivers/firewire/ohci.c
+++ b/drivers/firewire/ohci.c
@@ -2026,7 +2026,7 @@ static int ohci_enable_phys_dma(struct fw_card *card,
2026#endif /* CONFIG_FIREWIRE_OHCI_REMOTE_DMA */ 2026#endif /* CONFIG_FIREWIRE_OHCI_REMOTE_DMA */
2027} 2027}
2028 2028
2029static u32 ohci_read_csr_reg(struct fw_card *card, int csr_offset) 2029static u32 ohci_read_csr(struct fw_card *card, int csr_offset)
2030{ 2030{
2031 struct fw_ohci *ohci = fw_ohci(card); 2031 struct fw_ohci *ohci = fw_ohci(card);
2032 unsigned long flags; 2032 unsigned long flags;
@@ -2077,7 +2077,7 @@ static u32 ohci_read_csr_reg(struct fw_card *card, int csr_offset)
2077 } 2077 }
2078} 2078}
2079 2079
2080static void ohci_write_csr_reg(struct fw_card *card, int csr_offset, u32 value) 2080static void ohci_write_csr(struct fw_card *card, int csr_offset, u32 value)
2081{ 2081{
2082 struct fw_ohci *ohci = fw_ohci(card); 2082 struct fw_ohci *ohci = fw_ohci(card);
2083 unsigned long flags; 2083 unsigned long flags;
@@ -2576,8 +2576,8 @@ static const struct fw_card_driver ohci_driver = {
2576 .send_response = ohci_send_response, 2576 .send_response = ohci_send_response,
2577 .cancel_packet = ohci_cancel_packet, 2577 .cancel_packet = ohci_cancel_packet,
2578 .enable_phys_dma = ohci_enable_phys_dma, 2578 .enable_phys_dma = ohci_enable_phys_dma,
2579 .read_csr_reg = ohci_read_csr_reg, 2579 .read_csr = ohci_read_csr,
2580 .write_csr_reg = ohci_write_csr_reg, 2580 .write_csr = ohci_write_csr,
2581 2581
2582 .allocate_iso_context = ohci_allocate_iso_context, 2582 .allocate_iso_context = ohci_allocate_iso_context,
2583 .free_iso_context = ohci_free_iso_context, 2583 .free_iso_context = ohci_free_iso_context,