Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3eb352c7 authored by Martin Fuzzey's avatar Martin Fuzzey Committed by Greg Kroah-Hartman
Browse files

USB: MXC: use DMA_BIT_MASK macro rather than hardcoded constants.



Also fixes tab/space issue causing checkpatch to complain.

Signed-off-by: default avatarMartin Fuzzey <mfuzzey@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 23d3e7a6
Loading
Loading
Loading
Loading
+27 −26
Original line number Original line Diff line number Diff line
@@ -31,6 +31,7 @@
#include <linux/init.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/platform_device.h>
#include <linux/gpio.h>
#include <linux/gpio.h>
#include <linux/dma-mapping.h>


#include <mach/irqs.h>
#include <mach/irqs.h>
#include <mach/hardware.h>
#include <mach/hardware.h>
@@ -292,7 +293,7 @@ struct platform_device mxc_fb_device = {
	.num_resources = ARRAY_SIZE(mxc_fb),
	.num_resources = ARRAY_SIZE(mxc_fb),
	.resource = mxc_fb,
	.resource = mxc_fb,
	.dev = {
	.dev = {
		.coherent_dma_mask = 0xFFFFFFFF,
		.coherent_dma_mask = DMA_BIT_MASK(32),
	},
	},
};
};


@@ -395,14 +396,14 @@ static struct resource mxc_sdhc1_resources[] = {
	},
	},
};
};


static u64 mxc_sdhc1_dmamask = 0xffffffffUL;
static u64 mxc_sdhc1_dmamask = DMA_BIT_MASK(32);


struct platform_device mxc_sdhc_device0 = {
struct platform_device mxc_sdhc_device0 = {
	.name           = "mxc-mmc",
	.name           = "mxc-mmc",
	.id             = 0,
	.id             = 0,
	.dev            = {
	.dev            = {
		.dma_mask = &mxc_sdhc1_dmamask,
		.dma_mask = &mxc_sdhc1_dmamask,
               .coherent_dma_mask = 0xffffffff,
		.coherent_dma_mask = DMA_BIT_MASK(32),
	},
	},
	.num_resources  = ARRAY_SIZE(mxc_sdhc1_resources),
	.num_resources  = ARRAY_SIZE(mxc_sdhc1_resources),
	.resource       = mxc_sdhc1_resources,
	.resource       = mxc_sdhc1_resources,
@@ -424,14 +425,14 @@ static struct resource mxc_sdhc2_resources[] = {
	},
	},
};
};


static u64 mxc_sdhc2_dmamask = 0xffffffffUL;
static u64 mxc_sdhc2_dmamask = DMA_BIT_MASK(32);


struct platform_device mxc_sdhc_device1 = {
struct platform_device mxc_sdhc_device1 = {
	.name           = "mxc-mmc",
	.name           = "mxc-mmc",
	.id             = 1,
	.id             = 1,
	.dev            = {
	.dev            = {
		.dma_mask = &mxc_sdhc2_dmamask,
		.dma_mask = &mxc_sdhc2_dmamask,
               .coherent_dma_mask = 0xffffffff,
		.coherent_dma_mask = DMA_BIT_MASK(32),
	},
	},
	.num_resources  = ARRAY_SIZE(mxc_sdhc2_resources),
	.num_resources  = ARRAY_SIZE(mxc_sdhc2_resources),
	.resource       = mxc_sdhc2_resources,
	.resource       = mxc_sdhc2_resources,
@@ -450,7 +451,7 @@ static struct resource otg_resources[] = {
	},
	},
};
};


static u64 otg_dmamask = 0xffffffffUL;
static u64 otg_dmamask = DMA_BIT_MASK(32);


/* OTG gadget device */
/* OTG gadget device */
struct platform_device mxc_otg_udc_device = {
struct platform_device mxc_otg_udc_device = {
@@ -458,7 +459,7 @@ struct platform_device mxc_otg_udc_device = {
	.id		= -1,
	.id		= -1,
	.dev		= {
	.dev		= {
		.dma_mask		= &otg_dmamask,
		.dma_mask		= &otg_dmamask,
		.coherent_dma_mask	= 0xffffffffUL,
		.coherent_dma_mask	= DMA_BIT_MASK(32),
	},
	},
	.resource	= otg_resources,
	.resource	= otg_resources,
	.num_resources	= ARRAY_SIZE(otg_resources),
	.num_resources	= ARRAY_SIZE(otg_resources),
@@ -469,7 +470,7 @@ struct platform_device mxc_otg_host = {
	.name = "mxc-ehci",
	.name = "mxc-ehci",
	.id = 0,
	.id = 0,
	.dev = {
	.dev = {
		.coherent_dma_mask = 0xffffffff,
		.coherent_dma_mask = DMA_BIT_MASK(32),
		.dma_mask = &otg_dmamask,
		.dma_mask = &otg_dmamask,
	},
	},
	.resource = otg_resources,
	.resource = otg_resources,
@@ -478,7 +479,7 @@ struct platform_device mxc_otg_host = {


/* USB host 1 */
/* USB host 1 */


static u64 usbh1_dmamask = 0xffffffffUL;
static u64 usbh1_dmamask = DMA_BIT_MASK(32);


static struct resource mxc_usbh1_resources[] = {
static struct resource mxc_usbh1_resources[] = {
	{
	{
@@ -496,7 +497,7 @@ struct platform_device mxc_usbh1 = {
	.name = "mxc-ehci",
	.name = "mxc-ehci",
	.id = 1,
	.id = 1,
	.dev = {
	.dev = {
		.coherent_dma_mask = 0xffffffff,
		.coherent_dma_mask = DMA_BIT_MASK(32),
		.dma_mask = &usbh1_dmamask,
		.dma_mask = &usbh1_dmamask,
	},
	},
	.resource = mxc_usbh1_resources,
	.resource = mxc_usbh1_resources,
@@ -504,7 +505,7 @@ struct platform_device mxc_usbh1 = {
};
};


/* USB host 2 */
/* USB host 2 */
static u64 usbh2_dmamask = 0xffffffffUL;
static u64 usbh2_dmamask = DMA_BIT_MASK(32);


static struct resource mxc_usbh2_resources[] = {
static struct resource mxc_usbh2_resources[] = {
	{
	{
@@ -522,7 +523,7 @@ struct platform_device mxc_usbh2 = {
	.name = "mxc-ehci",
	.name = "mxc-ehci",
	.id = 2,
	.id = 2,
	.dev = {
	.dev = {
		.coherent_dma_mask = 0xffffffff,
		.coherent_dma_mask = DMA_BIT_MASK(32),
		.dma_mask = &usbh2_dmamask,
		.dma_mask = &usbh2_dmamask,
	},
	},
	.resource = mxc_usbh2_resources,
	.resource = mxc_usbh2_resources,