diff options
| -rw-r--r-- | arch/arm/boot/dts/armada-370-xp.dtsi | 2 | ||||
| -rw-r--r-- | arch/arm/mach-mvebu/addr-map.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-mvebu/armada-370-xp.c | 9 | ||||
| -rw-r--r-- | drivers/dma/mv_xor.c | 18 | ||||
| -rw-r--r-- | drivers/dma/mv_xor.h | 1 |
5 files changed, 18 insertions, 14 deletions
diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi index cb09d0882c3d..cf6c48a09eac 100644 --- a/arch/arm/boot/dts/armada-370-xp.dtsi +++ b/arch/arm/boot/dts/armada-370-xp.dtsi | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | 20 | ||
| 21 | / { | 21 | / { |
| 22 | model = "Marvell Armada 370 and XP SoC"; | 22 | model = "Marvell Armada 370 and XP SoC"; |
| 23 | compatible = "marvell,armada_370_xp"; | 23 | compatible = "marvell,armada-370-xp"; |
| 24 | 24 | ||
| 25 | cpus { | 25 | cpus { |
| 26 | cpu@0 { | 26 | cpu@0 { |
diff --git a/arch/arm/mach-mvebu/addr-map.c b/arch/arm/mach-mvebu/addr-map.c index 595f6b722a8f..ab9b3bd4fef5 100644 --- a/arch/arm/mach-mvebu/addr-map.c +++ b/arch/arm/mach-mvebu/addr-map.c | |||
| @@ -78,7 +78,7 @@ armada_cfg_base(const struct orion_addr_map_cfg *cfg, int win) | |||
| 78 | if (win < 8) | 78 | if (win < 8) |
| 79 | offset = (win << 4); | 79 | offset = (win << 4); |
| 80 | else | 80 | else |
| 81 | offset = ARMADA_WINDOW_8_PLUS_OFFSET + (win << 3); | 81 | offset = ARMADA_WINDOW_8_PLUS_OFFSET + ((win - 8) << 3); |
| 82 | 82 | ||
| 83 | return cfg->bridge_virt_base + offset; | 83 | return cfg->bridge_virt_base + offset; |
| 84 | } | 84 | } |
diff --git a/arch/arm/mach-mvebu/armada-370-xp.c b/arch/arm/mach-mvebu/armada-370-xp.c index a9cf335c7cb0..7434b5e36197 100644 --- a/arch/arm/mach-mvebu/armada-370-xp.c +++ b/arch/arm/mach-mvebu/armada-370-xp.c | |||
| @@ -66,13 +66,12 @@ static void __init armada_370_xp_dt_init(void) | |||
| 66 | coherency_init(); | 66 | coherency_init(); |
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | static const char * const armada_370_xp_dt_board_dt_compat[] = { | 69 | static const char * const armada_370_xp_dt_compat[] = { |
| 70 | "marvell,a370-db", | 70 | "marvell,armada-370-xp", |
| 71 | "marvell,axp-db", | ||
| 72 | NULL, | 71 | NULL, |
| 73 | }; | 72 | }; |
| 74 | 73 | ||
| 75 | DT_MACHINE_START(ARMADA_XP_DT, "Marvell Aramada 370/XP (Device Tree)") | 74 | DT_MACHINE_START(ARMADA_XP_DT, "Marvell Armada 370/XP (Device Tree)") |
| 76 | .smp = smp_ops(armada_xp_smp_ops), | 75 | .smp = smp_ops(armada_xp_smp_ops), |
| 77 | .init_machine = armada_370_xp_dt_init, | 76 | .init_machine = armada_370_xp_dt_init, |
| 78 | .map_io = armada_370_xp_map_io, | 77 | .map_io = armada_370_xp_map_io, |
| @@ -81,5 +80,5 @@ DT_MACHINE_START(ARMADA_XP_DT, "Marvell Aramada 370/XP (Device Tree)") | |||
| 81 | .handle_irq = armada_370_xp_handle_irq, | 80 | .handle_irq = armada_370_xp_handle_irq, |
| 82 | .timer = &armada_370_xp_timer, | 81 | .timer = &armada_370_xp_timer, |
| 83 | .restart = mvebu_restart, | 82 | .restart = mvebu_restart, |
| 84 | .dt_compat = armada_370_xp_dt_board_dt_compat, | 83 | .dt_compat = armada_370_xp_dt_compat, |
| 85 | MACHINE_END | 84 | MACHINE_END |
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c index f450fe8cbd61..9659e58fc8b2 100644 --- a/drivers/dma/mv_xor.c +++ b/drivers/dma/mv_xor.c | |||
| @@ -1162,9 +1162,8 @@ mv_xor_channel_add(struct mv_xor_device *xordev, | |||
| 1162 | /* clear errors before enabling interrupts */ | 1162 | /* clear errors before enabling interrupts */ |
| 1163 | mv_xor_device_clear_err_status(mv_chan); | 1163 | mv_xor_device_clear_err_status(mv_chan); |
| 1164 | 1164 | ||
| 1165 | ret = devm_request_irq(&pdev->dev, mv_chan->irq, | 1165 | ret = request_irq(mv_chan->irq, mv_xor_interrupt_handler, |
| 1166 | mv_xor_interrupt_handler, | 1166 | 0, dev_name(&pdev->dev), mv_chan); |
| 1167 | 0, dev_name(&pdev->dev), mv_chan); | ||
| 1168 | if (ret) | 1167 | if (ret) |
| 1169 | goto err_free_dma; | 1168 | goto err_free_dma; |
| 1170 | 1169 | ||
| @@ -1185,14 +1184,14 @@ mv_xor_channel_add(struct mv_xor_device *xordev, | |||
| 1185 | ret = mv_xor_memcpy_self_test(mv_chan); | 1184 | ret = mv_xor_memcpy_self_test(mv_chan); |
| 1186 | dev_dbg(&pdev->dev, "memcpy self test returned %d\n", ret); | 1185 | dev_dbg(&pdev->dev, "memcpy self test returned %d\n", ret); |
| 1187 | if (ret) | 1186 | if (ret) |
| 1188 | goto err_free_dma; | 1187 | goto err_free_irq; |
| 1189 | } | 1188 | } |
| 1190 | 1189 | ||
| 1191 | if (dma_has_cap(DMA_XOR, dma_dev->cap_mask)) { | 1190 | if (dma_has_cap(DMA_XOR, dma_dev->cap_mask)) { |
| 1192 | ret = mv_xor_xor_self_test(mv_chan); | 1191 | ret = mv_xor_xor_self_test(mv_chan); |
| 1193 | dev_dbg(&pdev->dev, "xor self test returned %d\n", ret); | 1192 | dev_dbg(&pdev->dev, "xor self test returned %d\n", ret); |
| 1194 | if (ret) | 1193 | if (ret) |
| 1195 | goto err_free_dma; | 1194 | goto err_free_irq; |
| 1196 | } | 1195 | } |
| 1197 | 1196 | ||
| 1198 | dev_info(&pdev->dev, "Marvell XOR: " | 1197 | dev_info(&pdev->dev, "Marvell XOR: " |
| @@ -1205,6 +1204,8 @@ mv_xor_channel_add(struct mv_xor_device *xordev, | |||
| 1205 | dma_async_device_register(dma_dev); | 1204 | dma_async_device_register(dma_dev); |
| 1206 | return mv_chan; | 1205 | return mv_chan; |
| 1207 | 1206 | ||
| 1207 | err_free_irq: | ||
| 1208 | free_irq(mv_chan->irq, mv_chan); | ||
| 1208 | err_free_dma: | 1209 | err_free_dma: |
| 1209 | dma_free_coherent(&pdev->dev, MV_XOR_POOL_SIZE, | 1210 | dma_free_coherent(&pdev->dev, MV_XOR_POOL_SIZE, |
| 1210 | mv_chan->dma_desc_pool_virt, mv_chan->dma_desc_pool); | 1211 | mv_chan->dma_desc_pool_virt, mv_chan->dma_desc_pool); |
| @@ -1240,6 +1241,8 @@ mv_xor_conf_mbus_windows(struct mv_xor_device *xordev, | |||
| 1240 | 1241 | ||
| 1241 | writel(win_enable, base + WINDOW_BAR_ENABLE(0)); | 1242 | writel(win_enable, base + WINDOW_BAR_ENABLE(0)); |
| 1242 | writel(win_enable, base + WINDOW_BAR_ENABLE(1)); | 1243 | writel(win_enable, base + WINDOW_BAR_ENABLE(1)); |
| 1244 | writel(0, base + WINDOW_OVERRIDE_CTRL(0)); | ||
| 1245 | writel(0, base + WINDOW_OVERRIDE_CTRL(1)); | ||
| 1243 | } | 1246 | } |
| 1244 | 1247 | ||
| 1245 | static int __devinit mv_xor_probe(struct platform_device *pdev) | 1248 | static int __devinit mv_xor_probe(struct platform_device *pdev) |
| @@ -1309,8 +1312,8 @@ static int __devinit mv_xor_probe(struct platform_device *pdev) | |||
| 1309 | dma_cap_set(DMA_INTERRUPT, cap_mask); | 1312 | dma_cap_set(DMA_INTERRUPT, cap_mask); |
| 1310 | 1313 | ||
| 1311 | irq = irq_of_parse_and_map(np, 0); | 1314 | irq = irq_of_parse_and_map(np, 0); |
| 1312 | if (irq < 0) { | 1315 | if (!irq) { |
| 1313 | ret = irq; | 1316 | ret = -ENODEV; |
| 1314 | goto err_channel_add; | 1317 | goto err_channel_add; |
| 1315 | } | 1318 | } |
| 1316 | 1319 | ||
| @@ -1319,6 +1322,7 @@ static int __devinit mv_xor_probe(struct platform_device *pdev) | |||
| 1319 | cap_mask, irq); | 1322 | cap_mask, irq); |
| 1320 | if (IS_ERR(xordev->channels[i])) { | 1323 | if (IS_ERR(xordev->channels[i])) { |
| 1321 | ret = PTR_ERR(xordev->channels[i]); | 1324 | ret = PTR_ERR(xordev->channels[i]); |
| 1325 | xordev->channels[i] = NULL; | ||
| 1322 | irq_dispose_mapping(irq); | 1326 | irq_dispose_mapping(irq); |
| 1323 | goto err_channel_add; | 1327 | goto err_channel_add; |
| 1324 | } | 1328 | } |
diff --git a/drivers/dma/mv_xor.h b/drivers/dma/mv_xor.h index 17043287b71a..c632a4761fcf 100644 --- a/drivers/dma/mv_xor.h +++ b/drivers/dma/mv_xor.h | |||
| @@ -53,6 +53,7 @@ | |||
| 53 | #define WINDOW_SIZE(w) (0x270 + ((w) << 2)) | 53 | #define WINDOW_SIZE(w) (0x270 + ((w) << 2)) |
| 54 | #define WINDOW_REMAP_HIGH(w) (0x290 + ((w) << 2)) | 54 | #define WINDOW_REMAP_HIGH(w) (0x290 + ((w) << 2)) |
| 55 | #define WINDOW_BAR_ENABLE(chan) (0x240 + ((chan) << 2)) | 55 | #define WINDOW_BAR_ENABLE(chan) (0x240 + ((chan) << 2)) |
| 56 | #define WINDOW_OVERRIDE_CTRL(chan) (0x2A0 + ((chan) << 2)) | ||
| 56 | 57 | ||
| 57 | struct mv_xor_device { | 58 | struct mv_xor_device { |
| 58 | void __iomem *xor_base; | 59 | void __iomem *xor_base; |
