.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * TXx9 ACLC AC97 driver |
---|
3 | 4 | * |
---|
.. | .. |
---|
5 | 6 | * |
---|
6 | 7 | * Based on RBTX49xx patch from CELF patch archive. |
---|
7 | 8 | * (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. |
---|
12 | 9 | */ |
---|
13 | 10 | |
---|
14 | 11 | #include <linux/init.h> |
---|
.. | .. |
---|
17 | 14 | #include <linux/interrupt.h> |
---|
18 | 15 | #include <linux/io.h> |
---|
19 | 16 | #include <linux/gfp.h> |
---|
| 17 | +#include <asm/mach-tx39xx/ioremap.h> /* for TXX9_DIRECTMAP_BASE */ |
---|
20 | 18 | #include <sound/core.h> |
---|
21 | 19 | #include <sound/pcm.h> |
---|
22 | 20 | #include <sound/soc.h> |
---|
.. | .. |
---|
102 | 100 | u32 ready = ACINT_CODECRDY(ac97->num) | ACINT_REGACCRDY; |
---|
103 | 101 | |
---|
104 | 102 | __raw_writel(ACCTL_ENLINK, base + ACCTLDIS); |
---|
105 | | - mmiowb(); |
---|
106 | 103 | udelay(1); |
---|
107 | 104 | __raw_writel(ACCTL_ENLINK, base + ACCTLEN); |
---|
108 | 105 | /* wait for primary codec ready status */ |
---|
.. | .. |
---|
152 | 149 | } |
---|
153 | 150 | |
---|
154 | 151 | static struct snd_soc_dai_driver txx9aclc_ac97_dai = { |
---|
155 | | - .bus_control = true, |
---|
156 | 152 | .probe = txx9aclc_ac97_probe, |
---|
157 | 153 | .remove = txx9aclc_ac97_remove, |
---|
158 | 154 | .playback = { |
---|
.. | .. |
---|
208 | 204 | if (err < 0) |
---|
209 | 205 | return err; |
---|
210 | 206 | |
---|
211 | | - return snd_soc_register_component(&pdev->dev, &txx9aclc_ac97_component, |
---|
| 207 | + return devm_snd_soc_register_component(&pdev->dev, &txx9aclc_ac97_component, |
---|
212 | 208 | &txx9aclc_ac97_dai, 1); |
---|
213 | 209 | } |
---|
214 | 210 | |
---|
215 | 211 | static int txx9aclc_ac97_dev_remove(struct platform_device *pdev) |
---|
216 | 212 | { |
---|
217 | | - snd_soc_unregister_component(&pdev->dev); |
---|
218 | 213 | snd_soc_set_ac97_ops(NULL); |
---|
219 | 214 | return 0; |
---|
220 | 215 | } |
---|