1*cbab9cadSchs /* $NetBSD: timer_cpcbus.c,v 1.12 2012/10/27 17:18:23 chs Exp $ */
254bb400aSaugustss
354bb400aSaugustss /*
454bb400aSaugustss * Copyright (c) 2002 The NetBSD Foundation, Inc.
554bb400aSaugustss * All rights reserved.
654bb400aSaugustss *
754bb400aSaugustss * This code is derived from software contributed to The NetBSD Foundation
854bb400aSaugustss * by Lennart Augustsson (lennart@augustsson.net) at Sandburst Corp.
954bb400aSaugustss *
1054bb400aSaugustss * Redistribution and use in source and binary forms, with or without
1154bb400aSaugustss * modification, are permitted provided that the following conditions
1254bb400aSaugustss * are met:
1354bb400aSaugustss * 1. Redistributions of source code must retain the above copyright
1454bb400aSaugustss * notice, this list of conditions and the following disclaimer.
1554bb400aSaugustss * 2. Redistributions in binary form must reproduce the above copyright
1654bb400aSaugustss * notice, this list of conditions and the following disclaimer in the
1754bb400aSaugustss * documentation and/or other materials provided with the distribution.
1854bb400aSaugustss *
1954bb400aSaugustss * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
2054bb400aSaugustss * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
2154bb400aSaugustss * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
2254bb400aSaugustss * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
2354bb400aSaugustss * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2454bb400aSaugustss * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2554bb400aSaugustss * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2654bb400aSaugustss * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2754bb400aSaugustss * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2854bb400aSaugustss * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2954bb400aSaugustss * POSSIBILITY OF SUCH DAMAGE.
3054bb400aSaugustss */
3154bb400aSaugustss
32365cbd94Slukem #include <sys/cdefs.h>
33*cbab9cadSchs __KERNEL_RCSID(0, "$NetBSD: timer_cpcbus.c,v 1.12 2012/10/27 17:18:23 chs Exp $");
34365cbd94Slukem
3554bb400aSaugustss #include <sys/param.h>
3654bb400aSaugustss #include <sys/device.h>
3754bb400aSaugustss #include <sys/systm.h>
3854bb400aSaugustss
39a2a38285Sad #include <sys/bus.h>
4054bb400aSaugustss #include <dev/ic/cpc700var.h>
4154bb400aSaugustss
4254bb400aSaugustss struct cpctim_softc {
4354bb400aSaugustss void *sc_ih;
4454bb400aSaugustss };
4554bb400aSaugustss
46529e91fcScegger static int cpctim_match(device_t, cfdata_t, void *);
47529e91fcScegger static void cpctim_attach(device_t, device_t, void *);
4854bb400aSaugustss
49*cbab9cadSchs CFATTACH_DECL_NEW(cpctim, sizeof(struct cpctim_softc),
50c9b3657cSthorpej cpctim_match, cpctim_attach, NULL, NULL);
5154bb400aSaugustss
5254bb400aSaugustss int
cpctim_match(device_t parent,cfdata_t cf,void * aux)53529e91fcScegger cpctim_match(device_t parent, cfdata_t cf, void *aux)
5454bb400aSaugustss {
5554bb400aSaugustss struct cpcbus_attach_args *caa = aux;
5654bb400aSaugustss
5774cfa48cSaugustss return (strcmp(caa->cpca_name, "cpctim") == 0);
5854bb400aSaugustss }
5954bb400aSaugustss
6054bb400aSaugustss void
cpctim_attach(device_t parent,device_t self,void * aux)61529e91fcScegger cpctim_attach(device_t parent, device_t self, void *aux)
6254bb400aSaugustss {
6354bb400aSaugustss #if 0
6454bb400aSaugustss struct cpcbus_attach_args *caa = aux;
65*cbab9cadSchs struct cpctim_softc *sc = device_private(self);
6654bb400aSaugustss int addr = caa->cpca_addr;
6754bb400aSaugustss int irq = caa->cpca_irq;
6854bb400aSaugustss
6954bb400aSaugustss #endif
7054bb400aSaugustss printf(": driver not implemented\n");
7154bb400aSaugustss }
72