Home | History | Annotate | Line # | Download | only in ic
gcscpcibvar.h revision 1.2
      1  1.2  bouyer /* $NetBSD: gcscpcibvar.h,v 1.2 2011/08/29 18:34:42 bouyer Exp $ */
      2  1.1  bouyer /* $OpenBSD: gcscpcib.c,v 1.6 2007/11/17 17:02:47 mbalmer Exp $	*/
      3  1.1  bouyer 
      4  1.1  bouyer /*
      5  1.1  bouyer  * Copyright (c) 2008 Yojiro UO <yuo (at) nui.org>
      6  1.1  bouyer  * Copyright (c) 2007 Marc Balmer <mbalmer (at) openbsd.org>
      7  1.1  bouyer  * Copyright (c) 2007 Michael Shalayeff
      8  1.1  bouyer  * All rights reserved.
      9  1.1  bouyer  *
     10  1.1  bouyer  * Permission to use, copy, modify, and distribute this software for any
     11  1.1  bouyer  * purpose with or without fee is hereby granted, provided that the above
     12  1.1  bouyer  * copyright notice and this permission notice appear in all copies.
     13  1.1  bouyer  *
     14  1.1  bouyer  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
     15  1.1  bouyer  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
     16  1.1  bouyer  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
     17  1.1  bouyer  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
     18  1.1  bouyer  * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER IN
     19  1.1  bouyer  * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
     20  1.1  bouyer  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     21  1.1  bouyer  */
     22  1.1  bouyer 
     23  1.1  bouyer struct gcscpcib_softc {
     24  1.1  bouyer 	struct timecounter	sc_timecounter;
     25  1.1  bouyer 	bus_space_tag_t		sc_iot;
     26  1.1  bouyer 	bus_space_handle_t	sc_ioh;
     27  1.1  bouyer 
     28  1.1  bouyer 	/* Watchdog Timer */
     29  1.1  bouyer 	struct sysmon_wdog	sc_smw;
     30  1.1  bouyer 	int			sc_wdt_mfgpt;
     31  1.1  bouyer 
     32  1.1  bouyer 	/* GPIO interface */
     33  1.1  bouyer 	bus_space_tag_t		sc_gpio_iot;
     34  1.1  bouyer 	bus_space_handle_t	sc_gpio_ioh;
     35  1.1  bouyer 	struct gpio_chipset_tag	sc_gpio_gc;
     36  1.1  bouyer 	gpio_pin_t		sc_gpio_pins[AMD553X_GPIO_NPINS];
     37  1.1  bouyer 
     38  1.1  bouyer #if 0
     39  1.1  bouyer 	/* SMbus/i2c interface */
     40  1.1  bouyer 	bus_space_tag_t		sc_smbus_iot;
     41  1.1  bouyer         bus_space_handle_t	sc_smbus_ioh;
     42  1.1  bouyer 	i2c_addr_t		sc_smbus_slaveaddr; /* address of smbus slave */
     43  1.1  bouyer 	struct i2c_controller	sc_i2c;		/* i2c controller info */
     44  1.1  bouyer 	krwlock_t		sc_smbus_rwlock;
     45  1.1  bouyer #endif
     46  1.1  bouyer };
     47  1.1  bouyer 
     48  1.2  bouyer void gcscpcib_attach(device_t, struct gcscpcib_softc *, bus_space_tag_t, int);
     49  1.2  bouyer #define GCSCATTACH_NO_WDT	0x0001 /* do not attach watchdog */
     50  1.1  bouyer 
     51  1.1  bouyer uint64_t gcsc_rdmsr(uint);
     52  1.1  bouyer void     gcsc_wrmsr(uint, uint64_t);
     53