Kuninori Morimoto | 07539c1 | 2013-07-21 21:36:35 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Renesas R-Car SCU support |
| 3 | * |
| 4 | * Copyright (C) 2013 Renesas Solutions Corp. |
| 5 | * Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License version 2 as |
| 9 | * published by the Free Software Foundation. |
| 10 | */ |
| 11 | #include "rsnd.h" |
| 12 | |
| 13 | struct rsnd_scu { |
| 14 | struct rsnd_scu_platform_info *info; /* rcar_snd.h */ |
| 15 | struct rsnd_mod mod; |
Kuninori Morimoto | ef74940 | 2013-12-19 19:28:51 -0800 | [diff] [blame] | 16 | struct clk *clk; |
Kuninori Morimoto | 07539c1 | 2013-07-21 21:36:35 -0700 | [diff] [blame] | 17 | }; |
| 18 | |
Kuninori Morimoto | 374a5281 | 2013-07-28 18:59:12 -0700 | [diff] [blame] | 19 | #define rsnd_scu_mode_flags(p) ((p)->info->flags) |
Kuninori Morimoto | ef74940 | 2013-12-19 19:28:51 -0800 | [diff] [blame] | 20 | #define rsnd_scu_convert_rate(p) ((p)->info->convert_rate) |
| 21 | |
| 22 | #define RSND_SCU_NAME_SIZE 16 |
Kuninori Morimoto | 374a5281 | 2013-07-28 18:59:12 -0700 | [diff] [blame] | 23 | |
| 24 | /* |
| 25 | * ADINR |
| 26 | */ |
| 27 | #define OTBL_24 (0 << 16) |
| 28 | #define OTBL_22 (2 << 16) |
| 29 | #define OTBL_20 (4 << 16) |
| 30 | #define OTBL_18 (6 << 16) |
| 31 | #define OTBL_16 (8 << 16) |
| 32 | |
Kuninori Morimoto | ef74940 | 2013-12-19 19:28:51 -0800 | [diff] [blame] | 33 | /* |
| 34 | * image of SRC (Sampling Rate Converter) |
| 35 | * |
| 36 | * 96kHz <-> +-----+ 48kHz +-----+ 48kHz +-------+ |
| 37 | * 48kHz <-> | SRC | <------> | SSI | <-----> | codec | |
| 38 | * 44.1kHz <-> +-----+ +-----+ +-------+ |
| 39 | * ... |
| 40 | * |
| 41 | */ |
Kuninori Morimoto | 374a5281 | 2013-07-28 18:59:12 -0700 | [diff] [blame] | 42 | |
Kuninori Morimoto | 07539c1 | 2013-07-21 21:36:35 -0700 | [diff] [blame] | 43 | #define rsnd_mod_to_scu(_mod) \ |
| 44 | container_of((_mod), struct rsnd_scu, mod) |
| 45 | |
| 46 | #define for_each_rsnd_scu(pos, priv, i) \ |
| 47 | for ((i) = 0; \ |
| 48 | ((i) < rsnd_scu_nr(priv)) && \ |
| 49 | ((pos) = (struct rsnd_scu *)(priv)->scu + i); \ |
| 50 | i++) |
| 51 | |
Kuninori Morimoto | 2582718c | 2013-12-19 19:27:37 -0800 | [diff] [blame] | 52 | /* Gen1 only */ |
Kuninori Morimoto | 47718dc | 2014-01-23 18:38:42 -0800 | [diff] [blame] | 53 | static int rsnd_src_set_route_if_gen1( |
Kuninori Morimoto | 374a5281 | 2013-07-28 18:59:12 -0700 | [diff] [blame] | 54 | struct rsnd_mod *mod, |
| 55 | struct rsnd_dai *rdai, |
| 56 | struct rsnd_dai_stream *io) |
| 57 | { |
| 58 | struct scu_route_config { |
| 59 | u32 mask; |
| 60 | int shift; |
| 61 | } routes[] = { |
| 62 | { 0xF, 0, }, /* 0 */ |
| 63 | { 0xF, 4, }, /* 1 */ |
| 64 | { 0xF, 8, }, /* 2 */ |
| 65 | { 0x7, 12, }, /* 3 */ |
| 66 | { 0x7, 16, }, /* 4 */ |
| 67 | { 0x7, 20, }, /* 5 */ |
| 68 | { 0x7, 24, }, /* 6 */ |
| 69 | { 0x3, 28, }, /* 7 */ |
| 70 | { 0x3, 30, }, /* 8 */ |
| 71 | }; |
Kuninori Morimoto | 47718dc | 2014-01-23 18:38:42 -0800 | [diff] [blame] | 72 | struct rsnd_priv *priv = rsnd_mod_to_priv(mod); |
Kuninori Morimoto | ef74940 | 2013-12-19 19:28:51 -0800 | [diff] [blame] | 73 | struct rsnd_scu *scu = rsnd_mod_to_scu(mod); |
Kuninori Morimoto | 374a5281 | 2013-07-28 18:59:12 -0700 | [diff] [blame] | 74 | u32 mask; |
| 75 | u32 val; |
| 76 | int shift; |
| 77 | int id; |
| 78 | |
| 79 | /* |
| 80 | * Gen1 only |
| 81 | */ |
| 82 | if (!rsnd_is_gen1(priv)) |
| 83 | return 0; |
| 84 | |
| 85 | id = rsnd_mod_id(mod); |
Dan Carpenter | b5f3d7a | 2013-11-08 12:46:10 +0300 | [diff] [blame] | 86 | if (id < 0 || id >= ARRAY_SIZE(routes)) |
Kuninori Morimoto | 374a5281 | 2013-07-28 18:59:12 -0700 | [diff] [blame] | 87 | return -EIO; |
| 88 | |
| 89 | /* |
| 90 | * SRC_ROUTE_SELECT |
| 91 | */ |
| 92 | val = rsnd_dai_is_play(rdai, io) ? 0x1 : 0x2; |
| 93 | val = val << routes[id].shift; |
| 94 | mask = routes[id].mask << routes[id].shift; |
| 95 | |
| 96 | rsnd_mod_bset(mod, SRC_ROUTE_SEL, mask, val); |
| 97 | |
| 98 | /* |
| 99 | * SRC_TIMING_SELECT |
| 100 | */ |
| 101 | shift = (id % 4) * 8; |
| 102 | mask = 0x1F << shift; |
Kuninori Morimoto | ef74940 | 2013-12-19 19:28:51 -0800 | [diff] [blame] | 103 | |
| 104 | /* |
| 105 | * ADG is used as source clock if SRC was used, |
| 106 | * then, SSI WS is used as destination clock. |
| 107 | * SSI WS is used as source clock if SRC is not used |
| 108 | * (when playback, source/destination become reverse when capture) |
| 109 | */ |
| 110 | if (rsnd_scu_convert_rate(scu)) /* use ADG */ |
| 111 | val = 0; |
| 112 | else if (8 == id) /* use SSI WS, but SRU8 is special */ |
Kuninori Morimoto | 374a5281 | 2013-07-28 18:59:12 -0700 | [diff] [blame] | 113 | val = id << shift; |
Kuninori Morimoto | ef74940 | 2013-12-19 19:28:51 -0800 | [diff] [blame] | 114 | else /* use SSI WS */ |
Kuninori Morimoto | 374a5281 | 2013-07-28 18:59:12 -0700 | [diff] [blame] | 115 | val = (id + 1) << shift; |
| 116 | |
| 117 | switch (id / 4) { |
| 118 | case 0: |
| 119 | rsnd_mod_bset(mod, SRC_TMG_SEL0, mask, val); |
| 120 | break; |
| 121 | case 1: |
| 122 | rsnd_mod_bset(mod, SRC_TMG_SEL1, mask, val); |
| 123 | break; |
| 124 | case 2: |
| 125 | rsnd_mod_bset(mod, SRC_TMG_SEL2, mask, val); |
| 126 | break; |
| 127 | } |
| 128 | |
| 129 | return 0; |
| 130 | } |
| 131 | |
Kuninori Morimoto | ef74940 | 2013-12-19 19:28:51 -0800 | [diff] [blame] | 132 | unsigned int rsnd_scu_get_ssi_rate(struct rsnd_priv *priv, |
| 133 | struct rsnd_mod *ssi_mod, |
| 134 | struct snd_pcm_runtime *runtime) |
Kuninori Morimoto | 374a5281 | 2013-07-28 18:59:12 -0700 | [diff] [blame] | 135 | { |
Kuninori Morimoto | ef74940 | 2013-12-19 19:28:51 -0800 | [diff] [blame] | 136 | struct rsnd_scu *scu; |
| 137 | unsigned int rate; |
Kuninori Morimoto | 374a5281 | 2013-07-28 18:59:12 -0700 | [diff] [blame] | 138 | |
Kuninori Morimoto | ef74940 | 2013-12-19 19:28:51 -0800 | [diff] [blame] | 139 | /* this function is assuming SSI id = SCU id here */ |
| 140 | scu = rsnd_mod_to_scu(rsnd_scu_mod_get(priv, rsnd_mod_id(ssi_mod))); |
Kuninori Morimoto | 374a5281 | 2013-07-28 18:59:12 -0700 | [diff] [blame] | 141 | |
Kuninori Morimoto | ef74940 | 2013-12-19 19:28:51 -0800 | [diff] [blame] | 142 | /* |
| 143 | * return convert rate if SRC is used, |
| 144 | * otherwise, return runtime->rate as usual |
| 145 | */ |
| 146 | rate = rsnd_scu_convert_rate(scu); |
| 147 | if (!rate) |
| 148 | rate = runtime->rate; |
| 149 | |
| 150 | return rate; |
Kuninori Morimoto | 374a5281 | 2013-07-28 18:59:12 -0700 | [diff] [blame] | 151 | } |
| 152 | |
Kuninori Morimoto | 47718dc | 2014-01-23 18:38:42 -0800 | [diff] [blame] | 153 | static int rsnd_scu_convert_rate_ctrl( |
Kuninori Morimoto | 374a5281 | 2013-07-28 18:59:12 -0700 | [diff] [blame] | 154 | struct rsnd_mod *mod, |
| 155 | struct rsnd_dai *rdai, |
| 156 | struct rsnd_dai_stream *io) |
| 157 | { |
Kuninori Morimoto | 47718dc | 2014-01-23 18:38:42 -0800 | [diff] [blame] | 158 | struct rsnd_priv *priv = rsnd_mod_to_priv(mod); |
Kuninori Morimoto | 374a5281 | 2013-07-28 18:59:12 -0700 | [diff] [blame] | 159 | struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); |
Kuninori Morimoto | ef74940 | 2013-12-19 19:28:51 -0800 | [diff] [blame] | 160 | struct rsnd_scu *scu = rsnd_mod_to_scu(mod); |
| 161 | u32 convert_rate = rsnd_scu_convert_rate(scu); |
Kuninori Morimoto | 374a5281 | 2013-07-28 18:59:12 -0700 | [diff] [blame] | 162 | u32 adinr = runtime->channels; |
| 163 | |
Kuninori Morimoto | ef74940 | 2013-12-19 19:28:51 -0800 | [diff] [blame] | 164 | /* set/clear soft reset */ |
| 165 | rsnd_mod_write(mod, SRC_SWRSR, 0); |
| 166 | rsnd_mod_write(mod, SRC_SWRSR, 1); |
| 167 | |
| 168 | /* Initialize the operation of the SRC internal circuits */ |
| 169 | rsnd_mod_write(mod, SRC_SRCIR, 1); |
| 170 | |
| 171 | /* Set channel number and output bit length */ |
Kuninori Morimoto | 374a5281 | 2013-07-28 18:59:12 -0700 | [diff] [blame] | 172 | switch (runtime->sample_bits) { |
| 173 | case 16: |
| 174 | adinr |= OTBL_16; |
| 175 | break; |
| 176 | case 32: |
| 177 | adinr |= OTBL_24; |
| 178 | break; |
| 179 | default: |
| 180 | return -EIO; |
| 181 | } |
Kuninori Morimoto | 690ef81 | 2013-12-19 19:27:03 -0800 | [diff] [blame] | 182 | rsnd_mod_write(mod, SRC_ADINR, adinr); |
Kuninori Morimoto | 374a5281 | 2013-07-28 18:59:12 -0700 | [diff] [blame] | 183 | |
Kuninori Morimoto | ef74940 | 2013-12-19 19:28:51 -0800 | [diff] [blame] | 184 | if (convert_rate) { |
| 185 | u32 fsrate = 0x0400000 / convert_rate * runtime->rate; |
| 186 | int ret; |
| 187 | |
| 188 | /* Enable the initial value of IFS */ |
| 189 | rsnd_mod_write(mod, SRC_IFSCR, 1); |
| 190 | |
| 191 | /* Set initial value of IFS */ |
| 192 | rsnd_mod_write(mod, SRC_IFSVR, fsrate); |
| 193 | |
| 194 | /* Select SRC mode (fixed value) */ |
| 195 | rsnd_mod_write(mod, SRC_SRCCR, 0x00010110); |
| 196 | |
| 197 | /* Set the restriction value of the FS ratio (98%) */ |
| 198 | rsnd_mod_write(mod, SRC_MNFSR, fsrate / 100 * 98); |
| 199 | |
| 200 | if (rsnd_is_gen1(priv)) { |
| 201 | /* no SRC_BFSSR settings, since SRC_SRCCR::BUFMD is 0 */ |
| 202 | } |
| 203 | |
| 204 | /* set convert clock */ |
| 205 | ret = rsnd_adg_set_convert_clk(priv, mod, |
| 206 | runtime->rate, |
| 207 | convert_rate); |
| 208 | if (ret < 0) |
| 209 | return ret; |
| 210 | } |
| 211 | |
| 212 | /* Cancel the initialization and operate the SRC function */ |
| 213 | rsnd_mod_write(mod, SRC_SRCIR, 0); |
| 214 | |
| 215 | /* use DMA transfer */ |
Kuninori Morimoto | 0290d2a | 2014-01-23 18:37:39 -0800 | [diff] [blame] | 216 | rsnd_mod_write(mod, SRC_BUSIF_MODE, 1); |
Kuninori Morimoto | ef74940 | 2013-12-19 19:28:51 -0800 | [diff] [blame] | 217 | |
Kuninori Morimoto | 374a5281 | 2013-07-28 18:59:12 -0700 | [diff] [blame] | 218 | return 0; |
| 219 | } |
| 220 | |
Kuninori Morimoto | cdcfcac | 2013-10-17 22:50:59 -0700 | [diff] [blame] | 221 | bool rsnd_scu_hpbif_is_enable(struct rsnd_mod *mod) |
| 222 | { |
| 223 | struct rsnd_scu *scu = rsnd_mod_to_scu(mod); |
| 224 | u32 flags = rsnd_scu_mode_flags(scu); |
| 225 | |
| 226 | return !!(flags & RSND_SCU_USE_HPBIF); |
| 227 | } |
| 228 | |
Kuninori Morimoto | a204d90 | 2014-01-23 18:38:33 -0800 | [diff] [blame] | 229 | static int rsnd_scu_init(struct rsnd_mod *mod, |
Kuninori Morimoto | 07539c1 | 2013-07-21 21:36:35 -0700 | [diff] [blame] | 230 | struct rsnd_dai *rdai, |
| 231 | struct rsnd_dai_stream *io) |
| 232 | { |
Kuninori Morimoto | ef74940 | 2013-12-19 19:28:51 -0800 | [diff] [blame] | 233 | struct rsnd_scu *scu = rsnd_mod_to_scu(mod); |
Kuninori Morimoto | 374a5281 | 2013-07-28 18:59:12 -0700 | [diff] [blame] | 234 | int ret; |
Kuninori Morimoto | 07539c1 | 2013-07-21 21:36:35 -0700 | [diff] [blame] | 235 | |
Kuninori Morimoto | ef74940 | 2013-12-19 19:28:51 -0800 | [diff] [blame] | 236 | clk_enable(scu->clk); |
| 237 | |
Kuninori Morimoto | 47718dc | 2014-01-23 18:38:42 -0800 | [diff] [blame] | 238 | ret = rsnd_src_set_route_if_gen1(mod, rdai, io); |
Kuninori Morimoto | 374a5281 | 2013-07-28 18:59:12 -0700 | [diff] [blame] | 239 | if (ret < 0) |
| 240 | return ret; |
| 241 | |
Kuninori Morimoto | 47718dc | 2014-01-23 18:38:42 -0800 | [diff] [blame] | 242 | ret = rsnd_scu_convert_rate_ctrl(mod, rdai, io); |
Kuninori Morimoto | 374a5281 | 2013-07-28 18:59:12 -0700 | [diff] [blame] | 243 | if (ret < 0) |
| 244 | return ret; |
| 245 | |
Kuninori Morimoto | a204d90 | 2014-01-23 18:38:33 -0800 | [diff] [blame] | 246 | return 0; |
| 247 | } |
| 248 | |
| 249 | static int rsnd_scu_quit(struct rsnd_mod *mod, |
| 250 | struct rsnd_dai *rdai, |
| 251 | struct rsnd_dai_stream *io) |
| 252 | { |
| 253 | struct rsnd_scu *scu = rsnd_mod_to_scu(mod); |
| 254 | |
| 255 | clk_disable(scu->clk); |
Kuninori Morimoto | 374a5281 | 2013-07-28 18:59:12 -0700 | [diff] [blame] | 256 | |
Kuninori Morimoto | 07539c1 | 2013-07-21 21:36:35 -0700 | [diff] [blame] | 257 | return 0; |
| 258 | } |
| 259 | |
Kuninori Morimoto | a204d90 | 2014-01-23 18:38:33 -0800 | [diff] [blame] | 260 | static int rsnd_scu_start(struct rsnd_mod *mod, |
| 261 | struct rsnd_dai *rdai, |
| 262 | struct rsnd_dai_stream *io) |
| 263 | { |
| 264 | struct rsnd_priv *priv = rsnd_mod_to_priv(mod); |
| 265 | struct rsnd_scu *scu = rsnd_mod_to_scu(mod); |
Kuninori Morimoto | e7ce74e | 2014-01-23 18:38:50 -0800 | [diff] [blame^] | 266 | int id = rsnd_mod_id(mod); |
Kuninori Morimoto | a204d90 | 2014-01-23 18:38:33 -0800 | [diff] [blame] | 267 | |
Kuninori Morimoto | e7ce74e | 2014-01-23 18:38:50 -0800 | [diff] [blame^] | 268 | if (rsnd_is_gen1(priv)) |
| 269 | rsnd_mod_bset(mod, SRC_ROUTE_CTRL, (1 << id), (1 << id)); |
| 270 | |
| 271 | if (rsnd_scu_convert_rate(scu)) |
| 272 | rsnd_mod_write(mod, SRC_ROUTE_MODE0, 1); |
| 273 | |
| 274 | return 0; |
Kuninori Morimoto | a204d90 | 2014-01-23 18:38:33 -0800 | [diff] [blame] | 275 | } |
| 276 | |
Kuninori Morimoto | ef74940 | 2013-12-19 19:28:51 -0800 | [diff] [blame] | 277 | static int rsnd_scu_stop(struct rsnd_mod *mod, |
| 278 | struct rsnd_dai *rdai, |
| 279 | struct rsnd_dai_stream *io) |
| 280 | { |
| 281 | struct rsnd_priv *priv = rsnd_mod_to_priv(mod); |
| 282 | struct rsnd_scu *scu = rsnd_mod_to_scu(mod); |
Kuninori Morimoto | e7ce74e | 2014-01-23 18:38:50 -0800 | [diff] [blame^] | 283 | int id = rsnd_mod_id(mod); |
Kuninori Morimoto | ef74940 | 2013-12-19 19:28:51 -0800 | [diff] [blame] | 284 | |
Kuninori Morimoto | e7ce74e | 2014-01-23 18:38:50 -0800 | [diff] [blame^] | 285 | if (rsnd_is_gen1(priv)) |
| 286 | rsnd_mod_bset(mod, SRC_ROUTE_CTRL, (1 << id), 0); |
| 287 | |
| 288 | if (rsnd_scu_convert_rate(scu)) |
| 289 | rsnd_mod_write(mod, SRC_ROUTE_MODE0, 0); |
Kuninori Morimoto | ef74940 | 2013-12-19 19:28:51 -0800 | [diff] [blame] | 290 | |
Kuninori Morimoto | ef74940 | 2013-12-19 19:28:51 -0800 | [diff] [blame] | 291 | return 0; |
| 292 | } |
| 293 | |
Kuninori Morimoto | 07539c1 | 2013-07-21 21:36:35 -0700 | [diff] [blame] | 294 | static struct rsnd_mod_ops rsnd_scu_ops = { |
| 295 | .name = "scu", |
Kuninori Morimoto | a204d90 | 2014-01-23 18:38:33 -0800 | [diff] [blame] | 296 | .init = rsnd_scu_init, |
| 297 | .quit = rsnd_scu_quit, |
Kuninori Morimoto | 07539c1 | 2013-07-21 21:36:35 -0700 | [diff] [blame] | 298 | .start = rsnd_scu_start, |
Kuninori Morimoto | ef74940 | 2013-12-19 19:28:51 -0800 | [diff] [blame] | 299 | .stop = rsnd_scu_stop, |
Kuninori Morimoto | 07539c1 | 2013-07-21 21:36:35 -0700 | [diff] [blame] | 300 | }; |
| 301 | |
Kuninori Morimoto | 013f38f | 2014-01-23 18:38:26 -0800 | [diff] [blame] | 302 | static struct rsnd_mod_ops rsnd_scu_non_ops = { |
| 303 | .name = "scu (non)", |
| 304 | }; |
| 305 | |
Kuninori Morimoto | 07539c1 | 2013-07-21 21:36:35 -0700 | [diff] [blame] | 306 | struct rsnd_mod *rsnd_scu_mod_get(struct rsnd_priv *priv, int id) |
| 307 | { |
Takashi Iwai | 8b14719 | 2013-11-05 18:40:05 +0100 | [diff] [blame] | 308 | if (WARN_ON(id < 0 || id >= rsnd_scu_nr(priv))) |
| 309 | id = 0; |
Kuninori Morimoto | 07539c1 | 2013-07-21 21:36:35 -0700 | [diff] [blame] | 310 | |
| 311 | return &((struct rsnd_scu *)(priv->scu) + id)->mod; |
| 312 | } |
| 313 | |
| 314 | int rsnd_scu_probe(struct platform_device *pdev, |
| 315 | struct rcar_snd_info *info, |
| 316 | struct rsnd_priv *priv) |
| 317 | { |
| 318 | struct device *dev = rsnd_priv_to_dev(priv); |
| 319 | struct rsnd_scu *scu; |
Kuninori Morimoto | 013f38f | 2014-01-23 18:38:26 -0800 | [diff] [blame] | 320 | struct rsnd_mod_ops *ops; |
Kuninori Morimoto | ef74940 | 2013-12-19 19:28:51 -0800 | [diff] [blame] | 321 | struct clk *clk; |
| 322 | char name[RSND_SCU_NAME_SIZE]; |
Kuninori Morimoto | 07539c1 | 2013-07-21 21:36:35 -0700 | [diff] [blame] | 323 | int i, nr; |
| 324 | |
| 325 | /* |
| 326 | * init SCU |
| 327 | */ |
| 328 | nr = info->scu_info_nr; |
| 329 | scu = devm_kzalloc(dev, sizeof(*scu) * nr, GFP_KERNEL); |
| 330 | if (!scu) { |
| 331 | dev_err(dev, "SCU allocate failed\n"); |
| 332 | return -ENOMEM; |
| 333 | } |
| 334 | |
| 335 | priv->scu_nr = nr; |
| 336 | priv->scu = scu; |
| 337 | |
| 338 | for_each_rsnd_scu(scu, priv, i) { |
Kuninori Morimoto | ef74940 | 2013-12-19 19:28:51 -0800 | [diff] [blame] | 339 | snprintf(name, RSND_SCU_NAME_SIZE, "scu.%d", i); |
| 340 | |
| 341 | clk = devm_clk_get(dev, name); |
| 342 | if (IS_ERR(clk)) |
| 343 | return PTR_ERR(clk); |
| 344 | |
Kuninori Morimoto | 07539c1 | 2013-07-21 21:36:35 -0700 | [diff] [blame] | 345 | scu->info = &info->scu_info[i]; |
Kuninori Morimoto | ef74940 | 2013-12-19 19:28:51 -0800 | [diff] [blame] | 346 | scu->clk = clk; |
Kuninori Morimoto | 07539c1 | 2013-07-21 21:36:35 -0700 | [diff] [blame] | 347 | |
Kuninori Morimoto | 013f38f | 2014-01-23 18:38:26 -0800 | [diff] [blame] | 348 | ops = &rsnd_scu_non_ops; |
| 349 | if (rsnd_scu_hpbif_is_enable(&scu->mod)) |
| 350 | ops = &rsnd_scu_ops; |
| 351 | |
| 352 | rsnd_mod_init(priv, &scu->mod, ops, i); |
| 353 | |
Kuninori Morimoto | 374a5281 | 2013-07-28 18:59:12 -0700 | [diff] [blame] | 354 | dev_dbg(dev, "SCU%d probed\n", i); |
| 355 | } |
Kuninori Morimoto | 07539c1 | 2013-07-21 21:36:35 -0700 | [diff] [blame] | 356 | dev_dbg(dev, "scu probed\n"); |
| 357 | |
| 358 | return 0; |
| 359 | } |
| 360 | |
| 361 | void rsnd_scu_remove(struct platform_device *pdev, |
| 362 | struct rsnd_priv *priv) |
| 363 | { |
| 364 | } |