diff options
author | Rabin Vincent <rabin.vincent@stericsson.com> | 2010-07-21 07:55:18 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-07-29 10:40:32 -0400 |
commit | 4380c14fd77338bac9d1da4dc5dd9f6eb4966c82 (patch) | |
tree | 1042ee4eec5b78c646fb75f6f8bb71328eb52673 /drivers | |
parent | 4956e10903fd3459306dd9438c1e714ba3068a2a (diff) |
ARM: 6245/1: mmci: enable hardware flow control on Ux500 variants
Although both the U300 and Ux500 use ST variants, the HWFCEN bits are at
different positions, so use the variant_data to store the information.
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/host/mmci.c | 8 | ||||
-rw-r--r-- | drivers/mmc/host/mmci.h | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index fd2e7acbed39..379af904bf6c 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c | |||
@@ -39,19 +39,23 @@ static unsigned int fmax = 515633; | |||
39 | /** | 39 | /** |
40 | * struct variant_data - MMCI variant-specific quirks | 40 | * struct variant_data - MMCI variant-specific quirks |
41 | * @clkreg: default value for MCICLOCK register | 41 | * @clkreg: default value for MCICLOCK register |
42 | * @clkreg_enable: enable value for MMCICLOCK register | ||
42 | */ | 43 | */ |
43 | struct variant_data { | 44 | struct variant_data { |
44 | unsigned int clkreg; | 45 | unsigned int clkreg; |
46 | unsigned int clkreg_enable; | ||
45 | }; | 47 | }; |
46 | 48 | ||
47 | static struct variant_data variant_arm = { | 49 | static struct variant_data variant_arm = { |
48 | }; | 50 | }; |
49 | 51 | ||
50 | static struct variant_data variant_u300 = { | 52 | static struct variant_data variant_u300 = { |
53 | .clkreg_enable = 1 << 13, /* HWFCEN */ | ||
51 | }; | 54 | }; |
52 | 55 | ||
53 | static struct variant_data variant_ux500 = { | 56 | static struct variant_data variant_ux500 = { |
54 | .clkreg = MCI_CLK_ENABLE, | 57 | .clkreg = MCI_CLK_ENABLE, |
58 | .clkreg_enable = 1 << 14, /* HWFCEN */ | ||
55 | }; | 59 | }; |
56 | /* | 60 | /* |
57 | * This must be called with host->lock held | 61 | * This must be called with host->lock held |
@@ -71,8 +75,8 @@ static void mmci_set_clkreg(struct mmci_host *host, unsigned int desired) | |||
71 | clk = 255; | 75 | clk = 255; |
72 | host->cclk = host->mclk / (2 * (clk + 1)); | 76 | host->cclk = host->mclk / (2 * (clk + 1)); |
73 | } | 77 | } |
74 | if (host->hw_designer == AMBA_VENDOR_ST) | 78 | |
75 | clk |= MCI_ST_FCEN; /* Bug fix in ST IP block */ | 79 | clk |= variant->clkreg_enable; |
76 | clk |= MCI_CLK_ENABLE; | 80 | clk |= MCI_CLK_ENABLE; |
77 | /* This hasn't proven to be worthwhile */ | 81 | /* This hasn't proven to be worthwhile */ |
78 | /* clk |= MCI_CLK_PWRSAVE; */ | 82 | /* clk |= MCI_CLK_PWRSAVE; */ |
diff --git a/drivers/mmc/host/mmci.h b/drivers/mmc/host/mmci.h index b98cc782402a..68970cfb81e1 100644 --- a/drivers/mmc/host/mmci.h +++ b/drivers/mmc/host/mmci.h | |||
@@ -28,8 +28,6 @@ | |||
28 | #define MCI_4BIT_BUS (1 << 11) | 28 | #define MCI_4BIT_BUS (1 << 11) |
29 | /* 8bit wide buses supported in ST Micro versions */ | 29 | /* 8bit wide buses supported in ST Micro versions */ |
30 | #define MCI_ST_8BIT_BUS (1 << 12) | 30 | #define MCI_ST_8BIT_BUS (1 << 12) |
31 | /* HW flow control on the ST Micro version */ | ||
32 | #define MCI_ST_FCEN (1 << 13) | ||
33 | 31 | ||
34 | #define MMCIARGUMENT 0x008 | 32 | #define MMCIARGUMENT 0x008 |
35 | #define MMCICOMMAND 0x00c | 33 | #define MMCICOMMAND 0x00c |