Implement evbarm_device_register_post_config() hook for odroid and its

decendents. This allows post attach actions on every level of the machine
support.
This commit is contained in:
reinoud 2014-05-10 20:24:06 +00:00
parent 0fbcec9162
commit 9f69e282d7
4 changed files with 29 additions and 6 deletions

View File

@ -34,7 +34,7 @@
#include "opt_exynos.h"
#include <sys/cdefs.h>
__KERNEL_RCSID(1, "$NetBSD: exynos_io.c,v 1.3 2014/05/09 22:19:22 reinoud Exp $");
__KERNEL_RCSID(1, "$NetBSD: exynos_io.c,v 1.4 2014/05/10 20:24:06 reinoud Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@ -101,6 +101,11 @@ exyo_device_register(device_t self, void *aux)
}
}
void
exyo_device_register_post_config(device_t self, void *aux)
{
}
static int
exyo_find(device_t parent, cfdata_t cf, const int *ldesc, void *aux)
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: exynos_soc.c,v 1.8 2014/05/09 21:49:43 reinoud Exp $ */
/* $NetBSD: exynos_soc.c,v 1.9 2014/05/10 20:24:06 reinoud Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
* All rights reserved.
@ -33,7 +33,7 @@
#define _ARM32_BUS_DMA_PRIVATE
#include <sys/cdefs.h>
__KERNEL_RCSID(1, "$NetBSD: exynos_soc.c,v 1.8 2014/05/09 21:49:43 reinoud Exp $");
__KERNEL_RCSID(1, "$NetBSD: exynos_soc.c,v 1.9 2014/05/10 20:24:06 reinoud Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@ -304,3 +304,10 @@ exynos_device_register(device_t self, void *aux)
exyo_device_register(self, aux);
}
void
exynos_device_register_post_config(device_t self, void *aux)
{
exyo_device_register_post_config(self, aux);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: exynos_var.h,v 1.7 2014/05/10 10:47:17 reinoud Exp $ */
/* $NetBSD: exynos_var.h,v 1.8 2014/05/10 20:24:06 reinoud Exp $ */
/*-
* Copyright (c) 2013, 2014 The NetBSD Foundation, Inc.
* All rights reserved.
@ -118,7 +118,9 @@ extern void exynos_dma_bootstrap(psize_t memsize);
extern void exynos_gpio_bootstrap(void);
extern void exynos_device_register(device_t self, void *aux);
extern void exynos_device_register_post_config(device_t self, void *aux);
extern void exyo_device_register(device_t self, void *aux);
extern void exyo_device_register_post_config(device_t self, void *aux);
extern void exynos_wdt_reset(void);
extern bool exynos_gpio_pinset_available(const struct exynos_gpio_pinset *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: odroid_machdep.c,v 1.13 2014/05/10 19:31:00 reinoud Exp $ */
/* $NetBSD: odroid_machdep.c,v 1.14 2014/05/10 20:24:06 reinoud Exp $ */
/*
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: odroid_machdep.c,v 1.13 2014/05/10 19:31:00 reinoud Exp $");
__KERNEL_RCSID(0, "$NetBSD: odroid_machdep.c,v 1.14 2014/05/10 20:24:06 reinoud Exp $");
#include "opt_evbarm_boardtype.h"
#include "opt_exynos.h"
@ -203,6 +203,7 @@ void consinit(void);
static void kgdb_port_init(void);
#endif
void odroid_device_register(device_t self, void *aux);
void odroid_device_register_post_config(device_t self, void *aux);
/*
@ -403,6 +404,7 @@ strcpy(tmp, "-v");
/* we've a specific device_register routine */
evbarm_device_register = odroid_device_register;
evbarm_device_register_post_config = odroid_device_register_post_config;
/*
* If we couldn't map all of memory via TTBR1, limit the memory the
@ -576,3 +578,10 @@ odroid_device_register(device_t self, void *aux)
#endif
}
void
odroid_device_register_post_config(device_t self, void *aux)
{
exynos_device_register_post_config(self, aux);
}