summaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/patches/110-sdk-compat.patch
blob: ca8d92eda31caa4c86fdf7339613f19a23b1a288 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
--- /dev/null
+++ b/arch/mips/include/asm/mach-lantiq/falcon/sysctrl.h
@@ -0,0 +1,60 @@
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ * Copyright (C) 2010 Thomas Langer, Lantiq Deutschland
+ */
+
+#ifndef __FALCON_SYSCTRL_H
+#define __FALCON_SYSCTRL_H
+
+#include <falcon/lantiq_soc.h>
+
+static inline void sys1_hw_activate(u32 mask)
+{ ltq_sysctl_activate(SYSCTL_SYS1, mask); }
+static inline void sys1_hw_deactivate(u32 mask)
+{ ltq_sysctl_deactivate(SYSCTL_SYS1, mask); }
+static inline void sys1_hw_clk_enable(u32 mask)
+{ ltq_sysctl_clken(SYSCTL_SYS1, mask); }
+static inline void sys1_hw_clk_disable(u32 mask)
+{ ltq_sysctl_clkdis(SYSCTL_SYS1, mask); }
+static inline void sys1_hw_activate_or_reboot(u32 mask)
+{ ltq_sysctl_reboot(SYSCTL_SYS1, mask); }
+
+static inline void sys_eth_hw_activate(u32 mask)
+{ ltq_sysctl_activate(SYSCTL_SYSETH, mask); }
+static inline void sys_eth_hw_deactivate(u32 mask)
+{ ltq_sysctl_deactivate(SYSCTL_SYSETH, mask); }
+static inline void sys_eth_hw_clk_enable(u32 mask)
+{ ltq_sysctl_clken(SYSCTL_SYSETH, mask); }
+static inline void sys_eth_hw_clk_disable(u32 mask)
+{ ltq_sysctl_clkdis(SYSCTL_SYSETH, mask); }
+static inline void sys_eth_hw_activate_or_reboot(u32 mask)
+{ ltq_sysctl_reboot(SYSCTL_SYSETH, mask); }
+
+static inline void sys_gpe_hw_activate(u32 mask)
+{ ltq_sysctl_activate(SYSCTL_SYSGPE, mask); }
+static inline void sys_gpe_hw_deactivate(u32 mask)
+{ ltq_sysctl_deactivate(SYSCTL_SYSGPE, mask); }
+static inline void sys_gpe_hw_clk_enable(u32 mask)
+{ ltq_sysctl_clken(SYSCTL_SYSGPE, mask); }
+static inline void sys_gpe_hw_clk_disable(u32 mask)
+{ ltq_sysctl_clkdis(SYSCTL_SYSGPE, mask); }
+static inline void sys_gpe_hw_activate_or_reboot(u32 mask)
+{ ltq_sysctl_reboot(SYSCTL_SYSGPE, mask); }
+static inline int sys_gpe_hw_is_activated(u32 mask)
+{ return 1; }
+
+#endif /* __FALCON_SYSCTRL_H */