Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 194ee8e8 authored by Uwe Kleine-König's avatar Uwe Kleine-König
Browse files

ARM: mx25: dynamically allocatate imx-fb devices

parent e7c74b34
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ config MACH_MX25_3DS
	bool "Support MX25PDK (3DS) Platform"
	select IMX_HAVE_PLATFORM_ESDHC
	select IMX_HAVE_PLATFORM_IMXDI_RTC
	select IMX_HAVE_PLATFORM_IMX_FB
	select IMX_HAVE_PLATFORM_IMX_KEYPAD
	select IMX_HAVE_PLATFORM_IMX_UART
	select IMX_HAVE_PLATFORM_MXC_EHCI
@@ -17,6 +18,7 @@ config MACH_EUKREA_CPUIMX25
	select IMX_HAVE_PLATFORM_FLEXCAN
	select IMX_HAVE_PLATFORM_FSL_USB2_UDC
	select IMX_HAVE_PLATFORM_IMXDI_RTC
	select IMX_HAVE_PLATFORM_IMX_FB
	select IMX_HAVE_PLATFORM_IMX_I2C
	select IMX_HAVE_PLATFORM_IMX_UART
	select IMX_HAVE_PLATFORM_MXC_EHCI
+4 −0
Original line number Diff line number Diff line
@@ -27,6 +27,10 @@ extern struct imx_imxdi_rtc_data imx25_imxdi_rtc_data __initconst;
#define imx25_add_imxdi_rtc(pdata)	\
	imx_add_imxdi_rtc(&imx25_imxdi_rtc_data)

extern const struct imx_imx_fb_data imx25_imx_fb_data __initconst;
#define imx25_add_imx_fb(pdata)	\
	imx_add_imx_fb(&imx25_imx_fb_data, pdata)

extern const struct imx_imx_i2c_data imx25_imx_i2c_data[] __initconst;
#define imx25_add_imx_i2c(id, pdata)	\
	imx_add_imx_i2c(&imx25_imx_i2c_data[id], pdata)
+0 −23
Original line number Diff line number Diff line
@@ -22,29 +22,6 @@
#include <mach/mx25.h>
#include <mach/irqs.h>

static struct resource mx25_fb_resources[] = {
	{
		.start	= MX25_LCDC_BASE_ADDR,
		.end	= MX25_LCDC_BASE_ADDR + 0xfff,
		.flags	= IORESOURCE_MEM,
	},
	{
		.start	= MX25_INT_LCDC,
		.end	= MX25_INT_LCDC,
		.flags	= IORESOURCE_IRQ,
	},
};

struct platform_device mx25_fb_device = {
	.name		= "imx-fb",
	.id		= 0,
	.resource	= mx25_fb_resources,
	.num_resources	= ARRAY_SIZE(mx25_fb_resources),
	.dev		= {
		.coherent_dma_mask = 0xFFFFFFFF,
	},
};

static struct resource mxc_wdt_resources[] = {
	{
		.start = MX25_WDOG_BASE_ADDR,
+0 −1
Original line number Diff line number Diff line
extern struct platform_device mx25_fb_device;
extern struct platform_device mxc_wdt;
extern struct platform_device mx25_csi_device;
+2 −3
Original line number Diff line number Diff line
@@ -33,7 +33,6 @@
#include <asm/mach/arch.h>
#include <mach/mx25.h>
#include <mach/imx-uart.h>
#include <mach/imxfb.h>
#include <mach/audmux.h>

#include "devices-imx25.h"
@@ -151,7 +150,7 @@ static struct imx_fb_videomode eukrea_mximxsd_modes[] = {
	},
};

static struct imx_fb_platform_data eukrea_mximxsd_fb_pdata = {
static const struct imx_fb_platform_data eukrea_mximxsd_fb_pdata __initconst = {
	.mode		= eukrea_mximxsd_modes,
	.num_modes	= ARRAY_SIZE(eukrea_mximxsd_modes),
	.pwmr		= 0x00A903FF,
@@ -273,7 +272,7 @@ void __init eukrea_mbimxsd25_baseboard_init(void)
#endif

	imx25_add_imx_uart1(&uart_pdata);
	mxc_register_device(&mx25_fb_device, &eukrea_mximxsd_fb_pdata);
	imx25_add_imx_fb(&eukrea_mximxsd_fb_pdata);
	imx25_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata);

	imx25_add_flexcan1(NULL);
Loading