Skip to content

Commit f742c48

Browse files
6by9popcornmix
authored andcommitted
drm/vc4: Use reg-names to configure HDMI audio.
HDMI audio configuration was using fixed index numbers to load in DT register settings. Switch to using reg-names for flexibility and to match Pi4. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
1 parent 2f5d2fd commit f742c48

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎drivers/gpu/drm/vc4/vc4_hdmi.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1078,6 +1078,7 @@ static int vc4_hdmi_audio_init(struct vc4_hdmi *vc4_hdmi)
10781078
struct snd_soc_card *card = &vc4_hdmi->audio.card;
10791079
struct device *dev = &vc4_hdmi->pdev->dev;
10801080
const __be32 *addr;
1081+
int index;
10811082
int ret;
10821083
int len;
10831084

@@ -1103,7 +1104,9 @@ static int vc4_hdmi_audio_init(struct vc4_hdmi *vc4_hdmi)
11031104
* for DMA transfers.
11041105
* This VC/MMU should probably be exposed to avoid this kind of hacks.
11051106
*/
1106-
addr = of_get_address(dev->of_node, 1, NULL, NULL);
1107+
index = of_property_match_string(dev->of_node, "reg-names", "hd");
1108+
addr = of_get_address(dev->of_node, index, NULL, NULL);
1109+
11071110
vc4_hdmi->audio.dma_data.addr = be32_to_cpup(addr) + mai_data->offset;
11081111
vc4_hdmi->audio.dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
11091112
vc4_hdmi->audio.dma_data.maxburst = 2;

0 commit comments

Comments
 (0)