1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-07 21:31:32 +02:00
openwrt-xburst/target/linux/lantiq/patches/850-falcon-sysctrl-compatibility.patch
blogic 79a88f017c lantiq: fix breakage introduced in 3.1 bump
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28961 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-11-11 21:59:01 +00:00

61 lines
2.5 KiB
Diff

--- a/arch/mips/include/asm/mach-lantiq/falcon/sysctrl.h
+++ b/arch/mips/include/asm/mach-lantiq/falcon/sysctrl.h
@@ -20,23 +20,41 @@
#ifndef __FALCON_SYSCTRL_H
#define __FALCON_SYSCTRL_H
-extern void sys1_hw_activate(u32 mask);
-extern void sys1_hw_deactivate(u32 mask);
-extern void sys1_hw_clk_enable(u32 mask);
-extern void sys1_hw_clk_disable(u32 mask);
-extern void sys1_hw_activate_or_reboot(u32 mask);
+#include <falcon/lantiq_soc.h>
-extern void sys_eth_hw_activate(u32 mask);
-extern void sys_eth_hw_deactivate(u32 mask);
-extern void sys_eth_hw_clk_enable(u32 mask);
-extern void sys_eth_hw_clk_disable(u32 mask);
-extern void sys_eth_hw_activate_or_reboot(u32 mask);
+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); }
-extern void sys_gpe_hw_activate(u32 mask);
-extern void sys_gpe_hw_deactivate(u32 mask);
-extern void sys_gpe_hw_clk_enable(u32 mask);
-extern void sys_gpe_hw_clk_disable(u32 mask);
-extern void sys_gpe_hw_activate_or_reboot(u32 mask);
-extern int sys_gpe_hw_is_activated(u32 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 */