diff options
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/arm/mach-msm/board-halibut.c | 1 | ||||
| -rw-r--r-- | arch/arm/mach-msm/board-msm7x30.c | 1 | ||||
| -rw-r--r-- | arch/arm/mach-msm/board-qsd8x50.c | 1 | ||||
| -rw-r--r-- | arch/arm/mach-msm/board-trout.c | 1 | ||||
| -rw-r--r-- | arch/arm/mach-msm/devices-msm7x00.c | 31 | ||||
| -rw-r--r-- | arch/arm/mach-msm/devices-msm7x30.c | 31 | ||||
| -rw-r--r-- | arch/arm/mach-msm/devices-qsd8x50.c | 31 | ||||
| -rw-r--r-- | arch/arm/mach-msm/devices.h | 4 | ||||
| -rw-r--r-- | arch/arm/mach-msm/dma.c | 26 | ||||
| -rw-r--r-- | arch/arm/mach-msm/include/mach/cpu.h | 54 | ||||
| -rw-r--r-- | arch/arm/mach-msm/include/mach/dma.h | 26 | 
11 files changed, 127 insertions, 80 deletions
diff --git a/arch/arm/mach-msm/board-halibut.c b/arch/arm/mach-msm/board-halibut.c index 84d720af34a..82eaf88d202 100644 --- a/arch/arm/mach-msm/board-halibut.c +++ b/arch/arm/mach-msm/board-halibut.c @@ -59,6 +59,7 @@ static struct platform_device smc91x_device = {  };  static struct platform_device *devices[] __initdata = { +	&msm_device_gpio_7201,  	&msm_device_uart3,  	&msm_device_smd,  	&msm_device_nand, diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c index 7bc3f82e3ec..520c141acd0 100644 --- a/arch/arm/mach-msm/board-msm7x30.c +++ b/arch/arm/mach-msm/board-msm7x30.c @@ -89,6 +89,7 @@ struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS] = {  };  static struct platform_device *devices[] __initdata = { +	&msm_device_gpio_7x30,  #if defined(CONFIG_SERIAL_MSM) || defined(CONFIG_MSM_SERIAL_DEBUGGER)          &msm_device_uart2,  #endif diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c index 686e7949a73..38a532d6937 100644 --- a/arch/arm/mach-msm/board-qsd8x50.c +++ b/arch/arm/mach-msm/board-qsd8x50.c @@ -89,6 +89,7 @@ static struct msm_otg_platform_data msm_otg_pdata = {  };  static struct platform_device *devices[] __initdata = { +	&msm_device_gpio_8x50,  	&msm_device_uart3,  	&msm_device_smd,  	&msm_device_otg, diff --git a/arch/arm/mach-msm/board-trout.c b/arch/arm/mach-msm/board-trout.c index 919bfa32871..80fe1c5ff5c 100644 --- a/arch/arm/mach-msm/board-trout.c +++ b/arch/arm/mach-msm/board-trout.c @@ -36,6 +36,7 @@  extern int trout_init_mmc(unsigned int);  static struct platform_device *devices[] __initdata = { +	&msm_device_gpio_7201,  	&msm_device_uart3,  	&msm_device_smd,  	&msm_device_nand, diff --git a/arch/arm/mach-msm/devices-msm7x00.c b/arch/arm/mach-msm/devices-msm7x00.c index f66ee6ea872..1a0a2306b11 100644 --- a/arch/arm/mach-msm/devices-msm7x00.c +++ b/arch/arm/mach-msm/devices-msm7x00.c @@ -29,6 +29,37 @@  #include "clock-pcom.h"  #include <linux/platform_data/mmc-msm_sdcc.h> +static struct resource msm_gpio_resources[] = { +	{ +		.start	= 32 + 0, +		.end	= 32 + 0, +		.flags	= IORESOURCE_IRQ, +	}, +	{ +		.start	= 32 + 1, +		.end	= 32 + 1, +		.flags	= IORESOURCE_IRQ, +	}, +	{ +		.start	= 0xa9200800, +		.end	= 0xa9200800 + SZ_4K - 1, +		.flags	= IORESOURCE_MEM, +		.name  = "gpio1" +	}, +	{ +		.start	= 0xa9300C00, +		.end	= 0xa9300C00 + SZ_4K - 1, +		.flags	= IORESOURCE_MEM, +		.name  = "gpio2" +	}, +}; + +struct platform_device msm_device_gpio_7201 = { +	.name	= "gpio-msm-7201", +	.num_resources	= ARRAY_SIZE(msm_gpio_resources), +	.resource	= msm_gpio_resources, +}; +  static struct resource resources_uart1[] = {  	{  		.start	= INT_UART1, diff --git a/arch/arm/mach-msm/devices-msm7x30.c b/arch/arm/mach-msm/devices-msm7x30.c index e90ab5938c5..12f482c0774 100644 --- a/arch/arm/mach-msm/devices-msm7x30.c +++ b/arch/arm/mach-msm/devices-msm7x30.c @@ -33,6 +33,37 @@  #include <linux/platform_data/mmc-msm_sdcc.h> +static struct resource msm_gpio_resources[] = { +	{ +		.start	= 32 + 18, +		.end	= 32 + 18, +		.flags	= IORESOURCE_IRQ, +	}, +	{ +		.start	= 32 + 19, +		.end	= 32 + 19, +		.flags	= IORESOURCE_IRQ, +	}, +	{ +		.start	= 0xac001000, +		.end	= 0xac001000 + SZ_4K - 1, +		.flags	= IORESOURCE_MEM, +		.name  = "gpio1" +	}, +	{ +		.start	= 0xac101400, +		.end	= 0xac101400 + SZ_4K - 1, +		.flags	= IORESOURCE_MEM, +		.name  = "gpio2" +	}, +}; + +struct platform_device msm_device_gpio_7x30 = { +	.name	= "gpio-msm-7x30", +	.num_resources	= ARRAY_SIZE(msm_gpio_resources), +	.resource	= msm_gpio_resources, +}; +  static struct resource resources_uart2[] = {  	{  		.start	= INT_UART2, diff --git a/arch/arm/mach-msm/devices-qsd8x50.c b/arch/arm/mach-msm/devices-qsd8x50.c index 4db61d5fe31..2e1b3ec9dfc 100644 --- a/arch/arm/mach-msm/devices-qsd8x50.c +++ b/arch/arm/mach-msm/devices-qsd8x50.c @@ -30,6 +30,37 @@  #include <linux/platform_data/mmc-msm_sdcc.h>  #include "clock-pcom.h" +static struct resource msm_gpio_resources[] = { +	{ +		.start	= 64 + 165 + 9, +		.end	= 64 + 165 + 9, +		.flags	= IORESOURCE_IRQ, +	}, +	{ +		.start	= 64 + 165 + 10, +		.end	= 64 + 165 + 10, +		.flags	= IORESOURCE_IRQ, +	}, +	{ +		.start	= 0xa9000800, +		.end	= 0xa9000800 + SZ_4K - 1, +		.flags	= IORESOURCE_MEM, +		.name  = "gpio1" +	}, +	{ +		.start	= 0xa9100C00, +		.end	= 0xa9100C00 + SZ_4K - 1, +		.flags	= IORESOURCE_MEM, +		.name  = "gpio2" +	}, +}; + +struct platform_device msm_device_gpio_8x50 = { +	.name	= "gpio-msm-8x50", +	.num_resources	= ARRAY_SIZE(msm_gpio_resources), +	.resource	= msm_gpio_resources, +}; +  static struct resource resources_uart3[] = {  	{  		.start	= INT_UART3, diff --git a/arch/arm/mach-msm/devices.h b/arch/arm/mach-msm/devices.h index 9545c196c6e..da902cf5116 100644 --- a/arch/arm/mach-msm/devices.h +++ b/arch/arm/mach-msm/devices.h @@ -20,6 +20,10 @@  #include "clock.h" +extern struct platform_device msm_device_gpio_7201; +extern struct platform_device msm_device_gpio_7x30; +extern struct platform_device msm_device_gpio_8x50; +  extern struct platform_device msm_device_uart1;  extern struct platform_device msm_device_uart2;  extern struct platform_device msm_device_uart3; diff --git a/arch/arm/mach-msm/dma.c b/arch/arm/mach-msm/dma.c index 354b91d4c3a..b279fd8a31b 100644 --- a/arch/arm/mach-msm/dma.c +++ b/arch/arm/mach-msm/dma.c @@ -19,9 +19,35 @@  #include <linux/interrupt.h>  #include <linux/completion.h>  #include <mach/dma.h> +#include <mach/msm_iomap.h>  #define MSM_DMOV_CHANNEL_COUNT 16 +#define DMOV_SD0(off, ch) (MSM_DMOV_BASE + 0x0000 + (off) + ((ch) << 2)) +#define DMOV_SD1(off, ch) (MSM_DMOV_BASE + 0x0400 + (off) + ((ch) << 2)) +#define DMOV_SD2(off, ch) (MSM_DMOV_BASE + 0x0800 + (off) + ((ch) << 2)) +#define DMOV_SD3(off, ch) (MSM_DMOV_BASE + 0x0C00 + (off) + ((ch) << 2)) + +#if defined(CONFIG_ARCH_MSM7X30) +#define DMOV_SD_AARM DMOV_SD2 +#else +#define DMOV_SD_AARM DMOV_SD3 +#endif + +#define DMOV_CMD_PTR(ch)      DMOV_SD_AARM(0x000, ch) +#define DMOV_RSLT(ch)         DMOV_SD_AARM(0x040, ch) +#define DMOV_FLUSH0(ch)       DMOV_SD_AARM(0x080, ch) +#define DMOV_FLUSH1(ch)       DMOV_SD_AARM(0x0C0, ch) +#define DMOV_FLUSH2(ch)       DMOV_SD_AARM(0x100, ch) +#define DMOV_FLUSH3(ch)       DMOV_SD_AARM(0x140, ch) +#define DMOV_FLUSH4(ch)       DMOV_SD_AARM(0x180, ch) +#define DMOV_FLUSH5(ch)       DMOV_SD_AARM(0x1C0, ch) + +#define DMOV_STATUS(ch)       DMOV_SD_AARM(0x200, ch) +#define DMOV_ISR              DMOV_SD_AARM(0x380, 0) + +#define DMOV_CONFIG(ch)       DMOV_SD_AARM(0x300, ch) +  enum {  	MSM_DMOV_PRINT_ERRORS = 1,  	MSM_DMOV_PRINT_IO = 2, diff --git a/arch/arm/mach-msm/include/mach/cpu.h b/arch/arm/mach-msm/include/mach/cpu.h deleted file mode 100644 index a9481b08d5c..00000000000 --- a/arch/arm/mach-msm/include/mach/cpu.h +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (c) 2011, Code Aurora Forum. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * 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., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. - */ - -#ifndef __ARCH_ARM_MACH_MSM_CPU_H__ -#define __ARCH_ARM_MACH_MSM_CPU_H__ - -/* TODO: For now, only one CPU can be compiled at a time. */ - -#define cpu_is_msm7x01()	0 -#define cpu_is_msm7x30()	0 -#define cpu_is_qsd8x50()	0 -#define cpu_is_msm8x60()	0 -#define cpu_is_msm8960()	0 - -#ifdef CONFIG_ARCH_MSM7X00A -# undef cpu_is_msm7x01 -# define cpu_is_msm7x01()	1 -#endif - -#ifdef CONFIG_ARCH_MSM7X30 -# undef cpu_is_msm7x30 -# define cpu_is_msm7x30()	1 -#endif - -#ifdef CONFIG_ARCH_QSD8X50 -# undef cpu_is_qsd8x50 -# define cpu_is_qsd8x50()	1 -#endif - -#ifdef CONFIG_ARCH_MSM8X60 -# undef cpu_is_msm8x60 -# define cpu_is_msm8x60()	1 -#endif - -#ifdef CONFIG_ARCH_MSM8960 -# undef cpu_is_msm8960 -# define cpu_is_msm8960()	1 -#endif - -#endif diff --git a/arch/arm/mach-msm/include/mach/dma.h b/arch/arm/mach-msm/include/mach/dma.h index 05583f56952..a72d48d4234 100644 --- a/arch/arm/mach-msm/include/mach/dma.h +++ b/arch/arm/mach-msm/include/mach/dma.h @@ -16,7 +16,6 @@  #ifndef __ASM_ARCH_MSM_DMA_H  #include <linux/list.h> -#include <mach/msm_iomap.h>  struct msm_dmov_errdata {  	uint32_t flush[6]; @@ -45,48 +44,23 @@ static inline  int msm_dmov_exec_cmd(unsigned id, unsigned int cmdptr) { return -EIO; }  #endif - -#define DMOV_SD0(off, ch) (MSM_DMOV_BASE + 0x0000 + (off) + ((ch) << 2)) -#define DMOV_SD1(off, ch) (MSM_DMOV_BASE + 0x0400 + (off) + ((ch) << 2)) -#define DMOV_SD2(off, ch) (MSM_DMOV_BASE + 0x0800 + (off) + ((ch) << 2)) -#define DMOV_SD3(off, ch) (MSM_DMOV_BASE + 0x0C00 + (off) + ((ch) << 2)) - -#if defined(CONFIG_ARCH_MSM7X30) -#define DMOV_SD_AARM DMOV_SD2 -#else -#define DMOV_SD_AARM DMOV_SD3 -#endif - -#define DMOV_CMD_PTR(ch)      DMOV_SD_AARM(0x000, ch)  #define DMOV_CMD_LIST         (0 << 29) /* does not work */  #define DMOV_CMD_PTR_LIST     (1 << 29) /* works */  #define DMOV_CMD_INPUT_CFG    (2 << 29) /* untested */  #define DMOV_CMD_OUTPUT_CFG   (3 << 29) /* untested */  #define DMOV_CMD_ADDR(addr)   ((addr) >> 3) -#define DMOV_RSLT(ch)         DMOV_SD_AARM(0x040, ch)  #define DMOV_RSLT_VALID       (1 << 31) /* 0 == host has empties result fifo */  #define DMOV_RSLT_ERROR       (1 << 3)  #define DMOV_RSLT_FLUSH       (1 << 2)  #define DMOV_RSLT_DONE        (1 << 1)  /* top pointer done */  #define DMOV_RSLT_USER        (1 << 0)  /* command with FR force result */ -#define DMOV_FLUSH0(ch)       DMOV_SD_AARM(0x080, ch) -#define DMOV_FLUSH1(ch)       DMOV_SD_AARM(0x0C0, ch) -#define DMOV_FLUSH2(ch)       DMOV_SD_AARM(0x100, ch) -#define DMOV_FLUSH3(ch)       DMOV_SD_AARM(0x140, ch) -#define DMOV_FLUSH4(ch)       DMOV_SD_AARM(0x180, ch) -#define DMOV_FLUSH5(ch)       DMOV_SD_AARM(0x1C0, ch) - -#define DMOV_STATUS(ch)       DMOV_SD_AARM(0x200, ch)  #define DMOV_STATUS_RSLT_COUNT(n)    (((n) >> 29))  #define DMOV_STATUS_CMD_COUNT(n)     (((n) >> 27) & 3)  #define DMOV_STATUS_RSLT_VALID       (1 << 1)  #define DMOV_STATUS_CMD_PTR_RDY      (1 << 0) -#define DMOV_ISR              DMOV_SD_AARM(0x380, 0) -   -#define DMOV_CONFIG(ch)       DMOV_SD_AARM(0x300, ch)  #define DMOV_CONFIG_FORCE_TOP_PTR_RSLT (1 << 2)  #define DMOV_CONFIG_FORCE_FLUSH_RSLT   (1 << 1)  #define DMOV_CONFIG_IRQ_EN             (1 << 0)  |