summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorSameer Pujar <spujar@nvidia.com>2018-02-22 00:22:59 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-02-23 08:06:00 -0500
commitfed24150cc205788ff8dabbc240c204e1747e895 (patch)
tree68779d006396ab659a124c5beae34c78a8e52eba /sound/pci/hda
parent8e3dd2bd22180f8c71fe437c4772c1da2815e0b5 (diff)
ALSA: hda: program GSC ID
For HDA as client to have access to APR region, it should transmit the correct AID(aperture ID or GSC ID). Currently CO-10 is used for APR and it expects the AID to be matching. So this has to be programmed in HDA_HDA_GSC_ID_0 (addr: 0x35101e0) Bug 200371345 Change-Id: I3e162f175afd394da07da1df8726904f7ea034ff Signed-off-by: Sameer Pujar <spujar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1662249 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/hda_tegra.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c
index 3ae56622f..9e5fa4192 100644
--- a/sound/pci/hda/hda_tegra.c
+++ b/sound/pci/hda/hda_tegra.c
@@ -83,6 +83,9 @@ static const struct of_device_id tegra_disb_pd[] = {
83#define NUM_CAPTURE_SD 1 83#define NUM_CAPTURE_SD 1
84#define NUM_PLAYBACK_SD 1 84#define NUM_PLAYBACK_SD 1
85 85
86/* GSC_ID register */
87#define HDA_GSC_REG 0x1e0
88
86struct hda_tegra { 89struct hda_tegra {
87 struct azx chip; 90 struct azx chip;
88 struct device *dev; 91 struct device *dev;
@@ -686,7 +689,7 @@ static void hda_tegra_probe_work(struct work_struct *work)
686 struct azx *chip = &hda->chip; 689 struct azx *chip = &hda->chip;
687 struct platform_device *pdev = to_platform_device(hda->dev); 690 struct platform_device *pdev = to_platform_device(hda->dev);
688 struct device_node *np = pdev->dev.of_node; 691 struct device_node *np = pdev->dev.of_node;
689 int num_codec_slots = 0; 692 int num_codec_slots = 0, gsc_id;
690 struct hdac_bus *bus = azx_bus(chip); 693 struct hdac_bus *bus = azx_bus(chip);
691 int err; 694 int err;
692 695
@@ -708,6 +711,10 @@ static void hda_tegra_probe_work(struct work_struct *work)
708 azx_fpci_writel(chip, BUFSZ_NUM_OF_FRAMES, 0x000a0a0a); 711 azx_fpci_writel(chip, BUFSZ_NUM_OF_FRAMES, 0x000a0a0a);
709 } 712 }
710 713
714 /* program HDA GSC_ID to get access to APR */
715 if (of_property_read_u32(np, "nvidia,apr-gsc-id", &gsc_id) >= 0)
716 hda_tegra_writel(gsc_id, hda->regs + HDA_GSC_REG);
717
711 /* create codec instances */ 718 /* create codec instances */
712 err = azx_probe_codecs(chip, num_codec_slots); 719 err = azx_probe_codecs(chip, num_codec_slots);
713 if (err < 0) 720 if (err < 0)