#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: dec_alphabook1.c,v 1.31 2025/03/09 01:06:41 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/device.h>
#include <machine/rpb.h>
#include <machine/autoconf.h>
#include <machine/cpuconf.h>
#include <dev/pci/pcivar.h>
#include <alpha/pci/lcareg.h>
#include <alpha/pci/lcavar.h>
void dec_alphabook1_init(void);
static void dec_alphabook1_cons_init(void);
static void dec_alphabook1_device_register(device_t, void *);
const struct alpha_variation_table dec_alphabook1_variations[] = {
{ 0, "AlphaBook" },
{ 0, NULL },
};
void
dec_alphabook1_init(void)
{
uint64_t variation;
platform.family = "AlphaBook";
if ((platform.model = alpha_dsr_sysname()) == NULL) {
variation = hwrpb->rpb_variation & SV_ST_MASK;
if ((platform.model = alpha_variation_name(variation,
dec_alphabook1_variations)) == NULL)
platform.model = alpha_unknown_sysname();
}
platform.iobus = "lca";
platform.cons_init = dec_alphabook1_cons_init;
platform.device_register = dec_alphabook1_device_register;
lca_probe_bcache();
}
static void
dec_alphabook1_cons_init(void)
{
struct lca_config *lcp;
extern struct lca_config lca_configuration;
lcp = &lca_configuration;
lca_init(lcp);
pci_consinit(&lcp->lc_pc, &lcp->lc_iot, &lcp->lc_memt,
&lcp->lc_iot, &lcp->lc_memt);
}
static void
dec_alphabook1_device_register(device_t dev, void *aux)
{
pci_find_bootdev(NULL, dev, aux);
}