|
@@ -46,36 +46,6 @@
|
|
|
#define CMUX_SHIFT_PHASE_SHIFT 24
|
|
|
#define CMUX_SHIFT_PHASE_MASK (7 << CMUX_SHIFT_PHASE_SHIFT)
|
|
|
|
|
|
-static const u8 tuning_block_64[] = {
|
|
|
- 0xff, 0x0f, 0xff, 0x00, 0xff, 0xcc, 0xc3, 0xcc,
|
|
|
- 0xc3, 0x3c, 0xcc, 0xff, 0xfe, 0xff, 0xfe, 0xef,
|
|
|
- 0xff, 0xdf, 0xff, 0xdd, 0xff, 0xfb, 0xff, 0xfb,
|
|
|
- 0xbf, 0xff, 0x7f, 0xff, 0x77, 0xf7, 0xbd, 0xef,
|
|
|
- 0xff, 0xf0, 0xff, 0xf0, 0x0f, 0xfc, 0xcc, 0x3c,
|
|
|
- 0xcc, 0x33, 0xcc, 0xcf, 0xff, 0xef, 0xff, 0xee,
|
|
|
- 0xff, 0xfd, 0xff, 0xfd, 0xdf, 0xff, 0xbf, 0xff,
|
|
|
- 0xbb, 0xff, 0xf7, 0xff, 0xf7, 0x7f, 0x7b, 0xde,
|
|
|
-};
|
|
|
-
|
|
|
-static const u8 tuning_block_128[] = {
|
|
|
- 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00,
|
|
|
- 0xff, 0xff, 0xcc, 0xcc, 0xcc, 0x33, 0xcc, 0xcc,
|
|
|
- 0xcc, 0x33, 0x33, 0xcc, 0xcc, 0xcc, 0xff, 0xff,
|
|
|
- 0xff, 0xee, 0xff, 0xff, 0xff, 0xee, 0xee, 0xff,
|
|
|
- 0xff, 0xff, 0xdd, 0xff, 0xff, 0xff, 0xdd, 0xdd,
|
|
|
- 0xff, 0xff, 0xff, 0xbb, 0xff, 0xff, 0xff, 0xbb,
|
|
|
- 0xbb, 0xff, 0xff, 0xff, 0x77, 0xff, 0xff, 0xff,
|
|
|
- 0x77, 0x77, 0xff, 0x77, 0xbb, 0xdd, 0xee, 0xff,
|
|
|
- 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00,
|
|
|
- 0x00, 0xff, 0xff, 0xcc, 0xcc, 0xcc, 0x33, 0xcc,
|
|
|
- 0xcc, 0xcc, 0x33, 0x33, 0xcc, 0xcc, 0xcc, 0xff,
|
|
|
- 0xff, 0xff, 0xee, 0xff, 0xff, 0xff, 0xee, 0xee,
|
|
|
- 0xff, 0xff, 0xff, 0xdd, 0xff, 0xff, 0xff, 0xdd,
|
|
|
- 0xdd, 0xff, 0xff, 0xff, 0xbb, 0xff, 0xff, 0xff,
|
|
|
- 0xbb, 0xbb, 0xff, 0xff, 0xff, 0x77, 0xff, 0xff,
|
|
|
- 0xff, 0x77, 0x77, 0xff, 0x77, 0xbb, 0xdd, 0xee,
|
|
|
-};
|
|
|
-
|
|
|
struct sdhci_msm_host {
|
|
|
struct platform_device *pdev;
|
|
|
void __iomem *core_mem; /* MSM SDCC mapped address */
|
|
@@ -370,8 +340,8 @@ static int sdhci_msm_execute_tuning(struct sdhci_host *host, u32 opcode)
|
|
|
{
|
|
|
int tuning_seq_cnt = 3;
|
|
|
u8 phase, *data_buf, tuned_phases[16], tuned_phase_cnt = 0;
|
|
|
- const u8 *tuning_block_pattern = tuning_block_64;
|
|
|
- int size = sizeof(tuning_block_64); /* Pattern size in bytes */
|
|
|
+ const u8 *tuning_block_pattern = tuning_blk_pattern_4bit;
|
|
|
+ int size = sizeof(tuning_blk_pattern_4bit);
|
|
|
int rc;
|
|
|
struct mmc_host *mmc = host->mmc;
|
|
|
struct mmc_ios ios = host->mmc->ios;
|
|
@@ -387,8 +357,8 @@ static int sdhci_msm_execute_tuning(struct sdhci_host *host, u32 opcode)
|
|
|
|
|
|
if ((opcode == MMC_SEND_TUNING_BLOCK_HS200) &&
|
|
|
(mmc->ios.bus_width == MMC_BUS_WIDTH_8)) {
|
|
|
- tuning_block_pattern = tuning_block_128;
|
|
|
- size = sizeof(tuning_block_128);
|
|
|
+ tuning_block_pattern = tuning_blk_pattern_8bit;
|
|
|
+ size = sizeof(tuning_blk_pattern_8bit);
|
|
|
}
|
|
|
|
|
|
data_buf = kmalloc(size, GFP_KERNEL);
|