diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2018-03-20 23:04:49 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2018-03-20 23:04:49 +0000 |
commit | 8003c7a5b880e6eea83d8191d8d3abc1e0b87db0 (patch) | |
tree | aacb5f4619891a6fe39b1f0fbedba75353cfbd79 /sys | |
parent | b2d42ca47b3110cb63b8a1d163c5c1de89895a5d (diff) |
To allow sharing more code between armv7 and arm64 platforms, introduce
a common bus space tag that can be used for early console attachment.
ok kettenis@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/arm/armv7/armv7_space.c | 3 | ||||
-rw-r--r-- | sys/arch/arm/include/fdt.h | 3 | ||||
-rw-r--r-- | sys/arch/arm64/dev/arm64_bus_space.c | 3 | ||||
-rw-r--r-- | sys/arch/arm64/include/fdt.h | 3 |
4 files changed, 8 insertions, 4 deletions
diff --git a/sys/arch/arm/armv7/armv7_space.c b/sys/arch/arm/armv7/armv7_space.c index c7e9b686b8f..da3f875a253 100644 --- a/sys/arch/arm/armv7/armv7_space.c +++ b/sys/arch/arm/armv7/armv7_space.c @@ -1,4 +1,4 @@ -/* $OpenBSD: armv7_space.c,v 1.9 2016/10/05 07:44:24 patrick Exp $ */ +/* $OpenBSD: armv7_space.c,v 1.10 2018/03/20 23:04:48 patrick Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -163,6 +163,7 @@ struct bus_space armv7_bs_tag = { bs_notimpl_bs_c_4, bs_notimpl_bs_c_8, }; +struct bus_space *fdt_cons_bs_tag = &armv7_bs_tag; int armv7_bs_map(void *t, uint64_t bpa, bus_size_t size, diff --git a/sys/arch/arm/include/fdt.h b/sys/arch/arm/include/fdt.h index 2331566e33a..b8c8f3b5b69 100644 --- a/sys/arch/arm/include/fdt.h +++ b/sys/arch/arm/include/fdt.h @@ -1,4 +1,4 @@ -/* $OpenBSD: fdt.h,v 1.5 2017/08/27 12:42:22 kettenis Exp $ */ +/* $OpenBSD: fdt.h,v 1.6 2018/03/20 23:04:48 patrick Exp $ */ /* * Copyright (c) 2016 Patrick Wildt <patrick@blueri.se> * @@ -35,6 +35,7 @@ struct fdt_attach_args { }; extern int stdout_node; +extern bus_space_tag_t fdt_cons_bs_tag; void *fdt_find_cons(const char *); diff --git a/sys/arch/arm64/dev/arm64_bus_space.c b/sys/arch/arm64/dev/arm64_bus_space.c index f9247a19af1..cab41ff1061 100644 --- a/sys/arch/arm64/dev/arm64_bus_space.c +++ b/sys/arch/arm64/dev/arm64_bus_space.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arm64_bus_space.c,v 1.4 2017/04/27 10:57:05 kettenis Exp $ */ +/* $OpenBSD: arm64_bus_space.c,v 1.5 2018/03/20 23:04:48 patrick Exp $ */ /* * Copyright (c) 2001-2003 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -58,6 +58,7 @@ bus_space_t arm64_bs_tag = { ._space_subregion = generic_space_region, ._space_vaddr = generic_space_vaddr }; +bus_space_t *fdt_cons_bs_tag = &arm64_bs_tag; bus_space_t arm64_a4x_bs_tag = { .bus_base = 0ULL, // XXX diff --git a/sys/arch/arm64/include/fdt.h b/sys/arch/arm64/include/fdt.h index 3ef06019d35..b60077ca82e 100644 --- a/sys/arch/arm64/include/fdt.h +++ b/sys/arch/arm64/include/fdt.h @@ -1,4 +1,4 @@ -/* $OpenBSD: fdt.h,v 1.2 2017/08/27 12:42:22 kettenis Exp $ */ +/* $OpenBSD: fdt.h,v 1.3 2018/03/20 23:04:48 patrick Exp $ */ /* * Copyright (c) 2016 Patrick Wildt <patrick@blueri.se> * @@ -35,6 +35,7 @@ struct fdt_attach_args { }; extern int stdout_node; +extern bus_space_tag_t fdt_cons_bs_tag; void *fdt_find_cons(const char *); |