aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/vmlinux.lds.h60
-rw-r--r--include/linux/clk-provider.h5
-rw-r--r--include/linux/clocksource.h16
-rw-r--r--include/linux/of.h22
-rw-r--r--include/linux/of_address.h1
-rw-r--r--include/linux/of_fdt.h64
-rw-r--r--include/linux/of_irq.h5
-rw-r--r--include/linux/of_pci.h36
-rw-r--r--include/linux/of_reserved_mem.h22
-rw-r--r--include/linux/serial_core.h6
-rw-r--r--include/linux/string.h3
11 files changed, 107 insertions, 133 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 146e4fffd710..d647637cd699 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -139,52 +139,23 @@
139#define TRACE_SYSCALLS() 139#define TRACE_SYSCALLS()
140#endif 140#endif
141 141
142#ifdef CONFIG_CLKSRC_OF
143#define CLKSRC_OF_TABLES() . = ALIGN(8); \
144 VMLINUX_SYMBOL(__clksrc_of_table) = .; \
145 *(__clksrc_of_table) \
146 *(__clksrc_of_table_end)
147#else
148#define CLKSRC_OF_TABLES()
149#endif
150 142
151#ifdef CONFIG_IRQCHIP 143#define ___OF_TABLE(cfg, name) _OF_TABLE_##cfg(name)
152#define IRQCHIP_OF_MATCH_TABLE() \ 144#define __OF_TABLE(cfg, name) ___OF_TABLE(cfg, name)
145#define OF_TABLE(cfg, name) __OF_TABLE(config_enabled(cfg), name)
146#define _OF_TABLE_0(name)
147#define _OF_TABLE_1(name) \
153 . = ALIGN(8); \ 148 . = ALIGN(8); \
154 VMLINUX_SYMBOL(__irqchip_begin) = .; \ 149 VMLINUX_SYMBOL(__##name##_of_table) = .; \
155 *(__irqchip_of_table) \ 150 *(__##name##_of_table) \
156 *(__irqchip_of_end) 151 *(__##name##_of_table_end)
157#else
158#define IRQCHIP_OF_MATCH_TABLE()
159#endif
160
161#ifdef CONFIG_COMMON_CLK
162#define CLK_OF_TABLES() . = ALIGN(8); \
163 VMLINUX_SYMBOL(__clk_of_table) = .; \
164 *(__clk_of_table) \
165 *(__clk_of_table_end)
166#else
167#define CLK_OF_TABLES()
168#endif
169
170#ifdef CONFIG_OF_RESERVED_MEM
171#define RESERVEDMEM_OF_TABLES() \
172 . = ALIGN(8); \
173 VMLINUX_SYMBOL(__reservedmem_of_table) = .; \
174 *(__reservedmem_of_table) \
175 *(__reservedmem_of_table_end)
176#else
177#define RESERVEDMEM_OF_TABLES()
178#endif
179 152
180#ifdef CONFIG_SMP 153#define CLKSRC_OF_TABLES() OF_TABLE(CONFIG_CLKSRC_OF, clksrc)
181#define CPU_METHOD_OF_TABLES() . = ALIGN(8); \ 154#define IRQCHIP_OF_MATCH_TABLE() OF_TABLE(CONFIG_IRQCHIP, irqchip)
182 VMLINUX_SYMBOL(__cpu_method_of_table_begin) = .; \ 155#define CLK_OF_TABLES() OF_TABLE(CONFIG_COMMON_CLK, clk)
183 *(__cpu_method_of_table) \ 156#define RESERVEDMEM_OF_TABLES() OF_TABLE(CONFIG_OF_RESERVED_MEM, reservedmem)
184 VMLINUX_SYMBOL(__cpu_method_of_table_end) = .; 157#define CPU_METHOD_OF_TABLES() OF_TABLE(CONFIG_SMP, cpu_method)
185#else 158#define EARLYCON_OF_TABLES() OF_TABLE(CONFIG_SERIAL_EARLYCON, earlycon)
186#define CPU_METHOD_OF_TABLES()
187#endif
188 159
189#define KERNEL_DTB() \ 160#define KERNEL_DTB() \
190 STRUCT_ALIGN(); \ 161 STRUCT_ALIGN(); \
@@ -513,7 +484,8 @@
513 CLKSRC_OF_TABLES() \ 484 CLKSRC_OF_TABLES() \
514 CPU_METHOD_OF_TABLES() \ 485 CPU_METHOD_OF_TABLES() \
515 KERNEL_DTB() \ 486 KERNEL_DTB() \
516 IRQCHIP_OF_MATCH_TABLE() 487 IRQCHIP_OF_MATCH_TABLE() \
488 EARLYCON_OF_TABLES()
517 489
518#define INIT_TEXT \ 490#define INIT_TEXT \
519 *(.init.text) \ 491 *(.init.text) \
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index fb4eca6907cd..f295bab1865d 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -529,10 +529,7 @@ struct clk_onecell_data {
529 529
530extern struct of_device_id __clk_of_table; 530extern struct of_device_id __clk_of_table;
531 531
532#define CLK_OF_DECLARE(name, compat, fn) \ 532#define CLK_OF_DECLARE(name, compat, fn) OF_DECLARE_1(clk, name, compat, fn)
533 static const struct of_device_id __clk_of_table_##name \
534 __used __section(__clk_of_table) \
535 = { .compatible = compat, .data = fn };
536 533
537#ifdef CONFIG_OF 534#ifdef CONFIG_OF
538int of_clk_add_provider(struct device_node *np, 535int of_clk_add_provider(struct device_node *np,
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index 67301a405712..a16b497d5159 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -339,23 +339,13 @@ extern int clocksource_mmio_init(void __iomem *, const char *,
339 339
340extern int clocksource_i8253_init(void); 340extern int clocksource_i8253_init(void);
341 341
342struct device_node; 342#define CLOCKSOURCE_OF_DECLARE(name, compat, fn) \
343typedef void(*clocksource_of_init_fn)(struct device_node *); 343 OF_DECLARE_1(clksrc, name, compat, fn)
344
344#ifdef CONFIG_CLKSRC_OF 345#ifdef CONFIG_CLKSRC_OF
345extern void clocksource_of_init(void); 346extern void clocksource_of_init(void);
346
347#define CLOCKSOURCE_OF_DECLARE(name, compat, fn) \
348 static const struct of_device_id __clksrc_of_table_##name \
349 __used __section(__clksrc_of_table) \
350 = { .compatible = compat, \
351 .data = (fn == (clocksource_of_init_fn)NULL) ? fn : fn }
352#else 347#else
353static inline void clocksource_of_init(void) {} 348static inline void clocksource_of_init(void) {}
354#define CLOCKSOURCE_OF_DECLARE(name, compat, fn) \
355 static const struct of_device_id __clksrc_of_table_##name \
356 __attribute__((unused)) \
357 = { .compatible = compat, \
358 .data = (fn == (clocksource_of_init_fn)NULL) ? fn : fn }
359#endif 349#endif
360 350
361#endif /* _LINUX_CLOCKSOURCE_H */ 351#endif /* _LINUX_CLOCKSOURCE_H */
diff --git a/include/linux/of.h b/include/linux/of.h
index fa362867b453..196b34c1ef4e 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -764,4 +764,26 @@ static inline int of_get_available_child_count(const struct device_node *np)
764 return num; 764 return num;
765} 765}
766 766
767#ifdef CONFIG_OF
768#define _OF_DECLARE(table, name, compat, fn, fn_type) \
769 static const struct of_device_id __of_table_##name \
770 __used __section(__##table##_of_table) \
771 = { .compatible = compat, \
772 .data = (fn == (fn_type)NULL) ? fn : fn }
773#else
774#define _OF_DECLARE(table, name, compat, fn, fn_type) \
775 static const struct of_device_id __of_table_##name \
776 __attribute__((unused)) \
777 = { .compatible = compat, \
778 .data = (fn == (fn_type)NULL) ? fn : fn }
779#endif
780
781typedef int (*of_init_fn_2)(struct device_node *, struct device_node *);
782typedef void (*of_init_fn_1)(struct device_node *);
783
784#define OF_DECLARE_1(table, name, compat, fn) \
785 _OF_DECLARE(table, name, compat, fn, of_init_fn_1)
786#define OF_DECLARE_2(table, name, compat, fn) \
787 _OF_DECLARE(table, name, compat, fn, of_init_fn_2)
788
767#endif /* _LINUX_OF_H */ 789#endif /* _LINUX_OF_H */
diff --git a/include/linux/of_address.h b/include/linux/of_address.h
index 5f6ed6b182b8..906ca7681756 100644
--- a/include/linux/of_address.h
+++ b/include/linux/of_address.h
@@ -40,7 +40,6 @@ extern u64 of_translate_dma_address(struct device_node *dev,
40 40
41#ifdef CONFIG_OF_ADDRESS 41#ifdef CONFIG_OF_ADDRESS
42extern u64 of_translate_address(struct device_node *np, const __be32 *addr); 42extern u64 of_translate_address(struct device_node *np, const __be32 *addr);
43extern bool of_can_translate_address(struct device_node *dev);
44extern int of_address_to_resource(struct device_node *dev, int index, 43extern int of_address_to_resource(struct device_node *dev, int index,
45 struct resource *r); 44 struct resource *r);
46extern struct device_node *of_find_matching_node_by_address( 45extern struct device_node *of_find_matching_node_by_address(
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index ddd7219af8ac..05117899fcb4 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -17,60 +17,23 @@
17 17
18/* Definitions used by the flattened device tree */ 18/* Definitions used by the flattened device tree */
19#define OF_DT_HEADER 0xd00dfeed /* marker */ 19#define OF_DT_HEADER 0xd00dfeed /* marker */
20#define OF_DT_BEGIN_NODE 0x1 /* Start of node, full name */
21#define OF_DT_END_NODE 0x2 /* End node */
22#define OF_DT_PROP 0x3 /* Property: name off, size,
23 * content */
24#define OF_DT_NOP 0x4 /* nop */
25#define OF_DT_END 0x9
26
27#define OF_DT_VERSION 0x10
28 20
29#ifndef __ASSEMBLY__ 21#ifndef __ASSEMBLY__
30/*
31 * This is what gets passed to the kernel by prom_init or kexec
32 *
33 * The dt struct contains the device tree structure, full pathes and
34 * property contents. The dt strings contain a separate block with just
35 * the strings for the property names, and is fully page aligned and
36 * self contained in a page, so that it can be kept around by the kernel,
37 * each property name appears only once in this page (cheap compression)
38 *
39 * the mem_rsvmap contains a map of reserved ranges of physical memory,
40 * passing it here instead of in the device-tree itself greatly simplifies
41 * the job of everybody. It's just a list of u64 pairs (base/size) that
42 * ends when size is 0
43 */
44struct boot_param_header {
45 __be32 magic; /* magic word OF_DT_HEADER */
46 __be32 totalsize; /* total size of DT block */
47 __be32 off_dt_struct; /* offset to structure */
48 __be32 off_dt_strings; /* offset to strings */
49 __be32 off_mem_rsvmap; /* offset to memory reserve map */
50 __be32 version; /* format version */
51 __be32 last_comp_version; /* last compatible version */
52 /* version 2 fields below */
53 __be32 boot_cpuid_phys; /* Physical CPU id we're booting on */
54 /* version 3 fields below */
55 __be32 dt_strings_size; /* size of the DT strings block */
56 /* version 17 fields below */
57 __be32 dt_struct_size; /* size of the DT structure block */
58};
59 22
60#if defined(CONFIG_OF_FLATTREE) 23#if defined(CONFIG_OF_FLATTREE)
61 24
62struct device_node; 25struct device_node;
63 26
64/* For scanning an arbitrary device-tree at any time */ 27/* For scanning an arbitrary device-tree at any time */
65extern char *of_fdt_get_string(struct boot_param_header *blob, u32 offset); 28extern char *of_fdt_get_string(const void *blob, u32 offset);
66extern void *of_fdt_get_property(struct boot_param_header *blob, 29extern void *of_fdt_get_property(const void *blob,
67 unsigned long node, 30 unsigned long node,
68 const char *name, 31 const char *name,
69 unsigned long *size); 32 int *size);
70extern int of_fdt_is_compatible(struct boot_param_header *blob, 33extern int of_fdt_is_compatible(const void *blob,
71 unsigned long node, 34 unsigned long node,
72 const char *compat); 35 const char *compat);
73extern int of_fdt_match(struct boot_param_header *blob, unsigned long node, 36extern int of_fdt_match(const void *blob, unsigned long node,
74 const char *const *compat); 37 const char *const *compat);
75extern void of_fdt_unflatten_tree(unsigned long *blob, 38extern void of_fdt_unflatten_tree(unsigned long *blob,
76 struct device_node **mynodes); 39 struct device_node **mynodes);
@@ -78,21 +41,21 @@ extern void of_fdt_unflatten_tree(unsigned long *blob,
78/* TBD: Temporary export of fdt globals - remove when code fully merged */ 41/* TBD: Temporary export of fdt globals - remove when code fully merged */
79extern int __initdata dt_root_addr_cells; 42extern int __initdata dt_root_addr_cells;
80extern int __initdata dt_root_size_cells; 43extern int __initdata dt_root_size_cells;
81extern struct boot_param_header *initial_boot_params; 44extern void *initial_boot_params;
45
46extern char __dtb_start[];
47extern char __dtb_end[];
82 48
83/* For scanning the flat device-tree at boot time */ 49/* For scanning the flat device-tree at boot time */
84extern char *find_flat_dt_string(u32 offset);
85extern int of_scan_flat_dt(int (*it)(unsigned long node, const char *uname, 50extern int of_scan_flat_dt(int (*it)(unsigned long node, const char *uname,
86 int depth, void *data), 51 int depth, void *data),
87 void *data); 52 void *data);
88extern void *of_get_flat_dt_prop(unsigned long node, const char *name, 53extern const void *of_get_flat_dt_prop(unsigned long node, const char *name,
89 unsigned long *size); 54 int *size);
90extern int of_flat_dt_is_compatible(unsigned long node, const char *name); 55extern int of_flat_dt_is_compatible(unsigned long node, const char *name);
91extern int of_flat_dt_match(unsigned long node, const char *const *matches); 56extern int of_flat_dt_match(unsigned long node, const char *const *matches);
92extern unsigned long of_get_flat_dt_root(void); 57extern unsigned long of_get_flat_dt_root(void);
93extern int of_scan_flat_dt_by_path(const char *path, 58extern int of_get_flat_dt_size(void);
94 int (*it)(unsigned long node, const char *name, int depth, void *data),
95 void *data);
96 59
97extern int early_init_dt_scan_chosen(unsigned long node, const char *uname, 60extern int early_init_dt_scan_chosen(unsigned long node, const char *uname,
98 int depth, void *data); 61 int depth, void *data);
@@ -103,7 +66,7 @@ extern void early_init_dt_add_memory_arch(u64 base, u64 size);
103extern int early_init_dt_reserve_memory_arch(phys_addr_t base, phys_addr_t size, 66extern int early_init_dt_reserve_memory_arch(phys_addr_t base, phys_addr_t size,
104 bool no_map); 67 bool no_map);
105extern void * early_init_dt_alloc_memory_arch(u64 size, u64 align); 68extern void * early_init_dt_alloc_memory_arch(u64 size, u64 align);
106extern u64 dt_mem_next_cell(int s, __be32 **cellp); 69extern u64 dt_mem_next_cell(int s, const __be32 **cellp);
107 70
108/* Early flat tree scan hooks */ 71/* Early flat tree scan hooks */
109extern int early_init_dt_scan_root(unsigned long node, const char *uname, 72extern int early_init_dt_scan_root(unsigned long node, const char *uname,
@@ -120,6 +83,7 @@ extern void unflatten_device_tree(void);
120extern void unflatten_and_copy_device_tree(void); 83extern void unflatten_and_copy_device_tree(void);
121extern void early_init_devtree(void *); 84extern void early_init_devtree(void *);
122extern void early_get_first_memblock_info(void *, phys_addr_t *); 85extern void early_get_first_memblock_info(void *, phys_addr_t *);
86extern u64 fdt_translate_address(const void *blob, int node_offset);
123#else /* CONFIG_OF_FLATTREE */ 87#else /* CONFIG_OF_FLATTREE */
124static inline void early_init_fdt_scan_reserved_mem(void) {} 88static inline void early_init_fdt_scan_reserved_mem(void) {}
125static inline const char *of_flat_dt_get_machine_name(void) { return NULL; } 89static inline const char *of_flat_dt_get_machine_name(void) { return NULL; }
diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h
index 6404253d810d..bfec136a6d1e 100644
--- a/include/linux/of_irq.h
+++ b/include/linux/of_irq.h
@@ -45,6 +45,7 @@ extern void of_irq_init(const struct of_device_id *matches);
45#ifdef CONFIG_OF_IRQ 45#ifdef CONFIG_OF_IRQ
46extern int of_irq_count(struct device_node *dev); 46extern int of_irq_count(struct device_node *dev);
47extern int of_irq_get(struct device_node *dev, int index); 47extern int of_irq_get(struct device_node *dev, int index);
48extern int of_irq_get_byname(struct device_node *dev, const char *name);
48#else 49#else
49static inline int of_irq_count(struct device_node *dev) 50static inline int of_irq_count(struct device_node *dev)
50{ 51{
@@ -54,6 +55,10 @@ static inline int of_irq_get(struct device_node *dev, int index)
54{ 55{
55 return 0; 56 return 0;
56} 57}
58static inline int of_irq_get_byname(struct device_node *dev, const char *name)
59{
60 return 0;
61}
57#endif 62#endif
58 63
59#if defined(CONFIG_OF) 64#if defined(CONFIG_OF)
diff --git a/include/linux/of_pci.h b/include/linux/of_pci.h
index 1a1f5ffd5288..dde3a4a0fa5d 100644
--- a/include/linux/of_pci.h
+++ b/include/linux/of_pci.h
@@ -6,14 +6,44 @@
6 6
7struct pci_dev; 7struct pci_dev;
8struct of_phandle_args; 8struct of_phandle_args;
9int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq);
10int of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin);
11
12struct device_node; 9struct device_node;
10
11#ifdef CONFIG_OF
12int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq);
13struct device_node *of_pci_find_child_device(struct device_node *parent, 13struct device_node *of_pci_find_child_device(struct device_node *parent,
14 unsigned int devfn); 14 unsigned int devfn);
15int of_pci_get_devfn(struct device_node *np); 15int of_pci_get_devfn(struct device_node *np);
16int of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin);
16int of_pci_parse_bus_range(struct device_node *node, struct resource *res); 17int of_pci_parse_bus_range(struct device_node *node, struct resource *res);
18#else
19static inline int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq)
20{
21 return 0;
22}
23
24static inline struct device_node *of_pci_find_child_device(struct device_node *parent,
25 unsigned int devfn)
26{
27 return NULL;
28}
29
30static inline int of_pci_get_devfn(struct device_node *np)
31{
32 return -EINVAL;
33}
34
35static inline int
36of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin)
37{
38 return 0;
39}
40
41static inline int
42of_pci_parse_bus_range(struct device_node *node, struct resource *res)
43{
44 return -EINVAL;
45}
46#endif
17 47
18#if defined(CONFIG_OF) && defined(CONFIG_PCI_MSI) 48#if defined(CONFIG_OF) && defined(CONFIG_PCI_MSI)
19int of_pci_msi_chip_add(struct msi_chip *chip); 49int of_pci_msi_chip_add(struct msi_chip *chip);
diff --git a/include/linux/of_reserved_mem.h b/include/linux/of_reserved_mem.h
index 9b1fbb7f29fc..4669ddfdd5af 100644
--- a/include/linux/of_reserved_mem.h
+++ b/include/linux/of_reserved_mem.h
@@ -21,33 +21,19 @@ struct reserved_mem_ops {
21 struct device *dev); 21 struct device *dev);
22}; 22};
23 23
24typedef int (*reservedmem_of_init_fn)(struct reserved_mem *rmem, 24typedef int (*reservedmem_of_init_fn)(struct reserved_mem *rmem);
25 unsigned long node, const char *uname); 25
26#define RESERVEDMEM_OF_DECLARE(name, compat, init) \
27 _OF_DECLARE(reservedmem, name, compat, init, reservedmem_of_init_fn)
26 28
27#ifdef CONFIG_OF_RESERVED_MEM 29#ifdef CONFIG_OF_RESERVED_MEM
28void fdt_init_reserved_mem(void); 30void fdt_init_reserved_mem(void);
29void fdt_reserved_mem_save_node(unsigned long node, const char *uname, 31void fdt_reserved_mem_save_node(unsigned long node, const char *uname,
30 phys_addr_t base, phys_addr_t size); 32 phys_addr_t base, phys_addr_t size);
31
32#define RESERVEDMEM_OF_DECLARE(name, compat, init) \
33 static const struct of_device_id __reservedmem_of_table_##name \
34 __used __section(__reservedmem_of_table) \
35 = { .compatible = compat, \
36 .data = (init == (reservedmem_of_init_fn)NULL) ? \
37 init : init }
38
39#else 33#else
40static inline void fdt_init_reserved_mem(void) { } 34static inline void fdt_init_reserved_mem(void) { }
41static inline void fdt_reserved_mem_save_node(unsigned long node, 35static inline void fdt_reserved_mem_save_node(unsigned long node,
42 const char *uname, phys_addr_t base, phys_addr_t size) { } 36 const char *uname, phys_addr_t base, phys_addr_t size) { }
43
44#define RESERVEDMEM_OF_DECLARE(name, compat, init) \
45 static const struct of_device_id __reservedmem_of_table_##name \
46 __attribute__((unused)) \
47 = { .compatible = compat, \
48 .data = (init == (reservedmem_of_init_fn)NULL) ? \
49 init : init }
50
51#endif 37#endif
52 38
53#endif /* __OF_RESERVED_MEM_H */ 39#endif /* __OF_RESERVED_MEM_H */
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 7a15b5b24c0b..5bbb809ee197 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -294,6 +294,9 @@ struct earlycon_device {
294int setup_earlycon(char *buf, const char *match, 294int setup_earlycon(char *buf, const char *match,
295 int (*setup)(struct earlycon_device *, const char *)); 295 int (*setup)(struct earlycon_device *, const char *));
296 296
297extern int of_setup_earlycon(unsigned long addr,
298 int (*setup)(struct earlycon_device *, const char *));
299
297#define EARLYCON_DECLARE(name, func) \ 300#define EARLYCON_DECLARE(name, func) \
298static int __init name ## _setup_earlycon(char *buf) \ 301static int __init name ## _setup_earlycon(char *buf) \
299{ \ 302{ \
@@ -301,6 +304,9 @@ static int __init name ## _setup_earlycon(char *buf) \
301} \ 304} \
302early_param("earlycon", name ## _setup_earlycon); 305early_param("earlycon", name ## _setup_earlycon);
303 306
307#define OF_EARLYCON_DECLARE(name, compat, fn) \
308 _OF_DECLARE(earlycon, name, compat, fn, void *)
309
304struct uart_port *uart_get_console(struct uart_port *ports, int nr, 310struct uart_port *uart_get_console(struct uart_port *ports, int nr,
305 struct console *c); 311 struct console *c);
306void uart_parse_options(char *options, int *baud, int *parity, int *bits, 312void uart_parse_options(char *options, int *baud, int *parity, int *bits,
diff --git a/include/linux/string.h b/include/linux/string.h
index ac889c5ea11b..d36977e029af 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -52,6 +52,9 @@ extern int strncasecmp(const char *s1, const char *s2, size_t n);
52#ifndef __HAVE_ARCH_STRCHR 52#ifndef __HAVE_ARCH_STRCHR
53extern char * strchr(const char *,int); 53extern char * strchr(const char *,int);
54#endif 54#endif
55#ifndef __HAVE_ARCH_STRCHRNUL
56extern char * strchrnul(const char *,int);
57#endif
55#ifndef __HAVE_ARCH_STRNCHR 58#ifndef __HAVE_ARCH_STRNCHR
56extern char * strnchr(const char *, size_t, int); 59extern char * strnchr(const char *, size_t, int);
57#endif 60#endif