kernel: bump 4.14 to 4.14.44

Refresh patches.

Remove upstreamed patch:
generic/pending/181-net-usb-add-lte-modem-wistron-neweb-d18q1.patch
Update patches that no longer applies:
generic/hack/901-debloat_sock_diag.patch

Compile-tested on: x86/64.
Runtime-tested on: x86/64.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
This commit is contained in:
Stijn Tintel 2018-05-29 00:10:44 +03:00
parent f4a639a3d7
commit 64b53247c4
128 changed files with 459 additions and 1355 deletions

View file

@ -5,12 +5,12 @@ LINUX_RELEASE?=1
LINUX_VERSION-3.18 = .71 LINUX_VERSION-3.18 = .71
LINUX_VERSION-4.4 = .121 LINUX_VERSION-4.4 = .121
LINUX_VERSION-4.9 = .102 LINUX_VERSION-4.9 = .102
LINUX_VERSION-4.14 = .43 LINUX_VERSION-4.14 = .44
LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240 LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240
LINUX_KERNEL_HASH-4.4.121 = 44a88268b5088dc326b30c9b9133ac35a9a200b636b7268d08f32abeae6ca729 LINUX_KERNEL_HASH-4.4.121 = 44a88268b5088dc326b30c9b9133ac35a9a200b636b7268d08f32abeae6ca729
LINUX_KERNEL_HASH-4.9.102 = d155a36ba52d5809805cd370902582ac373c5b23a958c6424325684447119dc5 LINUX_KERNEL_HASH-4.9.102 = d155a36ba52d5809805cd370902582ac373c5b23a958c6424325684447119dc5
LINUX_KERNEL_HASH-4.14.43 = 133fc0f8f9ea04006c255a052704e8eb95a021fc799dd27f98fcfcace59e714a LINUX_KERNEL_HASH-4.14.44 = 2eb356e6af25f6ca65affe7704be8c4e0cdf224505e7441ac9d5b6e8d96ec8e4
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)))))))

View file

@ -1,7 +1,5 @@
Index: linux-4.14.42/arch/mips/ath79/common.c --- a/arch/mips/ath79/common.c
=================================================================== +++ b/arch/mips/ath79/common.c
--- linux-4.14.42.orig/arch/mips/ath79/common.c
+++ linux-4.14.42/arch/mips/ath79/common.c
@@ -34,11 +34,13 @@ EXPORT_SYMBOL_GPL(ath79_ddr_freq); @@ -34,11 +34,13 @@ EXPORT_SYMBOL_GPL(ath79_ddr_freq);
enum ath79_soc_type ath79_soc; enum ath79_soc_type ath79_soc;
@ -17,10 +15,8 @@ Index: linux-4.14.42/arch/mips/ath79/common.c
static void __iomem *ath79_ddr_wb_flush_base; static void __iomem *ath79_ddr_wb_flush_base;
static void __iomem *ath79_ddr_pci_win_base; static void __iomem *ath79_ddr_pci_win_base;
Index: linux-4.14.42/arch/mips/include/asm/mach-ath79/ath79.h --- a/arch/mips/include/asm/mach-ath79/ath79.h
=================================================================== +++ b/arch/mips/include/asm/mach-ath79/ath79.h
--- linux-4.14.42.orig/arch/mips/include/asm/mach-ath79/ath79.h
+++ linux-4.14.42/arch/mips/include/asm/mach-ath79/ath79.h
@@ -152,6 +152,7 @@ void ath79_ddr_wb_flush(unsigned int reg @@ -152,6 +152,7 @@ void ath79_ddr_wb_flush(unsigned int reg
void ath79_ddr_set_pci_windows(void); void ath79_ddr_set_pci_windows(void);

View file

@ -63,7 +63,7 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
/** /**
* dwc2_enable_host_interrupts() - Enables the Host mode interrupts * dwc2_enable_host_interrupts() - Enables the Host mode interrupts
* *
@@ -3246,6 +3263,7 @@ static void dwc2_conn_id_status_change(s @@ -3276,6 +3293,7 @@ static void dwc2_conn_id_status_change(s
/* B-Device connector (Device Mode) */ /* B-Device connector (Device Mode) */
if (gotgctl & GOTGCTL_CONID_B) { if (gotgctl & GOTGCTL_CONID_B) {
@ -71,7 +71,7 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
/* Wait for switch to device mode */ /* Wait for switch to device mode */
dev_dbg(hsotg->dev, "connId B\n"); dev_dbg(hsotg->dev, "connId B\n");
if (hsotg->bus_suspended) { if (hsotg->bus_suspended) {
@@ -4352,6 +4370,9 @@ static int _dwc2_hcd_start(struct usb_hc @@ -4382,6 +4400,9 @@ static int _dwc2_hcd_start(struct usb_hc
} }
spin_unlock_irqrestore(&hsotg->lock, flags); spin_unlock_irqrestore(&hsotg->lock, flags);
@ -81,7 +81,7 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
return 0; return 0;
} }
@@ -4379,6 +4400,8 @@ static void _dwc2_hcd_stop(struct usb_hc @@ -4409,6 +4430,8 @@ static void _dwc2_hcd_stop(struct usb_hc
clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
spin_unlock_irqrestore(&hsotg->lock, flags); spin_unlock_irqrestore(&hsotg->lock, flags);
@ -90,7 +90,7 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
usleep_range(1000, 3000); usleep_range(1000, 3000);
} }
@@ -4415,6 +4438,7 @@ static int _dwc2_hcd_suspend(struct usb_ @@ -4445,6 +4468,7 @@ static int _dwc2_hcd_suspend(struct usb_
hprt0 |= HPRT0_SUSP; hprt0 |= HPRT0_SUSP;
hprt0 &= ~HPRT0_PWR; hprt0 &= ~HPRT0_PWR;
dwc2_writel(hprt0, hsotg->regs + HPRT0); dwc2_writel(hprt0, hsotg->regs + HPRT0);
@ -98,7 +98,7 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
} }
/* Enter hibernation */ /* Enter hibernation */
@@ -4495,6 +4519,8 @@ static int _dwc2_hcd_resume(struct usb_h @@ -4525,6 +4549,8 @@ static int _dwc2_hcd_resume(struct usb_h
spin_unlock_irqrestore(&hsotg->lock, flags); spin_unlock_irqrestore(&hsotg->lock, flags);
dwc2_port_resume(hsotg); dwc2_port_resume(hsotg);
} else { } else {

View file

@ -42,7 +42,7 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
return regulator_enable(hsotg->vbus_supply); return regulator_enable(hsotg->vbus_supply);
} }
@@ -4371,9 +4376,7 @@ static int _dwc2_hcd_start(struct usb_hc @@ -4401,9 +4406,7 @@ static int _dwc2_hcd_start(struct usb_hc
spin_unlock_irqrestore(&hsotg->lock, flags); spin_unlock_irqrestore(&hsotg->lock, flags);

View file

@ -66,7 +66,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static void __sk_free(struct sock *sk) static void __sk_free(struct sock *sk)
{ {
+#ifdef CONFIG_SOCK_DIAG +#ifdef CONFIG_SOCK_DIAG
if (unlikely(sock_diag_has_destroy_listeners(sk) && sk->sk_net_refcnt)) if (unlikely(sk->sk_net_refcnt && sock_diag_has_destroy_listeners(sk)))
sock_diag_broadcast_destroy(sk); sock_diag_broadcast_destroy(sk);
else else
+#endif +#endif

View file

@ -1,61 +0,0 @@
From d4c4bc11353f3bea6754f7d21e3612c9f32d1d64 Mon Sep 17 00:00:00 2001
From: Giuseppe Lippolis <giu.lippolis@gmail.com>
Date: Mon, 26 Mar 2018 16:34:39 +0200
Subject: [PATCH] net-usb: add qmi_wwan if on lte modem wistron neweb d18q1
This modem is embedded on dlink dwr-921 router.
The oem configuration states:
T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1435 ProdID=0918 Rev= 2.32
S: Manufacturer=Android
S: Product=Android
S: SerialNumber=0123456789ABCDEF
C:* #Ifs= 7 Cfg#= 1 Atr=80 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none)
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=84(I) Atr=03(Int.) MxPS= 64 Ivl=32ms
E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
E: Ad=86(I) Atr=03(Int.) MxPS= 64 Ivl=32ms
E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
E: Ad=88(I) Atr=03(Int.) MxPS= 64 Ivl=32ms
E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
E: Ad=8a(I) Atr=03(Int.) MxPS= 64 Ivl=32ms
E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 6 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
E: Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=125us
Tested on openwrt distribution
Signed-off-by: Giuseppe Lippolis <giu.lippolis@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/net/usb/qmi_wwan.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -1105,6 +1105,9 @@ static const struct usb_device_id produc
{QMI_FIXED_INTF(0x0846, 0x68a2, 8)},
{QMI_FIXED_INTF(0x12d1, 0x140c, 1)}, /* Huawei E173 */
{QMI_FIXED_INTF(0x12d1, 0x14ac, 1)}, /* Huawei E1820 */
+ {QMI_FIXED_INTF(0x1435, 0xd181, 3)}, /* Wistron NeWeb D18Q1 */
+ {QMI_FIXED_INTF(0x1435, 0xd181, 4)}, /* Wistron NeWeb D18Q1 */
+ {QMI_FIXED_INTF(0x1435, 0xd181, 5)}, /* Wistron NeWeb D18Q1 */
{QMI_FIXED_INTF(0x16d8, 0x6003, 0)}, /* CMOTech 6003 */
{QMI_FIXED_INTF(0x16d8, 0x6007, 0)}, /* CMOTech CHE-628S */
{QMI_FIXED_INTF(0x16d8, 0x6008, 0)}, /* CMOTech CMU-301 */

View file

@ -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;
@@ -3260,6 +3262,7 @@ static int packet_create(struct net *net @@ -3262,6 +3264,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>
if (sock->type == SOCK_PACKET) if (sock->type == SOCK_PACKET)
po->prot_hook.func = packet_rcv_spkt; po->prot_hook.func = packet_rcv_spkt;
@@ -3873,6 +3876,16 @@ packet_setsockopt(struct socket *sock, i @@ -3875,6 +3878,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>
default: default:
return -ENOPROTOOPT; return -ENOPROTOOPT;
} }
@@ -3925,6 +3938,13 @@ static int packet_getsockopt(struct sock @@ -3927,6 +3940,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;

View file

@ -15,9 +15,6 @@ Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
1 file changed, 94 insertions(+) 1 file changed, 94 insertions(+)
create mode 100644 include/dt-bindings/reset/mt7622-reset.h create mode 100644 include/dt-bindings/reset/mt7622-reset.h
diff --git a/include/dt-bindings/reset/mt7622-reset.h b/include/dt-bindings/reset/mt7622-reset.h
new file mode 100644
index 000000000000..234052f80417
--- /dev/null --- /dev/null
+++ b/include/dt-bindings/reset/mt7622-reset.h +++ b/include/dt-bindings/reset/mt7622-reset.h
@@ -0,0 +1,94 @@ @@ -0,0 +1,94 @@
@ -115,6 +112,3 @@ index 000000000000..234052f80417
+#define MT7622_ETHSYS_PPE_RST 31 +#define MT7622_ETHSYS_PPE_RST 31
+ +
+#endif /* _DT_BINDINGS_RESET_CONTROLLER_MT7622 */ +#endif /* _DT_BINDINGS_RESET_CONTROLLER_MT7622 */
--
2.11.0

View file

@ -13,11 +13,9 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
drivers/soc/mediatek/mtk-pmic-wrap.c | 20 +++++++++++++------- drivers/soc/mediatek/mtk-pmic-wrap.c | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-) 1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index c2048382830f..f095faac1e04 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c --- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c +++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -827,7 +827,8 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp) @@ -827,7 +827,8 @@ static int pwrap_init_cipher(struct pmic
/* wait for cipher data ready@PMIC */ /* wait for cipher data ready@PMIC */
ret = pwrap_wait_for_state(wrp, pwrap_is_pmic_cipher_ready); ret = pwrap_wait_for_state(wrp, pwrap_is_pmic_cipher_ready);
if (ret) { if (ret) {
@ -27,7 +25,7 @@ index c2048382830f..f095faac1e04 100644
return ret; return ret;
} }
@@ -1159,23 +1160,27 @@ static int pwrap_probe(struct platform_device *pdev) @@ -1159,23 +1160,27 @@ static int pwrap_probe(struct platform_d
if (IS_ERR(wrp->bridge_base)) if (IS_ERR(wrp->bridge_base))
return PTR_ERR(wrp->bridge_base); return PTR_ERR(wrp->bridge_base);
@ -59,7 +57,7 @@ index c2048382830f..f095faac1e04 100644
return PTR_ERR(wrp->clk_wrap); return PTR_ERR(wrp->clk_wrap);
} }
@@ -1220,8 +1225,9 @@ static int pwrap_probe(struct platform_device *pdev) @@ -1220,8 +1225,9 @@ static int pwrap_probe(struct platform_d
pwrap_writel(wrp, wrp->master->int_en_all, PWRAP_INT_EN); pwrap_writel(wrp, wrp->master->int_en_all, PWRAP_INT_EN);
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
@ -71,6 +69,3 @@ index c2048382830f..f095faac1e04 100644
if (ret) if (ret)
goto err_out2; goto err_out2;
--
2.11.0

View file

@ -15,8 +15,6 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/mtu3/mtu3_plat.c | 8 ++++++-- drivers/usb/mtu3/mtu3_plat.c | 8 ++++++--
3 files changed, 22 insertions(+), 5 deletions(-) 3 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/mtu3/mtu3.h b/drivers/usb/mtu3/mtu3.h
index b26fffc58446..112723d6e7bc 100644
--- a/drivers/usb/mtu3/mtu3.h --- a/drivers/usb/mtu3/mtu3.h
+++ b/drivers/usb/mtu3/mtu3.h +++ b/drivers/usb/mtu3/mtu3.h
@@ -210,6 +210,8 @@ struct otg_switch_mtk { @@ -210,6 +210,8 @@ struct otg_switch_mtk {
@ -36,11 +34,9 @@ index b26fffc58446..112723d6e7bc 100644
struct dentry *dbgfs_root; struct dentry *dbgfs_root;
/* usb wakeup for host mode */ /* usb wakeup for host mode */
bool wakeup_en; bool wakeup_en;
diff --git a/drivers/usb/mtu3/mtu3_host.c b/drivers/usb/mtu3/mtu3_host.c
index e42d308b8dc2..4dd9508a60b5 100644
--- a/drivers/usb/mtu3/mtu3_host.c --- a/drivers/usb/mtu3/mtu3_host.c
+++ b/drivers/usb/mtu3/mtu3_host.c +++ b/drivers/usb/mtu3/mtu3_host.c
@@ -151,6 +151,7 @@ int ssusb_host_enable(struct ssusb_mtk *ssusb) @@ -151,6 +151,7 @@ int ssusb_host_enable(struct ssusb_mtk *
void __iomem *ibase = ssusb->ippc_base; void __iomem *ibase = ssusb->ippc_base;
int num_u3p = ssusb->u3_ports; int num_u3p = ssusb->u3_ports;
int num_u2p = ssusb->u2_ports; int num_u2p = ssusb->u2_ports;
@ -48,7 +44,7 @@ index e42d308b8dc2..4dd9508a60b5 100644
u32 check_clk; u32 check_clk;
u32 value; u32 value;
int i; int i;
@@ -158,8 +159,14 @@ int ssusb_host_enable(struct ssusb_mtk *ssusb) @@ -158,8 +159,14 @@ int ssusb_host_enable(struct ssusb_mtk *
/* power on host ip */ /* power on host ip */
mtu3_clrbits(ibase, U3D_SSUSB_IP_PW_CTRL1, SSUSB_IP_HOST_PDN); mtu3_clrbits(ibase, U3D_SSUSB_IP_PW_CTRL1, SSUSB_IP_HOST_PDN);
@ -64,7 +60,7 @@ index e42d308b8dc2..4dd9508a60b5 100644
value = mtu3_readl(ibase, SSUSB_U3_CTRL(i)); value = mtu3_readl(ibase, SSUSB_U3_CTRL(i));
value &= ~(SSUSB_U3_PORT_PDN | SSUSB_U3_PORT_DIS); value &= ~(SSUSB_U3_PORT_PDN | SSUSB_U3_PORT_DIS);
value |= SSUSB_U3_PORT_HOST_SEL; value |= SSUSB_U3_PORT_HOST_SEL;
@@ -175,7 +182,7 @@ int ssusb_host_enable(struct ssusb_mtk *ssusb) @@ -175,7 +182,7 @@ int ssusb_host_enable(struct ssusb_mtk *
} }
check_clk = SSUSB_XHCI_RST_B_STS; check_clk = SSUSB_XHCI_RST_B_STS;
@ -73,7 +69,7 @@ index e42d308b8dc2..4dd9508a60b5 100644
check_clk = SSUSB_U3_MAC_RST_B_STS; check_clk = SSUSB_U3_MAC_RST_B_STS;
return ssusb_check_clocks(ssusb, check_clk); return ssusb_check_clocks(ssusb, check_clk);
@@ -190,8 +197,11 @@ int ssusb_host_disable(struct ssusb_mtk *ssusb, bool suspend) @@ -190,8 +197,11 @@ int ssusb_host_disable(struct ssusb_mtk
int ret; int ret;
int i; int i;
@ -86,11 +82,9 @@ index e42d308b8dc2..4dd9508a60b5 100644
value = mtu3_readl(ibase, SSUSB_U3_CTRL(i)); value = mtu3_readl(ibase, SSUSB_U3_CTRL(i));
value |= SSUSB_U3_PORT_PDN; value |= SSUSB_U3_PORT_PDN;
value |= suspend ? 0 : SSUSB_U3_PORT_DIS; value |= suspend ? 0 : SSUSB_U3_PORT_DIS;
diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
index 088e3e685c4f..9edad30c8ae5 100644
--- a/drivers/usb/mtu3/mtu3_plat.c --- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c +++ b/drivers/usb/mtu3/mtu3_plat.c
@@ -276,6 +276,10 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb) @@ -276,6 +276,10 @@ static int get_ssusb_rscs(struct platfor
if (ret) if (ret)
return ret; return ret;
@ -101,7 +95,7 @@ index 088e3e685c4f..9edad30c8ae5 100644
if (ssusb->dr_mode != USB_DR_MODE_OTG) if (ssusb->dr_mode != USB_DR_MODE_OTG)
return 0; return 0;
@@ -304,8 +308,8 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb) @@ -304,8 +308,8 @@ static int get_ssusb_rscs(struct platfor
} }
} }
@ -112,6 +106,3 @@ index 088e3e685c4f..9edad30c8ae5 100644
return 0; return 0;
} }
--
2.11.0

View file

@ -13,8 +13,6 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/mtu3/mtu3_host.c | 57 ++++---------------------------------------- drivers/usb/mtu3/mtu3_host.c | 57 ++++----------------------------------------
2 files changed, 4 insertions(+), 57 deletions(-) 2 files changed, 4 insertions(+), 57 deletions(-)
diff --git a/drivers/usb/mtu3/mtu3.h b/drivers/usb/mtu3/mtu3.h
index 112723d6e7bc..6d3278e46431 100644
--- a/drivers/usb/mtu3/mtu3.h --- a/drivers/usb/mtu3/mtu3.h
+++ b/drivers/usb/mtu3/mtu3.h +++ b/drivers/usb/mtu3/mtu3.h
@@ -214,8 +214,6 @@ struct otg_switch_mtk { @@ -214,8 +214,6 @@ struct otg_switch_mtk {
@ -35,11 +33,9 @@ index 112723d6e7bc..6d3278e46431 100644
struct regmap *pericfg; struct regmap *pericfg;
}; };
diff --git a/drivers/usb/mtu3/mtu3_host.c b/drivers/usb/mtu3/mtu3_host.c
index 4dd9508a60b5..edcc59148171 100644
--- a/drivers/usb/mtu3/mtu3_host.c --- a/drivers/usb/mtu3/mtu3_host.c
+++ b/drivers/usb/mtu3/mtu3_host.c +++ b/drivers/usb/mtu3/mtu3_host.c
@@ -79,20 +79,6 @@ int ssusb_wakeup_of_property_parse(struct ssusb_mtk *ssusb, @@ -79,20 +79,6 @@ int ssusb_wakeup_of_property_parse(struc
if (!ssusb->wakeup_en) if (!ssusb->wakeup_en)
return 0; return 0;
@ -60,7 +56,7 @@ index 4dd9508a60b5..edcc59148171 100644
ssusb->pericfg = syscon_regmap_lookup_by_phandle(dn, ssusb->pericfg = syscon_regmap_lookup_by_phandle(dn,
"mediatek,syscon-wakeup"); "mediatek,syscon-wakeup");
if (IS_ERR(ssusb->pericfg)) { if (IS_ERR(ssusb->pericfg)) {
@@ -103,36 +89,6 @@ int ssusb_wakeup_of_property_parse(struct ssusb_mtk *ssusb, @@ -103,36 +89,6 @@ int ssusb_wakeup_of_property_parse(struc
return 0; return 0;
} }
@ -97,7 +93,7 @@ index 4dd9508a60b5..edcc59148171 100644
static void host_ports_num_get(struct ssusb_mtk *ssusb) static void host_ports_num_get(struct ssusb_mtk *ssusb)
{ {
u32 xhci_cap; u32 xhci_cap;
@@ -286,19 +242,14 @@ void ssusb_host_exit(struct ssusb_mtk *ssusb) @@ -286,19 +242,14 @@ void ssusb_host_exit(struct ssusb_mtk *s
int ssusb_wakeup_enable(struct ssusb_mtk *ssusb) int ssusb_wakeup_enable(struct ssusb_mtk *ssusb)
{ {
@ -121,6 +117,3 @@ index 4dd9508a60b5..edcc59148171 100644
- ssusb_wakeup_clks_disable(ssusb); - ssusb_wakeup_clks_disable(ssusb);
- } - }
} }
--
2.11.0

View file

@ -13,8 +13,6 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/mtu3/mtu3_plat.c | 121 +++++++++++++++++++++++++++++-------------- drivers/usb/mtu3/mtu3_plat.c | 121 +++++++++++++++++++++++++++++--------------
2 files changed, 86 insertions(+), 40 deletions(-) 2 files changed, 86 insertions(+), 40 deletions(-)
diff --git a/drivers/usb/mtu3/mtu3.h b/drivers/usb/mtu3/mtu3.h
index 6d3278e46431..2795294ec92a 100644
--- a/drivers/usb/mtu3/mtu3.h --- a/drivers/usb/mtu3/mtu3.h
+++ b/drivers/usb/mtu3/mtu3.h +++ b/drivers/usb/mtu3/mtu3.h
@@ -206,6 +206,9 @@ struct otg_switch_mtk { @@ -206,6 +206,9 @@ struct otg_switch_mtk {
@ -36,11 +34,9 @@ index 6d3278e46431..2795294ec92a 100644
/* otg */ /* otg */
struct otg_switch_mtk otg_switch; struct otg_switch_mtk otg_switch;
enum usb_dr_mode dr_mode; enum usb_dr_mode dr_mode;
diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
index 9edad30c8ae5..fb8992011bde 100644
--- a/drivers/usb/mtu3/mtu3_plat.c --- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c +++ b/drivers/usb/mtu3/mtu3_plat.c
@@ -110,15 +110,9 @@ static void ssusb_phy_power_off(struct ssusb_mtk *ssusb) @@ -110,15 +110,9 @@ static void ssusb_phy_power_off(struct s
phy_power_off(ssusb->phys[i]); phy_power_off(ssusb->phys[i]);
} }
@ -58,7 +54,7 @@ index 9edad30c8ae5..fb8992011bde 100644
ret = clk_prepare_enable(ssusb->sys_clk); ret = clk_prepare_enable(ssusb->sys_clk);
if (ret) { if (ret) {
@@ -132,6 +126,52 @@ static int ssusb_rscs_init(struct ssusb_mtk *ssusb) @@ -132,6 +126,52 @@ static int ssusb_rscs_init(struct ssusb_
goto ref_clk_err; goto ref_clk_err;
} }
@ -111,7 +107,7 @@ index 9edad30c8ae5..fb8992011bde 100644
ret = ssusb_phy_init(ssusb); ret = ssusb_phy_init(ssusb);
if (ret) { if (ret) {
dev_err(ssusb->dev, "failed to init phy\n"); dev_err(ssusb->dev, "failed to init phy\n");
@@ -149,20 +189,16 @@ static int ssusb_rscs_init(struct ssusb_mtk *ssusb) @@ -149,20 +189,16 @@ static int ssusb_rscs_init(struct ssusb_
phy_err: phy_err:
ssusb_phy_exit(ssusb); ssusb_phy_exit(ssusb);
phy_init_err: phy_init_err:
@ -135,7 +131,7 @@ index 9edad30c8ae5..fb8992011bde 100644
regulator_disable(ssusb->vusb33); regulator_disable(ssusb->vusb33);
ssusb_phy_power_off(ssusb); ssusb_phy_power_off(ssusb);
ssusb_phy_exit(ssusb); ssusb_phy_exit(ssusb);
@@ -203,6 +239,19 @@ static int get_iddig_pinctrl(struct ssusb_mtk *ssusb) @@ -203,6 +239,19 @@ static int get_iddig_pinctrl(struct ssus
return 0; return 0;
} }
@ -155,7 +151,7 @@ index 9edad30c8ae5..fb8992011bde 100644
static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb) static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
{ {
struct device_node *node = pdev->dev.of_node; struct device_node *node = pdev->dev.of_node;
@@ -225,18 +274,17 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb) @@ -225,18 +274,17 @@ static int get_ssusb_rscs(struct platfor
return PTR_ERR(ssusb->sys_clk); return PTR_ERR(ssusb->sys_clk);
} }
@ -168,12 +164,13 @@ index 9edad30c8ae5..fb8992011bde 100644
- if (IS_ERR(ssusb->ref_clk)) { - if (IS_ERR(ssusb->ref_clk)) {
- if (PTR_ERR(ssusb->ref_clk) == -EPROBE_DEFER) - if (PTR_ERR(ssusb->ref_clk) == -EPROBE_DEFER)
- return -EPROBE_DEFER; - return -EPROBE_DEFER;
-
- ssusb->ref_clk = NULL;
- }
+ ssusb->ref_clk = get_optional_clk(dev, "ref_ck"); + ssusb->ref_clk = get_optional_clk(dev, "ref_ck");
+ if (IS_ERR(ssusb->ref_clk)) + if (IS_ERR(ssusb->ref_clk))
+ return PTR_ERR(ssusb->ref_clk); + return PTR_ERR(ssusb->ref_clk);
+
- ssusb->ref_clk = NULL;
- }
+ ssusb->mcu_clk = get_optional_clk(dev, "mcu_ck"); + ssusb->mcu_clk = get_optional_clk(dev, "mcu_ck");
+ if (IS_ERR(ssusb->mcu_clk)) + if (IS_ERR(ssusb->mcu_clk))
+ return PTR_ERR(ssusb->mcu_clk); + return PTR_ERR(ssusb->mcu_clk);
@ -184,7 +181,7 @@ index 9edad30c8ae5..fb8992011bde 100644
ssusb->num_phys = of_count_phandle_with_args(node, ssusb->num_phys = of_count_phandle_with_args(node,
"phys", "#phy-cells"); "phys", "#phy-cells");
@@ -451,8 +499,7 @@ static int __maybe_unused mtu3_suspend(struct device *dev) @@ -451,8 +499,7 @@ static int __maybe_unused mtu3_suspend(s
ssusb_host_disable(ssusb, true); ssusb_host_disable(ssusb, true);
ssusb_phy_power_off(ssusb); ssusb_phy_power_off(ssusb);
@ -194,7 +191,7 @@ index 9edad30c8ae5..fb8992011bde 100644
ssusb_wakeup_enable(ssusb); ssusb_wakeup_enable(ssusb);
return 0; return 0;
@@ -470,27 +517,21 @@ static int __maybe_unused mtu3_resume(struct device *dev) @@ -470,27 +517,21 @@ static int __maybe_unused mtu3_resume(st
return 0; return 0;
ssusb_wakeup_disable(ssusb); ssusb_wakeup_disable(ssusb);
@ -228,6 +225,3 @@ index 9edad30c8ae5..fb8992011bde 100644
return ret; return ret;
} }
--
2.11.0

View file

@ -16,8 +16,6 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/mtu3/mtu3_qmu.c | 102 +++++++++++++++++++++++++++++++++------- drivers/usb/mtu3/mtu3_qmu.c | 102 +++++++++++++++++++++++++++++++++-------
4 files changed, 142 insertions(+), 21 deletions(-) 4 files changed, 142 insertions(+), 21 deletions(-)
diff --git a/drivers/usb/mtu3/mtu3.h b/drivers/usb/mtu3/mtu3.h
index 2795294ec92a..ef2dc92a2109 100644
--- a/drivers/usb/mtu3/mtu3.h --- a/drivers/usb/mtu3/mtu3.h
+++ b/drivers/usb/mtu3/mtu3.h +++ b/drivers/usb/mtu3/mtu3.h
@@ -46,6 +46,9 @@ struct mtu3_request; @@ -46,6 +46,9 @@ struct mtu3_request;
@ -66,8 +64,6 @@ index 2795294ec92a..ef2dc92a2109 100644
__u8 ext_flag; __u8 ext_flag;
} __packed; } __packed;
diff --git a/drivers/usb/mtu3/mtu3_core.c b/drivers/usb/mtu3/mtu3_core.c
index 947579842ad7..cd4528f5f337 100644
--- a/drivers/usb/mtu3/mtu3_core.c --- a/drivers/usb/mtu3/mtu3_core.c
+++ b/drivers/usb/mtu3/mtu3_core.c +++ b/drivers/usb/mtu3/mtu3_core.c
@@ -17,6 +17,7 @@ @@ -17,6 +17,7 @@
@ -78,7 +74,7 @@ index 947579842ad7..cd4528f5f337 100644
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/of_address.h> #include <linux/of_address.h>
@@ -759,7 +760,31 @@ static void mtu3_hw_exit(struct mtu3 *mtu) @@ -759,7 +760,31 @@ static void mtu3_hw_exit(struct mtu3 *mt
mtu3_mem_free(mtu); mtu3_mem_free(mtu);
} }
@ -111,7 +107,7 @@ index 947579842ad7..cd4528f5f337 100644
int ssusb_gadget_init(struct ssusb_mtk *ssusb) int ssusb_gadget_init(struct ssusb_mtk *ssusb)
{ {
@@ -820,6 +845,12 @@ int ssusb_gadget_init(struct ssusb_mtk *ssusb) @@ -820,6 +845,12 @@ int ssusb_gadget_init(struct ssusb_mtk *
return ret; return ret;
} }
@ -124,7 +120,7 @@ index 947579842ad7..cd4528f5f337 100644
ret = devm_request_irq(dev, mtu->irq, mtu3_irq, 0, dev_name(dev), mtu); ret = devm_request_irq(dev, mtu->irq, mtu3_irq, 0, dev_name(dev), mtu);
if (ret) { if (ret) {
dev_err(dev, "request irq %d failed!\n", mtu->irq); dev_err(dev, "request irq %d failed!\n", mtu->irq);
@@ -845,6 +876,7 @@ int ssusb_gadget_init(struct ssusb_mtk *ssusb) @@ -845,6 +876,7 @@ int ssusb_gadget_init(struct ssusb_mtk *
gadget_err: gadget_err:
device_init_wakeup(dev, false); device_init_wakeup(dev, false);
@ -132,8 +128,6 @@ index 947579842ad7..cd4528f5f337 100644
irq_err: irq_err:
mtu3_hw_exit(mtu); mtu3_hw_exit(mtu);
ssusb->u3d = NULL; ssusb->u3d = NULL;
diff --git a/drivers/usb/mtu3/mtu3_hw_regs.h b/drivers/usb/mtu3/mtu3_hw_regs.h
index 06b29664470f..b6059752dc12 100644
--- a/drivers/usb/mtu3/mtu3_hw_regs.h --- a/drivers/usb/mtu3/mtu3_hw_regs.h
+++ b/drivers/usb/mtu3/mtu3_hw_regs.h +++ b/drivers/usb/mtu3/mtu3_hw_regs.h
@@ -58,6 +58,8 @@ @@ -58,6 +58,8 @@
@ -167,8 +161,6 @@ index 06b29664470f..b6059752dc12 100644
#define VBUS_ON BIT(1) #define VBUS_ON BIT(1)
#define VBUS_FRC_EN BIT(0) #define VBUS_FRC_EN BIT(0)
diff --git a/drivers/usb/mtu3/mtu3_qmu.c b/drivers/usb/mtu3/mtu3_qmu.c
index 7d9ba8a52368..42145a3f1422 100644
--- a/drivers/usb/mtu3/mtu3_qmu.c --- a/drivers/usb/mtu3/mtu3_qmu.c
+++ b/drivers/usb/mtu3/mtu3_qmu.c +++ b/drivers/usb/mtu3/mtu3_qmu.c
@@ -40,7 +40,58 @@ @@ -40,7 +40,58 @@
@ -230,7 +222,7 @@ index 7d9ba8a52368..42145a3f1422 100644
static struct qmu_gpd *gpd_dma_to_virt(struct mtu3_gpd_ring *ring, static struct qmu_gpd *gpd_dma_to_virt(struct mtu3_gpd_ring *ring,
dma_addr_t dma_addr) dma_addr_t dma_addr)
@@ -193,21 +244,27 @@ static int mtu3_prepare_tx_gpd(struct mtu3_ep *mep, struct mtu3_request *mreq) @@ -193,21 +244,27 @@ static int mtu3_prepare_tx_gpd(struct mt
struct mtu3_gpd_ring *ring = &mep->gpd_ring; struct mtu3_gpd_ring *ring = &mep->gpd_ring;
struct qmu_gpd *gpd = ring->enqueue; struct qmu_gpd *gpd = ring->enqueue;
struct usb_request *req = &mreq->request; struct usb_request *req = &mreq->request;
@ -262,7 +254,7 @@ index 7d9ba8a52368..42145a3f1422 100644
if (req->zero) if (req->zero)
gpd->ext_flag |= GPD_EXT_FLAG_ZLP; gpd->ext_flag |= GPD_EXT_FLAG_ZLP;
@@ -226,21 +283,27 @@ static int mtu3_prepare_rx_gpd(struct mtu3_ep *mep, struct mtu3_request *mreq) @@ -226,21 +283,27 @@ static int mtu3_prepare_rx_gpd(struct mt
struct mtu3_gpd_ring *ring = &mep->gpd_ring; struct mtu3_gpd_ring *ring = &mep->gpd_ring;
struct qmu_gpd *gpd = ring->enqueue; struct qmu_gpd *gpd = ring->enqueue;
struct usb_request *req = &mreq->request; struct usb_request *req = &mreq->request;
@ -316,7 +308,7 @@ index 7d9ba8a52368..42145a3f1422 100644
mtu3_setbits(mbase, U3D_QCR0, QMU_RX_CS_EN(epnum)); mtu3_setbits(mbase, U3D_QCR0, QMU_RX_CS_EN(epnum));
/* don't expect ZLP */ /* don't expect ZLP */
mtu3_clrbits(mbase, U3D_QCR3, QMU_RX_ZLP(epnum)); mtu3_clrbits(mbase, U3D_QCR3, QMU_RX_ZLP(epnum));
@@ -353,9 +416,9 @@ static void qmu_tx_zlp_error_handler(struct mtu3 *mtu, u8 epnum) @@ -353,9 +416,9 @@ static void qmu_tx_zlp_error_handler(str
struct mtu3_gpd_ring *ring = &mep->gpd_ring; struct mtu3_gpd_ring *ring = &mep->gpd_ring;
void __iomem *mbase = mtu->mac_base; void __iomem *mbase = mtu->mac_base;
struct qmu_gpd *gpd_current = NULL; struct qmu_gpd *gpd_current = NULL;
@ -327,7 +319,7 @@ index 7d9ba8a52368..42145a3f1422 100644
u32 txcsr = 0; u32 txcsr = 0;
int ret; int ret;
@@ -365,7 +428,8 @@ static void qmu_tx_zlp_error_handler(struct mtu3 *mtu, u8 epnum) @@ -365,7 +428,8 @@ static void qmu_tx_zlp_error_handler(str
else else
return; return;
@ -337,7 +329,7 @@ index 7d9ba8a52368..42145a3f1422 100644
if (le16_to_cpu(gpd_current->buf_len) != 0) { if (le16_to_cpu(gpd_current->buf_len) != 0) {
dev_err(mtu->dev, "TX EP%d buffer length error(!=0)\n", epnum); dev_err(mtu->dev, "TX EP%d buffer length error(!=0)\n", epnum);
@@ -408,12 +472,13 @@ static void qmu_done_tx(struct mtu3 *mtu, u8 epnum) @@ -408,12 +472,13 @@ static void qmu_done_tx(struct mtu3 *mtu
void __iomem *mbase = mtu->mac_base; void __iomem *mbase = mtu->mac_base;
struct qmu_gpd *gpd = ring->dequeue; struct qmu_gpd *gpd = ring->dequeue;
struct qmu_gpd *gpd_current = NULL; struct qmu_gpd *gpd_current = NULL;
@ -353,7 +345,7 @@ index 7d9ba8a52368..42145a3f1422 100644
dev_dbg(mtu->dev, "%s EP%d, last=%p, current=%p, enq=%p\n", dev_dbg(mtu->dev, "%s EP%d, last=%p, current=%p, enq=%p\n",
__func__, epnum, gpd, gpd_current, ring->enqueue); __func__, epnum, gpd, gpd_current, ring->enqueue);
@@ -446,11 +511,12 @@ static void qmu_done_rx(struct mtu3 *mtu, u8 epnum) @@ -446,11 +511,12 @@ static void qmu_done_rx(struct mtu3 *mtu
void __iomem *mbase = mtu->mac_base; void __iomem *mbase = mtu->mac_base;
struct qmu_gpd *gpd = ring->dequeue; struct qmu_gpd *gpd = ring->dequeue;
struct qmu_gpd *gpd_current = NULL; struct qmu_gpd *gpd_current = NULL;
@ -368,6 +360,3 @@ index 7d9ba8a52368..42145a3f1422 100644
dev_dbg(mtu->dev, "%s EP%d, last=%p, current=%p, enq=%p\n", dev_dbg(mtu->dev, "%s EP%d, last=%p, current=%p, enq=%p\n",
__func__, epnum, gpd, gpd_current, ring->enqueue); __func__, epnum, gpd, gpd_current, ring->enqueue);
--
2.11.0

View file

@ -19,8 +19,6 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/mtu3/mtu3_plat.c | 38 ++----------------------- drivers/usb/mtu3/mtu3_plat.c | 38 ++-----------------------
6 files changed, 74 insertions(+), 56 deletions(-) 6 files changed, 74 insertions(+), 56 deletions(-)
diff --git a/drivers/usb/mtu3/mtu3.h b/drivers/usb/mtu3/mtu3.h
index ef2dc92a2109..b0c2b5dca045 100644
--- a/drivers/usb/mtu3/mtu3.h --- a/drivers/usb/mtu3/mtu3.h
+++ b/drivers/usb/mtu3/mtu3.h +++ b/drivers/usb/mtu3/mtu3.h
@@ -115,6 +115,19 @@ enum mtu3_g_ep0_state { @@ -115,6 +115,19 @@ enum mtu3_g_ep0_state {
@ -62,11 +60,9 @@ index ef2dc92a2109..b0c2b5dca045 100644
bool manual_drd_enabled; bool manual_drd_enabled;
}; };
diff --git a/drivers/usb/mtu3/mtu3_dr.c b/drivers/usb/mtu3/mtu3_dr.c
index 560256115b23..ec442cd5a1ad 100644
--- a/drivers/usb/mtu3/mtu3_dr.c --- a/drivers/usb/mtu3/mtu3_dr.c
+++ b/drivers/usb/mtu3/mtu3_dr.c +++ b/drivers/usb/mtu3/mtu3_dr.c
@@ -261,21 +261,22 @@ static void extcon_register_dwork(struct work_struct *work) @@ -261,21 +261,22 @@ static void extcon_register_dwork(struct
* depending on user input. * depending on user input.
* This is useful in special cases, such as uses TYPE-A receptacle but also * This is useful in special cases, such as uses TYPE-A receptacle but also
* wants to support dual-role mode. * wants to support dual-role mode.
@ -97,7 +93,7 @@ index 560256115b23..ec442cd5a1ad 100644
static int ssusb_mode_show(struct seq_file *sf, void *unused) static int ssusb_mode_show(struct seq_file *sf, void *unused)
{ {
struct ssusb_mtk *ssusb = sf->private; struct ssusb_mtk *ssusb = sf->private;
@@ -388,17 +389,45 @@ static void ssusb_debugfs_exit(struct ssusb_mtk *ssusb) @@ -388,17 +389,45 @@ static void ssusb_debugfs_exit(struct ss
debugfs_remove_recursive(ssusb->dbgfs_root); debugfs_remove_recursive(ssusb->dbgfs_root);
} }
@ -133,13 +129,12 @@ index 560256115b23..ec442cd5a1ad 100644
- if (otg_sx->manual_drd_enabled) - if (otg_sx->manual_drd_enabled)
+ if (otg_sx->manual_drd_enabled) { + if (otg_sx->manual_drd_enabled) {
ssusb_debugfs_init(ssusb); ssusb_debugfs_init(ssusb);
-
- /* It is enough to delay 1s for waiting for host initialization */
- schedule_delayed_work(&otg_sx->extcon_reg_dwork, HZ);
+ } else { + } else {
+ INIT_DELAYED_WORK(&otg_sx->extcon_reg_dwork, + INIT_DELAYED_WORK(&otg_sx->extcon_reg_dwork,
+ extcon_register_dwork); + extcon_register_dwork);
+
- /* It is enough to delay 1s for waiting for host initialization */
- schedule_delayed_work(&otg_sx->extcon_reg_dwork, HZ);
+ /* + /*
+ * It is enough to delay 1s for waiting for + * It is enough to delay 1s for waiting for
+ * host initialization + * host initialization
@ -149,7 +144,7 @@ index 560256115b23..ec442cd5a1ad 100644
return 0; return 0;
} }
@@ -407,8 +436,8 @@ void ssusb_otg_switch_exit(struct ssusb_mtk *ssusb) @@ -407,8 +436,8 @@ void ssusb_otg_switch_exit(struct ssusb_
{ {
struct otg_switch_mtk *otg_sx = &ssusb->otg_switch; struct otg_switch_mtk *otg_sx = &ssusb->otg_switch;
@ -160,11 +155,9 @@ index 560256115b23..ec442cd5a1ad 100644
+ else + else
+ cancel_delayed_work(&otg_sx->extcon_reg_dwork); + cancel_delayed_work(&otg_sx->extcon_reg_dwork);
} }
diff --git a/drivers/usb/mtu3/mtu3_dr.h b/drivers/usb/mtu3/mtu3_dr.h
index 9b228b5811b0..0f0cbac00192 100644
--- a/drivers/usb/mtu3/mtu3_dr.h --- a/drivers/usb/mtu3/mtu3_dr.h
+++ b/drivers/usb/mtu3/mtu3_dr.h +++ b/drivers/usb/mtu3/mtu3_dr.h
@@ -87,6 +87,8 @@ static inline void ssusb_gadget_exit(struct ssusb_mtk *ssusb) @@ -87,6 +87,8 @@ static inline void ssusb_gadget_exit(str
int ssusb_otg_switch_init(struct ssusb_mtk *ssusb); int ssusb_otg_switch_init(struct ssusb_mtk *ssusb);
void ssusb_otg_switch_exit(struct ssusb_mtk *ssusb); void ssusb_otg_switch_exit(struct ssusb_mtk *ssusb);
int ssusb_set_vbus(struct otg_switch_mtk *otg_sx, int is_on); int ssusb_set_vbus(struct otg_switch_mtk *otg_sx, int is_on);
@ -173,7 +166,7 @@ index 9b228b5811b0..0f0cbac00192 100644
#else #else
@@ -103,6 +105,10 @@ static inline int ssusb_set_vbus(struct otg_switch_mtk *otg_sx, int is_on) @@ -103,6 +105,10 @@ static inline int ssusb_set_vbus(struct
return 0; return 0;
} }
@ -184,11 +177,9 @@ index 9b228b5811b0..0f0cbac00192 100644
#endif #endif
#endif /* _MTU3_DR_H_ */ #endif /* _MTU3_DR_H_ */
diff --git a/drivers/usb/mtu3/mtu3_host.c b/drivers/usb/mtu3/mtu3_host.c
index edcc59148171..ec76b86dd887 100644
--- a/drivers/usb/mtu3/mtu3_host.c --- a/drivers/usb/mtu3/mtu3_host.c
+++ b/drivers/usb/mtu3/mtu3_host.c +++ b/drivers/usb/mtu3/mtu3_host.c
@@ -189,6 +189,8 @@ int ssusb_host_disable(struct ssusb_mtk *ssusb, bool suspend) @@ -189,6 +189,8 @@ int ssusb_host_disable(struct ssusb_mtk
static void ssusb_host_setup(struct ssusb_mtk *ssusb) static void ssusb_host_setup(struct ssusb_mtk *ssusb)
{ {
@ -197,7 +188,7 @@ index edcc59148171..ec76b86dd887 100644
host_ports_num_get(ssusb); host_ports_num_get(ssusb);
/* /*
@@ -197,6 +199,9 @@ static void ssusb_host_setup(struct ssusb_mtk *ssusb) @@ -197,6 +199,9 @@ static void ssusb_host_setup(struct ssus
*/ */
ssusb_host_enable(ssusb); ssusb_host_enable(ssusb);
@ -207,8 +198,6 @@ index edcc59148171..ec76b86dd887 100644
/* if port0 supports dual-role, works as host mode by default */ /* if port0 supports dual-role, works as host mode by default */
ssusb_set_vbus(&ssusb->otg_switch, 1); ssusb_set_vbus(&ssusb->otg_switch, 1);
} }
diff --git a/drivers/usb/mtu3/mtu3_hw_regs.h b/drivers/usb/mtu3/mtu3_hw_regs.h
index b6059752dc12..a7e35f6ad90a 100644
--- a/drivers/usb/mtu3/mtu3_hw_regs.h --- a/drivers/usb/mtu3/mtu3_hw_regs.h
+++ b/drivers/usb/mtu3/mtu3_hw_regs.h +++ b/drivers/usb/mtu3/mtu3_hw_regs.h
@@ -472,6 +472,8 @@ @@ -472,6 +472,8 @@
@ -220,8 +209,6 @@ index b6059752dc12..a7e35f6ad90a 100644
#define SSUSB_U2_PORT_VBUSVALID BIT(9) #define SSUSB_U2_PORT_VBUSVALID BIT(9)
#define SSUSB_U2_PORT_OTG_SEL BIT(7) #define SSUSB_U2_PORT_OTG_SEL BIT(7)
#define SSUSB_U2_PORT_HOST BIT(2) #define SSUSB_U2_PORT_HOST BIT(2)
diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
index fb8992011bde..1e473b068650 100644
--- a/drivers/usb/mtu3/mtu3_plat.c --- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c +++ b/drivers/usb/mtu3/mtu3_plat.c
@@ -21,7 +21,6 @@ @@ -21,7 +21,6 @@
@ -232,7 +219,7 @@ index fb8992011bde..1e473b068650 100644
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include "mtu3.h" #include "mtu3.h"
@@ -212,33 +211,6 @@ static void ssusb_ip_sw_reset(struct ssusb_mtk *ssusb) @@ -212,33 +211,6 @@ static void ssusb_ip_sw_reset(struct ssu
mtu3_clrbits(ssusb->ippc_base, U3D_SSUSB_IP_PW_CTRL0, SSUSB_IP_SW_RST); mtu3_clrbits(ssusb->ippc_base, U3D_SSUSB_IP_PW_CTRL0, SSUSB_IP_SW_RST);
} }
@ -266,7 +253,7 @@ index fb8992011bde..1e473b068650 100644
/* ignore the error if the clock does not exist */ /* ignore the error if the clock does not exist */
static struct clk *get_optional_clk(struct device *dev, const char *id) static struct clk *get_optional_clk(struct device *dev, const char *id)
{ {
@@ -349,15 +321,11 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb) @@ -349,15 +321,11 @@ static int get_ssusb_rscs(struct platfor
dev_err(ssusb->dev, "couldn't get extcon device\n"); dev_err(ssusb->dev, "couldn't get extcon device\n");
return -EPROBE_DEFER; return -EPROBE_DEFER;
} }
@ -285,6 +272,3 @@ index fb8992011bde..1e473b068650 100644
return 0; return 0;
} }
--
2.11.0

View file

@ -15,8 +15,6 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/mtu3/mtu3_hw_regs.h | 1 + drivers/usb/mtu3/mtu3_hw_regs.h | 1 +
5 files changed, 23 insertions(+), 12 deletions(-) 5 files changed, 23 insertions(+), 12 deletions(-)
diff --git a/drivers/usb/mtu3/mtu3.h b/drivers/usb/mtu3/mtu3.h
index b0c2b5dca045..d80e4e813248 100644
--- a/drivers/usb/mtu3/mtu3.h --- a/drivers/usb/mtu3/mtu3.h
+++ b/drivers/usb/mtu3/mtu3.h +++ b/drivers/usb/mtu3/mtu3.h
@@ -94,6 +94,7 @@ enum mtu3_speed { @@ -94,6 +94,7 @@ enum mtu3_speed {
@ -27,11 +25,9 @@ index b0c2b5dca045..d80e4e813248 100644
}; };
/** /**
diff --git a/drivers/usb/mtu3/mtu3_core.c b/drivers/usb/mtu3/mtu3_core.c
index cd4528f5f337..67f7a309aba7 100644
--- a/drivers/usb/mtu3/mtu3_core.c --- a/drivers/usb/mtu3/mtu3_core.c
+++ b/drivers/usb/mtu3/mtu3_core.c +++ b/drivers/usb/mtu3/mtu3_core.c
@@ -237,7 +237,7 @@ void mtu3_ep_stall_set(struct mtu3_ep *mep, bool set) @@ -237,7 +237,7 @@ void mtu3_ep_stall_set(struct mtu3_ep *m
void mtu3_dev_on_off(struct mtu3 *mtu, int is_on) void mtu3_dev_on_off(struct mtu3 *mtu, int is_on)
{ {
@ -40,7 +36,7 @@ index cd4528f5f337..67f7a309aba7 100644
mtu3_ss_func_set(mtu, is_on); mtu3_ss_func_set(mtu, is_on);
else else
mtu3_hs_softconn_set(mtu, is_on); mtu3_hs_softconn_set(mtu, is_on);
@@ -547,6 +547,9 @@ static void mtu3_set_speed(struct mtu3 *mtu) @@ -547,6 +547,9 @@ static void mtu3_set_speed(struct mtu3 *
mtu3_clrbits(mbase, U3D_USB3_CONFIG, USB3_EN); mtu3_clrbits(mbase, U3D_USB3_CONFIG, USB3_EN);
/* HS/FS detected by HW */ /* HS/FS detected by HW */
mtu3_setbits(mbase, U3D_POWER_MANAGEMENT, HS_ENABLE); mtu3_setbits(mbase, U3D_POWER_MANAGEMENT, HS_ENABLE);
@ -50,7 +46,7 @@ index cd4528f5f337..67f7a309aba7 100644
} }
dev_info(mtu->dev, "max_speed: %s\n", dev_info(mtu->dev, "max_speed: %s\n",
@@ -624,6 +627,10 @@ static irqreturn_t mtu3_link_isr(struct mtu3 *mtu) @@ -624,6 +627,10 @@ static irqreturn_t mtu3_link_isr(struct
udev_speed = USB_SPEED_SUPER; udev_speed = USB_SPEED_SUPER;
maxpkt = 512; maxpkt = 512;
break; break;
@ -61,7 +57,7 @@ index cd4528f5f337..67f7a309aba7 100644
default: default:
udev_speed = USB_SPEED_UNKNOWN; udev_speed = USB_SPEED_UNKNOWN;
break; break;
@@ -825,14 +832,15 @@ int ssusb_gadget_init(struct ssusb_mtk *ssusb) @@ -825,14 +832,15 @@ int ssusb_gadget_init(struct ssusb_mtk *
case USB_SPEED_FULL: case USB_SPEED_FULL:
case USB_SPEED_HIGH: case USB_SPEED_HIGH:
case USB_SPEED_SUPER: case USB_SPEED_SUPER:
@ -79,11 +75,9 @@ index cd4528f5f337..67f7a309aba7 100644
break; break;
} }
diff --git a/drivers/usb/mtu3/mtu3_gadget.c b/drivers/usb/mtu3/mtu3_gadget.c
index 434fca58143c..b495471f689f 100644
--- a/drivers/usb/mtu3/mtu3_gadget.c --- a/drivers/usb/mtu3/mtu3_gadget.c
+++ b/drivers/usb/mtu3/mtu3_gadget.c +++ b/drivers/usb/mtu3/mtu3_gadget.c
@@ -89,6 +89,7 @@ static int mtu3_ep_enable(struct mtu3_ep *mep) @@ -89,6 +89,7 @@ static int mtu3_ep_enable(struct mtu3_ep
switch (mtu->g.speed) { switch (mtu->g.speed) {
case USB_SPEED_SUPER: case USB_SPEED_SUPER:
@ -91,7 +85,7 @@ index 434fca58143c..b495471f689f 100644
if (usb_endpoint_xfer_int(desc) || if (usb_endpoint_xfer_int(desc) ||
usb_endpoint_xfer_isoc(desc)) { usb_endpoint_xfer_isoc(desc)) {
interval = desc->bInterval; interval = desc->bInterval;
@@ -456,7 +457,7 @@ static int mtu3_gadget_wakeup(struct usb_gadget *gadget) @@ -456,7 +457,7 @@ static int mtu3_gadget_wakeup(struct usb
return -EOPNOTSUPP; return -EOPNOTSUPP;
spin_lock_irqsave(&mtu->lock, flags); spin_lock_irqsave(&mtu->lock, flags);
@ -100,11 +94,9 @@ index 434fca58143c..b495471f689f 100644
mtu3_setbits(mtu->mac_base, U3D_LINK_POWER_CONTROL, UX_EXIT); mtu3_setbits(mtu->mac_base, U3D_LINK_POWER_CONTROL, UX_EXIT);
} else { } else {
mtu3_setbits(mtu->mac_base, U3D_POWER_MANAGEMENT, RESUME); mtu3_setbits(mtu->mac_base, U3D_POWER_MANAGEMENT, RESUME);
diff --git a/drivers/usb/mtu3/mtu3_gadget_ep0.c b/drivers/usb/mtu3/mtu3_gadget_ep0.c
index 958d74dd2b78..020b25314a68 100644
--- a/drivers/usb/mtu3/mtu3_gadget_ep0.c --- a/drivers/usb/mtu3/mtu3_gadget_ep0.c
+++ b/drivers/usb/mtu3/mtu3_gadget_ep0.c +++ b/drivers/usb/mtu3/mtu3_gadget_ep0.c
@@ -212,8 +212,8 @@ ep0_get_status(struct mtu3 *mtu, const struct usb_ctrlrequest *setup) @@ -212,8 +212,8 @@ ep0_get_status(struct mtu3 *mtu, const s
case USB_RECIP_DEVICE: case USB_RECIP_DEVICE:
result[0] = mtu->is_self_powered << USB_DEVICE_SELF_POWERED; result[0] = mtu->is_self_powered << USB_DEVICE_SELF_POWERED;
result[0] |= mtu->may_wakeup << USB_DEVICE_REMOTE_WAKEUP; result[0] |= mtu->may_wakeup << USB_DEVICE_REMOTE_WAKEUP;
@ -115,7 +107,7 @@ index 958d74dd2b78..020b25314a68 100644
result[0] |= mtu->u1_enable << USB_DEV_STAT_U1_ENABLED; result[0] |= mtu->u1_enable << USB_DEV_STAT_U1_ENABLED;
result[0] |= mtu->u2_enable << USB_DEV_STAT_U2_ENABLED; result[0] |= mtu->u2_enable << USB_DEV_STAT_U2_ENABLED;
} }
@@ -329,8 +329,8 @@ static int ep0_handle_feature_dev(struct mtu3 *mtu, @@ -329,8 +329,8 @@ static int ep0_handle_feature_dev(struct
handled = handle_test_mode(mtu, setup); handled = handle_test_mode(mtu, setup);
break; break;
case USB_DEVICE_U1_ENABLE: case USB_DEVICE_U1_ENABLE:
@ -126,7 +118,7 @@ index 958d74dd2b78..020b25314a68 100644
break; break;
lpc = mtu3_readl(mbase, U3D_LINK_POWER_CONTROL); lpc = mtu3_readl(mbase, U3D_LINK_POWER_CONTROL);
@@ -344,8 +344,8 @@ static int ep0_handle_feature_dev(struct mtu3 *mtu, @@ -344,8 +344,8 @@ static int ep0_handle_feature_dev(struct
handled = 1; handled = 1;
break; break;
case USB_DEVICE_U2_ENABLE: case USB_DEVICE_U2_ENABLE:
@ -137,7 +129,7 @@ index 958d74dd2b78..020b25314a68 100644
break; break;
lpc = mtu3_readl(mbase, U3D_LINK_POWER_CONTROL); lpc = mtu3_readl(mbase, U3D_LINK_POWER_CONTROL);
@@ -384,8 +384,8 @@ static int ep0_handle_feature(struct mtu3 *mtu, @@ -384,8 +384,8 @@ static int ep0_handle_feature(struct mtu
break; break;
case USB_RECIP_INTERFACE: case USB_RECIP_INTERFACE:
/* superspeed only */ /* superspeed only */
@ -148,8 +140,6 @@ index 958d74dd2b78..020b25314a68 100644
/* /*
* forward the request because function drivers * forward the request because function drivers
* should handle it * should handle it
diff --git a/drivers/usb/mtu3/mtu3_hw_regs.h b/drivers/usb/mtu3/mtu3_hw_regs.h
index a7e35f6ad90a..6953436a1688 100644
--- a/drivers/usb/mtu3/mtu3_hw_regs.h --- a/drivers/usb/mtu3/mtu3_hw_regs.h
+++ b/drivers/usb/mtu3/mtu3_hw_regs.h +++ b/drivers/usb/mtu3/mtu3_hw_regs.h
@@ -467,6 +467,7 @@ @@ -467,6 +467,7 @@
@ -160,6 +150,3 @@ index a7e35f6ad90a..6953436a1688 100644
#define SSUSB_U3_PORT_HOST_SEL BIT(2) #define SSUSB_U3_PORT_HOST_SEL BIT(2)
#define SSUSB_U3_PORT_PDN BIT(1) #define SSUSB_U3_PORT_PDN BIT(1)
#define SSUSB_U3_PORT_DIS BIT(0) #define SSUSB_U3_PORT_DIS BIT(0)
--
2.11.0

View file

@ -14,11 +14,9 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/mtu3/mtu3_plat.c | 8 ++++---- drivers/usb/mtu3/mtu3_plat.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-) 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
index 1e473b068650..7ca81f4e78a3 100644
--- a/drivers/usb/mtu3/mtu3_plat.c --- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c +++ b/drivers/usb/mtu3/mtu3_plat.c
@@ -300,10 +300,6 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb) @@ -300,10 +300,6 @@ static int get_ssusb_rscs(struct platfor
of_property_read_u32(node, "mediatek,u3p-dis-msk", of_property_read_u32(node, "mediatek,u3p-dis-msk",
&ssusb->u3p_dis_msk); &ssusb->u3p_dis_msk);
@ -29,7 +27,7 @@ index 1e473b068650..7ca81f4e78a3 100644
vbus = devm_regulator_get(&pdev->dev, "vbus"); vbus = devm_regulator_get(&pdev->dev, "vbus");
if (IS_ERR(vbus)) { if (IS_ERR(vbus)) {
dev_err(dev, "failed to get vbus\n"); dev_err(dev, "failed to get vbus\n");
@@ -311,6 +307,10 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb) @@ -311,6 +307,10 @@ static int get_ssusb_rscs(struct platfor
} }
otg_sx->vbus = vbus; otg_sx->vbus = vbus;
@ -40,6 +38,3 @@ index 1e473b068650..7ca81f4e78a3 100644
otg_sx->is_u3_drd = of_property_read_bool(node, "mediatek,usb3-drd"); otg_sx->is_u3_drd = of_property_read_bool(node, "mediatek,usb3-drd");
otg_sx->manual_drd_enabled = otg_sx->manual_drd_enabled =
of_property_read_bool(node, "enable-manual-drd"); of_property_read_bool(node, "enable-manual-drd");
--
2.11.0

View file

@ -12,11 +12,9 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/mtu3/mtu3_plat.c | 6 ++---- drivers/usb/mtu3/mtu3_plat.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-) 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
index 7ca81f4e78a3..9ff33579b42e 100644
--- a/drivers/usb/mtu3/mtu3_plat.c --- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c +++ b/drivers/usb/mtu3/mtu3_plat.c
@@ -283,10 +283,8 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb) @@ -283,10 +283,8 @@ static int get_ssusb_rscs(struct platfor
return PTR_ERR(ssusb->ippc_base); return PTR_ERR(ssusb->ippc_base);
ssusb->dr_mode = usb_get_dr_mode(dev); ssusb->dr_mode = usb_get_dr_mode(dev);
@ -29,6 +27,3 @@ index 7ca81f4e78a3..9ff33579b42e 100644
if (ssusb->dr_mode == USB_DR_MODE_PERIPHERAL) if (ssusb->dr_mode == USB_DR_MODE_PERIPHERAL)
return 0; return 0;
--
2.11.0

View file

@ -17,11 +17,9 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/mtu3/mtu3_core.c | 9 +++++++-- drivers/usb/mtu3/mtu3_core.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-) 1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/mtu3/mtu3_core.c b/drivers/usb/mtu3/mtu3_core.c
index 67f7a309aba7..7c149a7da14e 100644
--- a/drivers/usb/mtu3/mtu3_core.c --- a/drivers/usb/mtu3/mtu3_core.c
+++ b/drivers/usb/mtu3/mtu3_core.c +++ b/drivers/usb/mtu3/mtu3_core.c
@@ -115,7 +115,9 @@ static int mtu3_device_enable(struct mtu3 *mtu) @@ -115,7 +115,9 @@ static int mtu3_device_enable(struct mtu
mtu3_clrbits(ibase, SSUSB_U2_CTRL(0), mtu3_clrbits(ibase, SSUSB_U2_CTRL(0),
(SSUSB_U2_PORT_DIS | SSUSB_U2_PORT_PDN | (SSUSB_U2_PORT_DIS | SSUSB_U2_PORT_PDN |
SSUSB_U2_PORT_HOST_SEL)); SSUSB_U2_PORT_HOST_SEL));
@ -32,7 +30,7 @@ index 67f7a309aba7..7c149a7da14e 100644
return ssusb_check_clocks(mtu->ssusb, check_clk); return ssusb_check_clocks(mtu->ssusb, check_clk);
} }
@@ -130,7 +132,10 @@ static void mtu3_device_disable(struct mtu3 *mtu) @@ -130,7 +132,10 @@ static void mtu3_device_disable(struct m
mtu3_setbits(ibase, SSUSB_U2_CTRL(0), mtu3_setbits(ibase, SSUSB_U2_CTRL(0),
SSUSB_U2_PORT_DIS | SSUSB_U2_PORT_PDN); SSUSB_U2_PORT_DIS | SSUSB_U2_PORT_PDN);
@ -44,6 +42,3 @@ index 67f7a309aba7..7c149a7da14e 100644
mtu3_setbits(ibase, U3D_SSUSB_IP_PW_CTRL2, SSUSB_IP_DEV_PDN); mtu3_setbits(ibase, U3D_SSUSB_IP_PW_CTRL2, SSUSB_IP_DEV_PDN);
} }
--
2.11.0

View file

@ -12,8 +12,6 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Documentation/devicetree/bindings/usb/mediatek,mtu3.txt | 2 ++ Documentation/devicetree/bindings/usb/mediatek,mtu3.txt | 2 ++
1 file changed, 2 insertions(+) 1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
index 49f54767cd21..7c611d14a0a0 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt --- a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt +++ b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
@@ -44,6 +44,8 @@ Optional properties: @@ -44,6 +44,8 @@ Optional properties:
@ -25,6 +23,3 @@ index 49f54767cd21..7c611d14a0a0 100644
Sub-nodes: Sub-nodes:
The xhci should be added as subnode to mtu3 as shown in the following example The xhci should be added as subnode to mtu3 as shown in the following example
--
2.11.0

View file

@ -13,8 +13,6 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Documentation/devicetree/bindings/usb/mediatek,mtu3.txt | 10 ++++------ Documentation/devicetree/bindings/usb/mediatek,mtu3.txt | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-) 1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
index 7c611d14a0a0..49c982bb5bfc 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt --- a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt +++ b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
@@ -14,9 +14,9 @@ Required properties: @@ -14,9 +14,9 @@ Required properties:
@ -41,6 +39,3 @@ index 7c611d14a0a0..49c982bb5bfc 100644
vusb33-supply = <&mt6397_vusb_reg>; vusb33-supply = <&mt6397_vusb_reg>;
vbus-supply = <&usb_p0_vbus>; vbus-supply = <&usb_p0_vbus>;
extcon = <&extcon_usb>; extcon = <&extcon_usb>;
--
2.11.0

View file

@ -12,8 +12,6 @@ Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Documentation/devicetree/bindings/usb/mediatek,mtu3.txt | 7 ++++--- Documentation/devicetree/bindings/usb/mediatek,mtu3.txt | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-) 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
index 49c982bb5bfc..b2271d8e6b50 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt --- a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt +++ b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
@@ -30,9 +30,10 @@ Optional properties: @@ -30,9 +30,10 @@ Optional properties:
@ -30,6 +28,3 @@ index 49c982bb5bfc..b2271d8e6b50 100644
- pinctrl-0 : pin control group - pinctrl-0 : pin control group
See: Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt See: Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
--
2.11.0

View file

@ -12,8 +12,6 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Documentation/devicetree/bindings/soc/mediatek/pwrap.txt | 6 +++++- Documentation/devicetree/bindings/soc/mediatek/pwrap.txt | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-) 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt b/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
index 107700d00df4..bf80e3f96f8c 100644
--- a/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt --- a/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
+++ b/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt +++ b/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
@@ -19,6 +19,7 @@ IP Pairing @@ -19,6 +19,7 @@ IP Pairing
@ -24,7 +22,7 @@ index 107700d00df4..bf80e3f96f8c 100644
"mediatek,mt8135-pwrap" for MT8135 SoCs "mediatek,mt8135-pwrap" for MT8135 SoCs
"mediatek,mt8173-pwrap" for MT8173 SoCs "mediatek,mt8173-pwrap" for MT8173 SoCs
- interrupts: IRQ for pwrap in SOC - interrupts: IRQ for pwrap in SOC
@@ -36,9 +37,12 @@ Required properties in pwrap device node. @@ -36,9 +37,12 @@ Required properties in pwrap device node
- clocks: Must contain an entry for each entry in clock-names. - clocks: Must contain an entry for each entry in clock-names.
Optional properities: Optional properities:
@ -38,6 +36,3 @@ index 107700d00df4..bf80e3f96f8c 100644
Example: Example:
pwrap: pwrap@1000f000 { pwrap: pwrap@1000f000 {
--
2.11.0

View file

@ -18,8 +18,6 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
drivers/soc/mediatek/mtk-pmic-wrap.c | 55 +++++++++++++++++++++++++++++++++++- drivers/soc/mediatek/mtk-pmic-wrap.c | 55 +++++++++++++++++++++++++++++++++++-
1 file changed, 54 insertions(+), 1 deletion(-) 1 file changed, 54 insertions(+), 1 deletion(-)
diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index f095faac1e04..06930e2ebe4c 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c --- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c +++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -487,6 +487,7 @@ static int mt8135_regs[] = { @@ -487,6 +487,7 @@ static int mt8135_regs[] = {
@ -47,7 +45,7 @@ index f095faac1e04..06930e2ebe4c 100644
}; };
struct pmic_wrapper { struct pmic_wrapper {
@@ -609,7 +617,7 @@ static int pwrap_write(struct pmic_wrapper *wrp, u32 adr, u32 wdata) @@ -609,7 +617,7 @@ static int pwrap_write(struct pmic_wrapp
return 0; return 0;
} }
@ -56,7 +54,7 @@ index f095faac1e04..06930e2ebe4c 100644
{ {
int ret; int ret;
@@ -632,6 +640,39 @@ static int pwrap_read(struct pmic_wrapper *wrp, u32 adr, u32 *rdata) @@ -632,6 +640,39 @@ static int pwrap_read(struct pmic_wrappe
return 0; return 0;
} }
@ -96,7 +94,7 @@ index f095faac1e04..06930e2ebe4c 100644
static int pwrap_regmap_read(void *context, u32 adr, u32 *rdata) static int pwrap_regmap_read(void *context, u32 adr, u32 *rdata)
{ {
return pwrap_read(context, adr, rdata); return pwrap_read(context, adr, rdata);
@@ -752,6 +793,8 @@ static int pwrap_mt2701_init_reg_clock(struct pmic_wrapper *wrp) @@ -752,6 +793,8 @@ static int pwrap_mt2701_init_reg_clock(s
pwrap_writel(wrp, 0x2, PWRAP_CSLEXT_START); pwrap_writel(wrp, 0x2, PWRAP_CSLEXT_START);
pwrap_writel(wrp, 0x2, PWRAP_CSLEXT_END); pwrap_writel(wrp, 0x2, PWRAP_CSLEXT_END);
break; break;
@ -105,7 +103,7 @@ index f095faac1e04..06930e2ebe4c 100644
} }
return 0; return 0;
@@ -815,6 +858,8 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp) @@ -815,6 +858,8 @@ static int pwrap_init_cipher(struct pmic
pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_EN], pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_EN],
0x1); 0x1);
break; break;
@ -114,7 +112,7 @@ index f095faac1e04..06930e2ebe4c 100644
} }
/* wait for cipher data ready@AP */ /* wait for cipher data ready@AP */
@@ -1036,11 +1081,19 @@ static const struct regmap_config pwrap_regmap_config = { @@ -1036,11 +1081,19 @@ static const struct regmap_config pwrap_
static const struct pwrap_slv_type pmic_mt6323 = { static const struct pwrap_slv_type pmic_mt6323 = {
.dew_regs = mt6323_regs, .dew_regs = mt6323_regs,
.type = PMIC_MT6323, .type = PMIC_MT6323,
@ -134,6 +132,3 @@ index f095faac1e04..06930e2ebe4c 100644
}; };
static const struct of_device_id of_slave_match_tbl[] = { static const struct of_device_id of_slave_match_tbl[] = {
--
2.11.0

View file

@ -18,8 +18,6 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
drivers/soc/mediatek/mtk-pmic-wrap.c | 70 +++++++++++++++++++++++++++--------- drivers/soc/mediatek/mtk-pmic-wrap.c | 70 +++++++++++++++++++++++++++---------
1 file changed, 54 insertions(+), 16 deletions(-) 1 file changed, 54 insertions(+), 16 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index 06930e2ebe4c..2d3a8faae124 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c --- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c +++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -507,6 +507,7 @@ struct pwrap_slv_type { @@ -507,6 +507,7 @@ struct pwrap_slv_type {
@ -30,7 +28,7 @@ index 06930e2ebe4c..2d3a8faae124 100644
}; };
struct pmic_wrapper { struct pmic_wrapper {
@@ -601,22 +602,6 @@ static int pwrap_wait_for_state(struct pmic_wrapper *wrp, @@ -601,22 +602,6 @@ static int pwrap_wait_for_state(struct p
} while (1); } while (1);
} }
@ -53,7 +51,7 @@ index 06930e2ebe4c..2d3a8faae124 100644
static int pwrap_read16(struct pmic_wrapper *wrp, u32 adr, u32 *rdata) static int pwrap_read16(struct pmic_wrapper *wrp, u32 adr, u32 *rdata)
{ {
int ret; int ret;
@@ -673,6 +658,56 @@ static int pwrap_read(struct pmic_wrapper *wrp, u32 adr, u32 *rdata) @@ -673,6 +658,56 @@ static int pwrap_read(struct pmic_wrappe
return wrp->slave->pwrap_read(wrp, adr, rdata); return wrp->slave->pwrap_read(wrp, adr, rdata);
} }
@ -110,7 +108,7 @@ index 06930e2ebe4c..2d3a8faae124 100644
static int pwrap_regmap_read(void *context, u32 adr, u32 *rdata) static int pwrap_regmap_read(void *context, u32 adr, u32 *rdata)
{ {
return pwrap_read(context, adr, rdata); return pwrap_read(context, adr, rdata);
@@ -1082,18 +1117,21 @@ static const struct pwrap_slv_type pmic_mt6323 = { @@ -1082,18 +1117,21 @@ static const struct pwrap_slv_type pmic_
.dew_regs = mt6323_regs, .dew_regs = mt6323_regs,
.type = PMIC_MT6323, .type = PMIC_MT6323,
.pwrap_read = pwrap_read16, .pwrap_read = pwrap_read16,
@ -132,6 +130,3 @@ index 06930e2ebe4c..2d3a8faae124 100644
}; };
static const struct of_device_id of_slave_match_tbl[] = { static const struct of_device_id of_slave_match_tbl[] = {
--
2.11.0

View file

@ -19,8 +19,6 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
drivers/soc/mediatek/mtk-pmic-wrap.c | 130 ++++++++++++++++++++++++----------- drivers/soc/mediatek/mtk-pmic-wrap.c | 130 ++++++++++++++++++++++++-----------
1 file changed, 90 insertions(+), 40 deletions(-) 1 file changed, 90 insertions(+), 40 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index 2d3a8faae124..e3398e37a7a6 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c --- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c +++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -70,6 +70,12 @@ @@ -70,6 +70,12 @@
@ -45,7 +43,7 @@ index 2d3a8faae124..e3398e37a7a6 100644
/* /*
* pwrap operations are highly associated with the PMIC types, * pwrap operations are highly associated with the PMIC types,
* so the pointers added increases flexibility allowing determination * so the pointers added increases flexibility allowing determination
@@ -787,6 +795,37 @@ static int pwrap_init_sidly(struct pmic_wrapper *wrp) @@ -787,6 +795,37 @@ static int pwrap_init_sidly(struct pmic_
return 0; return 0;
} }
@ -83,7 +81,7 @@ index 2d3a8faae124..e3398e37a7a6 100644
static int pwrap_mt8135_init_reg_clock(struct pmic_wrapper *wrp) static int pwrap_mt8135_init_reg_clock(struct pmic_wrapper *wrp)
{ {
pwrap_writel(wrp, 0x4, PWRAP_CSHEXT); pwrap_writel(wrp, 0x4, PWRAP_CSHEXT);
@@ -935,6 +974,30 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp) @@ -935,6 +974,30 @@ static int pwrap_init_cipher(struct pmic
return 0; return 0;
} }
@ -114,7 +112,7 @@ index 2d3a8faae124..e3398e37a7a6 100644
static int pwrap_mt8135_init_soc_specific(struct pmic_wrapper *wrp) static int pwrap_mt8135_init_soc_specific(struct pmic_wrapper *wrp)
{ {
/* enable pwrap events and pwrap bridge in AP side */ /* enable pwrap events and pwrap bridge in AP side */
@@ -995,7 +1058,6 @@ static int pwrap_mt2701_init_soc_specific(struct pmic_wrapper *wrp) @@ -995,7 +1058,6 @@ static int pwrap_mt2701_init_soc_specifi
static int pwrap_init(struct pmic_wrapper *wrp) static int pwrap_init(struct pmic_wrapper *wrp)
{ {
int ret; int ret;
@ -122,7 +120,7 @@ index 2d3a8faae124..e3398e37a7a6 100644
reset_control_reset(wrp->rstc); reset_control_reset(wrp->rstc);
if (wrp->rstc_bridge) if (wrp->rstc_bridge)
@@ -1007,10 +1069,12 @@ static int pwrap_init(struct pmic_wrapper *wrp) @@ -1007,10 +1069,12 @@ static int pwrap_init(struct pmic_wrappe
pwrap_writel(wrp, 0, PWRAP_DCM_DBC_PRD); pwrap_writel(wrp, 0, PWRAP_DCM_DBC_PRD);
} }
@ -139,7 +137,7 @@ index 2d3a8faae124..e3398e37a7a6 100644
pwrap_writel(wrp, 1, PWRAP_WRAP_EN); pwrap_writel(wrp, 1, PWRAP_WRAP_EN);
@@ -1022,45 +1086,26 @@ static int pwrap_init(struct pmic_wrapper *wrp) @@ -1022,45 +1086,26 @@ static int pwrap_init(struct pmic_wrappe
if (ret) if (ret)
return ret; return ret;
@ -201,7 +199,7 @@ index 2d3a8faae124..e3398e37a7a6 100644
if (wrp->master->type == PWRAP_MT8135) if (wrp->master->type == PWRAP_MT8135)
pwrap_writel(wrp, 0x7, PWRAP_RRARB_EN); pwrap_writel(wrp, 0x7, PWRAP_RRARB_EN);
@@ -1116,6 +1161,8 @@ static const struct regmap_config pwrap_regmap_config = { @@ -1116,6 +1161,8 @@ static const struct regmap_config pwrap_
static const struct pwrap_slv_type pmic_mt6323 = { static const struct pwrap_slv_type pmic_mt6323 = {
.dew_regs = mt6323_regs, .dew_regs = mt6323_regs,
.type = PMIC_MT6323, .type = PMIC_MT6323,
@ -210,7 +208,7 @@ index 2d3a8faae124..e3398e37a7a6 100644
.pwrap_read = pwrap_read16, .pwrap_read = pwrap_read16,
.pwrap_write = pwrap_write16, .pwrap_write = pwrap_write16,
}; };
@@ -1123,6 +1170,7 @@ static const struct pwrap_slv_type pmic_mt6323 = { @@ -1123,6 +1170,7 @@ static const struct pwrap_slv_type pmic_
static const struct pwrap_slv_type pmic_mt6380 = { static const struct pwrap_slv_type pmic_mt6380 = {
.dew_regs = NULL, .dew_regs = NULL,
.type = PMIC_MT6380, .type = PMIC_MT6380,
@ -218,7 +216,7 @@ index 2d3a8faae124..e3398e37a7a6 100644
.pwrap_read = pwrap_read32, .pwrap_read = pwrap_read32,
.pwrap_write = pwrap_write32, .pwrap_write = pwrap_write32,
}; };
@@ -1130,6 +1178,8 @@ static const struct pwrap_slv_type pmic_mt6380 = { @@ -1130,6 +1178,8 @@ static const struct pwrap_slv_type pmic_
static const struct pwrap_slv_type pmic_mt6397 = { static const struct pwrap_slv_type pmic_mt6397 = {
.dew_regs = mt6397_regs, .dew_regs = mt6397_regs,
.type = PMIC_MT6397, .type = PMIC_MT6397,
@ -227,6 +225,3 @@ index 2d3a8faae124..e3398e37a7a6 100644
.pwrap_read = pwrap_read16, .pwrap_read = pwrap_read16,
.pwrap_write = pwrap_write16, .pwrap_write = pwrap_write16,
}; };
--
2.11.0

View file

@ -16,8 +16,6 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
drivers/soc/mediatek/mtk-pmic-wrap.c | 24 +++++++++++++++++++++--- drivers/soc/mediatek/mtk-pmic-wrap.c | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-) 1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index e3398e37a7a6..45c3e44d8f40 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c --- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c +++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -507,6 +507,7 @@ struct pmic_wrapper; @@ -507,6 +507,7 @@ struct pmic_wrapper;
@ -28,7 +26,7 @@ index e3398e37a7a6..45c3e44d8f40 100644
/* Flags indicating the capability for the target slave */ /* Flags indicating the capability for the target slave */
u32 caps; u32 caps;
/* /*
@@ -1149,7 +1150,7 @@ static irqreturn_t pwrap_interrupt(int irqno, void *dev_id) @@ -1149,7 +1150,7 @@ static irqreturn_t pwrap_interrupt(int i
return IRQ_HANDLED; return IRQ_HANDLED;
} }
@ -37,7 +35,7 @@ index e3398e37a7a6..45c3e44d8f40 100644
.reg_bits = 16, .reg_bits = 16,
.val_bits = 16, .val_bits = 16,
.reg_stride = 2, .reg_stride = 2,
@@ -1158,9 +1159,19 @@ static const struct regmap_config pwrap_regmap_config = { @@ -1158,9 +1159,19 @@ static const struct regmap_config pwrap_
.max_register = 0xffff, .max_register = 0xffff,
}; };
@ -57,7 +55,7 @@ index e3398e37a7a6..45c3e44d8f40 100644
.caps = PWRAP_SLV_CAP_SPI | PWRAP_SLV_CAP_DUALIO | .caps = PWRAP_SLV_CAP_SPI | PWRAP_SLV_CAP_DUALIO |
PWRAP_SLV_CAP_SECURITY, PWRAP_SLV_CAP_SECURITY,
.pwrap_read = pwrap_read16, .pwrap_read = pwrap_read16,
@@ -1170,6 +1181,7 @@ static const struct pwrap_slv_type pmic_mt6323 = { @@ -1170,6 +1181,7 @@ static const struct pwrap_slv_type pmic_
static const struct pwrap_slv_type pmic_mt6380 = { static const struct pwrap_slv_type pmic_mt6380 = {
.dew_regs = NULL, .dew_regs = NULL,
.type = PMIC_MT6380, .type = PMIC_MT6380,
@ -65,7 +63,7 @@ index e3398e37a7a6..45c3e44d8f40 100644
.caps = 0, .caps = 0,
.pwrap_read = pwrap_read32, .pwrap_read = pwrap_read32,
.pwrap_write = pwrap_write32, .pwrap_write = pwrap_write32,
@@ -1178,6 +1190,7 @@ static const struct pwrap_slv_type pmic_mt6380 = { @@ -1178,6 +1190,7 @@ static const struct pwrap_slv_type pmic_
static const struct pwrap_slv_type pmic_mt6397 = { static const struct pwrap_slv_type pmic_mt6397 = {
.dew_regs = mt6397_regs, .dew_regs = mt6397_regs,
.type = PMIC_MT6397, .type = PMIC_MT6397,
@ -73,7 +71,7 @@ index e3398e37a7a6..45c3e44d8f40 100644
.caps = PWRAP_SLV_CAP_SPI | PWRAP_SLV_CAP_DUALIO | .caps = PWRAP_SLV_CAP_SPI | PWRAP_SLV_CAP_DUALIO |
PWRAP_SLV_CAP_SECURITY, PWRAP_SLV_CAP_SECURITY,
.pwrap_read = pwrap_read16, .pwrap_read = pwrap_read16,
@@ -1189,9 +1202,14 @@ static const struct of_device_id of_slave_match_tbl[] = { @@ -1189,9 +1202,14 @@ static const struct of_device_id of_slav
.compatible = "mediatek,mt6323", .compatible = "mediatek,mt6323",
.data = &pmic_mt6323, .data = &pmic_mt6323,
}, { }, {
@ -89,7 +87,7 @@ index e3398e37a7a6..45c3e44d8f40 100644
/* sentinel */ /* sentinel */
} }
}; };
@@ -1372,7 +1390,7 @@ static int pwrap_probe(struct platform_device *pdev) @@ -1372,7 +1390,7 @@ static int pwrap_probe(struct platform_d
if (ret) if (ret)
goto err_out2; goto err_out2;
@ -98,6 +96,3 @@ index e3398e37a7a6..45c3e44d8f40 100644
if (IS_ERR(wrp->regmap)) { if (IS_ERR(wrp->regmap)) {
ret = PTR_ERR(wrp->regmap); ret = PTR_ERR(wrp->regmap);
goto err_out2; goto err_out2;
--
2.11.0

View file

@ -17,15 +17,21 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
drivers/soc/mediatek/mtk-pmic-wrap.c | 59 ++++++++++++++++++++++-------------- drivers/soc/mediatek/mtk-pmic-wrap.c | 59 ++++++++++++++++++++++--------------
1 file changed, 37 insertions(+), 22 deletions(-) 1 file changed, 37 insertions(+), 22 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index 45c3e44d8f40..cbc3f0e82337 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c --- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c +++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -827,23 +827,44 @@ static int pwrap_init_dual_io(struct pmic_wrapper *wrp) @@ -827,23 +827,44 @@ static int pwrap_init_dual_io(struct pmi
return 0; return 0;
} }
-static int pwrap_mt8135_init_reg_clock(struct pmic_wrapper *wrp) -static int pwrap_mt8135_init_reg_clock(struct pmic_wrapper *wrp)
-{
- pwrap_writel(wrp, 0x4, PWRAP_CSHEXT);
- pwrap_writel(wrp, 0x0, PWRAP_CSHEXT_WRITE);
- pwrap_writel(wrp, 0x4, PWRAP_CSHEXT_READ);
- pwrap_writel(wrp, 0x0, PWRAP_CSLEXT_START);
- pwrap_writel(wrp, 0x0, PWRAP_CSLEXT_END);
-
- return 0;
+/* +/*
+ * pwrap_init_chip_select_ext is used to configure CS extension time for each + * pwrap_init_chip_select_ext is used to configure CS extension time for each
+ * phase during data transactions on the pwrap bus. + * phase during data transactions on the pwrap bus.
@ -33,12 +39,7 @@ index 45c3e44d8f40..cbc3f0e82337 100644
+static void pwrap_init_chip_select_ext(struct pmic_wrapper *wrp, u8 hext_write, +static void pwrap_init_chip_select_ext(struct pmic_wrapper *wrp, u8 hext_write,
+ u8 hext_read, u8 lext_start, + u8 hext_read, u8 lext_start,
+ u8 lext_end) + u8 lext_end)
{ +{
- pwrap_writel(wrp, 0x4, PWRAP_CSHEXT);
- pwrap_writel(wrp, 0x0, PWRAP_CSHEXT_WRITE);
- pwrap_writel(wrp, 0x4, PWRAP_CSHEXT_READ);
- pwrap_writel(wrp, 0x0, PWRAP_CSLEXT_START);
- pwrap_writel(wrp, 0x0, PWRAP_CSLEXT_END);
+ /* + /*
+ * After finishing a write and read transaction, extends CS high time + * After finishing a write and read transaction, extends CS high time
+ * to be at least xT of BUS CLK as hext_write and hext_read specifies + * to be at least xT of BUS CLK as hext_write and hext_read specifies
@ -46,8 +47,7 @@ index 45c3e44d8f40..cbc3f0e82337 100644
+ */ + */
+ pwrap_writel(wrp, hext_write, PWRAP_CSHEXT_WRITE); + pwrap_writel(wrp, hext_write, PWRAP_CSHEXT_WRITE);
+ pwrap_writel(wrp, hext_read, PWRAP_CSHEXT_READ); + pwrap_writel(wrp, hext_read, PWRAP_CSHEXT_READ);
+
- return 0;
+ /* + /*
+ * Extends CS low time after CSL and before CSH command to be at + * Extends CS low time after CSL and before CSH command to be at
+ * least xT of BUS CLK as lext_start and lext_end specifies + * least xT of BUS CLK as lext_start and lext_end specifies
@ -78,7 +78,7 @@ index 45c3e44d8f40..cbc3f0e82337 100644
return 0; return 0;
} }
@@ -853,20 +874,14 @@ static int pwrap_mt2701_init_reg_clock(struct pmic_wrapper *wrp) @@ -853,20 +874,14 @@ static int pwrap_mt2701_init_reg_clock(s
switch (wrp->slave->type) { switch (wrp->slave->type) {
case PMIC_MT6397: case PMIC_MT6397:
pwrap_writel(wrp, 0xc, PWRAP_RDDMY); pwrap_writel(wrp, 0xc, PWRAP_RDDMY);
@ -101,7 +101,7 @@ index 45c3e44d8f40..cbc3f0e82337 100644
break; break;
default: default:
break; break;
@@ -1235,7 +1250,7 @@ static const struct pmic_wrapper_type pwrap_mt8135 = { @@ -1235,7 +1250,7 @@ static const struct pmic_wrapper_type pw
.spi_w = PWRAP_MAN_CMD_SPI_WRITE, .spi_w = PWRAP_MAN_CMD_SPI_WRITE,
.wdt_src = PWRAP_WDT_SRC_MASK_ALL, .wdt_src = PWRAP_WDT_SRC_MASK_ALL,
.has_bridge = 1, .has_bridge = 1,
@ -110,7 +110,7 @@ index 45c3e44d8f40..cbc3f0e82337 100644
.init_soc_specific = pwrap_mt8135_init_soc_specific, .init_soc_specific = pwrap_mt8135_init_soc_specific,
}; };
@@ -1247,7 +1262,7 @@ static const struct pmic_wrapper_type pwrap_mt8173 = { @@ -1247,7 +1262,7 @@ static const struct pmic_wrapper_type pw
.spi_w = PWRAP_MAN_CMD_SPI_WRITE, .spi_w = PWRAP_MAN_CMD_SPI_WRITE,
.wdt_src = PWRAP_WDT_SRC_MASK_NO_STAUPD, .wdt_src = PWRAP_WDT_SRC_MASK_NO_STAUPD,
.has_bridge = 0, .has_bridge = 0,
@ -119,6 +119,3 @@ index 45c3e44d8f40..cbc3f0e82337 100644
.init_soc_specific = pwrap_mt8173_init_soc_specific, .init_soc_specific = pwrap_mt8173_init_soc_specific,
}; };
--
2.11.0

View file

@ -14,8 +14,6 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
drivers/soc/mediatek/mtk-pmic-wrap.c | 170 +++++++++++++++++++++++++++++++++++ drivers/soc/mediatek/mtk-pmic-wrap.c | 170 +++++++++++++++++++++++++++++++++++
1 file changed, 170 insertions(+) 1 file changed, 170 insertions(+)
diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index cbc3f0e82337..5d61d127e1d7 100644
--- a/drivers/soc/mediatek/mtk-pmic-wrap.c --- a/drivers/soc/mediatek/mtk-pmic-wrap.c
+++ b/drivers/soc/mediatek/mtk-pmic-wrap.c +++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
@@ -214,6 +214,36 @@ enum pwrap_regs { @@ -214,6 +214,36 @@ enum pwrap_regs {
@ -182,7 +180,7 @@ index cbc3f0e82337..5d61d127e1d7 100644
PWRAP_MT8135, PWRAP_MT8135,
PWRAP_MT8173, PWRAP_MT8173,
}; };
@@ -927,6 +1070,9 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp) @@ -927,6 +1070,9 @@ static int pwrap_init_cipher(struct pmic
case PWRAP_MT8173: case PWRAP_MT8173:
pwrap_writel(wrp, 1, PWRAP_CIPHER_EN); pwrap_writel(wrp, 1, PWRAP_CIPHER_EN);
break; break;
@ -192,7 +190,7 @@ index cbc3f0e82337..5d61d127e1d7 100644
} }
/* Config cipher mode @PMIC */ /* Config cipher mode @PMIC */
@@ -1071,6 +1217,15 @@ static int pwrap_mt2701_init_soc_specific(struct pmic_wrapper *wrp) @@ -1071,6 +1217,15 @@ static int pwrap_mt2701_init_soc_specifi
return 0; return 0;
} }
@ -208,7 +206,7 @@ index cbc3f0e82337..5d61d127e1d7 100644
static int pwrap_init(struct pmic_wrapper *wrp) static int pwrap_init(struct pmic_wrapper *wrp)
{ {
int ret; int ret;
@@ -1242,6 +1397,18 @@ static const struct pmic_wrapper_type pwrap_mt2701 = { @@ -1242,6 +1397,18 @@ static const struct pmic_wrapper_type pw
.init_soc_specific = pwrap_mt2701_init_soc_specific, .init_soc_specific = pwrap_mt2701_init_soc_specific,
}; };
@ -227,7 +225,7 @@ index cbc3f0e82337..5d61d127e1d7 100644
static const struct pmic_wrapper_type pwrap_mt8135 = { static const struct pmic_wrapper_type pwrap_mt8135 = {
.regs = mt8135_regs, .regs = mt8135_regs,
.type = PWRAP_MT8135, .type = PWRAP_MT8135,
@@ -1271,6 +1438,9 @@ static const struct of_device_id of_pwrap_match_tbl[] = { @@ -1271,6 +1438,9 @@ static const struct of_device_id of_pwra
.compatible = "mediatek,mt2701-pwrap", .compatible = "mediatek,mt2701-pwrap",
.data = &pwrap_mt2701, .data = &pwrap_mt2701,
}, { }, {
@ -237,6 +235,3 @@ index cbc3f0e82337..5d61d127e1d7 100644
.compatible = "mediatek,mt8135-pwrap", .compatible = "mediatek,mt8135-pwrap",
.data = &pwrap_mt8135, .data = &pwrap_mt8135,
}, { }, {
--
2.11.0

View file

@ -18,8 +18,6 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
drivers/soc/mediatek/Kconfig | 8 +++++--- drivers/soc/mediatek/Kconfig | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-) 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/soc/mediatek/Kconfig b/drivers/soc/mediatek/Kconfig
index 609bb3424c14..a7d0667338f2 100644
--- a/drivers/soc/mediatek/Kconfig --- a/drivers/soc/mediatek/Kconfig
+++ b/drivers/soc/mediatek/Kconfig +++ b/drivers/soc/mediatek/Kconfig
@@ -1,9 +1,11 @@ @@ -1,9 +1,11 @@
@ -57,6 +55,3 @@ index 609bb3424c14..a7d0667338f2 100644
driver. driver.
+ +
+endmenu +endmenu
--
2.11.0

View file

@ -14,8 +14,6 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
arch/arm64/Kconfig.platforms | 5 +++-- arch/arm64/Kconfig.platforms | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-) 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
index 6b54ee8c1262..ab69f5fce261 100644
--- a/arch/arm64/Kconfig.platforms --- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms +++ b/arch/arm64/Kconfig.platforms
@@ -91,12 +91,13 @@ config ARCH_HISI @@ -91,12 +91,13 @@ config ARCH_HISI
@ -34,6 +32,3 @@ index 6b54ee8c1262..ab69f5fce261 100644
config ARCH_MESON config ARCH_MESON
bool "Amlogic Platforms" bool "Amlogic Platforms"
--
2.11.0

View file

@ -12,8 +12,6 @@ Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/mediatek/phy-mtk-tphy.c | 39 +++++++++++++++++++++++++++++++++++++ drivers/phy/mediatek/phy-mtk-tphy.c | 39 +++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+) 1 file changed, 39 insertions(+)
diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c
index 721a2a1c97ef..402385f2562a 100644
--- a/drivers/phy/mediatek/phy-mtk-tphy.c --- a/drivers/phy/mediatek/phy-mtk-tphy.c
+++ b/drivers/phy/mediatek/phy-mtk-tphy.c +++ b/drivers/phy/mediatek/phy-mtk-tphy.c
@@ -96,9 +96,11 @@ @@ -96,9 +96,11 @@
@ -28,7 +26,7 @@ index 721a2a1c97ef..402385f2562a 100644
#define U3P_U3_CHIP_GPIO_CTLD 0x0c #define U3P_U3_CHIP_GPIO_CTLD 0x0c
#define P3C_REG_IP_SW_RST BIT(31) #define P3C_REG_IP_SW_RST BIT(31)
@@ -585,6 +587,31 @@ static void u2_phy_instance_exit(struct mtk_tphy *tphy, @@ -585,6 +587,31 @@ static void u2_phy_instance_exit(struct
} }
} }
@ -78,7 +76,7 @@ index 721a2a1c97ef..402385f2562a 100644
static struct phy *mtk_phy_xlate(struct device *dev, static struct phy *mtk_phy_xlate(struct device *dev,
struct of_phandle_args *args) struct of_phandle_args *args)
{ {
@@ -931,6 +969,7 @@ static const struct phy_ops mtk_tphy_ops = { @@ -931,6 +969,7 @@ static const struct phy_ops mtk_tphy_ops
.exit = mtk_phy_exit, .exit = mtk_phy_exit,
.power_on = mtk_phy_power_on, .power_on = mtk_phy_power_on,
.power_off = mtk_phy_power_off, .power_off = mtk_phy_power_off,
@ -86,6 +84,3 @@ index 721a2a1c97ef..402385f2562a 100644
.owner = THIS_MODULE, .owner = THIS_MODULE,
}; };
--
2.11.0

View file

@ -14,11 +14,9 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-mtk.c | 7 +------ drivers/usb/host/xhci-mtk.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-) 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
index 8fb60657ed4f..c197a6d9e157 100644
--- a/drivers/usb/host/xhci-mtk.c --- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c +++ b/drivers/usb/host/xhci-mtk.c
@@ -606,15 +606,10 @@ static int xhci_mtk_probe(struct platform_device *pdev) @@ -606,15 +606,10 @@ static int xhci_mtk_probe(struct platfor
} }
/* Initialize dma_mask and coherent_dma_mask to 32-bits */ /* Initialize dma_mask and coherent_dma_mask to 32-bits */
@ -35,6 +33,3 @@ index 8fb60657ed4f..c197a6d9e157 100644
hcd = usb_create_hcd(driver, dev, dev_name(dev)); hcd = usb_create_hcd(driver, dev, dev_name(dev));
if (!hcd) { if (!hcd) {
ret = -ENOMEM; ret = -ENOMEM;
--
2.11.0

View file

@ -15,11 +15,9 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-mtk.c | 3 --- drivers/usb/host/xhci-mtk.c | 3 ---
2 files changed, 2 insertions(+), 4 deletions(-) 2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/host/xhci-mtk-sch.c b/drivers/usb/host/xhci-mtk-sch.c
index 6e7ddf6cafae..bfc51bc902b8 100644
--- a/drivers/usb/host/xhci-mtk-sch.c --- a/drivers/usb/host/xhci-mtk-sch.c
+++ b/drivers/usb/host/xhci-mtk-sch.c +++ b/drivers/usb/host/xhci-mtk-sch.c
@@ -287,12 +287,13 @@ static bool need_bw_sch(struct usb_host_endpoint *ep, @@ -287,12 +287,13 @@ static bool need_bw_sch(struct usb_host_
int xhci_mtk_sch_init(struct xhci_hcd_mtk *mtk) int xhci_mtk_sch_init(struct xhci_hcd_mtk *mtk)
{ {
@ -34,11 +32,9 @@ index 6e7ddf6cafae..bfc51bc902b8 100644
sch_array = kcalloc(num_usb_bus, sizeof(*sch_array), GFP_KERNEL); sch_array = kcalloc(num_usb_bus, sizeof(*sch_array), GFP_KERNEL);
if (sch_array == NULL) if (sch_array == NULL)
diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
index c197a6d9e157..9502ca408f01 100644
--- a/drivers/usb/host/xhci-mtk.c --- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c +++ b/drivers/usb/host/xhci-mtk.c
@@ -492,7 +492,6 @@ static void xhci_mtk_quirks(struct device *dev, struct xhci_hcd *xhci) @@ -492,7 +492,6 @@ static void xhci_mtk_quirks(struct devic
/* called during probe() after chip reset completes */ /* called during probe() after chip reset completes */
static int xhci_mtk_setup(struct usb_hcd *hcd) static int xhci_mtk_setup(struct usb_hcd *hcd)
{ {
@ -46,7 +42,7 @@ index c197a6d9e157..9502ca408f01 100644
struct xhci_hcd_mtk *mtk = hcd_to_mtk(hcd); struct xhci_hcd_mtk *mtk = hcd_to_mtk(hcd);
int ret; int ret;
@@ -507,8 +506,6 @@ static int xhci_mtk_setup(struct usb_hcd *hcd) @@ -507,8 +506,6 @@ static int xhci_mtk_setup(struct usb_hcd
return ret; return ret;
if (usb_hcd_is_primary_hcd(hcd)) { if (usb_hcd_is_primary_hcd(hcd)) {
@ -55,6 +51,3 @@ index c197a6d9e157..9502ca408f01 100644
ret = xhci_mtk_sch_init(mtk); ret = xhci_mtk_sch_init(mtk);
if (ret) if (ret)
return ret; return ret;
--
2.11.0

View file

@ -14,8 +14,6 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-mtk.c | 4 ++++ drivers/usb/host/xhci-mtk.c | 4 ++++
1 file changed, 4 insertions(+) 1 file changed, 4 insertions(+)
diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
index 9502ca408f01..7a92bb782e5c 100644
--- a/drivers/usb/host/xhci-mtk.c --- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c +++ b/drivers/usb/host/xhci-mtk.c
@@ -43,6 +43,7 @@ @@ -43,6 +43,7 @@
@ -26,7 +24,7 @@ index 9502ca408f01..7a92bb782e5c 100644
#define STS1_XHCI_RST BIT(11) #define STS1_XHCI_RST BIT(11)
#define STS1_SYS125_RST BIT(10) #define STS1_SYS125_RST BIT(10)
#define STS1_REF_RST BIT(8) #define STS1_REF_RST BIT(8)
@@ -125,6 +126,9 @@ static int xhci_mtk_host_enable(struct xhci_hcd_mtk *mtk) @@ -125,6 +126,9 @@ static int xhci_mtk_host_enable(struct x
check_val = STS1_SYSPLL_STABLE | STS1_REF_RST | check_val = STS1_SYSPLL_STABLE | STS1_REF_RST |
STS1_SYS125_RST | STS1_XHCI_RST; STS1_SYS125_RST | STS1_XHCI_RST;
@ -36,6 +34,3 @@ index 9502ca408f01..7a92bb782e5c 100644
ret = readl_poll_timeout(&ippc->ip_pw_sts1, value, ret = readl_poll_timeout(&ippc->ip_pw_sts1, value,
(check_val == (value & check_val)), 100, 20000); (check_val == (value & check_val)), 100, 20000);
if (ret) { if (ret) {
--
2.11.0

View file

@ -16,11 +16,9 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-mtk.h | 1 + drivers/usb/host/xhci-mtk.h | 1 +
2 files changed, 16 insertions(+), 3 deletions(-) 2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
index 7a92bb782e5c..97ba51e4e149 100644
--- a/drivers/usb/host/xhci-mtk.c --- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c +++ b/drivers/usb/host/xhci-mtk.c
@@ -92,6 +92,7 @@ static int xhci_mtk_host_enable(struct xhci_hcd_mtk *mtk) @@ -92,6 +92,7 @@ static int xhci_mtk_host_enable(struct x
{ {
struct mu3c_ippc_regs __iomem *ippc = mtk->ippc_regs; struct mu3c_ippc_regs __iomem *ippc = mtk->ippc_regs;
u32 value, check_val; u32 value, check_val;
@ -28,7 +26,7 @@ index 7a92bb782e5c..97ba51e4e149 100644
int ret; int ret;
int i; int i;
@@ -103,8 +104,13 @@ static int xhci_mtk_host_enable(struct xhci_hcd_mtk *mtk) @@ -103,8 +104,13 @@ static int xhci_mtk_host_enable(struct x
value &= ~CTRL1_IP_HOST_PDN; value &= ~CTRL1_IP_HOST_PDN;
writel(value, &ippc->ip_pw_ctr1); writel(value, &ippc->ip_pw_ctr1);
@ -43,7 +41,7 @@ index 7a92bb782e5c..97ba51e4e149 100644
value = readl(&ippc->u3_ctrl_p[i]); value = readl(&ippc->u3_ctrl_p[i]);
value &= ~(CTRL_U3_PORT_PDN | CTRL_U3_PORT_DIS); value &= ~(CTRL_U3_PORT_PDN | CTRL_U3_PORT_DIS);
value |= CTRL_U3_PORT_HOST_SEL; value |= CTRL_U3_PORT_HOST_SEL;
@@ -126,7 +132,7 @@ static int xhci_mtk_host_enable(struct xhci_hcd_mtk *mtk) @@ -126,7 +132,7 @@ static int xhci_mtk_host_enable(struct x
check_val = STS1_SYSPLL_STABLE | STS1_REF_RST | check_val = STS1_SYSPLL_STABLE | STS1_REF_RST |
STS1_SYS125_RST | STS1_XHCI_RST; STS1_SYS125_RST | STS1_XHCI_RST;
@ -52,7 +50,7 @@ index 7a92bb782e5c..97ba51e4e149 100644
check_val |= STS1_U3_MAC_RST; check_val |= STS1_U3_MAC_RST;
ret = readl_poll_timeout(&ippc->ip_pw_sts1, value, ret = readl_poll_timeout(&ippc->ip_pw_sts1, value,
@@ -149,8 +155,11 @@ static int xhci_mtk_host_disable(struct xhci_hcd_mtk *mtk) @@ -149,8 +155,11 @@ static int xhci_mtk_host_disable(struct
if (!mtk->has_ippc) if (!mtk->has_ippc)
return 0; return 0;
@ -65,7 +63,7 @@ index 7a92bb782e5c..97ba51e4e149 100644
value = readl(&ippc->u3_ctrl_p[i]); value = readl(&ippc->u3_ctrl_p[i]);
value |= CTRL_U3_PORT_PDN; value |= CTRL_U3_PORT_PDN;
writel(value, &ippc->u3_ctrl_p[i]); writel(value, &ippc->u3_ctrl_p[i]);
@@ -573,6 +582,9 @@ static int xhci_mtk_probe(struct platform_device *pdev) @@ -573,6 +582,9 @@ static int xhci_mtk_probe(struct platfor
} }
mtk->lpm_support = of_property_read_bool(node, "usb3-lpm-capable"); mtk->lpm_support = of_property_read_bool(node, "usb3-lpm-capable");
@ -75,8 +73,6 @@ index 7a92bb782e5c..97ba51e4e149 100644
ret = usb_wakeup_of_property_parse(mtk, node); ret = usb_wakeup_of_property_parse(mtk, node);
if (ret) if (ret)
diff --git a/drivers/usb/host/xhci-mtk.h b/drivers/usb/host/xhci-mtk.h
index 3aa5e1d25064..db55a12f1585 100644
--- a/drivers/usb/host/xhci-mtk.h --- a/drivers/usb/host/xhci-mtk.h
+++ b/drivers/usb/host/xhci-mtk.h +++ b/drivers/usb/host/xhci-mtk.h
@@ -121,6 +121,7 @@ struct xhci_hcd_mtk { @@ -121,6 +121,7 @@ struct xhci_hcd_mtk {
@ -87,6 +83,3 @@ index 3aa5e1d25064..db55a12f1585 100644
struct regulator *vusb33; struct regulator *vusb33;
struct regulator *vbus; struct regulator *vbus;
struct clk *sys_clk; /* sys and mac clock */ struct clk *sys_clk; /* sys and mac clock */
--
2.11.0

View file

@ -15,11 +15,9 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-mtk.h | 2 -- drivers/usb/host/xhci-mtk.h | 2 --
2 files changed, 35 deletions(-) 2 files changed, 35 deletions(-)
diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
index 97ba51e4e149..d60463c07c54 100644
--- a/drivers/usb/host/xhci-mtk.c --- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c +++ b/drivers/usb/host/xhci-mtk.c
@@ -237,25 +237,8 @@ static int xhci_mtk_clks_enable(struct xhci_hcd_mtk *mtk) @@ -237,25 +237,8 @@ static int xhci_mtk_clks_enable(struct x
goto sys_clk_err; goto sys_clk_err;
} }
@ -45,7 +43,7 @@ index 97ba51e4e149..d60463c07c54 100644
sys_clk_err: sys_clk_err:
clk_disable_unprepare(mtk->ref_clk); clk_disable_unprepare(mtk->ref_clk);
ref_clk_err: ref_clk_err:
@@ -264,10 +247,6 @@ static int xhci_mtk_clks_enable(struct xhci_hcd_mtk *mtk) @@ -264,10 +247,6 @@ ref_clk_err:
static void xhci_mtk_clks_disable(struct xhci_hcd_mtk *mtk) static void xhci_mtk_clks_disable(struct xhci_hcd_mtk *mtk)
{ {
@ -56,7 +54,7 @@ index 97ba51e4e149..d60463c07c54 100644
clk_disable_unprepare(mtk->sys_clk); clk_disable_unprepare(mtk->sys_clk);
clk_disable_unprepare(mtk->ref_clk); clk_disable_unprepare(mtk->ref_clk);
} }
@@ -371,18 +350,6 @@ static int usb_wakeup_of_property_parse(struct xhci_hcd_mtk *mtk, @@ -371,18 +350,6 @@ static int usb_wakeup_of_property_parse(
if (!mtk->wakeup_src) if (!mtk->wakeup_src)
return 0; return 0;
@ -75,8 +73,6 @@ index 97ba51e4e149..d60463c07c54 100644
mtk->pericfg = syscon_regmap_lookup_by_phandle(dn, mtk->pericfg = syscon_regmap_lookup_by_phandle(dn,
"mediatek,syscon-wakeup"); "mediatek,syscon-wakeup");
if (IS_ERR(mtk->pericfg)) { if (IS_ERR(mtk->pericfg)) {
diff --git a/drivers/usb/host/xhci-mtk.h b/drivers/usb/host/xhci-mtk.h
index db55a12f1585..67783a7af509 100644
--- a/drivers/usb/host/xhci-mtk.h --- a/drivers/usb/host/xhci-mtk.h
+++ b/drivers/usb/host/xhci-mtk.h +++ b/drivers/usb/host/xhci-mtk.h
@@ -126,8 +126,6 @@ struct xhci_hcd_mtk { @@ -126,8 +126,6 @@ struct xhci_hcd_mtk {
@ -88,6 +84,3 @@ index db55a12f1585..67783a7af509 100644
struct regmap *pericfg; struct regmap *pericfg;
struct phy **phys; struct phy **phys;
int num_phys; int num_phys;
--
2.11.0

View file

@ -15,11 +15,9 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-mtk.h | 2 ++ drivers/usb/host/xhci-mtk.h | 2 ++
2 files changed, 62 insertions(+), 19 deletions(-) 2 files changed, 62 insertions(+), 19 deletions(-)
diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
index d60463c07c54..e5caabe7eebe 100644
--- a/drivers/usb/host/xhci-mtk.c --- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c +++ b/drivers/usb/host/xhci-mtk.c
@@ -221,6 +221,44 @@ static int xhci_mtk_ssusb_config(struct xhci_hcd_mtk *mtk) @@ -221,6 +221,44 @@ static int xhci_mtk_ssusb_config(struct
return xhci_mtk_host_enable(mtk); return xhci_mtk_host_enable(mtk);
} }
@ -64,7 +62,7 @@ index d60463c07c54..e5caabe7eebe 100644
static int xhci_mtk_clks_enable(struct xhci_hcd_mtk *mtk) static int xhci_mtk_clks_enable(struct xhci_hcd_mtk *mtk)
{ {
int ret; int ret;
@@ -237,16 +275,34 @@ static int xhci_mtk_clks_enable(struct xhci_hcd_mtk *mtk) @@ -237,16 +275,34 @@ static int xhci_mtk_clks_enable(struct x
goto sys_clk_err; goto sys_clk_err;
} }
@ -100,7 +98,7 @@ index d60463c07c54..e5caabe7eebe 100644
clk_disable_unprepare(mtk->sys_clk); clk_disable_unprepare(mtk->sys_clk);
clk_disable_unprepare(mtk->ref_clk); clk_disable_unprepare(mtk->ref_clk);
} }
@@ -529,24 +585,9 @@ static int xhci_mtk_probe(struct platform_device *pdev) @@ -529,24 +585,9 @@ static int xhci_mtk_probe(struct platfor
return PTR_ERR(mtk->vusb33); return PTR_ERR(mtk->vusb33);
} }
@ -128,8 +126,6 @@ index d60463c07c54..e5caabe7eebe 100644
mtk->lpm_support = of_property_read_bool(node, "usb3-lpm-capable"); mtk->lpm_support = of_property_read_bool(node, "usb3-lpm-capable");
/* optional property, ignore the error if it does not exist */ /* optional property, ignore the error if it does not exist */
diff --git a/drivers/usb/host/xhci-mtk.h b/drivers/usb/host/xhci-mtk.h
index 67783a7af509..45ff5c67efb5 100644
--- a/drivers/usb/host/xhci-mtk.h --- a/drivers/usb/host/xhci-mtk.h
+++ b/drivers/usb/host/xhci-mtk.h +++ b/drivers/usb/host/xhci-mtk.h
@@ -126,6 +126,8 @@ struct xhci_hcd_mtk { @@ -126,6 +126,8 @@ struct xhci_hcd_mtk {
@ -141,6 +137,3 @@ index 67783a7af509..45ff5c67efb5 100644
struct regmap *pericfg; struct regmap *pericfg;
struct phy **phys; struct phy **phys;
int num_phys; int num_phys;
--
2.11.0

View file

@ -13,8 +13,6 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/Kconfig | 4 ++-- drivers/usb/host/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-) 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index fa5692dec832..bc09a2e4faeb 100644
--- a/drivers/usb/host/Kconfig --- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig
@@ -45,12 +45,12 @@ config USB_XHCI_PLATFORM @@ -45,12 +45,12 @@ config USB_XHCI_PLATFORM
@ -32,6 +30,3 @@ index fa5692dec832..bc09a2e4faeb 100644
If unsure, say N. If unsure, say N.
config USB_XHCI_MVEBU config USB_XHCI_MVEBU
--
2.11.0

View file

@ -12,8 +12,6 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt | 2 ++ Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt | 2 ++
1 file changed, 2 insertions(+) 1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
index 5611a2e4ddf0..2d9b459bd890 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt --- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt +++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
@@ -38,6 +38,8 @@ Optional properties: @@ -38,6 +38,8 @@ Optional properties:
@ -25,6 +23,3 @@ index 5611a2e4ddf0..2d9b459bd890 100644
- vbus-supply : reference to the VBUS regulator; - vbus-supply : reference to the VBUS regulator;
- usb3-lpm-capable : supports USB3.0 LPM - usb3-lpm-capable : supports USB3.0 LPM
- pinctrl-names : a pinctrl state named "default" must be defined - pinctrl-names : a pinctrl state named "default" must be defined
--
2.11.0

View file

@ -15,8 +15,6 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
.../devicetree/bindings/usb/mediatek,mtk-xhci.txt | 18 ++++++++---------- .../devicetree/bindings/usb/mediatek,mtk-xhci.txt | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-) 1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
index 2d9b459bd890..30595964876a 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt --- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt +++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
@@ -26,10 +26,11 @@ Required properties: @@ -26,10 +26,11 @@ Required properties:
@ -58,6 +56,3 @@ index 2d9b459bd890..30595964876a 100644
Optional properties: Optional properties:
- vbus-supply : reference to the VBUS regulator; - vbus-supply : reference to the VBUS regulator;
--
2.11.0

View file

@ -15,8 +15,6 @@ Signed-off-by: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>
Documentation/devicetree/bindings/mtd/mtk-quadspi.txt | 15 +++++++++------ Documentation/devicetree/bindings/mtd/mtk-quadspi.txt | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-) 1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/mtd/mtk-quadspi.txt b/Documentation/devicetree/bindings/mtd/mtk-quadspi.txt
index 840f9405dcf0..56d3668e2c50 100644
--- a/Documentation/devicetree/bindings/mtd/mtk-quadspi.txt --- a/Documentation/devicetree/bindings/mtd/mtk-quadspi.txt
+++ b/Documentation/devicetree/bindings/mtd/mtk-quadspi.txt +++ b/Documentation/devicetree/bindings/mtd/mtk-quadspi.txt
@@ -1,13 +1,16 @@ @@ -1,13 +1,16 @@
@ -42,6 +40,3 @@ index 840f9405dcf0..56d3668e2c50 100644
- reg: physical base address and length of the controller's register - reg: physical base address and length of the controller's register
- clocks: the phandle of the clocks needed by the nor controller - clocks: the phandle of the clocks needed by the nor controller
- clock-names: the names of the clocks - clock-names: the names of the clocks
--
2.11.0

View file

@ -13,11 +13,9 @@ Signed-off-by: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>
drivers/mtd/spi-nor/mtk-quadspi.c | 70 ++++++++++++++++++++++++++++++++------- drivers/mtd/spi-nor/mtk-quadspi.c | 70 ++++++++++++++++++++++++++++++++-------
1 file changed, 58 insertions(+), 12 deletions(-) 1 file changed, 58 insertions(+), 12 deletions(-)
diff --git a/drivers/mtd/spi-nor/mtk-quadspi.c b/drivers/mtd/spi-nor/mtk-quadspi.c
index c258c7adf1c5..abe455ccd68b 100644
--- a/drivers/mtd/spi-nor/mtk-quadspi.c --- a/drivers/mtd/spi-nor/mtk-quadspi.c
+++ b/drivers/mtd/spi-nor/mtk-quadspi.c +++ b/drivers/mtd/spi-nor/mtk-quadspi.c
@@ -404,6 +404,29 @@ static int mt8173_nor_write_reg(struct spi_nor *nor, u8 opcode, u8 *buf, @@ -404,6 +404,29 @@ static int mt8173_nor_write_reg(struct s
return ret; return ret;
} }
@ -47,7 +45,7 @@ index c258c7adf1c5..abe455ccd68b 100644
static int mtk_nor_init(struct mt8173_nor *mt8173_nor, static int mtk_nor_init(struct mt8173_nor *mt8173_nor,
struct device_node *flash_node) struct device_node *flash_node)
{ {
@@ -468,15 +491,11 @@ static int mtk_nor_drv_probe(struct platform_device *pdev) @@ -468,15 +491,11 @@ static int mtk_nor_drv_probe(struct plat
return PTR_ERR(mt8173_nor->nor_clk); return PTR_ERR(mt8173_nor->nor_clk);
mt8173_nor->dev = &pdev->dev; mt8173_nor->dev = &pdev->dev;
@ -65,7 +63,7 @@ index c258c7adf1c5..abe455ccd68b 100644
/* only support one attached flash */ /* only support one attached flash */
flash_np = of_get_next_available_child(pdev->dev.of_node, NULL); flash_np = of_get_next_available_child(pdev->dev.of_node, NULL);
if (!flash_np) { if (!flash_np) {
@@ -487,10 +506,9 @@ static int mtk_nor_drv_probe(struct platform_device *pdev) @@ -487,10 +506,9 @@ static int mtk_nor_drv_probe(struct plat
ret = mtk_nor_init(mt8173_nor, flash_np); ret = mtk_nor_init(mt8173_nor, flash_np);
nor_free: nor_free:
@ -79,7 +77,7 @@ index c258c7adf1c5..abe455ccd68b 100644
return ret; return ret;
} }
@@ -498,11 +516,38 @@ static int mtk_nor_drv_remove(struct platform_device *pdev) @@ -498,11 +516,38 @@ static int mtk_nor_drv_remove(struct pla
{ {
struct mt8173_nor *mt8173_nor = platform_get_drvdata(pdev); struct mt8173_nor *mt8173_nor = platform_get_drvdata(pdev);
@ -120,7 +118,7 @@ index c258c7adf1c5..abe455ccd68b 100644
static const struct of_device_id mtk_nor_of_ids[] = { static const struct of_device_id mtk_nor_of_ids[] = {
{ .compatible = "mediatek,mt8173-nor"}, { .compatible = "mediatek,mt8173-nor"},
{ /* sentinel */ } { /* sentinel */ }
@@ -514,6 +559,7 @@ static struct platform_driver mtk_nor_driver = { @@ -514,6 +559,7 @@ static struct platform_driver mtk_nor_dr
.remove = mtk_nor_drv_remove, .remove = mtk_nor_drv_remove,
.driver = { .driver = {
.name = "mtk-nor", .name = "mtk-nor",
@ -128,6 +126,3 @@ index c258c7adf1c5..abe455ccd68b 100644
.of_match_table = mtk_nor_of_ids, .of_match_table = mtk_nor_of_ids,
}, },
}; };
--
2.11.0

View file

@ -15,9 +15,6 @@ Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
1 file changed, 21 insertions(+) 1 file changed, 21 insertions(+)
create mode 100644 Documentation/devicetree/bindings/rtc/rtc-mt7622.txt create mode 100644 Documentation/devicetree/bindings/rtc/rtc-mt7622.txt
diff --git a/Documentation/devicetree/bindings/rtc/rtc-mt7622.txt b/Documentation/devicetree/bindings/rtc/rtc-mt7622.txt
new file mode 100644
index 000000000000..09fe8f51476f
--- /dev/null --- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/rtc-mt7622.txt +++ b/Documentation/devicetree/bindings/rtc/rtc-mt7622.txt
@@ -0,0 +1,21 @@ @@ -0,0 +1,21 @@
@ -42,6 +39,3 @@ index 000000000000..09fe8f51476f
+ clocks = <&topckgen CLK_TOP_RTC>; + clocks = <&topckgen CLK_TOP_RTC>;
+ clock-names = "rtc"; + clock-names = "rtc";
+}; +};
--
2.11.0

View file

@ -15,8 +15,6 @@ Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
3 files changed, 433 insertions(+) 3 files changed, 433 insertions(+)
create mode 100644 drivers/rtc/rtc-mt7622.c create mode 100644 drivers/rtc/rtc-mt7622.c
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index e0e58f3b1420..322752ebc5a7 100644
--- a/drivers/rtc/Kconfig --- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig
@@ -1715,6 +1715,16 @@ config RTC_DRV_MT6397 @@ -1715,6 +1715,16 @@ config RTC_DRV_MT6397
@ -36,11 +34,9 @@ index e0e58f3b1420..322752ebc5a7 100644
config RTC_DRV_XGENE config RTC_DRV_XGENE
tristate "APM X-Gene RTC" tristate "APM X-Gene RTC"
depends on HAS_IOMEM depends on HAS_IOMEM
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 7230014c92af..5ec891a81f4f 100644
--- a/drivers/rtc/Makefile --- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile +++ b/drivers/rtc/Makefile
@@ -102,6 +102,7 @@ obj-$(CONFIG_RTC_DRV_MPC5121) += rtc-mpc5121.o @@ -103,6 +103,7 @@ obj-$(CONFIG_RTC_DRV_MPC5121) += rtc-mpc
obj-$(CONFIG_RTC_DRV_VRTC) += rtc-mrst.o obj-$(CONFIG_RTC_DRV_VRTC) += rtc-mrst.o
obj-$(CONFIG_RTC_DRV_MSM6242) += rtc-msm6242.o obj-$(CONFIG_RTC_DRV_MSM6242) += rtc-msm6242.o
obj-$(CONFIG_RTC_DRV_MT6397) += rtc-mt6397.o obj-$(CONFIG_RTC_DRV_MT6397) += rtc-mt6397.o
@ -48,9 +44,6 @@ index 7230014c92af..5ec891a81f4f 100644
obj-$(CONFIG_RTC_DRV_MV) += rtc-mv.o obj-$(CONFIG_RTC_DRV_MV) += rtc-mv.o
obj-$(CONFIG_RTC_DRV_MXC) += rtc-mxc.o obj-$(CONFIG_RTC_DRV_MXC) += rtc-mxc.o
obj-$(CONFIG_RTC_DRV_NUC900) += rtc-nuc900.o obj-$(CONFIG_RTC_DRV_NUC900) += rtc-nuc900.o
diff --git a/drivers/rtc/rtc-mt7622.c b/drivers/rtc/rtc-mt7622.c
new file mode 100644
index 000000000000..d79b9ae4d237
--- /dev/null --- /dev/null
+++ b/drivers/rtc/rtc-mt7622.c +++ b/drivers/rtc/rtc-mt7622.c
@@ -0,0 +1,422 @@ @@ -0,0 +1,422 @@
@ -476,6 +469,3 @@ index 000000000000..d79b9ae4d237
+MODULE_DESCRIPTION("MediaTek SoC based RTC Driver"); +MODULE_DESCRIPTION("MediaTek SoC based RTC Driver");
+MODULE_AUTHOR("Sean Wang <sean.wang@mediatek.com>"); +MODULE_AUTHOR("Sean Wang <sean.wang@mediatek.com>");
+MODULE_LICENSE("GPL"); +MODULE_LICENSE("GPL");
--
2.11.0

View file

@ -16,8 +16,6 @@ Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/Kconfig | 8 ++++---- drivers/rtc/Kconfig | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-) 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 322752ebc5a7..616fe53c788e 100644
--- a/drivers/rtc/Kconfig --- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig
@@ -1706,14 +1706,14 @@ config RTC_DRV_MOXART @@ -1706,14 +1706,14 @@ config RTC_DRV_MOXART
@ -39,6 +37,3 @@ index 322752ebc5a7..616fe53c788e 100644
config RTC_DRV_MT7622 config RTC_DRV_MT7622
tristate "MediaTek SoC based RTC" tristate "MediaTek SoC based RTC"
--
2.11.0

View file

@ -18,11 +18,9 @@ Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/Makefile | 2 +- drivers/mtd/nand/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
index ade5fc4c3819..57f4cdedf137 100644
--- a/drivers/mtd/nand/Makefile --- a/drivers/mtd/nand/Makefile
+++ b/drivers/mtd/nand/Makefile +++ b/drivers/mtd/nand/Makefile
@@ -58,7 +58,7 @@ obj-$(CONFIG_MTD_NAND_SUNXI) += sunxi_nand.o @@ -59,7 +59,7 @@ obj-$(CONFIG_MTD_NAND_SUNXI) += sunxi_n
obj-$(CONFIG_MTD_NAND_HISI504) += hisi504_nand.o obj-$(CONFIG_MTD_NAND_HISI504) += hisi504_nand.o
obj-$(CONFIG_MTD_NAND_BRCMNAND) += brcmnand/ obj-$(CONFIG_MTD_NAND_BRCMNAND) += brcmnand/
obj-$(CONFIG_MTD_NAND_QCOM) += qcom_nandc.o obj-$(CONFIG_MTD_NAND_QCOM) += qcom_nandc.o
@ -31,6 +29,3 @@ index ade5fc4c3819..57f4cdedf137 100644
nand-objs := nand_base.o nand_bbt.o nand_timings.o nand_ids.o nand-objs := nand_base.o nand_bbt.o nand_timings.o nand_ids.o
nand-objs += nand_amd.o nand-objs += nand_amd.o
--
2.11.0

View file

@ -23,11 +23,9 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Documentation/devicetree/bindings/mmc/mtk-sd.txt | 18 +++++++++++++++--- Documentation/devicetree/bindings/mmc/mtk-sd.txt | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-) 1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.txt b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
index 4182ea36ca5b..72d2a734ab85 100644
--- a/Documentation/devicetree/bindings/mmc/mtk-sd.txt --- a/Documentation/devicetree/bindings/mmc/mtk-sd.txt
+++ b/Documentation/devicetree/bindings/mmc/mtk-sd.txt +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
@@ -7,10 +7,18 @@ This file documents differences between the core properties in mmc.txt @@ -7,10 +7,18 @@ This file documents differences between
and the properties used by the msdc driver. and the properties used by the msdc driver.
Required properties: Required properties:
@ -60,6 +58,3 @@ index 4182ea36ca5b..72d2a734ab85 100644
Examples: Examples:
mmc0: mmc@11230000 { mmc0: mmc@11230000 {
--
2.11.0

View file

@ -14,8 +14,6 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mtk-sd.c | 82 +++++++++++++++++++++++++++++++++++++++-------- drivers/mmc/host/mtk-sd.c | 82 +++++++++++++++++++++++++++++++++++++++--------
1 file changed, 69 insertions(+), 13 deletions(-) 1 file changed, 69 insertions(+), 13 deletions(-)
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 267f7ab08420..643c795f1bdd 100644
--- 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
@@ -95,6 +95,9 @@ @@ -95,6 +95,9 @@
@ -79,7 +77,7 @@ index 267f7ab08420..643c795f1bdd 100644
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_host *host, u32 ns, u32 clks) @@ -509,7 +542,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;
@ -93,7 +91,7 @@ index 267f7ab08420..643c795f1bdd 100644
/*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_host *host, unsigned char timing, u32 hz) @@ -548,7 +586,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);
@ -106,7 +104,7 @@ index 267f7ab08420..643c795f1bdd 100644
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_host *host, unsigned char timing, u32 hz) @@ -568,8 +610,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)) {
@ -121,7 +119,7 @@ index 267f7ab08420..643c795f1bdd 100644
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_host *host, unsigned char timing, u32 hz) @@ -587,8 +633,15 @@ static void msdc_set_mclk(struct msdc_ho
sclk = (host->src_clk_freq >> 2) / div; sclk = (host->src_clk_freq >> 2) / div;
} }
} }
@ -139,7 +137,7 @@ index 267f7ab08420..643c795f1bdd 100644
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 platform_device *pdev) @@ -1617,12 +1670,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;
@ -157,7 +155,7 @@ index 267f7ab08420..643c795f1bdd 100644
/* 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 platform_device *pdev) @@ -1686,11 +1744,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;
@ -174,7 +172,7 @@ index 267f7ab08420..643c795f1bdd 100644
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_pm_ops = { @@ -1839,12 +1901,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)
}; };
@ -187,6 +185,3 @@ index 267f7ab08420..643c795f1bdd 100644
static struct platform_driver mt_msdc_driver = { static struct platform_driver mt_msdc_driver = {
.probe = msdc_drv_probe, .probe = msdc_drv_probe,
.remove = msdc_drv_remove, .remove = msdc_drv_remove,
--
2.11.0

View file

@ -29,8 +29,6 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,mcucfg.txt create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,mcucfg.txt
create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,mfgcfg.txt create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,mfgcfg.txt
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt
index cd977db7630c..19fc116346d6 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt
@@ -7,6 +7,7 @@ Required Properties: @@ -7,6 +7,7 @@ Required Properties:
@ -41,8 +39,6 @@ index cd977db7630c..19fc116346d6 100644
- "mediatek,mt6797-apmixedsys" - "mediatek,mt6797-apmixedsys"
- "mediatek,mt8135-apmixedsys" - "mediatek,mt8135-apmixedsys"
- "mediatek,mt8173-apmixedsys" - "mediatek,mt8173-apmixedsys"
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,bdpsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,bdpsys.txt
index 4137196dd686..4010e37c53a0 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,bdpsys.txt --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,bdpsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,bdpsys.txt +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,bdpsys.txt
@@ -7,6 +7,7 @@ Required Properties: @@ -7,6 +7,7 @@ Required Properties:
@ -53,8 +49,6 @@ index 4137196dd686..4010e37c53a0 100644
- #clock-cells: Must be 1 - #clock-cells: Must be 1
The bdpsys controller uses the common clk binding from The bdpsys controller uses the common clk binding from
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,imgsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,imgsys.txt
index 047b11ae5f45..868bd51a98be 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,imgsys.txt --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,imgsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,imgsys.txt +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,imgsys.txt
@@ -7,6 +7,7 @@ Required Properties: @@ -7,6 +7,7 @@ Required Properties:
@ -65,8 +59,6 @@ index 047b11ae5f45..868bd51a98be 100644
- "mediatek,mt6797-imgsys", "syscon" - "mediatek,mt6797-imgsys", "syscon"
- "mediatek,mt8173-imgsys", "syscon" - "mediatek,mt8173-imgsys", "syscon"
- #clock-cells: Must be 1 - #clock-cells: Must be 1
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt
index 58d58e2006b8..a3430cd96d0f 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt
@@ -8,6 +8,7 @@ Required Properties: @@ -8,6 +8,7 @@ Required Properties:
@ -77,9 +69,6 @@ index 58d58e2006b8..a3430cd96d0f 100644
- "mediatek,mt6797-infracfg", "syscon" - "mediatek,mt6797-infracfg", "syscon"
- "mediatek,mt8135-infracfg", "syscon" - "mediatek,mt8135-infracfg", "syscon"
- "mediatek,mt8173-infracfg", "syscon" - "mediatek,mt8173-infracfg", "syscon"
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,jpgdecsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,jpgdecsys.txt
new file mode 100644
index 000000000000..2df799cd06a7
--- /dev/null --- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,jpgdecsys.txt +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,jpgdecsys.txt
@@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
@ -105,9 +94,6 @@ index 000000000000..2df799cd06a7
+ reg = <0 0x19000000 0 0x1000>; + reg = <0 0x19000000 0 0x1000>;
+ #clock-cells = <1>; + #clock-cells = <1>;
+}; +};
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mcucfg.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mcucfg.txt
new file mode 100644
index 000000000000..b8fb03f3613e
--- /dev/null --- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mcucfg.txt +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mcucfg.txt
@@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
@ -133,9 +119,6 @@ index 000000000000..b8fb03f3613e
+ reg = <0 0x10220000 0 0x1000>; + reg = <0 0x10220000 0 0x1000>;
+ #clock-cells = <1>; + #clock-cells = <1>;
+}; +};
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mfgcfg.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mfgcfg.txt
new file mode 100644
index 000000000000..859e67b416d5
--- /dev/null --- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mfgcfg.txt +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mfgcfg.txt
@@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
@ -161,8 +144,6 @@ index 000000000000..859e67b416d5
+ reg = <0 0x13000000 0 0x1000>; + reg = <0 0x13000000 0 0x1000>;
+ #clock-cells = <1>; + #clock-cells = <1>;
+}; +};
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
index 70529e0b58e9..4eb8bbe15c01 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
@@ -7,6 +7,7 @@ Required Properties: @@ -7,6 +7,7 @@ Required Properties:
@ -173,8 +154,6 @@ index 70529e0b58e9..4eb8bbe15c01 100644
- "mediatek,mt6797-mmsys", "syscon" - "mediatek,mt6797-mmsys", "syscon"
- "mediatek,mt8173-mmsys", "syscon" - "mediatek,mt8173-mmsys", "syscon"
- #clock-cells: Must be 1 - #clock-cells: Must be 1
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt
index e494366782aa..d9f092eb3550 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt
@@ -8,6 +8,7 @@ Required Properties: @@ -8,6 +8,7 @@ Required Properties:
@ -185,8 +164,6 @@ index e494366782aa..d9f092eb3550 100644
- "mediatek,mt8135-pericfg", "syscon" - "mediatek,mt8135-pericfg", "syscon"
- "mediatek,mt8173-pericfg", "syscon" - "mediatek,mt8173-pericfg", "syscon"
- #clock-cells: Must be 1 - #clock-cells: Must be 1
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt
index ec93ecbb9f3c..2024fc909d69 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt
@@ -7,6 +7,7 @@ Required Properties: @@ -7,6 +7,7 @@ Required Properties:
@ -197,8 +174,6 @@ index ec93ecbb9f3c..2024fc909d69 100644
- "mediatek,mt6797-topckgen" - "mediatek,mt6797-topckgen"
- "mediatek,mt8135-topckgen" - "mediatek,mt8135-topckgen"
- "mediatek,mt8173-topckgen" - "mediatek,mt8173-topckgen"
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt
index d150104f928a..ea40d05089f8 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt
@@ -7,6 +7,7 @@ Required Properties: @@ -7,6 +7,7 @@ Required Properties:
@ -209,11 +184,9 @@ index d150104f928a..ea40d05089f8 100644
- "mediatek,mt6797-vdecsys", "syscon" - "mediatek,mt6797-vdecsys", "syscon"
- "mediatek,mt8173-vdecsys", "syscon" - "mediatek,mt8173-vdecsys", "syscon"
- #clock-cells: Must be 1 - #clock-cells: Must be 1
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt
index 8a93be643647..851545357e94 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt
@@ -6,6 +6,7 @@ The Mediatek vencsys controller provides various clocks to the system. @@ -6,6 +6,7 @@ The Mediatek vencsys controller provides
Required Properties: Required Properties:
- compatible: Should be one of: - compatible: Should be one of:
@ -221,6 +194,3 @@ index 8a93be643647..851545357e94 100644
- "mediatek,mt6797-vencsys", "syscon" - "mediatek,mt6797-vencsys", "syscon"
- "mediatek,mt8173-vencsys", "syscon" - "mediatek,mt8173-vencsys", "syscon"
- #clock-cells: Must be 1 - #clock-cells: Must be 1
--
2.11.0

View file

@ -14,9 +14,6 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
1 file changed, 427 insertions(+) 1 file changed, 427 insertions(+)
create mode 100644 include/dt-bindings/clock/mt2712-clk.h create mode 100644 include/dt-bindings/clock/mt2712-clk.h
diff --git a/include/dt-bindings/clock/mt2712-clk.h b/include/dt-bindings/clock/mt2712-clk.h
new file mode 100644
index 000000000000..48a8e797a617
--- /dev/null --- /dev/null
+++ b/include/dt-bindings/clock/mt2712-clk.h +++ b/include/dt-bindings/clock/mt2712-clk.h
@@ -0,0 +1,427 @@ @@ -0,0 +1,427 @@
@ -447,6 +444,3 @@ index 000000000000..48a8e797a617
+#define CLK_JPGDEC_NR_CLK 2 +#define CLK_JPGDEC_NR_CLK 2
+ +
+#endif /* _DT_BINDINGS_CLK_MT2712_H */ +#endif /* _DT_BINDINGS_CLK_MT2712_H */
--
2.11.0

View file

@ -32,8 +32,6 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
create mode 100644 drivers/clk/mediatek/clk-mt2712-venc.c create mode 100644 drivers/clk/mediatek/clk-mt2712-venc.c
create mode 100644 drivers/clk/mediatek/clk-mt2712.c create mode 100644 drivers/clk/mediatek/clk-mt2712.c
diff --git a/drivers/clk/mediatek/Kconfig b/drivers/clk/mediatek/Kconfig
index 28739a9a6e37..300dbb551bf7 100644
--- a/drivers/clk/mediatek/Kconfig --- a/drivers/clk/mediatek/Kconfig
+++ b/drivers/clk/mediatek/Kconfig +++ b/drivers/clk/mediatek/Kconfig
@@ -50,6 +50,56 @@ config COMMON_CLK_MT2701_BDPSYS @@ -50,6 +50,56 @@ config COMMON_CLK_MT2701_BDPSYS
@ -93,11 +91,9 @@ index 28739a9a6e37..300dbb551bf7 100644
config COMMON_CLK_MT6797 config COMMON_CLK_MT6797
bool "Clock driver for Mediatek MT6797" bool "Clock driver for Mediatek MT6797"
depends on (ARCH_MEDIATEK && ARM64) || COMPILE_TEST depends on (ARCH_MEDIATEK && ARM64) || COMPILE_TEST
diff --git a/drivers/clk/mediatek/Makefile b/drivers/clk/mediatek/Makefile
index 2a755b5fb51b..a4e5c47c73a4 100644
--- a/drivers/clk/mediatek/Makefile --- a/drivers/clk/mediatek/Makefile
+++ b/drivers/clk/mediatek/Makefile +++ b/drivers/clk/mediatek/Makefile
@@ -12,5 +12,13 @@ obj-$(CONFIG_COMMON_CLK_MT2701_HIFSYS) += clk-mt2701-hif.o @@ -13,5 +13,13 @@ obj-$(CONFIG_COMMON_CLK_MT2701_HIFSYS) +
obj-$(CONFIG_COMMON_CLK_MT2701_IMGSYS) += clk-mt2701-img.o obj-$(CONFIG_COMMON_CLK_MT2701_IMGSYS) += clk-mt2701-img.o
obj-$(CONFIG_COMMON_CLK_MT2701_MMSYS) += clk-mt2701-mm.o obj-$(CONFIG_COMMON_CLK_MT2701_MMSYS) += clk-mt2701-mm.o
obj-$(CONFIG_COMMON_CLK_MT2701_VDECSYS) += clk-mt2701-vdec.o obj-$(CONFIG_COMMON_CLK_MT2701_VDECSYS) += clk-mt2701-vdec.o
@ -111,9 +107,6 @@ index 2a755b5fb51b..a4e5c47c73a4 100644
+obj-$(CONFIG_COMMON_CLK_MT2712_VENCSYS) += clk-mt2712-venc.o +obj-$(CONFIG_COMMON_CLK_MT2712_VENCSYS) += clk-mt2712-venc.o
obj-$(CONFIG_COMMON_CLK_MT8135) += clk-mt8135.o obj-$(CONFIG_COMMON_CLK_MT8135) += clk-mt8135.o
obj-$(CONFIG_COMMON_CLK_MT8173) += clk-mt8173.o obj-$(CONFIG_COMMON_CLK_MT8173) += clk-mt8173.o
diff --git a/drivers/clk/mediatek/clk-mt2712-bdp.c b/drivers/clk/mediatek/clk-mt2712-bdp.c
new file mode 100644
index 000000000000..5fe4728c076e
--- /dev/null --- /dev/null
+++ b/drivers/clk/mediatek/clk-mt2712-bdp.c +++ b/drivers/clk/mediatek/clk-mt2712-bdp.c
@@ -0,0 +1,102 @@ @@ -0,0 +1,102 @@
@ -219,9 +212,6 @@ index 000000000000..5fe4728c076e
+}; +};
+ +
+builtin_platform_driver(clk_mt2712_bdp_drv); +builtin_platform_driver(clk_mt2712_bdp_drv);
diff --git a/drivers/clk/mediatek/clk-mt2712-img.c b/drivers/clk/mediatek/clk-mt2712-img.c
new file mode 100644
index 000000000000..139ff55d495e
--- /dev/null --- /dev/null
+++ b/drivers/clk/mediatek/clk-mt2712-img.c +++ b/drivers/clk/mediatek/clk-mt2712-img.c
@@ -0,0 +1,80 @@ @@ -0,0 +1,80 @@
@ -305,9 +295,6 @@ index 000000000000..139ff55d495e
+}; +};
+ +
+builtin_platform_driver(clk_mt2712_img_drv); +builtin_platform_driver(clk_mt2712_img_drv);
diff --git a/drivers/clk/mediatek/clk-mt2712-jpgdec.c b/drivers/clk/mediatek/clk-mt2712-jpgdec.c
new file mode 100644
index 000000000000..c7d4aada4892
--- /dev/null --- /dev/null
+++ b/drivers/clk/mediatek/clk-mt2712-jpgdec.c +++ b/drivers/clk/mediatek/clk-mt2712-jpgdec.c
@@ -0,0 +1,76 @@ @@ -0,0 +1,76 @@
@ -387,9 +374,6 @@ index 000000000000..c7d4aada4892
+}; +};
+ +
+builtin_platform_driver(clk_mt2712_jpgdec_drv); +builtin_platform_driver(clk_mt2712_jpgdec_drv);
diff --git a/drivers/clk/mediatek/clk-mt2712-mfg.c b/drivers/clk/mediatek/clk-mt2712-mfg.c
new file mode 100644
index 000000000000..570f72d48d4d
--- /dev/null --- /dev/null
+++ b/drivers/clk/mediatek/clk-mt2712-mfg.c +++ b/drivers/clk/mediatek/clk-mt2712-mfg.c
@@ -0,0 +1,75 @@ @@ -0,0 +1,75 @@
@ -468,9 +452,6 @@ index 000000000000..570f72d48d4d
+}; +};
+ +
+builtin_platform_driver(clk_mt2712_mfg_drv); +builtin_platform_driver(clk_mt2712_mfg_drv);
diff --git a/drivers/clk/mediatek/clk-mt2712-mm.c b/drivers/clk/mediatek/clk-mt2712-mm.c
new file mode 100644
index 000000000000..a8b4b6d42488
--- /dev/null --- /dev/null
+++ b/drivers/clk/mediatek/clk-mt2712-mm.c +++ b/drivers/clk/mediatek/clk-mt2712-mm.c
@@ -0,0 +1,170 @@ @@ -0,0 +1,170 @@
@ -644,9 +625,6 @@ index 000000000000..a8b4b6d42488
+}; +};
+ +
+builtin_platform_driver(clk_mt2712_mm_drv); +builtin_platform_driver(clk_mt2712_mm_drv);
diff --git a/drivers/clk/mediatek/clk-mt2712-vdec.c b/drivers/clk/mediatek/clk-mt2712-vdec.c
new file mode 100644
index 000000000000..55c64ee8cc91
--- /dev/null --- /dev/null
+++ b/drivers/clk/mediatek/clk-mt2712-vdec.c +++ b/drivers/clk/mediatek/clk-mt2712-vdec.c
@@ -0,0 +1,94 @@ @@ -0,0 +1,94 @@
@ -744,9 +722,6 @@ index 000000000000..55c64ee8cc91
+}; +};
+ +
+builtin_platform_driver(clk_mt2712_vdec_drv); +builtin_platform_driver(clk_mt2712_vdec_drv);
diff --git a/drivers/clk/mediatek/clk-mt2712-venc.c b/drivers/clk/mediatek/clk-mt2712-venc.c
new file mode 100644
index 000000000000..ccbfe98777c8
--- /dev/null --- /dev/null
+++ b/drivers/clk/mediatek/clk-mt2712-venc.c +++ b/drivers/clk/mediatek/clk-mt2712-venc.c
@@ -0,0 +1,77 @@ @@ -0,0 +1,77 @@
@ -827,9 +802,6 @@ index 000000000000..ccbfe98777c8
+}; +};
+ +
+builtin_platform_driver(clk_mt2712_venc_drv); +builtin_platform_driver(clk_mt2712_venc_drv);
diff --git a/drivers/clk/mediatek/clk-mt2712.c b/drivers/clk/mediatek/clk-mt2712.c
new file mode 100644
index 000000000000..498d13799388
--- /dev/null --- /dev/null
+++ b/drivers/clk/mediatek/clk-mt2712.c +++ b/drivers/clk/mediatek/clk-mt2712.c
@@ -0,0 +1,1435 @@ @@ -0,0 +1,1435 @@
@ -2268,8 +2240,6 @@ index 000000000000..498d13799388
+} +}
+ +
+arch_initcall(clk_mt2712_init); +arch_initcall(clk_mt2712_init);
diff --git a/drivers/clk/mediatek/clk-mtk.h b/drivers/clk/mediatek/clk-mtk.h
index f5d6b70ce189..f48df75cc901 100644
--- a/drivers/clk/mediatek/clk-mtk.h --- a/drivers/clk/mediatek/clk-mtk.h
+++ b/drivers/clk/mediatek/clk-mtk.h +++ b/drivers/clk/mediatek/clk-mtk.h
@@ -207,6 +207,8 @@ struct mtk_pll_data { @@ -207,6 +207,8 @@ struct mtk_pll_data {
@ -2281,8 +2251,6 @@ index f5d6b70ce189..f48df75cc901 100644
int pd_shift; int pd_shift;
unsigned int flags; unsigned int flags;
const struct clk_ops *ops; const struct clk_ops *ops;
diff --git a/drivers/clk/mediatek/clk-pll.c b/drivers/clk/mediatek/clk-pll.c
index a409142e9346..3c546bae6955 100644
--- a/drivers/clk/mediatek/clk-pll.c --- a/drivers/clk/mediatek/clk-pll.c
+++ b/drivers/clk/mediatek/clk-pll.c +++ b/drivers/clk/mediatek/clk-pll.c
@@ -47,6 +47,7 @@ struct mtk_clk_pll { @@ -47,6 +47,7 @@ struct mtk_clk_pll {
@ -2293,7 +2261,7 @@ index a409142e9346..3c546bae6955 100644
void __iomem *pcw_addr; void __iomem *pcw_addr;
const struct mtk_pll_data *data; const struct mtk_pll_data *data;
}; };
@@ -227,7 +228,10 @@ static int mtk_pll_prepare(struct clk_hw *hw) @@ -227,7 +228,10 @@ static int mtk_pll_prepare(struct clk_hw
r |= pll->data->en_mask; r |= pll->data->en_mask;
writel(r, pll->base_addr + REG_CON0); writel(r, pll->base_addr + REG_CON0);
@ -2305,7 +2273,7 @@ index a409142e9346..3c546bae6955 100644
r = readl(pll->tuner_addr) | AUDPLL_TUNER_EN; r = readl(pll->tuner_addr) | AUDPLL_TUNER_EN;
writel(r, pll->tuner_addr); writel(r, pll->tuner_addr);
} }
@@ -254,7 +258,10 @@ static void mtk_pll_unprepare(struct clk_hw *hw) @@ -254,7 +258,10 @@ static void mtk_pll_unprepare(struct clk
writel(r, pll->base_addr + REG_CON0); writel(r, pll->base_addr + REG_CON0);
} }
@ -2317,7 +2285,7 @@ index a409142e9346..3c546bae6955 100644
r = readl(pll->tuner_addr) & ~AUDPLL_TUNER_EN; r = readl(pll->tuner_addr) & ~AUDPLL_TUNER_EN;
writel(r, pll->tuner_addr); writel(r, pll->tuner_addr);
} }
@@ -297,6 +304,8 @@ static struct clk *mtk_clk_register_pll(const struct mtk_pll_data *data, @@ -297,6 +304,8 @@ static struct clk *mtk_clk_register_pll(
pll->pcw_addr = base + data->pcw_reg; pll->pcw_addr = base + data->pcw_reg;
if (data->tuner_reg) if (data->tuner_reg)
pll->tuner_addr = base + data->tuner_reg; pll->tuner_addr = base + data->tuner_reg;
@ -2326,6 +2294,3 @@ index a409142e9346..3c546bae6955 100644
pll->hw.init = &init; pll->hw.init = &init;
pll->data = data; pll->data = data;
--
2.11.0

View file

@ -28,8 +28,6 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,sgmiisys.txt create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,sgmiisys.txt
create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,ssusbsys.txt create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,ssusbsys.txt
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt
index 19fc116346d6..b404d592ce58 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt
@@ -9,6 +9,7 @@ Required Properties: @@ -9,6 +9,7 @@ Required Properties:
@ -40,9 +38,6 @@ index 19fc116346d6..b404d592ce58 100644
- "mediatek,mt8135-apmixedsys" - "mediatek,mt8135-apmixedsys"
- "mediatek,mt8173-apmixedsys" - "mediatek,mt8173-apmixedsys"
- #clock-cells: Must be 1 - #clock-cells: Must be 1
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.txt
new file mode 100644
index 000000000000..9b8f578d5e19
--- /dev/null --- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.txt +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,audsys.txt
@@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
@ -68,8 +63,6 @@ index 000000000000..9b8f578d5e19
+ reg = <0 0x11220000 0 0x1000>; + reg = <0 0x11220000 0 0x1000>;
+ #clock-cells = <1>; + #clock-cells = <1>;
+}; +};
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.txt
index 768f3a5bc055..7aa3fa167668 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.txt --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.txt +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.txt
@@ -7,6 +7,7 @@ Required Properties: @@ -7,6 +7,7 @@ Required Properties:
@ -80,8 +73,6 @@ index 768f3a5bc055..7aa3fa167668 100644
- #clock-cells: Must be 1 - #clock-cells: Must be 1
The ethsys controller uses the common clk binding from The ethsys controller uses the common clk binding from
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,hifsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,hifsys.txt
index beed7b594cea..f5629d64cef2 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,hifsys.txt --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,hifsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,hifsys.txt +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,hifsys.txt
@@ -8,6 +8,7 @@ Required Properties: @@ -8,6 +8,7 @@ Required Properties:
@ -92,8 +83,6 @@ index beed7b594cea..f5629d64cef2 100644
- #clock-cells: Must be 1 - #clock-cells: Must be 1
The hifsys controller uses the common clk binding from The hifsys controller uses the common clk binding from
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt
index a3430cd96d0f..566f153f9f83 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt
@@ -10,6 +10,7 @@ Required Properties: @@ -10,6 +10,7 @@ Required Properties:
@ -104,9 +93,6 @@ index a3430cd96d0f..566f153f9f83 100644
- "mediatek,mt8135-infracfg", "syscon" - "mediatek,mt8135-infracfg", "syscon"
- "mediatek,mt8173-infracfg", "syscon" - "mediatek,mt8173-infracfg", "syscon"
- #clock-cells: Must be 1 - #clock-cells: Must be 1
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,pciesys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pciesys.txt
new file mode 100644
index 000000000000..d5d5f1227665
--- /dev/null --- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pciesys.txt +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pciesys.txt
@@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
@ -132,8 +118,6 @@ index 000000000000..d5d5f1227665
+ reg = <0 0x1a100800 0 0x1000>; + reg = <0 0x1a100800 0 0x1000>;
+ #clock-cells = <1>; + #clock-cells = <1>;
+}; +};
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt
index d9f092eb3550..fb58ca8c2770 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt
@@ -9,6 +9,7 @@ Required Properties: @@ -9,6 +9,7 @@ Required Properties:
@ -144,9 +128,6 @@ index d9f092eb3550..fb58ca8c2770 100644
- "mediatek,mt8135-pericfg", "syscon" - "mediatek,mt8135-pericfg", "syscon"
- "mediatek,mt8173-pericfg", "syscon" - "mediatek,mt8173-pericfg", "syscon"
- #clock-cells: Must be 1 - #clock-cells: Must be 1
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,sgmiisys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,sgmiisys.txt
new file mode 100644
index 000000000000..d113b8e741f3
--- /dev/null --- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,sgmiisys.txt +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,sgmiisys.txt
@@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
@ -172,9 +153,6 @@ index 000000000000..d113b8e741f3
+ reg = <0 0x1b128000 0 0x1000>; + reg = <0 0x1b128000 0 0x1000>;
+ #clock-cells = <1>; + #clock-cells = <1>;
+}; +};
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,ssusbsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,ssusbsys.txt
new file mode 100644
index 000000000000..00760019da00
--- /dev/null --- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,ssusbsys.txt +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,ssusbsys.txt
@@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
@ -200,8 +178,6 @@ index 000000000000..00760019da00
+ reg = <0 0x1a000000 0 0x1000>; + reg = <0 0x1a000000 0 0x1000>;
+ #clock-cells = <1>; + #clock-cells = <1>;
+}; +};
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt
index 2024fc909d69..24014a7e2332 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt
@@ -9,6 +9,7 @@ Required Properties: @@ -9,6 +9,7 @@ Required Properties:
@ -212,6 +188,3 @@ index 2024fc909d69..24014a7e2332 100644
- "mediatek,mt8135-topckgen" - "mediatek,mt8135-topckgen"
- "mediatek,mt8173-topckgen" - "mediatek,mt8173-topckgen"
- #clock-cells: Must be 1 - #clock-cells: Must be 1
--
2.11.0

View file

@ -16,9 +16,6 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
1 file changed, 289 insertions(+) 1 file changed, 289 insertions(+)
create mode 100644 include/dt-bindings/clock/mt7622-clk.h create mode 100644 include/dt-bindings/clock/mt7622-clk.h
diff --git a/include/dt-bindings/clock/mt7622-clk.h b/include/dt-bindings/clock/mt7622-clk.h
new file mode 100644
index 000000000000..3e514ed51d15
--- /dev/null --- /dev/null
+++ b/include/dt-bindings/clock/mt7622-clk.h +++ b/include/dt-bindings/clock/mt7622-clk.h
@@ -0,0 +1,289 @@ @@ -0,0 +1,289 @@
@ -311,6 +308,3 @@ index 000000000000..3e514ed51d15
+ +
+#endif /* _DT_BINDINGS_CLK_MT7622_H */ +#endif /* _DT_BINDINGS_CLK_MT7622_H */
+ +
--
2.11.0

View file

@ -23,8 +23,6 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
create mode 100644 drivers/clk/mediatek/clk-mt7622-hif.c create mode 100644 drivers/clk/mediatek/clk-mt7622-hif.c
create mode 100644 drivers/clk/mediatek/clk-mt7622.c create mode 100644 drivers/clk/mediatek/clk-mt7622.c
diff --git a/drivers/clk/mediatek/Kconfig b/drivers/clk/mediatek/Kconfig
index 300dbb551bf7..59dc0aad553c 100644
--- a/drivers/clk/mediatek/Kconfig --- a/drivers/clk/mediatek/Kconfig
+++ b/drivers/clk/mediatek/Kconfig +++ b/drivers/clk/mediatek/Kconfig
@@ -132,6 +132,36 @@ config COMMON_CLK_MT6797_VENCSYS @@ -132,6 +132,36 @@ config COMMON_CLK_MT6797_VENCSYS
@ -64,11 +62,9 @@ index 300dbb551bf7..59dc0aad553c 100644
config COMMON_CLK_MT8135 config COMMON_CLK_MT8135
bool "Clock driver for Mediatek MT8135" bool "Clock driver for Mediatek MT8135"
depends on (ARCH_MEDIATEK && ARM) || COMPILE_TEST depends on (ARCH_MEDIATEK && ARM) || COMPILE_TEST
diff --git a/drivers/clk/mediatek/Makefile b/drivers/clk/mediatek/Makefile
index a4e5c47c73a4..de8c3d0bb4ca 100644
--- a/drivers/clk/mediatek/Makefile --- a/drivers/clk/mediatek/Makefile
+++ b/drivers/clk/mediatek/Makefile +++ b/drivers/clk/mediatek/Makefile
@@ -20,5 +20,9 @@ obj-$(CONFIG_COMMON_CLK_MT2712_MFGCFG) += clk-mt2712-mfg.o @@ -21,5 +21,9 @@ obj-$(CONFIG_COMMON_CLK_MT2712_MFGCFG) +
obj-$(CONFIG_COMMON_CLK_MT2712_MMSYS) += clk-mt2712-mm.o obj-$(CONFIG_COMMON_CLK_MT2712_MMSYS) += clk-mt2712-mm.o
obj-$(CONFIG_COMMON_CLK_MT2712_VDECSYS) += clk-mt2712-vdec.o obj-$(CONFIG_COMMON_CLK_MT2712_VDECSYS) += clk-mt2712-vdec.o
obj-$(CONFIG_COMMON_CLK_MT2712_VENCSYS) += clk-mt2712-venc.o obj-$(CONFIG_COMMON_CLK_MT2712_VENCSYS) += clk-mt2712-venc.o
@ -78,9 +74,6 @@ index a4e5c47c73a4..de8c3d0bb4ca 100644
+obj-$(CONFIG_COMMON_CLK_MT7622_AUDSYS) += clk-mt7622-aud.o +obj-$(CONFIG_COMMON_CLK_MT7622_AUDSYS) += clk-mt7622-aud.o
obj-$(CONFIG_COMMON_CLK_MT8135) += clk-mt8135.o obj-$(CONFIG_COMMON_CLK_MT8135) += clk-mt8135.o
obj-$(CONFIG_COMMON_CLK_MT8173) += clk-mt8173.o obj-$(CONFIG_COMMON_CLK_MT8173) += clk-mt8173.o
diff --git a/drivers/clk/mediatek/clk-mt7622-aud.c b/drivers/clk/mediatek/clk-mt7622-aud.c
new file mode 100644
index 000000000000..fad7d9fc53ba
--- /dev/null --- /dev/null
+++ b/drivers/clk/mediatek/clk-mt7622-aud.c +++ b/drivers/clk/mediatek/clk-mt7622-aud.c
@@ -0,0 +1,195 @@ @@ -0,0 +1,195 @@
@ -279,9 +272,6 @@ index 000000000000..fad7d9fc53ba
+}; +};
+ +
+builtin_platform_driver(clk_mt7622_aud_drv); +builtin_platform_driver(clk_mt7622_aud_drv);
diff --git a/drivers/clk/mediatek/clk-mt7622-eth.c b/drivers/clk/mediatek/clk-mt7622-eth.c
new file mode 100644
index 000000000000..6328127bbb3c
--- /dev/null --- /dev/null
+++ b/drivers/clk/mediatek/clk-mt7622-eth.c +++ b/drivers/clk/mediatek/clk-mt7622-eth.c
@@ -0,0 +1,156 @@ @@ -0,0 +1,156 @@
@ -441,9 +431,6 @@ index 000000000000..6328127bbb3c
+}; +};
+ +
+builtin_platform_driver(clk_mt7622_eth_drv); +builtin_platform_driver(clk_mt7622_eth_drv);
diff --git a/drivers/clk/mediatek/clk-mt7622-hif.c b/drivers/clk/mediatek/clk-mt7622-hif.c
new file mode 100644
index 000000000000..a6e8534276c6
--- /dev/null --- /dev/null
+++ b/drivers/clk/mediatek/clk-mt7622-hif.c +++ b/drivers/clk/mediatek/clk-mt7622-hif.c
@@ -0,0 +1,169 @@ @@ -0,0 +1,169 @@
@ -616,9 +603,6 @@ index 000000000000..a6e8534276c6
+}; +};
+ +
+builtin_platform_driver(clk_mt7622_hif_drv); +builtin_platform_driver(clk_mt7622_hif_drv);
diff --git a/drivers/clk/mediatek/clk-mt7622.c b/drivers/clk/mediatek/clk-mt7622.c
new file mode 100644
index 000000000000..92f7e32770c6
--- /dev/null --- /dev/null
+++ b/drivers/clk/mediatek/clk-mt7622.c +++ b/drivers/clk/mediatek/clk-mt7622.c
@@ -0,0 +1,780 @@ @@ -0,0 +1,780 @@
@ -1402,6 +1386,3 @@ index 000000000000..92f7e32770c6
+} +}
+ +
+arch_initcall(clk_mt7622_init); +arch_initcall(clk_mt7622_init);
--
2.11.0

View file

@ -17,11 +17,9 @@ Acked-by: Matthias Brugger <matthias.bgg@gmail.com>
arch/arm64/boot/dts/mediatek/mt8173.dtsi | 12 ++++-------- arch/arm64/boot/dts/mediatek/mt8173.dtsi | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-) 1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
index b99a27372965..26396ef53bde 100644
--- a/arch/arm64/boot/dts/mediatek/mt8173.dtsi --- a/arch/arm64/boot/dts/mediatek/mt8173.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
@@ -682,8 +682,7 @@ @@ -684,8 +684,7 @@
}; };
mmc0: mmc@11230000 { mmc0: mmc@11230000 {
@ -31,7 +29,7 @@ index b99a27372965..26396ef53bde 100644
reg = <0 0x11230000 0 0x1000>; reg = <0 0x11230000 0 0x1000>;
interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_LOW>; interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_MSDC30_0>, clocks = <&pericfg CLK_PERI_MSDC30_0>,
@@ -693,8 +692,7 @@ @@ -695,8 +694,7 @@
}; };
mmc1: mmc@11240000 { mmc1: mmc@11240000 {
@ -41,7 +39,7 @@ index b99a27372965..26396ef53bde 100644
reg = <0 0x11240000 0 0x1000>; reg = <0 0x11240000 0 0x1000>;
interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_LOW>; interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_MSDC30_1>, clocks = <&pericfg CLK_PERI_MSDC30_1>,
@@ -704,8 +702,7 @@ @@ -706,8 +704,7 @@
}; };
mmc2: mmc@11250000 { mmc2: mmc@11250000 {
@ -51,7 +49,7 @@ index b99a27372965..26396ef53bde 100644
reg = <0 0x11250000 0 0x1000>; reg = <0 0x11250000 0 0x1000>;
interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_LOW>; interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_MSDC30_2>, clocks = <&pericfg CLK_PERI_MSDC30_2>,
@@ -715,8 +712,7 @@ @@ -717,8 +714,7 @@
}; };
mmc3: mmc@11260000 { mmc3: mmc@11260000 {
@ -61,6 +59,3 @@ index b99a27372965..26396ef53bde 100644
reg = <0 0x11260000 0 0x1000>; reg = <0 0x11260000 0 0x1000>;
interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_LOW>; interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_MSDC30_3>, clocks = <&pericfg CLK_PERI_MSDC30_3>,
--
2.11.0

View file

@ -15,8 +15,6 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mtk-sd.c | 11 +++++++++-- drivers/mmc/host/mtk-sd.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-) 1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 643c795f1bdd..ab2fbbbdfda3 100644
--- 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 { @@ -300,6 +300,7 @@ struct msdc_save_para {
@ -50,7 +48,7 @@ index 643c795f1bdd..ab2fbbbdfda3 100644
}; };
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_host *host, unsigned char timing, u32 hz) @@ -666,7 +671,8 @@ static void msdc_set_mclk(struct msdc_ho
host->base + PAD_CMD_TUNE); host->base + PAD_CMD_TUNE);
} }
@ -60,7 +58,7 @@ index 643c795f1bdd..ab2fbbbdfda3 100644
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 mmc_host *mmc, u32 opcode) @@ -1594,7 +1600,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;
@ -70,6 +68,3 @@ index 643c795f1bdd..ab2fbbbdfda3 100644
ret = hs400_tune_response(mmc, opcode); ret = hs400_tune_response(mmc, opcode);
else else
ret = msdc_tune_response(mmc, opcode); ret = msdc_tune_response(mmc, opcode);
--
2.11.0

View file

@ -13,8 +13,6 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mtk-sd.c | 51 ++++++++++++++++++++++++++++++----------------- drivers/mmc/host/mtk-sd.c | 51 ++++++++++++++++++++++++++++++-----------------
1 file changed, 33 insertions(+), 18 deletions(-) 1 file changed, 33 insertions(+), 18 deletions(-)
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index ab2fbbbdfda3..bcd83d6f2b86 100644
--- 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
@@ -75,6 +75,7 @@ @@ -75,6 +75,7 @@
@ -59,7 +57,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
}; };
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_host *host, unsigned char timing, u32 hz) @@ -581,6 +587,7 @@ static void msdc_set_mclk(struct msdc_ho
u32 flags; u32 flags;
u32 div; u32 div;
u32 sclk; u32 sclk;
@ -67,7 +65,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
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_host *host, unsigned char timing, u32 hz) @@ -663,10 +670,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);
@ -80,7 +78,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
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, void *dev_id) @@ -1224,6 +1231,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;
@ -88,7 +86,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
/* 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_host *host) @@ -1239,7 +1247,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);
@ -97,7 +95,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
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_host *host) @@ -1259,7 +1267,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);
@ -106,7 +104,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
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_host *mmc, u32 opcode) @@ -1402,18 +1410,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;
@ -128,7 +126,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
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_host *mmc, u32 opcode) @@ -1437,7 +1446,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++) {
@ -137,7 +135,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
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 @@ static int msdc_tune_response(struct mmc_host *mmc, u32 opcode) @@ -1462,12 +1471,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);
@ -152,7 +150,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
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 @@ static int msdc_tune_response(struct mmc_host *mmc, u32 opcode) @@ -1475,7 +1484,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++) {
@ -161,7 +159,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
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 @@ static int msdc_tune_response(struct mmc_host *mmc, u32 opcode) @@ -1483,7 +1492,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);
@ -170,7 +168,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
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_host *mmc, u32 opcode) @@ -1545,12 +1554,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;
@ -185,7 +183,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
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_host *mmc, u32 opcode) @@ -1565,7 +1575,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++) {
@ -194,7 +192,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
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 @@ static int msdc_tune_data(struct mmc_host *mmc, u32 opcode) @@ -1578,14 +1588,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);
@ -211,7 +209,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
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 mmc_host *mmc, u32 opcode) @@ -1599,6 +1609,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;
@ -219,7 +217,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
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 mmc_host *mmc, u32 opcode) @@ -1616,7 +1627,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);
@ -228,7 +226,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
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 platform_device *pdev) @@ -1857,10 +1868,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)
{ {
@ -242,7 +240,7 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
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_host *host) @@ -1870,10 +1883,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)
{ {
@ -256,6 +254,3 @@ index ab2fbbbdfda3..bcd83d6f2b86 100644
writel(host->save_para.patch_bit0, host->base + MSDC_PATCH_BIT); writel(host->save_para.patch_bit0, host->base + MSDC_PATCH_BIT);
writel(host->save_para.patch_bit1, host->base + MSDC_PATCH_BIT1); writel(host->save_para.patch_bit1, host->base + MSDC_PATCH_BIT1);
writel(host->save_para.pad_ds_tune, host->base + PAD_DS_TUNE); writel(host->save_para.pad_ds_tune, host->base + PAD_DS_TUNE);
--
2.11.0

View file

@ -13,8 +13,6 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mtk-sd.c | 52 +++++++++++++++++++++++++++++++++++++++++++++-- drivers/mmc/host/mtk-sd.c | 52 +++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 50 insertions(+), 2 deletions(-) 1 file changed, 50 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index bcd83d6f2b86..8113bacc1540 100644
--- 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
@@ -74,6 +74,7 @@ @@ -74,6 +74,7 @@
@ -63,7 +61,7 @@ index bcd83d6f2b86..8113bacc1540 100644
}; };
struct msdc_tune_para { struct msdc_tune_para {
@@ -365,24 +378,32 @@ static const struct mtk_mmc_compatible mt8135_compat = { @@ -365,24 +378,32 @@ static const struct mtk_mmc_compatible m
.clk_div_bits = 8, .clk_div_bits = 8,
.hs400_tune = false, .hs400_tune = false,
.pad_tune_reg = MSDC_PAD_TUNE, .pad_tune_reg = MSDC_PAD_TUNE,
@ -96,7 +94,7 @@ index bcd83d6f2b86..8113bacc1540 100644
}; };
static const struct of_device_id msdc_of_ids[] = { static const struct of_device_id msdc_of_ids[] = {
@@ -1252,8 +1273,29 @@ static void msdc_init_hw(struct msdc_host *host) @@ -1252,8 +1273,29 @@ static void msdc_init_hw(struct msdc_hos
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);
sdr_set_field(host->base + MSDC_PATCH_BIT, MSDC_CKGEN_MSDC_DLY_SEL, 1); sdr_set_field(host->base + MSDC_PATCH_BIT, MSDC_CKGEN_MSDC_DLY_SEL, 1);
@ -127,7 +125,7 @@ index bcd83d6f2b86..8113bacc1540 100644
/* Configure to enable SDIO mode. /* Configure to enable SDIO mode.
* it's must otherwise sdio cmd5 failed * it's must otherwise sdio cmd5 failed
@@ -1268,6 +1310,8 @@ static void msdc_init_hw(struct msdc_host *host) @@ -1268,6 +1310,8 @@ static void msdc_init_hw(struct msdc_hos
host->def_tune_para.iocon = readl(host->base + MSDC_IOCON); host->def_tune_para.iocon = readl(host->base + MSDC_IOCON);
host->def_tune_para.pad_tune = readl(host->base + tune_reg); host->def_tune_para.pad_tune = readl(host->base + tune_reg);
@ -136,7 +134,7 @@ index bcd83d6f2b86..8113bacc1540 100644
dev_dbg(host->dev, "init hardware done!"); dev_dbg(host->dev, "init hardware done!");
} }
@@ -1480,7 +1524,7 @@ static int msdc_tune_response(struct mmc_host *mmc, u32 opcode) @@ -1480,7 +1524,7 @@ skip_fall:
final_fall_delay.final_phase); final_fall_delay.final_phase);
final_delay = final_fall_delay.final_phase; final_delay = final_fall_delay.final_phase;
} }
@ -145,7 +143,7 @@ index bcd83d6f2b86..8113bacc1540 100644
goto skip_internal; goto skip_internal;
for (i = 0; i < PAD_DELAY_MAX; i++) { for (i = 0; i < PAD_DELAY_MAX; i++) {
@@ -1638,6 +1682,8 @@ static int msdc_prepare_hs400_tuning(struct mmc_host *mmc, struct mmc_ios *ios) @@ -1638,6 +1682,8 @@ static int msdc_prepare_hs400_tuning(str
host->hs400_mode = true; host->hs400_mode = true;
writel(host->hs400_ds_delay, host->base + PAD_DS_TUNE); writel(host->hs400_ds_delay, host->base + PAD_DS_TUNE);
@ -154,7 +152,7 @@ index bcd83d6f2b86..8113bacc1540 100644
return 0; return 0;
} }
@@ -1876,6 +1922,7 @@ static void msdc_save_reg(struct msdc_host *host) @@ -1876,6 +1922,7 @@ static void msdc_save_reg(struct msdc_ho
host->save_para.pad_tune = readl(host->base + tune_reg); host->save_para.pad_tune = readl(host->base + tune_reg);
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);
@ -162,7 +160,7 @@ index bcd83d6f2b86..8113bacc1540 100644
host->save_para.pad_ds_tune = readl(host->base + PAD_DS_TUNE); host->save_para.pad_ds_tune = readl(host->base + PAD_DS_TUNE);
host->save_para.pad_cmd_tune = readl(host->base + PAD_CMD_TUNE); host->save_para.pad_cmd_tune = readl(host->base + PAD_CMD_TUNE);
host->save_para.emmc50_cfg0 = readl(host->base + EMMC50_CFG0); host->save_para.emmc50_cfg0 = readl(host->base + EMMC50_CFG0);
@@ -1891,6 +1938,7 @@ static void msdc_restore_reg(struct msdc_host *host) @@ -1891,6 +1938,7 @@ static void msdc_restore_reg(struct msdc
writel(host->save_para.pad_tune, host->base + tune_reg); writel(host->save_para.pad_tune, host->base + tune_reg);
writel(host->save_para.patch_bit0, host->base + MSDC_PATCH_BIT); writel(host->save_para.patch_bit0, host->base + MSDC_PATCH_BIT);
writel(host->save_para.patch_bit1, host->base + MSDC_PATCH_BIT1); writel(host->save_para.patch_bit1, host->base + MSDC_PATCH_BIT1);
@ -170,6 +168,3 @@ index bcd83d6f2b86..8113bacc1540 100644
writel(host->save_para.pad_ds_tune, host->base + PAD_DS_TUNE); writel(host->save_para.pad_ds_tune, host->base + PAD_DS_TUNE);
writel(host->save_para.pad_cmd_tune, host->base + PAD_CMD_TUNE); writel(host->save_para.pad_cmd_tune, host->base + PAD_CMD_TUNE);
writel(host->save_para.emmc50_cfg0, host->base + EMMC50_CFG0); writel(host->save_para.emmc50_cfg0, host->base + EMMC50_CFG0);
--
2.11.0

View file

@ -14,8 +14,6 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mtk-sd.c | 7 +++++++ drivers/mmc/host/mtk-sd.c | 7 +++++++
1 file changed, 7 insertions(+) 1 file changed, 7 insertions(+)
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 8113bacc1540..eceaee86ba4d 100644
--- 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
@@ -316,6 +316,7 @@ struct mtk_mmc_compatible { @@ -316,6 +316,7 @@ struct mtk_mmc_compatible {
@ -26,7 +24,7 @@ index 8113bacc1540..eceaee86ba4d 100644
}; };
struct msdc_tune_para { struct msdc_tune_para {
@@ -380,6 +381,7 @@ static const struct mtk_mmc_compatible mt8135_compat = { @@ -380,6 +381,7 @@ static const struct mtk_mmc_compatible m
.pad_tune_reg = MSDC_PAD_TUNE, .pad_tune_reg = MSDC_PAD_TUNE,
.async_fifo = false, .async_fifo = false,
.data_tune = false, .data_tune = false,
@ -34,7 +32,7 @@ index 8113bacc1540..eceaee86ba4d 100644
}; };
static const struct mtk_mmc_compatible mt8173_compat = { static const struct mtk_mmc_compatible mt8173_compat = {
@@ -388,6 +390,7 @@ static const struct mtk_mmc_compatible mt8173_compat = { @@ -388,6 +390,7 @@ static const struct mtk_mmc_compatible m
.pad_tune_reg = MSDC_PAD_TUNE, .pad_tune_reg = MSDC_PAD_TUNE,
.async_fifo = false, .async_fifo = false,
.data_tune = false, .data_tune = false,
@ -42,7 +40,7 @@ index 8113bacc1540..eceaee86ba4d 100644
}; };
static const struct mtk_mmc_compatible mt2701_compat = { static const struct mtk_mmc_compatible mt2701_compat = {
@@ -396,6 +399,7 @@ static const struct mtk_mmc_compatible mt2701_compat = { @@ -396,6 +399,7 @@ static const struct mtk_mmc_compatible m
.pad_tune_reg = MSDC_PAD_TUNE0, .pad_tune_reg = MSDC_PAD_TUNE0,
.async_fifo = true, .async_fifo = true,
.data_tune = true, .data_tune = true,
@ -50,7 +48,7 @@ index 8113bacc1540..eceaee86ba4d 100644
}; };
static const struct mtk_mmc_compatible mt2712_compat = { static const struct mtk_mmc_compatible mt2712_compat = {
@@ -404,6 +408,7 @@ static const struct mtk_mmc_compatible mt2712_compat = { @@ -404,6 +408,7 @@ static const struct mtk_mmc_compatible m
.pad_tune_reg = MSDC_PAD_TUNE0, .pad_tune_reg = MSDC_PAD_TUNE0,
.async_fifo = true, .async_fifo = true,
.data_tune = true, .data_tune = true,
@ -58,7 +56,7 @@ index 8113bacc1540..eceaee86ba4d 100644
}; };
static const struct of_device_id msdc_of_ids[] = { static const struct of_device_id msdc_of_ids[] = {
@@ -1275,6 +1280,8 @@ static void msdc_init_hw(struct msdc_host *host) @@ -1275,6 +1280,8 @@ static void msdc_init_hw(struct msdc_hos
sdr_set_field(host->base + MSDC_PATCH_BIT, MSDC_CKGEN_MSDC_DLY_SEL, 1); sdr_set_field(host->base + MSDC_PATCH_BIT, MSDC_CKGEN_MSDC_DLY_SEL, 1);
writel(0xffff4089, host->base + MSDC_PATCH_BIT1); writel(0xffff4089, host->base + MSDC_PATCH_BIT1);
sdr_set_bits(host->base + EMMC50_CFG0, EMMC50_CFG_CFCSTS_SEL); sdr_set_bits(host->base + EMMC50_CFG0, EMMC50_CFG_CFCSTS_SEL);
@ -67,6 +65,3 @@ index 8113bacc1540..eceaee86ba4d 100644
if (host->dev_comp->async_fifo) { if (host->dev_comp->async_fifo) {
sdr_set_field(host->base + MSDC_PATCH_BIT2, sdr_set_field(host->base + MSDC_PATCH_BIT2,
MSDC_PB2_RESPWAIT, 3); MSDC_PB2_RESPWAIT, 3);
--
2.11.0

View file

@ -14,8 +14,6 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mtk-sd.c | 47 +++++++++++++++++++++++++++++++++++++++++++---- drivers/mmc/host/mtk-sd.c | 47 +++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 43 insertions(+), 4 deletions(-) 1 file changed, 43 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index eceaee86ba4d..94d16a3a8d94 100644
--- 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
@@ -67,6 +67,7 @@ @@ -67,6 +67,7 @@
@ -80,7 +78,7 @@ index eceaee86ba4d..94d16a3a8d94 100644
}; };
struct msdc_tune_para { struct msdc_tune_para {
@@ -382,6 +395,8 @@ static const struct mtk_mmc_compatible mt8135_compat = { @@ -382,6 +395,8 @@ static const struct mtk_mmc_compatible m
.async_fifo = false, .async_fifo = false,
.data_tune = false, .data_tune = false,
.busy_check = false, .busy_check = false,
@ -89,7 +87,7 @@ index eceaee86ba4d..94d16a3a8d94 100644
}; };
static const struct mtk_mmc_compatible mt8173_compat = { static const struct mtk_mmc_compatible mt8173_compat = {
@@ -391,6 +406,8 @@ static const struct mtk_mmc_compatible mt8173_compat = { @@ -391,6 +406,8 @@ static const struct mtk_mmc_compatible m
.async_fifo = false, .async_fifo = false,
.data_tune = false, .data_tune = false,
.busy_check = false, .busy_check = false,
@ -98,7 +96,7 @@ index eceaee86ba4d..94d16a3a8d94 100644
}; };
static const struct mtk_mmc_compatible mt2701_compat = { static const struct mtk_mmc_compatible mt2701_compat = {
@@ -400,6 +417,8 @@ static const struct mtk_mmc_compatible mt2701_compat = { @@ -400,6 +417,8 @@ static const struct mtk_mmc_compatible m
.async_fifo = true, .async_fifo = true,
.data_tune = true, .data_tune = true,
.busy_check = false, .busy_check = false,
@ -107,7 +105,7 @@ index eceaee86ba4d..94d16a3a8d94 100644
}; };
static const struct mtk_mmc_compatible mt2712_compat = { static const struct mtk_mmc_compatible mt2712_compat = {
@@ -409,6 +428,8 @@ static const struct mtk_mmc_compatible mt2712_compat = { @@ -409,6 +428,8 @@ static const struct mtk_mmc_compatible m
.async_fifo = true, .async_fifo = true,
.data_tune = true, .data_tune = true,
.busy_check = true, .busy_check = true,
@ -116,7 +114,7 @@ index eceaee86ba4d..94d16a3a8d94 100644
}; };
static const struct of_device_id msdc_of_ids[] = { static const struct of_device_id msdc_of_ids[] = {
@@ -1280,15 +1301,31 @@ static void msdc_init_hw(struct msdc_host *host) @@ -1280,15 +1301,31 @@ static void msdc_init_hw(struct msdc_hos
sdr_set_field(host->base + MSDC_PATCH_BIT, MSDC_CKGEN_MSDC_DLY_SEL, 1); sdr_set_field(host->base + MSDC_PATCH_BIT, MSDC_CKGEN_MSDC_DLY_SEL, 1);
writel(0xffff4089, host->base + MSDC_PATCH_BIT1); writel(0xffff4089, host->base + MSDC_PATCH_BIT1);
sdr_set_bits(host->base + EMMC50_CFG0, EMMC50_CFG_CFCSTS_SEL); sdr_set_bits(host->base + EMMC50_CFG0, EMMC50_CFG_CFCSTS_SEL);
@ -152,7 +150,7 @@ index eceaee86ba4d..94d16a3a8d94 100644
/* use async fifo, then no need tune internal delay */ /* use async fifo, then no need tune internal delay */
sdr_clr_bits(host->base + MSDC_PATCH_BIT2, sdr_clr_bits(host->base + MSDC_PATCH_BIT2,
MSDC_PATCH_BIT2_CFGRESP); MSDC_PATCH_BIT2_CFGRESP);
@@ -1933,6 +1970,7 @@ static void msdc_save_reg(struct msdc_host *host) @@ -1933,6 +1970,7 @@ static void msdc_save_reg(struct msdc_ho
host->save_para.pad_ds_tune = readl(host->base + PAD_DS_TUNE); host->save_para.pad_ds_tune = readl(host->base + PAD_DS_TUNE);
host->save_para.pad_cmd_tune = readl(host->base + PAD_CMD_TUNE); host->save_para.pad_cmd_tune = readl(host->base + PAD_CMD_TUNE);
host->save_para.emmc50_cfg0 = readl(host->base + EMMC50_CFG0); host->save_para.emmc50_cfg0 = readl(host->base + EMMC50_CFG0);
@ -160,7 +158,7 @@ index eceaee86ba4d..94d16a3a8d94 100644
} }
static void msdc_restore_reg(struct msdc_host *host) static void msdc_restore_reg(struct msdc_host *host)
@@ -1949,6 +1987,7 @@ static void msdc_restore_reg(struct msdc_host *host) @@ -1949,6 +1987,7 @@ static void msdc_restore_reg(struct msdc
writel(host->save_para.pad_ds_tune, host->base + PAD_DS_TUNE); writel(host->save_para.pad_ds_tune, host->base + PAD_DS_TUNE);
writel(host->save_para.pad_cmd_tune, host->base + PAD_CMD_TUNE); writel(host->save_para.pad_cmd_tune, host->base + PAD_CMD_TUNE);
writel(host->save_para.emmc50_cfg0, host->base + EMMC50_CFG0); writel(host->save_para.emmc50_cfg0, host->base + EMMC50_CFG0);
@ -168,6 +166,3 @@ index eceaee86ba4d..94d16a3a8d94 100644
} }
static int msdc_runtime_suspend(struct device *dev) static int msdc_runtime_suspend(struct device *dev)
--
2.11.0

View file

@ -13,8 +13,6 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mtk-sd.c | 23 ++++++++++++++++++++++- drivers/mmc/host/mtk-sd.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-) 1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 94d16a3a8d94..a2f26c9b17b4 100644
--- 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
@@ -372,6 +372,7 @@ struct msdc_host { @@ -372,6 +372,7 @@ struct msdc_host {
@ -25,7 +23,7 @@ index 94d16a3a8d94..a2f26c9b17b4 100644
u32 mclk; /* mmc subsystem clock frequency */ u32 mclk; /* mmc subsystem clock frequency */
u32 src_clk_freq; /* source clock frequency */ u32 src_clk_freq; /* source clock frequency */
u32 sclk; /* SD/MS bus clock frequency */ u32 sclk; /* SD/MS bus clock frequency */
@@ -616,6 +617,7 @@ static void msdc_set_timeout(struct msdc_host *host, u32 ns, u32 clks) @@ -616,6 +617,7 @@ static void msdc_set_timeout(struct msdc
static void msdc_gate_clock(struct msdc_host *host) static void msdc_gate_clock(struct msdc_host *host)
{ {
@ -33,7 +31,7 @@ index 94d16a3a8d94..a2f26c9b17b4 100644
clk_disable_unprepare(host->src_clk); clk_disable_unprepare(host->src_clk);
clk_disable_unprepare(host->h_clk); clk_disable_unprepare(host->h_clk);
} }
@@ -624,6 +626,7 @@ static void msdc_ungate_clock(struct msdc_host *host) @@ -624,6 +626,7 @@ static void msdc_ungate_clock(struct msd
{ {
clk_prepare_enable(host->h_clk); clk_prepare_enable(host->h_clk);
clk_prepare_enable(host->src_clk); clk_prepare_enable(host->src_clk);
@ -41,7 +39,7 @@ index 94d16a3a8d94..a2f26c9b17b4 100644
while (!(readl(host->base + MSDC_CFG) & MSDC_CFG_CKSTB)) while (!(readl(host->base + MSDC_CFG) & MSDC_CFG_CKSTB))
cpu_relax(); cpu_relax();
} }
@@ -692,6 +695,15 @@ static void msdc_set_mclk(struct msdc_host *host, unsigned char timing, u32 hz) @@ -692,6 +695,15 @@ static void msdc_set_mclk(struct msdc_ho
sclk = (host->src_clk_freq >> 2) / div; sclk = (host->src_clk_freq >> 2) / div;
} }
} }
@ -57,7 +55,7 @@ index 94d16a3a8d94..a2f26c9b17b4 100644
if (host->dev_comp->clk_div_bits == 8) if (host->dev_comp->clk_div_bits == 8)
sdr_set_field(host->base + MSDC_CFG, sdr_set_field(host->base + MSDC_CFG,
MSDC_CFG_CKMOD | MSDC_CFG_CKDIV, MSDC_CFG_CKMOD | MSDC_CFG_CKDIV,
@@ -700,10 +712,14 @@ static void msdc_set_mclk(struct msdc_host *host, unsigned char timing, u32 hz) @@ -700,10 +712,14 @@ static void msdc_set_mclk(struct msdc_ho
sdr_set_field(host->base + MSDC_CFG, sdr_set_field(host->base + MSDC_CFG,
MSDC_CFG_CKMOD_EXTRA | MSDC_CFG_CKDIV_EXTRA, MSDC_CFG_CKMOD_EXTRA | MSDC_CFG_CKDIV_EXTRA,
(mode << 12) | div); (mode << 12) | div);
@ -73,7 +71,7 @@ index 94d16a3a8d94..a2f26c9b17b4 100644
host->sclk = sclk; host->sclk = sclk;
host->mclk = hz; host->mclk = hz;
host->timing = timing; host->timing = timing;
@@ -1822,6 +1838,11 @@ static int msdc_drv_probe(struct platform_device *pdev) @@ -1822,6 +1838,11 @@ static int msdc_drv_probe(struct platfor
goto host_free; goto host_free;
} }
@ -85,6 +83,3 @@ index 94d16a3a8d94..a2f26c9b17b4 100644
host->irq = platform_get_irq(pdev, 0); host->irq = platform_get_irq(pdev, 0);
if (host->irq < 0) { if (host->irq < 0) {
ret = -EINVAL; ret = -EINVAL;
--
2.11.0

View file

@ -14,8 +14,6 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mtk-sd.c | 6 ++++++ drivers/mmc/host/mtk-sd.c | 6 ++++++
1 file changed, 6 insertions(+) 1 file changed, 6 insertions(+)
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index a2f26c9b17b4..d75a93d6803f 100644
--- 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
@@ -378,6 +378,7 @@ struct msdc_host { @@ -378,6 +378,7 @@ struct msdc_host {
@ -26,7 +24,7 @@ index a2f26c9b17b4..d75a93d6803f 100644
u32 hs400_ds_delay; u32 hs400_ds_delay;
u32 hs200_cmd_int_delay; /* cmd internal delay for HS200/SDR104 */ u32 hs200_cmd_int_delay; /* cmd internal delay for HS200/SDR104 */
u32 hs400_cmd_int_delay; /* cmd internal delay for HS400 */ u32 hs400_cmd_int_delay; /* cmd internal delay for HS400 */
@@ -1661,6 +1662,8 @@ static int msdc_tune_data(struct mmc_host *mmc, u32 opcode) @@ -1661,6 +1662,8 @@ static int msdc_tune_data(struct mmc_hos
u32 tune_reg = host->dev_comp->pad_tune_reg; u32 tune_reg = host->dev_comp->pad_tune_reg;
int i, ret; int i, ret;
@ -35,7 +33,7 @@ index a2f26c9b17b4..d75a93d6803f 100644
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);
for (i = 0 ; i < PAD_DELAY_MAX; i++) { for (i = 0 ; i < PAD_DELAY_MAX; i++) {
@@ -1773,6 +1776,9 @@ static const struct mmc_host_ops mt_msdc_ops = { @@ -1773,6 +1776,9 @@ static const struct mmc_host_ops mt_msdc
static void msdc_of_property_parse(struct platform_device *pdev, static void msdc_of_property_parse(struct platform_device *pdev,
struct msdc_host *host) struct msdc_host *host)
{ {
@ -45,6 +43,3 @@ index a2f26c9b17b4..d75a93d6803f 100644
of_property_read_u32(pdev->dev.of_node, "hs400-ds-delay", of_property_read_u32(pdev->dev.of_node, "hs400-ds-delay",
&host->hs400_ds_delay); &host->hs400_ds_delay);
--
2.11.0

View file

@ -13,8 +13,6 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mtk-sd.c | 9 +++++++++ drivers/mmc/host/mtk-sd.c | 9 +++++++++
1 file changed, 9 insertions(+) 1 file changed, 9 insertions(+)
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index d75a93d6803f..95759bba0dd0 100644
--- 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
@@ -81,6 +81,7 @@ @@ -81,6 +81,7 @@
@ -42,7 +40,7 @@ index d75a93d6803f..95759bba0dd0 100644
u32 sdc_fifo_cfg; u32 sdc_fifo_cfg;
}; };
@@ -1747,6 +1751,9 @@ static int msdc_prepare_hs400_tuning(struct mmc_host *mmc, struct mmc_ios *ios) @@ -1747,6 +1751,9 @@ static int msdc_prepare_hs400_tuning(str
writel(host->hs400_ds_delay, host->base + PAD_DS_TUNE); writel(host->hs400_ds_delay, host->base + PAD_DS_TUNE);
/* hs400 mode must set it to 0 */ /* hs400 mode must set it to 0 */
sdr_clr_bits(host->base + MSDC_PATCH_BIT2, MSDC_PATCH_BIT2_CFGCRCSTS); sdr_clr_bits(host->base + MSDC_PATCH_BIT2, MSDC_PATCH_BIT2_CFGCRCSTS);
@ -52,7 +50,7 @@ index d75a93d6803f..95759bba0dd0 100644
return 0; return 0;
} }
@@ -1997,6 +2004,7 @@ static void msdc_save_reg(struct msdc_host *host) @@ -1997,6 +2004,7 @@ static void msdc_save_reg(struct msdc_ho
host->save_para.pad_ds_tune = readl(host->base + PAD_DS_TUNE); host->save_para.pad_ds_tune = readl(host->base + PAD_DS_TUNE);
host->save_para.pad_cmd_tune = readl(host->base + PAD_CMD_TUNE); host->save_para.pad_cmd_tune = readl(host->base + PAD_CMD_TUNE);
host->save_para.emmc50_cfg0 = readl(host->base + EMMC50_CFG0); host->save_para.emmc50_cfg0 = readl(host->base + EMMC50_CFG0);
@ -60,7 +58,7 @@ index d75a93d6803f..95759bba0dd0 100644
host->save_para.sdc_fifo_cfg = readl(host->base + SDC_FIFO_CFG); host->save_para.sdc_fifo_cfg = readl(host->base + SDC_FIFO_CFG);
} }
@@ -2014,6 +2022,7 @@ static void msdc_restore_reg(struct msdc_host *host) @@ -2014,6 +2022,7 @@ static void msdc_restore_reg(struct msdc
writel(host->save_para.pad_ds_tune, host->base + PAD_DS_TUNE); writel(host->save_para.pad_ds_tune, host->base + PAD_DS_TUNE);
writel(host->save_para.pad_cmd_tune, host->base + PAD_CMD_TUNE); writel(host->save_para.pad_cmd_tune, host->base + PAD_CMD_TUNE);
writel(host->save_para.emmc50_cfg0, host->base + EMMC50_CFG0); writel(host->save_para.emmc50_cfg0, host->base + EMMC50_CFG0);
@ -68,6 +66,3 @@ index d75a93d6803f..95759bba0dd0 100644
writel(host->save_para.sdc_fifo_cfg, host->base + SDC_FIFO_CFG); writel(host->save_para.sdc_fifo_cfg, host->base + SDC_FIFO_CFG);
} }
--
2.11.0

View file

@ -14,11 +14,9 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mtk-sd.c | 3 ++- drivers/mmc/host/mtk-sd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-) 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 95759bba0dd0..27a62254f12f 100644
--- 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
@@ -1550,7 +1550,8 @@ static int msdc_tune_response(struct mmc_host *mmc, u32 opcode) @@ -1550,7 +1550,8 @@ static int msdc_tune_response(struct mmc
} }
final_rise_delay = get_best_delay(host, rise_delay); final_rise_delay = get_best_delay(host, rise_delay);
/* if rising edge has enough margin, then do not scan falling edge */ /* if rising edge has enough margin, then do not scan falling edge */
@ -28,6 +26,3 @@ index 95759bba0dd0..27a62254f12f 100644
goto skip_fall; goto skip_fall;
sdr_set_bits(host->base + MSDC_IOCON, MSDC_IOCON_RSPL); sdr_set_bits(host->base + MSDC_IOCON, MSDC_IOCON_RSPL);
--
2.11.0

View file

@ -15,8 +15,6 @@ Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-mediatek.c | 53 ++++++++++++++++++++++++++++++++++++++-------- drivers/pwm/pwm-mediatek.c | 53 ++++++++++++++++++++++++++++++++++++++--------
1 file changed, 44 insertions(+), 9 deletions(-) 1 file changed, 44 insertions(+), 9 deletions(-)
diff --git a/drivers/pwm/pwm-mediatek.c b/drivers/pwm/pwm-mediatek.c
index b52f3afb2ba1..f5d97e0ad52b 100644
--- a/drivers/pwm/pwm-mediatek.c --- a/drivers/pwm/pwm-mediatek.c
+++ b/drivers/pwm/pwm-mediatek.c +++ b/drivers/pwm/pwm-mediatek.c
@@ -16,6 +16,7 @@ @@ -16,6 +16,7 @@
@ -60,7 +58,7 @@ index b52f3afb2ba1..f5d97e0ad52b 100644
static inline struct mtk_pwm_chip *to_mtk_pwm_chip(struct pwm_chip *chip) static inline struct mtk_pwm_chip *to_mtk_pwm_chip(struct pwm_chip *chip)
{ {
return container_of(chip, struct mtk_pwm_chip, chip); return container_of(chip, struct mtk_pwm_chip, chip);
@@ -103,14 +116,14 @@ static void mtk_pwm_clk_disable(struct pwm_chip *chip, struct pwm_device *pwm) @@ -103,14 +116,14 @@ static void mtk_pwm_clk_disable(struct p
static inline u32 mtk_pwm_readl(struct mtk_pwm_chip *chip, unsigned int num, static inline u32 mtk_pwm_readl(struct mtk_pwm_chip *chip, unsigned int num,
unsigned int offset) unsigned int offset)
{ {
@ -77,7 +75,7 @@ index b52f3afb2ba1..f5d97e0ad52b 100644
} }
static int mtk_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, static int mtk_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
@@ -185,6 +198,7 @@ static const struct pwm_ops mtk_pwm_ops = { @@ -185,6 +198,7 @@ static const struct pwm_ops mtk_pwm_ops
static int mtk_pwm_probe(struct platform_device *pdev) static int mtk_pwm_probe(struct platform_device *pdev)
{ {
@ -85,7 +83,7 @@ index b52f3afb2ba1..f5d97e0ad52b 100644
struct mtk_pwm_chip *pc; struct mtk_pwm_chip *pc;
struct resource *res; struct resource *res;
unsigned int i; unsigned int i;
@@ -194,15 +208,22 @@ static int mtk_pwm_probe(struct platform_device *pdev) @@ -194,15 +208,22 @@ static int mtk_pwm_probe(struct platform
if (!pc) if (!pc)
return -ENOMEM; return -ENOMEM;
@ -110,7 +108,7 @@ index b52f3afb2ba1..f5d97e0ad52b 100644
} }
platform_set_drvdata(pdev, pc); platform_set_drvdata(pdev, pc);
@@ -210,7 +231,7 @@ static int mtk_pwm_probe(struct platform_device *pdev) @@ -210,7 +231,7 @@ static int mtk_pwm_probe(struct platform
pc->chip.dev = &pdev->dev; pc->chip.dev = &pdev->dev;
pc->chip.ops = &mtk_pwm_ops; pc->chip.ops = &mtk_pwm_ops;
pc->chip.base = -1; pc->chip.base = -1;
@ -119,7 +117,7 @@ index b52f3afb2ba1..f5d97e0ad52b 100644
ret = pwmchip_add(&pc->chip); ret = pwmchip_add(&pc->chip);
if (ret < 0) { if (ret < 0) {
@@ -228,9 +249,23 @@ static int mtk_pwm_remove(struct platform_device *pdev) @@ -228,9 +249,23 @@ static int mtk_pwm_remove(struct platfor
return pwmchip_remove(&pc->chip); return pwmchip_remove(&pc->chip);
} }
@ -145,6 +143,3 @@ index b52f3afb2ba1..f5d97e0ad52b 100644
}; };
MODULE_DEVICE_TABLE(of, mtk_pwm_of_match); MODULE_DEVICE_TABLE(of, mtk_pwm_of_match);
--
2.11.0

View file

@ -15,11 +15,9 @@ Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/mtk_nand.c | 8 ++------ drivers/mtd/nand/mtk_nand.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-) 1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/mtd/nand/mtk_nand.c b/drivers/mtd/nand/mtk_nand.c
index d86a7d131cc0..6d0101e13ef6 100644
--- a/drivers/mtd/nand/mtk_nand.c --- a/drivers/mtd/nand/mtk_nand.c
+++ b/drivers/mtd/nand/mtk_nand.c +++ b/drivers/mtd/nand/mtk_nand.c
@@ -1540,7 +1540,6 @@ static int mtk_nfc_resume(struct device *dev) @@ -1540,7 +1540,6 @@ static int mtk_nfc_resume(struct device
struct mtk_nfc *nfc = dev_get_drvdata(dev); struct mtk_nfc *nfc = dev_get_drvdata(dev);
struct mtk_nfc_nand_chip *chip; struct mtk_nfc_nand_chip *chip;
struct nand_chip *nand; struct nand_chip *nand;
@ -27,7 +25,7 @@ index d86a7d131cc0..6d0101e13ef6 100644
int ret; int ret;
u32 i; u32 i;
@@ -1553,11 +1552,8 @@ static int mtk_nfc_resume(struct device *dev) @@ -1553,11 +1552,8 @@ static int mtk_nfc_resume(struct device
/* reset NAND chip if VCC was powered off */ /* reset NAND chip if VCC was powered off */
list_for_each_entry(chip, &nfc->chips, node) { list_for_each_entry(chip, &nfc->chips, node) {
nand = &chip->nand; nand = &chip->nand;
@ -41,6 +39,3 @@ index d86a7d131cc0..6d0101e13ef6 100644
} }
return 0; return 0;
--
2.11.0

View file

@ -12,11 +12,9 @@ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/mediatek-cpufreq.c | 1 + drivers/cpufreq/mediatek-cpufreq.c | 1 +
1 file changed, 1 insertion(+) 1 file changed, 1 insertion(+)
diff --git a/drivers/cpufreq/mediatek-cpufreq.c b/drivers/cpufreq/mediatek-cpufreq.c
index 18c4bd9a5c65..62aec5cdbb26 100644
--- a/drivers/cpufreq/mediatek-cpufreq.c --- a/drivers/cpufreq/mediatek-cpufreq.c
+++ b/drivers/cpufreq/mediatek-cpufreq.c +++ b/drivers/cpufreq/mediatek-cpufreq.c
@@ -574,6 +574,7 @@ static struct platform_driver mtk_cpufreq_platdrv = { @@ -574,6 +574,7 @@ static struct platform_driver mtk_cpufre
/* List of machines supported by this driver */ /* List of machines supported by this driver */
static const struct of_device_id mtk_cpufreq_machines[] __initconst = { static const struct of_device_id mtk_cpufreq_machines[] __initconst = {
{ .compatible = "mediatek,mt2701", }, { .compatible = "mediatek,mt2701", },
@ -24,6 +22,3 @@ index 18c4bd9a5c65..62aec5cdbb26 100644
{ .compatible = "mediatek,mt7622", }, { .compatible = "mediatek,mt7622", },
{ .compatible = "mediatek,mt7623", }, { .compatible = "mediatek,mt7623", },
{ .compatible = "mediatek,mt817x", }, { .compatible = "mediatek,mt817x", },
--
2.11.0

View file

@ -12,8 +12,6 @@ Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Documentation/devicetree/bindings/mtd/mtk-nand.txt | 11 ++++++++--- Documentation/devicetree/bindings/mtd/mtk-nand.txt | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-) 1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/mtd/mtk-nand.txt b/Documentation/devicetree/bindings/mtd/mtk-nand.txt
index dbf9e054c11c..0025bc4c94a0 100644
--- a/Documentation/devicetree/bindings/mtd/mtk-nand.txt --- a/Documentation/devicetree/bindings/mtd/mtk-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/mtk-nand.txt +++ b/Documentation/devicetree/bindings/mtd/mtk-nand.txt
@@ -12,8 +12,10 @@ tree nodes. @@ -12,8 +12,10 @@ tree nodes.
@ -41,6 +39,3 @@ index dbf9e054c11c..0025bc4c94a0 100644
- reg: Base physical address and size of ECC. - reg: Base physical address and size of ECC.
- interrupts: Interrupts of ECC. - interrupts: Interrupts of ECC.
- clocks: ECC required clocks. - clocks: ECC required clocks.
--
2.11.0

View file

@ -30,8 +30,6 @@ Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/mtk_nand.c | 27 ++++++++---- drivers/mtd/nand/mtk_nand.c | 27 ++++++++----
3 files changed, 89 insertions(+), 41 deletions(-) 3 files changed, 89 insertions(+), 41 deletions(-)
diff --git a/drivers/mtd/nand/mtk_ecc.c b/drivers/mtd/nand/mtk_ecc.c
index c51d214d169e..6610eefaa92b 100644
--- a/drivers/mtd/nand/mtk_ecc.c --- a/drivers/mtd/nand/mtk_ecc.c
+++ b/drivers/mtd/nand/mtk_ecc.c +++ b/drivers/mtd/nand/mtk_ecc.c
@@ -34,34 +34,28 @@ @@ -34,34 +34,28 @@
@ -72,7 +70,7 @@ index c51d214d169e..6610eefaa92b 100644
int pg_irq_sel; int pg_irq_sel;
}; };
@@ -89,6 +83,33 @@ static const u8 ecc_strength_mt2712[] = { @@ -89,6 +83,33 @@ static const u8 ecc_strength_mt2712[] =
40, 44, 48, 52, 56, 60, 68, 72, 80 40, 44, 48, 52, 56, 60, 68, 72, 80
}; };
@ -106,7 +104,7 @@ index c51d214d169e..6610eefaa92b 100644
static inline void mtk_ecc_wait_idle(struct mtk_ecc *ecc, static inline void mtk_ecc_wait_idle(struct mtk_ecc *ecc,
enum mtk_ecc_operation op) enum mtk_ecc_operation op)
{ {
@@ -107,32 +128,30 @@ static inline void mtk_ecc_wait_idle(struct mtk_ecc *ecc, @@ -107,32 +128,30 @@ static inline void mtk_ecc_wait_idle(str
static irqreturn_t mtk_ecc_irq(int irq, void *id) static irqreturn_t mtk_ecc_irq(int irq, void *id)
{ {
struct mtk_ecc *ecc = id; struct mtk_ecc *ecc = id;
@ -147,7 +145,7 @@ index c51d214d169e..6610eefaa92b 100644
} }
return IRQ_HANDLED; return IRQ_HANDLED;
@@ -160,7 +179,7 @@ static int mtk_ecc_config(struct mtk_ecc *ecc, struct mtk_ecc_config *config) @@ -160,7 +179,7 @@ static int mtk_ecc_config(struct mtk_ecc
/* configure ECC encoder (in bits) */ /* configure ECC encoder (in bits) */
enc_sz = config->len << 3; enc_sz = config->len << 3;
@ -156,7 +154,7 @@ index c51d214d169e..6610eefaa92b 100644
reg |= (enc_sz << ECC_MS_SHIFT); reg |= (enc_sz << ECC_MS_SHIFT);
writel(reg, ecc->regs + ECC_ENCCNFG); writel(reg, ecc->regs + ECC_ENCCNFG);
@@ -171,9 +190,9 @@ static int mtk_ecc_config(struct mtk_ecc *ecc, struct mtk_ecc_config *config) @@ -171,9 +190,9 @@ static int mtk_ecc_config(struct mtk_ecc
} else { } else {
/* configure ECC decoder (in bits) */ /* configure ECC decoder (in bits) */
dec_sz = (config->len << 3) + dec_sz = (config->len << 3) +
@ -168,7 +166,7 @@ index c51d214d169e..6610eefaa92b 100644
reg |= (dec_sz << ECC_MS_SHIFT) | DEC_CNFG_CORRECT; reg |= (dec_sz << ECC_MS_SHIFT) | DEC_CNFG_CORRECT;
reg |= DEC_EMPTY_EN; reg |= DEC_EMPTY_EN;
writel(reg, ecc->regs + ECC_DECCNFG); writel(reg, ecc->regs + ECC_DECCNFG);
@@ -291,7 +310,12 @@ int mtk_ecc_enable(struct mtk_ecc *ecc, struct mtk_ecc_config *config) @@ -291,7 +310,12 @@ int mtk_ecc_enable(struct mtk_ecc *ecc,
*/ */
if (ecc->caps->pg_irq_sel && config->mode == ECC_NFI_MODE) if (ecc->caps->pg_irq_sel && config->mode == ECC_NFI_MODE)
reg_val |= ECC_PG_IRQ_SEL; reg_val |= ECC_PG_IRQ_SEL;
@ -182,7 +180,7 @@ index c51d214d169e..6610eefaa92b 100644
} }
writew(ECC_OP_ENABLE, ecc->regs + ECC_CTL_REG(op)); writew(ECC_OP_ENABLE, ecc->regs + ECC_CTL_REG(op));
@@ -310,13 +334,17 @@ void mtk_ecc_disable(struct mtk_ecc *ecc) @@ -310,13 +334,17 @@ void mtk_ecc_disable(struct mtk_ecc *ecc
/* disable it */ /* disable it */
mtk_ecc_wait_idle(ecc, op); mtk_ecc_wait_idle(ecc, op);
@ -203,7 +201,7 @@ index c51d214d169e..6610eefaa92b 100644
writew(ECC_OP_DISABLE, ecc->regs + ECC_CTL_REG(op)); writew(ECC_OP_DISABLE, ecc->regs + ECC_CTL_REG(op));
mutex_unlock(&ecc->lock); mutex_unlock(&ecc->lock);
@@ -367,11 +395,11 @@ int mtk_ecc_encode(struct mtk_ecc *ecc, struct mtk_ecc_config *config, @@ -367,11 +395,11 @@ int mtk_ecc_encode(struct mtk_ecc *ecc,
mtk_ecc_wait_idle(ecc, ECC_ENCODE); mtk_ecc_wait_idle(ecc, ECC_ENCODE);
/* Program ECC bytes to OOB: per sector oob = FDM + ECC + SPARE */ /* Program ECC bytes to OOB: per sector oob = FDM + ECC + SPARE */
@ -217,7 +215,7 @@ index c51d214d169e..6610eefaa92b 100644
round_up(len, 4)); round_up(len, 4));
/* copy into possibly unaligned OOB region with actual length */ /* copy into possibly unaligned OOB region with actual length */
@@ -404,19 +432,29 @@ void mtk_ecc_adjust_strength(struct mtk_ecc *ecc, u32 *p) @@ -404,19 +432,29 @@ void mtk_ecc_adjust_strength(struct mtk_
} }
EXPORT_SYMBOL(mtk_ecc_adjust_strength); EXPORT_SYMBOL(mtk_ecc_adjust_strength);
@ -249,7 +247,7 @@ index c51d214d169e..6610eefaa92b 100644
.pg_irq_sel = 1, .pg_irq_sel = 1,
}; };
@@ -452,7 +490,7 @@ static int mtk_ecc_probe(struct platform_device *pdev) @@ -452,7 +490,7 @@ static int mtk_ecc_probe(struct platform
max_eccdata_size = ecc->caps->num_ecc_strength - 1; max_eccdata_size = ecc->caps->num_ecc_strength - 1;
max_eccdata_size = ecc->caps->ecc_strength[max_eccdata_size]; max_eccdata_size = ecc->caps->ecc_strength[max_eccdata_size];
@ -258,8 +256,6 @@ index c51d214d169e..6610eefaa92b 100644
max_eccdata_size = round_up(max_eccdata_size, 4); max_eccdata_size = round_up(max_eccdata_size, 4);
ecc->eccdata = devm_kzalloc(dev, max_eccdata_size, GFP_KERNEL); ecc->eccdata = devm_kzalloc(dev, max_eccdata_size, GFP_KERNEL);
if (!ecc->eccdata) if (!ecc->eccdata)
diff --git a/drivers/mtd/nand/mtk_ecc.h b/drivers/mtd/nand/mtk_ecc.h
index d245c14f1b80..a455df080952 100644
--- a/drivers/mtd/nand/mtk_ecc.h --- a/drivers/mtd/nand/mtk_ecc.h
+++ b/drivers/mtd/nand/mtk_ecc.h +++ b/drivers/mtd/nand/mtk_ecc.h
@@ -14,8 +14,6 @@ @@ -14,8 +14,6 @@
@ -271,7 +267,7 @@ index d245c14f1b80..a455df080952 100644
enum mtk_ecc_mode {ECC_DMA_MODE = 0, ECC_NFI_MODE = 1}; enum mtk_ecc_mode {ECC_DMA_MODE = 0, ECC_NFI_MODE = 1};
enum mtk_ecc_operation {ECC_ENCODE, ECC_DECODE}; enum mtk_ecc_operation {ECC_ENCODE, ECC_DECODE};
@@ -43,6 +41,7 @@ int mtk_ecc_wait_done(struct mtk_ecc *, enum mtk_ecc_operation); @@ -43,6 +41,7 @@ int mtk_ecc_wait_done(struct mtk_ecc *,
int mtk_ecc_enable(struct mtk_ecc *, struct mtk_ecc_config *); int mtk_ecc_enable(struct mtk_ecc *, struct mtk_ecc_config *);
void mtk_ecc_disable(struct mtk_ecc *); void mtk_ecc_disable(struct mtk_ecc *);
void mtk_ecc_adjust_strength(struct mtk_ecc *ecc, u32 *p); void mtk_ecc_adjust_strength(struct mtk_ecc *ecc, u32 *p);
@ -279,8 +275,6 @@ index d245c14f1b80..a455df080952 100644
struct mtk_ecc *of_mtk_ecc_get(struct device_node *); struct mtk_ecc *of_mtk_ecc_get(struct device_node *);
void mtk_ecc_release(struct mtk_ecc *); void mtk_ecc_release(struct mtk_ecc *);
diff --git a/drivers/mtd/nand/mtk_nand.c b/drivers/mtd/nand/mtk_nand.c
index 6d0101e13ef6..7349aa846f9a 100644
--- a/drivers/mtd/nand/mtk_nand.c --- a/drivers/mtd/nand/mtk_nand.c
+++ b/drivers/mtd/nand/mtk_nand.c +++ b/drivers/mtd/nand/mtk_nand.c
@@ -97,7 +97,6 @@ @@ -97,7 +97,6 @@
@ -300,7 +294,7 @@ index 6d0101e13ef6..7349aa846f9a 100644
}; };
struct mtk_nfc_bad_mark_ctl { struct mtk_nfc_bad_mark_ctl {
@@ -450,7 +451,7 @@ static inline u8 mtk_nfc_read_byte(struct mtd_info *mtd) @@ -450,7 +451,7 @@ static inline u8 mtk_nfc_read_byte(struc
* set to max sector to allow the HW to continue reading over * set to max sector to allow the HW to continue reading over
* unaligned accesses * unaligned accesses
*/ */
@ -309,7 +303,7 @@ index 6d0101e13ef6..7349aa846f9a 100644
nfi_writel(nfc, reg, NFI_CON); nfi_writel(nfc, reg, NFI_CON);
/* trigger to fetch data */ /* trigger to fetch data */
@@ -481,7 +482,7 @@ static void mtk_nfc_write_byte(struct mtd_info *mtd, u8 byte) @@ -481,7 +482,7 @@ static void mtk_nfc_write_byte(struct mt
reg = nfi_readw(nfc, NFI_CNFG) | CNFG_BYTE_RW; reg = nfi_readw(nfc, NFI_CNFG) | CNFG_BYTE_RW;
nfi_writew(nfc, reg, NFI_CNFG); nfi_writew(nfc, reg, NFI_CNFG);
@ -318,7 +312,7 @@ index 6d0101e13ef6..7349aa846f9a 100644
nfi_writel(nfc, reg, NFI_CON); nfi_writel(nfc, reg, NFI_CON);
nfi_writew(nfc, STAR_EN, NFI_STRDATA); nfi_writew(nfc, STAR_EN, NFI_STRDATA);
@@ -1126,9 +1127,11 @@ static void mtk_nfc_set_fdm(struct mtk_nfc_fdm *fdm, struct mtd_info *mtd) @@ -1126,9 +1127,11 @@ static void mtk_nfc_set_fdm(struct mtk_n
{ {
struct nand_chip *nand = mtd_to_nand(mtd); struct nand_chip *nand = mtd_to_nand(mtd);
struct mtk_nfc_nand_chip *chip = to_mtk_nand(nand); struct mtk_nfc_nand_chip *chip = to_mtk_nand(nand);
@ -331,7 +325,7 @@ index 6d0101e13ef6..7349aa846f9a 100644
fdm->reg_size = chip->spare_per_sector - ecc_bytes; fdm->reg_size = chip->spare_per_sector - ecc_bytes;
if (fdm->reg_size > NFI_FDM_MAX_SIZE) if (fdm->reg_size > NFI_FDM_MAX_SIZE)
@@ -1208,7 +1211,8 @@ static int mtk_nfc_ecc_init(struct device *dev, struct mtd_info *mtd) @@ -1208,7 +1211,8 @@ static int mtk_nfc_ecc_init(struct devic
* this controller only supports 512 and 1024 sizes * this controller only supports 512 and 1024 sizes
*/ */
if (nand->ecc.size < 1024) { if (nand->ecc.size < 1024) {
@ -341,7 +335,7 @@ index 6d0101e13ef6..7349aa846f9a 100644
nand->ecc.size = 1024; nand->ecc.size = 1024;
nand->ecc.strength <<= 1; nand->ecc.strength <<= 1;
} else { } else {
@@ -1223,7 +1227,8 @@ static int mtk_nfc_ecc_init(struct device *dev, struct mtd_info *mtd) @@ -1223,7 +1227,8 @@ static int mtk_nfc_ecc_init(struct devic
return ret; return ret;
/* calculate oob bytes except ecc parity data */ /* calculate oob bytes except ecc parity data */
@ -351,7 +345,7 @@ index 6d0101e13ef6..7349aa846f9a 100644
free = spare - free; free = spare - free;
/* /*
@@ -1233,10 +1238,12 @@ static int mtk_nfc_ecc_init(struct device *dev, struct mtd_info *mtd) @@ -1233,10 +1238,12 @@ static int mtk_nfc_ecc_init(struct devic
*/ */
if (free > NFI_FDM_MAX_SIZE) { if (free > NFI_FDM_MAX_SIZE) {
spare -= NFI_FDM_MAX_SIZE; spare -= NFI_FDM_MAX_SIZE;
@ -366,7 +360,7 @@ index 6d0101e13ef6..7349aa846f9a 100644
} }
} }
@@ -1389,6 +1396,8 @@ static const struct mtk_nfc_caps mtk_nfc_caps_mt2701 = { @@ -1389,6 +1396,8 @@ static const struct mtk_nfc_caps mtk_nfc
.num_spare_size = 16, .num_spare_size = 16,
.pageformat_spare_shift = 4, .pageformat_spare_shift = 4,
.nfi_clk_div = 1, .nfi_clk_div = 1,
@ -375,7 +369,7 @@ index 6d0101e13ef6..7349aa846f9a 100644
}; };
static const struct mtk_nfc_caps mtk_nfc_caps_mt2712 = { static const struct mtk_nfc_caps mtk_nfc_caps_mt2712 = {
@@ -1396,6 +1405,8 @@ static const struct mtk_nfc_caps mtk_nfc_caps_mt2712 = { @@ -1396,6 +1405,8 @@ static const struct mtk_nfc_caps mtk_nfc
.num_spare_size = 19, .num_spare_size = 19,
.pageformat_spare_shift = 16, .pageformat_spare_shift = 16,
.nfi_clk_div = 2, .nfi_clk_div = 2,
@ -384,6 +378,3 @@ index 6d0101e13ef6..7349aa846f9a 100644
}; };
static const struct of_device_id mtk_nfc_id_table[] = { static const struct of_device_id mtk_nfc_id_table[] = {
--
2.11.0

View file

@ -12,11 +12,9 @@ Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/mtk_nand.c | 16 ++++++++++++++++ drivers/mtd/nand/mtk_nand.c | 16 ++++++++++++++++
2 files changed, 42 insertions(+) 2 files changed, 42 insertions(+)
diff --git a/drivers/mtd/nand/mtk_ecc.c b/drivers/mtd/nand/mtk_ecc.c
index 6610eefaa92b..40d86a861a70 100644
--- a/drivers/mtd/nand/mtk_ecc.c --- a/drivers/mtd/nand/mtk_ecc.c
+++ b/drivers/mtd/nand/mtk_ecc.c +++ b/drivers/mtd/nand/mtk_ecc.c
@@ -83,6 +83,10 @@ static const u8 ecc_strength_mt2712[] = { @@ -83,6 +83,10 @@ static const u8 ecc_strength_mt2712[] =
40, 44, 48, 52, 56, 60, 68, 72, 80 40, 44, 48, 52, 56, 60, 68, 72, 80
}; };
@ -43,7 +41,7 @@ index 6610eefaa92b..40d86a861a70 100644
static inline void mtk_ecc_wait_idle(struct mtk_ecc *ecc, static inline void mtk_ecc_wait_idle(struct mtk_ecc *ecc,
enum mtk_ecc_operation op) enum mtk_ecc_operation op)
{ {
@@ -458,6 +471,16 @@ static const struct mtk_ecc_caps mtk_ecc_caps_mt2712 = { @@ -458,6 +471,16 @@ static const struct mtk_ecc_caps mtk_ecc
.pg_irq_sel = 1, .pg_irq_sel = 1,
}; };
@ -60,7 +58,7 @@ index 6610eefaa92b..40d86a861a70 100644
static const struct of_device_id mtk_ecc_dt_match[] = { static const struct of_device_id mtk_ecc_dt_match[] = {
{ {
.compatible = "mediatek,mt2701-ecc", .compatible = "mediatek,mt2701-ecc",
@@ -465,6 +488,9 @@ static const struct of_device_id mtk_ecc_dt_match[] = { @@ -465,6 +488,9 @@ static const struct of_device_id mtk_ecc
}, { }, {
.compatible = "mediatek,mt2712-ecc", .compatible = "mediatek,mt2712-ecc",
.data = &mtk_ecc_caps_mt2712, .data = &mtk_ecc_caps_mt2712,
@ -70,8 +68,6 @@ index 6610eefaa92b..40d86a861a70 100644
}, },
{}, {},
}; };
diff --git a/drivers/mtd/nand/mtk_nand.c b/drivers/mtd/nand/mtk_nand.c
index 7349aa846f9a..8f71b405d639 100644
--- a/drivers/mtd/nand/mtk_nand.c --- a/drivers/mtd/nand/mtk_nand.c
+++ b/drivers/mtd/nand/mtk_nand.c +++ b/drivers/mtd/nand/mtk_nand.c
@@ -174,6 +174,10 @@ static const u8 spare_size_mt2712[] = { @@ -174,6 +174,10 @@ static const u8 spare_size_mt2712[] = {
@ -85,7 +81,7 @@ index 7349aa846f9a..8f71b405d639 100644
static inline struct mtk_nfc_nand_chip *to_mtk_nand(struct nand_chip *nand) static inline struct mtk_nfc_nand_chip *to_mtk_nand(struct nand_chip *nand)
{ {
return container_of(nand, struct mtk_nfc_nand_chip, nand); return container_of(nand, struct mtk_nfc_nand_chip, nand);
@@ -1409,6 +1413,15 @@ static const struct mtk_nfc_caps mtk_nfc_caps_mt2712 = { @@ -1409,6 +1413,15 @@ static const struct mtk_nfc_caps mtk_nfc
.max_sector_size = 1024, .max_sector_size = 1024,
}; };
@ -101,7 +97,7 @@ index 7349aa846f9a..8f71b405d639 100644
static const struct of_device_id mtk_nfc_id_table[] = { static const struct of_device_id mtk_nfc_id_table[] = {
{ {
.compatible = "mediatek,mt2701-nfc", .compatible = "mediatek,mt2701-nfc",
@@ -1416,6 +1429,9 @@ static const struct of_device_id mtk_nfc_id_table[] = { @@ -1416,6 +1429,9 @@ static const struct of_device_id mtk_nfc
}, { }, {
.compatible = "mediatek,mt2712-nfc", .compatible = "mediatek,mt2712-nfc",
.data = &mtk_nfc_caps_mt2712, .data = &mtk_nfc_caps_mt2712,
@ -111,6 +107,3 @@ index 7349aa846f9a..8f71b405d639 100644
}, },
{} {}
}; };
--
2.11.0

View file

@ -13,8 +13,6 @@ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Documentation/devicetree/bindings/mmc/mtk-sd.txt | 2 ++ Documentation/devicetree/bindings/mmc/mtk-sd.txt | 2 ++
1 file changed, 2 insertions(+) 1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.txt b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
index 72d2a734ab85..9b8017670870 100644
--- a/Documentation/devicetree/bindings/mmc/mtk-sd.txt --- a/Documentation/devicetree/bindings/mmc/mtk-sd.txt
+++ b/Documentation/devicetree/bindings/mmc/mtk-sd.txt +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
@@ -12,6 +12,8 @@ Required properties: @@ -12,6 +12,8 @@ Required properties:
@ -26,6 +24,3 @@ index 72d2a734ab85..9b8017670870 100644
- reg: physical base address of the controller and length - reg: physical base address of the controller and length
- interrupts: Should contain MSDC interrupt number - interrupts: Should contain MSDC interrupt number
- clocks: Should contain phandle for the clock feeding the MMC controller - clocks: Should contain phandle for the clock feeding the MMC controller
--
2.11.0

View file

@ -15,9 +15,6 @@ Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 file changed, 351 insertions(+) 1 file changed, 351 insertions(+)
create mode 100644 Documentation/devicetree/bindings/pinctrl/pinctrl-mt7622.txt create mode 100644 Documentation/devicetree/bindings/pinctrl/pinctrl-mt7622.txt
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt7622.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt7622.txt
new file mode 100644
index 000000000000..f18ed99f6e14
--- /dev/null --- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt7622.txt +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt7622.txt
@@ -0,0 +1,351 @@ @@ -0,0 +1,351 @@
@ -372,6 +369,3 @@ index 000000000000..f18ed99f6e14
+ }; + };
+ }; + };
+ }; + };
--
2.11.0

View file

@ -15,8 +15,6 @@ Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/mediatek/Kconfig | 5 +++-- drivers/pinctrl/mediatek/Kconfig | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-) 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/mediatek/Kconfig b/drivers/pinctrl/mediatek/Kconfig
index fac9866311f3..03b3023d5fe5 100644
--- a/drivers/pinctrl/mediatek/Kconfig --- a/drivers/pinctrl/mediatek/Kconfig
+++ b/drivers/pinctrl/mediatek/Kconfig +++ b/drivers/pinctrl/mediatek/Kconfig
@@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
@ -32,6 +30,3 @@ index fac9866311f3..03b3023d5fe5 100644
-endif -endif
+endmenu +endmenu
--
2.11.0

View file

@ -32,19 +32,15 @@ Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
4 files changed, 1608 insertions(+), 2 deletions(-) 4 files changed, 1608 insertions(+), 2 deletions(-)
create mode 100644 drivers/pinctrl/mediatek/pinctrl-mt7622.c create mode 100644 drivers/pinctrl/mediatek/pinctrl-mt7622.c
diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile
index c16e27900dbb..3a798d5b0900 100644
--- a/drivers/pinctrl/Makefile --- a/drivers/pinctrl/Makefile
+++ b/drivers/pinctrl/Makefile +++ b/drivers/pinctrl/Makefile
@@ -63,5 +63,5 @@ obj-$(CONFIG_PINCTRL_SUNXI) += sunxi/ @@ -64,5 +64,5 @@ obj-$(CONFIG_PINCTRL_SUNXI) += sunxi/
obj-y += ti/ obj-y += ti/
obj-$(CONFIG_PINCTRL_UNIPHIER) += uniphier/ obj-$(CONFIG_PINCTRL_UNIPHIER) += uniphier/
obj-$(CONFIG_ARCH_VT8500) += vt8500/ obj-$(CONFIG_ARCH_VT8500) += vt8500/
-obj-$(CONFIG_PINCTRL_MTK) += mediatek/ -obj-$(CONFIG_PINCTRL_MTK) += mediatek/
+obj-y += mediatek/ +obj-y += mediatek/
obj-$(CONFIG_PINCTRL_ZX) += zte/ obj-$(CONFIG_PINCTRL_ZX) += zte/
diff --git a/drivers/pinctrl/mediatek/Kconfig b/drivers/pinctrl/mediatek/Kconfig
index 03b3023d5fe5..3e598740b379 100644
--- a/drivers/pinctrl/mediatek/Kconfig --- a/drivers/pinctrl/mediatek/Kconfig
+++ b/drivers/pinctrl/mediatek/Kconfig +++ b/drivers/pinctrl/mediatek/Kconfig
@@ -32,6 +32,16 @@ config PINCTRL_MT8127 @@ -32,6 +32,16 @@ config PINCTRL_MT8127
@ -64,11 +60,10 @@ index 03b3023d5fe5..3e598740b379 100644
config PINCTRL_MT8173 config PINCTRL_MT8173
bool "Mediatek MT8173 pin control" bool "Mediatek MT8173 pin control"
depends on OF depends on OF
diff --git a/drivers/pinctrl/mediatek/Makefile b/drivers/pinctrl/mediatek/Makefile
index e59c613d4ddd..6e3ca6bbda7a 100644
--- a/drivers/pinctrl/mediatek/Makefile --- a/drivers/pinctrl/mediatek/Makefile
+++ b/drivers/pinctrl/mediatek/Makefile +++ b/drivers/pinctrl/mediatek/Makefile
@@ -1,9 +1,10 @@ @@ -1,10 +1,11 @@
# SPDX-License-Identifier: GPL-2.0
# Core # Core
-obj-y += pinctrl-mtk-common.o -obj-y += pinctrl-mtk-common.o
+obj-$(CONFIG_PINCTRL_MTK) += pinctrl-mtk-common.o +obj-$(CONFIG_PINCTRL_MTK) += pinctrl-mtk-common.o
@ -80,9 +75,6 @@ index e59c613d4ddd..6e3ca6bbda7a 100644
+obj-$(CONFIG_PINCTRL_MT7622) += pinctrl-mt7622.o +obj-$(CONFIG_PINCTRL_MT7622) += pinctrl-mt7622.o
obj-$(CONFIG_PINCTRL_MT8173) += pinctrl-mt8173.o obj-$(CONFIG_PINCTRL_MT8173) += pinctrl-mt8173.o
obj-$(CONFIG_PINCTRL_MT6397) += pinctrl-mt6397.o obj-$(CONFIG_PINCTRL_MT6397) += pinctrl-mt6397.o
diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7622.c b/drivers/pinctrl/mediatek/pinctrl-mt7622.c
new file mode 100644
index 000000000000..3824d82888ac
--- /dev/null --- /dev/null
+++ b/drivers/pinctrl/mediatek/pinctrl-mt7622.c +++ b/drivers/pinctrl/mediatek/pinctrl-mt7622.c
@@ -0,0 +1,1595 @@ @@ -0,0 +1,1595 @@
@ -1681,6 +1673,3 @@ index 000000000000..3824d82888ac
+ return platform_driver_register(&mtk_pinctrl_driver); + return platform_driver_register(&mtk_pinctrl_driver);
+} +}
+arch_initcall(mtk_pinctrl_init); +arch_initcall(mtk_pinctrl_init);
--
2.11.0

View file

@ -14,8 +14,6 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/mediatek/Kconfig | 96 +++++++++++++++++++++++--------------------- drivers/clk/mediatek/Kconfig | 96 +++++++++++++++++++++++---------------------
1 file changed, 50 insertions(+), 46 deletions(-) 1 file changed, 50 insertions(+), 46 deletions(-)
diff --git a/drivers/clk/mediatek/Kconfig b/drivers/clk/mediatek/Kconfig
index 59dc0aad553c..7338f816c603 100644
--- a/drivers/clk/mediatek/Kconfig --- a/drivers/clk/mediatek/Kconfig
+++ b/drivers/clk/mediatek/Kconfig +++ b/drivers/clk/mediatek/Kconfig
@@ -1,136 +1,139 @@ @@ -1,136 +1,139 @@
@ -223,6 +221,3 @@ index 59dc0aad553c..7338f816c603 100644
- This driver supports Mediatek MT8173 clocks. - This driver supports Mediatek MT8173 clocks.
+ This driver supports MediaTek MT8173 clocks. + This driver supports MediaTek MT8173 clocks.
+endmenu +endmenu
--
2.11.0

View file

@ -14,11 +14,9 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/Makefile | 2 +- drivers/clk/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
index c99f363826f0..838000f92b69 100644
--- a/drivers/clk/Makefile --- a/drivers/clk/Makefile
+++ b/drivers/clk/Makefile +++ b/drivers/clk/Makefile
@@ -66,7 +66,7 @@ obj-$(CONFIG_ARCH_MXC) += imx/ @@ -67,7 +67,7 @@ obj-$(CONFIG_ARCH_MXC) += imx/
obj-$(CONFIG_MACH_INGENIC) += ingenic/ obj-$(CONFIG_MACH_INGENIC) += ingenic/
obj-$(CONFIG_ARCH_KEYSTONE) += keystone/ obj-$(CONFIG_ARCH_KEYSTONE) += keystone/
obj-$(CONFIG_MACH_LOONGSON32) += loongson1/ obj-$(CONFIG_MACH_LOONGSON32) += loongson1/
@ -27,6 +25,3 @@ index c99f363826f0..838000f92b69 100644
obj-$(CONFIG_COMMON_CLK_AMLOGIC) += meson/ obj-$(CONFIG_COMMON_CLK_AMLOGIC) += meson/
obj-$(CONFIG_MACH_PIC32) += microchip/ obj-$(CONFIG_MACH_PIC32) += microchip/
ifeq ($(CONFIG_COMMON_CLK), y) ifeq ($(CONFIG_COMMON_CLK), y)
--
2.11.0

View file

@ -14,8 +14,6 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/devicetree/bindings/net/mediatek-net.txt | 2 +- Documentation/devicetree/bindings/net/mediatek-net.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/net/mediatek-net.txt b/Documentation/devicetree/bindings/net/mediatek-net.txt
index 214eaa9a6683..53c13ee384a4 100644
--- a/Documentation/devicetree/bindings/net/mediatek-net.txt --- a/Documentation/devicetree/bindings/net/mediatek-net.txt
+++ b/Documentation/devicetree/bindings/net/mediatek-net.txt +++ b/Documentation/devicetree/bindings/net/mediatek-net.txt
@@ -28,7 +28,7 @@ Required properties: @@ -28,7 +28,7 @@ Required properties:
@ -27,6 +25,3 @@ index 214eaa9a6683..53c13ee384a4 100644
Optional properties: Optional properties:
- interrupt-parent: Should be the phandle for the interrupt controller - interrupt-parent: Should be the phandle for the interrupt controller
--
2.11.0

View file

@ -16,10 +16,8 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mediatek/mtk_eth_soc.h | 3 +++ drivers/net/ethernet/mediatek/mtk_eth_soc.h | 3 +++
2 files changed, 24 insertions(+), 14 deletions(-) 2 files changed, 24 insertions(+), 14 deletions(-)
Index: linux-4.14.37/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
=================================================================== +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
--- linux-4.14.37.orig/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ linux-4.14.37/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -1976,14 +1976,16 @@ static int mtk_hw_init(struct mtk_eth *e @@ -1976,14 +1976,16 @@ static int mtk_hw_init(struct mtk_eth *e
} }
regmap_write(eth->ethsys, ETHSYS_SYSCFG0, val); regmap_write(eth->ethsys, ETHSYS_SYSCFG0, val);
@ -86,10 +84,8 @@ Index: linux-4.14.37/drivers/net/ethernet/mediatek/mtk_eth_soc.c
}; };
const struct of_device_id of_mtk_match[] = { const struct of_device_id of_mtk_match[] = {
Index: linux-4.14.37/drivers/net/ethernet/mediatek/mtk_eth_soc.h --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
=================================================================== +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
--- linux-4.14.37.orig/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ linux-4.14.37/drivers/net/ethernet/mediatek/mtk_eth_soc.h
@@ -574,10 +574,13 @@ struct mtk_rx_ring { @@ -574,10 +574,13 @@ struct mtk_rx_ring {
* @caps Flags shown the extra capability for the SoC * @caps Flags shown the extra capability for the SoC
* @required_clks Flags shown the bitmap for required clocks on * @required_clks Flags shown the bitmap for required clocks on

View file

@ -56,8 +56,6 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/mediatek/clk-mtk.h | 1 + drivers/clk/mediatek/clk-mtk.h | 1 +
1 file changed, 1 insertion(+) 1 file changed, 1 insertion(+)
diff --git a/drivers/clk/mediatek/clk-mtk.h b/drivers/clk/mediatek/clk-mtk.h
index f10250dcece4..bf8006d41861 100644
--- a/drivers/clk/mediatek/clk-mtk.h --- a/drivers/clk/mediatek/clk-mtk.h
+++ b/drivers/clk/mediatek/clk-mtk.h +++ b/drivers/clk/mediatek/clk-mtk.h
@@ -20,6 +20,7 @@ @@ -20,6 +20,7 @@
@ -68,6 +66,3 @@ index f10250dcece4..bf8006d41861 100644
#define MAX_MUX_GATE_BIT 31 #define MAX_MUX_GATE_BIT 31
#define INVALID_MUX_GATE_BIT (MAX_MUX_GATE_BIT + 1) #define INVALID_MUX_GATE_BIT (MAX_MUX_GATE_BIT + 1)
--
2.11.0

View file

@ -16,11 +16,9 @@ Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/mediatek/phy-mtk-tphy.c | 19 +++++++------------ drivers/phy/mediatek/phy-mtk-tphy.c | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-) 1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c
index 402385f2562a..54cc44b2d289 100644
--- a/drivers/phy/mediatek/phy-mtk-tphy.c --- a/drivers/phy/mediatek/phy-mtk-tphy.c
+++ b/drivers/phy/mediatek/phy-mtk-tphy.c +++ b/drivers/phy/mediatek/phy-mtk-tphy.c
@@ -440,9 +440,9 @@ static void u2_phy_instance_init(struct mtk_tphy *tphy, @@ -440,9 +440,9 @@ static void u2_phy_instance_init(struct
u32 index = instance->index; u32 index = instance->index;
u32 tmp; u32 tmp;
@ -32,7 +30,7 @@ index 402385f2562a..54cc44b2d289 100644
tmp |= P2C_RG_XCVRSEL_VAL(1) | P2C_RG_DATAIN_VAL(0); tmp |= P2C_RG_XCVRSEL_VAL(1) | P2C_RG_DATAIN_VAL(0);
writel(tmp, com + U3P_U2PHYDTM0); writel(tmp, com + U3P_U2PHYDTM0);
@@ -502,10 +502,8 @@ static void u2_phy_instance_power_on(struct mtk_tphy *tphy, @@ -502,10 +502,8 @@ static void u2_phy_instance_power_on(str
u32 index = instance->index; u32 index = instance->index;
u32 tmp; u32 tmp;
@ -44,7 +42,7 @@ index 402385f2562a..54cc44b2d289 100644
writel(tmp, com + U3P_U2PHYDTM0); writel(tmp, com + U3P_U2PHYDTM0);
/* OTG Enable */ /* OTG Enable */
@@ -540,7 +538,6 @@ static void u2_phy_instance_power_off(struct mtk_tphy *tphy, @@ -540,7 +538,6 @@ static void u2_phy_instance_power_off(st
tmp = readl(com + U3P_U2PHYDTM0); tmp = readl(com + U3P_U2PHYDTM0);
tmp &= ~(P2C_RG_XCVRSEL | P2C_RG_DATAIN); tmp &= ~(P2C_RG_XCVRSEL | P2C_RG_DATAIN);
@ -52,7 +50,7 @@ index 402385f2562a..54cc44b2d289 100644
writel(tmp, com + U3P_U2PHYDTM0); writel(tmp, com + U3P_U2PHYDTM0);
/* OTG Disable */ /* OTG Disable */
@@ -548,18 +545,16 @@ static void u2_phy_instance_power_off(struct mtk_tphy *tphy, @@ -548,18 +545,16 @@ static void u2_phy_instance_power_off(st
tmp &= ~PA6_RG_U2_OTG_VBUSCMP_EN; tmp &= ~PA6_RG_U2_OTG_VBUSCMP_EN;
writel(tmp, com + U3P_USBPHYACR6); writel(tmp, com + U3P_USBPHYACR6);
@ -75,6 +73,3 @@ index 402385f2562a..54cc44b2d289 100644
tmp = readl(com + U3D_U2PHYDCR0); tmp = readl(com + U3D_U2PHYDCR0);
tmp &= ~P2C_RG_SIF_U2PLL_FORCE_ON; tmp &= ~P2C_RG_SIF_U2PLL_FORCE_ON;
writel(tmp, com + U3D_U2PHYDCR0); writel(tmp, com + U3D_U2PHYDCR0);
--
2.11.0

View file

@ -13,11 +13,9 @@ Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/mediatek/phy-mtk-tphy.c | 5 +++-- drivers/phy/mediatek/phy-mtk-tphy.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-) 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c
index 54cc44b2d289..11cab1d84a02 100644
--- a/drivers/phy/mediatek/phy-mtk-tphy.c --- a/drivers/phy/mediatek/phy-mtk-tphy.c
+++ b/drivers/phy/mediatek/phy-mtk-tphy.c +++ b/drivers/phy/mediatek/phy-mtk-tphy.c
@@ -1023,9 +1023,10 @@ static int mtk_tphy_probe(struct platform_device *pdev) @@ -1023,9 +1023,10 @@ static int mtk_tphy_probe(struct platfor
tphy->dev = dev; tphy->dev = dev;
platform_set_drvdata(pdev, tphy); platform_set_drvdata(pdev, tphy);
@ -30,6 +28,3 @@ index 54cc44b2d289..11cab1d84a02 100644
tphy->sif_base = devm_ioremap_resource(dev, sif_res); tphy->sif_base = devm_ioremap_resource(dev, sif_res);
if (IS_ERR(tphy->sif_base)) { if (IS_ERR(tphy->sif_base)) {
dev_err(dev, "failed to remap sif regs\n"); dev_err(dev, "failed to remap sif regs\n");
--
2.11.0

View file

@ -11,8 +11,6 @@ Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/mediatek/phy-mtk-tphy.c | 11 +++++------ drivers/phy/mediatek/phy-mtk-tphy.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-) 1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c
index 11cab1d84a02..1e96d0740ef5 100644
--- a/drivers/phy/mediatek/phy-mtk-tphy.c --- a/drivers/phy/mediatek/phy-mtk-tphy.c
+++ b/drivers/phy/mediatek/phy-mtk-tphy.c +++ b/drivers/phy/mediatek/phy-mtk-tphy.c
@@ -20,6 +20,7 @@ @@ -20,6 +20,7 @@
@ -23,7 +21,7 @@ index 11cab1d84a02..1e96d0740ef5 100644
#include <linux/phy/phy.h> #include <linux/phy/phy.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
@@ -995,7 +996,6 @@ MODULE_DEVICE_TABLE(of, mtk_tphy_id_table); @@ -995,7 +996,6 @@ MODULE_DEVICE_TABLE(of, mtk_tphy_id_tabl
static int mtk_tphy_probe(struct platform_device *pdev) static int mtk_tphy_probe(struct platform_device *pdev)
{ {
@ -31,7 +29,7 @@ index 11cab1d84a02..1e96d0740ef5 100644
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node; struct device_node *np = dev->of_node;
struct device_node *child_np; struct device_node *child_np;
@@ -1005,15 +1005,14 @@ static int mtk_tphy_probe(struct platform_device *pdev) @@ -1005,15 +1005,14 @@ static int mtk_tphy_probe(struct platfor
struct resource res; struct resource res;
int port, retval; int port, retval;
@ -51,6 +49,3 @@ index 11cab1d84a02..1e96d0740ef5 100644
tphy->nphys = of_get_child_count(np); tphy->nphys = of_get_child_count(np);
tphy->phys = devm_kcalloc(dev, tphy->nphys, tphy->phys = devm_kcalloc(dev, tphy->nphys,
sizeof(*tphy->phys), GFP_KERNEL); sizeof(*tphy->phys), GFP_KERNEL);
--
2.11.0

View file

@ -14,11 +14,9 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 31 ++++++++++++++---------------- sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 31 ++++++++++++++----------------
1 file changed, 14 insertions(+), 17 deletions(-) 1 file changed, 14 insertions(+), 17 deletions(-)
diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
index 8fda182f849b..a7362d1cda1b 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c --- a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c +++ b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
@@ -1590,12 +1590,16 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev) @@ -1590,12 +1590,16 @@ static int mt2701_afe_pcm_dev_probe(stru
} }
platform_set_drvdata(pdev, afe); platform_set_drvdata(pdev, afe);
@ -40,7 +38,7 @@ index 8fda182f849b..a7362d1cda1b 100644
if (ret) { if (ret) {
dev_warn(dev, "err_platform\n"); dev_warn(dev, "err_platform\n");
goto err_platform; goto err_platform;
@@ -1610,35 +1614,28 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev) @@ -1610,35 +1614,28 @@ static int mt2701_afe_pcm_dev_probe(stru
goto err_dai_component; goto err_dai_component;
} }
@ -81,6 +79,3 @@ index 8fda182f849b..a7362d1cda1b 100644
return 0; return 0;
} }
--
2.11.0

View file

@ -30,8 +30,6 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 45 +- sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 45 +-
4 files changed, 200 insertions(+), 442 deletions(-) 4 files changed, 200 insertions(+), 442 deletions(-)
diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
index affa7fb25dd9..75ccdca5811d 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c --- a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c +++ b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
@@ -21,442 +21,256 @@ @@ -21,442 +21,256 @@
@ -96,15 +94,14 @@ index affa7fb25dd9..75ccdca5811d 100644
{ {
struct mt2701_afe_private *afe_priv = afe->platform_priv; struct mt2701_afe_private *afe_priv = afe->platform_priv;
- int i = 0; - int i = 0;
- + int i;
- for (i = 0; i < MT2701_CLOCK_NUM; i++) { - for (i = 0; i < MT2701_CLOCK_NUM; i++) {
- afe_priv->clocks[i] = devm_clk_get(afe->dev, aud_clks[i]); - afe_priv->clocks[i] = devm_clk_get(afe->dev, aud_clks[i]);
- if (IS_ERR(afe_priv->clocks[i])) { - if (IS_ERR(afe_priv->clocks[i])) {
- dev_warn(afe->dev, "%s devm_clk_get %s fail\n", - dev_warn(afe->dev, "%s devm_clk_get %s fail\n",
- __func__, aud_clks[i]); - __func__, aud_clks[i]);
- return PTR_ERR(aud_clks[i]); - return PTR_ERR(aud_clks[i]);
+ int i;
+
+ for (i = 0; i < MT2701_BASE_CLK_NUM; i++) { + for (i = 0; i < MT2701_BASE_CLK_NUM; i++) {
+ afe_priv->base_ck[i] = devm_clk_get(afe->dev, base_clks[i]); + afe_priv->base_ck[i] = devm_clk_get(afe->dev, base_clks[i]);
+ if (IS_ERR(afe_priv->base_ck[i])) { + if (IS_ERR(afe_priv->base_ck[i])) {
@ -119,10 +116,7 @@ index affa7fb25dd9..75ccdca5811d 100644
+ for (i = 0; i < MT2701_I2S_NUM; i++) { + for (i = 0; i < MT2701_I2S_NUM; i++) {
+ struct mt2701_i2s_path *i2s_path = &afe_priv->i2s_path[i]; + struct mt2701_i2s_path *i2s_path = &afe_priv->i2s_path[i];
+ char name[13]; + char name[13];
+
-int mt2701_afe_enable_clock(struct mtk_base_afe *afe)
-{
- int ret = 0;
+ snprintf(name, sizeof(name), "i2s%d_src_sel", i); + snprintf(name, sizeof(name), "i2s%d_src_sel", i);
+ i2s_path->sel_ck = devm_clk_get(afe->dev, name); + i2s_path->sel_ck = devm_clk_get(afe->dev, name);
+ if (IS_ERR(i2s_path->sel_ck)) { + if (IS_ERR(i2s_path->sel_ck)) {
@ -130,12 +124,9 @@ index affa7fb25dd9..75ccdca5811d 100644
+ return PTR_ERR(i2s_path->sel_ck); + return PTR_ERR(i2s_path->sel_ck);
+ } + }
- ret = mt2701_turn_on_a1sys_clock(afe); -int mt2701_afe_enable_clock(struct mtk_base_afe *afe)
- if (ret) { -{
- dev_err(afe->dev, "%s turn_on_a1sys_clock fail %d\n", - int ret = 0;
- __func__, ret);
- return ret;
- }
+ snprintf(name, sizeof(name), "i2s%d_src_div", i); + snprintf(name, sizeof(name), "i2s%d_src_div", i);
+ i2s_path->div_ck = devm_clk_get(afe->dev, name); + i2s_path->div_ck = devm_clk_get(afe->dev, name);
+ if (IS_ERR(i2s_path->div_ck)) { + if (IS_ERR(i2s_path->div_ck)) {
@ -143,11 +134,10 @@ index affa7fb25dd9..75ccdca5811d 100644
+ return PTR_ERR(i2s_path->div_ck); + return PTR_ERR(i2s_path->div_ck);
+ } + }
- ret = mt2701_turn_on_a2sys_clock(afe); - ret = mt2701_turn_on_a1sys_clock(afe);
- if (ret) { - if (ret) {
- dev_err(afe->dev, "%s turn_on_a2sys_clock fail %d\n", - dev_err(afe->dev, "%s turn_on_a1sys_clock fail %d\n",
- __func__, ret); - __func__, ret);
- mt2701_turn_off_a1sys_clock(afe);
- return ret; - return ret;
- } - }
+ snprintf(name, sizeof(name), "i2s%d_mclk_en", i); + snprintf(name, sizeof(name), "i2s%d_mclk_en", i);
@ -157,6 +147,20 @@ index affa7fb25dd9..75ccdca5811d 100644
+ return PTR_ERR(i2s_path->mclk_ck); + return PTR_ERR(i2s_path->mclk_ck);
+ } + }
- ret = mt2701_turn_on_a2sys_clock(afe);
- if (ret) {
- dev_err(afe->dev, "%s turn_on_a2sys_clock fail %d\n",
- __func__, ret);
- mt2701_turn_off_a1sys_clock(afe);
- return ret;
- }
+ snprintf(name, sizeof(name), "i2so%d_hop_ck", i);
+ i2s_path->hop_ck[I2S_OUT] = devm_clk_get(afe->dev, name);
+ if (IS_ERR(i2s_path->hop_ck[I2S_OUT])) {
+ dev_err(afe->dev, "failed to get %s\n", name);
+ return PTR_ERR(i2s_path->hop_ck[I2S_OUT]);
+ }
- ret = mt2701_turn_on_afe_clock(afe); - ret = mt2701_turn_on_afe_clock(afe);
- if (ret) { - if (ret) {
- dev_err(afe->dev, "%s turn_on_afe_clock fail %d\n", - dev_err(afe->dev, "%s turn_on_afe_clock fail %d\n",
@ -164,13 +168,6 @@ index affa7fb25dd9..75ccdca5811d 100644
- mt2701_turn_off_a1sys_clock(afe); - mt2701_turn_off_a1sys_clock(afe);
- mt2701_turn_off_a2sys_clock(afe); - mt2701_turn_off_a2sys_clock(afe);
- return ret; - return ret;
+ snprintf(name, sizeof(name), "i2so%d_hop_ck", i);
+ i2s_path->hop_ck[I2S_OUT] = devm_clk_get(afe->dev, name);
+ if (IS_ERR(i2s_path->hop_ck[I2S_OUT])) {
+ dev_err(afe->dev, "failed to get %s\n", name);
+ return PTR_ERR(i2s_path->hop_ck[I2S_OUT]);
+ }
+
+ snprintf(name, sizeof(name), "i2si%d_hop_ck", i); + snprintf(name, sizeof(name), "i2si%d_hop_ck", i);
+ i2s_path->hop_ck[I2S_IN] = devm_clk_get(afe->dev, name); + i2s_path->hop_ck[I2S_IN] = devm_clk_get(afe->dev, name);
+ if (IS_ERR(i2s_path->hop_ck[I2S_IN])) { + if (IS_ERR(i2s_path->hop_ck[I2S_IN])) {
@ -455,7 +452,9 @@ index affa7fb25dd9..75ccdca5811d 100644
- /* enable INFRA_SYS */ - /* enable INFRA_SYS */
- ret = clk_prepare_enable(afe_priv->clocks[MT2701_AUD_INFRA_SYS_AUDIO]); - ret = clk_prepare_enable(afe_priv->clocks[MT2701_AUD_INFRA_SYS_AUDIO]);
- if (ret) { + /* Enable audio system */
+ ret = mt2701_afe_enable_audsys(afe);
if (ret) {
- dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n", - dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n",
- __func__, aud_clks[MT2701_AUD_INFRA_SYS_AUDIO], ret); - __func__, aud_clks[MT2701_AUD_INFRA_SYS_AUDIO], ret);
- goto AFE_AUD_INFRA_ERR; - goto AFE_AUD_INFRA_ERR;
@ -497,9 +496,7 @@ index affa7fb25dd9..75ccdca5811d 100644
- -
- /* Set MT2701_AUD_ASM_M_SEL to MT2701_AUD_UNIVPLL2_D4 */ - /* Set MT2701_AUD_ASM_M_SEL to MT2701_AUD_UNIVPLL2_D4 */
- ret = clk_prepare_enable(afe_priv->clocks[MT2701_AUD_ASM_M_SEL]); - ret = clk_prepare_enable(afe_priv->clocks[MT2701_AUD_ASM_M_SEL]);
+ /* Enable audio system */ - if (ret) {
+ ret = mt2701_afe_enable_audsys(afe);
if (ret) {
- dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n", - dev_err(afe->dev, "%s clk_prepare_enable %s fail %d\n",
- __func__, aud_clks[MT2701_AUD_ASM_M_SEL], ret); - __func__, aud_clks[MT2701_AUD_ASM_M_SEL], ret);
- goto AFE_AUD_ASM_M_ERR; - goto AFE_AUD_ASM_M_ERR;
@ -560,7 +557,8 @@ index affa7fb25dd9..75ccdca5811d 100644
+ AFE_DAC_CON0_AFE_ON, 0); + AFE_DAC_CON0_AFE_ON, 0);
- clk_disable_unprepare(afe_priv->clocks[MT2701_AUD_INFRA_SYS_AUDIO]); - clk_disable_unprepare(afe_priv->clocks[MT2701_AUD_INFRA_SYS_AUDIO]);
- + mt2701_afe_disable_audsys(afe);
- clk_disable_unprepare(afe_priv->clocks[MT2701_AUD_AUDINTBUS]); - clk_disable_unprepare(afe_priv->clocks[MT2701_AUD_AUDINTBUS]);
- clk_disable_unprepare(afe_priv->clocks[MT2701_AUD_ASM_H_SEL]); - clk_disable_unprepare(afe_priv->clocks[MT2701_AUD_ASM_H_SEL]);
- clk_disable_unprepare(afe_priv->clocks[MT2701_AUD_ASM_M_SEL]); - clk_disable_unprepare(afe_priv->clocks[MT2701_AUD_ASM_M_SEL]);
@ -579,8 +577,6 @@ index affa7fb25dd9..75ccdca5811d 100644
- regmap_update_bits(afe->regmap, AUDIO_TOP_CON4, - regmap_update_bits(afe->regmap, AUDIO_TOP_CON4,
- AUDIO_TOP_CON4_PDN_AFE_CONN, - AUDIO_TOP_CON4_PDN_AFE_CONN,
- AUDIO_TOP_CON4_PDN_AFE_CONN); - AUDIO_TOP_CON4_PDN_AFE_CONN);
+ mt2701_afe_disable_audsys(afe);
+
+ return 0; + return 0;
} }
@ -643,8 +639,6 @@ index affa7fb25dd9..75ccdca5811d 100644
} }
MODULE_DESCRIPTION("MT2701 afe clock control"); MODULE_DESCRIPTION("MT2701 afe clock control");
diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h
index 6497d570cf09..15417d9d6597 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h --- a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h +++ b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h
@@ -21,16 +21,15 @@ struct mtk_base_afe; @@ -21,16 +21,15 @@ struct mtk_base_afe;
@ -671,8 +665,6 @@ index 6497d570cf09..15417d9d6597 100644
void mt2701_mclk_configuration(struct mtk_base_afe *afe, int id, int domain, void mt2701_mclk_configuration(struct mtk_base_afe *afe, int id, int domain,
int mclk); int mclk);
diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-common.h b/sound/soc/mediatek/mt2701/mt2701-afe-common.h
index c19430e98adf..ce5bd4dc864d 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-common.h --- a/sound/soc/mediatek/mt2701/mt2701-afe-common.h
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-common.h +++ b/sound/soc/mediatek/mt2701/mt2701-afe-common.h
@@ -69,53 +69,14 @@ enum { @@ -69,53 +69,14 @@ enum {
@ -764,11 +756,9 @@ index c19430e98adf..ce5bd4dc864d 100644
bool mrg_enable[MT2701_STREAM_DIR_NUM]; bool mrg_enable[MT2701_STREAM_DIR_NUM];
}; };
diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
index a7362d1cda1b..33f809228f25 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c --- a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c +++ b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
@@ -97,21 +97,12 @@ static int mt2701_afe_i2s_startup(struct snd_pcm_substream *substream, @@ -97,21 +97,12 @@ static int mt2701_afe_i2s_startup(struct
{ {
struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct mtk_base_afe *afe = snd_soc_platform_get_drvdata(rtd->platform); struct mtk_base_afe *afe = snd_soc_platform_get_drvdata(rtd->platform);
@ -791,7 +781,7 @@ index a7362d1cda1b..33f809228f25 100644
} }
static int mt2701_afe_i2s_path_shutdown(struct snd_pcm_substream *substream, static int mt2701_afe_i2s_path_shutdown(struct snd_pcm_substream *substream,
@@ -151,9 +142,9 @@ static int mt2701_afe_i2s_path_shutdown(struct snd_pcm_substream *substream, @@ -151,9 +142,9 @@ static int mt2701_afe_i2s_path_shutdown(
/* disable i2s */ /* disable i2s */
regmap_update_bits(afe->regmap, i2s_data->i2s_ctrl_reg, regmap_update_bits(afe->regmap, i2s_data->i2s_ctrl_reg,
ASYS_I2S_CON_I2S_EN, 0); ASYS_I2S_CON_I2S_EN, 0);
@ -804,7 +794,7 @@ index a7362d1cda1b..33f809228f25 100644
return 0; return 0;
} }
@@ -165,7 +156,6 @@ static void mt2701_afe_i2s_shutdown(struct snd_pcm_substream *substream, @@ -165,7 +156,6 @@ static void mt2701_afe_i2s_shutdown(stru
struct mt2701_afe_private *afe_priv = afe->platform_priv; struct mt2701_afe_private *afe_priv = afe->platform_priv;
int i2s_num = mt2701_dai_num_to_i2s(afe, dai->id); int i2s_num = mt2701_dai_num_to_i2s(afe, dai->id);
struct mt2701_i2s_path *i2s_path; struct mt2701_i2s_path *i2s_path;
@ -812,7 +802,7 @@ index a7362d1cda1b..33f809228f25 100644
if (i2s_num < 0) if (i2s_num < 0)
return; return;
@@ -185,7 +175,7 @@ static void mt2701_afe_i2s_shutdown(struct snd_pcm_substream *substream, @@ -185,7 +175,7 @@ static void mt2701_afe_i2s_shutdown(stru
I2S_UNSTART: I2S_UNSTART:
/* disable mclk */ /* disable mclk */
@ -821,7 +811,7 @@ index a7362d1cda1b..33f809228f25 100644
} }
static int mt2701_i2s_path_prepare_enable(struct snd_pcm_substream *substream, static int mt2701_i2s_path_prepare_enable(struct snd_pcm_substream *substream,
@@ -251,9 +241,7 @@ static int mt2701_i2s_path_prepare_enable(struct snd_pcm_substream *substream, @@ -251,9 +241,7 @@ static int mt2701_i2s_path_prepare_enabl
fs << i2s_data->i2s_asrc_fs_shift); fs << i2s_data->i2s_asrc_fs_shift);
/* enable i2s */ /* enable i2s */
@ -832,7 +822,7 @@ index a7362d1cda1b..33f809228f25 100644
/* reset i2s hw status before enable */ /* reset i2s hw status before enable */
regmap_update_bits(afe->regmap, i2s_data->i2s_ctrl_reg, regmap_update_bits(afe->regmap, i2s_data->i2s_ctrl_reg,
@@ -339,9 +327,11 @@ static int mt2701_btmrg_startup(struct snd_pcm_substream *substream, @@ -339,9 +327,11 @@ static int mt2701_btmrg_startup(struct s
struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct mtk_base_afe *afe = snd_soc_platform_get_drvdata(rtd->platform); struct mtk_base_afe *afe = snd_soc_platform_get_drvdata(rtd->platform);
struct mt2701_afe_private *afe_priv = afe->platform_priv; struct mt2701_afe_private *afe_priv = afe->platform_priv;
@ -846,7 +836,7 @@ index a7362d1cda1b..33f809228f25 100644
afe_priv->mrg_enable[substream->stream] = 1; afe_priv->mrg_enable[substream->stream] = 1;
return 0; return 0;
@@ -406,9 +396,7 @@ static void mt2701_btmrg_shutdown(struct snd_pcm_substream *substream, @@ -406,9 +396,7 @@ static void mt2701_btmrg_shutdown(struct
AFE_MRGIF_CON_MRG_EN, 0); AFE_MRGIF_CON_MRG_EN, 0);
regmap_update_bits(afe->regmap, AFE_MRGIF_CON, regmap_update_bits(afe->regmap, AFE_MRGIF_CON,
AFE_MRGIF_CON_MRG_I2S_EN, 0); AFE_MRGIF_CON_MRG_I2S_EN, 0);
@ -857,7 +847,7 @@ index a7362d1cda1b..33f809228f25 100644
} }
afe_priv->mrg_enable[substream->stream] = 0; afe_priv->mrg_enable[substream->stream] = 0;
} }
@@ -1386,14 +1374,12 @@ static const struct mt2701_i2s_data mt2701_i2s_data[MT2701_I2S_NUM][2] = { @@ -1386,14 +1374,12 @@ static const struct mt2701_i2s_data mt27
{ {
{ {
.i2s_ctrl_reg = ASYS_I2SO1_CON, .i2s_ctrl_reg = ASYS_I2SO1_CON,
@ -872,7 +862,7 @@ index a7362d1cda1b..33f809228f25 100644
.i2s_asrc_fs_shift = 0, .i2s_asrc_fs_shift = 0,
.i2s_asrc_fs_mask = 0x1f, .i2s_asrc_fs_mask = 0x1f,
@@ -1402,14 +1388,12 @@ static const struct mt2701_i2s_data mt2701_i2s_data[MT2701_I2S_NUM][2] = { @@ -1402,14 +1388,12 @@ static const struct mt2701_i2s_data mt27
{ {
{ {
.i2s_ctrl_reg = ASYS_I2SO2_CON, .i2s_ctrl_reg = ASYS_I2SO2_CON,
@ -887,7 +877,7 @@ index a7362d1cda1b..33f809228f25 100644
.i2s_asrc_fs_shift = 5, .i2s_asrc_fs_shift = 5,
.i2s_asrc_fs_mask = 0x1f, .i2s_asrc_fs_mask = 0x1f,
@@ -1418,14 +1402,12 @@ static const struct mt2701_i2s_data mt2701_i2s_data[MT2701_I2S_NUM][2] = { @@ -1418,14 +1402,12 @@ static const struct mt2701_i2s_data mt27
{ {
{ {
.i2s_ctrl_reg = ASYS_I2SO3_CON, .i2s_ctrl_reg = ASYS_I2SO3_CON,
@ -902,7 +892,7 @@ index a7362d1cda1b..33f809228f25 100644
.i2s_asrc_fs_shift = 10, .i2s_asrc_fs_shift = 10,
.i2s_asrc_fs_mask = 0x1f, .i2s_asrc_fs_mask = 0x1f,
@@ -1434,14 +1416,12 @@ static const struct mt2701_i2s_data mt2701_i2s_data[MT2701_I2S_NUM][2] = { @@ -1434,14 +1416,12 @@ static const struct mt2701_i2s_data mt27
{ {
{ {
.i2s_ctrl_reg = ASYS_I2SO4_CON, .i2s_ctrl_reg = ASYS_I2SO4_CON,
@ -917,7 +907,7 @@ index a7362d1cda1b..33f809228f25 100644
.i2s_asrc_fs_shift = 15, .i2s_asrc_fs_shift = 15,
.i2s_asrc_fs_mask = 0x1f, .i2s_asrc_fs_mask = 0x1f,
@@ -1483,8 +1463,7 @@ static int mt2701_afe_runtime_suspend(struct device *dev) @@ -1483,8 +1463,7 @@ static int mt2701_afe_runtime_suspend(st
{ {
struct mtk_base_afe *afe = dev_get_drvdata(dev); struct mtk_base_afe *afe = dev_get_drvdata(dev);
@ -927,6 +917,3 @@ index a7362d1cda1b..33f809228f25 100644
} }
static int mt2701_afe_runtime_resume(struct device *dev) static int mt2701_afe_runtime_resume(struct device *dev)
--
2.11.0

View file

@ -15,8 +15,6 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/mt2701/mt2701-reg.h | 41 +--------- sound/soc/mediatek/mt2701/mt2701-reg.h | 41 +---------
4 files changed, 24 insertions(+), 145 deletions(-) 4 files changed, 24 insertions(+), 145 deletions(-)
diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
index 75ccdca5811d..56a057c78c9a 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c --- a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c +++ b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
@@ -14,10 +14,6 @@ @@ -14,10 +14,6 @@
@ -30,7 +28,7 @@ index 75ccdca5811d..56a057c78c9a 100644
#include "mt2701-afe-common.h" #include "mt2701-afe-common.h"
#include "mt2701-afe-clock-ctrl.h" #include "mt2701-afe-clock-ctrl.h"
@@ -223,8 +219,8 @@ int mt2701_afe_enable_clock(struct mtk_base_afe *afe) @@ -223,8 +219,8 @@ int mt2701_afe_enable_clock(struct mtk_b
} }
regmap_update_bits(afe->regmap, ASYS_TOP_CON, regmap_update_bits(afe->regmap, ASYS_TOP_CON,
@ -41,7 +39,7 @@ index 75ccdca5811d..56a057c78c9a 100644
regmap_update_bits(afe->regmap, AFE_DAC_CON0, regmap_update_bits(afe->regmap, AFE_DAC_CON0,
AFE_DAC_CON0_AFE_ON, AFE_DAC_CON0_AFE_ON,
AFE_DAC_CON0_AFE_ON); AFE_DAC_CON0_AFE_ON);
@@ -239,7 +235,7 @@ int mt2701_afe_enable_clock(struct mtk_base_afe *afe) @@ -239,7 +235,7 @@ int mt2701_afe_enable_clock(struct mtk_b
int mt2701_afe_disable_clock(struct mtk_base_afe *afe) int mt2701_afe_disable_clock(struct mtk_base_afe *afe)
{ {
regmap_update_bits(afe->regmap, ASYS_TOP_CON, regmap_update_bits(afe->regmap, ASYS_TOP_CON,
@ -50,7 +48,7 @@ index 75ccdca5811d..56a057c78c9a 100644
regmap_update_bits(afe->regmap, AFE_DAC_CON0, regmap_update_bits(afe->regmap, AFE_DAC_CON0,
AFE_DAC_CON0_AFE_ON, 0); AFE_DAC_CON0_AFE_ON, 0);
@@ -272,7 +268,3 @@ void mt2701_mclk_configuration(struct mtk_base_afe *afe, int id, int domain, @@ -272,7 +268,3 @@ void mt2701_mclk_configuration(struct mt
if (ret) if (ret)
dev_err(afe->dev, "failed to set mclk divider %d\n", ret); dev_err(afe->dev, "failed to set mclk divider %d\n", ret);
} }
@ -58,8 +56,6 @@ index 75ccdca5811d..56a057c78c9a 100644
-MODULE_DESCRIPTION("MT2701 afe clock control"); -MODULE_DESCRIPTION("MT2701 afe clock control");
-MODULE_AUTHOR("Garlic Tseng <garlic.tseng@mediatek.com>"); -MODULE_AUTHOR("Garlic Tseng <garlic.tseng@mediatek.com>");
-MODULE_LICENSE("GPL v2"); -MODULE_LICENSE("GPL v2");
diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-common.h b/sound/soc/mediatek/mt2701/mt2701-afe-common.h
index ce5bd4dc864d..9a2b301a4c21 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-common.h --- a/sound/soc/mediatek/mt2701/mt2701-afe-common.h
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-common.h +++ b/sound/soc/mediatek/mt2701/mt2701-afe-common.h
@@ -16,6 +16,7 @@ @@ -16,6 +16,7 @@
@ -98,7 +94,7 @@ index ce5bd4dc864d..9a2b301a4c21 100644
MT2701_IRQ_ASYS_IRQ2, MT2701_IRQ_ASYS_IRQ2,
MT2701_IRQ_ASYS_IRQ3, MT2701_IRQ_ASYS_IRQ3,
MT2701_IRQ_ASYS_END, MT2701_IRQ_ASYS_END,
@@ -100,9 +91,6 @@ static const unsigned int mt2701_afe_backup_list[] = { @@ -100,9 +91,6 @@ static const unsigned int mt2701_afe_bac
AFE_MEMIF_PBUF_SIZE, AFE_MEMIF_PBUF_SIZE,
}; };
@ -117,8 +113,6 @@ index ce5bd4dc864d..9a2b301a4c21 100644
struct clk *hop_ck[I2S_DIR_NUM]; struct clk *hop_ck[I2S_DIR_NUM];
struct clk *sel_ck; struct clk *sel_ck;
struct clk *div_ck; struct clk *div_ck;
diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
index 33f809228f25..0edadca12a5e 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c --- a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c +++ b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
@@ -20,16 +20,12 @@ @@ -20,16 +20,12 @@
@ -138,7 +132,7 @@ index 33f809228f25..0edadca12a5e 100644
static const struct snd_pcm_hardware mt2701_afe_hardware = { static const struct snd_pcm_hardware mt2701_afe_hardware = {
.info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED .info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED
| SNDRV_PCM_INFO_RESUME | SNDRV_PCM_INFO_MMAP_VALID, | SNDRV_PCM_INFO_RESUME | SNDRV_PCM_INFO_MMAP_VALID,
@@ -107,21 +103,16 @@ static int mt2701_afe_i2s_startup(struct snd_pcm_substream *substream, @@ -107,21 +103,16 @@ static int mt2701_afe_i2s_startup(struct
static int mt2701_afe_i2s_path_shutdown(struct snd_pcm_substream *substream, static int mt2701_afe_i2s_path_shutdown(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai, struct snd_soc_dai *dai,
@ -162,7 +156,7 @@ index 33f809228f25..0edadca12a5e 100644
if (dir_invert) { if (dir_invert) {
if (stream_dir == SNDRV_PCM_STREAM_PLAYBACK) if (stream_dir == SNDRV_PCM_STREAM_PLAYBACK)
stream_dir = SNDRV_PCM_STREAM_CAPTURE; stream_dir = SNDRV_PCM_STREAM_CAPTURE;
@@ -167,11 +158,11 @@ static void mt2701_afe_i2s_shutdown(struct snd_pcm_substream *substream, @@ -167,11 +158,11 @@ static void mt2701_afe_i2s_shutdown(stru
else else
goto I2S_UNSTART; goto I2S_UNSTART;
@ -176,7 +170,7 @@ index 33f809228f25..0edadca12a5e 100644
I2S_UNSTART: I2S_UNSTART:
/* disable mclk */ /* disable mclk */
@@ -180,24 +171,19 @@ static void mt2701_afe_i2s_shutdown(struct snd_pcm_substream *substream, @@ -180,24 +171,19 @@ I2S_UNSTART:
static int mt2701_i2s_path_prepare_enable(struct snd_pcm_substream *substream, static int mt2701_i2s_path_prepare_enable(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai, struct snd_soc_dai *dai,
@ -203,7 +197,7 @@ index 33f809228f25..0edadca12a5e 100644
if (dir_invert) { if (dir_invert) {
if (stream_dir == SNDRV_PCM_STREAM_PLAYBACK) if (stream_dir == SNDRV_PCM_STREAM_PLAYBACK)
stream_dir = SNDRV_PCM_STREAM_CAPTURE; stream_dir = SNDRV_PCM_STREAM_CAPTURE;
@@ -288,13 +274,13 @@ static int mt2701_afe_i2s_prepare(struct snd_pcm_substream *substream, @@ -288,13 +274,13 @@ static int mt2701_afe_i2s_prepare(struct
mt2701_mclk_configuration(afe, i2s_num, clk_domain, mclk_rate); mt2701_mclk_configuration(afe, i2s_num, clk_domain, mclk_rate);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
@ -220,7 +214,7 @@ index 33f809228f25..0edadca12a5e 100644
} }
return 0; return 0;
@@ -562,7 +548,6 @@ static const struct snd_soc_dai_ops mt2701_single_memif_dai_ops = { @@ -562,7 +548,6 @@ static const struct snd_soc_dai_ops mt27
.hw_free = mtk_afe_fe_hw_free, .hw_free = mtk_afe_fe_hw_free,
.prepare = mtk_afe_fe_prepare, .prepare = mtk_afe_fe_prepare,
.trigger = mtk_afe_fe_trigger, .trigger = mtk_afe_fe_trigger,
@ -228,7 +222,7 @@ index 33f809228f25..0edadca12a5e 100644
}; };
static const struct snd_soc_dai_ops mt2701_dlm_memif_dai_ops = { static const struct snd_soc_dai_ops mt2701_dlm_memif_dai_ops = {
@@ -903,31 +888,6 @@ static const struct snd_kcontrol_new mt2701_afe_multi_ch_out_i2s4[] = { @@ -903,31 +888,6 @@ static const struct snd_kcontrol_new mt2
PWR2_TOP_CON, 19, 1, 0), PWR2_TOP_CON, 19, 1, 0),
}; };
@ -260,7 +254,7 @@ index 33f809228f25..0edadca12a5e 100644
static const struct snd_soc_dapm_widget mt2701_afe_pcm_widgets[] = { static const struct snd_soc_dapm_widget mt2701_afe_pcm_widgets[] = {
/* inter-connections */ /* inter-connections */
SND_SOC_DAPM_MIXER("I00", SND_SOC_NOPM, 0, 0, NULL, 0), SND_SOC_DAPM_MIXER("I00", SND_SOC_NOPM, 0, 0, NULL, 0),
@@ -987,19 +947,6 @@ static const struct snd_soc_dapm_widget mt2701_afe_pcm_widgets[] = { @@ -987,19 +947,6 @@ static const struct snd_soc_dapm_widget
SND_SOC_DAPM_MIXER("I18I19", SND_SOC_NOPM, 0, 0, SND_SOC_DAPM_MIXER("I18I19", SND_SOC_NOPM, 0, 0,
mt2701_afe_multi_ch_out_i2s3, mt2701_afe_multi_ch_out_i2s3,
ARRAY_SIZE(mt2701_afe_multi_ch_out_i2s3)), ARRAY_SIZE(mt2701_afe_multi_ch_out_i2s3)),
@ -280,7 +274,7 @@ index 33f809228f25..0edadca12a5e 100644
}; };
static const struct snd_soc_dapm_route mt2701_afe_pcm_routes[] = { static const struct snd_soc_dapm_route mt2701_afe_pcm_routes[] = {
@@ -1009,7 +956,6 @@ static const struct snd_soc_dapm_route mt2701_afe_pcm_routes[] = { @@ -1009,7 +956,6 @@ static const struct snd_soc_dapm_route m
{"I2S0 Playback", NULL, "O15"}, {"I2S0 Playback", NULL, "O15"},
{"I2S0 Playback", NULL, "O16"}, {"I2S0 Playback", NULL, "O16"},
@ -288,7 +282,7 @@ index 33f809228f25..0edadca12a5e 100644
{"I2S1 Playback", NULL, "O17"}, {"I2S1 Playback", NULL, "O17"},
{"I2S1 Playback", NULL, "O18"}, {"I2S1 Playback", NULL, "O18"},
{"I2S2 Playback", NULL, "O19"}, {"I2S2 Playback", NULL, "O19"},
@@ -1026,7 +972,6 @@ static const struct snd_soc_dapm_route mt2701_afe_pcm_routes[] = { @@ -1026,7 +972,6 @@ static const struct snd_soc_dapm_route m
{"I00", NULL, "I2S0 Capture"}, {"I00", NULL, "I2S0 Capture"},
{"I01", NULL, "I2S0 Capture"}, {"I01", NULL, "I2S0 Capture"},
@ -296,7 +290,7 @@ index 33f809228f25..0edadca12a5e 100644
{"I02", NULL, "I2S1 Capture"}, {"I02", NULL, "I2S1 Capture"},
{"I03", NULL, "I2S1 Capture"}, {"I03", NULL, "I2S1 Capture"},
/* I02,03 link to UL2, also need to open I2S0 */ /* I02,03 link to UL2, also need to open I2S0 */
@@ -1034,15 +979,10 @@ static const struct snd_soc_dapm_route mt2701_afe_pcm_routes[] = { @@ -1034,15 +979,10 @@ static const struct snd_soc_dapm_route m
{"I26", NULL, "BT Capture"}, {"I26", NULL, "BT Capture"},
@ -316,7 +310,7 @@ index 33f809228f25..0edadca12a5e 100644
{ "I12", NULL, "I12I13" }, { "I12", NULL, "I12I13" },
{ "I13", NULL, "I12I13" }, { "I13", NULL, "I12I13" },
@@ -1067,7 +1007,6 @@ static const struct snd_soc_dapm_route mt2701_afe_pcm_routes[] = { @@ -1067,7 +1007,6 @@ static const struct snd_soc_dapm_route m
{ "O21", "I18 Switch", "I18" }, { "O21", "I18 Switch", "I18" },
{ "O22", "I19 Switch", "I19" }, { "O22", "I19 Switch", "I19" },
{ "O31", "I35 Switch", "I35" }, { "O31", "I35 Switch", "I35" },
@ -324,7 +318,7 @@ index 33f809228f25..0edadca12a5e 100644
}; };
static const struct snd_soc_component_driver mt2701_afe_pcm_dai_component = { static const struct snd_soc_component_driver mt2701_afe_pcm_dai_component = {
@@ -1484,12 +1423,13 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev) @@ -1484,12 +1423,13 @@ static int mt2701_afe_pcm_dev_probe(stru
afe = devm_kzalloc(&pdev->dev, sizeof(*afe), GFP_KERNEL); afe = devm_kzalloc(&pdev->dev, sizeof(*afe), GFP_KERNEL);
if (!afe) if (!afe)
return -ENOMEM; return -ENOMEM;
@ -339,7 +333,7 @@ index 33f809228f25..0edadca12a5e 100644
afe->dev = &pdev->dev; afe->dev = &pdev->dev;
dev = afe->dev; dev = afe->dev;
@@ -1524,7 +1464,6 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev) @@ -1524,7 +1464,6 @@ static int mt2701_afe_pcm_dev_probe(stru
afe->memif_size = MT2701_MEMIF_NUM; afe->memif_size = MT2701_MEMIF_NUM;
afe->memif = devm_kcalloc(dev, afe->memif_size, sizeof(*afe->memif), afe->memif = devm_kcalloc(dev, afe->memif_size, sizeof(*afe->memif),
GFP_KERNEL); GFP_KERNEL);
@ -347,7 +341,7 @@ index 33f809228f25..0edadca12a5e 100644
if (!afe->memif) if (!afe->memif)
return -ENOMEM; return -ENOMEM;
@@ -1537,7 +1476,6 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev) @@ -1537,7 +1476,6 @@ static int mt2701_afe_pcm_dev_probe(stru
afe->irqs_size = MT2701_IRQ_ASYS_END; afe->irqs_size = MT2701_IRQ_ASYS_END;
afe->irqs = devm_kcalloc(dev, afe->irqs_size, sizeof(*afe->irqs), afe->irqs = devm_kcalloc(dev, afe->irqs_size, sizeof(*afe->irqs),
GFP_KERNEL); GFP_KERNEL);
@ -355,7 +349,7 @@ index 33f809228f25..0edadca12a5e 100644
if (!afe->irqs) if (!afe->irqs)
return -ENOMEM; return -ENOMEM;
@@ -1555,7 +1493,6 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev) @@ -1555,7 +1493,6 @@ static int mt2701_afe_pcm_dev_probe(stru
afe->mtk_afe_hardware = &mt2701_afe_hardware; afe->mtk_afe_hardware = &mt2701_afe_hardware;
afe->memif_fs = mt2701_memif_fs; afe->memif_fs = mt2701_memif_fs;
afe->irq_fs = mt2701_irq_fs; afe->irq_fs = mt2701_irq_fs;
@ -363,13 +357,11 @@ index 33f809228f25..0edadca12a5e 100644
afe->reg_back_up_list = mt2701_afe_backup_list; afe->reg_back_up_list = mt2701_afe_backup_list;
afe->reg_back_up_list_num = ARRAY_SIZE(mt2701_afe_backup_list); afe->reg_back_up_list_num = ARRAY_SIZE(mt2701_afe_backup_list);
afe->runtime_resume = mt2701_afe_runtime_resume; afe->runtime_resume = mt2701_afe_runtime_resume;
@@ -1646,4 +1583,3 @@ module_platform_driver(mt2701_afe_pcm_driver); @@ -1646,4 +1583,3 @@ module_platform_driver(mt2701_afe_pcm_dr
MODULE_DESCRIPTION("Mediatek ALSA SoC AFE platform driver for 2701"); MODULE_DESCRIPTION("Mediatek ALSA SoC AFE platform driver for 2701");
MODULE_AUTHOR("Garlic Tseng <garlic.tseng@mediatek.com>"); MODULE_AUTHOR("Garlic Tseng <garlic.tseng@mediatek.com>");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
- -
diff --git a/sound/soc/mediatek/mt2701/mt2701-reg.h b/sound/soc/mediatek/mt2701/mt2701-reg.h
index bb62b1c55957..f17c76f37b5f 100644
--- a/sound/soc/mediatek/mt2701/mt2701-reg.h --- a/sound/soc/mediatek/mt2701/mt2701-reg.h
+++ b/sound/soc/mediatek/mt2701/mt2701-reg.h +++ b/sound/soc/mediatek/mt2701/mt2701-reg.h
@@ -17,17 +17,6 @@ @@ -17,17 +17,6 @@
@ -434,6 +426,3 @@ index bb62b1c55957..f17c76f37b5f 100644
/* PWR2_ASM_CON1 (0x1070) */ /* PWR2_ASM_CON1 (0x1070) */
#define PWR2_ASM_CON1_INIT_VAL (0x492492) #define PWR2_ASM_CON1_INIT_VAL (0x492492)
--
2.11.0

View file

@ -17,8 +17,6 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
.../devicetree/bindings/sound/mt2701-afe-pcm.txt | 207 +++++++++------------ .../devicetree/bindings/sound/mt2701-afe-pcm.txt | 207 +++++++++------------
1 file changed, 91 insertions(+), 116 deletions(-) 1 file changed, 91 insertions(+), 116 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt b/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt
index 77a57f84bed4..0450baad2813 100644
--- a/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt --- a/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt
+++ b/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt +++ b/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt
@@ -6,51 +6,44 @@ Required properties: @@ -6,51 +6,44 @@ Required properties:
@ -258,6 +256,3 @@ index 77a57f84bed4..0450baad2813 100644
+ <&topckgen CLK_TOP_AUD2PLL_90M>; + <&topckgen CLK_TOP_AUD2PLL_90M>;
+ assigned-clock-rates = <0>, <0>, <49152000>, <45158400>; + assigned-clock-rates = <0>, <0>, <49152000>, <45158400>;
}; };
--
2.11.0

View file

@ -12,8 +12,6 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/mt2701/mt2701-afe-common.h | 3 +++ sound/soc/mediatek/mt2701/mt2701-afe-common.h | 3 +++
2 files changed, 32 insertions(+), 1 deletion(-) 2 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
index 56a057c78c9a..949fc3a1d025 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c --- a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c +++ b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
@@ -18,8 +18,11 @@ @@ -18,8 +18,11 @@
@ -28,7 +26,7 @@ index 56a057c78c9a..949fc3a1d025 100644
[MT2701_AUDSYS_AFE] = "audio_afe_pd", [MT2701_AUDSYS_AFE] = "audio_afe_pd",
[MT2701_AUDSYS_AFE_CONN] = "audio_afe_conn_pd", [MT2701_AUDSYS_AFE_CONN] = "audio_afe_conn_pd",
[MT2701_AUDSYS_A1SYS] = "audio_a1sys_pd", [MT2701_AUDSYS_A1SYS] = "audio_a1sys_pd",
@@ -169,10 +172,26 @@ static int mt2701_afe_enable_audsys(struct mtk_base_afe *afe) @@ -169,10 +172,26 @@ static int mt2701_afe_enable_audsys(stru
struct mt2701_afe_private *afe_priv = afe->platform_priv; struct mt2701_afe_private *afe_priv = afe->platform_priv;
int ret; int ret;
@ -56,7 +54,7 @@ index 56a057c78c9a..949fc3a1d025 100644
ret = clk_prepare_enable(afe_priv->base_ck[MT2701_AUDSYS_A1SYS]); ret = clk_prepare_enable(afe_priv->base_ck[MT2701_AUDSYS_A1SYS]);
if (ret) if (ret)
goto err_audio_a1sys; goto err_audio_a1sys;
@@ -193,6 +212,12 @@ static int mt2701_afe_enable_audsys(struct mtk_base_afe *afe) @@ -193,6 +212,12 @@ err_audio_a2sys:
clk_disable_unprepare(afe_priv->base_ck[MT2701_AUDSYS_A1SYS]); clk_disable_unprepare(afe_priv->base_ck[MT2701_AUDSYS_A1SYS]);
err_audio_a1sys: err_audio_a1sys:
clk_disable_unprepare(afe_priv->base_ck[MT2701_AUDSYS_AFE]); clk_disable_unprepare(afe_priv->base_ck[MT2701_AUDSYS_AFE]);
@ -69,7 +67,7 @@ index 56a057c78c9a..949fc3a1d025 100644
return ret; return ret;
} }
@@ -205,6 +230,9 @@ static void mt2701_afe_disable_audsys(struct mtk_base_afe *afe) @@ -205,6 +230,9 @@ static void mt2701_afe_disable_audsys(st
clk_disable_unprepare(afe_priv->base_ck[MT2701_AUDSYS_A2SYS]); clk_disable_unprepare(afe_priv->base_ck[MT2701_AUDSYS_A2SYS]);
clk_disable_unprepare(afe_priv->base_ck[MT2701_AUDSYS_A1SYS]); clk_disable_unprepare(afe_priv->base_ck[MT2701_AUDSYS_A1SYS]);
clk_disable_unprepare(afe_priv->base_ck[MT2701_AUDSYS_AFE]); clk_disable_unprepare(afe_priv->base_ck[MT2701_AUDSYS_AFE]);
@ -79,8 +77,6 @@ index 56a057c78c9a..949fc3a1d025 100644
} }
int mt2701_afe_enable_clock(struct mtk_base_afe *afe) int mt2701_afe_enable_clock(struct mtk_base_afe *afe)
diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-common.h b/sound/soc/mediatek/mt2701/mt2701-afe-common.h
index 9a2b301a4c21..ae8ddeacfbfe 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-common.h --- a/sound/soc/mediatek/mt2701/mt2701-afe-common.h
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-common.h +++ b/sound/soc/mediatek/mt2701/mt2701-afe-common.h
@@ -61,8 +61,11 @@ enum { @@ -61,8 +61,11 @@ enum {
@ -95,6 +91,3 @@ index 9a2b301a4c21..ae8ddeacfbfe 100644
MT2701_AUDSYS_AFE, MT2701_AUDSYS_AFE,
MT2701_AUDSYS_AFE_CONN, MT2701_AUDSYS_AFE_CONN,
MT2701_AUDSYS_A1SYS, MT2701_AUDSYS_A1SYS,
--
2.11.0

View file

@ -13,8 +13,6 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/mt2701/mt2701-reg.h | 1 - sound/soc/mediatek/mt2701/mt2701-reg.h | 1 -
2 files changed, 20 insertions(+), 26 deletions(-) 2 files changed, 20 insertions(+), 26 deletions(-)
diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
index 0edadca12a5e..f0cd08fa5c5d 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c --- a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c +++ b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
@@ -17,6 +17,7 @@ @@ -17,6 +17,7 @@
@ -25,7 +23,7 @@ index 0edadca12a5e..f0cd08fa5c5d 100644
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/pm_runtime.h> #include <linux/pm_runtime.h>
@@ -1368,14 +1369,6 @@ static const struct mt2701_i2s_data mt2701_i2s_data[MT2701_I2S_NUM][2] = { @@ -1368,14 +1369,6 @@ static const struct mt2701_i2s_data mt27
}, },
}; };
@ -40,7 +38,7 @@ index 0edadca12a5e..f0cd08fa5c5d 100644
static irqreturn_t mt2701_asys_isr(int irq_id, void *dev) static irqreturn_t mt2701_asys_isr(int irq_id, void *dev)
{ {
int id; int id;
@@ -1414,9 +1407,9 @@ static int mt2701_afe_runtime_resume(struct device *dev) @@ -1414,9 +1407,9 @@ static int mt2701_afe_runtime_resume(str
static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev) static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
{ {
@ -51,7 +49,7 @@ index 0edadca12a5e..f0cd08fa5c5d 100644
struct device *dev; struct device *dev;
int i, irq_id, ret; int i, irq_id, ret;
@@ -1446,17 +1439,11 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev) @@ -1446,17 +1439,11 @@ static int mt2701_afe_pcm_dev_probe(stru
return ret; return ret;
} }
@ -74,7 +72,7 @@ index 0edadca12a5e..f0cd08fa5c5d 100644
mutex_init(&afe->irq_alloc_lock); mutex_init(&afe->irq_alloc_lock);
@@ -1490,6 +1477,12 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev) @@ -1490,6 +1477,12 @@ static int mt2701_afe_pcm_dev_probe(stru
= &mt2701_i2s_data[i][I2S_IN]; = &mt2701_i2s_data[i][I2S_IN];
} }
@ -87,7 +85,7 @@ index 0edadca12a5e..f0cd08fa5c5d 100644
afe->mtk_afe_hardware = &mt2701_afe_hardware; afe->mtk_afe_hardware = &mt2701_afe_hardware;
afe->memif_fs = mt2701_memif_fs; afe->memif_fs = mt2701_memif_fs;
afe->irq_fs = mt2701_irq_fs; afe->irq_fs = mt2701_irq_fs;
@@ -1502,7 +1495,7 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev) @@ -1502,7 +1495,7 @@ static int mt2701_afe_pcm_dev_probe(stru
ret = mt2701_init_clock(afe); ret = mt2701_init_clock(afe);
if (ret) { if (ret) {
dev_err(dev, "init clock error\n"); dev_err(dev, "init clock error\n");
@ -96,7 +94,7 @@ index 0edadca12a5e..f0cd08fa5c5d 100644
} }
platform_set_drvdata(pdev, afe); platform_set_drvdata(pdev, afe);
@@ -1521,10 +1514,10 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev) @@ -1521,10 +1514,10 @@ static int mt2701_afe_pcm_dev_probe(stru
goto err_platform; goto err_platform;
} }
@ -111,7 +109,7 @@ index 0edadca12a5e..f0cd08fa5c5d 100644
if (ret) { if (ret) {
dev_warn(dev, "err_dai_component\n"); dev_warn(dev, "err_dai_component\n");
goto err_dai_component; goto err_dai_component;
@@ -1538,6 +1531,8 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev) @@ -1538,6 +1531,8 @@ err_platform:
pm_runtime_put_sync(dev); pm_runtime_put_sync(dev);
err_pm_disable: err_pm_disable:
pm_runtime_disable(dev); pm_runtime_disable(dev);
@ -120,8 +118,6 @@ index 0edadca12a5e..f0cd08fa5c5d 100644
return ret; return ret;
} }
diff --git a/sound/soc/mediatek/mt2701/mt2701-reg.h b/sound/soc/mediatek/mt2701/mt2701-reg.h
index f17c76f37b5f..18e676974f22 100644
--- a/sound/soc/mediatek/mt2701/mt2701-reg.h --- a/sound/soc/mediatek/mt2701/mt2701-reg.h
+++ b/sound/soc/mediatek/mt2701/mt2701-reg.h +++ b/sound/soc/mediatek/mt2701/mt2701-reg.h
@@ -145,5 +145,4 @@ @@ -145,5 +145,4 @@
@ -130,6 +126,3 @@ index f17c76f37b5f..18e676974f22 100644
-#define AFE_END_ADDR 0x15e0 -#define AFE_END_ADDR 0x15e0
#endif #endif
--
2.11.0

View file

@ -13,8 +13,6 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
.../devicetree/bindings/sound/mt2701-afe-pcm.txt | 171 +++++++++++---------- .../devicetree/bindings/sound/mt2701-afe-pcm.txt | 171 +++++++++++----------
1 file changed, 93 insertions(+), 78 deletions(-) 1 file changed, 93 insertions(+), 78 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt b/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt
index 0450baad2813..6df87b97f7cb 100644
--- a/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt --- a/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt
+++ b/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt +++ b/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt
@@ -2,15 +2,17 @@ Mediatek AFE PCM controller for mt2701 @@ -2,15 +2,17 @@ Mediatek AFE PCM controller for mt2701
@ -84,6 +82,46 @@ index 0450baad2813..6df87b97f7cb 100644
- <&audiosys CLK_AUD_A1SYS>, - <&audiosys CLK_AUD_A1SYS>,
- <&audiosys CLK_AUD_A2SYS>, - <&audiosys CLK_AUD_A2SYS>,
- <&audiosys CLK_AUD_AFE_MRGIF>; - <&audiosys CLK_AUD_AFE_MRGIF>;
-
- clock-names = "top_audio_mux1_sel",
- "top_audio_mux2_sel",
- "i2s0_src_sel",
- "i2s1_src_sel",
- "i2s2_src_sel",
- "i2s3_src_sel",
- "i2s0_src_div",
- "i2s1_src_div",
- "i2s2_src_div",
- "i2s3_src_div",
- "i2s0_mclk_en",
- "i2s1_mclk_en",
- "i2s2_mclk_en",
- "i2s3_mclk_en",
- "i2so0_hop_ck",
- "i2so1_hop_ck",
- "i2so2_hop_ck",
- "i2so3_hop_ck",
- "i2si0_hop_ck",
- "i2si1_hop_ck",
- "i2si2_hop_ck",
- "i2si3_hop_ck",
- "asrc0_out_ck",
- "asrc1_out_ck",
- "asrc2_out_ck",
- "asrc3_out_ck",
- "audio_afe_pd",
- "audio_afe_conn_pd",
- "audio_a1sys_pd",
- "audio_a2sys_pd",
- "audio_mrgif_pd";
-
- assigned-clocks = <&topckgen CLK_TOP_AUD_MUX1_SEL>,
- <&topckgen CLK_TOP_AUD_MUX2_SEL>,
- <&topckgen CLK_TOP_AUD_MUX1_DIV>,
- <&topckgen CLK_TOP_AUD_MUX2_DIV>;
- assigned-clock-parents = <&topckgen CLK_TOP_AUD1PLL_98M>,
- <&topckgen CLK_TOP_AUD2PLL_90M>;
- assigned-clock-rates = <0>, <0>, <49152000>, <45158400>;
+ audsys: audio-subsystem@11220000 { + audsys: audio-subsystem@11220000 {
+ compatible = "mediatek,mt2701-audsys", "syscon", "simple-mfd"; + compatible = "mediatek,mt2701-audsys", "syscon", "simple-mfd";
+ ... + ...
@ -129,38 +167,7 @@ index 0450baad2813..6df87b97f7cb 100644
+ <&audsys CLK_AUD_A1SYS>, + <&audsys CLK_AUD_A1SYS>,
+ <&audsys CLK_AUD_A2SYS>, + <&audsys CLK_AUD_A2SYS>,
+ <&audsys CLK_AUD_AFE_MRGIF>; + <&audsys CLK_AUD_AFE_MRGIF>;
+
- clock-names = "top_audio_mux1_sel",
- "top_audio_mux2_sel",
- "i2s0_src_sel",
- "i2s1_src_sel",
- "i2s2_src_sel",
- "i2s3_src_sel",
- "i2s0_src_div",
- "i2s1_src_div",
- "i2s2_src_div",
- "i2s3_src_div",
- "i2s0_mclk_en",
- "i2s1_mclk_en",
- "i2s2_mclk_en",
- "i2s3_mclk_en",
- "i2so0_hop_ck",
- "i2so1_hop_ck",
- "i2so2_hop_ck",
- "i2so3_hop_ck",
- "i2si0_hop_ck",
- "i2si1_hop_ck",
- "i2si2_hop_ck",
- "i2si3_hop_ck",
- "asrc0_out_ck",
- "asrc1_out_ck",
- "asrc2_out_ck",
- "asrc3_out_ck",
- "audio_afe_pd",
- "audio_afe_conn_pd",
- "audio_a1sys_pd",
- "audio_a2sys_pd",
- "audio_mrgif_pd";
+ clock-names = "infra_sys_audio_clk", + clock-names = "infra_sys_audio_clk",
+ "top_audio_mux1_sel", + "top_audio_mux1_sel",
+ "top_audio_mux2_sel", + "top_audio_mux2_sel",
@ -195,14 +202,7 @@ index 0450baad2813..6df87b97f7cb 100644
+ "audio_a1sys_pd", + "audio_a1sys_pd",
+ "audio_a2sys_pd", + "audio_a2sys_pd",
+ "audio_mrgif_pd"; + "audio_mrgif_pd";
+
- assigned-clocks = <&topckgen CLK_TOP_AUD_MUX1_SEL>,
- <&topckgen CLK_TOP_AUD_MUX2_SEL>,
- <&topckgen CLK_TOP_AUD_MUX1_DIV>,
- <&topckgen CLK_TOP_AUD_MUX2_DIV>;
- assigned-clock-parents = <&topckgen CLK_TOP_AUD1PLL_98M>,
- <&topckgen CLK_TOP_AUD2PLL_90M>;
- assigned-clock-rates = <0>, <0>, <49152000>, <45158400>;
+ assigned-clocks = <&topckgen CLK_TOP_AUD_MUX1_SEL>, + assigned-clocks = <&topckgen CLK_TOP_AUD_MUX1_SEL>,
+ <&topckgen CLK_TOP_AUD_MUX2_SEL>, + <&topckgen CLK_TOP_AUD_MUX2_SEL>,
+ <&topckgen CLK_TOP_AUD_MUX1_DIV>, + <&topckgen CLK_TOP_AUD_MUX1_DIV>,
@ -212,6 +212,3 @@ index 0450baad2813..6df87b97f7cb 100644
+ assigned-clock-rates = <0>, <0>, <49152000>, <45158400>; + assigned-clock-rates = <0>, <0>, <49152000>, <45158400>;
+ }; + };
}; };
--
2.11.0

View file

@ -13,11 +13,9 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/mtu3/mtu3_plat.c | 2 +- drivers/usb/mtu3/mtu3_plat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
index 9ff33579b42e..a2523ead46cf 100644
--- a/drivers/usb/mtu3/mtu3_plat.c --- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c +++ b/drivers/usb/mtu3/mtu3_plat.c
@@ -317,7 +317,7 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb) @@ -317,7 +317,7 @@ static int get_ssusb_rscs(struct platfor
otg_sx->edev = extcon_get_edev_by_phandle(ssusb->dev, 0); otg_sx->edev = extcon_get_edev_by_phandle(ssusb->dev, 0);
if (IS_ERR(otg_sx->edev)) { if (IS_ERR(otg_sx->edev)) {
dev_err(ssusb->dev, "couldn't get extcon device\n"); dev_err(ssusb->dev, "couldn't get extcon device\n");
@ -26,6 +24,3 @@ index 9ff33579b42e..a2523ead46cf 100644
} }
} }
--
2.11.0

View file

@ -18,8 +18,6 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/mtu3/mtu3_plat.c | 8 +-- drivers/usb/mtu3/mtu3_plat.c | 8 +--
4 files changed, 70 insertions(+), 67 deletions(-) 4 files changed, 70 insertions(+), 67 deletions(-)
diff --git a/drivers/usb/mtu3/mtu3.h b/drivers/usb/mtu3/mtu3.h
index d80e4e813248..ed3aec46eda1 100644
--- a/drivers/usb/mtu3/mtu3.h --- a/drivers/usb/mtu3/mtu3.h
+++ b/drivers/usb/mtu3/mtu3.h +++ b/drivers/usb/mtu3/mtu3.h
@@ -238,7 +238,10 @@ struct otg_switch_mtk { @@ -238,7 +238,10 @@ struct otg_switch_mtk {
@ -47,11 +45,9 @@ index d80e4e813248..ed3aec46eda1 100644
}; };
/** /**
diff --git a/drivers/usb/mtu3/mtu3_dr.h b/drivers/usb/mtu3/mtu3_dr.h
index 0f0cbac00192..1fa62ce136b6 100644
--- a/drivers/usb/mtu3/mtu3_dr.h --- a/drivers/usb/mtu3/mtu3_dr.h
+++ b/drivers/usb/mtu3/mtu3_dr.h +++ b/drivers/usb/mtu3/mtu3_dr.h
@@ -27,8 +27,7 @@ int ssusb_wakeup_of_property_parse(struct ssusb_mtk *ssusb, @@ -27,8 +27,7 @@ int ssusb_wakeup_of_property_parse(struc
struct device_node *dn); struct device_node *dn);
int ssusb_host_enable(struct ssusb_mtk *ssusb); int ssusb_host_enable(struct ssusb_mtk *ssusb);
int ssusb_host_disable(struct ssusb_mtk *ssusb, bool suspend); int ssusb_host_disable(struct ssusb_mtk *ssusb, bool suspend);
@ -61,8 +57,6 @@ index 0f0cbac00192..1fa62ce136b6 100644
#else #else
diff --git a/drivers/usb/mtu3/mtu3_host.c b/drivers/usb/mtu3/mtu3_host.c
index ec76b86dd887..1a1b6cf432a1 100644
--- a/drivers/usb/mtu3/mtu3_host.c --- a/drivers/usb/mtu3/mtu3_host.c
+++ b/drivers/usb/mtu3/mtu3_host.c +++ b/drivers/usb/mtu3/mtu3_host.c
@@ -27,66 +27,77 @@ @@ -27,66 +27,77 @@
@ -101,7 +95,8 @@ index ec76b86dd887..1a1b6cf432a1 100644
{ {
- u32 tmp; - u32 tmp;
- struct regmap *pericfg = ssusb->pericfg; - struct regmap *pericfg = ssusb->pericfg;
- + u32 reg, msk, val;
- regmap_read(pericfg, PERI_WK_CTRL1, &tmp); - regmap_read(pericfg, PERI_WK_CTRL1, &tmp);
- tmp &= ~UWK_CTL1_IS_P; - tmp &= ~UWK_CTL1_IS_P;
- tmp &= ~(UWK_CTL1_IS_C(0xf)); - tmp &= ~(UWK_CTL1_IS_C(0xf));
@ -121,8 +116,6 @@ index ec76b86dd887..1a1b6cf432a1 100644
- regmap_read(ssusb->pericfg, PERI_WK_CTRL1, &tmp); - regmap_read(ssusb->pericfg, PERI_WK_CTRL1, &tmp);
- tmp &= ~UWK_CTL1_IS_E; - tmp &= ~UWK_CTL1_IS_E;
- regmap_write(ssusb->pericfg, PERI_WK_CTRL1, tmp); - regmap_write(ssusb->pericfg, PERI_WK_CTRL1, tmp);
+ u32 reg, msk, val;
+
+ switch (ssusb->uwk_vers) { + switch (ssusb->uwk_vers) {
+ case SSUSB_UWK_V1: + case SSUSB_UWK_V1:
+ reg = ssusb->uwk_reg_base + PERI_WK_CTRL1; + reg = ssusb->uwk_reg_base + PERI_WK_CTRL1;
@ -188,7 +181,7 @@ index ec76b86dd887..1a1b6cf432a1 100644
} }
static void host_ports_num_get(struct ssusb_mtk *ssusb) static void host_ports_num_get(struct ssusb_mtk *ssusb)
@@ -244,17 +255,3 @@ void ssusb_host_exit(struct ssusb_mtk *ssusb) @@ -244,17 +255,3 @@ void ssusb_host_exit(struct ssusb_mtk *s
of_platform_depopulate(ssusb->dev); of_platform_depopulate(ssusb->dev);
ssusb_host_cleanup(ssusb); ssusb_host_cleanup(ssusb);
} }
@ -206,11 +199,9 @@ index ec76b86dd887..1a1b6cf432a1 100644
- if (ssusb->wakeup_en) - if (ssusb->wakeup_en)
- ssusb_wakeup_ip_sleep_dis(ssusb); - ssusb_wakeup_ip_sleep_dis(ssusb);
-} -}
diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
index a2523ead46cf..4cafd4ca8457 100644
--- a/drivers/usb/mtu3/mtu3_plat.c --- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c +++ b/drivers/usb/mtu3/mtu3_plat.c
@@ -291,8 +291,10 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb) @@ -291,8 +291,10 @@ static int get_ssusb_rscs(struct platfor
/* if host role is supported */ /* if host role is supported */
ret = ssusb_wakeup_of_property_parse(ssusb, node); ret = ssusb_wakeup_of_property_parse(ssusb, node);
@ -222,7 +213,7 @@ index a2523ead46cf..4cafd4ca8457 100644
/* optional property, ignore the error if it does not exist */ /* optional property, ignore the error if it does not exist */
of_property_read_u32(node, "mediatek,u3p-dis-msk", of_property_read_u32(node, "mediatek,u3p-dis-msk",
@@ -466,7 +468,7 @@ static int __maybe_unused mtu3_suspend(struct device *dev) @@ -466,7 +468,7 @@ static int __maybe_unused mtu3_suspend(s
ssusb_host_disable(ssusb, true); ssusb_host_disable(ssusb, true);
ssusb_phy_power_off(ssusb); ssusb_phy_power_off(ssusb);
ssusb_clks_disable(ssusb); ssusb_clks_disable(ssusb);
@ -231,7 +222,7 @@ index a2523ead46cf..4cafd4ca8457 100644
return 0; return 0;
} }
@@ -482,7 +484,7 @@ static int __maybe_unused mtu3_resume(struct device *dev) @@ -482,7 +484,7 @@ static int __maybe_unused mtu3_resume(st
if (!ssusb->is_host) if (!ssusb->is_host)
return 0; return 0;
@ -240,6 +231,3 @@ index a2523ead46cf..4cafd4ca8457 100644
ret = ssusb_clks_enable(ssusb); ret = ssusb_clks_enable(ssusb);
if (ret) if (ret)
goto clks_err; goto clks_err;
--
2.11.0

View file

@ -14,8 +14,6 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/devicetree/bindings/usb/mediatek,mtu3.txt | 15 ++++++++++----- Documentation/devicetree/bindings/usb/mediatek,mtu3.txt | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-) 1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
index b2271d8e6b50..d589a1ef96a1 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt --- a/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt +++ b/Documentation/devicetree/bindings/usb/mediatek,mtu3.txt
@@ -42,9 +42,14 @@ Optional properties: @@ -42,9 +42,14 @@ Optional properties:
@ -47,6 +45,3 @@ index b2271d8e6b50..d589a1ef96a1 100644
#address-cells = <2>; #address-cells = <2>;
#size-cells = <2>; #size-cells = <2>;
ranges; ranges;
--
2.11.0

View file

@ -21,8 +21,6 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-mtk.h | 6 +- drivers/usb/host/xhci-mtk.h | 6 +-
2 files changed, 65 insertions(+), 118 deletions(-) 2 files changed, 65 insertions(+), 118 deletions(-)
diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
index e5caabe7eebe..8e51b3fec386 100644
--- a/drivers/usb/host/xhci-mtk.c --- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c +++ b/drivers/usb/host/xhci-mtk.c
@@ -66,26 +66,21 @@ @@ -66,26 +66,21 @@
@ -67,7 +65,7 @@ index e5caabe7eebe..8e51b3fec386 100644
}; };
static int xhci_mtk_host_enable(struct xhci_hcd_mtk *mtk) static int xhci_mtk_host_enable(struct xhci_hcd_mtk *mtk)
@@ -308,112 +303,58 @@ static void xhci_mtk_clks_disable(struct xhci_hcd_mtk *mtk) @@ -308,112 +303,58 @@ static void xhci_mtk_clks_disable(struct
} }
/* only clocks can be turn off for ip-sleep wakeup mode */ /* only clocks can be turn off for ip-sleep wakeup mode */
@ -76,7 +74,8 @@ index e5caabe7eebe..8e51b3fec386 100644
{ {
- u32 tmp; - u32 tmp;
- struct regmap *pericfg = mtk->pericfg; - struct regmap *pericfg = mtk->pericfg;
- + u32 reg, msk, val;
- regmap_read(pericfg, PERI_WK_CTRL1, &tmp); - regmap_read(pericfg, PERI_WK_CTRL1, &tmp);
- tmp &= ~UWK_CTL1_IS_P; - tmp &= ~UWK_CTL1_IS_P;
- tmp &= ~(UWK_CTL1_IS_C(0xf)); - tmp &= ~(UWK_CTL1_IS_C(0xf));
@ -87,8 +86,15 @@ index e5caabe7eebe..8e51b3fec386 100644
- regmap_read(pericfg, PERI_WK_CTRL1, &tmp); - regmap_read(pericfg, PERI_WK_CTRL1, &tmp);
- dev_dbg(mtk->dev, "%s(): WK_CTRL1[P6,E25,C26:29]=%#x\n", - dev_dbg(mtk->dev, "%s(): WK_CTRL1[P6,E25,C26:29]=%#x\n",
- __func__, tmp); - __func__, tmp);
+ u32 reg, msk, val; -}
+ -
-static void usb_wakeup_ip_sleep_dis(struct xhci_hcd_mtk *mtk)
-{
- u32 tmp;
-
- regmap_read(mtk->pericfg, PERI_WK_CTRL1, &tmp);
- tmp &= ~UWK_CTL1_IS_E;
- regmap_write(mtk->pericfg, PERI_WK_CTRL1, tmp);
+ switch (mtk->uwk_vers) { + switch (mtk->uwk_vers) {
+ case SSUSB_UWK_V1: + case SSUSB_UWK_V1:
+ reg = mtk->uwk_reg_base + PERI_WK_CTRL1; + reg = mtk->uwk_reg_base + PERI_WK_CTRL1;
@ -106,29 +112,14 @@ index e5caabe7eebe..8e51b3fec386 100644
+ regmap_update_bits(mtk->uwk, reg, msk, val); + regmap_update_bits(mtk->uwk, reg, msk, val);
} }
-static void usb_wakeup_ip_sleep_dis(struct xhci_hcd_mtk *mtk)
+static int usb_wakeup_of_property_parse(struct xhci_hcd_mtk *mtk,
+ struct device_node *dn)
{
- u32 tmp;
+ struct of_phandle_args args;
+ int ret;
- regmap_read(mtk->pericfg, PERI_WK_CTRL1, &tmp);
- tmp &= ~UWK_CTL1_IS_E;
- regmap_write(mtk->pericfg, PERI_WK_CTRL1, tmp);
-}
+ /* Wakeup function is optional */
+ mtk->uwk_en = of_property_read_bool(dn, "wakeup-source");
+ if (!mtk->uwk_en)
+ return 0;
-/* -/*
-* for line-state wakeup mode, phy's power should not power-down -* for line-state wakeup mode, phy's power should not power-down
-* and only support cable plug in/out -* and only support cable plug in/out
-*/ -*/
-static void usb_wakeup_line_state_en(struct xhci_hcd_mtk *mtk) -static void usb_wakeup_line_state_en(struct xhci_hcd_mtk *mtk)
-{ +static int usb_wakeup_of_property_parse(struct xhci_hcd_mtk *mtk,
+ struct device_node *dn)
{
- u32 tmp; - u32 tmp;
- struct regmap *pericfg = mtk->pericfg; - struct regmap *pericfg = mtk->pericfg;
- -
@ -140,7 +131,9 @@ index e5caabe7eebe..8e51b3fec386 100644
- regmap_write(pericfg, PERI_WK_CTRL1, tmp); - regmap_write(pericfg, PERI_WK_CTRL1, tmp);
- regmap_read(pericfg, PERI_WK_CTRL1, &tmp); - regmap_read(pericfg, PERI_WK_CTRL1, &tmp);
- regmap_write(pericfg, PERI_WK_CTRL1, tmp | UWK_CTL1_0P_LS_E); - regmap_write(pericfg, PERI_WK_CTRL1, tmp | UWK_CTL1_0P_LS_E);
- + struct of_phandle_args args;
+ int ret;
- /* line-state of u2-port1 */ - /* line-state of u2-port1 */
- regmap_read(pericfg, PERI_WK_CTRL0, &tmp); - regmap_read(pericfg, PERI_WK_CTRL0, &tmp);
- tmp &= ~(UWK_CTL1_1P_LS_C(0xf)); - tmp &= ~(UWK_CTL1_1P_LS_C(0xf));
@ -148,26 +141,24 @@ index e5caabe7eebe..8e51b3fec386 100644
- regmap_write(pericfg, PERI_WK_CTRL0, tmp); - regmap_write(pericfg, PERI_WK_CTRL0, tmp);
- regmap_write(pericfg, PERI_WK_CTRL0, tmp | UWK_CTL1_1P_LS_E); - regmap_write(pericfg, PERI_WK_CTRL0, tmp | UWK_CTL1_1P_LS_E);
-} -}
+ ret = of_parse_phandle_with_fixed_args(dn, + /* Wakeup function is optional */
+ "mediatek,syscon-wakeup", 2, 0, &args); + mtk->uwk_en = of_property_read_bool(dn, "wakeup-source");
+ if (ret) + if (!mtk->uwk_en)
+ return ret; + return 0;
-static void usb_wakeup_line_state_dis(struct xhci_hcd_mtk *mtk) -static void usb_wakeup_line_state_dis(struct xhci_hcd_mtk *mtk)
-{ -{
- u32 tmp; - u32 tmp;
- struct regmap *pericfg = mtk->pericfg; - struct regmap *pericfg = mtk->pericfg;
- + ret = of_parse_phandle_with_fixed_args(dn,
+ "mediatek,syscon-wakeup", 2, 0, &args);
+ if (ret)
+ return ret;
- /* line-state of u2-port0 */ - /* line-state of u2-port0 */
- regmap_read(pericfg, PERI_WK_CTRL1, &tmp); - regmap_read(pericfg, PERI_WK_CTRL1, &tmp);
- tmp &= ~UWK_CTL1_0P_LS_E; - tmp &= ~UWK_CTL1_0P_LS_E;
- regmap_write(pericfg, PERI_WK_CTRL1, tmp); - regmap_write(pericfg, PERI_WK_CTRL1, tmp);
-
- /* line-state of u2-port1 */
- regmap_read(pericfg, PERI_WK_CTRL0, &tmp);
- tmp &= ~UWK_CTL1_1P_LS_E;
- regmap_write(pericfg, PERI_WK_CTRL0, tmp);
-}
+ mtk->uwk_reg_base = args.args[0]; + mtk->uwk_reg_base = args.args[0];
+ mtk->uwk_vers = args.args[1]; + mtk->uwk_vers = args.args[1];
+ mtk->uwk = syscon_node_to_regmap(args.np); + mtk->uwk = syscon_node_to_regmap(args.np);
@ -175,27 +166,33 @@ index e5caabe7eebe..8e51b3fec386 100644
+ dev_info(mtk->dev, "uwk - reg:0x%x, version:%d\n", + dev_info(mtk->dev, "uwk - reg:0x%x, version:%d\n",
+ mtk->uwk_reg_base, mtk->uwk_vers); + mtk->uwk_reg_base, mtk->uwk_vers);
- /* line-state of u2-port1 */
- regmap_read(pericfg, PERI_WK_CTRL0, &tmp);
- tmp &= ~UWK_CTL1_1P_LS_E;
- regmap_write(pericfg, PERI_WK_CTRL0, tmp);
-}
+ return PTR_ERR_OR_ZERO(mtk->uwk);
-static void usb_wakeup_enable(struct xhci_hcd_mtk *mtk) -static void usb_wakeup_enable(struct xhci_hcd_mtk *mtk)
-{ -{
- if (mtk->wakeup_src == SSUSB_WK_IP_SLEEP) - if (mtk->wakeup_src == SSUSB_WK_IP_SLEEP)
- usb_wakeup_ip_sleep_en(mtk); - usb_wakeup_ip_sleep_en(mtk);
- else if (mtk->wakeup_src == SSUSB_WK_LINE_STATE) - else if (mtk->wakeup_src == SSUSB_WK_LINE_STATE)
- usb_wakeup_line_state_en(mtk); - usb_wakeup_line_state_en(mtk);
-} }
+ return PTR_ERR_OR_ZERO(mtk->uwk);
-static void usb_wakeup_disable(struct xhci_hcd_mtk *mtk) -static void usb_wakeup_disable(struct xhci_hcd_mtk *mtk)
-{ +static void usb_wakeup_set(struct xhci_hcd_mtk *mtk, bool enable)
{
- if (mtk->wakeup_src == SSUSB_WK_IP_SLEEP) - if (mtk->wakeup_src == SSUSB_WK_IP_SLEEP)
- usb_wakeup_ip_sleep_dis(mtk); - usb_wakeup_ip_sleep_dis(mtk);
- else if (mtk->wakeup_src == SSUSB_WK_LINE_STATE) - else if (mtk->wakeup_src == SSUSB_WK_LINE_STATE)
- usb_wakeup_line_state_dis(mtk); - usb_wakeup_line_state_dis(mtk);
} -}
-
-static int usb_wakeup_of_property_parse(struct xhci_hcd_mtk *mtk, -static int usb_wakeup_of_property_parse(struct xhci_hcd_mtk *mtk,
- struct device_node *dn) - struct device_node *dn)
+static void usb_wakeup_set(struct xhci_hcd_mtk *mtk, bool enable) -{
{
- struct device *dev = mtk->dev; - struct device *dev = mtk->dev;
- -
- /* - /*
@ -220,7 +217,7 @@ index e5caabe7eebe..8e51b3fec386 100644
} }
static int xhci_mtk_setup(struct usb_hcd *hcd); static int xhci_mtk_setup(struct usb_hcd *hcd);
@@ -595,8 +536,10 @@ static int xhci_mtk_probe(struct platform_device *pdev) @@ -595,8 +536,10 @@ static int xhci_mtk_probe(struct platfor
&mtk->u3p_dis_msk); &mtk->u3p_dis_msk);
ret = usb_wakeup_of_property_parse(mtk, node); ret = usb_wakeup_of_property_parse(mtk, node);
@ -232,7 +229,7 @@ index e5caabe7eebe..8e51b3fec386 100644
mtk->num_phys = of_count_phandle_with_args(node, mtk->num_phys = of_count_phandle_with_args(node,
"phys", "#phy-cells"); "phys", "#phy-cells");
@@ -780,7 +723,7 @@ static int __maybe_unused xhci_mtk_suspend(struct device *dev) @@ -780,7 +723,7 @@ static int __maybe_unused xhci_mtk_suspe
xhci_mtk_host_disable(mtk); xhci_mtk_host_disable(mtk);
xhci_mtk_phy_power_off(mtk); xhci_mtk_phy_power_off(mtk);
xhci_mtk_clks_disable(mtk); xhci_mtk_clks_disable(mtk);
@ -241,7 +238,7 @@ index e5caabe7eebe..8e51b3fec386 100644
return 0; return 0;
} }
@@ -790,7 +733,7 @@ static int __maybe_unused xhci_mtk_resume(struct device *dev) @@ -790,7 +733,7 @@ static int __maybe_unused xhci_mtk_resum
struct usb_hcd *hcd = mtk->hcd; struct usb_hcd *hcd = mtk->hcd;
struct xhci_hcd *xhci = hcd_to_xhci(hcd); struct xhci_hcd *xhci = hcd_to_xhci(hcd);
@ -250,8 +247,6 @@ index e5caabe7eebe..8e51b3fec386 100644
xhci_mtk_clks_enable(mtk); xhci_mtk_clks_enable(mtk);
xhci_mtk_phy_power_on(mtk); xhci_mtk_phy_power_on(mtk);
xhci_mtk_host_enable(mtk); xhci_mtk_host_enable(mtk);
diff --git a/drivers/usb/host/xhci-mtk.h b/drivers/usb/host/xhci-mtk.h
index 45ff5c67efb5..85c007ee1f52 100644
--- a/drivers/usb/host/xhci-mtk.h --- a/drivers/usb/host/xhci-mtk.h
+++ b/drivers/usb/host/xhci-mtk.h +++ b/drivers/usb/host/xhci-mtk.h
@@ -131,8 +131,12 @@ struct xhci_hcd_mtk { @@ -131,8 +131,12 @@ struct xhci_hcd_mtk {
@ -268,6 +263,3 @@ index 45ff5c67efb5..85c007ee1f52 100644
}; };
static inline struct xhci_hcd_mtk *hcd_to_mtk(struct usb_hcd *hcd) static inline struct xhci_hcd_mtk *hcd_to_mtk(struct usb_hcd *hcd)
--
2.11.0

View file

@ -38,8 +38,6 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci.h | 2 ++ drivers/usb/host/xhci.h | 2 ++
7 files changed, 23 insertions(+), 5 deletions(-) 7 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
index 30595964876a..9ff560298498 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt --- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt +++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
@@ -46,6 +46,7 @@ Optional properties: @@ -46,6 +46,7 @@ Optional properties:
@ -58,11 +56,9 @@ index 30595964876a..9ff560298498 100644
}; };
2nd: dual-role mode with xHCI driver 2nd: dual-role mode with xHCI driver
diff --git a/Documentation/devicetree/bindings/usb/usb-xhci.txt b/Documentation/devicetree/bindings/usb/usb-xhci.txt
index 2d80b60eeabe..2390ae58636b 100644
--- a/Documentation/devicetree/bindings/usb/usb-xhci.txt --- a/Documentation/devicetree/bindings/usb/usb-xhci.txt
+++ b/Documentation/devicetree/bindings/usb/usb-xhci.txt +++ b/Documentation/devicetree/bindings/usb/usb-xhci.txt
@@ -28,6 +28,7 @@ Optional properties: @@ -29,6 +29,7 @@ Optional properties:
- clocks: reference to a clock - clocks: reference to a clock
- usb3-lpm-capable: determines if platform is USB3 LPM capable - usb3-lpm-capable: determines if platform is USB3 LPM capable
- quirk-broken-port-ped: set if the controller has broken port disable mechanism - quirk-broken-port-ped: set if the controller has broken port disable mechanism
@ -70,11 +66,9 @@ index 2d80b60eeabe..2390ae58636b 100644
Example: Example:
usb@f0931000 { usb@f0931000 {
diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
index 8e51b3fec386..8e4495be6592 100644
--- a/drivers/usb/host/xhci-mtk.c --- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c +++ b/drivers/usb/host/xhci-mtk.c
@@ -629,6 +629,15 @@ static int xhci_mtk_probe(struct platform_device *pdev) @@ -629,6 +629,15 @@ static int xhci_mtk_probe(struct platfor
xhci = hcd_to_xhci(hcd); xhci = hcd_to_xhci(hcd);
xhci->main_hcd = hcd; xhci->main_hcd = hcd;
@ -90,11 +84,9 @@ index 8e51b3fec386..8e4495be6592 100644
xhci->shared_hcd = usb_create_shared_hcd(driver, dev, xhci->shared_hcd = usb_create_shared_hcd(driver, dev,
dev_name(dev), hcd); dev_name(dev), hcd);
if (!xhci->shared_hcd) { if (!xhci->shared_hcd) {
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 8071c8fdd15e..cdd7d7bdfc0f 100644
--- a/drivers/usb/host/xhci-pci.c --- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c
@@ -258,6 +258,9 @@ static int xhci_pci_setup(struct usb_hcd *hcd) @@ -255,6 +255,9 @@ static int xhci_pci_setup(struct usb_hcd
if (!xhci->sbrn) if (!xhci->sbrn)
pci_read_config_byte(pdev, XHCI_SBRN_OFFSET, &xhci->sbrn); pci_read_config_byte(pdev, XHCI_SBRN_OFFSET, &xhci->sbrn);
@ -104,11 +96,9 @@ index 8071c8fdd15e..cdd7d7bdfc0f 100644
retval = xhci_gen_setup(hcd, xhci_pci_quirks); retval = xhci_gen_setup(hcd, xhci_pci_quirks);
if (retval) if (retval)
return retval; return retval;
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index 163bafde709f..47230453a876 100644
--- a/drivers/usb/host/xhci-plat.c --- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c
@@ -265,6 +265,11 @@ static int xhci_plat_probe(struct platform_device *pdev) @@ -269,6 +269,11 @@ static int xhci_plat_probe(struct platfo
if (device_property_read_bool(&pdev->dev, "quirk-broken-port-ped")) if (device_property_read_bool(&pdev->dev, "quirk-broken-port-ped"))
xhci->quirks |= XHCI_BROKEN_PORT_PED; xhci->quirks |= XHCI_BROKEN_PORT_PED;
@ -120,8 +110,6 @@ index 163bafde709f..47230453a876 100644
hcd->usb_phy = devm_usb_get_phy_by_phandle(sysdev, "usb-phy", 0); hcd->usb_phy = devm_usb_get_phy_by_phandle(sysdev, "usb-phy", 0);
if (IS_ERR(hcd->usb_phy)) { if (IS_ERR(hcd->usb_phy)) {
ret = PTR_ERR(hcd->usb_phy); ret = PTR_ERR(hcd->usb_phy);
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index b2ff1ff1a02f..ac1b26a81e77 100644
--- a/drivers/usb/host/xhci.c --- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c
@@ -597,11 +597,7 @@ int xhci_run(struct usb_hcd *hcd) @@ -597,11 +597,7 @@ int xhci_run(struct usb_hcd *hcd)
@ -137,11 +125,9 @@ index b2ff1ff1a02f..ac1b26a81e77 100644
writel(temp, &xhci->ir_set->irq_control); writel(temp, &xhci->ir_set->irq_control);
/* Set the HCD state before we enable the irqs */ /* Set the HCD state before we enable the irqs */
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 2abaa4d6d39d..614380af0f96 100644
--- a/drivers/usb/host/xhci.h --- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h
@@ -1723,6 +1723,8 @@ struct xhci_hcd { @@ -1726,6 +1726,8 @@ struct xhci_hcd {
u8 max_interrupters; u8 max_interrupters;
u8 max_ports; u8 max_ports;
u8 isoc_threshold; u8 isoc_threshold;
@ -150,6 +136,3 @@ index 2abaa4d6d39d..614380af0f96 100644
int event_ring_max; int event_ring_max;
/* 4KB min, 128MB max */ /* 4KB min, 128MB max */
int page_size; int page_size;
--
2.11.0

View file

@ -15,8 +15,6 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
.../devicetree/bindings/usb/mediatek,mtk-xhci.txt | 16 ++++++++++------ .../devicetree/bindings/usb/mediatek,mtk-xhci.txt | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-) 1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
index 9ff560298498..88d9f4a4b280 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt --- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt +++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt
@@ -35,10 +35,14 @@ Required properties: @@ -35,10 +35,14 @@ Required properties:
@ -49,6 +47,3 @@ index 9ff560298498..88d9f4a4b280 100644
imod-interval-ns = <10000>; imod-interval-ns = <10000>;
}; };
--
2.11.0

View file

@ -32,10 +32,8 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/mediatek/clk-mtk.h | 7 ------- drivers/clk/mediatek/clk-mtk.h | 7 -------
3 files changed, 3 insertions(+), 9 deletions(-) 3 files changed, 3 insertions(+), 9 deletions(-)
Index: linux-4.14.25/drivers/clk/mediatek/Kconfig --- a/drivers/clk/mediatek/Kconfig
=================================================================== +++ b/drivers/clk/mediatek/Kconfig
--- linux-4.14.25.orig/drivers/clk/mediatek/Kconfig
+++ linux-4.14.25/drivers/clk/mediatek/Kconfig
@@ -6,6 +6,7 @@ menu "Clock driver for MediaTek SoC" @@ -6,6 +6,7 @@ menu "Clock driver for MediaTek SoC"
config COMMON_CLK_MEDIATEK config COMMON_CLK_MEDIATEK
@ -44,10 +42,8 @@ Index: linux-4.14.25/drivers/clk/mediatek/Kconfig
---help--- ---help---
MediaTek SoCs' clock support. MediaTek SoCs' clock support.
Index: linux-4.14.25/drivers/clk/mediatek/Makefile --- a/drivers/clk/mediatek/Makefile
=================================================================== +++ b/drivers/clk/mediatek/Makefile
--- linux-4.14.25.orig/drivers/clk/mediatek/Makefile
+++ linux-4.14.25/drivers/clk/mediatek/Makefile
@@ -1,6 +1,5 @@ @@ -1,6 +1,5 @@
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
-obj-$(CONFIG_COMMON_CLK_MEDIATEK) += clk-mtk.o clk-pll.o clk-gate.o clk-apmixed.o clk-cpumux.o -obj-$(CONFIG_COMMON_CLK_MEDIATEK) += clk-mtk.o clk-pll.o clk-gate.o clk-apmixed.o clk-cpumux.o
@ -56,10 +52,8 @@ Index: linux-4.14.25/drivers/clk/mediatek/Makefile
obj-$(CONFIG_COMMON_CLK_MT6797) += clk-mt6797.o obj-$(CONFIG_COMMON_CLK_MT6797) += clk-mt6797.o
obj-$(CONFIG_COMMON_CLK_MT6797_IMGSYS) += clk-mt6797-img.o obj-$(CONFIG_COMMON_CLK_MT6797_IMGSYS) += clk-mt6797-img.o
obj-$(CONFIG_COMMON_CLK_MT6797_MMSYS) += clk-mt6797-mm.o obj-$(CONFIG_COMMON_CLK_MT6797_MMSYS) += clk-mt6797-mm.o
Index: linux-4.14.25/drivers/clk/mediatek/clk-mtk.h --- a/drivers/clk/mediatek/clk-mtk.h
=================================================================== +++ b/drivers/clk/mediatek/clk-mtk.h
--- linux-4.14.25.orig/drivers/clk/mediatek/clk-mtk.h
+++ linux-4.14.25/drivers/clk/mediatek/clk-mtk.h
@@ -229,14 +229,7 @@ void mtk_clk_register_plls(struct device @@ -229,14 +229,7 @@ void mtk_clk_register_plls(struct device
struct clk *mtk_clk_register_ref2usb_tx(const char *name, struct clk *mtk_clk_register_ref2usb_tx(const char *name,
const char *parent_name, void __iomem *reg); const char *parent_name, void __iomem *reg);

View file

@ -31,8 +31,6 @@ Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/mediatek/pinctrl-mt7622.c | 6 ++++-- drivers/pinctrl/mediatek/pinctrl-mt7622.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-) 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7622.c b/drivers/pinctrl/mediatek/pinctrl-mt7622.c
index 3824d82888ac..dc32e3c3bd73 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mt7622.c --- a/drivers/pinctrl/mediatek/pinctrl-mt7622.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mt7622.c +++ b/drivers/pinctrl/mediatek/pinctrl-mt7622.c
@@ -1412,9 +1412,11 @@ static struct pinctrl_desc mtk_desc = { @@ -1412,9 +1412,11 @@ static struct pinctrl_desc mtk_desc = {
@ -49,6 +47,3 @@ index 3824d82888ac..dc32e3c3bd73 100644
return !!value; return !!value;
} }
--
2.11.0

View file

@ -14,11 +14,9 @@ Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/mediatek/pinctrl-mt7622.c | 8 ++++---- drivers/pinctrl/mediatek/pinctrl-mt7622.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-) 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7622.c b/drivers/pinctrl/mediatek/pinctrl-mt7622.c
index dc32e3c3bd73..06e8406c4440 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mt7622.c --- a/drivers/pinctrl/mediatek/pinctrl-mt7622.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mt7622.c +++ b/drivers/pinctrl/mediatek/pinctrl-mt7622.c
@@ -1160,7 +1160,7 @@ static int mtk_pinconf_get(struct pinctrl_dev *pctldev, @@ -1160,7 +1160,7 @@ static int mtk_pinconf_get(struct pinctr
case PIN_CONFIG_OUTPUT_ENABLE: case PIN_CONFIG_OUTPUT_ENABLE:
err = mtk_hw_get_value(hw, pin, PINCTRL_PIN_REG_DIR, &val); err = mtk_hw_get_value(hw, pin, PINCTRL_PIN_REG_DIR, &val);
if (err) if (err)
@ -27,7 +25,7 @@ index dc32e3c3bd73..06e8406c4440 100644
/* HW takes input mode as zero; output mode as non-zero */ /* HW takes input mode as zero; output mode as non-zero */
if ((val && param == PIN_CONFIG_INPUT_ENABLE) || if ((val && param == PIN_CONFIG_INPUT_ENABLE) ||
@@ -1184,11 +1184,11 @@ static int mtk_pinconf_get(struct pinctrl_dev *pctldev, @@ -1184,11 +1184,11 @@ static int mtk_pinconf_get(struct pinctr
case PIN_CONFIG_DRIVE_STRENGTH: case PIN_CONFIG_DRIVE_STRENGTH:
err = mtk_hw_get_value(hw, pin, PINCTRL_PIN_REG_E4, &val); err = mtk_hw_get_value(hw, pin, PINCTRL_PIN_REG_E4, &val);
if (err) if (err)
@ -41,7 +39,7 @@ index dc32e3c3bd73..06e8406c4440 100644
/* 4mA when (e8, e4) = (0, 0); 8mA when (e8, e4) = (0, 1) /* 4mA when (e8, e4) = (0, 0); 8mA when (e8, e4) = (0, 1)
* 12mA when (e8, e4) = (1, 0); 16mA when (e8, e4) = (1, 1) * 12mA when (e8, e4) = (1, 0); 16mA when (e8, e4) = (1, 1)
@@ -1203,7 +1203,7 @@ static int mtk_pinconf_get(struct pinctrl_dev *pctldev, @@ -1203,7 +1203,7 @@ static int mtk_pinconf_get(struct pinctr
err = mtk_hw_get_value(hw, pin, reg, &val); err = mtk_hw_get_value(hw, pin, reg, &val);
if (err) if (err)
@ -50,6 +48,3 @@ index dc32e3c3bd73..06e8406c4440 100644
ret = val; ret = val;
--
2.11.0

View file

@ -14,8 +14,6 @@ Signed-off-by: Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>
drivers/mtd/spi-nor/mtk-quadspi.c | 240 +++++++++++++++++++------------------- drivers/mtd/spi-nor/mtk-quadspi.c | 240 +++++++++++++++++++-------------------
1 file changed, 120 insertions(+), 120 deletions(-) 1 file changed, 120 insertions(+), 120 deletions(-)
diff --git a/drivers/mtd/spi-nor/mtk-quadspi.c b/drivers/mtd/spi-nor/mtk-quadspi.c
index abe455ccd68b..5442993b71ff 100644
--- a/drivers/mtd/spi-nor/mtk-quadspi.c --- a/drivers/mtd/spi-nor/mtk-quadspi.c
+++ b/drivers/mtd/spi-nor/mtk-quadspi.c +++ b/drivers/mtd/spi-nor/mtk-quadspi.c
@@ -110,7 +110,7 @@ @@ -110,7 +110,7 @@
@ -90,7 +88,7 @@ index abe455ccd68b..5442993b71ff 100644
{ {
int len = 1 + txlen + rxlen; int len = 1 + txlen + rxlen;
int i, ret, idx; int i, ret, idx;
@@ -167,26 +167,26 @@ static int mt8173_nor_do_tx_rx(struct mt8173_nor *mt8173_nor, u8 op, @@ -167,26 +167,26 @@ static int mt8173_nor_do_tx_rx(struct mt
if (len > MTK_NOR_MAX_SHIFT) if (len > MTK_NOR_MAX_SHIFT)
return -EINVAL; return -EINVAL;
@ -122,7 +120,7 @@ index abe455ccd68b..5442993b71ff 100644
if (ret) if (ret)
return ret; return ret;
@@ -195,20 +195,20 @@ static int mt8173_nor_do_tx_rx(struct mt8173_nor *mt8173_nor, u8 op, @@ -195,20 +195,20 @@ static int mt8173_nor_do_tx_rx(struct mt
/* read out RX data */ /* read out RX data */
for (i = 0; i < rxlen; i++, idx--) for (i = 0; i < rxlen; i++, idx--)
@ -149,7 +147,7 @@ index abe455ccd68b..5442993b71ff 100644
{ {
u8 reg; u8 reg;
@@ -216,27 +216,27 @@ static int mt8173_nor_write_buffer_enable(struct mt8173_nor *mt8173_nor) @@ -216,27 +216,27 @@ static int mt8173_nor_write_buffer_enabl
* 0: pre-fetch buffer use for read * 0: pre-fetch buffer use for read
* 1: pre-fetch buffer use for page program * 1: pre-fetch buffer use for page program
*/ */
@ -185,7 +183,7 @@ index abe455ccd68b..5442993b71ff 100644
switch (nor->addr_width) { switch (nor->addr_width) {
case 3: case 3:
@@ -246,115 +246,115 @@ static void mt8173_nor_set_addr_width(struct mt8173_nor *mt8173_nor) @@ -246,115 +246,115 @@ static void mt8173_nor_set_addr_width(st
val |= MTK_NOR_4B_ADDR_EN; val |= MTK_NOR_4B_ADDR_EN;
break; break;
default: default:
@ -336,7 +334,7 @@ index abe455ccd68b..5442993b71ff 100644
return ret; return ret;
} }
} }
@@ -362,72 +362,72 @@ static ssize_t mt8173_nor_write(struct spi_nor *nor, loff_t to, size_t len, @@ -362,72 +362,72 @@ static ssize_t mt8173_nor_write(struct s
return len; return len;
} }
@ -429,7 +427,7 @@ index abe455ccd68b..5442993b71ff 100644
struct device_node *flash_node) struct device_node *flash_node)
{ {
const struct spi_nor_hwcaps hwcaps = { const struct spi_nor_hwcaps hwcaps = {
@@ -439,18 +439,18 @@ static int mtk_nor_init(struct mt8173_nor *mt8173_nor, @@ -439,18 +439,18 @@ static int mtk_nor_init(struct mt8173_no
struct spi_nor *nor; struct spi_nor *nor;
/* initialize controller to accept commands */ /* initialize controller to accept commands */
@ -456,7 +454,7 @@ index abe455ccd68b..5442993b71ff 100644
nor->mtd.name = "mtk_nor"; nor->mtd.name = "mtk_nor";
/* initialized with NULL */ /* initialized with NULL */
ret = spi_nor_scan(nor, NULL, &hwcaps); ret = spi_nor_scan(nor, NULL, &hwcaps);
@@ -465,34 +465,34 @@ static int mtk_nor_drv_probe(struct platform_device *pdev) @@ -465,34 +465,34 @@ static int mtk_nor_drv_probe(struct plat
struct device_node *flash_np; struct device_node *flash_np;
struct resource *res; struct resource *res;
int ret; int ret;
@ -506,7 +504,7 @@ index abe455ccd68b..5442993b71ff 100644
if (ret) if (ret)
return ret; return ret;
@@ -503,20 +503,20 @@ static int mtk_nor_drv_probe(struct platform_device *pdev) @@ -503,20 +503,20 @@ static int mtk_nor_drv_probe(struct plat
ret = -ENODEV; ret = -ENODEV;
goto nor_free; goto nor_free;
} }
@ -531,7 +529,7 @@ index abe455ccd68b..5442993b71ff 100644
return 0; return 0;
} }
@@ -524,18 +524,18 @@ static int mtk_nor_drv_remove(struct platform_device *pdev) @@ -524,18 +524,18 @@ static int mtk_nor_drv_remove(struct pla
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
static int mtk_nor_suspend(struct device *dev) static int mtk_nor_suspend(struct device *dev)
{ {
@ -554,6 +552,3 @@ index abe455ccd68b..5442993b71ff 100644
} }
static const struct dev_pm_ops mtk_nor_dev_pm_ops = { static const struct dev_pm_ops mtk_nor_dev_pm_ops = {
--
2.11.0

View file

@ -13,11 +13,9 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/char/hw_random/mtk-rng.c | 1 + drivers/char/hw_random/mtk-rng.c | 1 +
1 file changed, 1 insertion(+) 1 file changed, 1 insertion(+)
diff --git a/drivers/char/hw_random/mtk-rng.c b/drivers/char/hw_random/mtk-rng.c
index 8da7bcf54105..7f99cd52b40e 100644
--- a/drivers/char/hw_random/mtk-rng.c --- a/drivers/char/hw_random/mtk-rng.c
+++ b/drivers/char/hw_random/mtk-rng.c +++ b/drivers/char/hw_random/mtk-rng.c
@@ -135,6 +135,7 @@ static int mtk_rng_probe(struct platform_device *pdev) @@ -135,6 +135,7 @@ static int mtk_rng_probe(struct platform
#endif #endif
priv->rng.read = mtk_rng_read; priv->rng.read = mtk_rng_read;
priv->rng.priv = (unsigned long)&pdev->dev; priv->rng.priv = (unsigned long)&pdev->dev;
@ -25,6 +23,3 @@ index 8da7bcf54105..7f99cd52b40e 100644
priv->clk = devm_clk_get(&pdev->dev, "rng"); priv->clk = devm_clk_get(&pdev->dev, "rng");
if (IS_ERR(priv->clk)) { if (IS_ERR(priv->clk)) {
--
2.11.0

Some files were not shown because too many files have changed in this diff Show more