mirror of
https://github.com/torvalds/linux.git
synced 2024-11-14 16:12:02 +00:00
436d42c61c
Platform data for device drivers should be defined in include/linux/platform_data/*.h, not in the architecture and platform specific directories. This moves such data out of the samsung include directories Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Nicolas Pitre <nico@linaro.org> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Cc: Kukjin Kim <kgene.kim@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Jeff Garzik <jgarzik@pobox.com> Cc: Guenter Roeck <linux@roeck-us.net> Cc: "Wolfram Sang (embedded platforms)" <w.sang@pengutronix.de> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Bryan Wu <bryan.wu@canonical.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com> Cc: Chris Ball <cjb@laptop.org> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Felipe Balbi <balbi@ti.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Sangbeom Kim <sbkim73@samsung.com> Cc: Liam Girdwood <lrg@ti.com> Cc: linux-samsung-soc@vger.kernel.org
80 lines
1.8 KiB
C
80 lines
1.8 KiB
C
/* linux/arch/arm/plat-s3c24xx/simtec-audio.c
|
|
*
|
|
* Copyright (c) 2009 Simtec Electronics
|
|
* http://armlinux.simtec.co.uk/
|
|
* Ben Dooks <ben@simtec.co.uk>
|
|
*
|
|
* Audio setup for various Simtec S3C24XX implementations
|
|
*
|
|
* 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 <linux/kernel.h>
|
|
#include <linux/interrupt.h>
|
|
#include <linux/init.h>
|
|
#include <linux/device.h>
|
|
#include <linux/io.h>
|
|
|
|
#include <mach/bast-map.h>
|
|
#include <mach/bast-irq.h>
|
|
#include <mach/bast-cpld.h>
|
|
|
|
#include <mach/hardware.h>
|
|
#include <mach/regs-gpio.h>
|
|
|
|
#include <linux/platform_data/asoc-s3c24xx_simtec.h>
|
|
#include <plat/devs.h>
|
|
|
|
#include "simtec.h"
|
|
|
|
/* platform ops for audio */
|
|
|
|
static void simtec_audio_startup_lrroute(void)
|
|
{
|
|
unsigned int tmp;
|
|
unsigned long flags;
|
|
|
|
local_irq_save(flags);
|
|
|
|
tmp = __raw_readb(BAST_VA_CTRL1);
|
|
tmp &= ~BAST_CPLD_CTRL1_LRMASK;
|
|
tmp |= BAST_CPLD_CTRL1_LRCDAC;
|
|
__raw_writeb(tmp, BAST_VA_CTRL1);
|
|
|
|
local_irq_restore(flags);
|
|
}
|
|
|
|
static struct s3c24xx_audio_simtec_pdata simtec_audio_platdata;
|
|
static char our_name[32];
|
|
|
|
static struct platform_device simtec_audio_dev = {
|
|
.name = our_name,
|
|
.id = -1,
|
|
.dev = {
|
|
.parent = &s3c_device_iis.dev,
|
|
.platform_data = &simtec_audio_platdata,
|
|
},
|
|
};
|
|
|
|
int __init simtec_audio_add(const char *name, bool has_lr_routing,
|
|
struct s3c24xx_audio_simtec_pdata *spd)
|
|
{
|
|
if (!name)
|
|
name = "tlv320aic23";
|
|
|
|
snprintf(our_name, sizeof(our_name)-1, "s3c24xx-simtec-%s", name);
|
|
|
|
/* copy platform data so the source can be __initdata */
|
|
if (spd)
|
|
simtec_audio_platdata = *spd;
|
|
|
|
if (has_lr_routing)
|
|
simtec_audio_platdata.startup = simtec_audio_startup_lrroute;
|
|
|
|
platform_device_register(&s3c_device_iis);
|
|
platform_device_register(&simtec_audio_dev);
|
|
return 0;
|
|
}
|