diff options
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r-- | arch/arm/mach-ux500/devices-common.c | 13 | ||||
-rw-r--r-- | arch/arm/mach-ux500/include/mach/system.h | 20 |
2 files changed, 3 insertions, 30 deletions
diff --git a/arch/arm/mach-ux500/devices-common.c b/arch/arm/mach-ux500/devices-common.c index c3bc094c27e5..c5312a4b49f5 100644 --- a/arch/arm/mach-ux500/devices-common.c +++ b/arch/arm/mach-ux500/devices-common.c | |||
@@ -27,21 +27,14 @@ dbx500_add_amba_device(struct device *parent, const char *name, | |||
27 | struct amba_device *dev; | 27 | struct amba_device *dev; |
28 | int ret; | 28 | int ret; |
29 | 29 | ||
30 | dev = kzalloc(sizeof *dev, GFP_KERNEL); | 30 | dev = amba_device_alloc(name, base, SZ_4K); |
31 | if (!dev) | 31 | if (!dev) |
32 | return ERR_PTR(-ENOMEM); | 32 | return ERR_PTR(-ENOMEM); |
33 | 33 | ||
34 | dev->dev.init_name = name; | ||
35 | |||
36 | dev->res.start = base; | ||
37 | dev->res.end = base + SZ_4K - 1; | ||
38 | dev->res.flags = IORESOURCE_MEM; | ||
39 | |||
40 | dev->dma_mask = DMA_BIT_MASK(32); | 34 | dev->dma_mask = DMA_BIT_MASK(32); |
41 | dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); | 35 | dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); |
42 | 36 | ||
43 | dev->irq[0] = irq; | 37 | dev->irq[0] = irq; |
44 | dev->irq[1] = NO_IRQ; | ||
45 | 38 | ||
46 | dev->periphid = periphid; | 39 | dev->periphid = periphid; |
47 | 40 | ||
@@ -49,9 +42,9 @@ dbx500_add_amba_device(struct device *parent, const char *name, | |||
49 | 42 | ||
50 | dev->dev.parent = parent; | 43 | dev->dev.parent = parent; |
51 | 44 | ||
52 | ret = amba_device_register(dev, &iomem_resource); | 45 | ret = amba_device_add(dev, &iomem_resource); |
53 | if (ret) { | 46 | if (ret) { |
54 | kfree(dev); | 47 | amba_device_put(dev); |
55 | return ERR_PTR(ret); | 48 | return ERR_PTR(ret); |
56 | } | 49 | } |
57 | 50 | ||
diff --git a/arch/arm/mach-ux500/include/mach/system.h b/arch/arm/mach-ux500/include/mach/system.h deleted file mode 100644 index 258e5c919c24..000000000000 --- a/arch/arm/mach-ux500/include/mach/system.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 ST-Ericsson. | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | #ifndef __ASM_ARCH_SYSTEM_H | ||
9 | #define __ASM_ARCH_SYSTEM_H | ||
10 | |||
11 | static inline void arch_idle(void) | ||
12 | { | ||
13 | /* | ||
14 | * This should do all the clock switching | ||
15 | * and wait for interrupt tricks | ||
16 | */ | ||
17 | cpu_do_idle(); | ||
18 | } | ||
19 | |||
20 | #endif | ||