Skip to content

Commit

Permalink
Merge tag 'msm-cleanup-3.10' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/davidb/linux-msm into next/cleanup

From David Brown:
Cleanups for MSM for 3.10

These are some patches for various parts of MSM that gradually bring
us closer to being part of single zimage.

* tag 'msm-cleanup-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm:
  ARM: msm: Remove unused cpu.h header file
  gpio: Make gpio-msm-v1 into a platform driver
  mmc: msm_sdcc: Remove unnecessary include
  ARM: msm: Move dma.h #defines that are private to dma.c

Signed-off-by: Olof Johansson <olof@lixom.net>
  • Loading branch information
Olof Johansson committed Apr 15, 2013
2 parents b9d5868 + 641f716 commit 5ed3ebe
Show file tree
Hide file tree
Showing 13 changed files with 276 additions and 152 deletions.
1 change: 1 addition & 0 deletions arch/arm/mach-msm/board-halibut.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-msm/board-msm7x30.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-msm/board-qsd8x50.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-msm/board-trout.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
31 changes: 31 additions & 0 deletions arch/arm/mach-msm/devices-msm7x00.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
31 changes: 31 additions & 0 deletions arch/arm/mach-msm/devices-msm7x30.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
31 changes: 31 additions & 0 deletions arch/arm/mach-msm/devices-qsd8x50.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions arch/arm/mach-msm/devices.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
26 changes: 26 additions & 0 deletions arch/arm/mach-msm/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
54 changes: 0 additions & 54 deletions arch/arm/mach-msm/include/mach/cpu.h

This file was deleted.

26 changes: 0 additions & 26 deletions arch/arm/mach-msm/include/mach/dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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)
Expand Down
Loading

0 comments on commit 5ed3ebe

Please sign in to comment.