diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-01 21:19:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-01 21:19:05 -0400 |
commit | 61464c8357c8f6b780e4c44f5c79471799c51ca7 (patch) | |
tree | 4509cf075403965528f380f2f825c46908fb7d4e /arch/arm/include | |
parent | 47061eda2584b9e4516d1e3a9713406a3a559ac8 (diff) | |
parent | 9cf1c871526cf6bfec2a653e1e068ee72592542c (diff) |
Merge tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM soc general cleanups from Olof Johansson:
"This is a large branch that contains a handful of different cleanups:
- Fixing up the I/O space remapping on PCI on ARM. This is a series
from Rob Herring that restructures how all pci devices allocate I/O
space, and it's part of the work to allow multiplatform kernels.
- A number of cleanup series for OMAP, moving and removing some
headers, sparse irq rework and in general preparation for
multiplatform.
- Final removal of all non-DT boards for Tegra, it is now
device-tree-only!
- Removal of a stale platform, nxp4008. It's an old mobile chipset
that is no longer in use, and was very likely never really used
with a mainline kernel. We have not been able to find anyone
interested in keeping it around in the kernel.
- Removal of the legacy dmaengine driver on tegra
+ A handful of other things that I haven't described above."
Fix up some conflicts with the staging tree (and because nxp4008 was
removed)
* tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (184 commits)
ARM: OMAP2+: serial: Change MAX_HSUART_PORTS to 6
ARM: OMAP4: twl-common: Support for additional devices on i2c1 bus
ARM: mmp: using for_each_set_bit to simplify the code
ARM: tegra: harmony: fix ldo7 regulator-name
ARM: OMAP2+: Make omap4-keypad.h local
ARM: OMAP2+: Make l4_3xxx.h local
ARM: OMAP2+: Make l4_2xxx.h local
ARM: OMAP2+: Make l3_3xxx.h local
ARM: OMAP2+: Make l3_2xxx.h local
ARM: OMAP1: Move irda.h from plat to mach
ARM: OMAP2+: Make hdq1w.h local
ARM: OMAP2+: Make gpmc-smsc911x.h local
ARM: OMAP2+: Make gpmc-smc91x.h local
ARM: OMAP1: Move flash.h from plat to mach
ARM: OMAP2+: Make debug-devices.h local
ARM: OMAP1: Move board-voiceblue.h from plat to mach
ARM: OMAP1: Move board-sx1.h from plat to mach
ARM: OMAP2+: Make omap-wakeupgen.h local
ARM: OMAP2+: Make omap-secure.h local
ARM: OMAP2+: Make ctrl_module_wkup_44xx.h local
...
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/hardware/iop3xx.h | 12 | ||||
-rw-r--r-- | arch/arm/include/asm/io.h | 8 | ||||
-rw-r--r-- | arch/arm/include/asm/mach/map.h | 8 | ||||
-rw-r--r-- | arch/arm/include/asm/mach/pci.h | 13 | ||||
-rw-r--r-- | arch/arm/include/asm/perf_event.h | 9 | ||||
-rw-r--r-- | arch/arm/include/asm/pmu.h | 77 |
6 files changed, 62 insertions, 65 deletions
diff --git a/arch/arm/include/asm/hardware/iop3xx.h b/arch/arm/include/asm/hardware/iop3xx.h index 2ff2c75a4639..02fe2fbe2477 100644 --- a/arch/arm/include/asm/hardware/iop3xx.h +++ b/arch/arm/include/asm/hardware/iop3xx.h | |||
@@ -217,18 +217,8 @@ extern int iop3xx_get_init_atu(void); | |||
217 | #define IOP3XX_PCI_LOWER_MEM_PA 0x80000000 | 217 | #define IOP3XX_PCI_LOWER_MEM_PA 0x80000000 |
218 | #define IOP3XX_PCI_MEM_WINDOW_SIZE 0x08000000 | 218 | #define IOP3XX_PCI_MEM_WINDOW_SIZE 0x08000000 |
219 | 219 | ||
220 | #define IOP3XX_PCI_IO_WINDOW_SIZE 0x00010000 | ||
221 | #define IOP3XX_PCI_LOWER_IO_PA 0x90000000 | 220 | #define IOP3XX_PCI_LOWER_IO_PA 0x90000000 |
222 | #define IOP3XX_PCI_LOWER_IO_VA 0xfe000000 | 221 | #define IOP3XX_PCI_LOWER_IO_BA 0x00000000 |
223 | #define IOP3XX_PCI_LOWER_IO_BA 0x90000000 | ||
224 | #define IOP3XX_PCI_UPPER_IO_PA (IOP3XX_PCI_LOWER_IO_PA +\ | ||
225 | IOP3XX_PCI_IO_WINDOW_SIZE - 1) | ||
226 | #define IOP3XX_PCI_UPPER_IO_VA (IOP3XX_PCI_LOWER_IO_VA +\ | ||
227 | IOP3XX_PCI_IO_WINDOW_SIZE - 1) | ||
228 | #define IOP3XX_PCI_IO_PHYS_TO_VIRT(addr) (((u32) (addr) -\ | ||
229 | IOP3XX_PCI_LOWER_IO_PA) +\ | ||
230 | IOP3XX_PCI_LOWER_IO_VA) | ||
231 | |||
232 | 222 | ||
233 | #ifndef __ASSEMBLY__ | 223 | #ifndef __ASSEMBLY__ |
234 | 224 | ||
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index 815c669fec0a..8f4db67533e5 100644 --- a/arch/arm/include/asm/io.h +++ b/arch/arm/include/asm/io.h | |||
@@ -113,11 +113,19 @@ static inline void __iomem *__typesafe_io(unsigned long addr) | |||
113 | #define __iowmb() do { } while (0) | 113 | #define __iowmb() do { } while (0) |
114 | #endif | 114 | #endif |
115 | 115 | ||
116 | /* PCI fixed i/o mapping */ | ||
117 | #define PCI_IO_VIRT_BASE 0xfee00000 | ||
118 | |||
119 | extern int pci_ioremap_io(unsigned int offset, phys_addr_t phys_addr); | ||
120 | |||
116 | /* | 121 | /* |
117 | * Now, pick up the machine-defined IO definitions | 122 | * Now, pick up the machine-defined IO definitions |
118 | */ | 123 | */ |
119 | #ifdef CONFIG_NEED_MACH_IO_H | 124 | #ifdef CONFIG_NEED_MACH_IO_H |
120 | #include <mach/io.h> | 125 | #include <mach/io.h> |
126 | #elif defined(CONFIG_PCI) | ||
127 | #define IO_SPACE_LIMIT ((resource_size_t)0xfffff) | ||
128 | #define __io(a) __typesafe_io(PCI_IO_VIRT_BASE + ((a) & IO_SPACE_LIMIT)) | ||
121 | #else | 129 | #else |
122 | #define __io(a) __typesafe_io((a) & IO_SPACE_LIMIT) | 130 | #define __io(a) __typesafe_io((a) & IO_SPACE_LIMIT) |
123 | #endif | 131 | #endif |
diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h index a6efcdd6fd25..195ac2f9d3d3 100644 --- a/arch/arm/include/asm/mach/map.h +++ b/arch/arm/include/asm/mach/map.h | |||
@@ -9,6 +9,9 @@ | |||
9 | * | 9 | * |
10 | * Page table mapping constructs and function prototypes | 10 | * Page table mapping constructs and function prototypes |
11 | */ | 11 | */ |
12 | #ifndef __ASM_MACH_MAP_H | ||
13 | #define __ASM_MACH_MAP_H | ||
14 | |||
12 | #include <asm/io.h> | 15 | #include <asm/io.h> |
13 | 16 | ||
14 | struct map_desc { | 17 | struct map_desc { |
@@ -34,6 +37,8 @@ struct map_desc { | |||
34 | 37 | ||
35 | #ifdef CONFIG_MMU | 38 | #ifdef CONFIG_MMU |
36 | extern void iotable_init(struct map_desc *, int); | 39 | extern void iotable_init(struct map_desc *, int); |
40 | extern void vm_reserve_area_early(unsigned long addr, unsigned long size, | ||
41 | void *caller); | ||
37 | 42 | ||
38 | struct mem_type; | 43 | struct mem_type; |
39 | extern const struct mem_type *get_mem_type(unsigned int type); | 44 | extern const struct mem_type *get_mem_type(unsigned int type); |
@@ -44,4 +49,7 @@ extern int ioremap_page(unsigned long virt, unsigned long phys, | |||
44 | const struct mem_type *mtype); | 49 | const struct mem_type *mtype); |
45 | #else | 50 | #else |
46 | #define iotable_init(map,num) do { } while (0) | 51 | #define iotable_init(map,num) do { } while (0) |
52 | #define vm_reserve_area_early(a,s,c) do { } while (0) | ||
53 | #endif | ||
54 | |||
47 | #endif | 55 | #endif |
diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pci.h index 26c511fddf8f..db9fedb57f2c 100644 --- a/arch/arm/include/asm/mach/pci.h +++ b/arch/arm/include/asm/mach/pci.h | |||
@@ -11,6 +11,8 @@ | |||
11 | #ifndef __ASM_MACH_PCI_H | 11 | #ifndef __ASM_MACH_PCI_H |
12 | #define __ASM_MACH_PCI_H | 12 | #define __ASM_MACH_PCI_H |
13 | 13 | ||
14 | #include <linux/ioport.h> | ||
15 | |||
14 | struct pci_sys_data; | 16 | struct pci_sys_data; |
15 | struct pci_ops; | 17 | struct pci_ops; |
16 | struct pci_bus; | 18 | struct pci_bus; |
@@ -42,6 +44,8 @@ struct pci_sys_data { | |||
42 | unsigned long io_offset; /* bus->cpu IO mapping offset */ | 44 | unsigned long io_offset; /* bus->cpu IO mapping offset */ |
43 | struct pci_bus *bus; /* PCI bus */ | 45 | struct pci_bus *bus; /* PCI bus */ |
44 | struct list_head resources; /* root bus resources (apertures) */ | 46 | struct list_head resources; /* root bus resources (apertures) */ |
47 | struct resource io_res; | ||
48 | char io_res_name[12]; | ||
45 | /* Bridge swizzling */ | 49 | /* Bridge swizzling */ |
46 | u8 (*swizzle)(struct pci_dev *, u8 *); | 50 | u8 (*swizzle)(struct pci_dev *, u8 *); |
47 | /* IRQ mapping */ | 51 | /* IRQ mapping */ |
@@ -55,6 +59,15 @@ struct pci_sys_data { | |||
55 | void pci_common_init(struct hw_pci *); | 59 | void pci_common_init(struct hw_pci *); |
56 | 60 | ||
57 | /* | 61 | /* |
62 | * Setup early fixed I/O mapping. | ||
63 | */ | ||
64 | #if defined(CONFIG_PCI) | ||
65 | extern void pci_map_io_early(unsigned long pfn); | ||
66 | #else | ||
67 | static inline void pci_map_io_early(unsigned long pfn) {} | ||
68 | #endif | ||
69 | |||
70 | /* | ||
58 | * PCI controllers | 71 | * PCI controllers |
59 | */ | 72 | */ |
60 | extern struct pci_ops iop3xx_ops; | 73 | extern struct pci_ops iop3xx_ops; |
diff --git a/arch/arm/include/asm/perf_event.h b/arch/arm/include/asm/perf_event.h index e074948d8143..625cd621a436 100644 --- a/arch/arm/include/asm/perf_event.h +++ b/arch/arm/include/asm/perf_event.h | |||
@@ -12,6 +12,13 @@ | |||
12 | #ifndef __ARM_PERF_EVENT_H__ | 12 | #ifndef __ARM_PERF_EVENT_H__ |
13 | #define __ARM_PERF_EVENT_H__ | 13 | #define __ARM_PERF_EVENT_H__ |
14 | 14 | ||
15 | /* Nothing to see here... */ | 15 | /* |
16 | * The ARMv7 CPU PMU supports up to 32 event counters. | ||
17 | */ | ||
18 | #define ARMPMU_MAX_HWEVENTS 32 | ||
19 | |||
20 | #define HW_OP_UNSUPPORTED 0xFFFF | ||
21 | #define C(_x) PERF_COUNT_HW_CACHE_##_x | ||
22 | #define CACHE_OP_UNSUPPORTED 0xFFFF | ||
16 | 23 | ||
17 | #endif /* __ARM_PERF_EVENT_H__ */ | 24 | #endif /* __ARM_PERF_EVENT_H__ */ |
diff --git a/arch/arm/include/asm/pmu.h b/arch/arm/include/asm/pmu.h index 4432305f4a2a..a26170dce02e 100644 --- a/arch/arm/include/asm/pmu.h +++ b/arch/arm/include/asm/pmu.h | |||
@@ -16,69 +16,30 @@ | |||
16 | #include <linux/perf_event.h> | 16 | #include <linux/perf_event.h> |
17 | 17 | ||
18 | /* | 18 | /* |
19 | * Types of PMUs that can be accessed directly and require mutual | ||
20 | * exclusion between profiling tools. | ||
21 | */ | ||
22 | enum arm_pmu_type { | ||
23 | ARM_PMU_DEVICE_CPU = 0, | ||
24 | ARM_NUM_PMU_DEVICES, | ||
25 | }; | ||
26 | |||
27 | /* | ||
28 | * struct arm_pmu_platdata - ARM PMU platform data | 19 | * struct arm_pmu_platdata - ARM PMU platform data |
29 | * | 20 | * |
30 | * @handle_irq: an optional handler which will be called from the | 21 | * @handle_irq: an optional handler which will be called from the |
31 | * interrupt and passed the address of the low level handler, | 22 | * interrupt and passed the address of the low level handler, |
32 | * and can be used to implement any platform specific handling | 23 | * and can be used to implement any platform specific handling |
33 | * before or after calling it. | 24 | * before or after calling it. |
34 | * @enable_irq: an optional handler which will be called after | 25 | * @runtime_resume: an optional handler which will be called by the |
35 | * request_irq and be used to handle some platform specific | 26 | * runtime PM framework following a call to pm_runtime_get(). |
36 | * irq enablement | 27 | * Note that if pm_runtime_get() is called more than once in |
37 | * @disable_irq: an optional handler which will be called before | 28 | * succession this handler will only be called once. |
38 | * free_irq and be used to handle some platform specific | 29 | * @runtime_suspend: an optional handler which will be called by the |
39 | * irq disablement | 30 | * runtime PM framework following a call to pm_runtime_put(). |
31 | * Note that if pm_runtime_get() is called more than once in | ||
32 | * succession this handler will only be called following the | ||
33 | * final call to pm_runtime_put() that actually disables the | ||
34 | * hardware. | ||
40 | */ | 35 | */ |
41 | struct arm_pmu_platdata { | 36 | struct arm_pmu_platdata { |
42 | irqreturn_t (*handle_irq)(int irq, void *dev, | 37 | irqreturn_t (*handle_irq)(int irq, void *dev, |
43 | irq_handler_t pmu_handler); | 38 | irq_handler_t pmu_handler); |
44 | void (*enable_irq)(int irq); | 39 | int (*runtime_resume)(struct device *dev); |
45 | void (*disable_irq)(int irq); | 40 | int (*runtime_suspend)(struct device *dev); |
46 | }; | 41 | }; |
47 | 42 | ||
48 | #ifdef CONFIG_CPU_HAS_PMU | ||
49 | |||
50 | /** | ||
51 | * reserve_pmu() - reserve the hardware performance counters | ||
52 | * | ||
53 | * Reserve the hardware performance counters in the system for exclusive use. | ||
54 | * Returns 0 on success or -EBUSY if the lock is already held. | ||
55 | */ | ||
56 | extern int | ||
57 | reserve_pmu(enum arm_pmu_type type); | ||
58 | |||
59 | /** | ||
60 | * release_pmu() - Relinquish control of the performance counters | ||
61 | * | ||
62 | * Release the performance counters and allow someone else to use them. | ||
63 | */ | ||
64 | extern void | ||
65 | release_pmu(enum arm_pmu_type type); | ||
66 | |||
67 | #else /* CONFIG_CPU_HAS_PMU */ | ||
68 | |||
69 | #include <linux/err.h> | ||
70 | |||
71 | static inline int | ||
72 | reserve_pmu(enum arm_pmu_type type) | ||
73 | { | ||
74 | return -ENODEV; | ||
75 | } | ||
76 | |||
77 | static inline void | ||
78 | release_pmu(enum arm_pmu_type type) { } | ||
79 | |||
80 | #endif /* CONFIG_CPU_HAS_PMU */ | ||
81 | |||
82 | #ifdef CONFIG_HW_PERF_EVENTS | 43 | #ifdef CONFIG_HW_PERF_EVENTS |
83 | 44 | ||
84 | /* The events for a given PMU register set. */ | 45 | /* The events for a given PMU register set. */ |
@@ -103,7 +64,6 @@ struct pmu_hw_events { | |||
103 | 64 | ||
104 | struct arm_pmu { | 65 | struct arm_pmu { |
105 | struct pmu pmu; | 66 | struct pmu pmu; |
106 | enum arm_pmu_type type; | ||
107 | cpumask_t active_irqs; | 67 | cpumask_t active_irqs; |
108 | char *name; | 68 | char *name; |
109 | irqreturn_t (*handle_irq)(int irq_num, void *dev); | 69 | irqreturn_t (*handle_irq)(int irq_num, void *dev); |
@@ -118,6 +78,8 @@ struct arm_pmu { | |||
118 | void (*start)(void); | 78 | void (*start)(void); |
119 | void (*stop)(void); | 79 | void (*stop)(void); |
120 | void (*reset)(void *); | 80 | void (*reset)(void *); |
81 | int (*request_irq)(irq_handler_t handler); | ||
82 | void (*free_irq)(void); | ||
121 | int (*map_event)(struct perf_event *event); | 83 | int (*map_event)(struct perf_event *event); |
122 | int num_events; | 84 | int num_events; |
123 | atomic_t active_events; | 85 | atomic_t active_events; |
@@ -129,7 +91,9 @@ struct arm_pmu { | |||
129 | 91 | ||
130 | #define to_arm_pmu(p) (container_of(p, struct arm_pmu, pmu)) | 92 | #define to_arm_pmu(p) (container_of(p, struct arm_pmu, pmu)) |
131 | 93 | ||
132 | int __init armpmu_register(struct arm_pmu *armpmu, char *name, int type); | 94 | extern const struct dev_pm_ops armpmu_dev_pm_ops; |
95 | |||
96 | int armpmu_register(struct arm_pmu *armpmu, char *name, int type); | ||
133 | 97 | ||
134 | u64 armpmu_event_update(struct perf_event *event, | 98 | u64 armpmu_event_update(struct perf_event *event, |
135 | struct hw_perf_event *hwc, | 99 | struct hw_perf_event *hwc, |
@@ -139,6 +103,13 @@ int armpmu_event_set_period(struct perf_event *event, | |||
139 | struct hw_perf_event *hwc, | 103 | struct hw_perf_event *hwc, |
140 | int idx); | 104 | int idx); |
141 | 105 | ||
106 | int armpmu_map_event(struct perf_event *event, | ||
107 | const unsigned (*event_map)[PERF_COUNT_HW_MAX], | ||
108 | const unsigned (*cache_map)[PERF_COUNT_HW_CACHE_MAX] | ||
109 | [PERF_COUNT_HW_CACHE_OP_MAX] | ||
110 | [PERF_COUNT_HW_CACHE_RESULT_MAX], | ||
111 | u32 raw_event_mask); | ||
112 | |||
142 | #endif /* CONFIG_HW_PERF_EVENTS */ | 113 | #endif /* CONFIG_HW_PERF_EVENTS */ |
143 | 114 | ||
144 | #endif /* __ARM_PMU_H__ */ | 115 | #endif /* __ARM_PMU_H__ */ |