Home | History | Annotate | Line # | Download | only in s3c2xx0
s3c2xx0var.h revision 1.6.6.1
      1  1.6.6.1     mrg /* $NetBSD: s3c2xx0var.h,v 1.6.6.1 2012/02/18 07:31:32 mrg Exp $ */
      2      1.1     bsh 
      3      1.1     bsh /*
      4      1.1     bsh  * Copyright (c) 2002 Fujitsu Component Limited
      5      1.1     bsh  * Copyright (c) 2002 Genetec Corporation
      6      1.1     bsh  * All rights reserved.
      7      1.1     bsh  *
      8      1.1     bsh  * Redistribution and use in source and binary forms, with or without
      9      1.1     bsh  * modification, are permitted provided that the following conditions
     10      1.1     bsh  * are met:
     11      1.1     bsh  * 1. Redistributions of source code must retain the above copyright
     12      1.1     bsh  *    notice, this list of conditions and the following disclaimer.
     13      1.1     bsh  * 2. Redistributions in binary form must reproduce the above copyright
     14      1.1     bsh  *    notice, this list of conditions and the following disclaimer in the
     15      1.1     bsh  *    documentation and/or other materials provided with the distribution.
     16      1.1     bsh  * 3. Neither the name of The Fujitsu Component Limited nor the name of
     17      1.1     bsh  *    Genetec corporation may not be used to endorse or promote products
     18      1.1     bsh  *    derived from this software without specific prior written permission.
     19      1.1     bsh  *
     20      1.1     bsh  * THIS SOFTWARE IS PROVIDED BY FUJITSU COMPONENT LIMITED AND GENETEC
     21      1.1     bsh  * CORPORATION ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
     22      1.1     bsh  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     23      1.1     bsh  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
     24      1.1     bsh  * DISCLAIMED.  IN NO EVENT SHALL FUJITSU COMPONENT LIMITED OR GENETEC
     25      1.1     bsh  * CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     26      1.1     bsh  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     27      1.1     bsh  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
     28      1.1     bsh  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
     29      1.1     bsh  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
     30      1.1     bsh  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
     31      1.1     bsh  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     32      1.1     bsh  * SUCH DAMAGE.
     33      1.1     bsh  */
     34      1.1     bsh 
     35      1.1     bsh #ifndef _ARM_S3C2XX0VAR_H_
     36      1.1     bsh #define _ARM_S3C2XX0VAR_H_
     37      1.1     bsh 
     38      1.6  dyoung #include <sys/bus.h>
     39      1.5     bsh #include <sys/device.h>
     40      1.1     bsh 
     41      1.1     bsh struct s3c2xx0_softc {
     42  1.6.6.1     mrg 	device_t		sc_dev;
     43      1.1     bsh 
     44      1.1     bsh 	bus_space_tag_t  	sc_iot;
     45      1.1     bsh 
     46      1.1     bsh 	bus_space_handle_t	sc_intctl_ioh;
     47      1.1     bsh 	bus_space_handle_t	sc_memctl_ioh; 	/* Memory controller */
     48      1.1     bsh 	bus_space_handle_t	sc_clkman_ioh; 	/* Clock manager */
     49      1.1     bsh 	bus_space_handle_t	sc_gpio_ioh;  	/* GPIO */
     50      1.1     bsh 	bus_space_handle_t	sc_rtc_ioh; 	/* real time clock */
     51  1.6.6.1     mrg 	bus_space_handle_t      sc_dmach;       /* DMA Controller */
     52      1.2     bsh 
     53      1.3     bsh 	bus_dma_tag_t  		sc_dmat;
     54      1.3     bsh 
     55      1.2     bsh 	/* clock frequency */
     56      1.2     bsh 	int sc_fclk;			/* CPU clock */
     57      1.2     bsh 	int sc_hclk;			/* AHB bus clock */
     58      1.2     bsh 	int sc_pclk;			/* peripheral clock */
     59      1.1     bsh };
     60      1.1     bsh 
     61      1.1     bsh typedef void *s3c2xx0_chipset_tag_t;
     62      1.1     bsh 
     63      1.1     bsh struct s3c2xx0_attach_args {
     64      1.1     bsh 	s3c2xx0_chipset_tag_t	sa_sc;
     65      1.1     bsh 	bus_space_tag_t  	sa_iot;
     66      1.1     bsh 	bus_addr_t 		sa_addr;
     67      1.1     bsh 	bus_size_t		sa_size;
     68      1.1     bsh 	int			sa_intr;
     69      1.1     bsh 	int			sa_index;
     70      1.3     bsh 	bus_dma_tag_t    	sa_dmat;
     71      1.1     bsh };
     72      1.1     bsh 
     73      1.1     bsh extern struct bus_space s3c2xx0_bs_tag;
     74      1.1     bsh extern struct s3c2xx0_softc *s3c2xx0_softc;
     75      1.3     bsh extern struct arm32_bus_dma_tag s3c2xx0_bus_dma;
     76      1.3     bsh 
     77      1.3     bsh /* Platform needs to provide this */
     78      1.3     bsh bus_dma_tag_t s3c2xx0_bus_dma_init(struct arm32_bus_dma_tag *);
     79      1.1     bsh 
     80      1.1     bsh #endif /* _ARM_S3C2XX0VAR_H_ */
     81