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

Commit 9f19d638 authored by Mark Brown's avatar Mark Brown Committed by Russell King
Browse files

[ARM] 5085/2: PXA: Move AC97 over to the new central device declaration model



As well as moving all the device declarations to a single one in devices.c
this causes all platforms to register the I/O and interrupt resources for
the AC97 controller.

Cc: eric miao <eric.miao@marvell.com>
Cc: Mike Rapoport <mike@compulab.co.il>
Cc: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: Jürgen Schindele <linux@schindele.name>
Cc: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 7a857620
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@
#include <asm/arch/pxa-regs.h>
#include <asm/arch/pxa2xx-regs.h>
#include <asm/arch/pxa2xx-gpio.h>
#include <asm/arch/audio.h>
#include <asm/arch/pxafb.h>
#include <asm/arch/ohci.h>
#include <asm/arch/mmc.h>
@@ -81,12 +82,6 @@ static struct platform_device cmx270_device_dm9k = {
	}
};

/* audio device */
static struct platform_device cmx270_audio_device = {
	.name		= "pxa2xx-ac97",
	.id		= -1,
};

/* touchscreen controller */
static struct platform_device cmx270_ts_device = {
	.name		= "ucb1400_ts",
@@ -219,7 +214,6 @@ static struct platform_device cmx270_ata = {
/* platform devices */
static struct platform_device *platform_devices[] __initdata = {
	&cmx270_device_dm9k,
	&cmx270_audio_device,
	&cmx270_rtc_device,
	&cmx270_2700G,
	&cmx270_led_device,
@@ -594,6 +588,7 @@ static void __init cmx270_init(void)

	/* register CM-X270 platform devices */
	platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
	pxa_set_ac97_info(NULL);

	/* set MCI and OHCI platform parameters */
	pxa_set_mci_info(&cmx270_mci_platform_data);
+32 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
#include <asm/arch/ohci.h>
#include <asm/arch/pxa27x_keypad.h>
#include <asm/arch/camera.h>
#include <asm/arch/audio.h>

#include "devices.h"
#include "generic.h"
@@ -298,6 +299,37 @@ struct platform_device pxa_device_rtc = {
	.id		= -1,
};

static struct resource pxa_ac97_resources[] = {
	[0] = {
		.start  = 0x40500000,
		.end	= 0x40500000 + 0xfff,
		.flags  = IORESOURCE_MEM,
	},
	[1] = {
		.start  = IRQ_AC97,
		.end    = IRQ_AC97,
		.flags  = IORESOURCE_IRQ,
	},
};

static u64 pxa_ac97_dmamask = 0xffffffffUL;

struct platform_device pxa_device_ac97 = {
	.name           = "pxa2xx-ac97",
	.id             = -1,
	.dev            = {
		.dma_mask = &pxa_ac97_dmamask,
		.coherent_dma_mask = 0xffffffff,
	},
	.num_resources  = ARRAY_SIZE(pxa_ac97_resources),
	.resource       = pxa_ac97_resources,
};

void __init pxa_set_ac97_info(pxa2xx_audio_ops_t *ops)
{
	pxa_register_device(&pxa_device_ac97, ops);
}

#ifdef CONFIG_PXA25x

static struct resource pxa25x_resource_pwm0[] = {
+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ extern struct platform_device pxa_device_i2c;
extern struct platform_device pxa_device_i2s;
extern struct platform_device pxa_device_ficp;
extern struct platform_device pxa_device_rtc;
extern struct platform_device pxa_device_ac97;

extern struct platform_device pxa27x_device_i2c_power;
extern struct platform_device pxa27x_device_ohci;
+2 −7
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@
#include <asm/arch/pxa-regs.h>
#include <asm/arch/pxa2xx-gpio.h>
#include <asm/arch/pxa27x-udc.h>
#include <asm/arch/audio.h>
#include <asm/arch/pxafb.h>
#include <asm/arch/ohci.h>
#include <asm/arch/mmc.h>
@@ -73,12 +74,6 @@ static struct platform_device em_x270_dm9k = {
	}
};

/* audio device */
static struct platform_device em_x270_audio = {
	.name		= "pxa2xx-ac97",
	.id		= -1,
};

/* WM9712 touchscreen controller. Hopefully the driver will make it to
 * the mainstream sometime */
static struct platform_device em_x270_ts = {
@@ -218,7 +213,6 @@ static struct platform_device em_x270_nand = {
/* platform devices */
static struct platform_device *platform_devices[] __initdata = {
	&em_x270_dm9k,
	&em_x270_audio,
	&em_x270_ts,
	&em_x270_rtc,
	&em_x270_nand,
@@ -326,6 +320,7 @@ static void __init em_x270_init(void)

	/* register EM-X270 platform devices */
	platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
	pxa_set_ac97_info(NULL);

	/* set MCI and OHCI platform parameters */
	pxa_set_mci_info(&em_x270_mci_platform_data);
+2 −6
Original line number Diff line number Diff line
@@ -168,11 +168,6 @@ static struct platform_device smc91x_device = {
	.resource	= smc91x_resources,
};

static struct platform_device lpd270_audio_device = {
	.name		= "pxa2xx-ac97",
	.id		= -1,
};

static struct resource lpd270_flash_resources[] = {
	[0] = {
		.start	= PXA_CS0_PHYS,
@@ -412,7 +407,6 @@ __setup("lcd=", lpd270_set_lcd);
static struct platform_device *platform_devices[] __initdata = {
	&smc91x_device,
	&lpd270_backlight_device,
	&lpd270_audio_device,
	&lpd270_flash_device[0],
	&lpd270_flash_device[1],
};
@@ -456,6 +450,8 @@ static void __init lpd270_init(void)

	platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));

	pxa_set_ac97_info(NULL);

	if (lpd270_lcd_to_use != NULL)
		set_pxa_fb_info(lpd270_lcd_to_use);

Loading