Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 340004
b: refs/heads/master
c: 3ab3a35
h: refs/heads/master
v: v3
  • Loading branch information
Gaëtan Carlier authored and Sascha Hauer committed Nov 16, 2012
1 parent 86b7c3f commit 61260dc
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 89a4150331bc07014256714678ce8e9b238fc145
refs/heads/master: 3ab3a350200c14350220fffde893f3afb640fd25
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-imx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ config MACH_IMX27_VISSTRIM_M10
select IMX_HAVE_PLATFORM_IMX_SSI
select IMX_HAVE_PLATFORM_IMX_UART
select IMX_HAVE_PLATFORM_MX2_CAMERA
select IMX_HAVE_PLATFORM_MX2_EMMA
select IMX_HAVE_PLATFORM_MXC_EHCI
select IMX_HAVE_PLATFORM_MXC_MMC
select LEDS_GPIO_REGISTER
Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/arm/mach-imx/devices-imx27.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ extern const struct imx_imx_uart_1irq_data imx27_imx_uart_data[];
extern const struct imx_mx2_camera_data imx27_mx2_camera_data;
#define imx27_add_mx2_camera(pdata) \
imx_add_mx2_camera(&imx27_mx2_camera_data, pdata)

extern const struct imx_mx2_emma_data imx27_mx2_emmaprp_data;
#define imx27_add_mx2_emmaprp() \
imx_add_mx2_emmaprp(&imx27_mx2_camera_data)
imx_add_mx2_emmaprp(&imx27_mx2_emmaprp_data)

extern const struct imx_mxc_ehci_data imx27_mxc_ehci_otg_data;
#define imx27_add_mxc_ehci_otg(pdata) \
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/arm/mach-imx/devices/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ config IMX_HAVE_PLATFORM_MX1_CAMERA
config IMX_HAVE_PLATFORM_MX2_CAMERA
bool

config IMX_HAVE_PLATFORM_MX2_EMMA
bool

config IMX_HAVE_PLATFORM_MXC_EHCI
bool

Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-imx/devices/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ obj-$(CONFIG_IMX_HAVE_PLATFORM_MXC_W1) += platform-mxc_w1.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX) += platform-sdhci-esdhc-imx.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_SPI_IMX) += platform-spi_imx.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_AHCI) += platform-ahci-imx.o
obj-$(CONFIG_IMX_HAVE_PLATFORM_MX2_EMMA) += platform-mx2-emma.o
9 changes: 8 additions & 1 deletion trunk/arch/arm/mach-imx/devices/devices-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,15 @@ struct imx_mx2_camera_data {
struct platform_device *__init imx_add_mx2_camera(
const struct imx_mx2_camera_data *data,
const struct mx2_camera_platform_data *pdata);


struct imx_mx2_emma_data {
resource_size_t iobase;
resource_size_t iosize;
resource_size_t irq;
};
struct platform_device *__init imx_add_mx2_emmaprp(
const struct imx_mx2_camera_data *data);
const struct imx_mx2_emma_data *data);

#include <linux/platform_data/usb-ehci-mxc.h>
struct imx_mxc_ehci_data {
Expand Down
17 changes: 0 additions & 17 deletions trunk/arch/arm/mach-imx/devices/platform-mx2-camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,3 @@ struct platform_device *__init imx_add_mx2_camera(
pdata, sizeof(*pdata), DMA_BIT_MASK(32));
}

struct platform_device *__init imx_add_mx2_emmaprp(
const struct imx_mx2_camera_data *data)
{
struct resource res[] = {
{
.start = data->iobaseemmaprp,
.end = data->iobaseemmaprp + data->iosizeemmaprp - 1,
.flags = IORESOURCE_MEM,
}, {
.start = data->irqemmaprp,
.end = data->irqemmaprp,
.flags = IORESOURCE_IRQ,
},
};
return imx_add_platform_device_dmamask("m2m-emmaprp", 0,
res, 2, NULL, 0, DMA_BIT_MASK(32));
}
40 changes: 40 additions & 0 deletions trunk/arch/arm/plat-mxc/devices/platform-mx2-emma.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Copyright (C) 2010 Pengutronix
* Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 2 as published by the
* Free Software Foundation.
*/
#include <mach/hardware.h>
#include <mach/devices-common.h>

#define imx_mx2_emmaprp_data_entry_single(soc) \
{ \
.iobase = soc ## _EMMAPRP_BASE_ADDR, \
.iosize = SZ_32, \
.irq = soc ## _INT_EMMAPRP, \
}

#ifdef CONFIG_SOC_IMX27
const struct imx_mx2_emma_data imx27_mx2_emmaprp_data __initconst =
imx_mx2_emmaprp_data_entry_single(MX27);
#endif /* ifdef CONFIG_SOC_IMX27 */

struct platform_device *__init imx_add_mx2_emmaprp(
const struct imx_mx2_emma_data *data)
{
struct resource res[] = {
{
.start = data->iobase,
.end = data->iobase + data->iosize - 1,
.flags = IORESOURCE_MEM,
}, {
.start = data->irq,
.end = data->irq,
.flags = IORESOURCE_IRQ,
},
};
return imx_add_platform_device_dmamask("m2m-emmaprp", 0,
res, 2, NULL, 0, DMA_BIT_MASK(32));
}

0 comments on commit 61260dc

Please sign in to comment.