1 /* $NetBSD: imx51var.h,v 1.3 2015/05/07 04:13:47 hkenken Exp $ */ 2 3 #ifndef _ARM_IMX_IMX51VAR_H 4 #define _ARM_IMX_IMX51VAR_H 5 6 extern struct bus_space armv7_generic_bs_tag; 7 extern struct bus_space armv7_generic_a4x_bs_tag; 8 extern struct arm32_bus_dma_tag imx_bus_dma_tag; 9 10 void gpio_set_direction(uint32_t, uint32_t); 11 void gpio_data_write(uint32_t, uint32_t); 12 bool gpio_data_read(uint32_t); 13 14 struct axi_attach_args { 15 const char *aa_name; 16 bus_space_tag_t aa_iot; 17 bus_dma_tag_t aa_dmat; 18 bus_addr_t aa_addr; 19 bus_size_t aa_size; 20 int aa_irq; 21 int aa_irqbase; 22 }; 23 24 25 /* iomux utility functions */ 26 struct iomux_conf { 27 u_int pin; 28 #define IOMUX_CONF_EOT ((u_int)(-1)) 29 u_short mux; 30 u_short pad; 31 }; 32 33 void iomux_set_function(u_int, u_int); 34 void iomux_set_pad(u_int, u_int); 35 //void iomux_set_input(u_int, u_int); 36 void iomux_mux_config(const struct iomux_conf *); 37 38 #endif /* _ARM_IMX_IMX51VAR_H */ 39