Commit 6b128326 authored by Hauke Mehrtens's avatar Hauke Mehrtens
Browse files

kernel: bump 4.14 to 4.14.161



Refreshed all patches.

Compile-tested on: ipq40xx
Runtime-tested on: none
Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
parent 97e9be4e
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
LINUX_RELEASE?=1 LINUX_RELEASE?=1
LINUX_VERSION-4.9 = .207 LINUX_VERSION-4.9 = .207
LINUX_VERSION-4.14 = .160 LINUX_VERSION-4.14 = .161
LINUX_KERNEL_HASH-4.9.207 = ca86637e7b5bec65eeb7da695824e0e8aca5ba52eb742885f0b7241977400124 LINUX_KERNEL_HASH-4.9.207 = ca86637e7b5bec65eeb7da695824e0e8aca5ba52eb742885f0b7241977400124
LINUX_KERNEL_HASH-4.14.160 = c60326bad1bcdede514ca8a0bb96843fa7578ef00829cced6218b888b2efa92c LINUX_KERNEL_HASH-4.14.161 = 9d23629f50e6c7313c4f1277455137b7727a6117df931c4c4fb7fab7e98f81c9
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
......
...@@ -8,7 +8,7 @@ Signed-off-by: Giuseppe Lippolis <giu.lippolis@gmail.com> ...@@ -8,7 +8,7 @@ Signed-off-by: Giuseppe Lippolis <giu.lippolis@gmail.com>
--- a/drivers/spi/spidev.c --- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c
@@ -669,6 +669,7 @@ static const struct of_device_id spidev_ @@ -672,6 +672,7 @@ static const struct of_device_id spidev_
{ .compatible = "lineartechnology,ltc2488" }, { .compatible = "lineartechnology,ltc2488" },
{ .compatible = "ge,achc" }, { .compatible = "ge,achc" },
{ .compatible = "semtech,sx1301" }, { .compatible = "semtech,sx1301" },
......
...@@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> ...@@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#define PACKET_FANOUT_LB 1 #define PACKET_FANOUT_LB 1
--- a/net/packet/af_packet.c --- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c +++ b/net/packet/af_packet.c
@@ -1829,6 +1829,7 @@ static int packet_rcv_spkt(struct sk_buf @@ -1830,6 +1830,7 @@ static int packet_rcv_spkt(struct sk_buf
{ {
struct sock *sk; struct sock *sk;
struct sockaddr_pkt *spkt; struct sockaddr_pkt *spkt;
...@@ -38,7 +38,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> ...@@ -38,7 +38,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/* /*
* When we registered the protocol we saved the socket in the data * When we registered the protocol we saved the socket in the data
@@ -1836,6 +1837,7 @@ static int packet_rcv_spkt(struct sk_buf @@ -1837,6 +1838,7 @@ static int packet_rcv_spkt(struct sk_buf
*/ */
sk = pt->af_packet_priv; sk = pt->af_packet_priv;
...@@ -46,7 +46,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> ...@@ -46,7 +46,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/* /*
* Yank back the headers [hope the device set this * Yank back the headers [hope the device set this
@@ -1848,7 +1850,7 @@ static int packet_rcv_spkt(struct sk_buf @@ -1849,7 +1851,7 @@ static int packet_rcv_spkt(struct sk_buf
* so that this procedure is noop. * so that this procedure is noop.
*/ */
...@@ -55,7 +55,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> ...@@ -55,7 +55,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
goto out; goto out;
if (!net_eq(dev_net(dev), sock_net(sk))) if (!net_eq(dev_net(dev), sock_net(sk)))
@@ -2075,12 +2077,12 @@ static int packet_rcv(struct sk_buff *sk @@ -2076,12 +2078,12 @@ static int packet_rcv(struct sk_buff *sk
unsigned int snaplen, res; unsigned int snaplen, res;
bool is_drop_n_account = false; bool is_drop_n_account = false;
...@@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> ...@@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!net_eq(dev_net(dev), sock_net(sk))) if (!net_eq(dev_net(dev), sock_net(sk)))
goto drop; goto drop;
@@ -2206,12 +2208,12 @@ static int tpacket_rcv(struct sk_buff *s @@ -2207,12 +2209,12 @@ static int tpacket_rcv(struct sk_buff *s
BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32); BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32);
BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48); BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48);
...@@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> ...@@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!net_eq(dev_net(dev), sock_net(sk))) if (!net_eq(dev_net(dev), sock_net(sk)))
goto drop; goto drop;
@@ -3294,6 +3296,7 @@ static int packet_create(struct net *net @@ -3295,6 +3297,7 @@ static int packet_create(struct net *net
mutex_init(&po->pg_vec_lock); mutex_init(&po->pg_vec_lock);
po->rollover = NULL; po->rollover = NULL;
po->prot_hook.func = packet_rcv; po->prot_hook.func = packet_rcv;
...@@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> ...@@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (sock->type == SOCK_PACKET) if (sock->type == SOCK_PACKET)
po->prot_hook.func = packet_rcv_spkt; po->prot_hook.func = packet_rcv_spkt;
@@ -3907,6 +3910,16 @@ packet_setsockopt(struct socket *sock, i @@ -3908,6 +3911,16 @@ packet_setsockopt(struct socket *sock, i
po->xmit = val ? packet_direct_xmit : dev_queue_xmit; po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
return 0; return 0;
} }
...@@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> ...@@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
default: default:
return -ENOPROTOOPT; return -ENOPROTOOPT;
} }
@@ -3959,6 +3972,13 @@ static int packet_getsockopt(struct sock @@ -3960,6 +3973,13 @@ static int packet_getsockopt(struct sock
case PACKET_VNET_HDR: case PACKET_VNET_HDR:
val = po->has_vnet_hdr; val = po->has_vnet_hdr;
break; break;
......
...@@ -26,7 +26,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -26,7 +26,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
/* MSDC_IOCON mask */ /* MSDC_IOCON mask */
#define MSDC_IOCON_SDR104CKS (0x1 << 0) /* RW */ #define MSDC_IOCON_SDR104CKS (0x1 << 0) /* RW */
@@ -295,6 +298,10 @@ struct msdc_save_para { @@ -297,6 +300,10 @@ struct msdc_save_para {
u32 emmc50_cfg0; u32 emmc50_cfg0;
}; };
...@@ -37,7 +37,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -37,7 +37,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
struct msdc_tune_para { struct msdc_tune_para {
u32 iocon; u32 iocon;
u32 pad_tune; u32 pad_tune;
@@ -309,6 +316,7 @@ struct msdc_delay_phase { @@ -311,6 +318,7 @@ struct msdc_delay_phase {
struct msdc_host { struct msdc_host {
struct device *dev; struct device *dev;
...@@ -45,7 +45,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -45,7 +45,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
struct mmc_host *mmc; /* mmc structure */ struct mmc_host *mmc; /* mmc structure */
int cmd_rsp; int cmd_rsp;
@@ -350,6 +358,31 @@ struct msdc_host { @@ -352,6 +360,31 @@ struct msdc_host {
struct msdc_tune_para saved_tune_para; /* tune result of CMD21/CMD19 */ struct msdc_tune_para saved_tune_para; /* tune result of CMD21/CMD19 */
}; };
...@@ -77,7 +77,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -77,7 +77,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
static void sdr_set_bits(void __iomem *reg, u32 bs) static void sdr_set_bits(void __iomem *reg, u32 bs)
{ {
u32 val = readl(reg); u32 val = readl(reg);
@@ -509,7 +542,12 @@ static void msdc_set_timeout(struct msdc @@ -511,7 +544,12 @@ static void msdc_set_timeout(struct msdc
timeout = (ns + clk_ns - 1) / clk_ns + clks; timeout = (ns + clk_ns - 1) / clk_ns + clks;
/* in 1048576 sclk cycle unit */ /* in 1048576 sclk cycle unit */
timeout = (timeout + (0x1 << 20) - 1) >> 20; timeout = (timeout + (0x1 << 20) - 1) >> 20;
...@@ -91,7 +91,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -91,7 +91,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
/*DDR mode will double the clk cycles for data timeout */ /*DDR mode will double the clk cycles for data timeout */
timeout = mode >= 2 ? timeout * 2 : timeout; timeout = mode >= 2 ? timeout * 2 : timeout;
timeout = timeout > 1 ? timeout - 1 : 0; timeout = timeout > 1 ? timeout - 1 : 0;
@@ -548,7 +586,11 @@ static void msdc_set_mclk(struct msdc_ho @@ -550,7 +588,11 @@ static void msdc_set_mclk(struct msdc_ho
flags = readl(host->base + MSDC_INTEN); flags = readl(host->base + MSDC_INTEN);
sdr_clr_bits(host->base + MSDC_INTEN, flags); sdr_clr_bits(host->base + MSDC_INTEN, flags);
...@@ -104,7 +104,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -104,7 +104,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
if (timing == MMC_TIMING_UHS_DDR50 || if (timing == MMC_TIMING_UHS_DDR50 ||
timing == MMC_TIMING_MMC_DDR52 || timing == MMC_TIMING_MMC_DDR52 ||
timing == MMC_TIMING_MMC_HS400) { timing == MMC_TIMING_MMC_HS400) {
@@ -568,8 +610,12 @@ static void msdc_set_mclk(struct msdc_ho @@ -570,8 +612,12 @@ static void msdc_set_mclk(struct msdc_ho
if (timing == MMC_TIMING_MMC_HS400 && if (timing == MMC_TIMING_MMC_HS400 &&
hz >= (host->src_clk_freq >> 1)) { hz >= (host->src_clk_freq >> 1)) {
...@@ -119,7 +119,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -119,7 +119,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
sclk = host->src_clk_freq >> 1; sclk = host->src_clk_freq >> 1;
div = 0; /* div is ignore when bit18 is set */ div = 0; /* div is ignore when bit18 is set */
} }
@@ -587,8 +633,15 @@ static void msdc_set_mclk(struct msdc_ho @@ -589,8 +635,15 @@ static void msdc_set_mclk(struct msdc_ho
sclk = (host->src_clk_freq >> 2) / div; sclk = (host->src_clk_freq >> 2) / div;
} }
} }
...@@ -137,7 +137,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -137,7 +137,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
sdr_set_bits(host->base + MSDC_CFG, MSDC_CFG_CKPDN); sdr_set_bits(host->base + MSDC_CFG, MSDC_CFG_CKPDN);
while (!(readl(host->base + MSDC_CFG) & MSDC_CFG_CKSTB)) while (!(readl(host->base + MSDC_CFG) & MSDC_CFG_CKSTB))
cpu_relax(); cpu_relax();
@@ -1617,12 +1670,17 @@ static int msdc_drv_probe(struct platfor @@ -1620,12 +1673,17 @@ static int msdc_drv_probe(struct platfor
struct mmc_host *mmc; struct mmc_host *mmc;
struct msdc_host *host; struct msdc_host *host;
struct resource *res; struct resource *res;
...@@ -155,7 +155,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -155,7 +155,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
/* Allocate MMC host for this device */ /* Allocate MMC host for this device */
mmc = mmc_alloc_host(sizeof(struct msdc_host), &pdev->dev); mmc = mmc_alloc_host(sizeof(struct msdc_host), &pdev->dev);
if (!mmc) if (!mmc)
@@ -1686,11 +1744,15 @@ static int msdc_drv_probe(struct platfor @@ -1689,11 +1747,15 @@ static int msdc_drv_probe(struct platfor
msdc_of_property_parse(pdev, host); msdc_of_property_parse(pdev, host);
host->dev = &pdev->dev; host->dev = &pdev->dev;
...@@ -172,7 +172,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -172,7 +172,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
mmc->caps |= MMC_CAP_ERASE | MMC_CAP_CMD23; mmc->caps |= MMC_CAP_ERASE | MMC_CAP_CMD23;
/* MMC core transfer sizes tunable parameters */ /* MMC core transfer sizes tunable parameters */
@@ -1839,12 +1901,6 @@ static const struct dev_pm_ops msdc_dev_ @@ -1842,12 +1904,6 @@ static const struct dev_pm_ops msdc_dev_
SET_RUNTIME_PM_OPS(msdc_runtime_suspend, msdc_runtime_resume, NULL) SET_RUNTIME_PM_OPS(msdc_runtime_suspend, msdc_runtime_resume, NULL)
}; };
......
...@@ -17,7 +17,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -17,7 +17,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
--- a/drivers/mmc/host/mtk-sd.c --- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c +++ b/drivers/mmc/host/mtk-sd.c
@@ -300,6 +300,7 @@ struct msdc_save_para { @@ -302,6 +302,7 @@ struct msdc_save_para {
struct mtk_mmc_compatible { struct mtk_mmc_compatible {
u8 clk_div_bits; u8 clk_div_bits;
...@@ -25,7 +25,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -25,7 +25,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
}; };
struct msdc_tune_para { struct msdc_tune_para {
@@ -360,18 +361,22 @@ struct msdc_host { @@ -362,18 +363,22 @@ struct msdc_host {
static const struct mtk_mmc_compatible mt8135_compat = { static const struct mtk_mmc_compatible mt8135_compat = {
.clk_div_bits = 8, .clk_div_bits = 8,
...@@ -48,7 +48,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -48,7 +48,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
}; };
static const struct of_device_id msdc_of_ids[] = { static const struct of_device_id msdc_of_ids[] = {
@@ -666,7 +671,8 @@ static void msdc_set_mclk(struct msdc_ho @@ -668,7 +673,8 @@ static void msdc_set_mclk(struct msdc_ho
host->base + PAD_CMD_TUNE); host->base + PAD_CMD_TUNE);
} }
...@@ -58,7 +58,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -58,7 +58,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
sdr_set_field(host->base + PAD_CMD_TUNE, sdr_set_field(host->base + PAD_CMD_TUNE,
MSDC_PAD_TUNE_CMDRRDLY, MSDC_PAD_TUNE_CMDRRDLY,
host->hs400_cmd_int_delay); host->hs400_cmd_int_delay);
@@ -1594,7 +1600,8 @@ static int msdc_execute_tuning(struct mm @@ -1597,7 +1603,8 @@ static int msdc_execute_tuning(struct mm
struct msdc_host *host = mmc_priv(mmc); struct msdc_host *host = mmc_priv(mmc);
int ret; int ret;
......
...@@ -23,7 +23,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -23,7 +23,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
#define PAD_DS_TUNE 0x188 #define PAD_DS_TUNE 0x188
#define PAD_CMD_TUNE 0x18c #define PAD_CMD_TUNE 0x18c
#define EMMC50_CFG0 0x208 #define EMMC50_CFG0 0x208
@@ -301,6 +302,7 @@ struct msdc_save_para { @@ -303,6 +304,7 @@ struct msdc_save_para {
struct mtk_mmc_compatible { struct mtk_mmc_compatible {
u8 clk_div_bits; u8 clk_div_bits;
bool hs400_tune; /* only used for MT8173 */ bool hs400_tune; /* only used for MT8173 */
...@@ -31,7 +31,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -31,7 +31,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
}; };
struct msdc_tune_para { struct msdc_tune_para {
@@ -362,21 +364,25 @@ struct msdc_host { @@ -364,21 +366,25 @@ struct msdc_host {
static const struct mtk_mmc_compatible mt8135_compat = { static const struct mtk_mmc_compatible mt8135_compat = {
.clk_div_bits = 8, .clk_div_bits = 8,
.hs400_tune = false, .hs400_tune = false,
...@@ -57,7 +57,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -57,7 +57,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
}; };
static const struct of_device_id msdc_of_ids[] = { static const struct of_device_id msdc_of_ids[] = {
@@ -581,6 +587,7 @@ static void msdc_set_mclk(struct msdc_ho @@ -583,6 +589,7 @@ static void msdc_set_mclk(struct msdc_ho
u32 flags; u32 flags;
u32 div; u32 div;
u32 sclk; u32 sclk;
...@@ -65,7 +65,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -65,7 +65,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
if (!hz) { if (!hz) {
dev_dbg(host->dev, "set mclk to 0\n"); dev_dbg(host->dev, "set mclk to 0\n");
@@ -663,10 +670,10 @@ static void msdc_set_mclk(struct msdc_ho @@ -665,10 +672,10 @@ static void msdc_set_mclk(struct msdc_ho
*/ */
if (host->sclk <= 52000000) { if (host->sclk <= 52000000) {
writel(host->def_tune_para.iocon, host->base + MSDC_IOCON); writel(host->def_tune_para.iocon, host->base + MSDC_IOCON);
...@@ -78,7 +78,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -78,7 +78,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
writel(host->saved_tune_para.pad_cmd_tune, writel(host->saved_tune_para.pad_cmd_tune,
host->base + PAD_CMD_TUNE); host->base + PAD_CMD_TUNE);
} }
@@ -1224,6 +1231,7 @@ static irqreturn_t msdc_irq(int irq, voi @@ -1226,6 +1233,7 @@ static irqreturn_t msdc_irq(int irq, voi
static void msdc_init_hw(struct msdc_host *host) static void msdc_init_hw(struct msdc_host *host)
{ {
u32 val; u32 val;
...@@ -86,7 +86,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -86,7 +86,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
/* Configure to MMC/SD mode, clock free running */ /* Configure to MMC/SD mode, clock free running */
sdr_set_bits(host->base + MSDC_CFG, MSDC_CFG_MODE | MSDC_CFG_CKPDN); sdr_set_bits(host->base + MSDC_CFG, MSDC_CFG_MODE | MSDC_CFG_CKPDN);
@@ -1239,7 +1247,7 @@ static void msdc_init_hw(struct msdc_hos @@ -1241,7 +1249,7 @@ static void msdc_init_hw(struct msdc_hos
val = readl(host->base + MSDC_INT); val = readl(host->base + MSDC_INT);
writel(val, host->base + MSDC_INT); writel(val, host->base + MSDC_INT);
...@@ -95,7 +95,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -95,7 +95,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
writel(0, host->base + MSDC_IOCON); writel(0, host->base + MSDC_IOCON);
sdr_set_field(host->base + MSDC_IOCON, MSDC_IOCON_DDLSEL, 0); sdr_set_field(host->base + MSDC_IOCON, MSDC_IOCON_DDLSEL, 0);
writel(0x403c0046, host->base + MSDC_PATCH_BIT); writel(0x403c0046, host->base + MSDC_PATCH_BIT);
@@ -1259,7 +1267,7 @@ static void msdc_init_hw(struct msdc_hos @@ -1261,7 +1269,7 @@ static void msdc_init_hw(struct msdc_hos
sdr_set_field(host->base + SDC_CFG, SDC_CFG_DTOC, 3); sdr_set_field(host->base + SDC_CFG, SDC_CFG_DTOC, 3);
host->def_tune_para.iocon = readl(host->base + MSDC_IOCON); host->def_tune_para.iocon = readl(host->base + MSDC_IOCON);
...@@ -104,7 +104,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -104,7 +104,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
dev_dbg(host->dev, "init hardware done!"); dev_dbg(host->dev, "init hardware done!");
} }
@@ -1402,18 +1410,19 @@ static int msdc_tune_response(struct mmc @@ -1404,18 +1412,19 @@ static int msdc_tune_response(struct mmc
struct msdc_delay_phase internal_delay_phase; struct msdc_delay_phase internal_delay_phase;
u8 final_delay, final_maxlen; u8 final_delay, final_maxlen;
u32 internal_delay = 0; u32 internal_delay = 0;
...@@ -126,7 +126,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -126,7 +126,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
MSDC_PAD_TUNE_CMDRDLY, i); MSDC_PAD_TUNE_CMDRDLY, i);
/* /*
* Using the same parameters, it may sometimes pass the test, * Using the same parameters, it may sometimes pass the test,
@@ -1437,7 +1446,7 @@ static int msdc_tune_response(struct mmc @@ -1439,7 +1448,7 @@ static int msdc_tune_response(struct mmc
sdr_set_bits(host->base + MSDC_IOCON, MSDC_IOCON_RSPL); sdr_set_bits(host->base + MSDC_IOCON, MSDC_IOCON_RSPL);
for (i = 0; i < PAD_DELAY_MAX; i++) { for (i = 0; i < PAD_DELAY_MAX; i++) {
...@@ -135,7 +135,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -135,7 +135,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
MSDC_PAD_TUNE_CMDRDLY, i); MSDC_PAD_TUNE_CMDRDLY, i);
/* /*
* Using the same parameters, it may sometimes pass the test, * Using the same parameters, it may sometimes pass the test,
@@ -1462,12 +1471,12 @@ skip_fall: @@ -1464,12 +1473,12 @@ skip_fall:
final_maxlen = final_fall_delay.maxlen; final_maxlen = final_fall_delay.maxlen;
if (final_maxlen == final_rise_delay.maxlen) { if (final_maxlen == final_rise_delay.maxlen) {
sdr_clr_bits(host->base + MSDC_IOCON, MSDC_IOCON_RSPL); sdr_clr_bits(host->base + MSDC_IOCON, MSDC_IOCON_RSPL);
...@@ -150,7 +150,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -150,7 +150,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
final_fall_delay.final_phase); final_fall_delay.final_phase);
final_delay = final_fall_delay.final_phase; final_delay = final_fall_delay.final_phase;
} }
@@ -1475,7 +1484,7 @@ skip_fall: @@ -1477,7 +1486,7 @@ skip_fall:
goto skip_internal; goto skip_internal;
for (i = 0; i < PAD_DELAY_MAX; i++) { for (i = 0; i < PAD_DELAY_MAX; i++) {
...@@ -159,7 +159,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -159,7 +159,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
MSDC_PAD_TUNE_CMDRRDLY, i); MSDC_PAD_TUNE_CMDRRDLY, i);
mmc_send_tuning(mmc, opcode, &cmd_err); mmc_send_tuning(mmc, opcode, &cmd_err);
if (!cmd_err) if (!cmd_err)
@@ -1483,7 +1492,7 @@ skip_fall: @@ -1485,7 +1494,7 @@ skip_fall:
} }
dev_dbg(host->dev, "Final internal delay: 0x%x\n", internal_delay); dev_dbg(host->dev, "Final internal delay: 0x%x\n", internal_delay);
internal_delay_phase = get_best_delay(host, internal_delay); internal_delay_phase = get_best_delay(host, internal_delay);
...@@ -168,7 +168,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -168,7 +168,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
internal_delay_phase.final_phase); internal_delay_phase.final_phase);
skip_internal: skip_internal:
dev_dbg(host->dev, "Final cmd pad delay: %x\n", final_delay); dev_dbg(host->dev, "Final cmd pad delay: %x\n", final_delay);
@@ -1545,12 +1554,13 @@ static int msdc_tune_data(struct mmc_hos @@ -1548,12 +1557,13 @@ static int msdc_tune_data(struct mmc_hos
u32 rise_delay = 0, fall_delay = 0; u32 rise_delay = 0, fall_delay = 0;
struct msdc_delay_phase final_rise_delay, final_fall_delay = { 0,}; struct msdc_delay_phase final_rise_delay, final_fall_delay = { 0,};
u8 final_delay, final_maxlen; u8 final_delay, final_maxlen;
...@@ -183,7 +183,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -183,7 +183,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
MSDC_PAD_TUNE_DATRRDLY, i); MSDC_PAD_TUNE_DATRRDLY, i);
ret = mmc_send_tuning(mmc, opcode, NULL); ret = mmc_send_tuning(mmc, opcode, NULL);
if (!ret) if (!ret)
@@ -1565,7 +1575,7 @@ static int msdc_tune_data(struct mmc_hos @@ -1568,7 +1578,7 @@ static int msdc_tune_data(struct mmc_hos
sdr_set_bits(host->base + MSDC_IOCON, MSDC_IOCON_DSPL); sdr_set_bits(host->base + MSDC_IOCON, MSDC_IOCON_DSPL);
sdr_set_bits(host->base + MSDC_IOCON, MSDC_IOCON_W_DSPL); sdr_set_bits(host->base + MSDC_IOCON, MSDC_IOCON_W_DSPL);
for (i = 0; i < PAD_DELAY_MAX; i++) { for (i = 0; i < PAD_DELAY_MAX; i++) {
...@@ -192,7 +192,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -192,7 +192,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
MSDC_PAD_TUNE_DATRRDLY, i); MSDC_PAD_TUNE_DATRRDLY, i);
ret = mmc_send_tuning(mmc, opcode, NULL); ret = mmc_send_tuning(mmc, opcode, NULL);
if (!ret) if (!ret)
@@ -1578,14 +1588,14 @@ skip_fall: @@ -1581,14 +1591,14 @@ skip_fall:
if (final_maxlen == final_rise_delay.maxlen) { if (final_maxlen == final_rise_delay.maxlen) {
sdr_clr_bits(host->base + MSDC_IOCON, MSDC_IOCON_DSPL); sdr_clr_bits(host->base + MSDC_IOCON, MSDC_IOCON_DSPL);
sdr_clr_bits(host->base + MSDC_IOCON, MSDC_IOCON_W_DSPL); sdr_clr_bits(host->base + MSDC_IOCON, MSDC_IOCON_W_DSPL);
...@@ -209,7 +209,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -209,7 +209,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
MSDC_PAD_TUNE_DATRRDLY, MSDC_PAD_TUNE_DATRRDLY,
final_fall_delay.final_phase); final_fall_delay.final_phase);
final_delay = final_fall_delay.final_phase; final_delay = final_fall_delay.final_phase;
@@ -1599,6 +1609,7 @@ static int msdc_execute_tuning(struct mm @@ -1602,6 +1612,7 @@ static int msdc_execute_tuning(struct mm
{ {
struct msdc_host *host = mmc_priv(mmc); struct msdc_host *host = mmc_priv(mmc);
int ret; int ret;
...@@ -217,7 +217,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -217,7 +217,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
if (host->hs400_mode && if (host->hs400_mode &&
host->dev_comp->hs400_tune) host->dev_comp->hs400_tune)
@@ -1616,7 +1627,7 @@ static int msdc_execute_tuning(struct mm @@ -1619,7 +1630,7 @@ static int msdc_execute_tuning(struct mm
} }
host->saved_tune_para.iocon = readl(host->base + MSDC_IOCON); host->saved_tune_para.iocon = readl(host->base + MSDC_IOCON);
...@@ -226,7 +226,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -226,7 +226,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
host->saved_tune_para.pad_cmd_tune = readl(host->base + PAD_CMD_TUNE); host->saved_tune_para.pad_cmd_tune = readl(host->base + PAD_CMD_TUNE);
return ret; return ret;
} }
@@ -1857,10 +1868,12 @@ static int msdc_drv_remove(struct platfo @@ -1860,10 +1871,12 @@ static int msdc_drv_remove(struct platfo
#ifdef CONFIG_PM #ifdef CONFIG_PM
static void msdc_save_reg(struct msdc_host *host) static void msdc_save_reg(struct msdc_host *host)
{ {
...@@ -240,7 +240,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -240,7 +240,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
host->save_para.patch_bit0 = readl(host->base + MSDC_PATCH_BIT); host->save_para.patch_bit0 = readl(host->base + MSDC_PATCH_BIT);
host->save_para.patch_bit1 = readl(host->base + MSDC_PATCH_BIT1); host->save_para.patch_bit1 = readl(host->base + MSDC_PATCH_BIT1);
host->save_para.pad_ds_tune = readl(host->base + PAD_DS_TUNE); host->save_para.pad_ds_tune = readl(host->base + PAD_DS_TUNE);
@@ -1870,10 +1883,12 @@ static void msdc_save_reg(struct msdc_ho @@ -1873,10 +1886,12 @@ static void msdc_save_reg(struct msdc_ho
static void msdc_restore_reg(struct msdc_host *host) static void msdc_restore_reg(struct msdc_host *host)
{ {
......
...@@ -23,9 +23,9 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -23,9 +23,9 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
#define MSDC_PAD_TUNE 0xec #define MSDC_PAD_TUNE 0xec
#define MSDC_PAD_TUNE0 0xf0 #define MSDC_PAD_TUNE0 0xf0
#define PAD_DS_TUNE 0x188 #define PAD_DS_TUNE 0x188
@@ -216,11 +217,20 @@ @@ -218,11 +219,20 @@
#define MSDC_PATCH_BIT_SPCPUSH (0x1 << 29) /* RW */
#define MSDC_PATCH_BIT_DECRCTMO (0x1 << 30) /* RW */ #define MSDC_PATCH_BIT1_CMDTA (0x7 << 3) /* RW */
+#define MSDC_PATCH_BIT2_CFGRESP (0x1 << 15) /* RW */ +#define MSDC_PATCH_BIT2_CFGRESP (0x1 << 15) /* RW */
+#define MSDC_PATCH_BIT2_CFGCRCSTS (0x1 << 28) /* RW */ +#define MSDC_PATCH_BIT2_CFGCRCSTS (0x1 << 28) /* RW */
...@@ -44,7 +44,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> ...@@ -44,7 +44,7 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
#define PAD_DS_TUNE_DLY1 (0x1f << 2) /* RW */ #define PAD_DS_TUNE_DLY1 (0x1f << 2) /* RW */
#define PAD_DS_TUNE_DLY2 (0x1f << 7) /* RW */ #define PAD_DS_TUNE_DLY2 (0x1f << 7) /* RW */
@@ -294,6 +304,7 @@ struct msdc_save_para { @@ -296,6 +306,7 @@ struct msdc_save_para {
u32 pad_tune; u32 pad_tune;
u32 patch_bit0;