Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 13 files changed
  • 0 comments
  • 1 contributor
Jul 13, 2013
Lars-Peter Clausen lm32: Fix header file export
Add support for using uapi for header file exporting.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
227108f
Lars-Peter Clausen lm32: Use CLKSRC_OF for timer setup
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
5e45237
1  arch/lm32/Kconfig
@@ -12,6 +12,7 @@ config LM32
12 12
 	select ARCH_REQUIRE_GPIOLIB
13 13
 	select OF
14 14
 	select OF_EARLY_FLATTREE
  15
+	select CLKSRC_OF
15 16
 	select HAVE_MEMBLOCK
16 17
 	select MODULES_USE_ELF_REL
17 18
 	select MODULES_USE_ELF_RELA
6  arch/lm32/boot/dts/milkymist_one.dts
@@ -81,6 +81,12 @@
81 81
 			interrupt-parent = <&pic>;
82 82
 		};
83 83
 
  84
+		timer@1000 {
  85
+			compatible = "milkymist,timer";
  86
+			reg = <0x1000 0x1000>;
  87
+			interrupts = <1 2 3>;
  88
+		};
  89
+
84 90
 		sysctl: sysctl@1000 {
85 91
 			compatible = "milkymist,sysctl";
86 92
 			reg = <0x1000 0x1000>;
24  arch/lm32/include/asm/Kbuild
... ...
@@ -1,8 +1,6 @@
1 1
 include include/asm-generic/Kbuild.asm
2 2
 
3 3
 generic-y += atomic.h
4  
-generic-y += auxvec.h
5  
-generic-y += bitsperlong.h
6 4
 generic-y += bug.h
7 5
 generic-y += bugs.h
8 6
 generic-y += barrier.h
@@ -16,7 +14,6 @@ generic-y += device.h
16 14
 generic-y += div64.h
17 15
 generic-y += dma.h
18 16
 generic-y += emergency-restart.h
19  
-generic-y += errno.h
20 17
 generic-y += exec.h
21 18
 generic-y += fb.h
22 19
 generic-y += fcntl.h
@@ -24,48 +21,27 @@ generic-y += ftrace.h
24 21
 generic-y += futex.h
25 22
 generic-y += hardirq.h
26 23
 generic-y += hw_irq.h
27  
-generic-y += ioctl.h
28  
-generic-y += ioctls.h
29 24
 generic-y += io.h
30  
-generic-y += ipcbuf.h
31 25
 generic-y += irq_regs.h
32 26
 generic-y += kdebug.h
33 27
 generic-y += kmap_types.h
34 28
 generic-y += linkage.h
35 29
 generic-y += local.h
36  
-generic-y += mman.h
37 30
 generic-y += mmu_context.h
38 31
 generic-y += mmu.h
39 32
 generic-y += module.h
40  
-generic-y += msgbuf.h
41  
-generic-y += param.h
42 33
 generic-y += pci.h
43 34
 generic-y += percpu.h
44 35
 generic-y += pgalloc.h
45  
-generic-y += poll.h
46  
-generic-y += posix_types.h
47  
-generic-y += resource.h
48 36
 generic-y += scatterlist.h
49 37
 generic-y += segment.h
50  
-generic-y += sembuf.h
51 38
 generic-y += setup.h
52  
-generic-y += shmbuf.h
53 39
 generic-y += shmparam.h
54  
-generic-y += siginfo.h
55  
-generic-y += signal.h
56  
-generic-y += socket.h
57  
-generic-y += sockios.h
58  
-generic-y += statfs.h
59  
-generic-y += stat.h
60 40
 generic-y += string.h
61  
-generic-y += swab.h
62 41
 generic-y += syscalls.h
63  
-generic-y += termbits.h
64  
-generic-y += termios.h
65 42
 generic-y += tlb.h
66 43
 generic-y += tlbflush.h
67 44
 generic-y += topology.h
68  
-generic-y += types.h
69 45
 generic-y += ucontext.h
70 46
 generic-y += unaligned.h
71 47
 generic-y += user.h
16  arch/lm32/include/asm/byteorder.h
... ...
@@ -1,16 +0,0 @@
1  
-#ifndef _LM32_ASM_BYTEORDER_H
2  
-#define _LM32_ASM_BYTEORDER_H
3  
-
4  
-#include <asm/types.h>
5  
-
6  
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
7  
-// there is a 64bit data type supported by the processor
8  
-#  define __BYTEORDER_HAS_U64__
9  
-
10  
-// so we don't have to implement swab64 in assembler ;) 
11  
-#  define __SWAB_64_THRU_32__
12  
-#endif
13  
-
14  
-#include <linux/byteorder/big_endian.h>
15  
-
16  
-#endif /* _LM32_BYTEORDER_H */
9  arch/lm32/include/asm/time.h
... ...
@@ -1,9 +0,0 @@
1  
-#ifndef _ASM_LM32_TIME_H
2  
-#define _ASM_LM32_TIME_H
3  
-
4  
-/*
5  
- * board specific routines required by time_init().
6  
- */
7  
-extern void plat_time_init(void);
8  
-
9  
-#endif /* _ASM_TIME_H */
14  arch/lm32/include/asm/unistd.h
... ...
@@ -1,18 +1,6 @@
1 1
 #if !defined(_ASM_LM32_UNISTD_H) || defined(__SYSCALL)
2 2
 #define _ASM_LM32_UNISTD_H
3 3
 
4  
-#define __ARCH_WANT_SYSCALL_NO_AT
5  
-#define __ARCH_WANT_SYSCALL_NO_FLAGS
6  
-#define __ARCH_WANT_SYSCALL_OFF_T
7  
-#define __ARCH_WANT_SYSCALL_DEPRECATED
8  
-#define __ARCH_WANT_SYS_CLONE
9  
-
10  
-#include <asm-generic/unistd.h>
11  
-
12  
-#undef __NR_mmap
13  
-
14  
-#define sys_vfork sys_ni_syscall
15  
-#define sys_mmap sys_ni_syscall
16  
-#define sys_mmap2 sys_mmap_pgoff
  4
+#include <uapi/asm/unistd.h>
17 5
 
18 6
 #endif /* _ASM_LM32_UNISTD_H */
59  arch/lm32/include/uapi/asm/Kbuild
... ...
@@ -0,0 +1,59 @@
  1
+include include/uapi/asm-generic/Kbuild.asm
  2
+
  3
+generic-y += auxvec.h
  4
+generic-y += bitsperlong.h
  5
+generic-y += errno.h
  6
+generic-y += fcntl.h
  7
+generic-y += ioctl.h
  8
+generic-y += ioctls.h
  9
+generic-y += ipcbuf.h
  10
+generic-y += mman.h
  11
+generic-y += msgbuf.h
  12
+generic-y += param.h
  13
+generic-y += poll.h
  14
+generic-y += posix_types.h
  15
+generic-y += resource.h
  16
+generic-y += sembuf.h
  17
+generic-y += setup.h
  18
+generic-y += shmbuf.h
  19
+generic-y += siginfo.h
  20
+generic-y += signal.h
  21
+generic-y += socket.h
  22
+generic-y += sockios.h
  23
+generic-y += stat.h
  24
+generic-y += statfs.h
  25
+generic-y += swab.h
  26
+generic-y += termbits.h
  27
+generic-y += termios.h
  28
+generic-y += types.h
  29
+
  30
+generic-y += auxvec.h
  31
+header-y += bitsperlong.h
  32
+header-y += byteorder.h
  33
+header-y += elf.h
  34
+header-y += errno.h
  35
+header-y += fcntl.h
  36
+header-y += ioctl.h
  37
+header-y += ioctls.h
  38
+header-y += ipcbuf.h
  39
+header-y += mman.h
  40
+header-y += msgbuf.h
  41
+header-y += param.h
  42
+header-y += poll.h
  43
+header-y += posix_types.h
  44
+header-y += resource.h
  45
+header-y += sembuf.h
  46
+header-y += setup.h
  47
+header-y += shmbuf.h
  48
+header-y += sigcontext.h
  49
+header-y += siginfo.h
  50
+header-y += signal.h
  51
+header-y += socket.h
  52
+header-y += sockios.h
  53
+header-y += stat.h
  54
+header-y += statfs.h
  55
+header-y += swab.h
  56
+header-y += termbits.h
  57
+header-y += termios.h
  58
+header-y += types.h
  59
+header-y += unistd.h
1  arch/lm32/include/uapi/asm/byteorder.h
... ...
@@ -0,0 +1 @@
  1
+#include <linux/byteorder/big_endian.h>
5  arch/lm32/include/asm/elf.h → arch/lm32/include/uapi/asm/elf.h
@@ -110,9 +110,4 @@ do { \
110 110
 
111 111
 #define ELF_PLATFORM  (NULL)
112 112
 
113  
-// TODO SET_PERSONALITY
114  
-//#ifdef __KERNEL__
115  
-//#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
116  
-//#endif
117  
-
118 113
 #endif
0  arch/lm32/include/asm/sigcontext.h → arch/lm32/include/uapi/asm/sigcontext.h
File renamed without changes
13  arch/lm32/include/uapi/asm/unistd.h
... ...
@@ -0,0 +1,13 @@
  1
+#define __ARCH_WANT_SYSCALL_NO_AT
  2
+#define __ARCH_WANT_SYSCALL_NO_FLAGS
  3
+#define __ARCH_WANT_SYSCALL_OFF_T
  4
+#define __ARCH_WANT_SYSCALL_DEPRECATED
  5
+#define __ARCH_WANT_SYS_CLONE
  6
+
  7
+#include <asm-generic/unistd.h>
  8
+
  9
+#undef __NR_mmap
  10
+
  11
+#define sys_vfork sys_ni_syscall
  12
+#define sys_mmap sys_ni_syscall
  13
+#define sys_mmap2 sys_mmap_pgoff
4  arch/lm32/kernel/time.c
... ...
@@ -1,7 +1,7 @@
1 1
 #include <linux/kernel.h>
2  
-#include <asm/time.h>
  2
+#include <linux/clocksource.h>
3 3
 
4 4
 void __init time_init(void)
5 5
 {
6  
-	plat_time_init();
  6
+	clocksource_of_init();
7 7
 }
5  arch/lm32/platforms/milkymist/time.c
@@ -20,6 +20,7 @@
20 20
 #include <linux/clocksource.h>
21 21
 #include <linux/timex.h>
22 22
 #include <linux/io.h>
  23
+#include <linux/of.h>
23 24
 
24 25
 #include <asm/hw/interrupts.h>
25 26
 #include <asm/hw/sysctl.h>
@@ -138,7 +139,7 @@ static struct irqaction timer_irqaction = {
138 139
 	.dev_id		= &milkymist_clockevent,
139 140
 };
140 141
 
141  
-void __init plat_time_init(void)
  142
+void __init milkymist_timer_init(void)
142 143
 {
143 144
 	int ret;
144 145
 
@@ -159,3 +160,5 @@ void __init plat_time_init(void)
159 160
 
160 161
 	setup_irq(IRQ_TIMER0, &timer_irqaction);
161 162
 }
  163
+CLOCKSOURCE_OF_DECLARE(milkymist, "milkymist,timer",
  164
+                       milkymist_timer_init);

No commit comments for this range

Something went wrong with that request. Please try again.