提交 cca60977 编写于 作者: J Jarod Wilson 提交者: Stefan Richter

firewire: replace more hex values with defined csr constants

Trivial change to replace more meaningless (to the untrained eye) hex
values with defined CSR constants.
Signed-off-by: NJarod Wilson <jwilson@redhat.com>
Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
上级 c9755e14
...@@ -410,7 +410,7 @@ read_rom(struct fw_device *device, int generation, int index, u32 *data) ...@@ -410,7 +410,7 @@ read_rom(struct fw_device *device, int generation, int index, u32 *data)
init_completion(&callback_data.done); init_completion(&callback_data.done);
offset = 0xfffff0000400ULL + index * 4; offset = (CSR_REGISTER_BASE | CSR_CONFIG_ROM) + index * 4;
fw_send_request(device->card, &t, TCODE_READ_QUADLET_REQUEST, fw_send_request(device->card, &t, TCODE_READ_QUADLET_REQUEST,
device->node_id, generation, device->max_speed, device->node_id, generation, device->max_speed,
offset, NULL, 4, complete_transaction, &callback_data); offset, NULL, 4, complete_transaction, &callback_data);
......
...@@ -396,7 +396,8 @@ const struct fw_address_region fw_high_memory_region = ...@@ -396,7 +396,8 @@ const struct fw_address_region fw_high_memory_region =
const struct fw_address_region fw_private_region = const struct fw_address_region fw_private_region =
{ .start = 0xffffe0000000ULL, .end = 0xfffff0000000ULL, }; { .start = 0xffffe0000000ULL, .end = 0xfffff0000000ULL, };
const struct fw_address_region fw_csr_region = const struct fw_address_region fw_csr_region =
{ .start = 0xfffff0000000ULL, .end = 0xfffff0000800ULL, }; { .start = CSR_REGISTER_BASE,
.end = CSR_REGISTER_BASE | CSR_CONFIG_ROM_END, };
const struct fw_address_region fw_unit_space_region = const struct fw_address_region fw_unit_space_region =
{ .start = 0xfffff0000900ULL, .end = 0x1000000000000ULL, }; { .start = 0xfffff0000900ULL, .end = 0x1000000000000ULL, };
EXPORT_SYMBOL(fw_low_memory_region); EXPORT_SYMBOL(fw_low_memory_region);
...@@ -747,7 +748,8 @@ fw_core_handle_response(struct fw_card *card, struct fw_packet *p) ...@@ -747,7 +748,8 @@ fw_core_handle_response(struct fw_card *card, struct fw_packet *p)
EXPORT_SYMBOL(fw_core_handle_response); EXPORT_SYMBOL(fw_core_handle_response);
static const struct fw_address_region topology_map_region = static const struct fw_address_region topology_map_region =
{ .start = 0xfffff0001000ull, .end = 0xfffff0001400ull, }; { .start = CSR_REGISTER_BASE | CSR_TOPOLOGY_MAP,
.end = CSR_REGISTER_BASE | CSR_TOPOLOGY_MAP_END, };
static void static void
handle_topology_map(struct fw_card *card, struct fw_request *request, handle_topology_map(struct fw_card *card, struct fw_request *request,
...@@ -785,7 +787,8 @@ static struct fw_address_handler topology_map = { ...@@ -785,7 +787,8 @@ static struct fw_address_handler topology_map = {
}; };
static const struct fw_address_region registers_region = static const struct fw_address_region registers_region =
{ .start = 0xfffff0000000ull, .end = 0xfffff0000400ull, }; { .start = CSR_REGISTER_BASE,
.end = CSR_REGISTER_BASE | CSR_CONFIG_ROM, };
static void static void
handle_registers(struct fw_card *card, struct fw_request *request, handle_registers(struct fw_card *card, struct fw_request *request,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册