From b71df97a3ffdb2bfc286c3fa0c2b1a0aa3a6bf88 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Fri, 3 Apr 2009 10:34:02 -0300 Subject: V4L/DVB (11349): mx3-camera: adapt the clock definition and the driver to the new clock naming With the i.MX31 transition to clkdev clock names have changed, but mistakenly the "mx3-camera.0" has been registered with a non-NULL connection ID, which is not necessary, since this is the only clock, used by the capture interface driver. Fix the clock definition and the driver to use NULL as a connection ID. Signed-off-by: Guennadi Liakhovetski Acked-by: Sascha Hauer Signed-off-by: Mauro Carvalho Chehab --- arch/arm/mach-mx3/clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-mx3/clock.c b/arch/arm/mach-mx3/clock.c index ca46f4801c3..9957a11533a 100644 --- a/arch/arm/mach-mx3/clock.c +++ b/arch/arm/mach-mx3/clock.c @@ -533,7 +533,7 @@ static struct clk_lookup lookups[] __initdata = { _REGISTER_CLOCK(NULL, "kpp", kpp_clk) _REGISTER_CLOCK("fsl-usb2-udc", "usb", usb_clk1) _REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", usb_clk2) - _REGISTER_CLOCK("mx3-camera.0", "csi", csi_clk) + _REGISTER_CLOCK("mx3-camera.0", NULL, csi_clk) _REGISTER_CLOCK("imx-uart.0", NULL, uart1_clk) _REGISTER_CLOCK("imx-uart.1", NULL, uart2_clk) _REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk) -- cgit v1.2.3 From 6acc81c394393b853e731cc67f17ef277d521123 Mon Sep 17 00:00:00 2001 From: Paulius Zaleckas Date: Fri, 3 Apr 2009 10:34:05 -0300 Subject: V4L/DVB (11350): Add camera (CSI) driver for MX1 Add support for CMOS Sensor Interface on i.MX1 and i.MXL SoCs. create mode 100644 arch/arm/mach-mx1/ksym_mx1.c create mode 100644 arch/arm/mach-mx1/mx1_camera_fiq.S create mode 100644 arch/arm/plat-mxc/include/mach/mx1_camera.h create mode 100644 drivers/media/video/mx1_camera.c Signed-off-by: Paulius Zaleckas Signed-off-by: Darius Augulis Acked-by: Sascha Hauer Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab --- arch/arm/mach-mx1/Makefile | 3 +++ arch/arm/mach-mx1/devices.c | 2 +- arch/arm/mach-mx1/ksym_mx1.c | 18 +++++++++++++++ arch/arm/mach-mx1/mx1_camera_fiq.S | 35 +++++++++++++++++++++++++++++ arch/arm/plat-mxc/include/mach/memory.h | 8 +++++++ arch/arm/plat-mxc/include/mach/mx1_camera.h | 35 +++++++++++++++++++++++++++++ 6 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 arch/arm/mach-mx1/ksym_mx1.c create mode 100644 arch/arm/mach-mx1/mx1_camera_fiq.S create mode 100644 arch/arm/plat-mxc/include/mach/mx1_camera.h (limited to 'arch/arm') diff --git a/arch/arm/mach-mx1/Makefile b/arch/arm/mach-mx1/Makefile index 82f1309568e..7f86fe073ec 100644 --- a/arch/arm/mach-mx1/Makefile +++ b/arch/arm/mach-mx1/Makefile @@ -6,6 +6,9 @@ obj-y += generic.o clock.o devices.o +# Support for CMOS sensor interface +obj-$(CONFIG_MX1_VIDEO) += ksym_mx1.o mx1_camera_fiq.o + # Specific board support obj-$(CONFIG_ARCH_MX1ADS) += mx1ads.o obj-$(CONFIG_MACH_SCB9328) += scb9328.o \ No newline at end of file diff --git a/arch/arm/mach-mx1/devices.c b/arch/arm/mach-mx1/devices.c index 97f42d96d7a..76d1ffb4807 100644 --- a/arch/arm/mach-mx1/devices.c +++ b/arch/arm/mach-mx1/devices.c @@ -44,7 +44,7 @@ static struct resource imx_csi_resources[] = { static u64 imx_csi_dmamask = 0xffffffffUL; struct platform_device imx_csi_device = { - .name = "imx-csi", + .name = "mx1-camera", .id = 0, /* This is used to put cameras on this interface */ .dev = { .dma_mask = &imx_csi_dmamask, diff --git a/arch/arm/mach-mx1/ksym_mx1.c b/arch/arm/mach-mx1/ksym_mx1.c new file mode 100644 index 00000000000..b09ee12a4ff --- /dev/null +++ b/arch/arm/mach-mx1/ksym_mx1.c @@ -0,0 +1,18 @@ +/* + * Exported ksyms of ARCH_MX1 + * + * Copyright (C) 2008, Darius Augulis + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include + +#include + +/* IMX camera FIQ handler */ +EXPORT_SYMBOL(mx1_camera_sof_fiq_start); +EXPORT_SYMBOL(mx1_camera_sof_fiq_end); diff --git a/arch/arm/mach-mx1/mx1_camera_fiq.S b/arch/arm/mach-mx1/mx1_camera_fiq.S new file mode 100644 index 00000000000..9c69aa65bf1 --- /dev/null +++ b/arch/arm/mach-mx1/mx1_camera_fiq.S @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2008 Paulius Zaleckas + * + * Based on linux/arch/arm/lib/floppydma.S + * Copyright (C) 1995, 1996 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include +#include + + .text + .global mx1_camera_sof_fiq_end + .global mx1_camera_sof_fiq_start +mx1_camera_sof_fiq_start: + @ enable dma + ldr r12, [r9] + orr r12, r12, #0x00000001 + str r12, [r9] + @ unmask DMA interrupt + ldr r12, [r8] + bic r12, r12, r13 + str r12, [r8] + @ disable SOF interrupt + ldr r12, [r10] + bic r12, r12, #0x00010000 + str r12, [r10] + @ clear SOF flag + mov r12, #0x00010000 + str r12, [r11] + @ return from FIQ + subs pc, lr, #4 +mx1_camera_sof_fiq_end: diff --git a/arch/arm/plat-mxc/include/mach/memory.h b/arch/arm/plat-mxc/include/mach/memory.h index e0783e61958..eca37d09f3f 100644 --- a/arch/arm/plat-mxc/include/mach/memory.h +++ b/arch/arm/plat-mxc/include/mach/memory.h @@ -24,4 +24,12 @@ #define PHYS_OFFSET UL(0x80000000) #endif +#if defined(CONFIG_MX1_VIDEO) +/* + * Increase size of DMA-consistent memory region. + * This is required for i.MX camera driver to capture at least four VGA frames. + */ +#define CONSISTENT_DMA_SIZE SZ_4M +#endif /* CONFIG_MX1_VIDEO */ + #endif /* __ASM_ARCH_MXC_MEMORY_H__ */ diff --git a/arch/arm/plat-mxc/include/mach/mx1_camera.h b/arch/arm/plat-mxc/include/mach/mx1_camera.h new file mode 100644 index 00000000000..4fd6c70314b --- /dev/null +++ b/arch/arm/plat-mxc/include/mach/mx1_camera.h @@ -0,0 +1,35 @@ +/* + * mx1_camera.h - i.MX1/i.MXL camera driver header file + * + * Copyright (c) 2008, Paulius Zaleckas + * Copyright (C) 2009, Darius Augulis + * + * Based on PXA camera.h file: + * Copyright (C) 2003, Intel Corporation + * Copyright (C) 2008, Guennadi Liakhovetski + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __ASM_ARCH_CAMERA_H_ +#define __ASM_ARCH_CAMERA_H_ + +#define MX1_CAMERA_DATA_HIGH 1 +#define MX1_CAMERA_PCLK_RISING 2 +#define MX1_CAMERA_VSYNC_HIGH 4 + +extern unsigned char mx1_camera_sof_fiq_start, mx1_camera_sof_fiq_end; + +/** + * struct mx1_camera_pdata - i.MX1/i.MXL camera platform data + * @mclk_10khz: master clock frequency in 10kHz units + * @flags: MX1 camera platform flags + */ +struct mx1_camera_pdata { + unsigned long mclk_10khz; + unsigned long flags; +}; + +#endif /* __ASM_ARCH_CAMERA_H_ */ -- cgit v1.2.3 From aa11e38ce6fe8846fec046a95cecd5d4690c48cd Mon Sep 17 00:00:00 2001 From: Darius Augulis Date: Fri, 30 Jan 2009 10:32:28 +0200 Subject: i2c: iMX/MXC support Implementation of I2C Adapter/Algorithm Driver for I2C Bus integrated in Freescale's i.MX/MXC processors. Signed-off-by: Darius Augulis Tested-by: Sascha Hauer Reviewed-by: Wolfram Sang Signed-off-by: Ben Dooks --- arch/arm/plat-mxc/include/mach/i2c.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 arch/arm/plat-mxc/include/mach/i2c.h (limited to 'arch/arm') diff --git a/arch/arm/plat-mxc/include/mach/i2c.h b/arch/arm/plat-mxc/include/mach/i2c.h new file mode 100644 index 00000000000..4a5dc5c6d8e --- /dev/null +++ b/arch/arm/plat-mxc/include/mach/i2c.h @@ -0,0 +1,25 @@ +/* + * i2c.h - i.MX I2C driver header file + * + * Copyright (c) 2008, Darius Augulis + * + * This file is released under the GPLv2 + */ + +#ifndef __ASM_ARCH_I2C_H_ +#define __ASM_ARCH_I2C_H_ + +/** + * struct imxi2c_platform_data - structure of platform data for MXC I2C driver + * @init: Initialise gpio's and other board specific things + * @exit: Free everything initialised by @init + * @bitrate: Bus speed measured in Hz + * + **/ +struct imxi2c_platform_data { + int (*init)(struct device *dev); + void (*exit)(struct device *dev); + int bitrate; +}; + +#endif /* __ASM_ARCH_I2C_H_ */ -- cgit v1.2.3 From a192f7153bb33151f83440cd9c0442233a064bf1 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Fri, 27 Mar 2009 10:52:13 +0000 Subject: i2c-s3c2410: sda_delay should be in ns, not clock ticks The sda_delay field should be specified in ns, not in clock ticks as when using cpufreq we could be changing the bus rate. Signed-off-by: Ben Dooks --- arch/arm/plat-s3c/dev-i2c0.c | 2 +- arch/arm/plat-s3c/dev-i2c1.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/plat-s3c/dev-i2c0.c b/arch/arm/plat-s3c/dev-i2c0.c index fe327074037..8eecb466ab4 100644 --- a/arch/arm/plat-s3c/dev-i2c0.c +++ b/arch/arm/plat-s3c/dev-i2c0.c @@ -52,7 +52,7 @@ static struct s3c2410_platform_i2c default_i2c_data0 __initdata = { .slave_addr = 0x10, .bus_freq = 100*1000, .max_freq = 400*1000, - .sda_delay = S3C2410_IICLC_SDA_DELAY5 | S3C2410_IICLC_FILTER_ON, + .sda_delay = 100, }; void __init s3c_i2c0_set_platdata(struct s3c2410_platform_i2c *pd) diff --git a/arch/arm/plat-s3c/dev-i2c1.c b/arch/arm/plat-s3c/dev-i2c1.c index 2387fbf57af..4536e5bb50e 100644 --- a/arch/arm/plat-s3c/dev-i2c1.c +++ b/arch/arm/plat-s3c/dev-i2c1.c @@ -49,7 +49,7 @@ static struct s3c2410_platform_i2c default_i2c_data1 __initdata = { .slave_addr = 0x10, .bus_freq = 100*1000, .max_freq = 400*1000, - .sda_delay = S3C2410_IICLC_SDA_DELAY5 | S3C2410_IICLC_FILTER_ON, + .sda_delay = 100, }; void __init s3c_i2c1_set_platdata(struct s3c2410_platform_i2c *pd) -- cgit v1.2.3 From c564e6ae6c5aa6e3995ff87ed4a32b4788ad5109 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Fri, 13 Mar 2009 13:53:46 +0000 Subject: i2c-s3c2410: Simplify bus frequency calculation The platform data for the i2c-s3c2410 driver used to allow a min, max and desired frequency for the I2C bus. This patch reduces it to simply a desired frequency ceiling and corrects all the uses of the platform data appropriately. This means, for example, that on a system with a 66MHz fclk, a request for 100KHz will achieve 65KHz which is safe and acceptable, rather than 378KHz which it would have achieved without this change. Signed-off-by: Simtec Linux Team Signed-off-by: Daniel Silverstone [ben-linux@fluff.org: tidy subject and description] Signed-off-by: Ben Dooks --- arch/arm/mach-s3c2410/mach-bast.c | 3 +-- arch/arm/mach-s3c2410/mach-n30.c | 3 +-- arch/arm/mach-s3c2412/mach-jive.c | 3 +-- arch/arm/plat-s3c/dev-i2c0.c | 5 ++--- arch/arm/plat-s3c/dev-i2c1.c | 5 ++--- arch/arm/plat-s3c/include/plat/iic.h | 33 +++++++++++++++++++-------------- 6 files changed, 26 insertions(+), 26 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index 01bd76725b9..4389c160f7d 100644 --- a/arch/arm/mach-s3c2410/mach-bast.c +++ b/arch/arm/mach-s3c2410/mach-bast.c @@ -409,8 +409,7 @@ static struct platform_device bast_sio = { static struct s3c2410_platform_i2c __initdata bast_i2c_info = { .flags = 0, .slave_addr = 0x10, - .bus_freq = 100*1000, - .max_freq = 130*1000, + .frequency = 100*1000, }; /* Asix AX88796 10/100 ethernet controller */ diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c index 05a5e877b49..2b83f870771 100644 --- a/arch/arm/mach-s3c2410/mach-n30.c +++ b/arch/arm/mach-s3c2410/mach-n30.c @@ -340,8 +340,7 @@ static struct platform_device *n35_devices[] __initdata = { static struct s3c2410_platform_i2c n30_i2ccfg = { .flags = 0, .slave_addr = 0x10, - .bus_freq = 10*1000, - .max_freq = 10*1000, + .frequency = 10*1000, }; /* Lots of hardcoded stuff, but it sets up the hardware in a useful diff --git a/arch/arm/mach-s3c2412/mach-jive.c b/arch/arm/mach-s3c2412/mach-jive.c index 72c266aee14..332bd3263ea 100644 --- a/arch/arm/mach-s3c2412/mach-jive.c +++ b/arch/arm/mach-s3c2412/mach-jive.c @@ -453,8 +453,7 @@ static struct spi_board_info __initdata jive_spi_devs[] = { /* I2C bus and device configuration. */ static struct s3c2410_platform_i2c jive_i2c_cfg __initdata = { - .max_freq = 80 * 1000, - .bus_freq = 50 * 1000, + .frequency = 80 * 1000, .flags = S3C_IICFLG_FILTER, .sda_delay = 2, }; diff --git a/arch/arm/plat-s3c/dev-i2c0.c b/arch/arm/plat-s3c/dev-i2c0.c index 8eecb466ab4..428372868fb 100644 --- a/arch/arm/plat-s3c/dev-i2c0.c +++ b/arch/arm/plat-s3c/dev-i2c0.c @@ -1,6 +1,6 @@ /* linux/arch/arm/plat-s3c/dev-i2c0.c * - * Copyright 2008 Simtec Electronics + * Copyright 2008,2009 Simtec Electronics * Ben Dooks * http://armlinux.simtec.co.uk/ * @@ -50,8 +50,7 @@ struct platform_device s3c_device_i2c0 = { static struct s3c2410_platform_i2c default_i2c_data0 __initdata = { .flags = 0, .slave_addr = 0x10, - .bus_freq = 100*1000, - .max_freq = 400*1000, + .frequency = 100*1000, .sda_delay = 100, }; diff --git a/arch/arm/plat-s3c/dev-i2c1.c b/arch/arm/plat-s3c/dev-i2c1.c index 4536e5bb50e..8349c462788 100644 --- a/arch/arm/plat-s3c/dev-i2c1.c +++ b/arch/arm/plat-s3c/dev-i2c1.c @@ -1,6 +1,6 @@ /* linux/arch/arm/plat-s3c/dev-i2c1.c * - * Copyright 2008 Simtec Electronics + * Copyright 2008,2009 Simtec Electronics * Ben Dooks * http://armlinux.simtec.co.uk/ * @@ -47,8 +47,7 @@ static struct s3c2410_platform_i2c default_i2c_data1 __initdata = { .flags = 0, .bus_num = 1, .slave_addr = 0x10, - .bus_freq = 100*1000, - .max_freq = 400*1000, + .frequency = 100*1000, .sda_delay = 100, }; diff --git a/arch/arm/plat-s3c/include/plat/iic.h b/arch/arm/plat-s3c/include/plat/iic.h index dc1dfcb9bc6..67450f11574 100644 --- a/arch/arm/plat-s3c/include/plat/iic.h +++ b/arch/arm/plat-s3c/include/plat/iic.h @@ -1,9 +1,9 @@ -/* arch/arm/mach-s3c2410/include/mach/iic.h +/* arch/arm/plat-s3c/include/plat/iic.h * - * Copyright (c) 2004 Simtec Electronics + * Copyright 2004,2009 Simtec Electronics * Ben Dooks * - * S3C2410 - I2C Controller platfrom_device info + * S3C - I2C Controller platform_device info * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -15,19 +15,24 @@ #define S3C_IICFLG_FILTER (1<<0) /* enable s3c2440 filter */ -/* Notes: - * 1) All frequencies are expressed in Hz - * 2) A value of zero is `do not care` -*/ - +/** + * struct s3c2410_platform_i2c - Platform data for s3c I2C. + * @bus_num: The bus number to use (if possible). + * @flags: Any flags for the I2C bus (E.g. S3C_IICFLK_FILTER). + * @slave_addr: The I2C address for the slave device (if enabled). + * @frequency: The desired frequency in Hz of the bus. This is + * guaranteed to not be exceeded. If the caller does + * not care, use zero and the driver will select a + * useful default. + * @sda_delay: The delay (in ns) applied to SDA edges. + * @cfg_gpio: A callback to configure the pins for I2C operation. + */ struct s3c2410_platform_i2c { - int bus_num; /* bus number to use */ + int bus_num; unsigned int flags; - unsigned int slave_addr; /* slave address for controller */ - unsigned long bus_freq; /* standard bus frequency */ - unsigned long max_freq; /* max frequency for the bus */ - unsigned long min_freq; /* min frequency for the bus */ - unsigned int sda_delay; /* pclks (s3c2440 only) */ + unsigned int slave_addr; + unsigned long frequency; + unsigned int sda_delay; void (*cfg_gpio)(struct platform_device *dev); }; -- cgit v1.2.3 From a7bb3909b3293d503211d7f6af8ed62c1644b686 Mon Sep 17 00:00:00 2001 From: Eric Miao Date: Mon, 6 Apr 2009 19:00:54 -0700 Subject: spi: pxa2xx_spi: introduce chipselect GPIO to simplify the common cases Most SPI peripherals use GPIOs as their chip selects, introduce .gpio_cs for this. Signed-off-by: Eric Miao Cc: David Brownell Cc: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/arm/mach-pxa/include/mach/pxa2xx_spi.h | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm') diff --git a/arch/arm/mach-pxa/include/mach/pxa2xx_spi.h b/arch/arm/mach-pxa/include/mach/pxa2xx_spi.h index 2206cb61a9f..b87cecd9bbd 100644 --- a/arch/arm/mach-pxa/include/mach/pxa2xx_spi.h +++ b/arch/arm/mach-pxa/include/mach/pxa2xx_spi.h @@ -38,6 +38,7 @@ struct pxa2xx_spi_chip { u8 dma_burst_size; u32 timeout; u8 enable_loopback; + int gpio_cs; void (*cs_control)(u32 command); }; -- cgit v1.2.3 From 6a35528a8346f6e6fd32ed7e51f04d1fa4ca2c01 Mon Sep 17 00:00:00 2001 From: Yang Hongyang Date: Mon, 6 Apr 2009 19:01:13 -0700 Subject: dma-mapping: replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64) Replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64) Signed-off-by: Yang Hongyang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/arm/mach-iop13xx/setup.c | 8 ++++---- arch/arm/mach-iop13xx/tpmi.c | 10 +++++----- arch/arm/mach-kirkwood/common.c | 8 ++++---- arch/arm/mach-orion5x/common.c | 4 ++-- arch/arm/plat-iop/adma.c | 6 +++--- 5 files changed, 18 insertions(+), 18 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-iop13xx/setup.c b/arch/arm/mach-iop13xx/setup.c index cfd4d2e6dac..bee42c609df 100644 --- a/arch/arm/mach-iop13xx/setup.c +++ b/arch/arm/mach-iop13xx/setup.c @@ -307,7 +307,7 @@ static struct resource iop13xx_adma_2_resources[] = { } }; -static u64 iop13xx_adma_dmamask = DMA_64BIT_MASK; +static u64 iop13xx_adma_dmamask = DMA_BIT_MASK(64); static struct iop_adma_platform_data iop13xx_adma_0_data = { .hw_id = 0, .pool_size = PAGE_SIZE, @@ -331,7 +331,7 @@ static struct platform_device iop13xx_adma_0_channel = { .resource = iop13xx_adma_0_resources, .dev = { .dma_mask = &iop13xx_adma_dmamask, - .coherent_dma_mask = DMA_64BIT_MASK, + .coherent_dma_mask = DMA_BIT_MASK(64), .platform_data = (void *) &iop13xx_adma_0_data, }, }; @@ -343,7 +343,7 @@ static struct platform_device iop13xx_adma_1_channel = { .resource = iop13xx_adma_1_resources, .dev = { .dma_mask = &iop13xx_adma_dmamask, - .coherent_dma_mask = DMA_64BIT_MASK, + .coherent_dma_mask = DMA_BIT_MASK(64), .platform_data = (void *) &iop13xx_adma_1_data, }, }; @@ -355,7 +355,7 @@ static struct platform_device iop13xx_adma_2_channel = { .resource = iop13xx_adma_2_resources, .dev = { .dma_mask = &iop13xx_adma_dmamask, - .coherent_dma_mask = DMA_64BIT_MASK, + .coherent_dma_mask = DMA_BIT_MASK(64), .platform_data = (void *) &iop13xx_adma_2_data, }, }; diff --git a/arch/arm/mach-iop13xx/tpmi.c b/arch/arm/mach-iop13xx/tpmi.c index c6af1e1bee3..6fdad7a0425 100644 --- a/arch/arm/mach-iop13xx/tpmi.c +++ b/arch/arm/mach-iop13xx/tpmi.c @@ -151,7 +151,7 @@ static struct resource iop13xx_tpmi_3_resources[] = { } }; -u64 iop13xx_tpmi_mask = DMA_64BIT_MASK; +u64 iop13xx_tpmi_mask = DMA_BIT_MASK(64); static struct platform_device iop13xx_tpmi_0_device = { .name = "iop-tpmi", .id = 0, @@ -159,7 +159,7 @@ static struct platform_device iop13xx_tpmi_0_device = { .resource = iop13xx_tpmi_0_resources, .dev = { .dma_mask = &iop13xx_tpmi_mask, - .coherent_dma_mask = DMA_64BIT_MASK, + .coherent_dma_mask = DMA_BIT_MASK(64), }, }; @@ -170,7 +170,7 @@ static struct platform_device iop13xx_tpmi_1_device = { .resource = iop13xx_tpmi_1_resources, .dev = { .dma_mask = &iop13xx_tpmi_mask, - .coherent_dma_mask = DMA_64BIT_MASK, + .coherent_dma_mask = DMA_BIT_MASK(64), }, }; @@ -181,7 +181,7 @@ static struct platform_device iop13xx_tpmi_2_device = { .resource = iop13xx_tpmi_2_resources, .dev = { .dma_mask = &iop13xx_tpmi_mask, - .coherent_dma_mask = DMA_64BIT_MASK, + .coherent_dma_mask = DMA_BIT_MASK(64), }, }; @@ -192,7 +192,7 @@ static struct platform_device iop13xx_tpmi_3_device = { .resource = iop13xx_tpmi_3_resources, .dev = { .dma_mask = &iop13xx_tpmi_mask, - .coherent_dma_mask = DMA_64BIT_MASK, + .coherent_dma_mask = DMA_BIT_MASK(64), }, }; diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index 3d2fae84651..c691848714d 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c @@ -559,7 +559,7 @@ static struct platform_device kirkwood_xor00_channel = { .resource = kirkwood_xor00_resources, .dev = { .dma_mask = &kirkwood_xor_dmamask, - .coherent_dma_mask = DMA_64BIT_MASK, + .coherent_dma_mask = DMA_BIT_MASK(64), .platform_data = (void *)&kirkwood_xor00_data, }, }; @@ -585,7 +585,7 @@ static struct platform_device kirkwood_xor01_channel = { .resource = kirkwood_xor01_resources, .dev = { .dma_mask = &kirkwood_xor_dmamask, - .coherent_dma_mask = DMA_64BIT_MASK, + .coherent_dma_mask = DMA_BIT_MASK(64), .platform_data = (void *)&kirkwood_xor01_data, }, }; @@ -657,7 +657,7 @@ static struct platform_device kirkwood_xor10_channel = { .resource = kirkwood_xor10_resources, .dev = { .dma_mask = &kirkwood_xor_dmamask, - .coherent_dma_mask = DMA_64BIT_MASK, + .coherent_dma_mask = DMA_BIT_MASK(64), .platform_data = (void *)&kirkwood_xor10_data, }, }; @@ -683,7 +683,7 @@ static struct platform_device kirkwood_xor11_channel = { .resource = kirkwood_xor11_resources, .dev = { .dma_mask = &kirkwood_xor_dmamask, - .coherent_dma_mask = DMA_64BIT_MASK, + .coherent_dma_mask = DMA_BIT_MASK(64), .platform_data = (void *)&kirkwood_xor11_data, }, }; diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 68cc3efae56..e8d42e8cb46 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c @@ -486,7 +486,7 @@ static struct platform_device orion5x_xor0_channel = { .resource = orion5x_xor0_resources, .dev = { .dma_mask = &orion5x_xor_dmamask, - .coherent_dma_mask = DMA_64BIT_MASK, + .coherent_dma_mask = DMA_BIT_MASK(64), .platform_data = (void *)&orion5x_xor0_data, }, }; @@ -512,7 +512,7 @@ static struct platform_device orion5x_xor1_channel = { .resource = orion5x_xor1_resources, .dev = { .dma_mask = &orion5x_xor_dmamask, - .coherent_dma_mask = DMA_64BIT_MASK, + .coherent_dma_mask = DMA_BIT_MASK(64), .platform_data = (void *)&orion5x_xor1_data, }, }; diff --git a/arch/arm/plat-iop/adma.c b/arch/arm/plat-iop/adma.c index f7242082161..a2a94f6d2e7 100644 --- a/arch/arm/plat-iop/adma.c +++ b/arch/arm/plat-iop/adma.c @@ -143,7 +143,7 @@ struct platform_device iop3xx_dma_0_channel = { .resource = iop3xx_dma_0_resources, .dev = { .dma_mask = &iop3xx_adma_dmamask, - .coherent_dma_mask = DMA_64BIT_MASK, + .coherent_dma_mask = DMA_BIT_MASK(64), .platform_data = (void *) &iop3xx_dma_0_data, }, }; @@ -155,7 +155,7 @@ struct platform_device iop3xx_dma_1_channel = { .resource = iop3xx_dma_1_resources, .dev = { .dma_mask = &iop3xx_adma_dmamask, - .coherent_dma_mask = DMA_64BIT_MASK, + .coherent_dma_mask = DMA_BIT_MASK(64), .platform_data = (void *) &iop3xx_dma_1_data, }, }; @@ -167,7 +167,7 @@ struct platform_device iop3xx_aau_channel = { .resource = iop3xx_aau_resources, .dev = { .dma_mask = &iop3xx_adma_dmamask, - .coherent_dma_mask = DMA_64BIT_MASK, + .coherent_dma_mask = DMA_BIT_MASK(64), .platform_data = (void *) &iop3xx_aau_data, }, }; -- cgit v1.2.3 From 284901a90a9e0b812ca3f5f852cbbfb60d10249d Mon Sep 17 00:00:00 2001 From: Yang Hongyang Date: Mon, 6 Apr 2009 19:01:15 -0700 Subject: dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) Signed-off-by: Yang Hongyang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/arm/mach-davinci/board-evm.c | 4 ++-- arch/arm/mach-davinci/usb.c | 4 ++-- arch/arm/mach-kirkwood/common.c | 2 +- arch/arm/mach-orion5x/common.c | 2 +- arch/arm/plat-iop/adma.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-davinci/board-evm.c b/arch/arm/mach-davinci/board-evm.c index 38b6a9ce2a9..0b97a528902 100644 --- a/arch/arm/mach-davinci/board-evm.c +++ b/arch/arm/mach-davinci/board-evm.c @@ -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", @@ -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), }, }; diff --git a/arch/arm/mach-davinci/usb.c b/arch/arm/mach-davinci/usb.c index 69680784448..2429b79f6da 100644 --- a/arch/arm/mach-davinci/usb.c +++ b/arch/arm/mach-davinci/usb.c @@ -64,7 +64,7 @@ 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", @@ -72,7 +72,7 @@ static struct platform_device usb_dev = { .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), diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index c691848714d..16dc9ea0839 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c @@ -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); /***************************************************************************** diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index e8d42e8cb46..6af99ddabdf 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c @@ -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] = { diff --git a/arch/arm/plat-iop/adma.c b/arch/arm/plat-iop/adma.c index a2a94f6d2e7..3c127aabe21 100644 --- a/arch/arm/plat-iop/adma.c +++ b/arch/arm/plat-iop/adma.c @@ -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, -- cgit v1.2.3