ALSA: usb - Fix Oops after usb-midi disconnection
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / drivers / mmc / host / sdhci-of-hlwd.c
blob35117f3ed7576fe79a5e6f9263fdcc951f806d7e
1 /*
2 * drivers/mmc/host/sdhci-of-hlwd.c
4 * Nintendo Wii Secure Digital Host Controller Interface.
5 * Copyright (C) 2009 The GameCube Linux Team
6 * Copyright (C) 2009 Albert Herranz
8 * Based on sdhci-of-esdhc.c
10 * Copyright (c) 2007 Freescale Semiconductor, Inc.
11 * Copyright (c) 2009 MontaVista Software, Inc.
13 * Authors: Xiaobo Xie <X.Xie@freescale.com>
14 * Anton Vorontsov <avorontsov@ru.mvista.com>
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or (at
19 * your option) any later version.
22 #include <linux/delay.h>
23 #include <linux/mmc/host.h>
24 #include "sdhci-of.h"
25 #include "sdhci.h"
28 * Ops and quirks for the Nintendo Wii SDHCI controllers.
32 * We need a small delay after each write, or things go horribly wrong.
34 #define SDHCI_HLWD_WRITE_DELAY 5 /* usecs */
36 static void sdhci_hlwd_writel(struct sdhci_host *host, u32 val, int reg)
38 sdhci_be32bs_writel(host, val, reg);
39 udelay(SDHCI_HLWD_WRITE_DELAY);
42 static void sdhci_hlwd_writew(struct sdhci_host *host, u16 val, int reg)
44 sdhci_be32bs_writew(host, val, reg);
45 udelay(SDHCI_HLWD_WRITE_DELAY);
48 static void sdhci_hlwd_writeb(struct sdhci_host *host, u8 val, int reg)
50 sdhci_be32bs_writeb(host, val, reg);
51 udelay(SDHCI_HLWD_WRITE_DELAY);
54 struct sdhci_of_data sdhci_hlwd = {
55 .quirks = SDHCI_QUIRK_32BIT_DMA_ADDR |
56 SDHCI_QUIRK_32BIT_DMA_SIZE,
57 .ops = {
58 .readl = sdhci_be32bs_readl,
59 .readw = sdhci_be32bs_readw,
60 .readb = sdhci_be32bs_readb,
61 .writel = sdhci_hlwd_writel,
62 .writew = sdhci_hlwd_writew,
63 .writeb = sdhci_hlwd_writeb,