提交 13e35b40 编写于 作者: K Kuninori Morimoto 提交者: Simon Horman

ARM: shmobile: use FSI driver's audio clock on armadillo800eva

Current FSI driver can control audio clock without platform
call-back functions
This patch removed board-specific call-back/settings
Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: NSimon Horman <horms@verge.net.au>
上级 c8c3243c
...@@ -768,32 +768,6 @@ static struct platform_device ceu0_device = { ...@@ -768,32 +768,6 @@ static struct platform_device ceu0_device = {
}; };
/* FSI */ /* FSI */
static int fsi_hdmi_set_rate(struct device *dev, int rate, int enable)
{
struct clk *fsib;
int ret;
/* it support 48KHz only */
if (48000 != rate)
return -EINVAL;
fsib = clk_get(dev, "ickb");
if (IS_ERR(fsib))
return -EINVAL;
if (enable) {
ret = SH_FSI_ACKMD_256 | SH_FSI_BPFMD_64;
clk_enable(fsib);
} else {
ret = 0;
clk_disable(fsib);
}
clk_put(fsib);
return ret;
}
static struct sh_fsi_platform_info fsi_info = { static struct sh_fsi_platform_info fsi_info = {
/* FSI-WM8978 */ /* FSI-WM8978 */
.port_a = { .port_a = {
...@@ -802,8 +776,8 @@ static struct sh_fsi_platform_info fsi_info = { ...@@ -802,8 +776,8 @@ static struct sh_fsi_platform_info fsi_info = {
/* FSI-HDMI */ /* FSI-HDMI */
.port_b = { .port_b = {
.flags = SH_FSI_FMT_SPDIF | .flags = SH_FSI_FMT_SPDIF |
SH_FSI_ENABLE_STREAM_MODE, SH_FSI_ENABLE_STREAM_MODE |
.set_rate = fsi_hdmi_set_rate, SH_FSI_CLK_CPG,
.tx_id = SHDMA_SLAVE_FSIB_TX, .tx_id = SHDMA_SLAVE_FSIB_TX,
} }
}; };
...@@ -938,13 +912,11 @@ static void __init eva_clock_init(void) ...@@ -938,13 +912,11 @@ static void __init eva_clock_init(void)
struct clk *xtal1 = clk_get(NULL, "extal1"); struct clk *xtal1 = clk_get(NULL, "extal1");
struct clk *usb24s = clk_get(NULL, "usb24s"); struct clk *usb24s = clk_get(NULL, "usb24s");
struct clk *fsibck = clk_get(NULL, "fsibck"); struct clk *fsibck = clk_get(NULL, "fsibck");
struct clk *fsib = clk_get(&fsi_device.dev, "ickb");
if (IS_ERR(system) || if (IS_ERR(system) ||
IS_ERR(xtal1) || IS_ERR(xtal1) ||
IS_ERR(usb24s) || IS_ERR(usb24s) ||
IS_ERR(fsibck) || IS_ERR(fsibck)) {
IS_ERR(fsib)) {
pr_err("armadillo800eva board clock init failed\n"); pr_err("armadillo800eva board clock init failed\n");
goto clock_error; goto clock_error;
} }
...@@ -956,9 +928,7 @@ static void __init eva_clock_init(void) ...@@ -956,9 +928,7 @@ static void __init eva_clock_init(void)
clk_set_parent(usb24s, system); clk_set_parent(usb24s, system);
/* FSIBCK is 12.288MHz, and it is parent of FSI-B */ /* FSIBCK is 12.288MHz, and it is parent of FSI-B */
clk_set_parent(fsib, fsibck);
clk_set_rate(fsibck, 12288000); clk_set_rate(fsibck, 12288000);
clk_set_rate(fsib, 12288000);
clock_error: clock_error:
if (!IS_ERR(system)) if (!IS_ERR(system))
...@@ -969,8 +939,6 @@ static void __init eva_clock_init(void) ...@@ -969,8 +939,6 @@ static void __init eva_clock_init(void)
clk_put(usb24s); clk_put(usb24s);
if (!IS_ERR(fsibck)) if (!IS_ERR(fsibck))
clk_put(fsibck); clk_put(fsibck);
if (!IS_ERR(fsib))
clk_put(fsib);
} }
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册