From: Grazvydas Ignotas <notasas@gmail.com>
To: linux-omap@vger.kernel.org
Cc: Grazvydas Ignotas <notasas@gmail.com>
Subject: [PATCH] minor mmc-twl4030 cleanups
Date: Wed, 12 Nov 2008 11:48:05 +0200 [thread overview]
Message-ID: <1226483285-7443-1-git-send-email-notasas@gmail.com> (raw)
Remove the unused devconf_loopback_clock field from twl_mmc_controller.
control_devconf_offset only changes for DEVCONF1, so move it out.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
---
arch/arm/mach-omap2/mmc-twl4030.c | 19 +++++++------------
1 files changed, 7 insertions(+), 12 deletions(-)
diff --git a/arch/arm/mach-omap2/mmc-twl4030.c b/arch/arm/mach-omap2/mmc-twl4030.c
index 32625e7..b1fe0f3 100644
--- a/arch/arm/mach-omap2/mmc-twl4030.c
+++ b/arch/arm/mach-omap2/mmc-twl4030.c
@@ -50,26 +50,21 @@
#define VMMC_DEV_GRP_P1 0x20
static u16 control_pbias_offset;
+static u16 control_devconf1_offset;
#define HSMMC_NAME_LEN 9
static struct twl_mmc_controller {
struct omap_mmc_platform_data *mmc;
- u32 devconf_loopback_clock;
- u16 control_devconf_offset;
u8 twl_vmmc_dev_grp;
u8 twl_mmc_dedicated;
char name[HSMMC_NAME_LEN];
} hsmmc[] = {
{
- .control_devconf_offset = OMAP2_CONTROL_DEVCONF0,
- .devconf_loopback_clock = OMAP2_MMCSDIO1ADPCLKISEL,
.twl_vmmc_dev_grp = VMMC1_DEV_GRP,
.twl_mmc_dedicated = VMMC1_DEDICATED,
},
{
- /* control_devconf_offset set dynamically */
- .devconf_loopback_clock = OMAP2_MMCSDIO2ADPCLKISEL,
.twl_vmmc_dev_grp = VMMC2_DEV_GRP,
.twl_mmc_dedicated = VMMC2_DEDICATED,
},
@@ -257,9 +252,9 @@ static int twl_mmc1_set_power(struct device *dev, int slot, int power_on,
/* REVISIT: Loop back clock not needed for 2430? */
if (!cpu_is_omap2430()) {
- reg = omap_ctrl_readl(c->control_devconf_offset);
+ reg = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0);
reg |= OMAP2_MMCSDIO1ADPCLKISEL;
- omap_ctrl_writel(reg, c->control_devconf_offset);
+ omap_ctrl_writel(reg, OMAP2_CONTROL_DEVCONF0);
}
reg = omap_ctrl_readl(control_pbias_offset);
@@ -305,9 +300,9 @@ static int twl_mmc2_set_power(struct device *dev, int slot, int power_on, int vd
if (power_on) {
u32 reg;
- reg = omap_ctrl_readl(c->control_devconf_offset);
+ reg = omap_ctrl_readl(control_devconf1_offset);
reg |= OMAP2_MMCSDIO2ADPCLKISEL;
- omap_ctrl_writel(reg, c->control_devconf_offset);
+ omap_ctrl_writel(reg, control_devconf1_offset);
ret = twl_mmc_set_voltage(c, vdd);
} else {
ret = twl_mmc_set_voltage(c, 0);
@@ -325,11 +320,11 @@ void __init hsmmc_init(struct twl4030_hsmmc_info *controllers)
if (cpu_is_omap2430()) {
control_pbias_offset = OMAP243X_CONTROL_PBIAS_LITE;
- hsmmc[1].control_devconf_offset = OMAP243X_CONTROL_DEVCONF1;
+ control_devconf1_offset = OMAP243X_CONTROL_DEVCONF1;
nr_hsmmc = 2;
} else {
control_pbias_offset = OMAP343X_CONTROL_PBIAS_LITE;
- hsmmc[1].control_devconf_offset = OMAP343X_CONTROL_DEVCONF1;
+ control_devconf1_offset = OMAP343X_CONTROL_DEVCONF1;
}
for (c = controllers; c->mmc; c++) {
--
1.5.4.3
next reply other threads:[~2008-11-12 9:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-12 9:48 Grazvydas Ignotas [this message]
2008-11-13 23:05 ` [PATCH] minor mmc-twl4030 cleanups Tony Lindgren
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=1226483285-7443-1-git-send-email-notasas@gmail.com \
--to=notasas@gmail.com \
--cc=linux-omap@vger.kernel.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 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.