forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/sound/soc/txx9/txx9aclc-ac97.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * TXx9 ACLC AC97 driver
34 *
....@@ -5,10 +6,6 @@
56 *
67 * Based on RBTX49xx patch from CELF patch archive.
78 * (C) Copyright TOSHIBA CORPORATION 2004-2006
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.
129 */
1310
1411 #include <linux/init.h>
....@@ -17,6 +14,7 @@
1714 #include <linux/interrupt.h>
1815 #include <linux/io.h>
1916 #include <linux/gfp.h>
17
+#include <asm/mach-tx39xx/ioremap.h> /* for TXX9_DIRECTMAP_BASE */
2018 #include <sound/core.h>
2119 #include <sound/pcm.h>
2220 #include <sound/soc.h>
....@@ -102,7 +100,6 @@
102100 u32 ready = ACINT_CODECRDY(ac97->num) | ACINT_REGACCRDY;
103101
104102 __raw_writel(ACCTL_ENLINK, base + ACCTLDIS);
105
- mmiowb();
106103 udelay(1);
107104 __raw_writel(ACCTL_ENLINK, base + ACCTLEN);
108105 /* wait for primary codec ready status */
....@@ -152,7 +149,6 @@
152149 }
153150
154151 static struct snd_soc_dai_driver txx9aclc_ac97_dai = {
155
- .bus_control = true,
156152 .probe = txx9aclc_ac97_probe,
157153 .remove = txx9aclc_ac97_remove,
158154 .playback = {
....@@ -208,13 +204,12 @@
208204 if (err < 0)
209205 return err;
210206
211
- return snd_soc_register_component(&pdev->dev, &txx9aclc_ac97_component,
207
+ return devm_snd_soc_register_component(&pdev->dev, &txx9aclc_ac97_component,
212208 &txx9aclc_ac97_dai, 1);
213209 }
214210
215211 static int txx9aclc_ac97_dev_remove(struct platform_device *pdev)
216212 {
217
- snd_soc_unregister_component(&pdev->dev);
218213 snd_soc_set_ac97_ops(NULL);
219214 return 0;
220215 }