/* For mmc_card_blockaddr */
#include "../core/card.h"
+#include "mmc_hsq.h"
#define DRIVER_NAME "sdhost-bcm2835"
mmc_hostname(host->mmc));
}
- mmc_request_done(host->mmc, mrq);
+ if (!mmc_hsq_finalize_request(host->mmc, mrq))
+ mmc_request_done(host->mmc, mrq);
log_event("TSK>", mrq, 0);
}
-int bcm2835_sdhost_add_host(struct bcm2835_host *host)
+int bcm2835_sdhost_add_host(struct platform_device *pdev)
{
+ struct bcm2835_host *host = platform_get_drvdata(pdev);
struct mmc_host *mmc;
+ struct mmc_hsq *hsq;
struct dma_slave_config cfg;
char pio_limit_string[20];
int ret;
goto untasklet;
}
+ hsq = devm_kzalloc(&pdev->dev, sizeof(*hsq), GFP_KERNEL);
+ if (!hsq) {
+ ret = -ENOMEM;
+ goto free_irq;
+ }
+
+ ret = mmc_hsq_init(hsq, host->mmc);
+ if (ret)
+ goto free_irq;
+
mmc_add_host(mmc);
pio_limit_string[0] = '\0';
return 0;
+free_irq:
+ free_irq(host->irq, host);
+
untasklet:
tasklet_kill(&host->finish_tasklet);
host->firmware_sets_cdiv = (msg[1] != ~0);
- ret = bcm2835_sdhost_add_host(host);
+ platform_set_drvdata(pdev, host);
+
+ ret = bcm2835_sdhost_add_host(pdev);
if (ret)
goto err;
- platform_set_drvdata(pdev, host);
-
pr_debug("bcm2835_sdhost_probe -> OK\n");
return 0;