Skip to content

Commit

Permalink
dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)
Browse files Browse the repository at this point in the history
Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)

Signed-off-by: Yang Hongyang<[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
macrosheep authored and torvalds committed Apr 7, 2009
1 parent 6afd142 commit 284901a
Show file tree
Hide file tree
Showing 173 changed files with 309 additions and 313 deletions.
4 changes: 2 additions & 2 deletions arch/arm/mach-davinci/board-evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static struct resource ide_resources[] = {
},
};

static u64 ide_dma_mask = DMA_32BIT_MASK;
static u64 ide_dma_mask = DMA_BIT_MASK(32);

static struct platform_device ide_dev = {
.name = "palm_bk3710",
Expand All @@ -127,7 +127,7 @@ static struct platform_device ide_dev = {
.num_resources = ARRAY_SIZE(ide_resources),
.dev = {
.dma_mask = &ide_dma_mask,
.coherent_dma_mask = DMA_32BIT_MASK,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
};

Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-davinci/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ static struct resource usb_resources[] = {
},
};

static u64 usb_dmamask = DMA_32BIT_MASK;
static u64 usb_dmamask = DMA_BIT_MASK(32);

static struct platform_device usb_dev = {
.name = "musb_hdrc",
.id = -1,
.dev = {
.platform_data = &usb_data,
.dma_mask = &usb_dmamask,
.coherent_dma_mask = DMA_32BIT_MASK,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
.resource = usb_resources,
.num_resources = ARRAY_SIZE(usb_resources),
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-kirkwood/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ static struct mv_xor_platform_shared_data kirkwood_xor_shared_data = {
.dram = &kirkwood_mbus_dram_info,
};

static u64 kirkwood_xor_dmamask = DMA_32BIT_MASK;
static u64 kirkwood_xor_dmamask = DMA_BIT_MASK(32);


/*****************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-orion5x/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ static struct platform_device orion5x_xor_shared = {
.resource = orion5x_xor_shared_resources,
};

static u64 orion5x_xor_dmamask = DMA_32BIT_MASK;
static u64 orion5x_xor_dmamask = DMA_BIT_MASK(32);

static struct resource orion5x_xor0_resources[] = {
[0] = {
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/plat-iop/adma.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ static struct resource iop3xx_aau_resources[] = {
}
};

static u64 iop3xx_adma_dmamask = DMA_32BIT_MASK;
static u64 iop3xx_adma_dmamask = DMA_BIT_MASK(32);

static struct iop_adma_platform_data iop3xx_dma_0_data = {
.hw_id = DMA0_ID,
Expand Down
4 changes: 2 additions & 2 deletions arch/avr32/boards/hammerhead/flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,13 +280,13 @@ static struct resource hh_fpga0_resource[] = {
},
};

static u64 hh_fpga0_dma_mask = DMA_32BIT_MASK;
static u64 hh_fpga0_dma_mask = DMA_BIT_MASK(32);
static struct platform_device hh_fpga0_device = {
.name = "hh_fpga",
.id = 0,
.dev = {
.dma_mask = &hh_fpga0_dma_mask,
.coherent_dma_mask = DMA_32BIT_MASK,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
.resource = hh_fpga0_resource,
.num_resources = ARRAY_SIZE(hh_fpga0_resource),
Expand Down
8 changes: 4 additions & 4 deletions arch/avr32/mach-at32ap/at32ap700x.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,26 +60,26 @@
* don't ... tc, smc, pio, rtc, watchdog, pwm, ps2, and more.
*/
#define DEFINE_DEV(_name, _id) \
static u64 _name##_id##_dma_mask = DMA_32BIT_MASK; \
static u64 _name##_id##_dma_mask = DMA_BIT_MASK(32); \
static struct platform_device _name##_id##_device = { \
.name = #_name, \
.id = _id, \
.dev = { \
.dma_mask = &_name##_id##_dma_mask, \
.coherent_dma_mask = DMA_32BIT_MASK, \
.coherent_dma_mask = DMA_BIT_MASK(32), \
}, \
.resource = _name##_id##_resource, \
.num_resources = ARRAY_SIZE(_name##_id##_resource), \
}
#define DEFINE_DEV_DATA(_name, _id) \
static u64 _name##_id##_dma_mask = DMA_32BIT_MASK; \
static u64 _name##_id##_dma_mask = DMA_BIT_MASK(32); \
static struct platform_device _name##_id##_device = { \
.name = #_name, \
.id = _id, \
.dev = { \
.dma_mask = &_name##_id##_dma_mask, \
.platform_data = &_name##_id##_data, \
.coherent_dma_mask = DMA_32BIT_MASK, \
.coherent_dma_mask = DMA_BIT_MASK(32), \
}, \
.resource = _name##_id##_resource, \
.num_resources = ARRAY_SIZE(_name##_id##_resource), \
Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/kernel/pci-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ int force_iommu __read_mostly;
to i386. */
struct device fallback_dev = {
.init_name = "fallback device",
.coherent_dma_mask = DMA_32BIT_MASK,
.coherent_dma_mask = DMA_BIT_MASK(32),
.dma_mask = &fallback_dev.coherent_dma_mask,
};

Expand Down
30 changes: 15 additions & 15 deletions arch/mips/alchemy/common/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ static struct resource au1xxx_usb_ohci_resources[] = {
};

/* The dmamask must be set for OHCI to work */
static u64 ohci_dmamask = DMA_32BIT_MASK;
static u64 ohci_dmamask = DMA_BIT_MASK(32);

static struct platform_device au1xxx_usb_ohci_device = {
.name = "au1xxx-ohci",
.id = 0,
.dev = {
.dma_mask = &ohci_dmamask,
.coherent_dma_mask = DMA_32BIT_MASK,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
.num_resources = ARRAY_SIZE(au1xxx_usb_ohci_resources),
.resource = au1xxx_usb_ohci_resources,
Expand All @@ -109,14 +109,14 @@ static struct resource au1100_lcd_resources[] = {
}
};

static u64 au1100_lcd_dmamask = DMA_32BIT_MASK;
static u64 au1100_lcd_dmamask = DMA_BIT_MASK(32);

static struct platform_device au1100_lcd_device = {
.name = "au1100-lcd",
.id = 0,
.dev = {
.dma_mask = &au1100_lcd_dmamask,
.coherent_dma_mask = DMA_32BIT_MASK,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
.num_resources = ARRAY_SIZE(au1100_lcd_resources),
.resource = au1100_lcd_resources,
Expand All @@ -138,14 +138,14 @@ static struct resource au1xxx_usb_ehci_resources[] = {
},
};

static u64 ehci_dmamask = DMA_32BIT_MASK;
static u64 ehci_dmamask = DMA_BIT_MASK(32);

static struct platform_device au1xxx_usb_ehci_device = {
.name = "au1xxx-ehci",
.id = 0,
.dev = {
.dma_mask = &ehci_dmamask,
.coherent_dma_mask = DMA_32BIT_MASK,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
.num_resources = ARRAY_SIZE(au1xxx_usb_ehci_resources),
.resource = au1xxx_usb_ehci_resources,
Expand All @@ -165,14 +165,14 @@ static struct resource au1xxx_usb_gdt_resources[] = {
},
};

static u64 udc_dmamask = DMA_32BIT_MASK;
static u64 udc_dmamask = DMA_BIT_MASK(32);

static struct platform_device au1xxx_usb_gdt_device = {
.name = "au1xxx-udc",
.id = 0,
.dev = {
.dma_mask = &udc_dmamask,
.coherent_dma_mask = DMA_32BIT_MASK,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
.num_resources = ARRAY_SIZE(au1xxx_usb_gdt_resources),
.resource = au1xxx_usb_gdt_resources,
Expand All @@ -192,14 +192,14 @@ static struct resource au1xxx_usb_otg_resources[] = {
},
};

static u64 uoc_dmamask = DMA_32BIT_MASK;
static u64 uoc_dmamask = DMA_BIT_MASK(32);

static struct platform_device au1xxx_usb_otg_device = {
.name = "au1xxx-uoc",
.id = 0,
.dev = {
.dma_mask = &uoc_dmamask,
.coherent_dma_mask = DMA_32BIT_MASK,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
.num_resources = ARRAY_SIZE(au1xxx_usb_otg_resources),
.resource = au1xxx_usb_otg_resources,
Expand All @@ -218,20 +218,20 @@ static struct resource au1200_lcd_resources[] = {
}
};

static u64 au1200_lcd_dmamask = DMA_32BIT_MASK;
static u64 au1200_lcd_dmamask = DMA_BIT_MASK(32);

static struct platform_device au1200_lcd_device = {
.name = "au1200-lcd",
.id = 0,
.dev = {
.dma_mask = &au1200_lcd_dmamask,
.coherent_dma_mask = DMA_32BIT_MASK,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
.num_resources = ARRAY_SIZE(au1200_lcd_resources),
.resource = au1200_lcd_resources,
};

static u64 au1xxx_mmc_dmamask = DMA_32BIT_MASK;
static u64 au1xxx_mmc_dmamask = DMA_BIT_MASK(32);

extern struct au1xmmc_platform_data au1xmmc_platdata[2];

Expand Down Expand Up @@ -263,7 +263,7 @@ static struct platform_device au1200_mmc0_device = {
.id = 0,
.dev = {
.dma_mask = &au1xxx_mmc_dmamask,
.coherent_dma_mask = DMA_32BIT_MASK,
.coherent_dma_mask = DMA_BIT_MASK(32),
.platform_data = &au1xmmc_platdata[0],
},
.num_resources = ARRAY_SIZE(au1200_mmc0_resources),
Expand Down Expand Up @@ -299,7 +299,7 @@ static struct platform_device au1200_mmc1_device = {
.id = 1,
.dev = {
.dma_mask = &au1xxx_mmc_dmamask,
.coherent_dma_mask = DMA_32BIT_MASK,
.coherent_dma_mask = DMA_BIT_MASK(32),
.platform_data = &au1xmmc_platdata[1],
},
.num_resources = ARRAY_SIZE(au1200_mmc1_resources),
Expand Down
4 changes: 2 additions & 2 deletions arch/mips/alchemy/devboards/pb1200/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,14 @@ static struct resource ide_resources[] = {
}
};

static u64 ide_dmamask = DMA_32BIT_MASK;
static u64 ide_dmamask = DMA_BIT_MASK(32);

static struct platform_device ide_device = {
.name = "au1200-ide",
.id = 0,
.dev = {
.dma_mask = &ide_dmamask,
.coherent_dma_mask = DMA_32BIT_MASK,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
.num_resources = ARRAY_SIZE(ide_resources),
.resource = ide_resources
Expand Down
12 changes: 6 additions & 6 deletions arch/mips/nxp/pnx833x/common/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include <irq-mapping.h>
#include <pnx833x.h>

static u64 uart_dmamask = DMA_32BIT_MASK;
static u64 uart_dmamask = DMA_BIT_MASK(32);

static struct resource pnx833x_uart_resources[] = {
[0] = {
Expand Down Expand Up @@ -101,14 +101,14 @@ static struct platform_device pnx833x_uart_device = {
.id = -1,
.dev = {
.dma_mask = &uart_dmamask,
.coherent_dma_mask = DMA_32BIT_MASK,
.coherent_dma_mask = DMA_BIT_MASK(32),
.platform_data = pnx8xxx_ports,
},
.num_resources = ARRAY_SIZE(pnx833x_uart_resources),
.resource = pnx833x_uart_resources,
};

static u64 ehci_dmamask = DMA_32BIT_MASK;
static u64 ehci_dmamask = DMA_BIT_MASK(32);

static struct resource pnx833x_usb_ehci_resources[] = {
[0] = {
Expand All @@ -128,7 +128,7 @@ static struct platform_device pnx833x_usb_ehci_device = {
.id = -1,
.dev = {
.dma_mask = &ehci_dmamask,
.coherent_dma_mask = DMA_32BIT_MASK,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
.num_resources = ARRAY_SIZE(pnx833x_usb_ehci_resources),
.resource = pnx833x_usb_ehci_resources,
Expand Down Expand Up @@ -198,7 +198,7 @@ static struct platform_device pnx833x_i2c1_device = {
};
#endif

static u64 ethernet_dmamask = DMA_32BIT_MASK;
static u64 ethernet_dmamask = DMA_BIT_MASK(32);

static struct resource pnx833x_ethernet_resources[] = {
[0] = {
Expand All @@ -218,7 +218,7 @@ static struct platform_device pnx833x_ethernet_device = {
.id = -1,
.dev = {
.dma_mask = &ethernet_dmamask,
.coherent_dma_mask = DMA_32BIT_MASK,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
.num_resources = ARRAY_SIZE(pnx833x_ethernet_resources),
.resource = pnx833x_ethernet_resources,
Expand Down
8 changes: 4 additions & 4 deletions arch/mips/nxp/pnx8550/common/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,16 @@ struct pnx8xxx_port pnx8xxx_ports[] = {
};

/* The dmamask must be set for OHCI to work */
static u64 ohci_dmamask = DMA_32BIT_MASK;
static u64 ohci_dmamask = DMA_BIT_MASK(32);

static u64 uart_dmamask = DMA_32BIT_MASK;
static u64 uart_dmamask = DMA_BIT_MASK(32);

static struct platform_device pnx8550_usb_ohci_device = {
.name = "pnx8550-ohci",
.id = -1,
.dev = {
.dma_mask = &ohci_dmamask,
.coherent_dma_mask = DMA_32BIT_MASK,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
.num_resources = ARRAY_SIZE(pnx8550_usb_ohci_resources),
.resource = pnx8550_usb_ohci_resources,
Expand All @@ -112,7 +112,7 @@ static struct platform_device pnx8550_uart_device = {
.id = -1,
.dev = {
.dma_mask = &uart_dmamask,
.coherent_dma_mask = DMA_32BIT_MASK,
.coherent_dma_mask = DMA_BIT_MASK(32),
.platform_data = pnx8xxx_ports,
},
.num_resources = ARRAY_SIZE(pnx8550_uart_resources),
Expand Down
8 changes: 4 additions & 4 deletions arch/mips/pmc-sierra/msp71xx/msp_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ static struct resource msp_usbhost_resources [] = {
},
};

static u64 msp_usbhost_dma_mask = DMA_32BIT_MASK;
static u64 msp_usbhost_dma_mask = DMA_BIT_MASK(32);

static struct platform_device msp_usbhost_device = {
.name = "pmcmsp-ehci",
.id = 0,
.dev = {
.dma_mask = &msp_usbhost_dma_mask,
.coherent_dma_mask = DMA_32BIT_MASK,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
.num_resources = ARRAY_SIZE(msp_usbhost_resources),
.resource = msp_usbhost_resources,
Expand All @@ -77,14 +77,14 @@ static struct resource msp_usbdev_resources [] = {
},
};

static u64 msp_usbdev_dma_mask = DMA_32BIT_MASK;
static u64 msp_usbdev_dma_mask = DMA_BIT_MASK(32);

static struct platform_device msp_usbdev_device = {
.name = "msp71xx_udc",
.id = 0,
.dev = {
.dma_mask = &msp_usbdev_dma_mask,
.coherent_dma_mask = DMA_32BIT_MASK,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
.num_resources = ARRAY_SIZE(msp_usbdev_resources),
.resource = msp_usbdev_resources,
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ static int dma_direct_dma_supported(struct device *dev, u64 mask)
* done via some global so platforms can set the limit in case
* they have limited DMA windows
*/
return mask >= DMA_32BIT_MASK;
return mask >= DMA_BIT_MASK(32);
#else
return 1;
#endif
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/of_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ struct of_device* of_platform_device_create(struct device_node *np,
return NULL;

dev->dma_mask = 0xffffffffUL;
dev->dev.coherent_dma_mask = DMA_32BIT_MASK;
dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);

dev->dev.bus = &of_platform_bus_type;

Expand Down
Loading

0 comments on commit 284901a

Please sign in to comment.