Skip to content

Commit

Permalink
powerpc/macio: Add dma_parms support to macio
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Benjamin Herrenschmidt committed Dec 8, 2009
1 parent 7fb19ea commit 128b4a0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/powerpc/include/asm/macio.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ struct macio_dev
struct macio_bus *bus; /* macio bus this device is on */
struct macio_dev *media_bay; /* Device is part of a media bay */
struct of_device ofdev;
struct device_dma_parameters dma_parms; /* ide needs that */
int n_resources;
struct resource resource[MACIO_DEV_COUNT_RESOURCES];
int n_interrupts;
Expand Down
5 changes: 5 additions & 0 deletions drivers/macintosh/macio_asic.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,11 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip,
dev->ofdev.dev.parent = parent;
dev->ofdev.dev.bus = &macio_bus_type;
dev->ofdev.dev.release = macio_release_dev;
dev->ofdev.dev.dma_parms = &dev->dma_parms;

/* Standard DMA paremeters */
dma_set_max_seg_size(&dev->ofdev.dev, 65536);
dma_set_seg_boundary(&dev->ofdev.dev, 0xffffffff);

#ifdef CONFIG_PCI
/* Set the DMA ops to the ones from the PCI device, this could be
Expand Down

0 comments on commit 128b4a0

Please sign in to comment.