~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/arm/mach-s3c24xx/simtec-audio.c

Version: ~ [ linux-6.4-rc3 ] ~ [ linux-6.3.4 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.30 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.113 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.180 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.243 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.283 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.315 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* linux/arch/arm/plat-s3c24xx/simtec-audio.c
  2  *
  3  * Copyright (c) 2009 Simtec Electronics
  4  *      http://armlinux.simtec.co.uk/
  5  *      Ben Dooks <ben@simtec.co.uk>
  6  *
  7  * Audio setup for various Simtec S3C24XX implementations
  8  *
  9  * This program is free software; you can redistribute it and/or modify
 10  * it under the terms of the GNU General Public License version 2 as
 11  * published by the Free Software Foundation.
 12 */
 13 
 14 #include <linux/kernel.h>
 15 #include <linux/interrupt.h>
 16 #include <linux/init.h>
 17 #include <linux/device.h>
 18 #include <linux/io.h>
 19 
 20 #include <mach/hardware.h>
 21 #include <mach/regs-gpio.h>
 22 
 23 #include <linux/platform_data/asoc-s3c24xx_simtec.h>
 24 #include <plat/devs.h>
 25 
 26 #include "bast.h"
 27 #include "simtec.h"
 28 
 29 /* platform ops for audio */
 30 
 31 static void simtec_audio_startup_lrroute(void)
 32 {
 33         unsigned int tmp;
 34         unsigned long flags;
 35 
 36         local_irq_save(flags);
 37 
 38         tmp = __raw_readb(BAST_VA_CTRL1);
 39         tmp &= ~BAST_CPLD_CTRL1_LRMASK;
 40         tmp |= BAST_CPLD_CTRL1_LRCDAC;
 41         __raw_writeb(tmp, BAST_VA_CTRL1);
 42 
 43         local_irq_restore(flags);
 44 }
 45 
 46 static struct s3c24xx_audio_simtec_pdata simtec_audio_platdata;
 47 static char our_name[32];
 48 
 49 static struct platform_device simtec_audio_dev = {
 50         .name   = our_name,
 51         .id     = -1,
 52         .dev    = {
 53                 .parent         = &s3c_device_iis.dev,
 54                 .platform_data  = &simtec_audio_platdata,
 55         },
 56 };
 57 
 58 int __init simtec_audio_add(const char *name, bool has_lr_routing,
 59                             struct s3c24xx_audio_simtec_pdata *spd)
 60 {
 61         if (!name)
 62                 name = "tlv320aic23";
 63 
 64         snprintf(our_name, sizeof(our_name)-1, "s3c24xx-simtec-%s", name);
 65 
 66         /* copy platform data so the source can be __initdata */
 67         if (spd)
 68                 simtec_audio_platdata = *spd;
 69 
 70         if (has_lr_routing)
 71                 simtec_audio_platdata.startup = simtec_audio_startup_lrroute;
 72 
 73         platform_device_register(&s3c_device_iis);
 74         platform_device_register(&simtec_audio_dev);
 75         return 0;
 76 }
 77 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp