diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/dcache.h | 2 | ||||
-rw-r--r-- | include/linux/ftrace.h | 2 | ||||
-rw-r--r-- | include/linux/hugetlb.h | 10 | ||||
-rw-r--r-- | include/linux/interrupt.h | 4 | ||||
-rw-r--r-- | include/linux/irq.h | 2 | ||||
-rw-r--r-- | include/linux/linkage.h | 4 | ||||
-rw-r--r-- | include/linux/mfd/rtsx_common.h | 1 | ||||
-rw-r--r-- | include/linux/mfd/rtsx_pci.h | 6 | ||||
-rw-r--r-- | include/linux/mm.h | 2 | ||||
-rw-r--r-- | include/linux/netlink.h | 7 | ||||
-rw-r--r-- | include/linux/of.h | 7 | ||||
-rw-r--r-- | include/linux/of_irq.h | 5 | ||||
-rw-r--r-- | include/linux/of_platform.h | 5 | ||||
-rw-r--r-- | include/linux/platform_data/syscon.h | 8 | ||||
-rw-r--r-- | include/linux/slub_def.h | 9 | ||||
-rw-r--r-- | include/linux/sock_diag.h | 2 | ||||
-rw-r--r-- | include/linux/tty.h | 1 | ||||
-rw-r--r-- | include/linux/vexpress.h | 94 |
18 files changed, 84 insertions, 87 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 3b9bfdb83ba6..3c7ec327ebd2 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -221,6 +221,8 @@ struct dentry_operations { | |||
221 | #define DCACHE_SYMLINK_TYPE 0x00300000 /* Symlink */ | 221 | #define DCACHE_SYMLINK_TYPE 0x00300000 /* Symlink */ |
222 | #define DCACHE_FILE_TYPE 0x00400000 /* Other file type */ | 222 | #define DCACHE_FILE_TYPE 0x00400000 /* Other file type */ |
223 | 223 | ||
224 | #define DCACHE_MAY_FREE 0x00800000 | ||
225 | |||
224 | extern seqlock_t rename_lock; | 226 | extern seqlock_t rename_lock; |
225 | 227 | ||
226 | static inline int dname_external(const struct dentry *dentry) | 228 | static inline int dname_external(const struct dentry *dentry) |
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 9212b017bc72..ae9504b4b67d 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -535,6 +535,7 @@ static inline int ftrace_modify_call(struct dyn_ftrace *rec, unsigned long old_a | |||
535 | extern int ftrace_arch_read_dyn_info(char *buf, int size); | 535 | extern int ftrace_arch_read_dyn_info(char *buf, int size); |
536 | 536 | ||
537 | extern int skip_trace(unsigned long ip); | 537 | extern int skip_trace(unsigned long ip); |
538 | extern void ftrace_module_init(struct module *mod); | ||
538 | 539 | ||
539 | extern void ftrace_disable_daemon(void); | 540 | extern void ftrace_disable_daemon(void); |
540 | extern void ftrace_enable_daemon(void); | 541 | extern void ftrace_enable_daemon(void); |
@@ -544,6 +545,7 @@ static inline int ftrace_force_update(void) { return 0; } | |||
544 | static inline void ftrace_disable_daemon(void) { } | 545 | static inline void ftrace_disable_daemon(void) { } |
545 | static inline void ftrace_enable_daemon(void) { } | 546 | static inline void ftrace_enable_daemon(void) { } |
546 | static inline void ftrace_release_mod(struct module *mod) {} | 547 | static inline void ftrace_release_mod(struct module *mod) {} |
548 | static inline void ftrace_module_init(struct module *mod) {} | ||
547 | static inline __init int register_ftrace_command(struct ftrace_func_command *cmd) | 549 | static inline __init int register_ftrace_command(struct ftrace_func_command *cmd) |
548 | { | 550 | { |
549 | return -EINVAL; | 551 | return -EINVAL; |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 5b337cf8fb86..b65166de1d9d 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -412,6 +412,16 @@ static inline spinlock_t *huge_pte_lockptr(struct hstate *h, | |||
412 | return &mm->page_table_lock; | 412 | return &mm->page_table_lock; |
413 | } | 413 | } |
414 | 414 | ||
415 | static inline bool hugepages_supported(void) | ||
416 | { | ||
417 | /* | ||
418 | * Some platform decide whether they support huge pages at boot | ||
419 | * time. On these, such as powerpc, HPAGE_SHIFT is set to 0 when | ||
420 | * there is no such support | ||
421 | */ | ||
422 | return HPAGE_SHIFT != 0; | ||
423 | } | ||
424 | |||
415 | #else /* CONFIG_HUGETLB_PAGE */ | 425 | #else /* CONFIG_HUGETLB_PAGE */ |
416 | struct hstate {}; | 426 | struct hstate {}; |
417 | #define alloc_huge_page_node(h, nid) NULL | 427 | #define alloc_huge_page_node(h, nid) NULL |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 8834a7e5b944..97ac926c78a7 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -210,7 +210,7 @@ extern int __irq_set_affinity(unsigned int irq, const struct cpumask *cpumask, | |||
210 | /** | 210 | /** |
211 | * irq_set_affinity - Set the irq affinity of a given irq | 211 | * irq_set_affinity - Set the irq affinity of a given irq |
212 | * @irq: Interrupt to set affinity | 212 | * @irq: Interrupt to set affinity |
213 | * @mask: cpumask | 213 | * @cpumask: cpumask |
214 | * | 214 | * |
215 | * Fails if cpumask does not contain an online CPU | 215 | * Fails if cpumask does not contain an online CPU |
216 | */ | 216 | */ |
@@ -223,7 +223,7 @@ irq_set_affinity(unsigned int irq, const struct cpumask *cpumask) | |||
223 | /** | 223 | /** |
224 | * irq_force_affinity - Force the irq affinity of a given irq | 224 | * irq_force_affinity - Force the irq affinity of a given irq |
225 | * @irq: Interrupt to set affinity | 225 | * @irq: Interrupt to set affinity |
226 | * @mask: cpumask | 226 | * @cpumask: cpumask |
227 | * | 227 | * |
228 | * Same as irq_set_affinity, but without checking the mask against | 228 | * Same as irq_set_affinity, but without checking the mask against |
229 | * online cpus. | 229 | * online cpus. |
diff --git a/include/linux/irq.h b/include/linux/irq.h index 10a0b1ac4ea0..5c57efb863d0 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -603,6 +603,8 @@ static inline u32 irq_get_trigger_type(unsigned int irq) | |||
603 | return d ? irqd_get_trigger_type(d) : 0; | 603 | return d ? irqd_get_trigger_type(d) : 0; |
604 | } | 604 | } |
605 | 605 | ||
606 | unsigned int arch_dynirq_lower_bound(unsigned int from); | ||
607 | |||
606 | int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node, | 608 | int __irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node, |
607 | struct module *owner); | 609 | struct module *owner); |
608 | 610 | ||
diff --git a/include/linux/linkage.h b/include/linux/linkage.h index 34a513a2727b..a6a42dd02466 100644 --- a/include/linux/linkage.h +++ b/include/linux/linkage.h | |||
@@ -12,9 +12,9 @@ | |||
12 | #endif | 12 | #endif |
13 | 13 | ||
14 | #ifdef __cplusplus | 14 | #ifdef __cplusplus |
15 | #define CPP_ASMLINKAGE extern "C" __visible | 15 | #define CPP_ASMLINKAGE extern "C" |
16 | #else | 16 | #else |
17 | #define CPP_ASMLINKAGE __visible | 17 | #define CPP_ASMLINKAGE |
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | #ifndef asmlinkage | 20 | #ifndef asmlinkage |
diff --git a/include/linux/mfd/rtsx_common.h b/include/linux/mfd/rtsx_common.h index 7c36cc55d2c7..443176ee1ab0 100644 --- a/include/linux/mfd/rtsx_common.h +++ b/include/linux/mfd/rtsx_common.h | |||
@@ -45,7 +45,6 @@ struct platform_device; | |||
45 | struct rtsx_slot { | 45 | struct rtsx_slot { |
46 | struct platform_device *p_dev; | 46 | struct platform_device *p_dev; |
47 | void (*card_event)(struct platform_device *p_dev); | 47 | void (*card_event)(struct platform_device *p_dev); |
48 | void (*done_transfer)(struct platform_device *p_dev); | ||
49 | }; | 48 | }; |
50 | 49 | ||
51 | #endif | 50 | #endif |
diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h index 8d6bbd609ad9..a3835976f7c6 100644 --- a/include/linux/mfd/rtsx_pci.h +++ b/include/linux/mfd/rtsx_pci.h | |||
@@ -943,12 +943,6 @@ void rtsx_pci_send_cmd_no_wait(struct rtsx_pcr *pcr); | |||
943 | int rtsx_pci_send_cmd(struct rtsx_pcr *pcr, int timeout); | 943 | int rtsx_pci_send_cmd(struct rtsx_pcr *pcr, int timeout); |
944 | int rtsx_pci_transfer_data(struct rtsx_pcr *pcr, struct scatterlist *sglist, | 944 | int rtsx_pci_transfer_data(struct rtsx_pcr *pcr, struct scatterlist *sglist, |
945 | int num_sg, bool read, int timeout); | 945 | int num_sg, bool read, int timeout); |
946 | int rtsx_pci_dma_map_sg(struct rtsx_pcr *pcr, struct scatterlist *sglist, | ||
947 | int num_sg, bool read); | ||
948 | int rtsx_pci_dma_unmap_sg(struct rtsx_pcr *pcr, struct scatterlist *sglist, | ||
949 | int num_sg, bool read); | ||
950 | int rtsx_pci_dma_transfer(struct rtsx_pcr *pcr, struct scatterlist *sglist, | ||
951 | int sg_count, bool read); | ||
952 | int rtsx_pci_read_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len); | 946 | int rtsx_pci_read_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len); |
953 | int rtsx_pci_write_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len); | 947 | int rtsx_pci_write_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len); |
954 | int rtsx_pci_card_pull_ctl_enable(struct rtsx_pcr *pcr, int card); | 948 | int rtsx_pci_card_pull_ctl_enable(struct rtsx_pcr *pcr, int card); |
diff --git a/include/linux/mm.h b/include/linux/mm.h index bf9811e1321a..d6777060449f 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -370,6 +370,8 @@ static inline int is_vmalloc_or_module_addr(const void *x) | |||
370 | } | 370 | } |
371 | #endif | 371 | #endif |
372 | 372 | ||
373 | extern void kvfree(const void *addr); | ||
374 | |||
373 | static inline void compound_lock(struct page *page) | 375 | static inline void compound_lock(struct page *page) |
374 | { | 376 | { |
375 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 377 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index aad8eeaf416d..f64b01787ddc 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -169,4 +169,11 @@ struct netlink_tap { | |||
169 | extern int netlink_add_tap(struct netlink_tap *nt); | 169 | extern int netlink_add_tap(struct netlink_tap *nt); |
170 | extern int netlink_remove_tap(struct netlink_tap *nt); | 170 | extern int netlink_remove_tap(struct netlink_tap *nt); |
171 | 171 | ||
172 | bool __netlink_ns_capable(const struct netlink_skb_parms *nsp, | ||
173 | struct user_namespace *ns, int cap); | ||
174 | bool netlink_ns_capable(const struct sk_buff *skb, | ||
175 | struct user_namespace *ns, int cap); | ||
176 | bool netlink_capable(const struct sk_buff *skb, int cap); | ||
177 | bool netlink_net_capable(const struct sk_buff *skb, int cap); | ||
178 | |||
172 | #endif /* __LINUX_NETLINK_H */ | 179 | #endif /* __LINUX_NETLINK_H */ |
diff --git a/include/linux/of.h b/include/linux/of.h index 3bad8d106e0e..4c50d0b78b89 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
@@ -130,6 +130,12 @@ static inline int of_node_check_flag(struct device_node *n, unsigned long flag) | |||
130 | return test_bit(flag, &n->_flags); | 130 | return test_bit(flag, &n->_flags); |
131 | } | 131 | } |
132 | 132 | ||
133 | static inline int of_node_test_and_set_flag(struct device_node *n, | ||
134 | unsigned long flag) | ||
135 | { | ||
136 | return test_and_set_bit(flag, &n->_flags); | ||
137 | } | ||
138 | |||
133 | static inline void of_node_set_flag(struct device_node *n, unsigned long flag) | 139 | static inline void of_node_set_flag(struct device_node *n, unsigned long flag) |
134 | { | 140 | { |
135 | set_bit(flag, &n->_flags); | 141 | set_bit(flag, &n->_flags); |
@@ -197,6 +203,7 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size) | |||
197 | /* flag descriptions */ | 203 | /* flag descriptions */ |
198 | #define OF_DYNAMIC 1 /* node and properties were allocated via kmalloc */ | 204 | #define OF_DYNAMIC 1 /* node and properties were allocated via kmalloc */ |
199 | #define OF_DETACHED 2 /* node has been detached from the device tree */ | 205 | #define OF_DETACHED 2 /* node has been detached from the device tree */ |
206 | #define OF_POPULATED 3 /* device already created for the node */ | ||
200 | 207 | ||
201 | #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) | 208 | #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) |
202 | #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) | 209 | #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) |
diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h index 3f23b4472c31..6404253d810d 100644 --- a/include/linux/of_irq.h +++ b/include/linux/of_irq.h | |||
@@ -44,11 +44,16 @@ extern void of_irq_init(const struct of_device_id *matches); | |||
44 | 44 | ||
45 | #ifdef CONFIG_OF_IRQ | 45 | #ifdef CONFIG_OF_IRQ |
46 | extern int of_irq_count(struct device_node *dev); | 46 | extern int of_irq_count(struct device_node *dev); |
47 | extern int of_irq_get(struct device_node *dev, int index); | ||
47 | #else | 48 | #else |
48 | static inline int of_irq_count(struct device_node *dev) | 49 | static inline int of_irq_count(struct device_node *dev) |
49 | { | 50 | { |
50 | return 0; | 51 | return 0; |
51 | } | 52 | } |
53 | static inline int of_irq_get(struct device_node *dev, int index) | ||
54 | { | ||
55 | return 0; | ||
56 | } | ||
52 | #endif | 57 | #endif |
53 | 58 | ||
54 | #if defined(CONFIG_OF) | 59 | #if defined(CONFIG_OF) |
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index 05cb4a928252..b1010eeaac0d 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h | |||
@@ -72,6 +72,7 @@ extern int of_platform_populate(struct device_node *root, | |||
72 | const struct of_device_id *matches, | 72 | const struct of_device_id *matches, |
73 | const struct of_dev_auxdata *lookup, | 73 | const struct of_dev_auxdata *lookup, |
74 | struct device *parent); | 74 | struct device *parent); |
75 | extern int of_platform_depopulate(struct device *parent); | ||
75 | #else | 76 | #else |
76 | static inline int of_platform_populate(struct device_node *root, | 77 | static inline int of_platform_populate(struct device_node *root, |
77 | const struct of_device_id *matches, | 78 | const struct of_device_id *matches, |
@@ -80,6 +81,10 @@ static inline int of_platform_populate(struct device_node *root, | |||
80 | { | 81 | { |
81 | return -ENODEV; | 82 | return -ENODEV; |
82 | } | 83 | } |
84 | static inline int of_platform_depopulate(struct device *parent) | ||
85 | { | ||
86 | return -ENODEV; | ||
87 | } | ||
83 | #endif | 88 | #endif |
84 | 89 | ||
85 | #endif /* _LINUX_OF_PLATFORM_H */ | 90 | #endif /* _LINUX_OF_PLATFORM_H */ |
diff --git a/include/linux/platform_data/syscon.h b/include/linux/platform_data/syscon.h new file mode 100644 index 000000000000..2354c6fa3726 --- /dev/null +++ b/include/linux/platform_data/syscon.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef PLATFORM_DATA_SYSCON_H | ||
2 | #define PLATFORM_DATA_SYSCON_H | ||
3 | |||
4 | struct syscon_platform_data { | ||
5 | const char *label; | ||
6 | }; | ||
7 | |||
8 | #endif | ||
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index f2f7398848cf..d82abd40a3c0 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
@@ -101,4 +101,13 @@ struct kmem_cache { | |||
101 | struct kmem_cache_node *node[MAX_NUMNODES]; | 101 | struct kmem_cache_node *node[MAX_NUMNODES]; |
102 | }; | 102 | }; |
103 | 103 | ||
104 | #ifdef CONFIG_SYSFS | ||
105 | #define SLAB_SUPPORTS_SYSFS | ||
106 | void sysfs_slab_remove(struct kmem_cache *); | ||
107 | #else | ||
108 | static inline void sysfs_slab_remove(struct kmem_cache *s) | ||
109 | { | ||
110 | } | ||
111 | #endif | ||
112 | |||
104 | #endif /* _LINUX_SLUB_DEF_H */ | 113 | #endif /* _LINUX_SLUB_DEF_H */ |
diff --git a/include/linux/sock_diag.h b/include/linux/sock_diag.h index 54f91d35e5fd..46cca4c06848 100644 --- a/include/linux/sock_diag.h +++ b/include/linux/sock_diag.h | |||
@@ -23,7 +23,7 @@ int sock_diag_check_cookie(void *sk, __u32 *cookie); | |||
23 | void sock_diag_save_cookie(void *sk, __u32 *cookie); | 23 | void sock_diag_save_cookie(void *sk, __u32 *cookie); |
24 | 24 | ||
25 | int sock_diag_put_meminfo(struct sock *sk, struct sk_buff *skb, int attr); | 25 | int sock_diag_put_meminfo(struct sock *sk, struct sk_buff *skb, int attr); |
26 | int sock_diag_put_filterinfo(struct user_namespace *user_ns, struct sock *sk, | 26 | int sock_diag_put_filterinfo(bool may_report_filterinfo, struct sock *sk, |
27 | struct sk_buff *skb, int attrtype); | 27 | struct sk_buff *skb, int attrtype); |
28 | 28 | ||
29 | #endif | 29 | #endif |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 036cccd80d9f..1c3316a47d7e 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -61,7 +61,6 @@ struct tty_bufhead { | |||
61 | struct tty_buffer *head; /* Queue head */ | 61 | struct tty_buffer *head; /* Queue head */ |
62 | struct work_struct work; | 62 | struct work_struct work; |
63 | struct mutex lock; | 63 | struct mutex lock; |
64 | spinlock_t flush_lock; | ||
65 | atomic_t priority; | 64 | atomic_t priority; |
66 | struct tty_buffer sentinel; | 65 | struct tty_buffer sentinel; |
67 | struct llist_head free; /* Free queue head */ | 66 | struct llist_head free; /* Free queue head */ |
diff --git a/include/linux/vexpress.h b/include/linux/vexpress.h index 617c01b8f74a..a4c9547aae64 100644 --- a/include/linux/vexpress.h +++ b/include/linux/vexpress.h | |||
@@ -15,28 +15,15 @@ | |||
15 | #define _LINUX_VEXPRESS_H | 15 | #define _LINUX_VEXPRESS_H |
16 | 16 | ||
17 | #include <linux/device.h> | 17 | #include <linux/device.h> |
18 | #include <linux/platform_device.h> | ||
18 | #include <linux/reboot.h> | 19 | #include <linux/reboot.h> |
20 | #include <linux/regmap.h> | ||
19 | 21 | ||
20 | #define VEXPRESS_SITE_MB 0 | 22 | #define VEXPRESS_SITE_MB 0 |
21 | #define VEXPRESS_SITE_DB1 1 | 23 | #define VEXPRESS_SITE_DB1 1 |
22 | #define VEXPRESS_SITE_DB2 2 | 24 | #define VEXPRESS_SITE_DB2 2 |
23 | #define VEXPRESS_SITE_MASTER 0xf | 25 | #define VEXPRESS_SITE_MASTER 0xf |
24 | 26 | ||
25 | #define VEXPRESS_CONFIG_STATUS_DONE 0 | ||
26 | #define VEXPRESS_CONFIG_STATUS_WAIT 1 | ||
27 | |||
28 | #define VEXPRESS_GPIO_MMC_CARDIN 0 | ||
29 | #define VEXPRESS_GPIO_MMC_WPROT 1 | ||
30 | #define VEXPRESS_GPIO_FLASH_WPn 2 | ||
31 | #define VEXPRESS_GPIO_LED0 3 | ||
32 | #define VEXPRESS_GPIO_LED1 4 | ||
33 | #define VEXPRESS_GPIO_LED2 5 | ||
34 | #define VEXPRESS_GPIO_LED3 6 | ||
35 | #define VEXPRESS_GPIO_LED4 7 | ||
36 | #define VEXPRESS_GPIO_LED5 8 | ||
37 | #define VEXPRESS_GPIO_LED6 9 | ||
38 | #define VEXPRESS_GPIO_LED7 10 | ||
39 | |||
40 | #define VEXPRESS_RES_FUNC(_site, _func) \ | 27 | #define VEXPRESS_RES_FUNC(_site, _func) \ |
41 | { \ | 28 | { \ |
42 | .start = (_site), \ | 29 | .start = (_site), \ |
@@ -44,84 +31,43 @@ | |||
44 | .flags = IORESOURCE_BUS, \ | 31 | .flags = IORESOURCE_BUS, \ |
45 | } | 32 | } |
46 | 33 | ||
47 | /* Config bridge API */ | 34 | /* Config infrastructure */ |
48 | 35 | ||
49 | /** | 36 | void vexpress_config_set_master(u32 site); |
50 | * struct vexpress_config_bridge_info - description of the platform | 37 | u32 vexpress_config_get_master(void); |
51 | * configuration infrastructure bridge. | ||
52 | * | ||
53 | * @name: Bridge name | ||
54 | * | ||
55 | * @func_get: Obtains pointer to a configuration function for a given | ||
56 | * device or a Device Tree node, to be used with @func_put | ||
57 | * and @func_exec. The node pointer should take precedence | ||
58 | * over device pointer when both are passed. | ||
59 | * | ||
60 | * @func_put: Tells the bridge that the function will not be used any | ||
61 | * more, so all allocated resources can be released. | ||
62 | * | ||
63 | * @func_exec: Executes a configuration function read or write operation. | ||
64 | * The offset selects a 32 bit word of the value accessed. | ||
65 | * Must return VEXPRESS_CONFIG_STATUS_DONE when operation | ||
66 | * is finished immediately, VEXPRESS_CONFIG_STATUS_WAIT when | ||
67 | * will be completed in some time or negative value in case | ||
68 | * of error. | ||
69 | */ | ||
70 | struct vexpress_config_bridge_info { | ||
71 | const char *name; | ||
72 | void *(*func_get)(struct device *dev, struct device_node *node); | ||
73 | void (*func_put)(void *func); | ||
74 | int (*func_exec)(void *func, int offset, bool write, u32 *data); | ||
75 | }; | ||
76 | 38 | ||
77 | struct vexpress_config_bridge; | 39 | void vexpress_config_lock(void *arg); |
40 | void vexpress_config_unlock(void *arg); | ||
78 | 41 | ||
79 | struct vexpress_config_bridge *vexpress_config_bridge_register( | 42 | int vexpress_config_get_topo(struct device_node *node, u32 *site, |
80 | struct device_node *node, | 43 | u32 *position, u32 *dcc); |
81 | struct vexpress_config_bridge_info *info); | ||
82 | void vexpress_config_bridge_unregister(struct vexpress_config_bridge *bridge); | ||
83 | 44 | ||
84 | void vexpress_config_complete(struct vexpress_config_bridge *bridge, | 45 | /* Config bridge API */ |
85 | int status); | ||
86 | 46 | ||
87 | /* Config function API */ | 47 | struct vexpress_config_bridge_ops { |
48 | struct regmap * (*regmap_init)(struct device *dev, void *context); | ||
49 | void (*regmap_exit)(struct regmap *regmap, void *context); | ||
50 | }; | ||
88 | 51 | ||
89 | struct vexpress_config_func; | 52 | struct device *vexpress_config_bridge_register(struct device *parent, |
53 | struct vexpress_config_bridge_ops *ops, void *context); | ||
90 | 54 | ||
91 | struct vexpress_config_func *__vexpress_config_func_get(struct device *dev, | 55 | /* Config regmap API */ |
92 | struct device_node *node); | ||
93 | #define vexpress_config_func_get_by_dev(dev) \ | ||
94 | __vexpress_config_func_get(dev, NULL) | ||
95 | #define vexpress_config_func_get_by_node(node) \ | ||
96 | __vexpress_config_func_get(NULL, node) | ||
97 | void vexpress_config_func_put(struct vexpress_config_func *func); | ||
98 | 56 | ||
99 | /* Both may sleep! */ | 57 | struct regmap *devm_regmap_init_vexpress_config(struct device *dev); |
100 | int vexpress_config_read(struct vexpress_config_func *func, int offset, | ||
101 | u32 *data); | ||
102 | int vexpress_config_write(struct vexpress_config_func *func, int offset, | ||
103 | u32 data); | ||
104 | 58 | ||
105 | /* Platform control */ | 59 | /* Platform control */ |
106 | 60 | ||
61 | unsigned int vexpress_get_mci_cardin(struct device *dev); | ||
107 | u32 vexpress_get_procid(int site); | 62 | u32 vexpress_get_procid(int site); |
108 | u32 vexpress_get_hbi(int site); | ||
109 | void *vexpress_get_24mhz_clock_base(void); | 63 | void *vexpress_get_24mhz_clock_base(void); |
110 | void vexpress_flags_set(u32 data); | 64 | void vexpress_flags_set(u32 data); |
111 | 65 | ||
112 | #define vexpress_get_site_by_node(node) __vexpress_get_site(NULL, node) | ||
113 | #define vexpress_get_site_by_dev(dev) __vexpress_get_site(dev, NULL) | ||
114 | unsigned __vexpress_get_site(struct device *dev, struct device_node *node); | ||
115 | |||
116 | void vexpress_sysreg_early_init(void __iomem *base); | 66 | void vexpress_sysreg_early_init(void __iomem *base); |
117 | void vexpress_sysreg_of_early_init(void); | 67 | int vexpress_syscfg_device_register(struct platform_device *pdev); |
118 | 68 | ||
119 | /* Clocks */ | 69 | /* Clocks */ |
120 | 70 | ||
121 | struct clk *vexpress_osc_setup(struct device *dev); | ||
122 | void vexpress_osc_of_setup(struct device_node *node); | ||
123 | |||
124 | void vexpress_clk_init(void __iomem *sp810_base); | 71 | void vexpress_clk_init(void __iomem *sp810_base); |
125 | void vexpress_clk_of_init(void); | ||
126 | 72 | ||
127 | #endif | 73 | #endif |