aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-12-01 09:36:27 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-12-08 00:02:52 -0500
commit128b4a0ef74e8d48033513e41a413087ba30e36b (patch)
tree9fe76b544808404892dbe1c8259a02a3cbf9e422
parent7fb19ea054a0cdf1a4d935e68d51bde4d3725414 (diff)
powerpc/macio: Add dma_parms support to macio
This adds dma_parms to macio devices and initializes them with default values. This will allow pata_macio to setup the appropriate max segment size for the block layer. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r--arch/powerpc/include/asm/macio.h1
-rw-r--r--drivers/macintosh/macio_asic.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/macio.h b/arch/powerpc/include/asm/macio.h
index 2b7b39294a6a..86d5fed1c49f 100644
--- a/arch/powerpc/include/asm/macio.h
+++ b/arch/powerpc/include/asm/macio.h
@@ -39,6 +39,7 @@ struct macio_dev
39 struct macio_bus *bus; /* macio bus this device is on */ 39 struct macio_bus *bus; /* macio bus this device is on */
40 struct macio_dev *media_bay; /* Device is part of a media bay */ 40 struct macio_dev *media_bay; /* Device is part of a media bay */
41 struct of_device ofdev; 41 struct of_device ofdev;
42 struct device_dma_parameters dma_parms; /* ide needs that */
42 int n_resources; 43 int n_resources;
43 struct resource resource[MACIO_DEV_COUNT_RESOURCES]; 44 struct resource resource[MACIO_DEV_COUNT_RESOURCES];
44 int n_interrupts; 45 int n_interrupts;
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c
index 5200acfc9d38..26a303a1d1ab 100644
--- a/drivers/macintosh/macio_asic.c
+++ b/drivers/macintosh/macio_asic.c
@@ -379,6 +379,11 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip,
379 dev->ofdev.dev.parent = parent; 379 dev->ofdev.dev.parent = parent;
380 dev->ofdev.dev.bus = &macio_bus_type; 380 dev->ofdev.dev.bus = &macio_bus_type;
381 dev->ofdev.dev.release = macio_release_dev; 381 dev->ofdev.dev.release = macio_release_dev;
382 dev->ofdev.dev.dma_parms = &dev->dma_parms;
383
384 /* Standard DMA paremeters */
385 dma_set_max_seg_size(&dev->ofdev.dev, 65536);
386 dma_set_seg_boundary(&dev->ofdev.dev, 0xffffffff);
382 387
383#ifdef CONFIG_PCI 388#ifdef CONFIG_PCI
384 /* Set the DMA ops to the ones from the PCI device, this could be 389 /* Set the DMA ops to the ones from the PCI device, this could be