-/* $OpenBSD: armv7_a4x_io.S,v 1.1 2009/05/08 02:57:32 drahn Exp $ */
+/* $OpenBSD: armv7_a4x_io.S,v 1.2 2017/04/27 10:57:05 kettenis Exp $ */
/* $NetBSD: pxa2x0_a4x_io.S,v 1.1 2002/10/19 19:31:39 bsh Exp $ */
/*
*/
ENTRY(a4x_bs_r_1)
- ldrb r0, [r1, r2, LSL #2]
+ ldr r0, [r1, r2, LSL #2]
mov pc, lr
ENTRY(a4x_bs_r_2)
- mov r2, r2, LSL #2
- ldrh r0, [r1, r2]
+ ldr r0, [r1, r2, LSL #2]
mov pc, lr
ENTRY(a4x_bs_r_4)
*/
ENTRY(a4x_bs_w_1)
- strb r3, [r1, r2, LSL #2]
+ str r3, [r1, r2, LSL #2]
mov pc, lr
ENTRY(a4x_bs_w_2)
- mov r2, r2, LSL #2
- strh r3, [r1, r2]
+ str r3, [r1, r2, LSL #2]
mov pc, lr
ENTRY(a4x_bs_w_4)
-/* $OpenBSD: arm64_bus_space.c,v 1.3 2017/02/17 19:20:22 patrick Exp $ */
+/* $OpenBSD: arm64_bus_space.c,v 1.4 2017/04/27 10:57:05 kettenis Exp $ */
/*
* Copyright (c) 2001-2003 Opsycon AB (www.opsycon.se / www.opsycon.com)
uint8_t
a4x_space_read_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o)
{
- return *(volatile uint8_t *)(h + (o*4));
+ return *(volatile uint32_t *)(h + (o*4));
}
uint16_t
a4x_space_read_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o)
{
- return *(volatile uint16_t *)(h + (o*4));
+ return *(volatile uint32_t *)(h + (o*4));
}
uint32_t
a4x_space_write_1(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
uint8_t v)
{
- *(volatile uint8_t *)(h + (o*4)) = v;
+ *(volatile uint32_t *)(h + (o*4)) = v;
}
void
a4x_space_write_2(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o,
uint16_t v)
{
- *(volatile uint16_t *)(h + (o*4)) = v;
+ *(volatile uint32_t *)(h + (o*4)) = v;
}
void