sdhci.c (707acd01ded3c60a4e277f7c5432d397897b4dfd) | sdhci.c (ab769f227f79bedae7840f99b6c0c4d66aafc78e) |
---|---|
1/* 2 * Copyright 2011, Marvell Semiconductor Inc. 3 * Lei Wen <leiwen@marvell.com> 4 * 5 * SPDX-License-Identifier: GPL-2.0+ 6 * 7 * Back ported to the 8xx platform (from the 8260 platform) by 8 * Murray.Jensen@cmst.csiro.au, 27-Jan-01. --- 416 unchanged lines hidden (view full) --- 425 sdhci_writel(host, SDHCI_INT_DATA_MASK | SDHCI_INT_CMD_MASK, 426 SDHCI_INT_ENABLE); 427 /* Mask all sdhci interrupt sources */ 428 sdhci_writel(host, 0x0, SDHCI_SIGNAL_ENABLE); 429 430 return 0; 431} 432 | 1/* 2 * Copyright 2011, Marvell Semiconductor Inc. 3 * Lei Wen <leiwen@marvell.com> 4 * 5 * SPDX-License-Identifier: GPL-2.0+ 6 * 7 * Back ported to the 8xx platform (from the 8260 platform) by 8 * Murray.Jensen@cmst.csiro.au, 27-Jan-01. --- 416 unchanged lines hidden (view full) --- 425 sdhci_writel(host, SDHCI_INT_DATA_MASK | SDHCI_INT_CMD_MASK, 426 SDHCI_INT_ENABLE); 427 /* Mask all sdhci interrupt sources */ 428 sdhci_writel(host, 0x0, SDHCI_SIGNAL_ENABLE); 429 430 return 0; 431} 432 |
433 434static const struct mmc_ops sdhci_ops = { 435 .send_cmd = sdhci_send_command, 436 .set_ios = sdhci_set_ios, 437 .init = sdhci_init, 438}; 439 |
|
433int add_sdhci(struct sdhci_host *host, u32 max_clk, u32 min_clk) 434{ 435 struct mmc *mmc; 436 unsigned int caps; 437 438 mmc = malloc(sizeof(struct mmc)); 439 if (!mmc) { 440 printf("%s: mmc malloc fail!\n", __func__); 441 return -1; 442 } 443 444 mmc->priv = host; 445 host->mmc = mmc; 446 447 sprintf(mmc->name, "%s", host->name); | 440int add_sdhci(struct sdhci_host *host, u32 max_clk, u32 min_clk) 441{ 442 struct mmc *mmc; 443 unsigned int caps; 444 445 mmc = malloc(sizeof(struct mmc)); 446 if (!mmc) { 447 printf("%s: mmc malloc fail!\n", __func__); 448 return -1; 449 } 450 451 mmc->priv = host; 452 host->mmc = mmc; 453 454 sprintf(mmc->name, "%s", host->name); |
448 mmc->send_cmd = sdhci_send_command; 449 mmc->set_ios = sdhci_set_ios; 450 mmc->init = sdhci_init; 451 mmc->getcd = NULL; 452 mmc->getwp = NULL; | 455 mmc->ops = &sdhci_ops; |
453 454 caps = sdhci_readl(host, SDHCI_CAPABILITIES); 455#ifdef CONFIG_MMC_SDMA 456 if (!(caps & SDHCI_CAN_DO_SDMA)) { 457 printf("%s: Your controller doesn't support SDMA!!\n", 458 __func__); 459 return -1; 460 } --- 51 unchanged lines hidden --- | 456 457 caps = sdhci_readl(host, SDHCI_CAPABILITIES); 458#ifdef CONFIG_MMC_SDMA 459 if (!(caps & SDHCI_CAN_DO_SDMA)) { 460 printf("%s: Your controller doesn't support SDMA!!\n", 461 __func__); 462 return -1; 463 } --- 51 unchanged lines hidden --- |