gen.c (65b7f6d740a6696974056251c98da0e99f956be8) | gen.c (e8e7b7bdc65c19f8d84c25f7e0d21176d598c870) |
---|---|
1/* 2 * Renesas R-Car Gen1 SRU/SSI 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 --- 306 unchanged lines hidden (view full) --- 315 316/* 317 * Gen1 318 */ 319 320static int rsnd_gen1_probe(struct platform_device *pdev, 321 struct rsnd_priv *priv) 322{ | 1/* 2 * Renesas R-Car Gen1 SRU/SSI 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 --- 306 unchanged lines hidden (view full) --- 315 316/* 317 * Gen1 318 */ 319 320static int rsnd_gen1_probe(struct platform_device *pdev, 321 struct rsnd_priv *priv) 322{ |
323 struct rsnd_regmap_field_conf conf_sru[] = { 324 RSND_GEN_S_REG(SRC_ROUTE_SEL, 0x00), 325 RSND_GEN_S_REG(SRC_TMG_SEL0, 0x08), 326 RSND_GEN_S_REG(SRC_TMG_SEL1, 0x0c), 327 RSND_GEN_S_REG(SRC_TMG_SEL2, 0x10), 328 RSND_GEN_S_REG(SRC_ROUTE_CTRL, 0xc0), 329 RSND_GEN_S_REG(SSI_MODE0, 0xD0), 330 RSND_GEN_S_REG(SSI_MODE1, 0xD4), 331 RSND_GEN_M_REG(SRC_BUSIF_MODE, 0x20, 0x4), 332 RSND_GEN_M_REG(SRC_ROUTE_MODE0, 0x50, 0x8), 333 RSND_GEN_M_REG(SRC_SWRSR, 0x200, 0x40), 334 RSND_GEN_M_REG(SRC_SRCIR, 0x204, 0x40), 335 RSND_GEN_M_REG(SRC_ADINR, 0x214, 0x40), 336 RSND_GEN_M_REG(SRC_IFSCR, 0x21c, 0x40), 337 RSND_GEN_M_REG(SRC_IFSVR, 0x220, 0x40), 338 RSND_GEN_M_REG(SRC_SRCCR, 0x224, 0x40), 339 RSND_GEN_M_REG(SRC_MNFSR, 0x228, 0x40), 340 /* 341 * ADD US 342 * 343 * SRC_STATUS 344 * SRC_INT_EN 345 * SCU_SYS_STATUS0 346 * SCU_SYS_STATUS1 347 * SCU_SYS_INT_EN0 348 * SCU_SYS_INT_EN1 349 */ 350 }; | |
351 struct rsnd_regmap_field_conf conf_adg[] = { 352 RSND_GEN_S_REG(BRRA, 0x00), 353 RSND_GEN_S_REG(BRRB, 0x04), 354 RSND_GEN_S_REG(SSICKR, 0x08), 355 RSND_GEN_S_REG(AUDIO_CLK_SEL0, 0x0c), 356 RSND_GEN_S_REG(AUDIO_CLK_SEL1, 0x10), | 323 struct rsnd_regmap_field_conf conf_adg[] = { 324 RSND_GEN_S_REG(BRRA, 0x00), 325 RSND_GEN_S_REG(BRRB, 0x04), 326 RSND_GEN_S_REG(SSICKR, 0x08), 327 RSND_GEN_S_REG(AUDIO_CLK_SEL0, 0x0c), 328 RSND_GEN_S_REG(AUDIO_CLK_SEL1, 0x10), |
357 RSND_GEN_S_REG(AUDIO_CLK_SEL3, 0x18), 358 RSND_GEN_S_REG(AUDIO_CLK_SEL4, 0x1c), 359 RSND_GEN_S_REG(AUDIO_CLK_SEL5, 0x20), | |
360 }; 361 struct rsnd_regmap_field_conf conf_ssi[] = { 362 RSND_GEN_M_REG(SSICR, 0x00, 0x40), 363 RSND_GEN_M_REG(SSISR, 0x04, 0x40), 364 RSND_GEN_M_REG(SSITDR, 0x08, 0x40), 365 RSND_GEN_M_REG(SSIRDR, 0x0c, 0x40), 366 RSND_GEN_M_REG(SSIWSR, 0x20, 0x40), 367 }; | 329 }; 330 struct rsnd_regmap_field_conf conf_ssi[] = { 331 RSND_GEN_M_REG(SSICR, 0x00, 0x40), 332 RSND_GEN_M_REG(SSISR, 0x04, 0x40), 333 RSND_GEN_M_REG(SSITDR, 0x08, 0x40), 334 RSND_GEN_M_REG(SSIRDR, 0x0c, 0x40), 335 RSND_GEN_M_REG(SSIWSR, 0x20, 0x40), 336 }; |
368 int ret_sru; | |
369 int ret_adg; 370 int ret_ssi; 371 | 337 int ret_adg; 338 int ret_ssi; 339 |
372 ret_sru = rsnd_gen_regmap_init(priv, 9, RSND_GEN1_SRU, "sru", conf_sru); | |
373 ret_adg = rsnd_gen_regmap_init(priv, 9, RSND_GEN1_ADG, "adg", conf_adg); 374 ret_ssi = rsnd_gen_regmap_init(priv, 9, RSND_GEN1_SSI, "ssi", conf_ssi); | 340 ret_adg = rsnd_gen_regmap_init(priv, 9, RSND_GEN1_ADG, "adg", conf_adg); 341 ret_ssi = rsnd_gen_regmap_init(priv, 9, RSND_GEN1_SSI, "ssi", conf_ssi); |
375 if (ret_sru < 0 || 376 ret_adg < 0 || | 342 if (ret_adg < 0 || |
377 ret_ssi < 0) | 343 ret_ssi < 0) |
378 return ret_sru | ret_adg | ret_ssi; | 344 return ret_adg | ret_ssi; |
379 380 return 0; 381} 382 383/* 384 * Gen 385 */ 386static void rsnd_of_parse_gen(struct platform_device *pdev, --- 40 unchanged lines hidden --- | 345 346 return 0; 347} 348 349/* 350 * Gen 351 */ 352static void rsnd_of_parse_gen(struct platform_device *pdev, --- 40 unchanged lines hidden --- |