diff options
| author | Olof Johansson <olof@lixom.net> | 2013-10-28 00:42:44 -0400 |
|---|---|---|
| committer | Olof Johansson <olof@lixom.net> | 2013-10-28 00:42:44 -0400 |
| commit | 3316dee245ef297155fa45b8d14263dfd6a9164b (patch) | |
| tree | 7adbf9875893ce0405f771d92d266d70df1aedbb /include/linux | |
| parent | f2c4e82e350dab489ae0d8fcd84b780de508ab64 (diff) | |
| parent | 1fecf8958eb7f90791f2c7e99afac393b64fa976 (diff) | |
Merge tag 's3c24xx-dma' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/drivers
From Kukjin Kim, this branch adds device-tree support to the DMA controller
on the older Samsung SoCs. It also adds support for one of the missing SoCs
in the family (2410).
The driver has been Ack:ed by Vinod Koul, but is merged through here due
to dependencies with platform code.
* tag 's3c24xx-dma' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
ARM: S3C24XX: add dma pdata for s3c2410, s3c2440 and s3c2442
dmaengine: s3c24xx-dma: add support for the s3c2410 type of controller
ARM: S3C24XX: Fix possible dma selection warning
ARM: SAMSUNG: set s3c24xx_dma_filter for s3c64xx-spi0 device
ARM: S3C24XX: add platform-devices for new dma driver for s3c2412 and s3c2443
dmaengine: add driver for Samsung s3c24xx SoCs
ARM: S3C24XX: number the dma clocks
+ Linux 3.12-rc3
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/device-mapper.h | 3 | ||||
| -rw-r--r-- | include/linux/hyperv.h | 7 | ||||
| -rw-r--r-- | include/linux/memcontrol.h | 55 | ||||
| -rw-r--r-- | include/linux/mutex.h | 6 | ||||
| -rw-r--r-- | include/linux/of_irq.h | 20 | ||||
| -rw-r--r-- | include/linux/platform_data/dma-s3c24xx.h | 46 | ||||
| -rw-r--r-- | include/linux/smp.h | 6 |
7 files changed, 80 insertions, 63 deletions
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index 653073de09e3..ed419c62dde1 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
| @@ -406,13 +406,14 @@ int dm_noflush_suspending(struct dm_target *ti); | |||
| 406 | union map_info *dm_get_mapinfo(struct bio *bio); | 406 | union map_info *dm_get_mapinfo(struct bio *bio); |
| 407 | union map_info *dm_get_rq_mapinfo(struct request *rq); | 407 | union map_info *dm_get_rq_mapinfo(struct request *rq); |
| 408 | 408 | ||
| 409 | struct queue_limits *dm_get_queue_limits(struct mapped_device *md); | ||
| 410 | |||
| 409 | /* | 411 | /* |
| 410 | * Geometry functions. | 412 | * Geometry functions. |
| 411 | */ | 413 | */ |
| 412 | int dm_get_geometry(struct mapped_device *md, struct hd_geometry *geo); | 414 | int dm_get_geometry(struct mapped_device *md, struct hd_geometry *geo); |
| 413 | int dm_set_geometry(struct mapped_device *md, struct hd_geometry *geo); | 415 | int dm_set_geometry(struct mapped_device *md, struct hd_geometry *geo); |
| 414 | 416 | ||
| 415 | |||
| 416 | /*----------------------------------------------------------------- | 417 | /*----------------------------------------------------------------- |
| 417 | * Functions for manipulating device-mapper tables. | 418 | * Functions for manipulating device-mapper tables. |
| 418 | *---------------------------------------------------------------*/ | 419 | *---------------------------------------------------------------*/ |
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index a3b8b2e2d244..d98503bde7e9 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h | |||
| @@ -30,10 +30,13 @@ | |||
| 30 | /* | 30 | /* |
| 31 | * Framework version for util services. | 31 | * Framework version for util services. |
| 32 | */ | 32 | */ |
| 33 | #define UTIL_FW_MINOR 0 | ||
| 34 | |||
| 35 | #define UTIL_WS2K8_FW_MAJOR 1 | ||
| 36 | #define UTIL_WS2K8_FW_VERSION (UTIL_WS2K8_FW_MAJOR << 16 | UTIL_FW_MINOR) | ||
| 33 | 37 | ||
| 34 | #define UTIL_FW_MAJOR 3 | 38 | #define UTIL_FW_MAJOR 3 |
| 35 | #define UTIL_FW_MINOR 0 | 39 | #define UTIL_FW_VERSION (UTIL_FW_MAJOR << 16 | UTIL_FW_MINOR) |
| 36 | #define UTIL_FW_MAJOR_MINOR (UTIL_FW_MAJOR << 16 | UTIL_FW_MINOR) | ||
| 37 | 40 | ||
| 38 | 41 | ||
| 39 | /* | 42 | /* |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 60e95872da29..ecc82b37c4cc 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
| @@ -53,23 +53,6 @@ struct mem_cgroup_reclaim_cookie { | |||
| 53 | unsigned int generation; | 53 | unsigned int generation; |
| 54 | }; | 54 | }; |
| 55 | 55 | ||
| 56 | enum mem_cgroup_filter_t { | ||
| 57 | VISIT, /* visit current node */ | ||
| 58 | SKIP, /* skip the current node and continue traversal */ | ||
| 59 | SKIP_TREE, /* skip the whole subtree and continue traversal */ | ||
| 60 | }; | ||
| 61 | |||
| 62 | /* | ||
| 63 | * mem_cgroup_filter_t predicate might instruct mem_cgroup_iter_cond how to | ||
| 64 | * iterate through the hierarchy tree. Each tree element is checked by the | ||
| 65 | * predicate before it is returned by the iterator. If a filter returns | ||
| 66 | * SKIP or SKIP_TREE then the iterator code continues traversal (with the | ||
| 67 | * next node down the hierarchy or the next node that doesn't belong under the | ||
| 68 | * memcg's subtree). | ||
| 69 | */ | ||
| 70 | typedef enum mem_cgroup_filter_t | ||
| 71 | (*mem_cgroup_iter_filter)(struct mem_cgroup *memcg, struct mem_cgroup *root); | ||
| 72 | |||
| 73 | #ifdef CONFIG_MEMCG | 56 | #ifdef CONFIG_MEMCG |
| 74 | /* | 57 | /* |
| 75 | * All "charge" functions with gfp_mask should use GFP_KERNEL or | 58 | * All "charge" functions with gfp_mask should use GFP_KERNEL or |
| @@ -137,18 +120,9 @@ mem_cgroup_prepare_migration(struct page *page, struct page *newpage, | |||
| 137 | extern void mem_cgroup_end_migration(struct mem_cgroup *memcg, | 120 | extern void mem_cgroup_end_migration(struct mem_cgroup *memcg, |
| 138 | struct page *oldpage, struct page *newpage, bool migration_ok); | 121 | struct page *oldpage, struct page *newpage, bool migration_ok); |
| 139 | 122 | ||
| 140 | struct mem_cgroup *mem_cgroup_iter_cond(struct mem_cgroup *root, | 123 | struct mem_cgroup *mem_cgroup_iter(struct mem_cgroup *, |
| 141 | struct mem_cgroup *prev, | 124 | struct mem_cgroup *, |
| 142 | struct mem_cgroup_reclaim_cookie *reclaim, | 125 | struct mem_cgroup_reclaim_cookie *); |
| 143 | mem_cgroup_iter_filter cond); | ||
| 144 | |||
| 145 | static inline struct mem_cgroup *mem_cgroup_iter(struct mem_cgroup *root, | ||
| 146 | struct mem_cgroup *prev, | ||
| 147 | struct mem_cgroup_reclaim_cookie *reclaim) | ||
| 148 | { | ||
| 149 | return mem_cgroup_iter_cond(root, prev, reclaim, NULL); | ||
| 150 | } | ||
| 151 | |||
| 152 | void mem_cgroup_iter_break(struct mem_cgroup *, struct mem_cgroup *); | 126 | void mem_cgroup_iter_break(struct mem_cgroup *, struct mem_cgroup *); |
| 153 | 127 | ||
| 154 | /* | 128 | /* |
| @@ -260,9 +234,9 @@ static inline void mem_cgroup_dec_page_stat(struct page *page, | |||
| 260 | mem_cgroup_update_page_stat(page, idx, -1); | 234 | mem_cgroup_update_page_stat(page, idx, -1); |
| 261 | } | 235 | } |
| 262 | 236 | ||
| 263 | enum mem_cgroup_filter_t | 237 | unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, |
| 264 | mem_cgroup_soft_reclaim_eligible(struct mem_cgroup *memcg, | 238 | gfp_t gfp_mask, |
| 265 | struct mem_cgroup *root); | 239 | unsigned long *total_scanned); |
| 266 | 240 | ||
| 267 | void __mem_cgroup_count_vm_event(struct mm_struct *mm, enum vm_event_item idx); | 241 | void __mem_cgroup_count_vm_event(struct mm_struct *mm, enum vm_event_item idx); |
| 268 | static inline void mem_cgroup_count_vm_event(struct mm_struct *mm, | 242 | static inline void mem_cgroup_count_vm_event(struct mm_struct *mm, |
| @@ -376,15 +350,6 @@ static inline void mem_cgroup_end_migration(struct mem_cgroup *memcg, | |||
| 376 | struct page *oldpage, struct page *newpage, bool migration_ok) | 350 | struct page *oldpage, struct page *newpage, bool migration_ok) |
| 377 | { | 351 | { |
| 378 | } | 352 | } |
| 379 | static inline struct mem_cgroup * | ||
| 380 | mem_cgroup_iter_cond(struct mem_cgroup *root, | ||
| 381 | struct mem_cgroup *prev, | ||
| 382 | struct mem_cgroup_reclaim_cookie *reclaim, | ||
| 383 | mem_cgroup_iter_filter cond) | ||
| 384 | { | ||
| 385 | /* first call must return non-NULL, second return NULL */ | ||
| 386 | return (struct mem_cgroup *)(unsigned long)!prev; | ||
| 387 | } | ||
| 388 | 353 | ||
| 389 | static inline struct mem_cgroup * | 354 | static inline struct mem_cgroup * |
| 390 | mem_cgroup_iter(struct mem_cgroup *root, | 355 | mem_cgroup_iter(struct mem_cgroup *root, |
| @@ -471,11 +436,11 @@ static inline void mem_cgroup_dec_page_stat(struct page *page, | |||
| 471 | } | 436 | } |
| 472 | 437 | ||
| 473 | static inline | 438 | static inline |
| 474 | enum mem_cgroup_filter_t | 439 | unsigned long mem_cgroup_soft_limit_reclaim(struct zone *zone, int order, |
| 475 | mem_cgroup_soft_reclaim_eligible(struct mem_cgroup *memcg, | 440 | gfp_t gfp_mask, |
| 476 | struct mem_cgroup *root) | 441 | unsigned long *total_scanned) |
| 477 | { | 442 | { |
| 478 | return VISIT; | 443 | return 0; |
| 479 | } | 444 | } |
| 480 | 445 | ||
| 481 | static inline void mem_cgroup_split_huge_fixup(struct page *head) | 446 | static inline void mem_cgroup_split_huge_fixup(struct page *head) |
diff --git a/include/linux/mutex.h b/include/linux/mutex.h index ccd4260834c5..bab49da8a0f0 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h | |||
| @@ -15,8 +15,8 @@ | |||
| 15 | #include <linux/spinlock_types.h> | 15 | #include <linux/spinlock_types.h> |
| 16 | #include <linux/linkage.h> | 16 | #include <linux/linkage.h> |
| 17 | #include <linux/lockdep.h> | 17 | #include <linux/lockdep.h> |
| 18 | |||
| 19 | #include <linux/atomic.h> | 18 | #include <linux/atomic.h> |
| 19 | #include <asm/processor.h> | ||
| 20 | 20 | ||
| 21 | /* | 21 | /* |
| 22 | * Simple, straightforward mutexes with strict semantics: | 22 | * Simple, straightforward mutexes with strict semantics: |
| @@ -175,8 +175,8 @@ extern void mutex_unlock(struct mutex *lock); | |||
| 175 | 175 | ||
| 176 | extern int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock); | 176 | extern int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock); |
| 177 | 177 | ||
| 178 | #ifndef CONFIG_HAVE_ARCH_MUTEX_CPU_RELAX | 178 | #ifndef arch_mutex_cpu_relax |
| 179 | #define arch_mutex_cpu_relax() cpu_relax() | 179 | # define arch_mutex_cpu_relax() cpu_relax() |
| 180 | #endif | 180 | #endif |
| 181 | 181 | ||
| 182 | #endif | 182 | #endif |
diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h index 535cecf1e02f..fcd63baee5f2 100644 --- a/include/linux/of_irq.h +++ b/include/linux/of_irq.h | |||
| @@ -1,8 +1,6 @@ | |||
| 1 | #ifndef __OF_IRQ_H | 1 | #ifndef __OF_IRQ_H |
| 2 | #define __OF_IRQ_H | 2 | #define __OF_IRQ_H |
| 3 | 3 | ||
| 4 | #if defined(CONFIG_OF) | ||
| 5 | struct of_irq; | ||
| 6 | #include <linux/types.h> | 4 | #include <linux/types.h> |
| 7 | #include <linux/errno.h> | 5 | #include <linux/errno.h> |
| 8 | #include <linux/irq.h> | 6 | #include <linux/irq.h> |
| @@ -10,14 +8,6 @@ struct of_irq; | |||
| 10 | #include <linux/ioport.h> | 8 | #include <linux/ioport.h> |
| 11 | #include <linux/of.h> | 9 | #include <linux/of.h> |
| 12 | 10 | ||
| 13 | /* | ||
| 14 | * irq_of_parse_and_map() is used by all OF enabled platforms; but SPARC | ||
| 15 | * implements it differently. However, the prototype is the same for all, | ||
| 16 | * so declare it here regardless of the CONFIG_OF_IRQ setting. | ||
| 17 | */ | ||
| 18 | extern unsigned int irq_of_parse_and_map(struct device_node *node, int index); | ||
| 19 | |||
| 20 | #if defined(CONFIG_OF_IRQ) | ||
| 21 | /** | 11 | /** |
| 22 | * of_irq - container for device_node/irq_specifier pair for an irq controller | 12 | * of_irq - container for device_node/irq_specifier pair for an irq controller |
| 23 | * @controller: pointer to interrupt controller device tree node | 13 | * @controller: pointer to interrupt controller device tree node |
| @@ -71,11 +61,17 @@ extern int of_irq_to_resource(struct device_node *dev, int index, | |||
| 71 | extern int of_irq_count(struct device_node *dev); | 61 | extern int of_irq_count(struct device_node *dev); |
| 72 | extern int of_irq_to_resource_table(struct device_node *dev, | 62 | extern int of_irq_to_resource_table(struct device_node *dev, |
| 73 | struct resource *res, int nr_irqs); | 63 | struct resource *res, int nr_irqs); |
| 74 | extern struct device_node *of_irq_find_parent(struct device_node *child); | ||
| 75 | 64 | ||
| 76 | extern void of_irq_init(const struct of_device_id *matches); | 65 | extern void of_irq_init(const struct of_device_id *matches); |
| 77 | 66 | ||
| 78 | #endif /* CONFIG_OF_IRQ */ | 67 | #if defined(CONFIG_OF) |
| 68 | /* | ||
| 69 | * irq_of_parse_and_map() is used by all OF enabled platforms; but SPARC | ||
| 70 | * implements it differently. However, the prototype is the same for all, | ||
| 71 | * so declare it here regardless of the CONFIG_OF_IRQ setting. | ||
| 72 | */ | ||
| 73 | extern unsigned int irq_of_parse_and_map(struct device_node *node, int index); | ||
| 74 | extern struct device_node *of_irq_find_parent(struct device_node *child); | ||
| 79 | 75 | ||
| 80 | #else /* !CONFIG_OF */ | 76 | #else /* !CONFIG_OF */ |
| 81 | static inline unsigned int irq_of_parse_and_map(struct device_node *dev, | 77 | static inline unsigned int irq_of_parse_and_map(struct device_node *dev, |
diff --git a/include/linux/platform_data/dma-s3c24xx.h b/include/linux/platform_data/dma-s3c24xx.h new file mode 100644 index 000000000000..89ba1b0c90e4 --- /dev/null +++ b/include/linux/platform_data/dma-s3c24xx.h | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | /* | ||
| 2 | * S3C24XX DMA handling | ||
| 3 | * | ||
| 4 | * Copyright (c) 2013 Heiko Stuebner <heiko@sntech.de> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify it | ||
| 7 | * under the terms of the GNU General Public License as published by the Free | ||
| 8 | * Software Foundation; either version 2 of the License, or (at your option) | ||
| 9 | * any later version. | ||
| 10 | */ | ||
| 11 | |||
| 12 | /* Helper to encode the source selection constraints for early s3c socs. */ | ||
| 13 | #define S3C24XX_DMA_CHANREQ(src, chan) ((BIT(3) | src) << chan * 4) | ||
| 14 | |||
| 15 | enum s3c24xx_dma_bus { | ||
| 16 | S3C24XX_DMA_APB, | ||
| 17 | S3C24XX_DMA_AHB, | ||
| 18 | }; | ||
| 19 | |||
| 20 | /** | ||
| 21 | * @bus: on which bus does the peripheral reside - AHB or APB. | ||
| 22 | * @handshake: is a handshake with the peripheral necessary | ||
| 23 | * @chansel: channel selection information, depending on variant; reqsel for | ||
| 24 | * s3c2443 and later and channel-selection map for earlier SoCs | ||
| 25 | * see CHANSEL doc in s3c2443-dma.c | ||
| 26 | */ | ||
| 27 | struct s3c24xx_dma_channel { | ||
| 28 | enum s3c24xx_dma_bus bus; | ||
| 29 | bool handshake; | ||
| 30 | u16 chansel; | ||
| 31 | }; | ||
| 32 | |||
| 33 | /** | ||
| 34 | * struct s3c24xx_dma_platdata - platform specific settings | ||
| 35 | * @num_phy_channels: number of physical channels | ||
| 36 | * @channels: array of virtual channel descriptions | ||
| 37 | * @num_channels: number of virtual channels | ||
| 38 | */ | ||
| 39 | struct s3c24xx_dma_platdata { | ||
| 40 | int num_phy_channels; | ||
| 41 | struct s3c24xx_dma_channel *channels; | ||
| 42 | int num_channels; | ||
| 43 | }; | ||
| 44 | |||
| 45 | struct dma_chan; | ||
| 46 | bool s3c24xx_dma_filter(struct dma_chan *chan, void *param); | ||
diff --git a/include/linux/smp.h b/include/linux/smp.h index cfb7ca094b38..731f5237d5f4 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
| @@ -155,6 +155,12 @@ smp_call_function_any(const struct cpumask *mask, smp_call_func_t func, | |||
| 155 | 155 | ||
| 156 | static inline void kick_all_cpus_sync(void) { } | 156 | static inline void kick_all_cpus_sync(void) { } |
| 157 | 157 | ||
| 158 | static inline void __smp_call_function_single(int cpuid, | ||
| 159 | struct call_single_data *data, int wait) | ||
| 160 | { | ||
| 161 | on_each_cpu(data->func, data->info, wait); | ||
| 162 | } | ||
| 163 | |||
| 158 | #endif /* !SMP */ | 164 | #endif /* !SMP */ |
| 159 | 165 | ||
| 160 | /* | 166 | /* |
