Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230333
b: refs/heads/master
c: 2b0e730
h: refs/heads/master
i:
  230331: 7f55035
v: v3
  • Loading branch information
Kuninori Morimoto authored and Mark Brown committed Dec 3, 2010
1 parent b153c47 commit 120c29e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 48d78e5879b9f9e1beed341f6a30add127f43907
refs/heads/master: 2b0e73025f74699e9cc9df60649fcc14cd02481b
20 changes: 11 additions & 9 deletions trunk/sound/soc/sh/fsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ struct fsi_priv {

struct fsi_stream playback;
struct fsi_stream capture;

u32 mst_ctrl;
};

struct fsi_core {
Expand All @@ -152,6 +150,8 @@ struct fsi_core {
u32 int_st;
u32 iemsk;
u32 imsk;
u32 a_mclk;
u32 b_mclk;
};

struct fsi_master {
Expand Down Expand Up @@ -505,17 +505,19 @@ static void fsi_irq_clear_status(struct fsi_priv *fsi)
static void fsi_spdif_clk_ctrl(struct fsi_priv *fsi, int enable)
{
struct fsi_master *master = fsi_get_master(fsi);
u32 val = BP | SE;
u32 mask, val;

if (master->core->ver < 2) {
pr_err("fsi: register access err (%s)\n", __func__);
return;
}

if (enable)
fsi_master_mask_set(master, fsi->mst_ctrl, val, val);
else
fsi_master_mask_set(master, fsi->mst_ctrl, val, 0);
mask = BP | SE;
val = enable ? mask : 0;

fsi_is_port_a(fsi) ?
fsi_master_mask_set(master, master->core->a_mclk, mask, val) :
fsi_master_mask_set(master, master->core->b_mclk, mask, val);
}

/*
Expand Down Expand Up @@ -1157,12 +1159,10 @@ static int fsi_probe(struct platform_device *pdev)
/* FSI A setting */
master->fsia.base = master->base;
master->fsia.master = master;
master->fsia.mst_ctrl = A_MST_CTLR;

/* FSI B setting */
master->fsib.base = master->base + 0x40;
master->fsib.master = master;
master->fsib.mst_ctrl = B_MST_CTLR;

pm_runtime_enable(&pdev->dev);
pm_runtime_resume(&pdev->dev);
Expand Down Expand Up @@ -1249,6 +1249,8 @@ static struct fsi_core fsi2_core = {
.int_st = CPU_INT_ST,
.iemsk = CPU_IEMSK,
.imsk = CPU_IMSK,
.a_mclk = A_MST_CTLR,
.b_mclk = B_MST_CTLR,
};

static struct platform_device_id fsi_id_table[] = {
Expand Down

0 comments on commit 120c29e

Please sign in to comment.