aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2013-03-11 18:30:26 -0400
committerVinod Koul <vinod.koul@intel.com>2013-04-15 00:21:18 -0400
commitdc7badba1942270a7695ef380853abcbce725a53 (patch)
tree9eb31de1954b195d4e14fc5751666358d1e858ab
parentbcc7fa9547e7fa3b2f9b54f83ff10cd59f0f9fc6 (diff)
dma: tegra: assume CONFIG_OF
Tegra only supports, and always enables, device tree. Remove all ifdefs and runtime checks for DT support from the driver. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r--drivers/dma/tegra20-apb-dma.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index fcee27eae1f6..5a0b66c2a60c 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -1213,7 +1213,6 @@ static const struct tegra_dma_chip_data tegra20_dma_chip_data = {
1213 .support_channel_pause = false, 1213 .support_channel_pause = false,
1214}; 1214};
1215 1215
1216#if defined(CONFIG_OF)
1217/* Tegra30 specific DMA controller information */ 1216/* Tegra30 specific DMA controller information */
1218static const struct tegra_dma_chip_data tegra30_dma_chip_data = { 1217static const struct tegra_dma_chip_data tegra30_dma_chip_data = {
1219 .nr_channels = 32, 1218 .nr_channels = 32,
@@ -1243,7 +1242,6 @@ static const struct of_device_id tegra_dma_of_match[] = {
1243 }, 1242 },
1244}; 1243};
1245MODULE_DEVICE_TABLE(of, tegra_dma_of_match); 1244MODULE_DEVICE_TABLE(of, tegra_dma_of_match);
1246#endif
1247 1245
1248static int tegra_dma_probe(struct platform_device *pdev) 1246static int tegra_dma_probe(struct platform_device *pdev)
1249{ 1247{
@@ -1252,20 +1250,14 @@ static int tegra_dma_probe(struct platform_device *pdev)
1252 int ret; 1250 int ret;
1253 int i; 1251 int i;
1254 const struct tegra_dma_chip_data *cdata = NULL; 1252 const struct tegra_dma_chip_data *cdata = NULL;
1253 const struct of_device_id *match;
1255 1254
1256 if (pdev->dev.of_node) { 1255 match = of_match_device(tegra_dma_of_match, &pdev->dev);
1257 const struct of_device_id *match; 1256 if (!match) {
1258 match = of_match_device(of_match_ptr(tegra_dma_of_match), 1257 dev_err(&pdev->dev, "Error: No device match found\n");
1259 &pdev->dev); 1258 return -ENODEV;
1260 if (!match) {
1261 dev_err(&pdev->dev, "Error: No device match found\n");
1262 return -ENODEV;
1263 }
1264 cdata = match->data;
1265 } else {
1266 /* If no device tree then fallback to tegra20 */
1267 cdata = &tegra20_dma_chip_data;
1268 } 1259 }
1260 cdata = match->data;
1269 1261
1270 tdma = devm_kzalloc(&pdev->dev, sizeof(*tdma) + cdata->nr_channels * 1262 tdma = devm_kzalloc(&pdev->dev, sizeof(*tdma) + cdata->nr_channels *
1271 sizeof(struct tegra_dma_channel), GFP_KERNEL); 1263 sizeof(struct tegra_dma_channel), GFP_KERNEL);
@@ -1460,7 +1452,7 @@ static struct platform_driver tegra_dmac_driver = {
1460 .name = "tegra-apbdma", 1452 .name = "tegra-apbdma",
1461 .owner = THIS_MODULE, 1453 .owner = THIS_MODULE,
1462 .pm = &tegra_dma_dev_pm_ops, 1454 .pm = &tegra_dma_dev_pm_ops,
1463 .of_match_table = of_match_ptr(tegra_dma_of_match), 1455 .of_match_table = tegra_dma_of_match,
1464 }, 1456 },
1465 .probe = tegra_dma_probe, 1457 .probe = tegra_dma_probe,
1466 .remove = tegra_dma_remove, 1458 .remove = tegra_dma_remove,