Merge tag 'rtc-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
[deliverable/linux.git] / arch / ia64 / kernel / machvec.c
CommitLineData
1da177e4 1#include <linux/module.h>
160c1d8e 2#include <linux/dma-mapping.h>
1da177e4 3#include <asm/machvec.h>
1da177e4
LT
4
5#ifdef CONFIG_IA64_GENERIC
6
7#include <linux/kernel.h>
8#include <linux/string.h>
9
10#include <asm/page.h>
11
12struct ia64_machine_vector ia64_mv;
13EXPORT_SYMBOL(ia64_mv);
14
a5b00bb4 15static struct ia64_machine_vector * __init
1da177e4
LT
16lookup_machvec (const char *name)
17{
18 extern struct ia64_machine_vector machvec_start[];
19 extern struct ia64_machine_vector machvec_end[];
20 struct ia64_machine_vector *mv;
21
22 for (mv = machvec_start; mv < machvec_end; ++mv)
23 if (strcmp (mv->name, name) == 0)
24 return mv;
25
26 return 0;
27}
28
9a86bbb9 29void __init
1da177e4
LT
30machvec_init (const char *name)
31{
32 struct ia64_machine_vector *mv;
33
a5b00bb4 34 if (!name)
a07ee862 35 name = acpi_get_sysname();
1da177e4 36 mv = lookup_machvec(name);
a5b00bb4
H
37 if (!mv)
38 panic("generic kernel failed to find machine vector for"
39 " platform %s!", name);
40
1da177e4
LT
41 ia64_mv = *mv;
42 printk(KERN_INFO "booting generic kernel on platform %s\n", name);
43}
44
a07ee862
H
45void __init
46machvec_init_from_cmdline(const char *cmdline)
47{
48 char str[64];
49 const char *start;
50 char *end;
51
52 if (! (start = strstr(cmdline, "machvec=")) )
53 return machvec_init(NULL);
54
55 strlcpy(str, start + strlen("machvec="), sizeof(str));
56 if ( (end = strchr(str, ' ')) )
57 *end = '\0';
58
59 return machvec_init(str);
60}
61
1da177e4
LT
62#endif /* CONFIG_IA64_GENERIC */
63
64void
65machvec_setup (char **arg)
66{
67}
68EXPORT_SYMBOL(machvec_setup);
69
70void
7d12e780 71machvec_timer_interrupt (int irq, void *dev_id)
1da177e4
LT
72{
73}
74EXPORT_SYMBOL(machvec_timer_interrupt);
75
76void
160c1d8e
FT
77machvec_dma_sync_single(struct device *hwdev, dma_addr_t dma_handle, size_t size,
78 enum dma_data_direction dir)
1da177e4
LT
79{
80 mb();
81}
82EXPORT_SYMBOL(machvec_dma_sync_single);
83
84void
160c1d8e
FT
85machvec_dma_sync_sg(struct device *hwdev, struct scatterlist *sg, int n,
86 enum dma_data_direction dir)
1da177e4
LT
87{
88 mb();
89}
90EXPORT_SYMBOL(machvec_dma_sync_sg);
This page took 0.813194 seconds and 5 git commands to generate.