imx51var.h revision 1.7 1 1.7 hkenken /* $NetBSD: imx51var.h,v 1.7 2019/07/24 12:33:18 hkenken Exp $ */
2 1.4 hkenken
3 1.4 hkenken /*
4 1.4 hkenken * Copyright (c) 2015 Genetec Corporation. All rights reserved.
5 1.4 hkenken * Written by Hashimoto Kenichi for Genetec Corporation.
6 1.4 hkenken *
7 1.4 hkenken * Redistribution and use in source and binary forms, with or without
8 1.4 hkenken * modification, are permitted provided that the following conditions
9 1.4 hkenken * are met:
10 1.4 hkenken * 1. Redistributions of source code must retain the above copyright
11 1.4 hkenken * notice, this list of conditions and the following disclaimer.
12 1.4 hkenken * 2. Redistributions in binary form must reproduce the above copyright
13 1.4 hkenken * notice, this list of conditions and the following disclaimer in the
14 1.4 hkenken * documentation and/or other materials provided with the distribution.
15 1.4 hkenken *
16 1.4 hkenken * THIS SOFTWARE IS PROVIDED BY GENETEC CORPORATION ``AS IS'' AND
17 1.4 hkenken * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
18 1.4 hkenken * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 1.4 hkenken * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GENETEC CORPORATION
20 1.4 hkenken * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 1.4 hkenken * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 1.4 hkenken * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 1.4 hkenken * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 1.4 hkenken * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 1.4 hkenken * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 1.4 hkenken * POSSIBILITY OF SUCH DAMAGE.
27 1.4 hkenken */
28 1.1 bsh
29 1.1 bsh #ifndef _ARM_IMX_IMX51VAR_H
30 1.1 bsh #define _ARM_IMX_IMX51VAR_H
31 1.1 bsh
32 1.4 hkenken struct imxfb_attach_args {
33 1.4 hkenken void *ifb_fb;
34 1.4 hkenken bus_dma_tag_t ifb_dmat;
35 1.4 hkenken bus_dmamap_t ifb_dmamap;
36 1.4 hkenken bus_dma_segment_t *ifb_dmasegs;
37 1.4 hkenken int ifb_ndmasegs;
38 1.4 hkenken u_int ifb_width;
39 1.4 hkenken u_int ifb_height;
40 1.4 hkenken u_int ifb_depth;
41 1.4 hkenken u_int ifb_stride;
42 1.4 hkenken device_t ifb_outputdev;
43 1.4 hkenken };
44 1.4 hkenken
45 1.4 hkenken void imx_genfb_set_videomode(device_t, u_int, u_int);
46 1.4 hkenken
47 1.3 hkenken extern struct bus_space armv7_generic_bs_tag;
48 1.3 hkenken extern struct bus_space armv7_generic_a4x_bs_tag;
49 1.6 ryo extern struct arm32_bus_dma_tag arm_generic_dma_tag;
50 1.1 bsh extern struct arm32_bus_dma_tag imx_bus_dma_tag;
51 1.1 bsh
52 1.1 bsh struct axi_attach_args {
53 1.1 bsh const char *aa_name;
54 1.1 bsh bus_space_tag_t aa_iot;
55 1.1 bsh bus_dma_tag_t aa_dmat;
56 1.1 bsh bus_addr_t aa_addr;
57 1.1 bsh bus_size_t aa_size;
58 1.1 bsh int aa_irq;
59 1.1 bsh int aa_irqbase;
60 1.1 bsh };
61 1.1 bsh
62 1.2 bsh /* iomux utility functions */
63 1.2 bsh struct iomux_conf {
64 1.2 bsh u_int pin;
65 1.2 bsh #define IOMUX_CONF_EOT ((u_int)(-1))
66 1.2 bsh u_short mux;
67 1.2 bsh u_short pad;
68 1.2 bsh };
69 1.2 bsh
70 1.2 bsh void iomux_set_function(u_int, u_int);
71 1.2 bsh void iomux_set_pad(u_int, u_int);
72 1.2 bsh //void iomux_set_input(u_int, u_int);
73 1.2 bsh void iomux_mux_config(const struct iomux_conf *);
74 1.2 bsh
75 1.1 bsh #endif /* _ARM_IMX_IMX51VAR_H */
76