diff options
Diffstat (limited to 'arch/arm/include/asm/arch-mx27')
| -rw-r--r-- | arch/arm/include/asm/arch-mx27/gpio.h | 55 | ||||
| -rw-r--r-- | arch/arm/include/asm/arch-mx27/imx-regs.h | 35 | ||||
| -rw-r--r-- | arch/arm/include/asm/arch-mx27/regs-rtc.h | 40 | 
3 files changed, 107 insertions, 23 deletions
| diff --git a/arch/arm/include/asm/arch-mx27/gpio.h b/arch/arm/include/asm/arch-mx27/gpio.h new file mode 100644 index 000000000..4b4eb0d5c --- /dev/null +++ b/arch/arm/include/asm/arch-mx27/gpio.h @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2012 + * Philippe Reynes <tremyfr@yahoo.fr> + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + + +#ifndef __ASM_ARCH_MX27_GPIO_H +#define __ASM_ARCH_MX27_GPIO_H + +/* GPIO registers */ +struct gpio_regs { +	u32 gpio_dir; /* DDIR */ +	u32 ocr1; +	u32 ocr2; +	u32 iconfa1; +	u32 iconfa2; +	u32 iconfb1; +	u32 iconfb2; +	u32 gpio_dr; /* DR */ +	u32 gius; +	u32 gpio_psr; /* SSR */ +	u32 icr1; +	u32 icr2; +	u32 imr; +	u32 isr; +	u32 gpr; +	u32 swr; +	u32 puen; +	u32 res[0x2f]; +}; + +/* This structure is used by the function imx_gpio_mode */ +struct gpio_port_regs { +	struct gpio_regs port[6]; +}; + +#endif diff --git a/arch/arm/include/asm/arch-mx27/imx-regs.h b/arch/arm/include/asm/arch-mx27/imx-regs.h index ced5b2a38..2f6c82372 100644 --- a/arch/arm/include/asm/arch-mx27/imx-regs.h +++ b/arch/arm/include/asm/arch-mx27/imx-regs.h @@ -24,6 +24,8 @@  #ifndef _IMX_REGS_H  #define _IMX_REGS_H +#include <asm/arch/regs-rtc.h> +  #ifndef __ASSEMBLY__  extern void imx_gpio_mode (int gpio_mode); @@ -162,29 +164,6 @@ struct gpt_regs {  #define PORTE 4  #define PORTF 5 -struct gpio_regs { -	struct { -		u32 ddir; -		u32 ocr1; -		u32 ocr2; -		u32 iconfa1; -		u32 iconfa2; -		u32 iconfb1; -		u32 iconfb2; -		u32 dr; -		u32 gius; -		u32 ssr; -		u32 icr1; -		u32 icr2; -		u32 imr; -		u32 isr; -		u32 gpr; -		u32 swr; -		u32 puen; -		u32 res[0x2f]; -	} port[6]; -}; -  /* IIM Control Registers */  struct iim_regs {  	u32 iim_stat; @@ -217,6 +196,8 @@ struct fuse_bank0_regs {  #endif +#define ARCH_MXC +  #define IMX_IO_BASE		0x10000000  #define IMX_AIPI1_BASE		(0x00000 + IMX_IO_BASE) @@ -224,6 +205,7 @@ struct fuse_bank0_regs {  #define IMX_TIM1_BASE		(0x03000 + IMX_IO_BASE)  #define IMX_TIM2_BASE		(0x04000 + IMX_IO_BASE)  #define IMX_TIM3_BASE		(0x05000 + IMX_IO_BASE) +#define IMX_RTC_BASE		(0x07000 + IMX_IO_BASE)  #define UART1_BASE		(0x0a000 + IMX_IO_BASE)  #define UART2_BASE		(0x0b000 + IMX_IO_BASE)  #define UART3_BASE		(0x0c000 + IMX_IO_BASE) @@ -471,6 +453,13 @@ struct fuse_bank0_regs {  #define TSTAT_CAPT	(1 << 1)	/* Capture event */  #define TSTAT_COMP	1		/* Compare event */ +#define GPIO1_BASE_ADDR 0x10015000 +#define GPIO2_BASE_ADDR 0x10015100 +#define GPIO3_BASE_ADDR 0x10015200 +#define GPIO4_BASE_ADDR 0x10015300 +#define GPIO5_BASE_ADDR 0x10015400 +#define GPIO6_BASE_ADDR 0x10015500 +  #define GPIO_PIN_MASK	0x1f  #define GPIO_PORT_SHIFT	5 diff --git a/arch/arm/include/asm/arch-mx27/regs-rtc.h b/arch/arm/include/asm/arch-mx27/regs-rtc.h new file mode 100644 index 000000000..4f92d0f8f --- /dev/null +++ b/arch/arm/include/asm/arch-mx27/regs-rtc.h @@ -0,0 +1,40 @@ +/* + * Freescale i.MX27 RTC Register Definitions + * + * Copyright (C) 2012 Philippe Reynes <tremyfr@yahoo.fr> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA + * + */ + +#ifndef __MX27_REGS_RTC_H__ +#define __MX27_REGS_RTC_H__ + +#ifndef	__ASSEMBLY__ +struct rtc_regs { +	u32 hourmin; +	u32 seconds; +	u32 alrm_hm; +	u32 alrm_sec; +	u32 rtcctl; +	u32 rtcisr; +	u32 rtcienr; +	u32 stpwch; +	u32 dayr; +	u32 dayalarm; +}; +#endif /* __ASSEMBLY__*/ + +#endif	/* __MX28_REGS_RTC_H__ */ |