From: jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Cc: dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
ben-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org
Subject: [PATCH 2/6] SPI: S3C64XX: Differentiate ip and rate clock
Date: Mon, 18 Jan 2010 18:50:11 +0900 [thread overview]
Message-ID: <1263808215-16544-2-git-send-email-jassisinghbrar@gmail.com> (raw)
In-Reply-To: <1263808215-16544-1-git-send-email-jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
From: Jassi Brar <jassi.brar-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
The instance of SPI clock for controller and that used for generating
signals ought to be independently handled.
Signed-off-by: Jassi Brar <jassi.brar-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
---
drivers/spi/spi_s3c64xx.c | 28 ++++++++--------------------
1 files changed, 8 insertions(+), 20 deletions(-)
diff --git a/drivers/spi/spi_s3c64xx.c b/drivers/spi/spi_s3c64xx.c
index ad93d5d..6d03d8f 100644
--- a/drivers/spi/spi_s3c64xx.c
+++ b/drivers/spi/spi_s3c64xx.c
@@ -1000,10 +1000,7 @@ static int __init s3c64xx_spi_probe(struct platform_device *pdev)
goto err4;
}
- if (sci->src_clk_nr == S3C64XX_SPI_SRCCLK_PCLK)
- sci->src_clk = sdd->clk;
- else
- sci->src_clk = clk_get(&pdev->dev, sci->src_clk_name);
+ sci->src_clk = clk_get(&pdev->dev, sci->src_clk_name);
if (IS_ERR(sci->src_clk)) {
dev_err(&pdev->dev,
"Unable to acquire clock '%s'\n", sci->src_clk_name);
@@ -1011,7 +1008,7 @@ static int __init s3c64xx_spi_probe(struct platform_device *pdev)
goto err5;
}
- if (sci->src_clk != sdd->clk && clk_enable(sci->src_clk)) {
+ if (clk_enable(sci->src_clk)) {
dev_err(&pdev->dev, "Couldn't enable clock '%s'\n",
sci->src_clk_name);
ret = -EBUSY;
@@ -1053,11 +1050,9 @@ static int __init s3c64xx_spi_probe(struct platform_device *pdev)
err8:
destroy_workqueue(sdd->workqueue);
err7:
- if (sci->src_clk != sdd->clk)
- clk_disable(sci->src_clk);
+ clk_disable(sci->src_clk);
err6:
- if (sci->src_clk != sdd->clk)
- clk_put(sci->src_clk);
+ clk_put(sci->src_clk);
err5:
clk_disable(sdd->clk);
err4:
@@ -1093,11 +1088,8 @@ static int s3c64xx_spi_remove(struct platform_device *pdev)
destroy_workqueue(sdd->workqueue);
- if (sci->src_clk != sdd->clk)
- clk_disable(sci->src_clk);
-
- if (sci->src_clk != sdd->clk)
- clk_put(sci->src_clk);
+ clk_disable(sci->src_clk);
+ clk_put(sci->src_clk);
clk_disable(sdd->clk);
clk_put(sdd->clk);
@@ -1130,9 +1122,7 @@ static int s3c64xx_spi_suspend(struct platform_device *pdev, pm_message_t state)
msleep(10);
/* Disable the clock */
- if (sci->src_clk != sdd->clk)
- clk_disable(sci->src_clk);
-
+ clk_disable(sci->src_clk);
clk_disable(sdd->clk);
sdd->cur_speed = 0; /* Output Clock is stopped */
@@ -1150,9 +1140,7 @@ static int s3c64xx_spi_resume(struct platform_device *pdev)
sci->cfg_gpio(pdev);
/* Enable the clock */
- if (sci->src_clk != sdd->clk)
- clk_enable(sci->src_clk);
-
+ clk_enable(sci->src_clk);
clk_enable(sdd->clk);
s3c64xx_spi_hwinit(sdd, pdev->id);
--
1.6.2.5
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
next prev parent reply other threads:[~2010-01-18 9:50 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-18 9:50 [PATCH 1/6] SPI: S3C64XX: Rename s3c64xx_spi_cntrlr_info jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w
[not found] ` <1263808215-16544-1-git-send-email-jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-01-18 9:50 ` jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w [this message]
[not found] ` <1263808215-16544-2-git-send-email-jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-01-18 9:50 ` [PATCH 3/6] SPI: S3C64XX: Move src_clk to local driver data jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w
[not found] ` <1263808215-16544-3-git-send-email-jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-01-18 9:50 ` [PATCH 4/6] SPI: S3C64XX: Check before mem-region release jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w
[not found] ` <1263808215-16544-4-git-send-email-jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-01-18 9:50 ` [PATCH 5/6] SPI: S3C64XX: Include moved header jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w
[not found] ` <1263808215-16544-5-git-send-email-jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-01-18 9:50 ` [PATCH 6/6] SPI: S3C64XX: Add new parameter to cs callback jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w
[not found] ` <1263808215-16544-6-git-send-email-jassisinghbrar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-01-18 18:15 ` Grant Likely
[not found] ` <fa686aa41001181015g6b3d35fdy8ee0f5134a8ca1a5-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-18 23:49 ` jassi brar
2010-01-18 18:13 ` [PATCH 5/6] SPI: S3C64XX: Include moved header Grant Likely
[not found] ` <fa686aa41001181013i62142f3fs5c387a406f3b7d59-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-18 23:46 ` jassi brar
2010-01-18 18:12 ` [PATCH 4/6] SPI: S3C64XX: Check before mem-region release Grant Likely
[not found] ` <fa686aa41001181012s57c0e863s6b9b6b2724514a9f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-18 23:42 ` jassi brar
[not found] ` <1b68c6791001181542p618a8d47n45a120e51cfed1f1-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-19 2:32 ` Grant Likely
[not found] ` <fa686aa41001181832r3d2462f6y87649244b8afc5f2-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-19 9:52 ` jassi brar
[not found] ` <1b68c6791001190152m652fd117k468893144af8dcfe-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-21 1:35 ` jassi brar
[not found] ` <1b68c6791001201735w3060c54blfa85b547917727c2-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-21 1:46 ` jassi brar
[not found] ` <1b68c6791001201746p313234bbkdf5fe5db0dcecd9f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-21 2:55 ` Grant Likely
[not found] ` <fa686aa41001201855m5c054d90nb3652a5b0d3ffd86-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-21 3:06 ` jassi brar
[not found] ` <1b68c6791001201906r45c52f71h7f5ea396e91ef3b8-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-21 15:00 ` Grant Likely
2010-01-21 15:10 ` Carl-Daniel Hailfinger
2010-01-22 14:51 ` Ralf Baechle
2010-01-18 17:58 ` [PATCH 2/6] SPI: S3C64XX: Differentiate ip and rate clock Grant Likely
[not found] ` <fa686aa41001180958l15df3a9dyfa5869b6f53c8fcb-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-18 23:40 ` jassi brar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1263808215-16544-2-git-send-email-jassisinghbrar@gmail.com \
--to=jassisinghbrar-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=ben-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org \
--cc=dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).