From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
Andrew Lunn <andrew@lunn.ch>, Olof Johansson <olof@lixom.net>,
Arnd Bergmann <arnd@arndb.de>,
linux-arm-kernel@lists.infradead.org,
Viresh Kumar <viresh.kumar@st.com>
Subject: linux-next: manual merge of the akpm tree with the arm-soc tree
Date: Thu, 17 May 2012 17:18:10 +1000 [thread overview]
Message-ID: <20120517171810.64d248977f410292c18086cd@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 3539 bytes --]
Hi Andrew,
Today's linux-next merge of the akpm tree got a conflict in
drivers/ata/sata_mv.c between commit eee989902aab ("ARM: Orion: SATA: Add
per channel clk/clkdev support") from the arm-soc tree and commit
"ata/sata_mv: remove conditional compilation of clk code" from the akpm
tree.
I fixed it up (see below) and can carry the fix as necessary.
[I used the arm-soc version with all the conditionals on CONFIG_HAVE_CLK
removed.]
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc drivers/ata/sata_mv.c
index 24712ad,37503b8..0000000
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@@ -551,10 -551,7 +551,8 @@@ struct mv_host_priv
u32 irq_mask_offset;
u32 unmask_all_irqs;
- #if defined(CONFIG_HAVE_CLK)
struct clk *clk;
+ struct clk **port_clks;
- #endif
/*
* These consistent DMA memory pools give us guaranteed
* alignment for hardware-accessed data structures,
@@@ -4028,9 -4025,6 +4026,7 @@@ static int mv_platform_probe(struct pla
struct resource *res;
int n_ports = 0;
int rc;
- #if defined(CONFIG_HAVE_CLK)
+ int port;
- #endif
ata_print_version_once(&pdev->dev, DRV_VERSION);
@@@ -4058,13 -4052,6 +4054,11 @@@
if (!host || !hpriv)
return -ENOMEM;
- #if defined(CONFIG_HAVE_CLK)
+ hpriv->port_clks = devm_kzalloc(&pdev->dev,
+ sizeof(struct clk *) * n_ports,
+ GFP_KERNEL);
+ if (!hpriv->port_clks)
+ return -ENOMEM;
- #endif
host->private_data = hpriv;
hpriv->n_ports = n_ports;
hpriv->board_idx = chip_soc;
@@@ -4074,21 -4061,11 +4068,19 @@@
resource_size(res));
hpriv->base -= SATAHC0_REG_BASE;
- #if defined(CONFIG_HAVE_CLK)
hpriv->clk = clk_get(&pdev->dev, NULL);
if (IS_ERR(hpriv->clk))
- dev_notice(&pdev->dev, "cannot get clkdev\n");
+ dev_notice(&pdev->dev, "cannot get optional clkdev\n");
else
- clk_enable(hpriv->clk);
+ clk_prepare_enable(hpriv->clk);
+
+ for (port = 0; port < n_ports; port++) {
+ char port_number[16];
+ sprintf(port_number, "%d", port);
+ hpriv->port_clks[port] = clk_get(&pdev->dev, port_number);
+ if (!IS_ERR(hpriv->port_clks[port]))
+ clk_prepare_enable(hpriv->port_clks[port]);
+ }
- #endif
/*
* (Re-)program MBUS remapping windows if we are asked to.
@@@ -4115,18 -4092,10 +4107,16 @@@
return 0;
err:
- #if defined(CONFIG_HAVE_CLK)
if (!IS_ERR(hpriv->clk)) {
- clk_disable(hpriv->clk);
+ clk_disable_unprepare(hpriv->clk);
clk_put(hpriv->clk);
}
+ for (port = 0; port < n_ports; port++) {
+ if (!IS_ERR(hpriv->port_clks[port])) {
+ clk_disable_unprepare(hpriv->port_clks[port]);
+ clk_put(hpriv->port_clks[port]);
+ }
+ }
- #endif
return rc;
}
@@@ -4142,24 -4111,13 +4132,20 @@@
static int __devexit mv_platform_remove(struct platform_device *pdev)
{
struct ata_host *host = platform_get_drvdata(pdev);
- #if defined(CONFIG_HAVE_CLK)
struct mv_host_priv *hpriv = host->private_data;
+ int port;
- #endif
ata_host_detach(host);
- #if defined(CONFIG_HAVE_CLK)
if (!IS_ERR(hpriv->clk)) {
- clk_disable(hpriv->clk);
+ clk_disable_unprepare(hpriv->clk);
clk_put(hpriv->clk);
}
+ for (port = 0; port < host->n_ports; port++) {
+ if (!IS_ERR(hpriv->port_clks[port])) {
+ clk_disable_unprepare(hpriv->port_clks[port]);
+ clk_put(hpriv->port_clks[port]);
+ }
+ }
- #endif
return 0;
}
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next reply other threads:[~2012-05-17 7:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-17 7:18 Stephen Rothwell [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-06-21 7:36 linux-next: manual merge of the akpm tree with the arm-soc tree Stephen Rothwell
2013-06-21 7:33 Stephen Rothwell
2013-03-12 3:47 Stephen Rothwell
2013-03-12 6:25 ` Andrew Lunn
2013-03-12 11:12 ` Jason Cooper
2013-03-12 11:37 ` Olof Johansson
2013-03-12 11:53 ` Jason Cooper
2013-03-12 12:48 ` Arnd Bergmann
2013-03-12 13:32 ` Jason Cooper
2013-03-12 20:20 ` Andrew Morton
2012-05-14 9:24 Stephen Rothwell
2012-05-14 21:57 ` Turquette, Mike
2012-02-29 6:21 Stephen Rothwell
2012-02-29 6:32 ` Yong Zhang
2012-02-29 6:54 ` Haojian Zhuang
2012-02-29 7:11 ` Stephen Rothwell
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=20120517171810.64d248977f410292c18086cd@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=akpm@linux-foundation.org \
--cc=andrew@lunn.ch \
--cc=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=olof@lixom.net \
--cc=viresh.kumar@st.com \
/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).