mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
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>
This commit is contained in:
parent
4956e10903
commit
4380c14fd7
2 changed files with 6 additions and 4 deletions
|
@ -39,19 +39,23 @@ static unsigned int fmax = 515633;
|
||||||
/**
|
/**
|
||||||
* struct variant_data - MMCI variant-specific quirks
|
* struct variant_data - MMCI variant-specific quirks
|
||||||
* @clkreg: default value for MCICLOCK register
|
* @clkreg: default value for MCICLOCK register
|
||||||
|
* @clkreg_enable: enable value for MMCICLOCK register
|
||||||
*/
|
*/
|
||||||
struct variant_data {
|
struct variant_data {
|
||||||
unsigned int clkreg;
|
unsigned int clkreg;
|
||||||
|
unsigned int clkreg_enable;
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct variant_data variant_arm = {
|
static struct variant_data variant_arm = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct variant_data variant_u300 = {
|
static struct variant_data variant_u300 = {
|
||||||
|
.clkreg_enable = 1 << 13, /* HWFCEN */
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct variant_data variant_ux500 = {
|
static struct variant_data variant_ux500 = {
|
||||||
.clkreg = MCI_CLK_ENABLE,
|
.clkreg = MCI_CLK_ENABLE,
|
||||||
|
.clkreg_enable = 1 << 14, /* HWFCEN */
|
||||||
};
|
};
|
||||||
/*
|
/*
|
||||||
* This must be called with host->lock held
|
* This must be called with host->lock held
|
||||||
|
@ -71,8 +75,8 @@ static void mmci_set_clkreg(struct mmci_host *host, unsigned int desired)
|
||||||
clk = 255;
|
clk = 255;
|
||||||
host->cclk = host->mclk / (2 * (clk + 1));
|
host->cclk = host->mclk / (2 * (clk + 1));
|
||||||
}
|
}
|
||||||
if (host->hw_designer == AMBA_VENDOR_ST)
|
|
||||||
clk |= MCI_ST_FCEN; /* Bug fix in ST IP block */
|
clk |= variant->clkreg_enable;
|
||||||
clk |= MCI_CLK_ENABLE;
|
clk |= MCI_CLK_ENABLE;
|
||||||
/* This hasn't proven to be worthwhile */
|
/* This hasn't proven to be worthwhile */
|
||||||
/* clk |= MCI_CLK_PWRSAVE; */
|
/* clk |= MCI_CLK_PWRSAVE; */
|
||||||
|
|
|
@ -28,8 +28,6 @@
|
||||||
#define MCI_4BIT_BUS (1 << 11)
|
#define MCI_4BIT_BUS (1 << 11)
|
||||||
/* 8bit wide buses supported in ST Micro versions */
|
/* 8bit wide buses supported in ST Micro versions */
|
||||||
#define MCI_ST_8BIT_BUS (1 << 12)
|
#define MCI_ST_8BIT_BUS (1 << 12)
|
||||||
/* HW flow control on the ST Micro version */
|
|
||||||
#define MCI_ST_FCEN (1 << 13)
|
|
||||||
|
|
||||||
#define MMCIARGUMENT 0x008
|
#define MMCIARGUMENT 0x008
|
||||||
#define MMCICOMMAND 0x00c
|
#define MMCICOMMAND 0x00c
|
||||||
|
|
Loading…
Reference in a new issue