aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2012-03-25 08:50:42 +0000
committerJohn Crispin <blogic@openwrt.org>2012-03-25 08:50:42 +0000
commite1efd040ac6dec6afc344c003369826ba2fee7e7 (patch)
tree4d5056be44d875157fff8d6bd4ce49ef3d00e2d1 /package
parent03f8b1d15900b78fd4b1824e0c7c83e4636aa4d9 (diff)
downloadupstream-e1efd040ac6dec6afc344c003369826ba2fee7e7.tar.gz
upstream-e1efd040ac6dec6afc344c003369826ba2fee7e7.tar.bz2
upstream-e1efd040ac6dec6afc344c003369826ba2fee7e7.zip
[ltq-dsl] fix for 3.2.9
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31065 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r--package/ltq-dsl/src/ifxmips_atm_amazon_se.c13
-rw-r--r--package/ltq-dsl/src/ifxmips_atm_ar9.c13
-rw-r--r--package/ltq-dsl/src/ifxmips_atm_danube.c13
-rw-r--r--package/ltq-dsl/src/ifxmips_compat.h3
4 files changed, 30 insertions, 12 deletions
diff --git a/package/ltq-dsl/src/ifxmips_atm_amazon_se.c b/package/ltq-dsl/src/ifxmips_atm_amazon_se.c
index 35a5cd9d53..1028815927 100644
--- a/package/ltq-dsl/src/ifxmips_atm_amazon_se.c
+++ b/package/ltq-dsl/src/ifxmips_atm_amazon_se.c
@@ -40,6 +40,7 @@
#include <linux/proc_fs.h>
#include <linux/init.h>
#include <linux/ioctl.h>
+#include <linux/clk.h>
#include <asm/delay.h>
/*
@@ -107,23 +108,27 @@ static inline void init_pmu(void)
{
//*(unsigned long *)0xBF10201C &= ~((1 << 15) | (1 << 13) | (1 << 9));
//PPE_TOP_PMU_SETUP(IFX_PMU_ENABLE);
- PPE_SLL01_PMU_SETUP(IFX_PMU_ENABLE);
+/* PPE_SLL01_PMU_SETUP(IFX_PMU_ENABLE);
PPE_TC_PMU_SETUP(IFX_PMU_ENABLE);
PPE_EMA_PMU_SETUP(IFX_PMU_ENABLE);
//PPE_QSB_PMU_SETUP(IFX_PMU_ENABLE);
PPE_TPE_PMU_SETUP(IFX_PMU_ENABLE);
- DSL_DFE_PMU_SETUP(IFX_PMU_ENABLE);
+ DSL_DFE_PMU_SETUP(IFX_PMU_ENABLE);*/
+ struct clk *clk = clk_get_sys("ltq_dsl", NULL);
+ clk_enable(clk);
}
static inline void uninit_pmu(void)
{
- PPE_SLL01_PMU_SETUP(IFX_PMU_DISABLE);
+/* PPE_SLL01_PMU_SETUP(IFX_PMU_DISABLE);
PPE_TC_PMU_SETUP(IFX_PMU_DISABLE);
PPE_EMA_PMU_SETUP(IFX_PMU_DISABLE);
//PPE_QSB_PMU_SETUP(IFX_PMU_DISABLE);
PPE_TPE_PMU_SETUP(IFX_PMU_DISABLE);
DSL_DFE_PMU_SETUP(IFX_PMU_DISABLE);
- //PPE_TOP_PMU_SETUP(IFX_PMU_DISABLE);
+ //PPE_TOP_PMU_SETUP(IFX_PMU_DISABLE);*/
+ struct clk *clk = clk_get_sys("ltq_dsl", NULL);
+ clk_disable(clk);
}
static inline void reset_ppe(void)
diff --git a/package/ltq-dsl/src/ifxmips_atm_ar9.c b/package/ltq-dsl/src/ifxmips_atm_ar9.c
index 418863c512..31b89f5c84 100644
--- a/package/ltq-dsl/src/ifxmips_atm_ar9.c
+++ b/package/ltq-dsl/src/ifxmips_atm_ar9.c
@@ -40,6 +40,7 @@
#include <linux/proc_fs.h>
#include <linux/init.h>
#include <linux/ioctl.h>
+#include <linux/clk.h>
#include <asm/delay.h>
/*
@@ -114,23 +115,27 @@ static inline void init_pmu(void)
{
//*(unsigned long *)0xBF10201C &= ~((1 << 15) | (1 << 13) | (1 << 9));
//PPE_TOP_PMU_SETUP(IFX_PMU_ENABLE);
- PPE_SLL01_PMU_SETUP(IFX_PMU_ENABLE);
+/* PPE_SLL01_PMU_SETUP(IFX_PMU_ENABLE);
PPE_TC_PMU_SETUP(IFX_PMU_ENABLE);
PPE_EMA_PMU_SETUP(IFX_PMU_ENABLE);
PPE_QSB_PMU_SETUP(IFX_PMU_ENABLE);
PPE_TPE_PMU_SETUP(IFX_PMU_ENABLE);
- DSL_DFE_PMU_SETUP(IFX_PMU_ENABLE);
+ DSL_DFE_PMU_SETUP(IFX_PMU_ENABLE);*/
+ struct clk *clk = clk_get_sys("ltq_dsl", NULL);
+ clk_enable(clk);
}
static inline void uninit_pmu(void)
{
- PPE_SLL01_PMU_SETUP(IFX_PMU_DISABLE);
+ /* PPE_SLL01_PMU_SETUP(IFX_PMU_DISABLE);
PPE_TC_PMU_SETUP(IFX_PMU_DISABLE);
PPE_EMA_PMU_SETUP(IFX_PMU_DISABLE);
PPE_QSB_PMU_SETUP(IFX_PMU_DISABLE);
PPE_TPE_PMU_SETUP(IFX_PMU_DISABLE);
- DSL_DFE_PMU_SETUP(IFX_PMU_DISABLE);
+ DSL_DFE_PMU_SETUP(IFX_PMU_DISABLE);*/
//PPE_TOP_PMU_SETUP(IFX_PMU_DISABLE);
+ struct clk *clk = clk_get_sys("ltq_dsl", NULL);
+ clk_disable(clk);
}
static inline void reset_ppe(void)
diff --git a/package/ltq-dsl/src/ifxmips_atm_danube.c b/package/ltq-dsl/src/ifxmips_atm_danube.c
index df7801e234..64698b8792 100644
--- a/package/ltq-dsl/src/ifxmips_atm_danube.c
+++ b/package/ltq-dsl/src/ifxmips_atm_danube.c
@@ -40,6 +40,7 @@
#include <linux/proc_fs.h>
#include <linux/init.h>
#include <linux/ioctl.h>
+#include <linux/clk.h>
#include <asm/delay.h>
/*
@@ -109,23 +110,27 @@ static inline void init_pmu(void)
{
//*(unsigned long *)0xBF10201C &= ~((1 << 15) | (1 << 13) | (1 << 9));
//PPE_TOP_PMU_SETUP(IFX_PMU_ENABLE);
- PPE_SLL01_PMU_SETUP(IFX_PMU_ENABLE);
+/* PPE_SLL01_PMU_SETUP(IFX_PMU_ENABLE);
PPE_TC_PMU_SETUP(IFX_PMU_ENABLE);
PPE_EMA_PMU_SETUP(IFX_PMU_ENABLE);
PPE_QSB_PMU_SETUP(IFX_PMU_ENABLE);
PPE_TPE_PMU_SETUP(IFX_PMU_ENABLE);
- DSL_DFE_PMU_SETUP(IFX_PMU_ENABLE);
+ DSL_DFE_PMU_SETUP(IFX_PMU_ENABLE);*/
+ struct clk *clk = clk_get_sys("ltq_dsl", NULL);
+ clk_enable(clk);
}
static inline void uninit_pmu(void)
{
- PPE_SLL01_PMU_SETUP(IFX_PMU_DISABLE);
+/* PPE_SLL01_PMU_SETUP(IFX_PMU_DISABLE);
PPE_TC_PMU_SETUP(IFX_PMU_DISABLE);
PPE_EMA_PMU_SETUP(IFX_PMU_DISABLE);
PPE_QSB_PMU_SETUP(IFX_PMU_DISABLE);
PPE_TPE_PMU_SETUP(IFX_PMU_DISABLE);
- DSL_DFE_PMU_SETUP(IFX_PMU_DISABLE);
+ DSL_DFE_PMU_SETUP(IFX_PMU_DISABLE);*/
//PPE_TOP_PMU_SETUP(IFX_PMU_DISABLE);
+ struct clk *clk = clk_get_sys("ltq_dsl", NULL);
+ clk_disable(clk);
}
static inline void reset_ppe(void)
diff --git a/package/ltq-dsl/src/ifxmips_compat.h b/package/ltq-dsl/src/ifxmips_compat.h
index bd357e98cf..b0c9f25f48 100644
--- a/package/ltq-dsl/src/ifxmips_compat.h
+++ b/package/ltq-dsl/src/ifxmips_compat.h
@@ -34,6 +34,9 @@
#define IFX_PMU_MODULE_PPE_EMA (1 << 22)
#define IFX_PMU_MODULE_PPE_TOP (1 << 29)
+extern void ltq_pmu_enable(unsigned int module);
+extern void ltq_pmu_disable(unsigned int module);
+
#define ifx_pmu_set(a,b) {if(a == IFX_PMU_ENABLE) ltq_pmu_enable(b); else ltq_pmu_disable(b);}
#define PPE_TOP_PMU_SETUP(__x) ifx_pmu_set(IFX_PMU_MODULE_PPE_TOP, (__x))