-/* $OpenBSD: arm64_bus_space.c,v 1.6 2018/05/15 11:12:35 kettenis Exp $ */
+/* $OpenBSD: arm64_bus_space.c,v 1.7 2018/08/20 19:38:07 kettenis Exp $ */
/*
* Copyright (c) 2001-2003 Opsycon AB (www.opsycon.se / www.opsycon.com)
._space_map = generic_space_map,
._space_unmap = generic_space_unmap,
._space_subregion = generic_space_region,
- ._space_vaddr = generic_space_vaddr
+ ._space_vaddr = generic_space_vaddr,
+ ._space_mmap = generic_space_mmap
};
bus_space_t *fdt_cons_bs_tag = &arm64_bs_tag;
{
return (void *)h;
}
+
+paddr_t
+generic_space_mmap(bus_space_tag_t t, bus_addr_t addr, off_t off,
+ int prot, int flags)
+{
+ return (addr + off);
+}
-/* $OpenBSD: bus.h,v 1.4 2018/05/15 11:12:35 kettenis Exp $ */
+/* $OpenBSD: bus.h,v 1.5 2018/08/20 19:38:07 kettenis Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB Sweden. All rights reserved.
*
int (*_space_subregion)(bus_space_tag_t, bus_space_handle_t,
bus_size_t, bus_size_t, bus_space_handle_t *);
void * (*_space_vaddr)(bus_space_tag_t, bus_space_handle_t);
+ paddr_t (*_space_mmap)(bus_space_tag_t, bus_addr_t, off_t,
+ int, int);
};
#define bus_space_read_1(t, h, o) (*(t)->_space_read_1)((t), (h), (o))
#define BUS_SPACE_MAP_PREFETCHABLE 0x08
#define bus_space_vaddr(t, h) (*(t)->_space_vaddr)((t), (h))
+#define bus_space_mmap(t, a, o, p, f) \
+ (*(t)->_space_mmap)((t), (a), (o), (p), (f))
/*----------------------------------------------------------------------------*/
#define bus_space_read_multi(n,m) \
int generic_space_region(bus_space_tag_t, bus_space_handle_t, bus_size_t,
bus_size_t, bus_space_handle_t *);
void *generic_space_vaddr(bus_space_tag_t, bus_space_handle_t);
+paddr_t generic_space_mmap(bus_space_tag_t, bus_addr_t, off_t, int, int);
uint8_t generic_space_read_1(bus_space_tag_t, bus_space_handle_t, bus_size_t);
uint16_t generic_space_read_2(bus_space_tag_t, bus_space_handle_t, bus_size_t);
uint32_t generic_space_read_4(bus_space_tag_t, bus_space_handle_t, bus_size_t);