-/* $OpenBSD: exynos.c,v 1.3 2015/05/19 03:30:54 jsg Exp $ */
+/* $OpenBSD: exynos.c,v 1.4 2015/05/20 00:14:55 jsg Exp $ */
/*
* Copyright (c) 2005,2008 Dale Rahn <drahn@openbsd.com>
* Copyright (c) 2012-2013 Patrick Wildt <patrick@blueri.se>
#include <armv7/armv7/armv7var.h>
-static int
-exynos_match(struct device *parent, void *cfdata, void *aux)
-{
- /* If we're running with fdt, do not attach. */
- /* XXX: Find a better way. */
- if (fdt_next_node(0))
- return (0);
-
- switch (board_id)
- {
- case BOARD_ID_EXYNOS5_CHROMEBOOK:
- return (1);
- }
-
- return (0);
-}
-
-void exynos5_init();
+int exynos_match(struct device *, void *, void *);
+void exynos5_init();
struct cfattach exynos_ca = {
sizeof(struct armv7_softc), exynos_match, armv7_attach, NULL,
}
return (NULL);
}
+
+int
+exynos_match(struct device *parent, void *cfdata, void *aux)
+{
+ /* If we're running with fdt, do not attach. */
+ /* XXX: Find a better way. */
+ if (fdt_next_node(0))
+ return (0);
+
+ return (imx_board_devs() != NULL);
+}
-/* $OpenBSD: imx.c,v 1.7 2015/05/19 03:30:54 jsg Exp $ */
+/* $OpenBSD: imx.c,v 1.8 2015/05/20 00:14:55 jsg Exp $ */
/*
* Copyright (c) 2005,2008 Dale Rahn <drahn@openbsd.com>
* Copyright (c) 2012-2013 Patrick Wildt <patrick@blueri.se>
#include <armv7/armv7/armv7var.h>
-void imx6_init();
+int imx_match(struct device *, void *, void *);
+void imx6_init();
struct cfattach imx_ca = {
- sizeof(struct armv7_softc), armv7_match, armv7_attach, NULL,
+ sizeof(struct armv7_softc), imx_match, armv7_attach, NULL,
config_activate_children
};
}
return (NULL);
}
+
+int
+imx_match(struct device *parent, void *cfdata, void *aux)
+{
+ return (imx_board_devs() != NULL);
+}
-/* $OpenBSD: omap.c,v 1.6 2015/05/19 03:30:54 jsg Exp $ */
+/* $OpenBSD: omap.c,v 1.7 2015/05/20 00:14:56 jsg Exp $ */
/*
* Copyright (c) 2005,2008 Dale Rahn <drahn@openbsd.com>
*
#include <armv7/armv7/armv7var.h>
-void omap3_init();
-void omap4_init();
-void am335x_init();
+int omap_match(struct device *, void *, void *);
+void omap3_init();
+void omap4_init();
+void am335x_init();
struct cfattach omap_ca = {
- sizeof(struct armv7_softc), armv7_match, armv7_attach
+ sizeof(struct armv7_softc), omap_match, armv7_attach
};
struct cfdriver omap_cd = {
}
return (NULL);
}
+
+int
+omap_match(struct device *parent, void *cfdata, void *aux)
+{
+ return (omap_board_devs() != NULL);
+}
-/* $OpenBSD: sunxi.c,v 1.5 2015/05/19 03:30:54 jsg Exp $ */
+/* $OpenBSD: sunxi.c,v 1.6 2015/05/20 00:14:56 jsg Exp $ */
/*
* Copyright (c) 2005,2008 Dale Rahn <drahn@openbsd.com>
*
#include <armv7/armv7/armv7var.h>
#include <armv7/sunxi/sunxireg.h>
-void sxia1x_init();
-void sxia20_init();
+int sunxi_match(struct device *, void *, void *);
+void sxia1x_init();
+void sxia20_init();
struct cfattach sunxi_ca = {
- sizeof(struct armv7_softc), armv7_match, armv7_attach
+ sizeof(struct armv7_softc), sunxi_match, armv7_attach
};
struct cfdriver sunxi_cd = {
}
return (NULL);
}
+
+int
+sunxi_match(struct device *parent, void *cfdata, void *aux)
+{
+ return (sunxi_board_devs() != NULL);
+}