* [PATCH V3 00/14] add clk_prepare/clk_unprepare to imx drivers
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel, linux-i2c, linux-mmc, netdev, linux-serial
Cc: linux, amit.kucheria, kernel, ben-linux, cjb, alan, eric.miao
Changes since V2:
- fix clk_prepare_enable bug
Changes since V1:
- Add common helper functions clk_prepare_enable/clk_disable_unprepare
- serial/imx: move clk_disable_unprepare before clk_put
Richard Zhao (14):
clk: add helper functions clk_prepare_enable and clk_disable_unprepare
ARM: mxc: time: add clk_prepare/clk_unprepare
ARM: mxc: ahci: add clk_prepare/clk_unprepare
ARM: mxc: pwm: add clk_prepare/clk_unprepare
ARM: mxc: epit: add clk_prepare/clk_unprepare
ARM: mxc: arch_reset: add clk_prepare/clk_unprepare
ARM: mxc: audmux-v2: add clk_prepare/clk_unprepare
ARM: pm-imx5: add clk_prepare/clk_unprepare
ARM: mx31moboard: add clk_prepare/clk_unprepare
ARM: mxs: add clk_prepare/clk_unprepare
serial: imx: add clk_prepare/clk_unprepare
net: fec: add clk_prepare/clk_unprepare
i2c: imx: add clk_prepare/clk_unprepare
mmc: sdhci-esdhc-imx: add clk_prepare/clk_unprepare
arch/arm/mach-imx/mach-mx31moboard.c | 2 +-
arch/arm/mach-mx5/pm-imx5.c | 4 ++--
arch/arm/mach-mxs/system.c | 2 +-
arch/arm/mach-mxs/timer.c | 2 +-
arch/arm/plat-mxc/audmux-v2.c | 8 ++++----
arch/arm/plat-mxc/devices/platform-ahci-imx.c | 16 ++++++++--------
arch/arm/plat-mxc/epit.c | 2 +-
arch/arm/plat-mxc/pwm.c | 4 ++--
arch/arm/plat-mxc/system.c | 2 +-
arch/arm/plat-mxc/time.c | 2 +-
drivers/i2c/busses/i2c-imx.c | 4 ++--
drivers/mmc/host/sdhci-esdhc-imx.c | 6 +++---
drivers/net/ethernet/freescale/fec.c | 10 +++++-----
drivers/tty/serial/imx.c | 7 +++----
include/linux/clk.h | 20 ++++++++++++++++++++
15 files changed, 55 insertions(+), 36 deletions(-)
Thanks
Richard
^ permalink raw reply [flat|nested] 53+ messages in thread
* [PATCH V3 00/14] add clk_prepare/clk_unprepare to imx drivers
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel, linux-i2c, linux-mmc, netdev, linux-serial
Cc: linux, amit.kucheria, kernel, ben-linux, cjb, alan, eric.miao
Changes since V2:
- fix clk_prepare_enable bug
Changes since V1:
- Add common helper functions clk_prepare_enable/clk_disable_unprepare
- serial/imx: move clk_disable_unprepare before clk_put
Richard Zhao (14):
clk: add helper functions clk_prepare_enable and clk_disable_unprepare
ARM: mxc: time: add clk_prepare/clk_unprepare
ARM: mxc: ahci: add clk_prepare/clk_unprepare
ARM: mxc: pwm: add clk_prepare/clk_unprepare
ARM: mxc: epit: add clk_prepare/clk_unprepare
ARM: mxc: arch_reset: add clk_prepare/clk_unprepare
ARM: mxc: audmux-v2: add clk_prepare/clk_unprepare
ARM: pm-imx5: add clk_prepare/clk_unprepare
ARM: mx31moboard: add clk_prepare/clk_unprepare
ARM: mxs: add clk_prepare/clk_unprepare
serial: imx: add clk_prepare/clk_unprepare
net: fec: add clk_prepare/clk_unprepare
i2c: imx: add clk_prepare/clk_unprepare
mmc: sdhci-esdhc-imx: add clk_prepare/clk_unprepare
arch/arm/mach-imx/mach-mx31moboard.c | 2 +-
arch/arm/mach-mx5/pm-imx5.c | 4 ++--
arch/arm/mach-mxs/system.c | 2 +-
arch/arm/mach-mxs/timer.c | 2 +-
arch/arm/plat-mxc/audmux-v2.c | 8 ++++----
arch/arm/plat-mxc/devices/platform-ahci-imx.c | 16 ++++++++--------
arch/arm/plat-mxc/epit.c | 2 +-
arch/arm/plat-mxc/pwm.c | 4 ++--
arch/arm/plat-mxc/system.c | 2 +-
arch/arm/plat-mxc/time.c | 2 +-
drivers/i2c/busses/i2c-imx.c | 4 ++--
drivers/mmc/host/sdhci-esdhc-imx.c | 6 +++---
drivers/net/ethernet/freescale/fec.c | 10 +++++-----
drivers/tty/serial/imx.c | 7 +++----
include/linux/clk.h | 20 ++++++++++++++++++++
15 files changed, 55 insertions(+), 36 deletions(-)
Thanks
Richard
^ permalink raw reply [flat|nested] 53+ messages in thread
* [PATCH V3 00/14] add clk_prepare/clk_unprepare to imx drivers
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel
Changes since V2:
- fix clk_prepare_enable bug
Changes since V1:
- Add common helper functions clk_prepare_enable/clk_disable_unprepare
- serial/imx: move clk_disable_unprepare before clk_put
Richard Zhao (14):
clk: add helper functions clk_prepare_enable and clk_disable_unprepare
ARM: mxc: time: add clk_prepare/clk_unprepare
ARM: mxc: ahci: add clk_prepare/clk_unprepare
ARM: mxc: pwm: add clk_prepare/clk_unprepare
ARM: mxc: epit: add clk_prepare/clk_unprepare
ARM: mxc: arch_reset: add clk_prepare/clk_unprepare
ARM: mxc: audmux-v2: add clk_prepare/clk_unprepare
ARM: pm-imx5: add clk_prepare/clk_unprepare
ARM: mx31moboard: add clk_prepare/clk_unprepare
ARM: mxs: add clk_prepare/clk_unprepare
serial: imx: add clk_prepare/clk_unprepare
net: fec: add clk_prepare/clk_unprepare
i2c: imx: add clk_prepare/clk_unprepare
mmc: sdhci-esdhc-imx: add clk_prepare/clk_unprepare
arch/arm/mach-imx/mach-mx31moboard.c | 2 +-
arch/arm/mach-mx5/pm-imx5.c | 4 ++--
arch/arm/mach-mxs/system.c | 2 +-
arch/arm/mach-mxs/timer.c | 2 +-
arch/arm/plat-mxc/audmux-v2.c | 8 ++++----
arch/arm/plat-mxc/devices/platform-ahci-imx.c | 16 ++++++++--------
arch/arm/plat-mxc/epit.c | 2 +-
arch/arm/plat-mxc/pwm.c | 4 ++--
arch/arm/plat-mxc/system.c | 2 +-
arch/arm/plat-mxc/time.c | 2 +-
drivers/i2c/busses/i2c-imx.c | 4 ++--
drivers/mmc/host/sdhci-esdhc-imx.c | 6 +++---
drivers/net/ethernet/freescale/fec.c | 10 +++++-----
drivers/tty/serial/imx.c | 7 +++----
include/linux/clk.h | 20 ++++++++++++++++++++
15 files changed, 55 insertions(+), 36 deletions(-)
Thanks
Richard
^ permalink raw reply [flat|nested] 53+ messages in thread
* [PATCH V3 01/14] clk: add helper functions clk_prepare_enable and clk_disable_unprepare
2011-11-11 10:50 ` Richard Zhao
(?)
@ 2011-11-11 10:50 ` Richard Zhao
-1 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel, linux-i2c, linux-mmc, netdev, linux-serial
Cc: linux, amit.kucheria, kernel, ben-linux, cjb, alan, eric.miao,
Richard Zhao
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
---
include/linux/clk.h | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 7213b52..a7dc00d 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -107,6 +107,26 @@ static inline void clk_unprepare(struct clk *clk)
}
#endif
+static inline int clk_prepare_enable(struct clk *clk)
+{
+ int ret;
+
+ ret = clk_prepare(clk);
+ if (ret)
+ return ret;
+ ret = clk_enable(clk);
+ if (ret)
+ clk_unprepare(clk);
+
+ return ret;
+}
+
+static inline void clk_disable_unprepare(struct clk *clk)
+{
+ clk_disable(clk);
+ clk_unprepare(clk);
+}
+
/**
* clk_get_rate - obtain the current clock rate (in Hz) for a clock source.
* This is only valid once the clock source has been enabled.
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 01/14] clk: add helper functions clk_prepare_enable and clk_disable_unprepare
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel, linux-i2c, linux-mmc, netdev, linux-serial
Cc: linux, amit.kucheria, kernel, ben-linux, cjb, alan, eric.miao,
Richard Zhao
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
---
include/linux/clk.h | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 7213b52..a7dc00d 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -107,6 +107,26 @@ static inline void clk_unprepare(struct clk *clk)
}
#endif
+static inline int clk_prepare_enable(struct clk *clk)
+{
+ int ret;
+
+ ret = clk_prepare(clk);
+ if (ret)
+ return ret;
+ ret = clk_enable(clk);
+ if (ret)
+ clk_unprepare(clk);
+
+ return ret;
+}
+
+static inline void clk_disable_unprepare(struct clk *clk)
+{
+ clk_disable(clk);
+ clk_unprepare(clk);
+}
+
/**
* clk_get_rate - obtain the current clock rate (in Hz) for a clock source.
* This is only valid once the clock source has been enabled.
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 01/14] clk: add helper functions clk_prepare_enable and clk_disable_unprepare
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
---
include/linux/clk.h | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 7213b52..a7dc00d 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -107,6 +107,26 @@ static inline void clk_unprepare(struct clk *clk)
}
#endif
+static inline int clk_prepare_enable(struct clk *clk)
+{
+ int ret;
+
+ ret = clk_prepare(clk);
+ if (ret)
+ return ret;
+ ret = clk_enable(clk);
+ if (ret)
+ clk_unprepare(clk);
+
+ return ret;
+}
+
+static inline void clk_disable_unprepare(struct clk *clk)
+{
+ clk_disable(clk);
+ clk_unprepare(clk);
+}
+
/**
* clk_get_rate - obtain the current clock rate (in Hz) for a clock source.
* This is only valid once the clock source has been enabled.
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 02/14] ARM: mxc: time: add clk_prepare/clk_unprepare
[not found] ` <1321008637-19999-1-git-send-email-richard.zhao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-11-11 10:50 ` Richard Zhao
@ 2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` Richard Zhao
` (4 subsequent siblings)
6 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-mmc-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-serial-u79uwXL29TY76Z2rM5mHXA
Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ,
amit.kucheria-Z7WLFzj8eWMS+FvcfC7Uqw,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ, ben-linux-elnMNo+KYs3YtjvyW6yDsg,
cjb-2X9k7bc8m7Mdnm+yROfE0A, alan-VuQAYsv1563Yd54FQh9/CA,
eric.miao-QSEj5FYQhm4dnm+yROfE0A, Richard Zhao
Signed-off-by: Richard Zhao <richard.zhao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
arch/arm/plat-mxc/time.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/plat-mxc/time.c b/arch/arm/plat-mxc/time.c
index 4b0fe28..b4e8b18 100644
--- a/arch/arm/plat-mxc/time.c
+++ b/arch/arm/plat-mxc/time.c
@@ -292,7 +292,7 @@ void __init mxc_timer_init(struct clk *timer_clk, void __iomem *base, int irq)
{
uint32_t tctl_val;
- clk_enable(timer_clk);
+ clk_prepare_enable(timer_clk);
timer_base = base;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 02/14] ARM: mxc: time: add clk_prepare/clk_unprepare
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-mmc-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-serial-u79uwXL29TY76Z2rM5mHXA
Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ,
amit.kucheria-Z7WLFzj8eWMS+FvcfC7Uqw,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ, ben-linux-elnMNo+KYs3YtjvyW6yDsg,
cjb-2X9k7bc8m7Mdnm+yROfE0A, alan-VuQAYsv1563Yd54FQh9/CA,
eric.miao-QSEj5FYQhm4dnm+yROfE0A, Richard Zhao
Signed-off-by: Richard Zhao <richard.zhao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
arch/arm/plat-mxc/time.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/plat-mxc/time.c b/arch/arm/plat-mxc/time.c
index 4b0fe28..b4e8b18 100644
--- a/arch/arm/plat-mxc/time.c
+++ b/arch/arm/plat-mxc/time.c
@@ -292,7 +292,7 @@ void __init mxc_timer_init(struct clk *timer_clk, void __iomem *base, int irq)
{
uint32_t tctl_val;
- clk_enable(timer_clk);
+ clk_prepare_enable(timer_clk);
timer_base = base;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 02/14] ARM: mxc: time: add clk_prepare/clk_unprepare
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
---
arch/arm/plat-mxc/time.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/plat-mxc/time.c b/arch/arm/plat-mxc/time.c
index 4b0fe28..b4e8b18 100644
--- a/arch/arm/plat-mxc/time.c
+++ b/arch/arm/plat-mxc/time.c
@@ -292,7 +292,7 @@ void __init mxc_timer_init(struct clk *timer_clk, void __iomem *base, int irq)
{
uint32_t tctl_val;
- clk_enable(timer_clk);
+ clk_prepare_enable(timer_clk);
timer_base = base;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 03/14] ARM: mxc: ahci: add clk_prepare/clk_unprepare
[not found] ` <1321008637-19999-1-git-send-email-richard.zhao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-11-11 10:50 ` Richard Zhao
@ 2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` Richard Zhao
` (4 subsequent siblings)
6 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-mmc-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-serial-u79uwXL29TY76Z2rM5mHXA
Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ,
amit.kucheria-Z7WLFzj8eWMS+FvcfC7Uqw,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ, ben-linux-elnMNo+KYs3YtjvyW6yDsg,
cjb-2X9k7bc8m7Mdnm+yROfE0A, alan-VuQAYsv1563Yd54FQh9/CA,
eric.miao-QSEj5FYQhm4dnm+yROfE0A, Richard Zhao
Signed-off-by: Richard Zhao <richard.zhao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
arch/arm/plat-mxc/devices/platform-ahci-imx.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/arm/plat-mxc/devices/platform-ahci-imx.c b/arch/arm/plat-mxc/devices/platform-ahci-imx.c
index d8a56ae..ade4a1c 100644
--- a/arch/arm/plat-mxc/devices/platform-ahci-imx.c
+++ b/arch/arm/plat-mxc/devices/platform-ahci-imx.c
@@ -60,9 +60,9 @@ static int imx_sata_init(struct device *dev, void __iomem *addr)
dev_err(dev, "no sata clock.\n");
return PTR_ERR(sata_clk);
}
- ret = clk_enable(sata_clk);
+ ret = clk_prepare_enable(sata_clk);
if (ret) {
- dev_err(dev, "can't enable sata clock.\n");
+ dev_err(dev, "can't prepare/enable sata clock.\n");
goto put_sata_clk;
}
@@ -73,9 +73,9 @@ static int imx_sata_init(struct device *dev, void __iomem *addr)
ret = PTR_ERR(sata_ref_clk);
goto release_sata_clk;
}
- ret = clk_enable(sata_ref_clk);
+ ret = clk_prepare_enable(sata_ref_clk);
if (ret) {
- dev_err(dev, "can't enable sata ref clock.\n");
+ dev_err(dev, "can't prepare/enable sata ref clock.\n");
goto put_sata_ref_clk;
}
@@ -104,11 +104,11 @@ static int imx_sata_init(struct device *dev, void __iomem *addr)
return 0;
release_sata_ref_clk:
- clk_disable(sata_ref_clk);
+ clk_disable_unprepare(sata_ref_clk);
put_sata_ref_clk:
clk_put(sata_ref_clk);
release_sata_clk:
- clk_disable(sata_clk);
+ clk_disable_unprepare(sata_clk);
put_sata_clk:
clk_put(sata_clk);
@@ -117,10 +117,10 @@ put_sata_clk:
static void imx_sata_exit(struct device *dev)
{
- clk_disable(sata_ref_clk);
+ clk_disable_unprepare(sata_ref_clk);
clk_put(sata_ref_clk);
- clk_disable(sata_clk);
+ clk_disable_unprepare(sata_clk);
clk_put(sata_clk);
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 03/14] ARM: mxc: ahci: add clk_prepare/clk_unprepare
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-mmc-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-serial-u79uwXL29TY76Z2rM5mHXA
Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ,
amit.kucheria-Z7WLFzj8eWMS+FvcfC7Uqw,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ, ben-linux-elnMNo+KYs3YtjvyW6yDsg,
cjb-2X9k7bc8m7Mdnm+yROfE0A, alan-VuQAYsv1563Yd54FQh9/CA,
eric.miao-QSEj5FYQhm4dnm+yROfE0A, Richard Zhao
Signed-off-by: Richard Zhao <richard.zhao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
arch/arm/plat-mxc/devices/platform-ahci-imx.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/arm/plat-mxc/devices/platform-ahci-imx.c b/arch/arm/plat-mxc/devices/platform-ahci-imx.c
index d8a56ae..ade4a1c 100644
--- a/arch/arm/plat-mxc/devices/platform-ahci-imx.c
+++ b/arch/arm/plat-mxc/devices/platform-ahci-imx.c
@@ -60,9 +60,9 @@ static int imx_sata_init(struct device *dev, void __iomem *addr)
dev_err(dev, "no sata clock.\n");
return PTR_ERR(sata_clk);
}
- ret = clk_enable(sata_clk);
+ ret = clk_prepare_enable(sata_clk);
if (ret) {
- dev_err(dev, "can't enable sata clock.\n");
+ dev_err(dev, "can't prepare/enable sata clock.\n");
goto put_sata_clk;
}
@@ -73,9 +73,9 @@ static int imx_sata_init(struct device *dev, void __iomem *addr)
ret = PTR_ERR(sata_ref_clk);
goto release_sata_clk;
}
- ret = clk_enable(sata_ref_clk);
+ ret = clk_prepare_enable(sata_ref_clk);
if (ret) {
- dev_err(dev, "can't enable sata ref clock.\n");
+ dev_err(dev, "can't prepare/enable sata ref clock.\n");
goto put_sata_ref_clk;
}
@@ -104,11 +104,11 @@ static int imx_sata_init(struct device *dev, void __iomem *addr)
return 0;
release_sata_ref_clk:
- clk_disable(sata_ref_clk);
+ clk_disable_unprepare(sata_ref_clk);
put_sata_ref_clk:
clk_put(sata_ref_clk);
release_sata_clk:
- clk_disable(sata_clk);
+ clk_disable_unprepare(sata_clk);
put_sata_clk:
clk_put(sata_clk);
@@ -117,10 +117,10 @@ put_sata_clk:
static void imx_sata_exit(struct device *dev)
{
- clk_disable(sata_ref_clk);
+ clk_disable_unprepare(sata_ref_clk);
clk_put(sata_ref_clk);
- clk_disable(sata_clk);
+ clk_disable_unprepare(sata_clk);
clk_put(sata_clk);
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 03/14] ARM: mxc: ahci: add clk_prepare/clk_unprepare
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
---
arch/arm/plat-mxc/devices/platform-ahci-imx.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/arm/plat-mxc/devices/platform-ahci-imx.c b/arch/arm/plat-mxc/devices/platform-ahci-imx.c
index d8a56ae..ade4a1c 100644
--- a/arch/arm/plat-mxc/devices/platform-ahci-imx.c
+++ b/arch/arm/plat-mxc/devices/platform-ahci-imx.c
@@ -60,9 +60,9 @@ static int imx_sata_init(struct device *dev, void __iomem *addr)
dev_err(dev, "no sata clock.\n");
return PTR_ERR(sata_clk);
}
- ret = clk_enable(sata_clk);
+ ret = clk_prepare_enable(sata_clk);
if (ret) {
- dev_err(dev, "can't enable sata clock.\n");
+ dev_err(dev, "can't prepare/enable sata clock.\n");
goto put_sata_clk;
}
@@ -73,9 +73,9 @@ static int imx_sata_init(struct device *dev, void __iomem *addr)
ret = PTR_ERR(sata_ref_clk);
goto release_sata_clk;
}
- ret = clk_enable(sata_ref_clk);
+ ret = clk_prepare_enable(sata_ref_clk);
if (ret) {
- dev_err(dev, "can't enable sata ref clock.\n");
+ dev_err(dev, "can't prepare/enable sata ref clock.\n");
goto put_sata_ref_clk;
}
@@ -104,11 +104,11 @@ static int imx_sata_init(struct device *dev, void __iomem *addr)
return 0;
release_sata_ref_clk:
- clk_disable(sata_ref_clk);
+ clk_disable_unprepare(sata_ref_clk);
put_sata_ref_clk:
clk_put(sata_ref_clk);
release_sata_clk:
- clk_disable(sata_clk);
+ clk_disable_unprepare(sata_clk);
put_sata_clk:
clk_put(sata_clk);
@@ -117,10 +117,10 @@ put_sata_clk:
static void imx_sata_exit(struct device *dev)
{
- clk_disable(sata_ref_clk);
+ clk_disable_unprepare(sata_ref_clk);
clk_put(sata_ref_clk);
- clk_disable(sata_clk);
+ clk_disable_unprepare(sata_clk);
clk_put(sata_clk);
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 04/14] ARM: mxc: pwm: add clk_prepare/clk_unprepare
[not found] ` <1321008637-19999-1-git-send-email-richard.zhao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-11-11 10:50 ` Richard Zhao
@ 2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` Richard Zhao
` (4 subsequent siblings)
6 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-mmc-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-serial-u79uwXL29TY76Z2rM5mHXA
Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ,
amit.kucheria-Z7WLFzj8eWMS+FvcfC7Uqw,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ, ben-linux-elnMNo+KYs3YtjvyW6yDsg,
cjb-2X9k7bc8m7Mdnm+yROfE0A, alan-VuQAYsv1563Yd54FQh9/CA,
eric.miao-QSEj5FYQhm4dnm+yROfE0A, Richard Zhao
Signed-off-by: Richard Zhao <richard.zhao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
arch/arm/plat-mxc/pwm.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/plat-mxc/pwm.c b/arch/arm/plat-mxc/pwm.c
index 42d74ea..68c7199b 100644
--- a/arch/arm/plat-mxc/pwm.c
+++ b/arch/arm/plat-mxc/pwm.c
@@ -118,7 +118,7 @@ int pwm_enable(struct pwm_device *pwm)
int rc = 0;
if (!pwm->clk_enabled) {
- rc = clk_enable(pwm->clk);
+ rc = clk_prepare_enable(pwm->clk);
if (!rc)
pwm->clk_enabled = 1;
}
@@ -131,7 +131,7 @@ void pwm_disable(struct pwm_device *pwm)
writel(0, pwm->mmio_base + MX3_PWMCR);
if (pwm->clk_enabled) {
- clk_disable(pwm->clk);
+ clk_disable_unprepare(pwm->clk);
pwm->clk_enabled = 0;
}
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 04/14] ARM: mxc: pwm: add clk_prepare/clk_unprepare
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-mmc-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-serial-u79uwXL29TY76Z2rM5mHXA
Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ,
amit.kucheria-Z7WLFzj8eWMS+FvcfC7Uqw,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ, ben-linux-elnMNo+KYs3YtjvyW6yDsg,
cjb-2X9k7bc8m7Mdnm+yROfE0A, alan-VuQAYsv1563Yd54FQh9/CA,
eric.miao-QSEj5FYQhm4dnm+yROfE0A, Richard Zhao
Signed-off-by: Richard Zhao <richard.zhao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
arch/arm/plat-mxc/pwm.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/plat-mxc/pwm.c b/arch/arm/plat-mxc/pwm.c
index 42d74ea..68c7199b 100644
--- a/arch/arm/plat-mxc/pwm.c
+++ b/arch/arm/plat-mxc/pwm.c
@@ -118,7 +118,7 @@ int pwm_enable(struct pwm_device *pwm)
int rc = 0;
if (!pwm->clk_enabled) {
- rc = clk_enable(pwm->clk);
+ rc = clk_prepare_enable(pwm->clk);
if (!rc)
pwm->clk_enabled = 1;
}
@@ -131,7 +131,7 @@ void pwm_disable(struct pwm_device *pwm)
writel(0, pwm->mmio_base + MX3_PWMCR);
if (pwm->clk_enabled) {
- clk_disable(pwm->clk);
+ clk_disable_unprepare(pwm->clk);
pwm->clk_enabled = 0;
}
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 04/14] ARM: mxc: pwm: add clk_prepare/clk_unprepare
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
---
arch/arm/plat-mxc/pwm.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/plat-mxc/pwm.c b/arch/arm/plat-mxc/pwm.c
index 42d74ea..68c7199b 100644
--- a/arch/arm/plat-mxc/pwm.c
+++ b/arch/arm/plat-mxc/pwm.c
@@ -118,7 +118,7 @@ int pwm_enable(struct pwm_device *pwm)
int rc = 0;
if (!pwm->clk_enabled) {
- rc = clk_enable(pwm->clk);
+ rc = clk_prepare_enable(pwm->clk);
if (!rc)
pwm->clk_enabled = 1;
}
@@ -131,7 +131,7 @@ void pwm_disable(struct pwm_device *pwm)
writel(0, pwm->mmio_base + MX3_PWMCR);
if (pwm->clk_enabled) {
- clk_disable(pwm->clk);
+ clk_disable_unprepare(pwm->clk);
pwm->clk_enabled = 0;
}
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 05/14] ARM: mxc: epit: add clk_prepare/clk_unprepare
[not found] ` <1321008637-19999-1-git-send-email-richard.zhao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-11-11 10:50 ` Richard Zhao
@ 2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` Richard Zhao
` (4 subsequent siblings)
6 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-mmc-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-serial-u79uwXL29TY76Z2rM5mHXA
Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ,
amit.kucheria-Z7WLFzj8eWMS+FvcfC7Uqw,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ, ben-linux-elnMNo+KYs3YtjvyW6yDsg,
cjb-2X9k7bc8m7Mdnm+yROfE0A, alan-VuQAYsv1563Yd54FQh9/CA,
eric.miao-QSEj5FYQhm4dnm+yROfE0A, Richard Zhao
Signed-off-by: Richard Zhao <richard.zhao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
arch/arm/plat-mxc/epit.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/plat-mxc/epit.c b/arch/arm/plat-mxc/epit.c
index d3467f8..9129c9e 100644
--- a/arch/arm/plat-mxc/epit.c
+++ b/arch/arm/plat-mxc/epit.c
@@ -203,7 +203,7 @@ static int __init epit_clockevent_init(struct clk *timer_clk)
void __init epit_timer_init(struct clk *timer_clk, void __iomem *base, int irq)
{
- clk_enable(timer_clk);
+ clk_prepare_enable(timer_clk);
timer_base = base;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 05/14] ARM: mxc: epit: add clk_prepare/clk_unprepare
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-mmc-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-serial-u79uwXL29TY76Z2rM5mHXA
Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ,
amit.kucheria-Z7WLFzj8eWMS+FvcfC7Uqw,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ, ben-linux-elnMNo+KYs3YtjvyW6yDsg,
cjb-2X9k7bc8m7Mdnm+yROfE0A, alan-VuQAYsv1563Yd54FQh9/CA,
eric.miao-QSEj5FYQhm4dnm+yROfE0A, Richard Zhao
Signed-off-by: Richard Zhao <richard.zhao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
arch/arm/plat-mxc/epit.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/plat-mxc/epit.c b/arch/arm/plat-mxc/epit.c
index d3467f8..9129c9e 100644
--- a/arch/arm/plat-mxc/epit.c
+++ b/arch/arm/plat-mxc/epit.c
@@ -203,7 +203,7 @@ static int __init epit_clockevent_init(struct clk *timer_clk)
void __init epit_timer_init(struct clk *timer_clk, void __iomem *base, int irq)
{
- clk_enable(timer_clk);
+ clk_prepare_enable(timer_clk);
timer_base = base;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 05/14] ARM: mxc: epit: add clk_prepare/clk_unprepare
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
---
arch/arm/plat-mxc/epit.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/plat-mxc/epit.c b/arch/arm/plat-mxc/epit.c
index d3467f8..9129c9e 100644
--- a/arch/arm/plat-mxc/epit.c
+++ b/arch/arm/plat-mxc/epit.c
@@ -203,7 +203,7 @@ static int __init epit_clockevent_init(struct clk *timer_clk)
void __init epit_timer_init(struct clk *timer_clk, void __iomem *base, int irq)
{
- clk_enable(timer_clk);
+ clk_prepare_enable(timer_clk);
timer_base = base;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 06/14] ARM: mxc: arch_reset: add clk_prepare/clk_unprepare
2011-11-11 10:50 ` Richard Zhao
(?)
@ 2011-11-11 10:50 ` Richard Zhao
-1 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel, linux-i2c, linux-mmc, netdev, linux-serial
Cc: linux, amit.kucheria, kernel, ben-linux, cjb, alan, eric.miao,
Richard Zhao
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
---
arch/arm/plat-mxc/system.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/plat-mxc/system.c b/arch/arm/plat-mxc/system.c
index 9dad8dc..a667adc 100644
--- a/arch/arm/plat-mxc/system.c
+++ b/arch/arm/plat-mxc/system.c
@@ -54,7 +54,7 @@ void arch_reset(char mode, const char *cmd)
clk = clk_get_sys("imx2-wdt.0", NULL);
if (!IS_ERR(clk))
- clk_enable(clk);
+ clk_prepare_enable(clk);
wcr_enable = (1 << 2);
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 06/14] ARM: mxc: arch_reset: add clk_prepare/clk_unprepare
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel, linux-i2c, linux-mmc, netdev, linux-serial
Cc: linux, amit.kucheria, kernel, ben-linux, cjb, alan, eric.miao,
Richard Zhao
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
---
arch/arm/plat-mxc/system.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/plat-mxc/system.c b/arch/arm/plat-mxc/system.c
index 9dad8dc..a667adc 100644
--- a/arch/arm/plat-mxc/system.c
+++ b/arch/arm/plat-mxc/system.c
@@ -54,7 +54,7 @@ void arch_reset(char mode, const char *cmd)
clk = clk_get_sys("imx2-wdt.0", NULL);
if (!IS_ERR(clk))
- clk_enable(clk);
+ clk_prepare_enable(clk);
wcr_enable = (1 << 2);
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 06/14] ARM: mxc: arch_reset: add clk_prepare/clk_unprepare
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
---
arch/arm/plat-mxc/system.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/plat-mxc/system.c b/arch/arm/plat-mxc/system.c
index 9dad8dc..a667adc 100644
--- a/arch/arm/plat-mxc/system.c
+++ b/arch/arm/plat-mxc/system.c
@@ -54,7 +54,7 @@ void arch_reset(char mode, const char *cmd)
clk = clk_get_sys("imx2-wdt.0", NULL);
if (!IS_ERR(clk))
- clk_enable(clk);
+ clk_prepare_enable(clk);
wcr_enable = (1 << 2);
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 07/14] ARM: mxc: audmux-v2: add clk_prepare/clk_unprepare
2011-11-11 10:50 ` Richard Zhao
(?)
@ 2011-11-11 10:50 ` Richard Zhao
-1 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel, linux-i2c, linux-mmc, netdev, linux-serial
Cc: linux, amit.kucheria, kernel, ben-linux, cjb, alan, eric.miao,
Richard Zhao
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
---
arch/arm/plat-mxc/audmux-v2.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/plat-mxc/audmux-v2.c b/arch/arm/plat-mxc/audmux-v2.c
index 8cced35..0e51fc3 100644
--- a/arch/arm/plat-mxc/audmux-v2.c
+++ b/arch/arm/plat-mxc/audmux-v2.c
@@ -73,13 +73,13 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf,
return -ENOMEM;
if (audmux_clk)
- clk_enable(audmux_clk);
+ clk_prepare_enable(audmux_clk);
ptcr = readl(audmux_base + MXC_AUDMUX_V2_PTCR(port));
pdcr = readl(audmux_base + MXC_AUDMUX_V2_PDCR(port));
if (audmux_clk)
- clk_disable(audmux_clk);
+ clk_disable_unprepare(audmux_clk);
ret = snprintf(buf, PAGE_SIZE, "PDCR: %08x\nPTCR: %08x\n",
pdcr, ptcr);
@@ -172,13 +172,13 @@ int mxc_audmux_v2_configure_port(unsigned int port, unsigned int ptcr,
return -ENOSYS;
if (audmux_clk)
- clk_enable(audmux_clk);
+ clk_prepare_enable(audmux_clk);
writel(ptcr, audmux_base + MXC_AUDMUX_V2_PTCR(port));
writel(pdcr, audmux_base + MXC_AUDMUX_V2_PDCR(port));
if (audmux_clk)
- clk_disable(audmux_clk);
+ clk_disable_unprepare(audmux_clk);
return 0;
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 07/14] ARM: mxc: audmux-v2: add clk_prepare/clk_unprepare
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel, linux-i2c, linux-mmc, netdev, linux-serial
Cc: linux, amit.kucheria, kernel, ben-linux, cjb, alan, eric.miao,
Richard Zhao
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
---
arch/arm/plat-mxc/audmux-v2.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/plat-mxc/audmux-v2.c b/arch/arm/plat-mxc/audmux-v2.c
index 8cced35..0e51fc3 100644
--- a/arch/arm/plat-mxc/audmux-v2.c
+++ b/arch/arm/plat-mxc/audmux-v2.c
@@ -73,13 +73,13 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf,
return -ENOMEM;
if (audmux_clk)
- clk_enable(audmux_clk);
+ clk_prepare_enable(audmux_clk);
ptcr = readl(audmux_base + MXC_AUDMUX_V2_PTCR(port));
pdcr = readl(audmux_base + MXC_AUDMUX_V2_PDCR(port));
if (audmux_clk)
- clk_disable(audmux_clk);
+ clk_disable_unprepare(audmux_clk);
ret = snprintf(buf, PAGE_SIZE, "PDCR: %08x\nPTCR: %08x\n",
pdcr, ptcr);
@@ -172,13 +172,13 @@ int mxc_audmux_v2_configure_port(unsigned int port, unsigned int ptcr,
return -ENOSYS;
if (audmux_clk)
- clk_enable(audmux_clk);
+ clk_prepare_enable(audmux_clk);
writel(ptcr, audmux_base + MXC_AUDMUX_V2_PTCR(port));
writel(pdcr, audmux_base + MXC_AUDMUX_V2_PDCR(port));
if (audmux_clk)
- clk_disable(audmux_clk);
+ clk_disable_unprepare(audmux_clk);
return 0;
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 07/14] ARM: mxc: audmux-v2: add clk_prepare/clk_unprepare
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
---
arch/arm/plat-mxc/audmux-v2.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/plat-mxc/audmux-v2.c b/arch/arm/plat-mxc/audmux-v2.c
index 8cced35..0e51fc3 100644
--- a/arch/arm/plat-mxc/audmux-v2.c
+++ b/arch/arm/plat-mxc/audmux-v2.c
@@ -73,13 +73,13 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf,
return -ENOMEM;
if (audmux_clk)
- clk_enable(audmux_clk);
+ clk_prepare_enable(audmux_clk);
ptcr = readl(audmux_base + MXC_AUDMUX_V2_PTCR(port));
pdcr = readl(audmux_base + MXC_AUDMUX_V2_PDCR(port));
if (audmux_clk)
- clk_disable(audmux_clk);
+ clk_disable_unprepare(audmux_clk);
ret = snprintf(buf, PAGE_SIZE, "PDCR: %08x\nPTCR: %08x\n",
pdcr, ptcr);
@@ -172,13 +172,13 @@ int mxc_audmux_v2_configure_port(unsigned int port, unsigned int ptcr,
return -ENOSYS;
if (audmux_clk)
- clk_enable(audmux_clk);
+ clk_prepare_enable(audmux_clk);
writel(ptcr, audmux_base + MXC_AUDMUX_V2_PTCR(port));
writel(pdcr, audmux_base + MXC_AUDMUX_V2_PDCR(port));
if (audmux_clk)
- clk_disable(audmux_clk);
+ clk_disable_unprepare(audmux_clk);
return 0;
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 08/14] ARM: pm-imx5: add clk_prepare/clk_unprepare
2011-11-11 10:50 ` Richard Zhao
(?)
@ 2011-11-11 10:50 ` Richard Zhao
-1 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel, linux-i2c, linux-mmc, netdev, linux-serial
Cc: linux, amit.kucheria, kernel, ben-linux, cjb, alan, eric.miao,
Richard Zhao
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
---
arch/arm/mach-mx5/pm-imx5.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-mx5/pm-imx5.c b/arch/arm/mach-mx5/pm-imx5.c
index 98052fc..2bdc85f 100644
--- a/arch/arm/mach-mx5/pm-imx5.c
+++ b/arch/arm/mach-mx5/pm-imx5.c
@@ -22,7 +22,7 @@ static struct clk *gpc_dvfs_clk;
static int mx5_suspend_prepare(void)
{
- return clk_enable(gpc_dvfs_clk);
+ return clk_prepare_enable(gpc_dvfs_clk);
}
static int mx5_suspend_enter(suspend_state_t state)
@@ -52,7 +52,7 @@ static int mx5_suspend_enter(suspend_state_t state)
static void mx5_suspend_finish(void)
{
- clk_disable(gpc_dvfs_clk);
+ clk_disable_unprepare(gpc_dvfs_clk);
}
static int mx5_pm_valid(suspend_state_t state)
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 08/14] ARM: pm-imx5: add clk_prepare/clk_unprepare
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel, linux-i2c, linux-mmc, netdev, linux-serial
Cc: linux, amit.kucheria, kernel, ben-linux, cjb, alan, eric.miao,
Richard Zhao
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
---
arch/arm/mach-mx5/pm-imx5.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-mx5/pm-imx5.c b/arch/arm/mach-mx5/pm-imx5.c
index 98052fc..2bdc85f 100644
--- a/arch/arm/mach-mx5/pm-imx5.c
+++ b/arch/arm/mach-mx5/pm-imx5.c
@@ -22,7 +22,7 @@ static struct clk *gpc_dvfs_clk;
static int mx5_suspend_prepare(void)
{
- return clk_enable(gpc_dvfs_clk);
+ return clk_prepare_enable(gpc_dvfs_clk);
}
static int mx5_suspend_enter(suspend_state_t state)
@@ -52,7 +52,7 @@ static int mx5_suspend_enter(suspend_state_t state)
static void mx5_suspend_finish(void)
{
- clk_disable(gpc_dvfs_clk);
+ clk_disable_unprepare(gpc_dvfs_clk);
}
static int mx5_pm_valid(suspend_state_t state)
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 08/14] ARM: pm-imx5: add clk_prepare/clk_unprepare
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
---
arch/arm/mach-mx5/pm-imx5.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-mx5/pm-imx5.c b/arch/arm/mach-mx5/pm-imx5.c
index 98052fc..2bdc85f 100644
--- a/arch/arm/mach-mx5/pm-imx5.c
+++ b/arch/arm/mach-mx5/pm-imx5.c
@@ -22,7 +22,7 @@ static struct clk *gpc_dvfs_clk;
static int mx5_suspend_prepare(void)
{
- return clk_enable(gpc_dvfs_clk);
+ return clk_prepare_enable(gpc_dvfs_clk);
}
static int mx5_suspend_enter(suspend_state_t state)
@@ -52,7 +52,7 @@ static int mx5_suspend_enter(suspend_state_t state)
static void mx5_suspend_finish(void)
{
- clk_disable(gpc_dvfs_clk);
+ clk_disable_unprepare(gpc_dvfs_clk);
}
static int mx5_pm_valid(suspend_state_t state)
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 09/14] ARM: mx31moboard: add clk_prepare/clk_unprepare
[not found] ` <1321008637-19999-1-git-send-email-richard.zhao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-11-11 10:50 ` Richard Zhao
@ 2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` Richard Zhao
` (4 subsequent siblings)
6 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-mmc-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-serial-u79uwXL29TY76Z2rM5mHXA
Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ,
amit.kucheria-Z7WLFzj8eWMS+FvcfC7Uqw,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ, ben-linux-elnMNo+KYs3YtjvyW6yDsg,
cjb-2X9k7bc8m7Mdnm+yROfE0A, alan-VuQAYsv1563Yd54FQh9/CA,
eric.miao-QSEj5FYQhm4dnm+yROfE0A, Richard Zhao
Signed-off-by: Richard Zhao <richard.zhao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
arch/arm/mach-imx/mach-mx31moboard.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c
index 07034f4..d1a9337 100644
--- a/arch/arm/mach-imx/mach-mx31moboard.c
+++ b/arch/arm/mach-imx/mach-mx31moboard.c
@@ -505,7 +505,7 @@ static void mx31moboard_poweroff(void)
struct clk *clk = clk_get_sys("imx2-wdt.0", NULL);
if (!IS_ERR(clk))
- clk_enable(clk);
+ clk_prepare_enable(clk);
mxc_iomux_mode(MX31_PIN_WATCHDOG_RST__WATCHDOG_RST);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 09/14] ARM: mx31moboard: add clk_prepare/clk_unprepare
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-mmc-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-serial-u79uwXL29TY76Z2rM5mHXA
Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ,
amit.kucheria-Z7WLFzj8eWMS+FvcfC7Uqw,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ, ben-linux-elnMNo+KYs3YtjvyW6yDsg,
cjb-2X9k7bc8m7Mdnm+yROfE0A, alan-VuQAYsv1563Yd54FQh9/CA,
eric.miao-QSEj5FYQhm4dnm+yROfE0A, Richard Zhao
Signed-off-by: Richard Zhao <richard.zhao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
arch/arm/mach-imx/mach-mx31moboard.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c
index 07034f4..d1a9337 100644
--- a/arch/arm/mach-imx/mach-mx31moboard.c
+++ b/arch/arm/mach-imx/mach-mx31moboard.c
@@ -505,7 +505,7 @@ static void mx31moboard_poweroff(void)
struct clk *clk = clk_get_sys("imx2-wdt.0", NULL);
if (!IS_ERR(clk))
- clk_enable(clk);
+ clk_prepare_enable(clk);
mxc_iomux_mode(MX31_PIN_WATCHDOG_RST__WATCHDOG_RST);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 09/14] ARM: mx31moboard: add clk_prepare/clk_unprepare
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
---
arch/arm/mach-imx/mach-mx31moboard.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c
index 07034f4..d1a9337 100644
--- a/arch/arm/mach-imx/mach-mx31moboard.c
+++ b/arch/arm/mach-imx/mach-mx31moboard.c
@@ -505,7 +505,7 @@ static void mx31moboard_poweroff(void)
struct clk *clk = clk_get_sys("imx2-wdt.0", NULL);
if (!IS_ERR(clk))
- clk_enable(clk);
+ clk_prepare_enable(clk);
mxc_iomux_mode(MX31_PIN_WATCHDOG_RST__WATCHDOG_RST);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 10/14] ARM: mxs: add clk_prepare/clk_unprepare
2011-11-11 10:50 ` Richard Zhao
(?)
@ 2011-11-11 10:50 ` Richard Zhao
-1 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel, linux-i2c, linux-mmc, netdev, linux-serial
Cc: linux, amit.kucheria, kernel, ben-linux, cjb, alan, eric.miao,
Richard Zhao
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
---
arch/arm/mach-mxs/system.c | 2 +-
arch/arm/mach-mxs/timer.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-mxs/system.c b/arch/arm/mach-mxs/system.c
index 20ec3bd..9760a12 100644
--- a/arch/arm/mach-mxs/system.c
+++ b/arch/arm/mach-mxs/system.c
@@ -66,7 +66,7 @@ static int __init mxs_arch_reset_init(void)
clk = clk_get_sys("rtc", NULL);
if (!IS_ERR(clk))
- clk_enable(clk);
+ clk_prepare_enable(clk);
return 0;
}
diff --git a/arch/arm/mach-mxs/timer.c b/arch/arm/mach-mxs/timer.c
index cace0d2..564a632 100644
--- a/arch/arm/mach-mxs/timer.c
+++ b/arch/arm/mach-mxs/timer.c
@@ -245,7 +245,7 @@ static int __init mxs_clocksource_init(struct clk *timer_clk)
void __init mxs_timer_init(struct clk *timer_clk, int irq)
{
- clk_enable(timer_clk);
+ clk_prepare_enable(timer_clk);
/*
* Initialize timers to a known state
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 10/14] ARM: mxs: add clk_prepare/clk_unprepare
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel, linux-i2c, linux-mmc, netdev, linux-serial
Cc: linux, amit.kucheria, kernel, ben-linux, cjb, alan, eric.miao,
Richard Zhao
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
---
arch/arm/mach-mxs/system.c | 2 +-
arch/arm/mach-mxs/timer.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-mxs/system.c b/arch/arm/mach-mxs/system.c
index 20ec3bd..9760a12 100644
--- a/arch/arm/mach-mxs/system.c
+++ b/arch/arm/mach-mxs/system.c
@@ -66,7 +66,7 @@ static int __init mxs_arch_reset_init(void)
clk = clk_get_sys("rtc", NULL);
if (!IS_ERR(clk))
- clk_enable(clk);
+ clk_prepare_enable(clk);
return 0;
}
diff --git a/arch/arm/mach-mxs/timer.c b/arch/arm/mach-mxs/timer.c
index cace0d2..564a632 100644
--- a/arch/arm/mach-mxs/timer.c
+++ b/arch/arm/mach-mxs/timer.c
@@ -245,7 +245,7 @@ static int __init mxs_clocksource_init(struct clk *timer_clk)
void __init mxs_timer_init(struct clk *timer_clk, int irq)
{
- clk_enable(timer_clk);
+ clk_prepare_enable(timer_clk);
/*
* Initialize timers to a known state
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 10/14] ARM: mxs: add clk_prepare/clk_unprepare
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
---
arch/arm/mach-mxs/system.c | 2 +-
arch/arm/mach-mxs/timer.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-mxs/system.c b/arch/arm/mach-mxs/system.c
index 20ec3bd..9760a12 100644
--- a/arch/arm/mach-mxs/system.c
+++ b/arch/arm/mach-mxs/system.c
@@ -66,7 +66,7 @@ static int __init mxs_arch_reset_init(void)
clk = clk_get_sys("rtc", NULL);
if (!IS_ERR(clk))
- clk_enable(clk);
+ clk_prepare_enable(clk);
return 0;
}
diff --git a/arch/arm/mach-mxs/timer.c b/arch/arm/mach-mxs/timer.c
index cace0d2..564a632 100644
--- a/arch/arm/mach-mxs/timer.c
+++ b/arch/arm/mach-mxs/timer.c
@@ -245,7 +245,7 @@ static int __init mxs_clocksource_init(struct clk *timer_clk)
void __init mxs_timer_init(struct clk *timer_clk, int irq)
{
- clk_enable(timer_clk);
+ clk_prepare_enable(timer_clk);
/*
* Initialize timers to a known state
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 11/14] serial: imx: add clk_prepare/clk_unprepare
[not found] ` <1321008637-19999-1-git-send-email-richard.zhao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-11-11 10:50 ` Richard Zhao
@ 2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` Richard Zhao
` (4 subsequent siblings)
6 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-mmc-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-serial-u79uwXL29TY76Z2rM5mHXA
Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ,
amit.kucheria-Z7WLFzj8eWMS+FvcfC7Uqw,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ, ben-linux-elnMNo+KYs3YtjvyW6yDsg,
cjb-2X9k7bc8m7Mdnm+yROfE0A, alan-VuQAYsv1563Yd54FQh9/CA,
eric.miao-QSEj5FYQhm4dnm+yROfE0A, Richard Zhao
Signed-off-by: Richard Zhao <richard.zhao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
drivers/tty/serial/imx.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 163fc90..8f3709f 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1390,7 +1390,7 @@ static int serial_imx_probe(struct platform_device *pdev)
ret = PTR_ERR(sport->clk);
goto unmap;
}
- clk_enable(sport->clk);
+ clk_prepare_enable(sport->clk);
sport->port.uartclk = clk_get_rate(sport->clk);
@@ -1413,8 +1413,8 @@ deinit:
if (pdata && pdata->exit)
pdata->exit(pdev);
clkput:
+ clk_disable_unprepare(sport->clk);
clk_put(sport->clk);
- clk_disable(sport->clk);
unmap:
iounmap(sport->port.membase);
free:
@@ -1434,11 +1434,10 @@ static int serial_imx_remove(struct platform_device *pdev)
if (sport) {
uart_remove_one_port(&imx_reg, &sport->port);
+ clk_disable_unprepare(sport->clk);
clk_put(sport->clk);
}
- clk_disable(sport->clk);
-
if (pdata && pdata->exit)
pdata->exit(pdev);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 11/14] serial: imx: add clk_prepare/clk_unprepare
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-mmc-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-serial-u79uwXL29TY76Z2rM5mHXA
Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ,
amit.kucheria-Z7WLFzj8eWMS+FvcfC7Uqw,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ, ben-linux-elnMNo+KYs3YtjvyW6yDsg,
cjb-2X9k7bc8m7Mdnm+yROfE0A, alan-VuQAYsv1563Yd54FQh9/CA,
eric.miao-QSEj5FYQhm4dnm+yROfE0A, Richard Zhao
Signed-off-by: Richard Zhao <richard.zhao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
drivers/tty/serial/imx.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 163fc90..8f3709f 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1390,7 +1390,7 @@ static int serial_imx_probe(struct platform_device *pdev)
ret = PTR_ERR(sport->clk);
goto unmap;
}
- clk_enable(sport->clk);
+ clk_prepare_enable(sport->clk);
sport->port.uartclk = clk_get_rate(sport->clk);
@@ -1413,8 +1413,8 @@ deinit:
if (pdata && pdata->exit)
pdata->exit(pdev);
clkput:
+ clk_disable_unprepare(sport->clk);
clk_put(sport->clk);
- clk_disable(sport->clk);
unmap:
iounmap(sport->port.membase);
free:
@@ -1434,11 +1434,10 @@ static int serial_imx_remove(struct platform_device *pdev)
if (sport) {
uart_remove_one_port(&imx_reg, &sport->port);
+ clk_disable_unprepare(sport->clk);
clk_put(sport->clk);
}
- clk_disable(sport->clk);
-
if (pdata && pdata->exit)
pdata->exit(pdev);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 11/14] serial: imx: add clk_prepare/clk_unprepare
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
---
drivers/tty/serial/imx.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 163fc90..8f3709f 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1390,7 +1390,7 @@ static int serial_imx_probe(struct platform_device *pdev)
ret = PTR_ERR(sport->clk);
goto unmap;
}
- clk_enable(sport->clk);
+ clk_prepare_enable(sport->clk);
sport->port.uartclk = clk_get_rate(sport->clk);
@@ -1413,8 +1413,8 @@ deinit:
if (pdata && pdata->exit)
pdata->exit(pdev);
clkput:
+ clk_disable_unprepare(sport->clk);
clk_put(sport->clk);
- clk_disable(sport->clk);
unmap:
iounmap(sport->port.membase);
free:
@@ -1434,11 +1434,10 @@ static int serial_imx_remove(struct platform_device *pdev)
if (sport) {
uart_remove_one_port(&imx_reg, &sport->port);
+ clk_disable_unprepare(sport->clk);
clk_put(sport->clk);
}
- clk_disable(sport->clk);
-
if (pdata && pdata->exit)
pdata->exit(pdev);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 12/14] net: fec: add clk_prepare/clk_unprepare
2011-11-11 10:50 ` Richard Zhao
(?)
@ 2011-11-11 10:50 ` Richard Zhao
-1 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel, linux-i2c, linux-mmc, netdev, linux-serial
Cc: linux, amit.kucheria, kernel, ben-linux, cjb, alan, eric.miao,
Richard Zhao
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
---
drivers/net/ethernet/freescale/fec.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec.c
index 1124ce0..e96fa44 100644
--- a/drivers/net/ethernet/freescale/fec.c
+++ b/drivers/net/ethernet/freescale/fec.c
@@ -1588,7 +1588,7 @@ fec_probe(struct platform_device *pdev)
ret = PTR_ERR(fep->clk);
goto failed_clk;
}
- clk_enable(fep->clk);
+ clk_prepare_enable(fep->clk);
ret = fec_enet_init(ndev);
if (ret)
@@ -1611,7 +1611,7 @@ failed_register:
fec_enet_mii_remove(fep);
failed_mii_init:
failed_init:
- clk_disable(fep->clk);
+ clk_disable_unprepare(fep->clk);
clk_put(fep->clk);
failed_clk:
for (i = 0; i < FEC_IRQ_NUM; i++) {
@@ -1638,7 +1638,7 @@ fec_drv_remove(struct platform_device *pdev)
fec_stop(ndev);
fec_enet_mii_remove(fep);
- clk_disable(fep->clk);
+ clk_disable_unprepare(fep->clk);
clk_put(fep->clk);
iounmap(fep->hwp);
unregister_netdev(ndev);
@@ -1664,7 +1664,7 @@ fec_suspend(struct device *dev)
fec_stop(ndev);
netif_device_detach(ndev);
}
- clk_disable(fep->clk);
+ clk_disable_unprepare(fep->clk);
return 0;
}
@@ -1675,7 +1675,7 @@ fec_resume(struct device *dev)
struct net_device *ndev = dev_get_drvdata(dev);
struct fec_enet_private *fep = netdev_priv(ndev);
- clk_enable(fep->clk);
+ clk_prepare_enable(fep->clk);
if (netif_running(ndev)) {
fec_restart(ndev, fep->full_duplex);
netif_device_attach(ndev);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 12/14] net: fec: add clk_prepare/clk_unprepare
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel, linux-i2c, linux-mmc, netdev, linux-serial
Cc: linux, amit.kucheria, kernel, ben-linux, cjb, alan, eric.miao,
Richard Zhao
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
---
drivers/net/ethernet/freescale/fec.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec.c
index 1124ce0..e96fa44 100644
--- a/drivers/net/ethernet/freescale/fec.c
+++ b/drivers/net/ethernet/freescale/fec.c
@@ -1588,7 +1588,7 @@ fec_probe(struct platform_device *pdev)
ret = PTR_ERR(fep->clk);
goto failed_clk;
}
- clk_enable(fep->clk);
+ clk_prepare_enable(fep->clk);
ret = fec_enet_init(ndev);
if (ret)
@@ -1611,7 +1611,7 @@ failed_register:
fec_enet_mii_remove(fep);
failed_mii_init:
failed_init:
- clk_disable(fep->clk);
+ clk_disable_unprepare(fep->clk);
clk_put(fep->clk);
failed_clk:
for (i = 0; i < FEC_IRQ_NUM; i++) {
@@ -1638,7 +1638,7 @@ fec_drv_remove(struct platform_device *pdev)
fec_stop(ndev);
fec_enet_mii_remove(fep);
- clk_disable(fep->clk);
+ clk_disable_unprepare(fep->clk);
clk_put(fep->clk);
iounmap(fep->hwp);
unregister_netdev(ndev);
@@ -1664,7 +1664,7 @@ fec_suspend(struct device *dev)
fec_stop(ndev);
netif_device_detach(ndev);
}
- clk_disable(fep->clk);
+ clk_disable_unprepare(fep->clk);
return 0;
}
@@ -1675,7 +1675,7 @@ fec_resume(struct device *dev)
struct net_device *ndev = dev_get_drvdata(dev);
struct fec_enet_private *fep = netdev_priv(ndev);
- clk_enable(fep->clk);
+ clk_prepare_enable(fep->clk);
if (netif_running(ndev)) {
fec_restart(ndev, fep->full_duplex);
netif_device_attach(ndev);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 12/14] net: fec: add clk_prepare/clk_unprepare
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
---
drivers/net/ethernet/freescale/fec.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec.c
index 1124ce0..e96fa44 100644
--- a/drivers/net/ethernet/freescale/fec.c
+++ b/drivers/net/ethernet/freescale/fec.c
@@ -1588,7 +1588,7 @@ fec_probe(struct platform_device *pdev)
ret = PTR_ERR(fep->clk);
goto failed_clk;
}
- clk_enable(fep->clk);
+ clk_prepare_enable(fep->clk);
ret = fec_enet_init(ndev);
if (ret)
@@ -1611,7 +1611,7 @@ failed_register:
fec_enet_mii_remove(fep);
failed_mii_init:
failed_init:
- clk_disable(fep->clk);
+ clk_disable_unprepare(fep->clk);
clk_put(fep->clk);
failed_clk:
for (i = 0; i < FEC_IRQ_NUM; i++) {
@@ -1638,7 +1638,7 @@ fec_drv_remove(struct platform_device *pdev)
fec_stop(ndev);
fec_enet_mii_remove(fep);
- clk_disable(fep->clk);
+ clk_disable_unprepare(fep->clk);
clk_put(fep->clk);
iounmap(fep->hwp);
unregister_netdev(ndev);
@@ -1664,7 +1664,7 @@ fec_suspend(struct device *dev)
fec_stop(ndev);
netif_device_detach(ndev);
}
- clk_disable(fep->clk);
+ clk_disable_unprepare(fep->clk);
return 0;
}
@@ -1675,7 +1675,7 @@ fec_resume(struct device *dev)
struct net_device *ndev = dev_get_drvdata(dev);
struct fec_enet_private *fep = netdev_priv(ndev);
- clk_enable(fep->clk);
+ clk_prepare_enable(fep->clk);
if (netif_running(ndev)) {
fec_restart(ndev, fep->full_duplex);
netif_device_attach(ndev);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 13/14] i2c: imx: add clk_prepare/clk_unprepare
[not found] ` <1321008637-19999-1-git-send-email-richard.zhao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-11-11 10:50 ` Richard Zhao
@ 2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` Richard Zhao
` (4 subsequent siblings)
6 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-mmc-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-serial-u79uwXL29TY76Z2rM5mHXA
Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ,
amit.kucheria-Z7WLFzj8eWMS+FvcfC7Uqw,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ, ben-linux-elnMNo+KYs3YtjvyW6yDsg,
cjb-2X9k7bc8m7Mdnm+yROfE0A, alan-VuQAYsv1563Yd54FQh9/CA,
eric.miao-QSEj5FYQhm4dnm+yROfE0A, Richard Zhao
Signed-off-by: Richard Zhao <richard.zhao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
drivers/i2c/busses/i2c-imx.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 58832e5..8d1ab6f 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -196,7 +196,7 @@ static int i2c_imx_start(struct imx_i2c_struct *i2c_imx)
dev_dbg(&i2c_imx->adapter.dev, "<%s>\n", __func__);
- clk_enable(i2c_imx->clk);
+ clk_prepare_enable(i2c_imx->clk);
writeb(i2c_imx->ifdr, i2c_imx->base + IMX_I2C_IFDR);
/* Enable I2C controller */
writeb(0, i2c_imx->base + IMX_I2C_I2SR);
@@ -245,7 +245,7 @@ static void i2c_imx_stop(struct imx_i2c_struct *i2c_imx)
/* Disable I2C controller */
writeb(0, i2c_imx->base + IMX_I2C_I2CR);
- clk_disable(i2c_imx->clk);
+ clk_disable_unprepare(i2c_imx->clk);
}
static void __init i2c_imx_set_clk(struct imx_i2c_struct *i2c_imx,
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 13/14] i2c: imx: add clk_prepare/clk_unprepare
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-mmc-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-serial-u79uwXL29TY76Z2rM5mHXA
Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ,
amit.kucheria-Z7WLFzj8eWMS+FvcfC7Uqw,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ, ben-linux-elnMNo+KYs3YtjvyW6yDsg,
cjb-2X9k7bc8m7Mdnm+yROfE0A, alan-VuQAYsv1563Yd54FQh9/CA,
eric.miao-QSEj5FYQhm4dnm+yROfE0A, Richard Zhao
Signed-off-by: Richard Zhao <richard.zhao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
drivers/i2c/busses/i2c-imx.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 58832e5..8d1ab6f 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -196,7 +196,7 @@ static int i2c_imx_start(struct imx_i2c_struct *i2c_imx)
dev_dbg(&i2c_imx->adapter.dev, "<%s>\n", __func__);
- clk_enable(i2c_imx->clk);
+ clk_prepare_enable(i2c_imx->clk);
writeb(i2c_imx->ifdr, i2c_imx->base + IMX_I2C_IFDR);
/* Enable I2C controller */
writeb(0, i2c_imx->base + IMX_I2C_I2SR);
@@ -245,7 +245,7 @@ static void i2c_imx_stop(struct imx_i2c_struct *i2c_imx)
/* Disable I2C controller */
writeb(0, i2c_imx->base + IMX_I2C_I2CR);
- clk_disable(i2c_imx->clk);
+ clk_disable_unprepare(i2c_imx->clk);
}
static void __init i2c_imx_set_clk(struct imx_i2c_struct *i2c_imx,
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 13/14] i2c: imx: add clk_prepare/clk_unprepare
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
---
drivers/i2c/busses/i2c-imx.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 58832e5..8d1ab6f 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -196,7 +196,7 @@ static int i2c_imx_start(struct imx_i2c_struct *i2c_imx)
dev_dbg(&i2c_imx->adapter.dev, "<%s>\n", __func__);
- clk_enable(i2c_imx->clk);
+ clk_prepare_enable(i2c_imx->clk);
writeb(i2c_imx->ifdr, i2c_imx->base + IMX_I2C_IFDR);
/* Enable I2C controller */
writeb(0, i2c_imx->base + IMX_I2C_I2SR);
@@ -245,7 +245,7 @@ static void i2c_imx_stop(struct imx_i2c_struct *i2c_imx)
/* Disable I2C controller */
writeb(0, i2c_imx->base + IMX_I2C_I2CR);
- clk_disable(i2c_imx->clk);
+ clk_disable_unprepare(i2c_imx->clk);
}
static void __init i2c_imx_set_clk(struct imx_i2c_struct *i2c_imx,
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 14/14] mmc: sdhci-esdhc-imx: add clk_prepare/clk_unprepare
2011-11-11 10:50 ` Richard Zhao
(?)
@ 2011-11-11 10:50 ` Richard Zhao
-1 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel, linux-i2c, linux-mmc, netdev, linux-serial
Cc: linux, amit.kucheria, kernel, ben-linux, cjb, alan, eric.miao,
Richard Zhao
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
---
drivers/mmc/host/sdhci-esdhc-imx.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index ae57769..f1ae37e 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -462,7 +462,7 @@ static int __devinit sdhci_esdhc_imx_probe(struct platform_device *pdev)
err = PTR_ERR(clk);
goto err_clk_get;
}
- clk_enable(clk);
+ clk_prepare_enable(clk);
pltfm_host->clk = clk;
if (!is_imx25_esdhc(imx_data))
@@ -550,7 +550,7 @@ no_card_detect_irq:
gpio_free(boarddata->wp_gpio);
no_card_detect_pin:
no_board_data:
- clk_disable(pltfm_host->clk);
+ clk_disable_unprepare(pltfm_host->clk);
clk_put(pltfm_host->clk);
err_clk_get:
kfree(imx_data);
@@ -577,7 +577,7 @@ static int __devexit sdhci_esdhc_imx_remove(struct platform_device *pdev)
gpio_free(boarddata->cd_gpio);
}
- clk_disable(pltfm_host->clk);
+ clk_disable_unprepare(pltfm_host->clk);
clk_put(pltfm_host->clk);
kfree(imx_data);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 14/14] mmc: sdhci-esdhc-imx: add clk_prepare/clk_unprepare
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel, linux-i2c, linux-mmc, netdev, linux-serial
Cc: linux, amit.kucheria, kernel, ben-linux, cjb, alan, eric.miao,
Richard Zhao
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
---
drivers/mmc/host/sdhci-esdhc-imx.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index ae57769..f1ae37e 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -462,7 +462,7 @@ static int __devinit sdhci_esdhc_imx_probe(struct platform_device *pdev)
err = PTR_ERR(clk);
goto err_clk_get;
}
- clk_enable(clk);
+ clk_prepare_enable(clk);
pltfm_host->clk = clk;
if (!is_imx25_esdhc(imx_data))
@@ -550,7 +550,7 @@ no_card_detect_irq:
gpio_free(boarddata->wp_gpio);
no_card_detect_pin:
no_board_data:
- clk_disable(pltfm_host->clk);
+ clk_disable_unprepare(pltfm_host->clk);
clk_put(pltfm_host->clk);
err_clk_get:
kfree(imx_data);
@@ -577,7 +577,7 @@ static int __devexit sdhci_esdhc_imx_remove(struct platform_device *pdev)
gpio_free(boarddata->cd_gpio);
}
- clk_disable(pltfm_host->clk);
+ clk_disable_unprepare(pltfm_host->clk);
clk_put(pltfm_host->clk);
kfree(imx_data);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* [PATCH V3 14/14] mmc: sdhci-esdhc-imx: add clk_prepare/clk_unprepare
@ 2011-11-11 10:50 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-11-11 10:50 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
---
drivers/mmc/host/sdhci-esdhc-imx.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index ae57769..f1ae37e 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -462,7 +462,7 @@ static int __devinit sdhci_esdhc_imx_probe(struct platform_device *pdev)
err = PTR_ERR(clk);
goto err_clk_get;
}
- clk_enable(clk);
+ clk_prepare_enable(clk);
pltfm_host->clk = clk;
if (!is_imx25_esdhc(imx_data))
@@ -550,7 +550,7 @@ no_card_detect_irq:
gpio_free(boarddata->wp_gpio);
no_card_detect_pin:
no_board_data:
- clk_disable(pltfm_host->clk);
+ clk_disable_unprepare(pltfm_host->clk);
clk_put(pltfm_host->clk);
err_clk_get:
kfree(imx_data);
@@ -577,7 +577,7 @@ static int __devexit sdhci_esdhc_imx_remove(struct platform_device *pdev)
gpio_free(boarddata->cd_gpio);
}
- clk_disable(pltfm_host->clk);
+ clk_disable_unprepare(pltfm_host->clk);
clk_put(pltfm_host->clk);
kfree(imx_data);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 53+ messages in thread
* Re: [PATCH V3 10/14] ARM: mxs: add clk_prepare/clk_unprepare
2011-11-11 10:50 ` Richard Zhao
@ 2011-12-19 22:21 ` Marek Vasut
-1 siblings, 0 replies; 53+ messages in thread
From: Marek Vasut @ 2011-12-19 22:21 UTC (permalink / raw)
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Cc: Richard Zhao, linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-mmc-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-serial-u79uwXL29TY76Z2rM5mHXA,
amit.kucheria-Z7WLFzj8eWMS+FvcfC7Uqw,
linux-lFZ/pmaqli7XmaaqVzeoHQ, kernel-bIcnvbaLZ9MEGnE8C9+IrQ,
eric.miao-QSEj5FYQhm4dnm+yROfE0A,
ben-linux-elnMNo+KYs3YtjvyW6yDsg, cjb-2X9k7bc8m7Mdnm+yROfE0A,
alan-VuQAYsv1563Yd54FQh9/CA, Fabio Estevam
> Signed-off-by: Richard Zhao <richard.zhao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> ---
> arch/arm/mach-mxs/system.c | 2 +-
> arch/arm/mach-mxs/timer.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-mxs/system.c b/arch/arm/mach-mxs/system.c
> index 20ec3bd..9760a12 100644
> --- a/arch/arm/mach-mxs/system.c
> +++ b/arch/arm/mach-mxs/system.c
> @@ -66,7 +66,7 @@ static int __init mxs_arch_reset_init(void)
>
> clk = clk_get_sys("rtc", NULL);
> if (!IS_ERR(clk))
> - clk_enable(clk);
> + clk_prepare_enable(clk);
>
> return 0;
> }
> diff --git a/arch/arm/mach-mxs/timer.c b/arch/arm/mach-mxs/timer.c
> index cace0d2..564a632 100644
> --- a/arch/arm/mach-mxs/timer.c
> +++ b/arch/arm/mach-mxs/timer.c
> @@ -245,7 +245,7 @@ static int __init mxs_clocksource_init(struct clk
> *timer_clk)
>
> void __init mxs_timer_init(struct clk *timer_clk, int irq)
> {
> - clk_enable(timer_clk);
> + clk_prepare_enable(timer_clk);
>
> /*
> * Initialize timers to a known state
Hi Richard,
I just came across this, will this also help solve the mxs problem with mutex
lock begin done in atomic context in clk_enable/disable()?
M
^ permalink raw reply [flat|nested] 53+ messages in thread
* [PATCH V3 10/14] ARM: mxs: add clk_prepare/clk_unprepare
@ 2011-12-19 22:21 ` Marek Vasut
0 siblings, 0 replies; 53+ messages in thread
From: Marek Vasut @ 2011-12-19 22:21 UTC (permalink / raw)
To: linux-arm-kernel
> Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
> ---
> arch/arm/mach-mxs/system.c | 2 +-
> arch/arm/mach-mxs/timer.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-mxs/system.c b/arch/arm/mach-mxs/system.c
> index 20ec3bd..9760a12 100644
> --- a/arch/arm/mach-mxs/system.c
> +++ b/arch/arm/mach-mxs/system.c
> @@ -66,7 +66,7 @@ static int __init mxs_arch_reset_init(void)
>
> clk = clk_get_sys("rtc", NULL);
> if (!IS_ERR(clk))
> - clk_enable(clk);
> + clk_prepare_enable(clk);
>
> return 0;
> }
> diff --git a/arch/arm/mach-mxs/timer.c b/arch/arm/mach-mxs/timer.c
> index cace0d2..564a632 100644
> --- a/arch/arm/mach-mxs/timer.c
> +++ b/arch/arm/mach-mxs/timer.c
> @@ -245,7 +245,7 @@ static int __init mxs_clocksource_init(struct clk
> *timer_clk)
>
> void __init mxs_timer_init(struct clk *timer_clk, int irq)
> {
> - clk_enable(timer_clk);
> + clk_prepare_enable(timer_clk);
>
> /*
> * Initialize timers to a known state
Hi Richard,
I just came across this, will this also help solve the mxs problem with mutex
lock begin done in atomic context in clk_enable/disable()?
M
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PATCH V3 10/14] ARM: mxs: add clk_prepare/clk_unprepare
2011-12-19 22:21 ` Marek Vasut
(?)
@ 2011-12-20 0:56 ` Richard Zhao
-1 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-12-20 0:56 UTC (permalink / raw)
To: Marek Vasut
Cc: linux-arm-kernel, amit.kucheria, linux, kernel, netdev,
linux-mmc, eric.miao, linux-i2c, linux-serial, cjb,
Fabio Estevam, Richard Zhao, ben-linux, alan
On Mon, Dec 19, 2011 at 11:21:41PM +0100, Marek Vasut wrote:
> > Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
> > ---
> > arch/arm/mach-mxs/system.c | 2 +-
> > arch/arm/mach-mxs/timer.c | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/arm/mach-mxs/system.c b/arch/arm/mach-mxs/system.c
> > index 20ec3bd..9760a12 100644
> > --- a/arch/arm/mach-mxs/system.c
> > +++ b/arch/arm/mach-mxs/system.c
> > @@ -66,7 +66,7 @@ static int __init mxs_arch_reset_init(void)
> >
> > clk = clk_get_sys("rtc", NULL);
> > if (!IS_ERR(clk))
> > - clk_enable(clk);
> > + clk_prepare_enable(clk);
> >
> > return 0;
> > }
> > diff --git a/arch/arm/mach-mxs/timer.c b/arch/arm/mach-mxs/timer.c
> > index cace0d2..564a632 100644
> > --- a/arch/arm/mach-mxs/timer.c
> > +++ b/arch/arm/mach-mxs/timer.c
> > @@ -245,7 +245,7 @@ static int __init mxs_clocksource_init(struct clk
> > *timer_clk)
> >
> > void __init mxs_timer_init(struct clk *timer_clk, int irq)
> > {
> > - clk_enable(timer_clk);
> > + clk_prepare_enable(timer_clk);
> >
> > /*
> > * Initialize timers to a known state
>
> Hi Richard,
>
> I just came across this, will this also help solve the mxs problem with mutex
> lock begin done in atomic context in clk_enable/disable()?
No, It's for converting to generic clock framwork.
You can look at Mike's generic clock patches. clk_hw_ops.enable/disable
definitely can not sleep.
On register side, there' two way to protect register:
- use a global spin lock
- only use spin lock wherever gate register share the same one with
other non-gate register.
Thanks
Richard
>
> M
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PATCH V3 10/14] ARM: mxs: add clk_prepare/clk_unprepare
@ 2011-12-20 0:56 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-12-20 0:56 UTC (permalink / raw)
To: Marek Vasut
Cc: linux-arm-kernel, amit.kucheria, linux, kernel, netdev,
linux-mmc, eric.miao, linux-i2c, linux-serial, cjb,
Fabio Estevam, Richard Zhao, ben-linux, alan
On Mon, Dec 19, 2011 at 11:21:41PM +0100, Marek Vasut wrote:
> > Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
> > ---
> > arch/arm/mach-mxs/system.c | 2 +-
> > arch/arm/mach-mxs/timer.c | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/arm/mach-mxs/system.c b/arch/arm/mach-mxs/system.c
> > index 20ec3bd..9760a12 100644
> > --- a/arch/arm/mach-mxs/system.c
> > +++ b/arch/arm/mach-mxs/system.c
> > @@ -66,7 +66,7 @@ static int __init mxs_arch_reset_init(void)
> >
> > clk = clk_get_sys("rtc", NULL);
> > if (!IS_ERR(clk))
> > - clk_enable(clk);
> > + clk_prepare_enable(clk);
> >
> > return 0;
> > }
> > diff --git a/arch/arm/mach-mxs/timer.c b/arch/arm/mach-mxs/timer.c
> > index cace0d2..564a632 100644
> > --- a/arch/arm/mach-mxs/timer.c
> > +++ b/arch/arm/mach-mxs/timer.c
> > @@ -245,7 +245,7 @@ static int __init mxs_clocksource_init(struct clk
> > *timer_clk)
> >
> > void __init mxs_timer_init(struct clk *timer_clk, int irq)
> > {
> > - clk_enable(timer_clk);
> > + clk_prepare_enable(timer_clk);
> >
> > /*
> > * Initialize timers to a known state
>
> Hi Richard,
>
> I just came across this, will this also help solve the mxs problem with mutex
> lock begin done in atomic context in clk_enable/disable()?
No, It's for converting to generic clock framwork.
You can look at Mike's generic clock patches. clk_hw_ops.enable/disable
definitely can not sleep.
On register side, there' two way to protect register:
- use a global spin lock
- only use spin lock wherever gate register share the same one with
other non-gate register.
Thanks
Richard
>
> M
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
^ permalink raw reply [flat|nested] 53+ messages in thread
* [PATCH V3 10/14] ARM: mxs: add clk_prepare/clk_unprepare
@ 2011-12-20 0:56 ` Richard Zhao
0 siblings, 0 replies; 53+ messages in thread
From: Richard Zhao @ 2011-12-20 0:56 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Dec 19, 2011 at 11:21:41PM +0100, Marek Vasut wrote:
> > Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
> > ---
> > arch/arm/mach-mxs/system.c | 2 +-
> > arch/arm/mach-mxs/timer.c | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/arm/mach-mxs/system.c b/arch/arm/mach-mxs/system.c
> > index 20ec3bd..9760a12 100644
> > --- a/arch/arm/mach-mxs/system.c
> > +++ b/arch/arm/mach-mxs/system.c
> > @@ -66,7 +66,7 @@ static int __init mxs_arch_reset_init(void)
> >
> > clk = clk_get_sys("rtc", NULL);
> > if (!IS_ERR(clk))
> > - clk_enable(clk);
> > + clk_prepare_enable(clk);
> >
> > return 0;
> > }
> > diff --git a/arch/arm/mach-mxs/timer.c b/arch/arm/mach-mxs/timer.c
> > index cace0d2..564a632 100644
> > --- a/arch/arm/mach-mxs/timer.c
> > +++ b/arch/arm/mach-mxs/timer.c
> > @@ -245,7 +245,7 @@ static int __init mxs_clocksource_init(struct clk
> > *timer_clk)
> >
> > void __init mxs_timer_init(struct clk *timer_clk, int irq)
> > {
> > - clk_enable(timer_clk);
> > + clk_prepare_enable(timer_clk);
> >
> > /*
> > * Initialize timers to a known state
>
> Hi Richard,
>
> I just came across this, will this also help solve the mxs problem with mutex
> lock begin done in atomic context in clk_enable/disable()?
No, It's for converting to generic clock framwork.
You can look at Mike's generic clock patches. clk_hw_ops.enable/disable
definitely can not sleep.
On register side, there' two way to protect register:
- use a global spin lock
- only use spin lock wherever gate register share the same one with
other non-gate register.
Thanks
Richard
>
> M
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PATCH V3 10/14] ARM: mxs: add clk_prepare/clk_unprepare
2011-11-11 10:50 ` Richard Zhao
(?)
@ 2011-12-20 2:15 ` Shawn Guo
-1 siblings, 0 replies; 53+ messages in thread
From: Shawn Guo @ 2011-12-20 2:15 UTC (permalink / raw)
To: Richard Zhao, Sascha Hauer
Cc: linux-arm-kernel, linux-i2c, linux-mmc, netdev, linux-serial,
linux, amit.kucheria, kernel, ben-linux, cjb, alan, eric.miao
Hi Sascha,
Can you drop this patch from your tree? This patch is not complete
even for mxs platform/arch code, and will conflict with my mxs
clk-prepare series.
--
Regards,
Shawn
On Fri, Nov 11, 2011 at 06:50:33PM +0800, Richard Zhao wrote:
> Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
> ---
> arch/arm/mach-mxs/system.c | 2 +-
> arch/arm/mach-mxs/timer.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-mxs/system.c b/arch/arm/mach-mxs/system.c
> index 20ec3bd..9760a12 100644
> --- a/arch/arm/mach-mxs/system.c
> +++ b/arch/arm/mach-mxs/system.c
> @@ -66,7 +66,7 @@ static int __init mxs_arch_reset_init(void)
>
> clk = clk_get_sys("rtc", NULL);
> if (!IS_ERR(clk))
> - clk_enable(clk);
> + clk_prepare_enable(clk);
>
> return 0;
> }
> diff --git a/arch/arm/mach-mxs/timer.c b/arch/arm/mach-mxs/timer.c
> index cace0d2..564a632 100644
> --- a/arch/arm/mach-mxs/timer.c
> +++ b/arch/arm/mach-mxs/timer.c
> @@ -245,7 +245,7 @@ static int __init mxs_clocksource_init(struct clk *timer_clk)
>
> void __init mxs_timer_init(struct clk *timer_clk, int irq)
> {
> - clk_enable(timer_clk);
> + clk_prepare_enable(timer_clk);
>
> /*
> * Initialize timers to a known state
> --
> 1.7.5.4
^ permalink raw reply [flat|nested] 53+ messages in thread
* Re: [PATCH V3 10/14] ARM: mxs: add clk_prepare/clk_unprepare
@ 2011-12-20 2:15 ` Shawn Guo
0 siblings, 0 replies; 53+ messages in thread
From: Shawn Guo @ 2011-12-20 2:15 UTC (permalink / raw)
To: Richard Zhao, Sascha Hauer
Cc: linux-arm-kernel, linux-i2c, linux-mmc, netdev, linux-serial,
linux, amit.kucheria, kernel, ben-linux, cjb, alan, eric.miao
Hi Sascha,
Can you drop this patch from your tree? This patch is not complete
even for mxs platform/arch code, and will conflict with my mxs
clk-prepare series.
--
Regards,
Shawn
On Fri, Nov 11, 2011 at 06:50:33PM +0800, Richard Zhao wrote:
> Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
> ---
> arch/arm/mach-mxs/system.c | 2 +-
> arch/arm/mach-mxs/timer.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-mxs/system.c b/arch/arm/mach-mxs/system.c
> index 20ec3bd..9760a12 100644
> --- a/arch/arm/mach-mxs/system.c
> +++ b/arch/arm/mach-mxs/system.c
> @@ -66,7 +66,7 @@ static int __init mxs_arch_reset_init(void)
>
> clk = clk_get_sys("rtc", NULL);
> if (!IS_ERR(clk))
> - clk_enable(clk);
> + clk_prepare_enable(clk);
>
> return 0;
> }
> diff --git a/arch/arm/mach-mxs/timer.c b/arch/arm/mach-mxs/timer.c
> index cace0d2..564a632 100644
> --- a/arch/arm/mach-mxs/timer.c
> +++ b/arch/arm/mach-mxs/timer.c
> @@ -245,7 +245,7 @@ static int __init mxs_clocksource_init(struct clk *timer_clk)
>
> void __init mxs_timer_init(struct clk *timer_clk, int irq)
> {
> - clk_enable(timer_clk);
> + clk_prepare_enable(timer_clk);
>
> /*
> * Initialize timers to a known state
> --
> 1.7.5.4
^ permalink raw reply [flat|nested] 53+ messages in thread
* [PATCH V3 10/14] ARM: mxs: add clk_prepare/clk_unprepare
@ 2011-12-20 2:15 ` Shawn Guo
0 siblings, 0 replies; 53+ messages in thread
From: Shawn Guo @ 2011-12-20 2:15 UTC (permalink / raw)
To: linux-arm-kernel
Hi Sascha,
Can you drop this patch from your tree? This patch is not complete
even for mxs platform/arch code, and will conflict with my mxs
clk-prepare series.
--
Regards,
Shawn
On Fri, Nov 11, 2011 at 06:50:33PM +0800, Richard Zhao wrote:
> Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
> ---
> arch/arm/mach-mxs/system.c | 2 +-
> arch/arm/mach-mxs/timer.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-mxs/system.c b/arch/arm/mach-mxs/system.c
> index 20ec3bd..9760a12 100644
> --- a/arch/arm/mach-mxs/system.c
> +++ b/arch/arm/mach-mxs/system.c
> @@ -66,7 +66,7 @@ static int __init mxs_arch_reset_init(void)
>
> clk = clk_get_sys("rtc", NULL);
> if (!IS_ERR(clk))
> - clk_enable(clk);
> + clk_prepare_enable(clk);
>
> return 0;
> }
> diff --git a/arch/arm/mach-mxs/timer.c b/arch/arm/mach-mxs/timer.c
> index cace0d2..564a632 100644
> --- a/arch/arm/mach-mxs/timer.c
> +++ b/arch/arm/mach-mxs/timer.c
> @@ -245,7 +245,7 @@ static int __init mxs_clocksource_init(struct clk *timer_clk)
>
> void __init mxs_timer_init(struct clk *timer_clk, int irq)
> {
> - clk_enable(timer_clk);
> + clk_prepare_enable(timer_clk);
>
> /*
> * Initialize timers to a known state
> --
> 1.7.5.4
^ permalink raw reply [flat|nested] 53+ messages in thread
end of thread, other threads:[~2011-12-20 2:15 UTC | newest]
Thread overview: 53+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-11 10:50 [PATCH V3 00/14] add clk_prepare/clk_unprepare to imx drivers Richard Zhao
2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` [PATCH V3 01/14] clk: add helper functions clk_prepare_enable and clk_disable_unprepare Richard Zhao
2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` [PATCH V3 06/14] ARM: mxc: arch_reset: add clk_prepare/clk_unprepare Richard Zhao
2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` [PATCH V3 07/14] ARM: mxc: audmux-v2: " Richard Zhao
2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` [PATCH V3 08/14] ARM: pm-imx5: " Richard Zhao
2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` Richard Zhao
[not found] ` <1321008637-19999-1-git-send-email-richard.zhao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-11-11 10:50 ` [PATCH V3 02/14] ARM: mxc: time: " Richard Zhao
2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` [PATCH V3 03/14] ARM: mxc: ahci: " Richard Zhao
2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` [PATCH V3 04/14] ARM: mxc: pwm: " Richard Zhao
2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` [PATCH V3 05/14] ARM: mxc: epit: " Richard Zhao
2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` [PATCH V3 09/14] ARM: mx31moboard: " Richard Zhao
2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` [PATCH V3 11/14] serial: imx: " Richard Zhao
2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` [PATCH V3 13/14] i2c: " Richard Zhao
2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` [PATCH V3 10/14] ARM: mxs: " Richard Zhao
2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` Richard Zhao
[not found] ` <1321008637-19999-11-git-send-email-richard.zhao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-12-19 22:21 ` Marek Vasut
2011-12-19 22:21 ` Marek Vasut
2011-12-20 0:56 ` Richard Zhao
2011-12-20 0:56 ` Richard Zhao
2011-12-20 0:56 ` Richard Zhao
2011-12-20 2:15 ` Shawn Guo
2011-12-20 2:15 ` Shawn Guo
2011-12-20 2:15 ` Shawn Guo
2011-11-11 10:50 ` [PATCH V3 12/14] net: fec: " Richard Zhao
2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` [PATCH V3 14/14] mmc: sdhci-esdhc-imx: " Richard Zhao
2011-11-11 10:50 ` Richard Zhao
2011-11-11 10:50 ` Richard Zhao
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.