summaryrefslogtreecommitdiff
path: root/drivers/zorro/zorro.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-04-03 05:23:05 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2018-04-03 05:23:05 +0300
commit17e3cd222af1c72a750cd83565bb8dfc7bc12335 (patch)
treed8a2f8fb2d0d348dc354be7cfb8cc9d83b6a5878 /drivers/zorro/zorro.c
parentbc16d4052f1ae99996f3475b5a73d29c86e7ba81 (diff)
parentecd685580c8feb9a91c758257a66355a673594d9 (diff)
downloadlinux-17e3cd222af1c72a750cd83565bb8dfc7bc12335.tar.xz
Merge tag 'm68k-for-v4.17-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
Pull m68k updates from Geert Uytterhoeven: - Macintosh enhancements and fixes - Remove useless memory layout printing using hashed pointers - Add missing Amiga Zorro bus DMA mask - Small fixes and cleanups - Defconfig updates * tag 'm68k-for-v4.17-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k/mac: Remove bogus "FIXME" comment m68k/mac: Enable RTC for 100-series PowerBooks m68k/mac: Clean up whitespace and remove redundant parentheses m68k/defconfig: Update defconfigs for v4.16-rc5 zorro: Set up z->dev.dma_mask for the DMA API m68k/time: Stop validating rtc_time in .read_time m68k/mm: Stop printing the virtual memory layout macintosh/via-pmu68k: Initialize PMU driver with setup_arch and arch_initcall m68k/mac: Fix apparent race condition in Baboon interrupt dispatch m68k/mac: Enable PDMA support for PowerBook 190
Diffstat (limited to 'drivers/zorro/zorro.c')
-rw-r--r--drivers/zorro/zorro.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/zorro/zorro.c b/drivers/zorro/zorro.c
index cc1b1ac57d61..47728477297e 100644
--- a/drivers/zorro/zorro.c
+++ b/drivers/zorro/zorro.c
@@ -16,6 +16,7 @@
#include <linux/bitops.h>
#include <linux/string.h>
#include <linux/platform_device.h>
+#include <linux/dma-mapping.h>
#include <linux/slab.h>
#include <asm/byteorder.h>
@@ -185,6 +186,17 @@ static int __init amiga_zorro_probe(struct platform_device *pdev)
z->dev.parent = &bus->dev;
z->dev.bus = &zorro_bus_type;
z->dev.id = i;
+ switch (z->rom.er_Type & ERT_TYPEMASK) {
+ case ERT_ZORROIII:
+ z->dev.coherent_dma_mask = DMA_BIT_MASK(32);
+ break;
+
+ case ERT_ZORROII:
+ default:
+ z->dev.coherent_dma_mask = DMA_BIT_MASK(24);
+ break;
+ }
+ z->dev.dma_mask = &z->dev.coherent_dma_mask;
}
/* ... then register them */