via-sdmmc.c (4ffd3aaf37b785536810b3783ce0f58d52e9a57e) via-sdmmc.c (2ee4f6200597bda9713e28a9c1e65a392615b4b5)
1/*
2 * drivers/mmc/host/via-sdmmc.c - VIA SD/MMC Card Reader driver
3 * Copyright (c) 2008, VIA Technologies Inc. All Rights Reserved.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or (at
8 * your option) any later version.

--- 918 unchanged lines hidden (view full) ---

927
928 mmiowb();
929out:
930 spin_unlock(&sdhost->lock);
931
932 return result;
933}
934
1/*
2 * drivers/mmc/host/via-sdmmc.c - VIA SD/MMC Card Reader driver
3 * Copyright (c) 2008, VIA Technologies Inc. All Rights Reserved.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or (at
8 * your option) any later version.

--- 918 unchanged lines hidden (view full) ---

927
928 mmiowb();
929out:
930 spin_unlock(&sdhost->lock);
931
932 return result;
933}
934
935static void via_sdc_timeout(unsigned long ulongdata)
935static void via_sdc_timeout(struct timer_list *t)
936{
937 struct via_crdr_mmc_host *sdhost;
938 unsigned long flags;
939
936{
937 struct via_crdr_mmc_host *sdhost;
938 unsigned long flags;
939
940 sdhost = (struct via_crdr_mmc_host *)ulongdata;
940 sdhost = from_timer(sdhost, t, timer);
941
942 spin_lock_irqsave(&sdhost->lock, flags);
943
944 if (sdhost->mrq) {
945 pr_err("%s: Timeout waiting for hardware interrupt."
946 "cmd:0x%x\n", mmc_hostname(sdhost->mmc),
947 sdhost->mrq->cmd->opcode);
948

--- 82 unchanged lines hidden (view full) ---

1031
1032static void via_init_mmc_host(struct via_crdr_mmc_host *host)
1033{
1034 struct mmc_host *mmc = host->mmc;
1035 void __iomem *addrbase;
1036 u32 lenreg;
1037 u32 status;
1038
941
942 spin_lock_irqsave(&sdhost->lock, flags);
943
944 if (sdhost->mrq) {
945 pr_err("%s: Timeout waiting for hardware interrupt."
946 "cmd:0x%x\n", mmc_hostname(sdhost->mmc),
947 sdhost->mrq->cmd->opcode);
948

--- 82 unchanged lines hidden (view full) ---

1031
1032static void via_init_mmc_host(struct via_crdr_mmc_host *host)
1033{
1034 struct mmc_host *mmc = host->mmc;
1035 void __iomem *addrbase;
1036 u32 lenreg;
1037 u32 status;
1038
1039 setup_timer(&host->timer, via_sdc_timeout, (unsigned long)host);
1039 timer_setup(&host->timer, via_sdc_timeout, 0);
1040
1041 spin_lock_init(&host->lock);
1042
1043 mmc->f_min = VIA_CRDR_MIN_CLOCK;
1044 mmc->f_max = VIA_CRDR_MAX_CLOCK;
1045 mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195;
1046 mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SD_HIGHSPEED;
1047 mmc->ops = &via_sdc_ops;

--- 291 unchanged lines hidden ---
1040
1041 spin_lock_init(&host->lock);
1042
1043 mmc->f_min = VIA_CRDR_MIN_CLOCK;
1044 mmc->f_max = VIA_CRDR_MAX_CLOCK;
1045 mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195;
1046 mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SD_HIGHSPEED;
1047 mmc->ops = &via_sdc_ops;

--- 291 unchanged lines hidden ---