]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - drivers/mmc/arm_pl180_mmci.c
mmc: Remove ops from struct mmc and put in mmc_ops
[people/ms/u-boot.git] / drivers / mmc / arm_pl180_mmci.c
index ab2e81e5d43ced6484dcf399c7335cd8b3904a6e..4490e9710b8d30be85169a4846d0acbd9a4bca42 100644 (file)
@@ -7,20 +7,7 @@
  * Author: Martin Lundholm <martin.xa.lundholm@stericsson.com>
  * Ported to drivers/mmc/ by: Matt Waddel <matt.waddel@linaro.org>
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 /* #define DEBUG */
@@ -348,6 +335,12 @@ static void host_set_ios(struct mmc *dev)
        udelay(CLK_CHANGE_DELAY);
 }
 
+static const struct mmc_ops arm_pl180_mmci_ops = {
+       .send_cmd = host_request,
+       .set_ios = host_set_ios,
+       .init = mmc_host_reset,
+};
+
 /*
  * mmc_host_init - initialize the mmc controller.
  * Set initial clock and power for mmc slot.
@@ -373,11 +366,7 @@ int arm_pl180_mmci_init(struct pl180_mmc_host *host)
        sdi_u32 = readl(&host->base->mask0) & ~SDI_MASK0_MASK;
        writel(sdi_u32, &host->base->mask0);
        strncpy(dev->name, host->name, sizeof(dev->name));
-       dev->send_cmd = host_request;
-       dev->set_ios = host_set_ios;
-       dev->init = mmc_host_reset;
-       dev->getcd = NULL;
-       dev->getwp = NULL;
+       dev->ops = &arm_pl180_mmci_ops;
        dev->host_caps = host->caps;
        dev->voltages = host->voltages;
        dev->f_min = host->clock_min;