Home | History | Annotate | Line # | Download | only in marvell
      1  1.15  kiyohara /*	$NetBSD: gtvar.h,v 1.15 2010/04/28 13:51:56 kiyohara Exp $	*/
      2   1.1      matt /*
      3  1.15  kiyohara  * Copyright (c) 2009 KIYOHARA Takashi
      4   1.1      matt  * All rights reserved.
      5   1.1      matt  *
      6   1.1      matt  * Redistribution and use in source and binary forms, with or without
      7   1.1      matt  * modification, are permitted provided that the following conditions
      8   1.1      matt  * are met:
      9   1.1      matt  * 1. Redistributions of source code must retain the above copyright
     10   1.1      matt  *    notice, this list of conditions and the following disclaimer.
     11   1.1      matt  * 2. Redistributions in binary form must reproduce the above copyright
     12   1.1      matt  *    notice, this list of conditions and the following disclaimer in the
     13   1.1      matt  *    documentation and/or other materials provided with the distribution.
     14   1.1      matt  *
     15  1.15  kiyohara  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     16  1.15  kiyohara  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
     17  1.15  kiyohara  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
     18  1.15  kiyohara  * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
     19  1.15  kiyohara  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
     20  1.15  kiyohara  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
     21  1.15  kiyohara  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     22  1.15  kiyohara  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
     23  1.15  kiyohara  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
     24  1.15  kiyohara  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     25   1.1      matt  * POSSIBILITY OF SUCH DAMAGE.
     26   1.1      matt  */
     27   1.1      matt 
     28  1.15  kiyohara #ifndef _DEV_DISCOVERY_GTVAR_H_
     29  1.15  kiyohara #define	_DEV_DISCOVERY_GTVAR_H_
     30   1.1      matt 
     31   1.1      matt struct gt_softc {
     32  1.15  kiyohara 	device_t sc_dev;
     33  1.15  kiyohara 	int sc_model;
     34  1.15  kiyohara 	int sc_rev;
     35  1.15  kiyohara 	bus_addr_t sc_addr;
     36  1.15  kiyohara 	bus_space_tag_t sc_iot;
     37  1.15  kiyohara 	bus_space_handle_t sc_ioh;
     38  1.15  kiyohara 	bus_dma_tag_t sc_dmat;
     39   1.1      matt };
     40   1.1      matt 
     41   1.2      matt struct obio_attach_args {
     42   1.2      matt 	const char *oa_name;		/* call name of device */
     43   1.2      matt 	bus_space_tag_t oa_memt;	/* bus space tag */
     44   1.2      matt 	bus_addr_t oa_offset;		/* offset (absolute) to device */
     45   1.2      matt 	bus_size_t oa_size;		/* size (strided) of device */
     46   1.2      matt 	int oa_irq;			/* irq */
     47   1.2      matt };
     48   1.2      matt 
     49   1.1      matt 
     50  1.15  kiyohara void	gt_attach_common(struct gt_softc *);
     51  1.15  kiyohara 
     52  1.15  kiyohara #ifdef GT_WATCHDOG
     53  1.15  kiyohara void	gt_watchdog_service(void);
     54  1.15  kiyohara void	gt_watchdog_reset(void);
     55  1.15  kiyohara #else
     56  1.15  kiyohara #define gt_watchdog_service()	((void)0)
     57  1.15  kiyohara #define gt_watchdog_reset()	((void)0)
     58   1.1      matt #endif
     59   1.1      matt 
     60  1.14    cegger int	gt_mii_read(device_t, device_t, int, int);
     61  1.14    cegger void	gt_mii_write(device_t, device_t, int, int, int);
     62   1.1      matt 
     63   1.1      matt 
     64  1.15  kiyohara uint32_t gt_read_mpp(void);
     65   1.1      matt 
     66  1.15  kiyohara #endif /* _DEV_DISCOVERY_GTVAR_H_ */
     67