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