diff options
author | Dave Airlie <airlied@redhat.com> | 2016-03-13 19:42:34 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2016-03-13 19:46:02 -0400 |
commit | 9b61c0fcdf0cfd20a85d9856d46142e7f297de0a (patch) | |
tree | d4abe6aa3f4e1e088f9da1d0597e078b1fe58912 /drivers/gpu/ipu-v3 | |
parent | 550e3b23a53c88adfa46e64f9d442743e65d47da (diff) | |
parent | 125234dc8b1cc862f52d8bd5b37c36cc59b2cb86 (diff) |
Merge drm-fixes into drm-next.
Nouveau wanted this to avoid some worse conflicts when I merge that.
Diffstat (limited to 'drivers/gpu/ipu-v3')
-rw-r--r-- | drivers/gpu/ipu-v3/ipu-common.c | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c index f2e13eb8339f..e00db3f510dd 100644 --- a/drivers/gpu/ipu-v3/ipu-common.c +++ b/drivers/gpu/ipu-v3/ipu-common.c | |||
@@ -1050,6 +1050,17 @@ static int ipu_add_client_devices(struct ipu_soc *ipu, unsigned long ipu_base) | |||
1050 | for (i = 0; i < ARRAY_SIZE(client_reg); i++) { | 1050 | for (i = 0; i < ARRAY_SIZE(client_reg); i++) { |
1051 | const struct ipu_platform_reg *reg = &client_reg[i]; | 1051 | const struct ipu_platform_reg *reg = &client_reg[i]; |
1052 | struct platform_device *pdev; | 1052 | struct platform_device *pdev; |
1053 | struct device_node *of_node; | ||
1054 | |||
1055 | /* Associate subdevice with the corresponding port node */ | ||
1056 | of_node = of_graph_get_port_by_id(dev->of_node, i); | ||
1057 | if (!of_node) { | ||
1058 | dev_info(dev, | ||
1059 | "no port@%d node in %s, not using %s%d\n", | ||
1060 | i, dev->of_node->full_name, | ||
1061 | (i / 2) ? "DI" : "CSI", i % 2); | ||
1062 | continue; | ||
1063 | } | ||
1053 | 1064 | ||
1054 | pdev = platform_device_alloc(reg->name, id++); | 1065 | pdev = platform_device_alloc(reg->name, id++); |
1055 | if (!pdev) { | 1066 | if (!pdev) { |
@@ -1057,17 +1068,9 @@ static int ipu_add_client_devices(struct ipu_soc *ipu, unsigned long ipu_base) | |||
1057 | goto err_register; | 1068 | goto err_register; |
1058 | } | 1069 | } |
1059 | 1070 | ||
1071 | pdev->dev.of_node = of_node; | ||
1060 | pdev->dev.parent = dev; | 1072 | pdev->dev.parent = dev; |
1061 | 1073 | ||
1062 | /* Associate subdevice with the corresponding port node */ | ||
1063 | pdev->dev.of_node = of_graph_get_port_by_id(dev->of_node, i); | ||
1064 | if (!pdev->dev.of_node) { | ||
1065 | dev_err(dev, "missing port@%d node in %s\n", i, | ||
1066 | dev->of_node->full_name); | ||
1067 | ret = -ENODEV; | ||
1068 | goto err_register; | ||
1069 | } | ||
1070 | |||
1071 | ret = platform_device_add_data(pdev, ®->pdata, | 1074 | ret = platform_device_add_data(pdev, ®->pdata, |
1072 | sizeof(reg->pdata)); | 1075 | sizeof(reg->pdata)); |
1073 | if (!ret) | 1076 | if (!ret) |
@@ -1289,10 +1292,6 @@ static int ipu_probe(struct platform_device *pdev) | |||
1289 | ipu->irq_sync = irq_sync; | 1292 | ipu->irq_sync = irq_sync; |
1290 | ipu->irq_err = irq_err; | 1293 | ipu->irq_err = irq_err; |
1291 | 1294 | ||
1292 | ret = ipu_irq_init(ipu); | ||
1293 | if (ret) | ||
1294 | goto out_failed_irq; | ||
1295 | |||
1296 | ret = device_reset(&pdev->dev); | 1295 | ret = device_reset(&pdev->dev); |
1297 | if (ret) { | 1296 | if (ret) { |
1298 | dev_err(&pdev->dev, "failed to reset: %d\n", ret); | 1297 | dev_err(&pdev->dev, "failed to reset: %d\n", ret); |
@@ -1302,6 +1301,10 @@ static int ipu_probe(struct platform_device *pdev) | |||
1302 | if (ret) | 1301 | if (ret) |
1303 | goto out_failed_reset; | 1302 | goto out_failed_reset; |
1304 | 1303 | ||
1304 | ret = ipu_irq_init(ipu); | ||
1305 | if (ret) | ||
1306 | goto out_failed_irq; | ||
1307 | |||
1305 | /* Set MCU_T to divide MCU access window into 2 */ | 1308 | /* Set MCU_T to divide MCU access window into 2 */ |
1306 | ipu_cm_write(ipu, 0x00400000L | (IPU_MCU_T_DEFAULT << 18), | 1309 | ipu_cm_write(ipu, 0x00400000L | (IPU_MCU_T_DEFAULT << 18), |
1307 | IPU_DISP_GEN); | 1310 | IPU_DISP_GEN); |
@@ -1324,9 +1327,9 @@ static int ipu_probe(struct platform_device *pdev) | |||
1324 | failed_add_clients: | 1327 | failed_add_clients: |
1325 | ipu_submodules_exit(ipu); | 1328 | ipu_submodules_exit(ipu); |
1326 | failed_submodules_init: | 1329 | failed_submodules_init: |
1327 | out_failed_reset: | ||
1328 | ipu_irq_exit(ipu); | 1330 | ipu_irq_exit(ipu); |
1329 | out_failed_irq: | 1331 | out_failed_irq: |
1332 | out_failed_reset: | ||
1330 | clk_disable_unprepare(ipu->clk); | 1333 | clk_disable_unprepare(ipu->clk); |
1331 | return ret; | 1334 | return ret; |
1332 | } | 1335 | } |