kernel: update kernel 4.4 to version 4.4.7

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 49176
This commit is contained in:
Hauke Mehrtens 2016-04-16 21:05:48 +00:00
parent 1414f1647d
commit f0b3964f1b
95 changed files with 178 additions and 873 deletions

View file

@ -5,12 +5,12 @@ LINUX_RELEASE?=1
LINUX_VERSION-3.18 = .29 LINUX_VERSION-3.18 = .29
LINUX_VERSION-4.1 = .20 LINUX_VERSION-4.1 = .20
LINUX_VERSION-4.3 = .4 LINUX_VERSION-4.3 = .4
LINUX_VERSION-4.4 = .6 LINUX_VERSION-4.4 = .7
LINUX_KERNEL_MD5SUM-3.18.29 = b25737a0bc98e80d12200de93f239c28 LINUX_KERNEL_MD5SUM-3.18.29 = b25737a0bc98e80d12200de93f239c28
LINUX_KERNEL_MD5SUM-4.1.20 = 075c38a3a23ca5bc80437b13606df00a LINUX_KERNEL_MD5SUM-4.1.20 = 075c38a3a23ca5bc80437b13606df00a
LINUX_KERNEL_MD5SUM-4.3.4 = 5275d02132107c28b85f986bad576d91 LINUX_KERNEL_MD5SUM-4.3.4 = 5275d02132107c28b85f986bad576d91
LINUX_KERNEL_MD5SUM-4.4.6 = efc822dad2149e40cc908718a4fea1d3 LINUX_KERNEL_MD5SUM-4.4.7 = 4345597c9a10bd73c28b6ae3a854d8d7
ifdef KERNEL_PATCHVER ifdef KERNEL_PATCHVER
LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER))) LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))

View file

@ -27,11 +27,9 @@ Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
arch/mips/ath79/early_printk.c | 6 ++++-- arch/mips/ath79/early_printk.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-) 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/mips/ath79/early_printk.c b/arch/mips/ath79/early_printk.c
index b955faf..d1adc59 100644
--- a/arch/mips/ath79/early_printk.c --- a/arch/mips/ath79/early_printk.c
+++ b/arch/mips/ath79/early_printk.c +++ b/arch/mips/ath79/early_printk.c
@@ -31,13 +31,15 @@ static inline void prom_putchar_wait(void __iomem *reg, u32 mask, u32 val) @@ -31,13 +31,15 @@ static inline void prom_putchar_wait(voi
} while (1); } while (1);
} }
@ -49,6 +47,3 @@ index b955faf..d1adc59 100644
} }
static void prom_putchar_ar933x(unsigned char ch) static void prom_putchar_ar933x(unsigned char ch)
--
2.7.4

View file

@ -1,6 +1,6 @@
--- a/arch/mips/ath79/early_printk.c --- a/arch/mips/ath79/early_printk.c
+++ b/arch/mips/ath79/early_printk.c +++ b/arch/mips/ath79/early_printk.c
@@ -56,6 +56,46 @@ static void prom_putchar_dummy(unsigned @@ -58,6 +58,46 @@ static void prom_putchar_dummy(unsigned
/* nothing to do */ /* nothing to do */
} }
@ -47,7 +47,7 @@
static void prom_putchar_init(void) static void prom_putchar_init(void)
{ {
void __iomem *base; void __iomem *base;
@@ -86,8 +126,10 @@ static void prom_putchar_init(void) @@ -88,8 +128,10 @@ static void prom_putchar_init(void)
default: default:
_prom_putchar = prom_putchar_dummy; _prom_putchar = prom_putchar_dummy;

View file

@ -285,7 +285,7 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed.
else else
--- a/arch/mips/ath79/early_printk.c --- a/arch/mips/ath79/early_printk.c
+++ b/arch/mips/ath79/early_printk.c +++ b/arch/mips/ath79/early_printk.c
@@ -114,6 +114,8 @@ static void prom_putchar_init(void) @@ -116,6 +116,8 @@ static void prom_putchar_init(void)
case REV_ID_MAJOR_AR9341: case REV_ID_MAJOR_AR9341:
case REV_ID_MAJOR_AR9342: case REV_ID_MAJOR_AR9342:
case REV_ID_MAJOR_AR9344: case REV_ID_MAJOR_AR9344:

View file

@ -257,7 +257,7 @@
--- a/arch/mips/ath79/early_printk.c --- a/arch/mips/ath79/early_printk.c
+++ b/arch/mips/ath79/early_printk.c +++ b/arch/mips/ath79/early_printk.c
@@ -118,6 +118,8 @@ static void prom_putchar_init(void) @@ -120,6 +120,8 @@ static void prom_putchar_init(void)
case REV_ID_MAJOR_QCA9533_V2: case REV_ID_MAJOR_QCA9533_V2:
case REV_ID_MAJOR_QCA9556: case REV_ID_MAJOR_QCA9556:
case REV_ID_MAJOR_QCA9558: case REV_ID_MAJOR_QCA9558:

View file

@ -14,7 +14,7 @@ functions on the Arduino Yun.
void ath79_gpio_init(void); void ath79_gpio_init(void);
--- a/arch/mips/ath79/gpio.c --- a/arch/mips/ath79/gpio.c
+++ b/arch/mips/ath79/gpio.c +++ b/arch/mips/ath79/gpio.c
@@ -42,6 +42,31 @@ static void __iomem *ath79_gpio_get_func @@ -43,6 +43,31 @@ static void __iomem *ath79_gpio_get_func
return ath79_gpio_base + reg; return ath79_gpio_base + reg;
} }

View file

@ -30,7 +30,7 @@ Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
#define IPROC_PCIE_REG_INVALID 0xffff #define IPROC_PCIE_REG_INVALID 0xffff
@@ -170,20 +169,6 @@ static inline void iproc_pcie_ob_write(struct iproc_pcie *pcie, @@ -170,20 +169,6 @@ static inline void iproc_pcie_ob_write(s
writel(val, pcie->base + offset + (window * 8)); writel(val, pcie->base + offset + (window * 8));
} }
@ -51,7 +51,7 @@ Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
/** /**
* Note access to the configuration registers are protected at the higher layer * Note access to the configuration registers are protected at the higher layer
* by 'pci_lock' in drivers/pci/access.c * by 'pci_lock' in drivers/pci/access.c
@@ -199,11 +184,11 @@ static void __iomem *iproc_pcie_map_cfg_bus(struct pci_bus *bus, @@ -199,11 +184,11 @@ static void __iomem *iproc_pcie_map_cfg_
u32 val; u32 val;
u16 offset; u16 offset;
@ -66,7 +66,7 @@ Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
iproc_pcie_write_reg(pcie, IPROC_PCIE_CFG_IND_ADDR, iproc_pcie_write_reg(pcie, IPROC_PCIE_CFG_IND_ADDR,
where & CFG_IND_ADDR_MASK); where & CFG_IND_ADDR_MASK);
offset = iproc_pcie_reg_offset(pcie, IPROC_PCIE_CFG_IND_DATA); offset = iproc_pcie_reg_offset(pcie, IPROC_PCIE_CFG_IND_DATA);
@@ -213,6 +198,14 @@ static void __iomem *iproc_pcie_map_cfg_bus(struct pci_bus *bus, @@ -213,6 +198,14 @@ static void __iomem *iproc_pcie_map_cfg_
return (pcie->base + offset); return (pcie->base + offset);
} }

View file

@ -14,7 +14,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
--- a/drivers/pci/host/pcie-iproc-bcma.c --- a/drivers/pci/host/pcie-iproc-bcma.c
+++ b/drivers/pci/host/pcie-iproc-bcma.c +++ b/drivers/pci/host/pcie-iproc-bcma.c
@@ -40,6 +40,15 @@ static int iproc_pcie_bcma_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) @@ -40,6 +40,15 @@ static int iproc_pcie_bcma_map_irq(const
return bcma_core_irq(bdev, 5); return bcma_core_irq(bdev, 5);
} }
@ -30,7 +30,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
static int iproc_pcie_bcma_probe(struct bcma_device *bdev) static int iproc_pcie_bcma_probe(struct bcma_device *bdev)
{ {
struct iproc_pcie *pcie; struct iproc_pcie *pcie;
@@ -65,6 +74,9 @@ static int iproc_pcie_bcma_probe(struct bcma_device *bdev) @@ -65,6 +74,9 @@ static int iproc_pcie_bcma_probe(struct
pcie->map_irq = iproc_pcie_bcma_map_irq; pcie->map_irq = iproc_pcie_bcma_map_irq;

View file

@ -27,7 +27,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
MODULE_AUTHOR("Hauke Mehrtens"); MODULE_AUTHOR("Hauke Mehrtens");
MODULE_DESCRIPTION("Common USB driver for BCMA Bus"); MODULE_DESCRIPTION("Common USB driver for BCMA Bus");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
@@ -167,10 +178,35 @@ static void bcma_hcd_init_chip_mips(struct bcma_device *dev) @@ -167,10 +178,35 @@ static void bcma_hcd_init_chip_mips(stru
} }
} }
@ -63,7 +63,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
arm_core = bcma_find_core(dev->bus, BCMA_CORE_ARMCA9); arm_core = bcma_find_core(dev->bus, BCMA_CORE_ARMCA9);
if (!arm_core) { if (!arm_core) {
@@ -184,14 +220,29 @@ static void bcma_hcd_init_chip_arm_phy(struct bcma_device *dev) @@ -184,14 +220,29 @@ static void bcma_hcd_init_chip_arm_phy(s
return; return;
} }
@ -96,7 +96,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
iounmap(dmu); iounmap(dmu);
} }
@@ -219,15 +270,17 @@ static void bcma_hcd_init_chip_arm_hc(struct bcma_device *dev) @@ -219,15 +270,17 @@ static void bcma_hcd_init_chip_arm_hc(st
static void bcma_hcd_init_chip_arm(struct bcma_device *dev) static void bcma_hcd_init_chip_arm(struct bcma_device *dev)
{ {

View file

@ -659,7 +659,7 @@ dwc_otg: Remove duplicate gadget probe/unregister function
} }
--- a/drivers/usb/core/hub.c --- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c
@@ -4967,7 +4967,7 @@ static void port_event(struct usb_hub *h @@ -4973,7 +4973,7 @@ static void port_event(struct usb_hub *h
if (portchange & USB_PORT_STAT_C_OVERCURRENT) { if (portchange & USB_PORT_STAT_C_OVERCURRENT) {
u16 status = 0, unused; u16 status = 0, unused;

View file

@ -13,7 +13,7 @@ Subject: [PATCH 032/170] Add blk_pos parameter to mmc multi_io_quirk callback
--- a/drivers/mmc/card/block.c --- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c
@@ -1510,6 +1510,7 @@ static void mmc_blk_rw_rq_prep(struct mm @@ -1518,6 +1518,7 @@ static void mmc_blk_rw_rq_prep(struct mm
brq->data.blocks = card->host->ops->multi_io_quirk(card, brq->data.blocks = card->host->ops->multi_io_quirk(card,
(rq_data_dir(req) == READ) ? (rq_data_dir(req) == READ) ?
MMC_DATA_READ : MMC_DATA_WRITE, MMC_DATA_READ : MMC_DATA_WRITE,

View file

@ -10,7 +10,7 @@ Subject: [PATCH 062/170] config: Enable CONFIG_MEMCG, but leave it disabled
--- a/kernel/cgroup.c --- a/kernel/cgroup.c
+++ b/kernel/cgroup.c +++ b/kernel/cgroup.c
@@ -5286,7 +5286,7 @@ int __init cgroup_init_early(void) @@ -5302,7 +5302,7 @@ int __init cgroup_init_early(void)
return 0; return 0;
} }
@ -19,7 +19,7 @@ Subject: [PATCH 062/170] config: Enable CONFIG_MEMCG, but leave it disabled
/** /**
* cgroup_init - cgroup initialization * cgroup_init - cgroup initialization
@@ -5782,6 +5782,27 @@ static int __init cgroup_disable(char *s @@ -5798,6 +5798,27 @@ static int __init cgroup_disable(char *s
} }
__setup("cgroup_disable=", cgroup_disable); __setup("cgroup_disable=", cgroup_disable);

View file

@ -14,7 +14,7 @@ Signed-off-by: Eric Anholt <eric@anholt.net>
--- a/mm/page_alloc.c --- a/mm/page_alloc.c
+++ b/mm/page_alloc.c +++ b/mm/page_alloc.c
@@ -6760,8 +6760,6 @@ int alloc_contig_range(unsigned long sta @@ -6780,8 +6780,6 @@ int alloc_contig_range(unsigned long sta
/* Make sure the range is really isolated. */ /* Make sure the range is really isolated. */
if (test_pages_isolated(outer_start, end, false)) { if (test_pages_isolated(outer_start, end, false)) {

View file

@ -1,25 +0,0 @@
From be4e718cccf6909072eeab1032b1d9fb6dd92b43 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Tue, 9 Feb 2016 09:52:13 +0000
Subject: [PATCH 147/170] pinctrl-bcm2835: Fix cut-and-paste error in "pull"
parsing
The DT bindings for pinctrl-bcm2835 allow both the function and pull
to contain either one entry or one per pin. However, an error in the
DT parsing can cause failures if the number of pulls differs from the
number of functions.
---
drivers/pinctrl/bcm/pinctrl-bcm2835.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
@@ -802,7 +802,7 @@ static int bcm2835_pctl_dt_node_to_map(s
}
if (num_pulls) {
err = of_property_read_u32_index(np, "brcm,pull",
- (num_funcs > 1) ? i : 0, &pull);
+ (num_pulls > 1) ? i : 0, &pull);
if (err)
goto out;
err = bcm2835_pctl_dt_node_to_map_pull(pc, np, pin,

View file

@ -17,7 +17,7 @@ The bcm2835-sdhost driver no longer needs this patch.
--- a/drivers/mmc/card/block.c --- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c
@@ -1510,7 +1510,6 @@ static void mmc_blk_rw_rq_prep(struct mm @@ -1518,7 +1518,6 @@ static void mmc_blk_rw_rq_prep(struct mm
brq->data.blocks = card->host->ops->multi_io_quirk(card, brq->data.blocks = card->host->ops->multi_io_quirk(card,
(rq_data_dir(req) == READ) ? (rq_data_dir(req) == READ) ?
MMC_DATA_READ : MMC_DATA_WRITE, MMC_DATA_READ : MMC_DATA_WRITE,

View file

@ -223,7 +223,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
} }
--- a/include/linux/bcma/bcma_driver_chipcommon.h --- a/include/linux/bcma/bcma_driver_chipcommon.h
+++ b/include/linux/bcma/bcma_driver_chipcommon.h +++ b/include/linux/bcma/bcma_driver_chipcommon.h
@@ -647,6 +647,7 @@ struct bcma_drv_cc { @@ -646,6 +646,7 @@ struct bcma_drv_cc {
spinlock_t gpio_lock; spinlock_t gpio_lock;
#ifdef CONFIG_BCMA_DRIVER_GPIO #ifdef CONFIG_BCMA_DRIVER_GPIO
struct gpio_chip gpio; struct gpio_chip gpio;

View file

@ -1,114 +0,0 @@
From: Tom Lendacky <thomas.lendacky@amd.com>
Subject: [PATCH v1] crypto: ccp - Add hash state import and export support
Date: Tue, 12 Jan 2016 11:17:38 -0600
Message-ID: <20160112171738.23496.44254.stgit@tlendack-t1.amdoffice.net>
Mime-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Cc: Herbert Xu <herbert@gondor.apana.org.au>, <stable@vger.kernel.org>,
"David Miller" <davem@davemloft.net>
To: <linux-crypto@vger.kernel.org>
Commit 8996eafdcbad ("crypto: ahash - ensure statesize is non-zero")
added a check to prevent ahash algorithms from successfully registering
if the import and export functions were not implemented. This prevents
an oops in the hash_accept function of algif_hash. This commit causes
the ccp-crypto module SHA support and AES CMAC support from successfully
registering and causing the ccp-crypto module load to fail because the
ahash import and export functions are not implemented.
Update the CCP Crypto API support to provide import and export support
for ahash algorithms.
Cc: <stable@vger.kernel.org> # 3.14.x-
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
---
drivers/crypto/ccp/ccp-crypto-aes-cmac.c | 23 +++++++++++++++++++++++
drivers/crypto/ccp/ccp-crypto-sha.c | 23 +++++++++++++++++++++++
2 files changed, 46 insertions(+)
--- a/drivers/crypto/ccp/ccp-crypto-aes-cmac.c
+++ b/drivers/crypto/ccp/ccp-crypto-aes-cmac.c
@@ -220,6 +220,26 @@ static int ccp_aes_cmac_digest(struct ah
return ccp_aes_cmac_finup(req);
}
+static int ccp_aes_cmac_export(struct ahash_request *req, void *out)
+{
+ struct ccp_aes_cmac_req_ctx *rctx = ahash_request_ctx(req);
+ struct ccp_aes_cmac_req_ctx *state = out;
+
+ *state = *rctx;
+
+ return 0;
+}
+
+static int ccp_aes_cmac_import(struct ahash_request *req, const void *in)
+{
+ struct ccp_aes_cmac_req_ctx *rctx = ahash_request_ctx(req);
+ const struct ccp_aes_cmac_req_ctx *state = in;
+
+ *rctx = *state;
+
+ return 0;
+}
+
static int ccp_aes_cmac_setkey(struct crypto_ahash *tfm, const u8 *key,
unsigned int key_len)
{
@@ -352,10 +372,13 @@ int ccp_register_aes_cmac_algs(struct li
alg->final = ccp_aes_cmac_final;
alg->finup = ccp_aes_cmac_finup;
alg->digest = ccp_aes_cmac_digest;
+ alg->export = ccp_aes_cmac_export;
+ alg->import = ccp_aes_cmac_import;
alg->setkey = ccp_aes_cmac_setkey;
halg = &alg->halg;
halg->digestsize = AES_BLOCK_SIZE;
+ halg->statesize = sizeof(struct ccp_aes_cmac_req_ctx);
base = &halg->base;
snprintf(base->cra_name, CRYPTO_MAX_ALG_NAME, "cmac(aes)");
--- a/drivers/crypto/ccp/ccp-crypto-sha.c
+++ b/drivers/crypto/ccp/ccp-crypto-sha.c
@@ -207,6 +207,26 @@ static int ccp_sha_digest(struct ahash_r
return ccp_sha_finup(req);
}
+static int ccp_sha_export(struct ahash_request *req, void *out)
+{
+ struct ccp_sha_req_ctx *rctx = ahash_request_ctx(req);
+ struct ccp_sha_req_ctx *state = out;
+
+ *state = *rctx;
+
+ return 0;
+}
+
+static int ccp_sha_import(struct ahash_request *req, const void *in)
+{
+ struct ccp_sha_req_ctx *rctx = ahash_request_ctx(req);
+ const struct ccp_sha_req_ctx *state = in;
+
+ *rctx = *state;
+
+ return 0;
+}
+
static int ccp_sha_setkey(struct crypto_ahash *tfm, const u8 *key,
unsigned int key_len)
{
@@ -403,9 +423,12 @@ static int ccp_register_sha_alg(struct l
alg->final = ccp_sha_final;
alg->finup = ccp_sha_finup;
alg->digest = ccp_sha_digest;
+ alg->export = ccp_sha_export;
+ alg->import = ccp_sha_import;
halg = &alg->halg;
halg->digestsize = def->digest_size;
+ halg->statesize = sizeof(struct ccp_sha_req_ctx);
base = &halg->base;
snprintf(base->cra_name, CRYPTO_MAX_ALG_NAME, "%s", def->name);

View file

@ -38,7 +38,7 @@
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0])) #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))
--- a/scripts/kconfig/Makefile --- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile
@@ -159,6 +159,9 @@ check-lxdialog := $(srctree)/$(src)/lxd @@ -161,6 +161,9 @@ check-lxdialog := $(srctree)/$(src)/lxd
# we really need to do so. (Do not call gcc as part of make mrproper) # we really need to do so. (Do not call gcc as part of make mrproper)
HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) \ HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) \
-DLOCALE -DLOCALE

View file

@ -13,11 +13,9 @@ Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
arch/arc/kernel/unaligned.c | 2 +- arch/arc/kernel/unaligned.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arc/kernel/unaligned.c b/arch/arc/kernel/unaligned.c
index abd961f..0b0cc97 100644
--- a/arch/arc/kernel/unaligned.c --- a/arch/arc/kernel/unaligned.c
+++ b/arch/arc/kernel/unaligned.c +++ b/arch/arc/kernel/unaligned.c
@@ -206,7 +206,7 @@ int misaligned_fixup(unsigned long address, struct pt_regs *regs, @@ -206,7 +206,7 @@ int misaligned_fixup(unsigned long addre
char buf[TASK_COMM_LEN]; char buf[TASK_COMM_LEN];
/* handle user mode only and only if enabled by sysadmin */ /* handle user mode only and only if enabled by sysadmin */
@ -26,6 +24,3 @@ index abd961f..0b0cc97 100644
return 1; return 1;
if (no_unaligned_warning) { if (no_unaligned_warning) {
--
2.5.0

View file

@ -30,7 +30,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
/************************************************** /**************************************************
* BCMA bus ops * BCMA bus ops
**************************************************/ **************************************************/
@@ -1686,6 +1698,14 @@ static int bgmac_probe(struct bcma_devic @@ -1688,6 +1700,14 @@ static int bgmac_probe(struct bcma_devic
net_dev->hw_features = net_dev->features; net_dev->hw_features = net_dev->features;
net_dev->vlan_features = net_dev->features; net_dev->vlan_features = net_dev->features;
@ -45,7 +45,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
err = register_netdev(bgmac->net_dev); err = register_netdev(bgmac->net_dev);
if (err) { if (err) {
bgmac_err(bgmac, "Cannot register net device\n"); bgmac_err(bgmac, "Cannot register net device\n");
@@ -1712,6 +1732,10 @@ static void bgmac_remove(struct bcma_dev @@ -1714,6 +1734,10 @@ static void bgmac_remove(struct bcma_dev
{ {
struct bgmac *bgmac = bcma_get_drvdata(core); struct bgmac *bgmac = bcma_get_drvdata(core);

View file

@ -5495,7 +5495,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
(transaction layer end-to-end CRC checking). (transaction layer end-to-end CRC checking).
--- a/include/linux/pci.h --- a/include/linux/pci.h
+++ b/include/linux/pci.h +++ b/include/linux/pci.h
@@ -1228,6 +1228,8 @@ void pci_walk_bus(struct pci_bus *top, i @@ -1229,6 +1229,8 @@ void pci_walk_bus(struct pci_bus *top, i
void *userdata); void *userdata);
int pci_cfg_space_size(struct pci_dev *dev); int pci_cfg_space_size(struct pci_dev *dev);
unsigned char pci_bus_max_busnr(struct pci_bus *bus); unsigned char pci_bus_max_busnr(struct pci_bus *bus);

View file

@ -9,11 +9,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
include/linux/phy.h | 1 + include/linux/phy.h | 1 +
2 files changed, 7 insertions(+), 3 deletions(-) 2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 47cd306..f69d12f 100644
--- a/drivers/net/phy/phy.c --- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c
@@ -844,7 +844,8 @@ void phy_state_machine(struct work_struct *work) @@ -888,7 +888,8 @@ void phy_state_machine(struct work_struc
/* If the link is down, give up on negotiation for now */ /* If the link is down, give up on negotiation for now */
if (!phydev->link) { if (!phydev->link) {
phydev->state = PHY_NOLINK; phydev->state = PHY_NOLINK;
@ -23,7 +21,7 @@ index 47cd306..f69d12f 100644
phydev->adjust_link(phydev->attached_dev); phydev->adjust_link(phydev->attached_dev);
break; break;
} }
@@ -927,7 +928,8 @@ void phy_state_machine(struct work_struct *work) @@ -971,7 +972,8 @@ void phy_state_machine(struct work_struc
netif_carrier_on(phydev->attached_dev); netif_carrier_on(phydev->attached_dev);
} else { } else {
phydev->state = PHY_NOLINK; phydev->state = PHY_NOLINK;
@ -33,7 +31,7 @@ index 47cd306..f69d12f 100644
} }
phydev->adjust_link(phydev->attached_dev); phydev->adjust_link(phydev->attached_dev);
@@ -939,7 +941,8 @@ void phy_state_machine(struct work_struct *work) @@ -983,7 +985,8 @@ void phy_state_machine(struct work_struc
case PHY_HALTED: case PHY_HALTED:
if (phydev->link) { if (phydev->link) {
phydev->link = 0; phydev->link = 0;
@ -43,8 +41,6 @@ index 47cd306..f69d12f 100644
phydev->adjust_link(phydev->attached_dev); phydev->adjust_link(phydev->attached_dev);
do_suspend = true; do_suspend = true;
} }
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 05fde31..276ab8a 100644
--- a/include/linux/phy.h --- a/include/linux/phy.h
+++ b/include/linux/phy.h +++ b/include/linux/phy.h
@@ -377,6 +377,7 @@ struct phy_device { @@ -377,6 +377,7 @@ struct phy_device {
@ -55,6 +51,3 @@ index 05fde31..276ab8a 100644
enum phy_state state; enum phy_state state;
--
1.7.10.4

View file

@ -17,8 +17,6 @@ Signed-off-by: James Liao <jamesjj.liao@mediatek.com>
create mode 100644 drivers/soc/mediatek/mtk-scpsys-mt8173.c create mode 100644 drivers/soc/mediatek/mtk-scpsys-mt8173.c
create mode 100644 drivers/soc/mediatek/mtk-scpsys.h create mode 100644 drivers/soc/mediatek/mtk-scpsys.h
diff --git a/drivers/soc/mediatek/Kconfig b/drivers/soc/mediatek/Kconfig
index 0a4ea80..eca6fb7 100644
--- a/drivers/soc/mediatek/Kconfig --- a/drivers/soc/mediatek/Kconfig
+++ b/drivers/soc/mediatek/Kconfig +++ b/drivers/soc/mediatek/Kconfig
@@ -22,11 +22,20 @@ config MTK_PMIC_WRAP @@ -22,11 +22,20 @@ config MTK_PMIC_WRAP
@ -44,8 +42,6 @@ index 0a4ea80..eca6fb7 100644
+ driver. + driver.
+ The System Control Processor System (SCPSYS) has several power + The System Control Processor System (SCPSYS) has several power
+ management related tasks in the system. + management related tasks in the system.
diff --git a/drivers/soc/mediatek/Makefile b/drivers/soc/mediatek/Makefile
index 12998b0..3b22baa 100644
--- a/drivers/soc/mediatek/Makefile --- a/drivers/soc/mediatek/Makefile
+++ b/drivers/soc/mediatek/Makefile +++ b/drivers/soc/mediatek/Makefile
@@ -1,3 +1,4 @@ @@ -1,3 +1,4 @@
@ -53,9 +49,6 @@ index 12998b0..3b22baa 100644
obj-$(CONFIG_MTK_PMIC_WRAP) += mtk-pmic-wrap.o obj-$(CONFIG_MTK_PMIC_WRAP) += mtk-pmic-wrap.o
obj-$(CONFIG_MTK_SCPSYS) += mtk-scpsys.o obj-$(CONFIG_MTK_SCPSYS) += mtk-scpsys.o
+obj-$(CONFIG_MTK_SCPSYS_MT8173) += mtk-scpsys-mt8173.o +obj-$(CONFIG_MTK_SCPSYS_MT8173) += mtk-scpsys-mt8173.o
diff --git a/drivers/soc/mediatek/mtk-scpsys-mt8173.c b/drivers/soc/mediatek/mtk-scpsys-mt8173.c
new file mode 100644
index 0000000..3c7b569
--- /dev/null --- /dev/null
+++ b/drivers/soc/mediatek/mtk-scpsys-mt8173.c +++ b/drivers/soc/mediatek/mtk-scpsys-mt8173.c
@@ -0,0 +1,179 @@ @@ -0,0 +1,179 @@
@ -238,8 +231,6 @@ index 0000000..3c7b569
+}; +};
+ +
+module_platform_driver_probe(scpsys_drv, scpsys_probe); +module_platform_driver_probe(scpsys_drv, scpsys_probe);
diff --git a/drivers/soc/mediatek/mtk-scpsys.c b/drivers/soc/mediatek/mtk-scpsys.c
index 4d4203c..a0943c5 100644
--- a/drivers/soc/mediatek/mtk-scpsys.c --- a/drivers/soc/mediatek/mtk-scpsys.c
+++ b/drivers/soc/mediatek/mtk-scpsys.c +++ b/drivers/soc/mediatek/mtk-scpsys.c
@@ -11,28 +11,14 @@ @@ -11,28 +11,14 @@
@ -257,7 +248,7 @@ index 4d4203c..a0943c5 100644
-#include <linux/regmap.h> -#include <linux/regmap.h>
#include <linux/soc/mediatek/infracfg.h> #include <linux/soc/mediatek/infracfg.h>
-#include <dt-bindings/power/mt8173-power.h> -#include <dt-bindings/power/mt8173-power.h>
-
-#define SPM_VDE_PWR_CON 0x0210 -#define SPM_VDE_PWR_CON 0x0210
-#define SPM_MFG_PWR_CON 0x0214 -#define SPM_MFG_PWR_CON 0x0214
-#define SPM_VEN_PWR_CON 0x0230 -#define SPM_VEN_PWR_CON 0x0230
@ -268,7 +259,6 @@ index 4d4203c..a0943c5 100644
-#define SPM_MFG_2D_PWR_CON 0x02c0 -#define SPM_MFG_2D_PWR_CON 0x02c0
-#define SPM_MFG_ASYNC_PWR_CON 0x02c4 -#define SPM_MFG_ASYNC_PWR_CON 0x02c4
-#define SPM_USB_PWR_CON 0x02cc -#define SPM_USB_PWR_CON 0x02cc
+
+#include "mtk-scpsys.h" +#include "mtk-scpsys.h"
+ +
#define SPM_PWR_STATUS 0x060c #define SPM_PWR_STATUS 0x060c
@ -428,7 +418,7 @@ index 4d4203c..a0943c5 100644
static int scpsys_domain_is_on(struct scp_domain *scpd) static int scpsys_domain_is_on(struct scp_domain *scpd)
{ {
struct scp *scp = scpd->scp; struct scp *scp = scpd->scp;
@@ -398,63 +237,89 @@ static bool scpsys_active_wakeup(struct device *dev) @@ -398,63 +237,89 @@ static bool scpsys_active_wakeup(struct
return scpd->active_wakeup; return scpd->active_wakeup;
} }
@ -518,13 +508,13 @@ index 4d4203c..a0943c5 100644
+ return ERR_PTR(-ENOMEM); + return ERR_PTR(-ENOMEM);
+ +
+ pd_data = &scp->pd_data; + pd_data = &scp->pd_data;
+
- for (i = 0; i < NUM_DOMAINS; i++) {
+ pd_data->domains = devm_kzalloc(&pdev->dev, + pd_data->domains = devm_kzalloc(&pdev->dev,
+ sizeof(*pd_data->domains) * num, GFP_KERNEL); + sizeof(*pd_data->domains) * num, GFP_KERNEL);
+ if (!pd_data->domains) + if (!pd_data->domains)
+ return ERR_PTR(-ENOMEM); + return ERR_PTR(-ENOMEM);
+
- for (i = 0; i < NUM_DOMAINS; i++) {
+ pd_data->num_domains = num; + pd_data->num_domains = num;
+ +
+ init_clks(pdev, clk); + init_clks(pdev, clk);
@ -549,7 +539,7 @@ index 4d4203c..a0943c5 100644
pd_data->domains[i] = genpd; pd_data->domains[i] = genpd;
scpd->scp = scp; scpd->scp = scp;
@@ -464,13 +329,25 @@ static int __init scpsys_probe(struct platform_device *pdev) @@ -464,13 +329,25 @@ static int __init scpsys_probe(struct pl
scpd->sram_pdn_ack_bits = data->sram_pdn_ack_bits; scpd->sram_pdn_ack_bits = data->sram_pdn_ack_bits;
scpd->bus_prot_mask = data->bus_prot_mask; scpd->bus_prot_mask = data->bus_prot_mask;
scpd->active_wakeup = data->active_wakeup; scpd->active_wakeup = data->active_wakeup;
@ -577,7 +567,7 @@ index 4d4203c..a0943c5 100644
/* /*
* Initially turn on all domains to make the domains usable * Initially turn on all domains to make the domains usable
@@ -489,37 +366,9 @@ static int __init scpsys_probe(struct platform_device *pdev) @@ -489,37 +366,9 @@ static int __init scpsys_probe(struct pl
* valid. * valid.
*/ */
@ -616,9 +606,6 @@ index 4d4203c..a0943c5 100644
-}; -};
- -
-module_platform_driver_probe(scpsys_drv, scpsys_probe); -module_platform_driver_probe(scpsys_drv, scpsys_probe);
diff --git a/drivers/soc/mediatek/mtk-scpsys.h b/drivers/soc/mediatek/mtk-scpsys.h
new file mode 100644
index 0000000..466728d
--- /dev/null --- /dev/null
+++ b/drivers/soc/mediatek/mtk-scpsys.h +++ b/drivers/soc/mediatek/mtk-scpsys.h
@@ -0,0 +1,54 @@ @@ -0,0 +1,54 @@
@ -676,6 +663,3 @@ index 0000000..466728d
+ struct scp *scp, int num); + struct scp *scp, int num);
+ +
+#endif /* __DRV_SOC_MTK_H */ +#endif /* __DRV_SOC_MTK_H */
--
1.7.10.4

View file

@ -12,11 +12,9 @@ Signed-off-by: James Liao <jamesjj.liao@mediatek.com>
drivers/soc/mediatek/mtk-scpsys-mt8173.c | 13 ++++++++++++- drivers/soc/mediatek/mtk-scpsys-mt8173.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-) 1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/soc/mediatek/mtk-scpsys-mt8173.c b/drivers/soc/mediatek/mtk-scpsys-mt8173.c
index 3c7b569..827e696 100644
--- a/drivers/soc/mediatek/mtk-scpsys-mt8173.c --- a/drivers/soc/mediatek/mtk-scpsys-mt8173.c
+++ b/drivers/soc/mediatek/mtk-scpsys-mt8173.c +++ b/drivers/soc/mediatek/mtk-scpsys-mt8173.c
@@ -176,4 +176,15 @@ static struct platform_driver scpsys_drv = { @@ -176,4 +176,15 @@ static struct platform_driver scpsys_drv
}, },
}; };
@ -33,6 +31,3 @@ index 3c7b569..827e696 100644
+ +
+subsys_initcall(scpsys_drv_init); +subsys_initcall(scpsys_drv_init);
+module_exit(scpsys_drv_exit); +module_exit(scpsys_drv_exit);
--
1.7.10.4

View file

@ -12,9 +12,6 @@ Signed-off-by: James Liao <jamesjj.liao@mediatek.com>
1 file changed, 27 insertions(+) 1 file changed, 27 insertions(+)
create mode 100644 include/dt-bindings/power/mt2701-power.h create mode 100644 include/dt-bindings/power/mt2701-power.h
diff --git a/include/dt-bindings/power/mt2701-power.h b/include/dt-bindings/power/mt2701-power.h
new file mode 100644
index 0000000..64cc826
--- /dev/null --- /dev/null
+++ b/include/dt-bindings/power/mt2701-power.h +++ b/include/dt-bindings/power/mt2701-power.h
@@ -0,0 +1,27 @@ @@ -0,0 +1,27 @@
@ -45,6 +42,3 @@ index 0000000..64cc826
+#define MT2701_POWER_DOMAIN_IFR_MSC 8 +#define MT2701_POWER_DOMAIN_IFR_MSC 8
+ +
+#endif /* _DT_BINDINGS_POWER_MT2701_POWER_H */ +#endif /* _DT_BINDINGS_POWER_MT2701_POWER_H */
--
1.7.10.4

View file

@ -14,8 +14,6 @@ Signed-off-by: James Liao <jamesjj.liao@mediatek.com>
3 files changed, 173 insertions(+) 3 files changed, 173 insertions(+)
create mode 100644 drivers/soc/mediatek/mtk-scpsys-mt2701.c create mode 100644 drivers/soc/mediatek/mtk-scpsys-mt2701.c
diff --git a/drivers/soc/mediatek/Kconfig b/drivers/soc/mediatek/Kconfig
index eca6fb7..92cf838 100644
--- a/drivers/soc/mediatek/Kconfig --- a/drivers/soc/mediatek/Kconfig
+++ b/drivers/soc/mediatek/Kconfig +++ b/drivers/soc/mediatek/Kconfig
@@ -39,3 +39,14 @@ config MTK_SCPSYS_MT8173 @@ -39,3 +39,14 @@ config MTK_SCPSYS_MT8173
@ -33,18 +31,13 @@ index eca6fb7..92cf838 100644
+ domain driver. + domain driver.
+ The System Control Processor System (SCPSYS) has several power + The System Control Processor System (SCPSYS) has several power
+ management related tasks in the system. + management related tasks in the system.
diff --git a/drivers/soc/mediatek/Makefile b/drivers/soc/mediatek/Makefile
index 3b22baa..822986d 100644
--- a/drivers/soc/mediatek/Makefile --- a/drivers/soc/mediatek/Makefile
+++ b/drivers/soc/mediatek/Makefile +++ b/drivers/soc/mediatek/Makefile
@@ -2,3 +2,4 @@ obj-$(CONFIG_MTK_INFRACFG) += mtk-infracfg.o @@ -2,3 +2,4 @@ obj-$(CONFIG_MTK_INFRACFG) += mtk-infrac
obj-$(CONFIG_MTK_PMIC_WRAP) += mtk-pmic-wrap.o obj-$(CONFIG_MTK_PMIC_WRAP) += mtk-pmic-wrap.o
obj-$(CONFIG_MTK_SCPSYS) += mtk-scpsys.o obj-$(CONFIG_MTK_SCPSYS) += mtk-scpsys.o
obj-$(CONFIG_MTK_SCPSYS_MT8173) += mtk-scpsys-mt8173.o obj-$(CONFIG_MTK_SCPSYS_MT8173) += mtk-scpsys-mt8173.o
+obj-$(CONFIG_MTK_SCPSYS_MT2701) += mtk-scpsys-mt2701.o +obj-$(CONFIG_MTK_SCPSYS_MT2701) += mtk-scpsys-mt2701.o
diff --git a/drivers/soc/mediatek/mtk-scpsys-mt2701.c b/drivers/soc/mediatek/mtk-scpsys-mt2701.c
new file mode 100644
index 0000000..339d5b8
--- /dev/null --- /dev/null
+++ b/drivers/soc/mediatek/mtk-scpsys-mt2701.c +++ b/drivers/soc/mediatek/mtk-scpsys-mt2701.c
@@ -0,0 +1,161 @@ @@ -0,0 +1,161 @@
@ -209,6 +202,3 @@ index 0000000..339d5b8
+ +
+MODULE_DESCRIPTION("MediaTek MT2701 scpsys driver"); +MODULE_DESCRIPTION("MediaTek MT2701 scpsys driver");
+MODULE_LICENSE("GPL v2"); +MODULE_LICENSE("GPL v2");
--
1.7.10.4

View file

@ -16,8 +16,6 @@ Signed-off-by: James Liao <jamesjj.liao@mediatek.com>
3 files changed, 27 insertions(+), 3 deletions(-) 3 files changed, 27 insertions(+), 3 deletions(-)
create mode 100644 drivers/clk/mediatek/Kconfig create mode 100644 drivers/clk/mediatek/Kconfig
diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index c3e3a02..b7a37dc 100644
--- a/drivers/clk/Kconfig --- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig +++ b/drivers/clk/Kconfig
@@ -198,3 +198,4 @@ source "drivers/clk/mvebu/Kconfig" @@ -198,3 +198,4 @@ source "drivers/clk/mvebu/Kconfig"
@ -25,9 +23,6 @@ index c3e3a02..b7a37dc 100644
source "drivers/clk/samsung/Kconfig" source "drivers/clk/samsung/Kconfig"
source "drivers/clk/tegra/Kconfig" source "drivers/clk/tegra/Kconfig"
+source "drivers/clk/mediatek/Kconfig" +source "drivers/clk/mediatek/Kconfig"
diff --git a/drivers/clk/mediatek/Kconfig b/drivers/clk/mediatek/Kconfig
new file mode 100644
index 0000000..dc224e6
--- /dev/null --- /dev/null
+++ b/drivers/clk/mediatek/Kconfig +++ b/drivers/clk/mediatek/Kconfig
@@ -0,0 +1,23 @@ @@ -0,0 +1,23 @@
@ -54,8 +49,6 @@ index 0000000..dc224e6
+ default ARCH_MEDIATEK + default ARCH_MEDIATEK
+ ---help--- + ---help---
+ This driver supports Mediatek MT8173 clocks. + This driver supports Mediatek MT8173 clocks.
diff --git a/drivers/clk/mediatek/Makefile b/drivers/clk/mediatek/Makefile
index 95fdfac..32e7222 100644
--- a/drivers/clk/mediatek/Makefile --- a/drivers/clk/mediatek/Makefile
+++ b/drivers/clk/mediatek/Makefile +++ b/drivers/clk/mediatek/Makefile
@@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
@ -66,6 +59,3 @@ index 95fdfac..32e7222 100644
-obj-y += clk-mt8173.o -obj-y += clk-mt8173.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
--
1.7.10.4

View file

@ -25,11 +25,9 @@ Signed-off-by: James Liao <jamesjj.liao@mediatek.com>
create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.txt create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.txt
create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,hifsys.txt create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,hifsys.txt
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt
index 936166f..a701e19 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
@@ -6,6 +6,7 @@ The Mediatek apmixedsys controller provides the PLLs to the system. @@ -6,6 +6,7 @@ The Mediatek apmixedsys controller provi
Required Properties: Required Properties:
- compatible: Should be: - compatible: Should be:
@ -37,9 +35,6 @@ index 936166f..a701e19 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,bdpsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,bdpsys.txt
new file mode 100644
index 0000000..4137196
--- /dev/null --- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,bdpsys.txt +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,bdpsys.txt
@@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
@ -65,9 +60,6 @@ index 0000000..4137196
+ reg = <0 0x1c000000 0 0x1000>; + reg = <0 0x1c000000 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
new file mode 100644
index 0000000..768f3a5
--- /dev/null --- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.txt +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.txt
@@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
@ -93,9 +85,6 @@ index 0000000..768f3a5
+ reg = <0 0x1b000000 0 0x1000>; + reg = <0 0x1b000000 0 0x1000>;
+ #clock-cells = <1>; + #clock-cells = <1>;
+}; +};
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,hifsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,hifsys.txt
new file mode 100644
index 0000000..b7a39b6
--- /dev/null --- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,hifsys.txt +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,hifsys.txt
@@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
@ -121,11 +110,9 @@ index 0000000..b7a39b6
+ 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,imgsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,imgsys.txt
index b1f2ce1..9bda7f7 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
@@ -6,6 +6,7 @@ The Mediatek imgsys controller provides various clocks to the system. @@ -6,6 +6,7 @@ The Mediatek imgsys controller provides
Required Properties: Required Properties:
- compatible: Should be: - compatible: Should be:
@ -133,8 +120,6 @@ index b1f2ce1..9bda7f7 100644
- "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 f6cd3e4..2f11a69 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
@@ -7,6 +7,7 @@ outputs to the system. @@ -7,6 +7,7 @@ outputs to the system.
@ -145,11 +130,9 @@ index f6cd3e4..2f11a69 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,mmsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
index 4385946..c9d9d43 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
@@ -6,6 +6,7 @@ The Mediatek mmsys controller provides various clocks to the system. @@ -6,6 +6,7 @@ The Mediatek mmsys controller provides v
Required Properties: Required Properties:
- compatible: Should be: - compatible: Should be:
@ -157,8 +140,6 @@ index 4385946..c9d9d43 100644
- "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 f25b854..d3454cd 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
@@ -7,6 +7,7 @@ outputs to the system. @@ -7,6 +7,7 @@ outputs to the system.
@ -169,11 +150,9 @@ index f25b854..d3454cd 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 f9e9179..602e5bc 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
@@ -6,6 +6,7 @@ The Mediatek topckgen controller provides various clocks to the system. @@ -6,6 +6,7 @@ The Mediatek topckgen controller provide
Required Properties: Required Properties:
- compatible: Should be: - compatible: Should be:
@ -181,11 +160,9 @@ index f9e9179..602e5bc 100644
- "mediatek,mt8135-topckgen" - "mediatek,mt8135-topckgen"
- "mediatek,mt8173-topckgen" - "mediatek,mt8173-topckgen"
- #clock-cells: Must be 1 - #clock-cells: Must be 1
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt
index 1faacf1..f5b1e7d 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
@@ -6,6 +6,7 @@ The Mediatek vdecsys controller provides various clocks to the system. @@ -6,6 +6,7 @@ The Mediatek vdecsys controller provides
Required Properties: Required Properties:
- compatible: Should be: - compatible: Should be:
@ -193,6 +170,3 @@ index 1faacf1..f5b1e7d 100644
- "mediatek,mt8173-vdecsys", "syscon" - "mediatek,mt8173-vdecsys", "syscon"
- #clock-cells: Must be 1 - #clock-cells: Must be 1
--
1.7.10.4

View file

@ -13,9 +13,6 @@ Signed-off-by: James Liao <jamesjj.liao@mediatek.com>
1 file changed, 481 insertions(+) 1 file changed, 481 insertions(+)
create mode 100644 include/dt-bindings/clock/mt2701-clk.h create mode 100644 include/dt-bindings/clock/mt2701-clk.h
diff --git a/include/dt-bindings/clock/mt2701-clk.h b/include/dt-bindings/clock/mt2701-clk.h
new file mode 100644
index 0000000..50972d1
--- /dev/null --- /dev/null
+++ b/include/dt-bindings/clock/mt2701-clk.h +++ b/include/dt-bindings/clock/mt2701-clk.h
@@ -0,0 +1,481 @@ @@ -0,0 +1,481 @@
@ -500,6 +497,3 @@ index 0000000..50972d1
+#define CLK_BDP_NR 50 +#define CLK_BDP_NR 50
+ +
+#endif /* _DT_BINDINGS_CLK_MT2701_H */ +#endif /* _DT_BINDINGS_CLK_MT2701_H */
--
1.7.10.4

View file

@ -19,8 +19,6 @@ Signed-off-by: James Liao <jamesjj.liao@mediatek.com>
7 files changed, 1334 insertions(+), 3 deletions(-) 7 files changed, 1334 insertions(+), 3 deletions(-)
create mode 100644 drivers/clk/mediatek/clk-mt2701.c create mode 100644 drivers/clk/mediatek/clk-mt2701.c
diff --git a/drivers/clk/mediatek/Kconfig b/drivers/clk/mediatek/Kconfig
index dc224e6..6c7cdc0 100644
--- a/drivers/clk/mediatek/Kconfig --- a/drivers/clk/mediatek/Kconfig
+++ b/drivers/clk/mediatek/Kconfig +++ b/drivers/clk/mediatek/Kconfig
@@ -6,6 +6,14 @@ config COMMON_CLK_MEDIATEK @@ -6,6 +6,14 @@ config COMMON_CLK_MEDIATEK
@ -38,8 +36,6 @@ index dc224e6..6c7cdc0 100644
config COMMON_CLK_MT8135 config COMMON_CLK_MT8135
bool "Clock driver for Mediatek MT8135" bool "Clock driver for Mediatek MT8135"
depends on COMMON_CLK depends on COMMON_CLK
diff --git a/drivers/clk/mediatek/Makefile b/drivers/clk/mediatek/Makefile
index 32e7222..5b2b91b 100644
--- a/drivers/clk/mediatek/Makefile --- a/drivers/clk/mediatek/Makefile
+++ b/drivers/clk/mediatek/Makefile +++ b/drivers/clk/mediatek/Makefile
@@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
@ -48,11 +44,9 @@ index 32e7222..5b2b91b 100644
+obj-$(CONFIG_COMMON_CLK_MT2701) += clk-mt2701.o +obj-$(CONFIG_COMMON_CLK_MT2701) += clk-mt2701.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-gate.c b/drivers/clk/mediatek/clk-gate.c
index 576bdb7..38badb4 100644
--- a/drivers/clk/mediatek/clk-gate.c --- a/drivers/clk/mediatek/clk-gate.c
+++ b/drivers/clk/mediatek/clk-gate.c +++ b/drivers/clk/mediatek/clk-gate.c
@@ -61,6 +61,26 @@ static void mtk_cg_clr_bit(struct clk_hw *hw) @@ -61,6 +61,26 @@ static void mtk_cg_clr_bit(struct clk_hw
regmap_write(cg->regmap, cg->clr_ofs, BIT(cg->bit)); regmap_write(cg->regmap, cg->clr_ofs, BIT(cg->bit));
} }
@ -79,7 +73,7 @@ index 576bdb7..38badb4 100644
static int mtk_cg_enable(struct clk_hw *hw) static int mtk_cg_enable(struct clk_hw *hw)
{ {
mtk_cg_clr_bit(hw); mtk_cg_clr_bit(hw);
@@ -85,6 +105,30 @@ static void mtk_cg_disable_inv(struct clk_hw *hw) @@ -85,6 +105,30 @@ static void mtk_cg_disable_inv(struct cl
mtk_cg_clr_bit(hw); mtk_cg_clr_bit(hw);
} }
@ -110,7 +104,7 @@ index 576bdb7..38badb4 100644
const struct clk_ops mtk_clk_gate_ops_setclr = { const struct clk_ops mtk_clk_gate_ops_setclr = {
.is_enabled = mtk_cg_bit_is_cleared, .is_enabled = mtk_cg_bit_is_cleared,
.enable = mtk_cg_enable, .enable = mtk_cg_enable,
@@ -97,6 +141,18 @@ const struct clk_ops mtk_clk_gate_ops_setclr_inv = { @@ -97,6 +141,18 @@ const struct clk_ops mtk_clk_gate_ops_se
.disable = mtk_cg_disable_inv, .disable = mtk_cg_disable_inv,
}; };
@ -129,11 +123,9 @@ index 576bdb7..38badb4 100644
struct clk * __init mtk_clk_register_gate( struct clk * __init mtk_clk_register_gate(
const char *name, const char *name,
const char *parent_name, const char *parent_name,
diff --git a/drivers/clk/mediatek/clk-gate.h b/drivers/clk/mediatek/clk-gate.h
index 11e25c9..7f7ef34 100644
--- a/drivers/clk/mediatek/clk-gate.h --- a/drivers/clk/mediatek/clk-gate.h
+++ b/drivers/clk/mediatek/clk-gate.h +++ b/drivers/clk/mediatek/clk-gate.h
@@ -36,6 +36,8 @@ static inline struct mtk_clk_gate *to_clk_gate(struct clk_hw *hw) @@ -36,6 +36,8 @@ static inline struct mtk_clk_gate *to_cl
extern const struct clk_ops mtk_clk_gate_ops_setclr; extern const struct clk_ops mtk_clk_gate_ops_setclr;
extern const struct clk_ops mtk_clk_gate_ops_setclr_inv; extern const struct clk_ops mtk_clk_gate_ops_setclr_inv;
@ -142,9 +134,6 @@ index 11e25c9..7f7ef34 100644
struct clk *mtk_clk_register_gate( struct clk *mtk_clk_register_gate(
const char *name, const char *name,
diff --git a/drivers/clk/mediatek/clk-mt2701.c b/drivers/clk/mediatek/clk-mt2701.c
new file mode 100644
index 0000000..2f521f4
--- /dev/null --- /dev/null
+++ b/drivers/clk/mediatek/clk-mt2701.c +++ b/drivers/clk/mediatek/clk-mt2701.c
@@ -0,0 +1,1210 @@ @@ -0,0 +1,1210 @@
@ -1358,11 +1347,9 @@ index 0000000..2f521f4
+} +}
+CLK_OF_DECLARE(mtk_apmixedsys, "mediatek,mt2701-apmixedsys", +CLK_OF_DECLARE(mtk_apmixedsys, "mediatek,mt2701-apmixedsys",
+ mtk_apmixedsys_init); + mtk_apmixedsys_init);
diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c
index cf08db6..be19a41 100644
--- a/drivers/clk/mediatek/clk-mtk.c --- a/drivers/clk/mediatek/clk-mtk.c
+++ b/drivers/clk/mediatek/clk-mtk.c +++ b/drivers/clk/mediatek/clk-mtk.c
@@ -242,3 +242,28 @@ void __init mtk_clk_register_composites(const struct mtk_composite *mcs, @@ -242,3 +242,28 @@ void __init mtk_clk_register_composites(
clk_data->clks[mc->id] = clk; clk_data->clks[mc->id] = clk;
} }
} }
@ -1391,8 +1378,6 @@ index cf08db6..be19a41 100644
+ clk_data->clks[mcd->id] = clk; + clk_data->clks[mcd->id] = clk;
+ } + }
+} +}
diff --git a/drivers/clk/mediatek/clk-mtk.h b/drivers/clk/mediatek/clk-mtk.h
index 32d2e45..60701e8 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
@@ -110,7 +110,8 @@ struct mtk_composite { @@ -110,7 +110,8 @@ struct mtk_composite {
@ -1444,6 +1429,3 @@ index 32d2e45..60701e8 100644
struct clk_onecell_data *mtk_alloc_clk_data(unsigned int clk_num); struct clk_onecell_data *mtk_alloc_clk_data(unsigned int clk_num);
--
1.7.10.4

View file

@ -14,9 +14,6 @@ Signed-off-by: Shunli Wang <shunli.wang@mediatek.com>
1 file changed, 74 insertions(+) 1 file changed, 74 insertions(+)
create mode 100644 include/dt-bindings/reset-controller/mt2701-resets.h create mode 100644 include/dt-bindings/reset-controller/mt2701-resets.h
diff --git a/include/dt-bindings/reset-controller/mt2701-resets.h b/include/dt-bindings/reset-controller/mt2701-resets.h
new file mode 100644
index 0000000..00efeb0
--- /dev/null --- /dev/null
+++ b/include/dt-bindings/reset-controller/mt2701-resets.h +++ b/include/dt-bindings/reset-controller/mt2701-resets.h
@@ -0,0 +1,74 @@ @@ -0,0 +1,74 @@
@ -94,6 +91,3 @@ index 0000000..00efeb0
+#define MT2701_TOPRGU_BDP_DISP_RST 13 +#define MT2701_TOPRGU_BDP_DISP_RST 13
+ +
+#endif /* _DT_BINDINGS_RESET_CONTROLLER_MT2701 */ +#endif /* _DT_BINDINGS_RESET_CONTROLLER_MT2701 */
--
1.7.10.4

View file

@ -14,11 +14,9 @@ Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/clk/mediatek/clk-mt2701.c | 4 ++++ drivers/clk/mediatek/clk-mt2701.c | 4 ++++
1 file changed, 4 insertions(+) 1 file changed, 4 insertions(+)
diff --git a/drivers/clk/mediatek/clk-mt2701.c b/drivers/clk/mediatek/clk-mt2701.c
index 2f521f4..39472e4 100644
--- a/drivers/clk/mediatek/clk-mt2701.c --- a/drivers/clk/mediatek/clk-mt2701.c
+++ b/drivers/clk/mediatek/clk-mt2701.c +++ b/drivers/clk/mediatek/clk-mt2701.c
@@ -665,6 +665,8 @@ static void __init mtk_infrasys_init(struct device_node *node) @@ -665,6 +665,8 @@ static void __init mtk_infrasys_init(str
if (r) if (r)
pr_err("%s(): could not register clock provider: %d\n", pr_err("%s(): could not register clock provider: %d\n",
__func__, r); __func__, r);
@ -27,7 +25,7 @@ index 2f521f4..39472e4 100644
} }
CLK_OF_DECLARE(mtk_infrasys, "mediatek,mt2701-infracfg", mtk_infrasys_init); CLK_OF_DECLARE(mtk_infrasys, "mediatek,mt2701-infracfg", mtk_infrasys_init);
@@ -782,6 +784,8 @@ static void __init mtk_pericfg_init(struct device_node *node) @@ -782,6 +784,8 @@ static void __init mtk_pericfg_init(stru
if (r) if (r)
pr_err("%s(): could not register clock provider: %d\n", pr_err("%s(): could not register clock provider: %d\n",
__func__, r); __func__, r);
@ -36,6 +34,3 @@ index 2f521f4..39472e4 100644
} }
CLK_OF_DECLARE(mtk_pericfg, "mediatek,mt2701-pericfg", mtk_pericfg_init); CLK_OF_DECLARE(mtk_pericfg, "mediatek,mt2701-pericfg", mtk_pericfg_init);
--
1.7.10.4

View file

@ -14,8 +14,6 @@ Acked-by: Linus Walleij <linus.walleij@linaro.org>
arch/arm/mach-mediatek/Kconfig | 4 ++++ arch/arm/mach-mediatek/Kconfig | 4 ++++
1 file changed, 4 insertions(+) 1 file changed, 4 insertions(+)
diff --git a/arch/arm/mach-mediatek/Kconfig b/arch/arm/mach-mediatek/Kconfig
index aeece17..37dd438 100644
--- a/arch/arm/mach-mediatek/Kconfig --- a/arch/arm/mach-mediatek/Kconfig
+++ b/arch/arm/mach-mediatek/Kconfig +++ b/arch/arm/mach-mediatek/Kconfig
@@ -9,6 +9,10 @@ menuconfig ARCH_MEDIATEK @@ -9,6 +9,10 @@ menuconfig ARCH_MEDIATEK
@ -29,6 +27,3 @@ index aeece17..37dd438 100644
config MACH_MT6589 config MACH_MT6589
bool "MediaTek MT6589 SoCs support" bool "MediaTek MT6589 SoCs support"
default ARCH_MEDIATEK default ARCH_MEDIATEK
--
1.7.10.4

View file

@ -11,11 +11,9 @@ Reviewed-by: Mathias Brugger <matthias.bgg@gmail.com>
Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt | 9 +++++---- Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-) 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt
index 0480bc3..9ffb0b2 100644
--- a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt
@@ -4,10 +4,11 @@ The Mediatek's Pin controller is used to control SoC pins. @@ -4,10 +4,11 @@ The Mediatek's Pin controller is used to
Required properties: Required properties:
- compatible: value should be one of the following. - compatible: value should be one of the following.
@ -31,6 +29,3 @@ index 0480bc3..9ffb0b2 100644
- pins-are-numbered: Specify the subnodes are using numbered pinmux to - pins-are-numbered: Specify the subnodes are using numbered pinmux to
specify pins. specify pins.
- gpio-controller : Marks the device node as a gpio controller. - gpio-controller : Marks the device node as a gpio controller.
--
1.7.10.4

View file

@ -21,9 +21,6 @@ Acked-by: Linus Walleij <linus.walleij@linaro.org>
create mode 100644 drivers/pinctrl/mediatek/pinctrl-mt2701.c create mode 100644 drivers/pinctrl/mediatek/pinctrl-mt2701.c
create mode 100644 drivers/pinctrl/mediatek/pinctrl-mtk-mt2701.h create mode 100644 drivers/pinctrl/mediatek/pinctrl-mtk-mt2701.h
diff --git a/arch/arm/boot/dts/mt2701-pinfunc.h b/arch/arm/boot/dts/mt2701-pinfunc.h
new file mode 100644
index 0000000..e24ebc8
--- /dev/null --- /dev/null
+++ b/arch/arm/boot/dts/mt2701-pinfunc.h +++ b/arch/arm/boot/dts/mt2701-pinfunc.h
@@ -0,0 +1,735 @@ @@ -0,0 +1,735 @@
@ -762,8 +759,6 @@ index 0000000..e24ebc8
+#define MT2701_PIN_278_JTAG_RESET__FUNC_JTAG_RESET (MTK_PIN_NO(278) | 1) +#define MT2701_PIN_278_JTAG_RESET__FUNC_JTAG_RESET (MTK_PIN_NO(278) | 1)
+ +
+#endif /* __DTS_MT2701_PINFUNC_H */ +#endif /* __DTS_MT2701_PINFUNC_H */
diff --git a/drivers/pinctrl/mediatek/Kconfig b/drivers/pinctrl/mediatek/Kconfig
index 02f6f92..13e9939 100644
--- a/drivers/pinctrl/mediatek/Kconfig --- a/drivers/pinctrl/mediatek/Kconfig
+++ b/drivers/pinctrl/mediatek/Kconfig +++ b/drivers/pinctrl/mediatek/Kconfig
@@ -9,6 +9,12 @@ config PINCTRL_MTK_COMMON @@ -9,6 +9,12 @@ config PINCTRL_MTK_COMMON
@ -779,8 +774,6 @@ index 02f6f92..13e9939 100644
config PINCTRL_MT8135 config PINCTRL_MT8135
bool "Mediatek MT8135 pin control" if COMPILE_TEST && !MACH_MT8135 bool "Mediatek MT8135 pin control" if COMPILE_TEST && !MACH_MT8135
depends on OF depends on OF
diff --git a/drivers/pinctrl/mediatek/Makefile b/drivers/pinctrl/mediatek/Makefile
index eb923d6..da30314 100644
--- a/drivers/pinctrl/mediatek/Makefile --- a/drivers/pinctrl/mediatek/Makefile
+++ b/drivers/pinctrl/mediatek/Makefile +++ b/drivers/pinctrl/mediatek/Makefile
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
@ -791,9 +784,6 @@ index eb923d6..da30314 100644
obj-$(CONFIG_PINCTRL_MT8135) += pinctrl-mt8135.o obj-$(CONFIG_PINCTRL_MT8135) += pinctrl-mt8135.o
obj-$(CONFIG_PINCTRL_MT8127) += pinctrl-mt8127.o obj-$(CONFIG_PINCTRL_MT8127) += pinctrl-mt8127.o
obj-$(CONFIG_PINCTRL_MT8173) += pinctrl-mt8173.o obj-$(CONFIG_PINCTRL_MT8173) += pinctrl-mt8173.o
diff --git a/drivers/pinctrl/mediatek/pinctrl-mt2701.c b/drivers/pinctrl/mediatek/pinctrl-mt2701.c
new file mode 100644
index 0000000..4861b5d
--- /dev/null --- /dev/null
+++ b/drivers/pinctrl/mediatek/pinctrl-mt2701.c +++ b/drivers/pinctrl/mediatek/pinctrl-mt2701.c
@@ -0,0 +1,586 @@ @@ -0,0 +1,586 @@
@ -1383,8 +1373,6 @@ index 0000000..4861b5d
+} +}
+ +
+arch_initcall(mtk_pinctrl_init); +arch_initcall(mtk_pinctrl_init);
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
index 5c71727..05ba7a8 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
@@ -47,6 +47,8 @@ @@ -47,6 +47,8 @@
@ -1396,7 +1384,7 @@ index 5c71727..05ba7a8 100644
}; };
/* /*
@@ -81,6 +83,9 @@ static int mtk_pmx_gpio_set_direction(struct pinctrl_dev *pctldev, @@ -81,6 +83,9 @@ static int mtk_pmx_gpio_set_direction(st
reg_addr = mtk_get_port(pctl, offset) + pctl->devdata->dir_offset; reg_addr = mtk_get_port(pctl, offset) + pctl->devdata->dir_offset;
bit = BIT(offset & 0xf); bit = BIT(offset & 0xf);
@ -1406,7 +1394,7 @@ index 5c71727..05ba7a8 100644
if (input) if (input)
/* Different SoC has different alignment offset. */ /* Different SoC has different alignment offset. */
reg_addr = CLR_ADDR(reg_addr, pctl); reg_addr = CLR_ADDR(reg_addr, pctl);
@@ -347,6 +352,7 @@ static int mtk_pconf_parse_conf(struct pinctrl_dev *pctldev, @@ -347,6 +352,7 @@ static int mtk_pconf_parse_conf(struct p
ret = mtk_pconf_set_pull_select(pctl, pin, true, false, arg); ret = mtk_pconf_set_pull_select(pctl, pin, true, false, arg);
break; break;
case PIN_CONFIG_INPUT_ENABLE: case PIN_CONFIG_INPUT_ENABLE:
@ -1414,7 +1402,7 @@ index 5c71727..05ba7a8 100644
ret = mtk_pconf_set_ies_smt(pctl, pin, arg, param); ret = mtk_pconf_set_ies_smt(pctl, pin, arg, param);
break; break;
case PIN_CONFIG_OUTPUT: case PIN_CONFIG_OUTPUT:
@@ -354,6 +360,7 @@ static int mtk_pconf_parse_conf(struct pinctrl_dev *pctldev, @@ -354,6 +360,7 @@ static int mtk_pconf_parse_conf(struct p
ret = mtk_pmx_gpio_set_direction(pctldev, NULL, pin, false); ret = mtk_pmx_gpio_set_direction(pctldev, NULL, pin, false);
break; break;
case PIN_CONFIG_INPUT_SCHMITT_ENABLE: case PIN_CONFIG_INPUT_SCHMITT_ENABLE:
@ -1422,7 +1410,7 @@ index 5c71727..05ba7a8 100644
ret = mtk_pconf_set_ies_smt(pctl, pin, arg, param); ret = mtk_pconf_set_ies_smt(pctl, pin, arg, param);
break; break;
case PIN_CONFIG_DRIVE_STRENGTH: case PIN_CONFIG_DRIVE_STRENGTH:
@@ -667,9 +674,14 @@ static int mtk_pmx_set_mode(struct pinctrl_dev *pctldev, @@ -667,9 +674,14 @@ static int mtk_pmx_set_mode(struct pinct
unsigned int mask = (1L << GPIO_MODE_BITS) - 1; unsigned int mask = (1L << GPIO_MODE_BITS) - 1;
struct mtk_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); struct mtk_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev);
@ -1437,7 +1425,7 @@ index 5c71727..05ba7a8 100644
bit = pin % MAX_GPIO_MODE_PER_REG; bit = pin % MAX_GPIO_MODE_PER_REG;
mask <<= (GPIO_MODE_BITS * bit); mask <<= (GPIO_MODE_BITS * bit);
val = (mode << (GPIO_MODE_BITS * bit)); val = (mode << (GPIO_MODE_BITS * bit));
@@ -746,6 +758,10 @@ static int mtk_gpio_get_direction(struct gpio_chip *chip, unsigned offset) @@ -746,6 +758,10 @@ static int mtk_gpio_get_direction(struct
reg_addr = mtk_get_port(pctl, offset) + pctl->devdata->dir_offset; reg_addr = mtk_get_port(pctl, offset) + pctl->devdata->dir_offset;
bit = BIT(offset & 0xf); bit = BIT(offset & 0xf);
@ -1448,8 +1436,6 @@ index 5c71727..05ba7a8 100644
regmap_read(pctl->regmap1, reg_addr, &read_val); regmap_read(pctl->regmap1, reg_addr, &read_val);
return !(read_val & bit); return !(read_val & bit);
} }
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.h b/drivers/pinctrl/mediatek/pinctrl-mtk-common.h
index 55a5343..8543bc4 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.h --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.h
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.h +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.h
@@ -209,7 +209,14 @@ struct mtk_eint_offsets { @@ -209,7 +209,14 @@ struct mtk_eint_offsets {
@ -1478,9 +1464,6 @@ index 55a5343..8543bc4 100644
unsigned int dir_offset; unsigned int dir_offset;
unsigned int ies_offset; unsigned int ies_offset;
unsigned int smt_offset; unsigned int smt_offset;
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-mt2701.h b/drivers/pinctrl/mediatek/pinctrl-mtk-mt2701.h
new file mode 100644
index 0000000..f906420
--- /dev/null --- /dev/null
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-mt2701.h +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-mt2701.h
@@ -0,0 +1,2323 @@ @@ -0,0 +1,2323 @@
@ -3807,6 +3790,3 @@ index 0000000..f906420
+}; +};
+ +
+#endif /* __PINCTRL_MTK_MT2701_H */ +#endif /* __PINCTRL_MTK_MT2701_H */
--
1.7.10.4

View file

@ -11,8 +11,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
2 files changed, 522 insertions(+) 2 files changed, 522 insertions(+)
create mode 100644 include/dt-bindings/pinctrl/mt7623-pinfunc.h create mode 100644 include/dt-bindings/pinctrl/mt7623-pinfunc.h
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt
index 9ffb0b2..17631d0 100644
--- a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt
@@ -6,6 +6,7 @@ Required properties: @@ -6,6 +6,7 @@ Required properties:
@ -23,9 +21,6 @@ index 9ffb0b2..17631d0 100644
"mediatek,mt8127-pinctrl", compatible with mt8127 pinctrl. "mediatek,mt8127-pinctrl", compatible with mt8127 pinctrl.
"mediatek,mt8135-pinctrl", compatible with mt8135 pinctrl. "mediatek,mt8135-pinctrl", compatible with mt8135 pinctrl.
"mediatek,mt8173-pinctrl", compatible with mt8173 pinctrl. "mediatek,mt8173-pinctrl", compatible with mt8173 pinctrl.
diff --git a/include/dt-bindings/pinctrl/mt7623-pinfunc.h b/include/dt-bindings/pinctrl/mt7623-pinfunc.h
new file mode 100644
index 0000000..891b173
--- /dev/null --- /dev/null
+++ b/include/dt-bindings/pinctrl/mt7623-pinfunc.h +++ b/include/dt-bindings/pinctrl/mt7623-pinfunc.h
@@ -0,0 +1,521 @@ @@ -0,0 +1,521 @@
@ -550,6 +545,3 @@ index 0000000..891b173
+ +
+#endif /* __DTS_MT7623_PINFUNC_H */ +#endif /* __DTS_MT7623_PINFUNC_H */
+ +
--
1.7.10.4

View file

@ -17,8 +17,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
create mode 100644 drivers/pinctrl/mediatek/pinctrl-mt7623.c create mode 100644 drivers/pinctrl/mediatek/pinctrl-mt7623.c
create mode 100644 drivers/pinctrl/mediatek/pinctrl-mtk-mt7623.h create mode 100644 drivers/pinctrl/mediatek/pinctrl-mtk-mt7623.h
diff --git a/drivers/pinctrl/mediatek/Kconfig b/drivers/pinctrl/mediatek/Kconfig
index 13e9939..78654a8 100644
--- a/drivers/pinctrl/mediatek/Kconfig --- a/drivers/pinctrl/mediatek/Kconfig
+++ b/drivers/pinctrl/mediatek/Kconfig +++ b/drivers/pinctrl/mediatek/Kconfig
@@ -15,6 +15,12 @@ config PINCTRL_MT2701 @@ -15,6 +15,12 @@ config PINCTRL_MT2701
@ -34,11 +32,9 @@ index 13e9939..78654a8 100644
config PINCTRL_MT8135 config PINCTRL_MT8135
bool "Mediatek MT8135 pin control" if COMPILE_TEST && !MACH_MT8135 bool "Mediatek MT8135 pin control" if COMPILE_TEST && !MACH_MT8135
depends on OF depends on OF
diff --git a/drivers/pinctrl/mediatek/Makefile b/drivers/pinctrl/mediatek/Makefile
index da30314..1be2f3f 100644
--- a/drivers/pinctrl/mediatek/Makefile --- a/drivers/pinctrl/mediatek/Makefile
+++ b/drivers/pinctrl/mediatek/Makefile +++ b/drivers/pinctrl/mediatek/Makefile
@@ -3,6 +3,7 @@ obj-$(CONFIG_PINCTRL_MTK_COMMON) += pinctrl-mtk-common.o @@ -3,6 +3,7 @@ obj-$(CONFIG_PINCTRL_MTK_COMMON) += pinc
# SoC Drivers # SoC Drivers
obj-$(CONFIG_PINCTRL_MT2701) += pinctrl-mt2701.o obj-$(CONFIG_PINCTRL_MT2701) += pinctrl-mt2701.o
@ -46,9 +42,6 @@ index da30314..1be2f3f 100644
obj-$(CONFIG_PINCTRL_MT8135) += pinctrl-mt8135.o obj-$(CONFIG_PINCTRL_MT8135) += pinctrl-mt8135.o
obj-$(CONFIG_PINCTRL_MT8127) += pinctrl-mt8127.o obj-$(CONFIG_PINCTRL_MT8127) += pinctrl-mt8127.o
obj-$(CONFIG_PINCTRL_MT8173) += pinctrl-mt8173.o obj-$(CONFIG_PINCTRL_MT8173) += pinctrl-mt8173.o
diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7623.c b/drivers/pinctrl/mediatek/pinctrl-mt7623.c
new file mode 100644
index 0000000..bf0d05b
--- /dev/null --- /dev/null
+++ b/drivers/pinctrl/mediatek/pinctrl-mt7623.c +++ b/drivers/pinctrl/mediatek/pinctrl-mt7623.c
@@ -0,0 +1,380 @@ @@ -0,0 +1,380 @@
@ -432,9 +425,6 @@ index 0000000..bf0d05b
+} +}
+ +
+arch_initcall(mtk_pinctrl_init); +arch_initcall(mtk_pinctrl_init);
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-mt7623.h b/drivers/pinctrl/mediatek/pinctrl-mtk-mt7623.h
new file mode 100644
index 0000000..fb63c01
--- /dev/null --- /dev/null
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-mt7623.h +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-mt7623.h
@@ -0,0 +1,1937 @@ @@ -0,0 +1,1937 @@
@ -2375,8 +2365,6 @@ index 0000000..fb63c01
+}; +};
+ +
+#endif /* __PINCTRL_MTK_MT7623_H */ +#endif /* __PINCTRL_MTK_MT7623_H */
diff --git a/include/dt-bindings/pinctrl/mt7623-pinfunc.h b/include/dt-bindings/pinctrl/mt7623-pinfunc.h
index 891b173..eeb2380 100644
--- a/include/dt-bindings/pinctrl/mt7623-pinfunc.h --- a/include/dt-bindings/pinctrl/mt7623-pinfunc.h
+++ b/include/dt-bindings/pinctrl/mt7623-pinfunc.h +++ b/include/dt-bindings/pinctrl/mt7623-pinfunc.h
@@ -505,6 +505,9 @@ @@ -505,6 +505,9 @@
@ -2389,6 +2377,3 @@ index 891b173..eeb2380 100644
#define MT7623_PIN_274_G2_RXDV_FUNC_GPIO274 (MTK_PIN_NO(274) | 0) #define MT7623_PIN_274_G2_RXDV_FUNC_GPIO274 (MTK_PIN_NO(274) | 0)
#define MT7623_PIN_274_G2_RXDV_FUNC_G2_RXDV (MTK_PIN_NO(274) | 1) #define MT7623_PIN_274_G2_RXDV_FUNC_G2_RXDV (MTK_PIN_NO(274) | 1)
--
1.7.10.4

View file

@ -18,11 +18,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
include/dt-bindings/reset-controller/mt2701-resets.h | 9 +++++++++ include/dt-bindings/reset-controller/mt2701-resets.h | 9 +++++++++
2 files changed, 11 insertions(+) 2 files changed, 11 insertions(+)
diff --git a/drivers/clk/mediatek/clk-mt2701.c b/drivers/clk/mediatek/clk-mt2701.c
index 39472e4..0e40bb8 100644
--- a/drivers/clk/mediatek/clk-mt2701.c --- a/drivers/clk/mediatek/clk-mt2701.c
+++ b/drivers/clk/mediatek/clk-mt2701.c +++ b/drivers/clk/mediatek/clk-mt2701.c
@@ -1000,6 +1000,8 @@ static void __init mtk_hifsys_init(struct device_node *node) @@ -1000,6 +1000,8 @@ static void __init mtk_hifsys_init(struc
if (r) if (r)
pr_err("%s(): could not register clock provider: %d\n", pr_err("%s(): could not register clock provider: %d\n",
__func__, r); __func__, r);
@ -31,8 +29,6 @@ index 39472e4..0e40bb8 100644
} }
CLK_OF_DECLARE(mtk_hifsys, "mediatek,mt2701-hifsys", mtk_hifsys_init); CLK_OF_DECLARE(mtk_hifsys, "mediatek,mt2701-hifsys", mtk_hifsys_init);
diff --git a/include/dt-bindings/reset-controller/mt2701-resets.h b/include/dt-bindings/reset-controller/mt2701-resets.h
index 00efeb0..aaf0305 100644
--- a/include/dt-bindings/reset-controller/mt2701-resets.h --- a/include/dt-bindings/reset-controller/mt2701-resets.h
+++ b/include/dt-bindings/reset-controller/mt2701-resets.h +++ b/include/dt-bindings/reset-controller/mt2701-resets.h
@@ -71,4 +71,13 @@ @@ -71,4 +71,13 @@
@ -49,6 +45,3 @@ index 00efeb0..aaf0305 100644
+#define MT2701_HIFSYS_PCIE2_RST 26 +#define MT2701_HIFSYS_PCIE2_RST 26
+ +
#endif /* _DT_BINDINGS_RESET_CONTROLLER_MT2701 */ #endif /* _DT_BINDINGS_RESET_CONTROLLER_MT2701 */
--
1.7.10.4

View file

@ -13,9 +13,6 @@ Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
1 file changed, 51 insertions(+) 1 file changed, 51 insertions(+)
create mode 100644 Documentation/devicetree/bindings/usb/mt8173-xhci.txt create mode 100644 Documentation/devicetree/bindings/usb/mt8173-xhci.txt
diff --git a/Documentation/devicetree/bindings/usb/mt8173-xhci.txt b/Documentation/devicetree/bindings/usb/mt8173-xhci.txt
new file mode 100644
index 0000000..a78f20b
--- /dev/null --- /dev/null
+++ b/Documentation/devicetree/bindings/usb/mt8173-xhci.txt +++ b/Documentation/devicetree/bindings/usb/mt8173-xhci.txt
@@ -0,0 +1,51 @@ @@ -0,0 +1,51 @@
@ -70,6 +67,3 @@ index 0000000..a78f20b
+ mediatek,syscon-wakeup = <&pericfg>; + mediatek,syscon-wakeup = <&pericfg>;
+ mediatek,wakeup-src = <1>; + mediatek,wakeup-src = <1>;
+}; +};
--
1.7.10.4

View file

@ -31,8 +31,6 @@ Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
create mode 100644 drivers/usb/host/xhci-mtk.c create mode 100644 drivers/usb/host/xhci-mtk.c
create mode 100644 drivers/usb/host/xhci-mtk.h create mode 100644 drivers/usb/host/xhci-mtk.h
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 3bb0887..daa563f 100644
--- a/drivers/usb/host/Kconfig --- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig
@@ -41,6 +41,15 @@ config USB_XHCI_PLATFORM @@ -41,6 +41,15 @@ config USB_XHCI_PLATFORM
@ -51,8 +49,6 @@ index 3bb0887..daa563f 100644
config USB_XHCI_MVEBU config USB_XHCI_MVEBU
tristate "xHCI support for Marvell Armada 375/38x" tristate "xHCI support for Marvell Armada 375/38x"
select USB_XHCI_PLATFORM select USB_XHCI_PLATFORM
diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile
index e7558ab..65a06b4 100644
--- a/drivers/usb/host/Makefile --- a/drivers/usb/host/Makefile
+++ b/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile
@@ -13,6 +13,9 @@ fhci-$(CONFIG_FHCI_DEBUG) += fhci-dbg.o @@ -13,6 +13,9 @@ fhci-$(CONFIG_FHCI_DEBUG) += fhci-dbg.o
@ -73,9 +69,6 @@ index e7558ab..65a06b4 100644
obj-$(CONFIG_USB_SL811_HCD) += sl811-hcd.o obj-$(CONFIG_USB_SL811_HCD) += sl811-hcd.o
obj-$(CONFIG_USB_SL811_CS) += sl811_cs.o obj-$(CONFIG_USB_SL811_CS) += sl811_cs.o
obj-$(CONFIG_USB_U132_HCD) += u132-hcd.o obj-$(CONFIG_USB_U132_HCD) += u132-hcd.o
diff --git a/drivers/usb/host/xhci-mtk-sch.c b/drivers/usb/host/xhci-mtk-sch.c
new file mode 100644
index 0000000..c30de7c
--- /dev/null --- /dev/null
+++ b/drivers/usb/host/xhci-mtk-sch.c +++ b/drivers/usb/host/xhci-mtk-sch.c
@@ -0,0 +1,415 @@ @@ -0,0 +1,415 @@
@ -494,9 +487,6 @@ index 0000000..c30de7c
+ } + }
+} +}
+EXPORT_SYMBOL_GPL(xhci_mtk_drop_ep_quirk); +EXPORT_SYMBOL_GPL(xhci_mtk_drop_ep_quirk);
diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
new file mode 100644
index 0000000..c9ab6a4
--- /dev/null --- /dev/null
+++ b/drivers/usb/host/xhci-mtk.c +++ b/drivers/usb/host/xhci-mtk.c
@@ -0,0 +1,763 @@ @@ -0,0 +1,763 @@
@ -1263,9 +1253,6 @@ index 0000000..c9ab6a4
+MODULE_AUTHOR("Chunfeng Yun <chunfeng.yun@mediatek.com>"); +MODULE_AUTHOR("Chunfeng Yun <chunfeng.yun@mediatek.com>");
+MODULE_DESCRIPTION("MediaTek xHCI Host Controller Driver"); +MODULE_DESCRIPTION("MediaTek xHCI Host Controller Driver");
+MODULE_LICENSE("GPL v2"); +MODULE_LICENSE("GPL v2");
diff --git a/drivers/usb/host/xhci-mtk.h b/drivers/usb/host/xhci-mtk.h
new file mode 100644
index 0000000..7da677c
--- /dev/null --- /dev/null
+++ b/drivers/usb/host/xhci-mtk.h +++ b/drivers/usb/host/xhci-mtk.h
@@ -0,0 +1,162 @@ @@ -0,0 +1,162 @@
@ -1431,8 +1418,6 @@ index 0000000..7da677c
+#endif +#endif
+ +
+#endif /* _XHCI_MTK_H_ */ +#endif /* _XHCI_MTK_H_ */
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index eeaa6c6..f1c21c4 100644
--- a/drivers/usb/host/xhci-ring.c --- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c
@@ -68,6 +68,7 @@ @@ -68,6 +68,7 @@
@ -1443,7 +1428,7 @@ index eeaa6c6..f1c21c4 100644
/* /*
* Returns zero if the TRB isn't in this segment, otherwise it returns the DMA * Returns zero if the TRB isn't in this segment, otherwise it returns the DMA
@@ -3075,17 +3076,22 @@ static u32 xhci_td_remainder(struct xhci_hcd *xhci, int transferred, @@ -3065,17 +3066,22 @@ static u32 xhci_td_remainder(struct xhci
{ {
u32 maxp, total_packet_count; u32 maxp, total_packet_count;
@ -1470,7 +1455,7 @@ index eeaa6c6..f1c21c4 100644
/* Queueing functions don't count the current TRB into transferred */ /* Queueing functions don't count the current TRB into transferred */
return (total_packet_count - ((transferred + trb_buff_len) / maxp)); return (total_packet_count - ((transferred + trb_buff_len) / maxp));
} }
@@ -3473,7 +3479,7 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *xhci, gfp_t mem_flags, @@ -3463,7 +3469,7 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
field |= 0x1; field |= 0x1;
/* xHCI 1.0/1.1 6.4.1.2.1: Transfer Type field */ /* xHCI 1.0/1.1 6.4.1.2.1: Transfer Type field */
@ -1479,8 +1464,6 @@ index eeaa6c6..f1c21c4 100644
if (urb->transfer_buffer_length > 0) { if (urb->transfer_buffer_length > 0) {
if (setup->bRequestType & USB_DIR_IN) if (setup->bRequestType & USB_DIR_IN)
field |= TRB_TX_TYPE(TRB_DATA_IN); field |= TRB_TX_TYPE(TRB_DATA_IN);
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 3f91270..15fedb2 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
@@ -31,6 +31,7 @@ @@ -31,6 +31,7 @@
@ -1504,7 +1487,7 @@ index 3f91270..15fedb2 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 */
@@ -1698,6 +1703,9 @@ int xhci_drop_endpoint(struct usb_hcd *hcd, struct usb_device *udev, @@ -1700,6 +1705,9 @@ int xhci_drop_endpoint(struct usb_hcd *h
xhci_endpoint_zero(xhci, xhci->devs[udev->slot_id], ep); xhci_endpoint_zero(xhci, xhci->devs[udev->slot_id], ep);
@ -1514,7 +1497,7 @@ index 3f91270..15fedb2 100644
xhci_dbg(xhci, "drop ep 0x%x, slot id %d, new drop flags = %#x, new add flags = %#x\n", xhci_dbg(xhci, "drop ep 0x%x, slot id %d, new drop flags = %#x, new add flags = %#x\n",
(unsigned int) ep->desc.bEndpointAddress, (unsigned int) ep->desc.bEndpointAddress,
udev->slot_id, udev->slot_id,
@@ -1793,6 +1801,15 @@ int xhci_add_endpoint(struct usb_hcd *hcd, struct usb_device *udev, @@ -1795,6 +1803,15 @@ int xhci_add_endpoint(struct usb_hcd *hc
return -ENOMEM; return -ENOMEM;
} }
@ -1530,8 +1513,6 @@ index 3f91270..15fedb2 100644
ctrl_ctx->add_flags |= cpu_to_le32(added_ctxs); ctrl_ctx->add_flags |= cpu_to_le32(added_ctxs);
new_add_flags = le32_to_cpu(ctrl_ctx->add_flags); new_add_flags = le32_to_cpu(ctrl_ctx->add_flags);
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 0b94512..40cf36e 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
@@ -1630,6 +1630,7 @@ struct xhci_hcd { @@ -1630,6 +1630,7 @@ struct xhci_hcd {
@ -1542,6 +1523,3 @@ index 0b94512..40cf36e 100644
unsigned int num_active_eps; unsigned int num_active_eps;
unsigned int limit_active_eps; unsigned int limit_active_eps;
/* There are two roothubs to keep track of bus suspend info for */ /* There are two roothubs to keep track of bus suspend info for */
--
1.7.10.4

View file

@ -11,8 +11,6 @@ Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
arch/arm64/boot/dts/mediatek/mt8173.dtsi | 42 +++++++++++++++++++++++++++ arch/arm64/boot/dts/mediatek/mt8173.dtsi | 42 +++++++++++++++++++++++++++
2 files changed, 58 insertions(+) 2 files changed, 58 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt8173-evb.dts b/arch/arm64/boot/dts/mediatek/mt8173-evb.dts
index 811cb76..9b1482a 100644
--- a/arch/arm64/boot/dts/mediatek/mt8173-evb.dts --- a/arch/arm64/boot/dts/mediatek/mt8173-evb.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8173-evb.dts +++ b/arch/arm64/boot/dts/mediatek/mt8173-evb.dts
@@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
@ -49,8 +47,6 @@ index 811cb76..9b1482a 100644
+ vbus-supply = <&usb_p1_vbus>; + vbus-supply = <&usb_p1_vbus>;
+ mediatek,wakeup-src = <1>; + mediatek,wakeup-src = <1>;
+}; +};
diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
index 4dd5f93..c1fd275 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
@@ -14,6 +14,7 @@ @@ -14,6 +14,7 @@
@ -109,6 +105,3 @@ index 4dd5f93..c1fd275 100644
mmsys: clock-controller@14000000 { mmsys: clock-controller@14000000 {
compatible = "mediatek,mt8173-mmsys", "syscon"; compatible = "mediatek,mt8173-mmsys", "syscon";
reg = <0 0x14000000 0 0x1000>; reg = <0 0x14000000 0 0x1000>;
--
1.7.10.4

View file

@ -13,8 +13,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt | 1 + Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt | 1 +
3 files changed, 6 insertions(+) 3 files changed, 6 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/mediatek.txt b/Documentation/devicetree/bindings/arm/mediatek.txt
index 618a9199..40e9d32 100644
--- a/Documentation/devicetree/bindings/arm/mediatek.txt --- a/Documentation/devicetree/bindings/arm/mediatek.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek.txt +++ b/Documentation/devicetree/bindings/arm/mediatek.txt
@@ -10,6 +10,7 @@ compatible: Must contain one of @@ -10,6 +10,7 @@ compatible: Must contain one of
@ -35,8 +33,6 @@ index 618a9199..40e9d32 100644
- MTK mt8127 tablet moose EVB: - MTK mt8127 tablet moose EVB:
Required root node properties: Required root node properties:
- compatible = "mediatek,mt8127-moose", "mediatek,mt8127"; - compatible = "mediatek,mt8127-moose", "mediatek,mt8127";
diff --git a/Documentation/devicetree/bindings/serial/mtk-uart.txt b/Documentation/devicetree/bindings/serial/mtk-uart.txt
index 2d47add..474f0cf 100644
--- a/Documentation/devicetree/bindings/serial/mtk-uart.txt --- a/Documentation/devicetree/bindings/serial/mtk-uart.txt
+++ b/Documentation/devicetree/bindings/serial/mtk-uart.txt +++ b/Documentation/devicetree/bindings/serial/mtk-uart.txt
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
@ -47,8 +43,6 @@ index 2d47add..474f0cf 100644
* "mediatek,mt8135-uart" for MT8135 compatible UARTS * "mediatek,mt8135-uart" for MT8135 compatible UARTS
* "mediatek,mt8127-uart" for MT8127 compatible UARTS * "mediatek,mt8127-uart" for MT8127 compatible UARTS
* "mediatek,mt8173-uart" for MT8173 compatible UARTS * "mediatek,mt8173-uart" for MT8173 compatible UARTS
diff --git a/Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt b/Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt
index 64083bc..6bacda1b3 100644
--- a/Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt --- a/Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt
+++ b/Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt +++ b/Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt
@@ -5,6 +5,7 @@ Required properties: @@ -5,6 +5,7 @@ Required properties:
@ -59,6 +53,3 @@ index 64083bc..6bacda1b3 100644
* "mediatek,mt8127-timer" for MT8127 compatible timers * "mediatek,mt8127-timer" for MT8127 compatible timers
* "mediatek,mt8135-timer" for MT8135 compatible timers * "mediatek,mt8135-timer" for MT8135 compatible timers
* "mediatek,mt8173-timer" for MT8173 compatible timers * "mediatek,mt8173-timer" for MT8173 compatible timers
--
1.7.10.4

View file

@ -8,11 +8,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
drivers/soc/mediatek/mtk-scpsys-mt2701.c | 2 ++ drivers/soc/mediatek/mtk-scpsys-mt2701.c | 2 ++
1 file changed, 2 insertions(+) 1 file changed, 2 insertions(+)
diff --git a/drivers/soc/mediatek/mtk-scpsys-mt2701.c b/drivers/soc/mediatek/mtk-scpsys-mt2701.c
index 339d5b8..3a31946 100644
--- a/drivers/soc/mediatek/mtk-scpsys-mt2701.c --- a/drivers/soc/mediatek/mtk-scpsys-mt2701.c
+++ b/drivers/soc/mediatek/mtk-scpsys-mt2701.c +++ b/drivers/soc/mediatek/mtk-scpsys-mt2701.c
@@ -136,6 +136,8 @@ static const struct of_device_id of_scpsys_match_tbl[] = { @@ -136,6 +136,8 @@ static const struct of_device_id of_scps
{ {
.compatible = "mediatek,mt2701-scpsys", .compatible = "mediatek,mt2701-scpsys",
}, { }, {
@ -21,6 +19,3 @@ index 339d5b8..3a31946 100644
/* sentinel */ /* sentinel */
} }
}; };
--
1.7.10.4

View file

@ -16,8 +16,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
create mode 100644 arch/arm/boot/dts/mt7623-evb.dts create mode 100644 arch/arm/boot/dts/mt7623-evb.dts
create mode 100644 arch/arm/boot/dts/mt7623.dtsi create mode 100644 arch/arm/boot/dts/mt7623.dtsi
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 30bbc37..2bce370 100644
--- a/arch/arm/boot/dts/Makefile --- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile
@@ -774,6 +774,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \ @@ -774,6 +774,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
@ -28,9 +26,6 @@ index 30bbc37..2bce370 100644
mt8127-moose.dtb \ mt8127-moose.dtb \
mt8135-evbp1.dtb mt8135-evbp1.dtb
dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
diff --git a/arch/arm/boot/dts/mt7623-evb.dts b/arch/arm/boot/dts/mt7623-evb.dts
new file mode 100644
index 0000000..5e9381d
--- /dev/null --- /dev/null
+++ b/arch/arm/boot/dts/mt7623-evb.dts +++ b/arch/arm/boot/dts/mt7623-evb.dts
@@ -0,0 +1,459 @@ @@ -0,0 +1,459 @@
@ -493,9 +488,6 @@ index 0000000..5e9381d
+ mediatek,reset-pin = <&pio 15 0>; + mediatek,reset-pin = <&pio 15 0>;
+ status = "okay"; + status = "okay";
+}; +};
diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi
new file mode 100644
index 0000000..c53c10d
--- /dev/null --- /dev/null
+++ b/arch/arm/boot/dts/mt7623.dtsi +++ b/arch/arm/boot/dts/mt7623.dtsi
@@ -0,0 +1,510 @@ @@ -0,0 +1,510 @@
@ -1009,8 +1001,6 @@ index 0000000..c53c10d
+ status = "disabled"; + status = "disabled";
+ }; + };
+}; +};
diff --git a/arch/arm/mach-mediatek/Kconfig b/arch/arm/mach-mediatek/Kconfig
index 37dd438..7fb605e 100644
--- a/arch/arm/mach-mediatek/Kconfig --- a/arch/arm/mach-mediatek/Kconfig
+++ b/arch/arm/mach-mediatek/Kconfig +++ b/arch/arm/mach-mediatek/Kconfig
@@ -21,6 +21,10 @@ config MACH_MT6592 @@ -21,6 +21,10 @@ config MACH_MT6592
@ -1024,11 +1014,9 @@ index 37dd438..7fb605e 100644
config MACH_MT8127 config MACH_MT8127
bool "MediaTek MT8127 SoCs support" bool "MediaTek MT8127 SoCs support"
default ARCH_MEDIATEK default ARCH_MEDIATEK
diff --git a/arch/arm/mach-mediatek/mediatek.c b/arch/arm/mach-mediatek/mediatek.c
index d019a08..bcfca37 100644
--- a/arch/arm/mach-mediatek/mediatek.c --- a/arch/arm/mach-mediatek/mediatek.c
+++ b/arch/arm/mach-mediatek/mediatek.c +++ b/arch/arm/mach-mediatek/mediatek.c
@@ -46,6 +46,7 @@ static void __init mediatek_timer_init(void) @@ -46,6 +46,7 @@ static void __init mediatek_timer_init(v
static const char * const mediatek_board_dt_compat[] = { static const char * const mediatek_board_dt_compat[] = {
"mediatek,mt6589", "mediatek,mt6589",
"mediatek,mt6592", "mediatek,mt6592",
@ -1036,6 +1024,3 @@ index d019a08..bcfca37 100644
"mediatek,mt8127", "mediatek,mt8127",
"mediatek,mt8135", "mediatek,mt8135",
NULL, NULL,
--
1.7.10.4

View file

@ -10,9 +10,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
2 files changed, 152 insertions(+) 2 files changed, 152 insertions(+)
create mode 100644 Documentation/devicetree/bindings/pci/mediatek-pcie.txt create mode 100644 Documentation/devicetree/bindings/pci/mediatek-pcie.txt
diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie.txt b/Documentation/devicetree/bindings/pci/mediatek-pcie.txt
new file mode 100644
index 0000000..8fea3ed
--- /dev/null --- /dev/null
+++ b/Documentation/devicetree/bindings/pci/mediatek-pcie.txt +++ b/Documentation/devicetree/bindings/pci/mediatek-pcie.txt
@@ -0,0 +1,140 @@ @@ -0,0 +1,140 @@
@ -156,8 +153,6 @@ index 0000000..8fea3ed
+ status = "okay"; + status = "okay";
+ }; + };
+ }; + };
diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi
index c53c10d..c8c802d 100644
--- a/arch/arm/boot/dts/mt7623.dtsi --- a/arch/arm/boot/dts/mt7623.dtsi
+++ b/arch/arm/boot/dts/mt7623.dtsi +++ b/arch/arm/boot/dts/mt7623.dtsi
@@ -292,6 +292,18 @@ @@ -292,6 +292,18 @@
@ -179,6 +174,3 @@ index c53c10d..c8c802d 100644
mmc0: mmc@11230000 { mmc0: mmc@11230000 {
compatible = "mediatek,mt7623-mmc", compatible = "mediatek,mt7623-mmc",
"mediatek,mt8135-mmc"; "mediatek,mt8135-mmc";
--
1.7.10.4

View file

@ -17,8 +17,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
4 files changed, 654 insertions(+) 4 files changed, 654 insertions(+)
create mode 100644 drivers/pci/host/pcie-mediatek.c create mode 100644 drivers/pci/host/pcie-mediatek.c
diff --git a/arch/arm/mach-mediatek/Kconfig b/arch/arm/mach-mediatek/Kconfig
index 7fb605e..a7fef77 100644
--- a/arch/arm/mach-mediatek/Kconfig --- a/arch/arm/mach-mediatek/Kconfig
+++ b/arch/arm/mach-mediatek/Kconfig +++ b/arch/arm/mach-mediatek/Kconfig
@@ -24,6 +24,7 @@ config MACH_MT6592 @@ -24,6 +24,7 @@ config MACH_MT6592
@ -29,11 +27,9 @@ index 7fb605e..a7fef77 100644
config MACH_MT8127 config MACH_MT8127
bool "MediaTek MT8127 SoCs support" bool "MediaTek MT8127 SoCs support"
diff --git a/drivers/pci/host/Kconfig b/drivers/pci/host/Kconfig
index f131ba9..912f0e1 100644
--- a/drivers/pci/host/Kconfig --- a/drivers/pci/host/Kconfig
+++ b/drivers/pci/host/Kconfig +++ b/drivers/pci/host/Kconfig
@@ -172,4 +172,15 @@ config PCI_HISI @@ -173,4 +173,15 @@ config PCI_HISI
help help
Say Y here if you want PCIe controller support on HiSilicon HIP05 SoC Say Y here if you want PCIe controller support on HiSilicon HIP05 SoC
@ -49,18 +45,13 @@ index f131ba9..912f0e1 100644
+ PCIe include one Host/PCI bridge and 3 PCIe MAC. + PCIe include one Host/PCI bridge and 3 PCIe MAC.
+ +
endmenu endmenu
diff --git a/drivers/pci/host/Makefile b/drivers/pci/host/Makefile
index 9d4d3c6..3b53374 100644
--- a/drivers/pci/host/Makefile --- a/drivers/pci/host/Makefile
+++ b/drivers/pci/host/Makefile +++ b/drivers/pci/host/Makefile
@@ -20,3 +20,4 @@ obj-$(CONFIG_PCIE_IPROC_BCMA) += pcie-iproc-bcma.o @@ -20,3 +20,4 @@ obj-$(CONFIG_PCIE_IPROC_BCMA) += pcie-ip
obj-$(CONFIG_PCIE_ALTERA) += pcie-altera.o obj-$(CONFIG_PCIE_ALTERA) += pcie-altera.o
obj-$(CONFIG_PCIE_ALTERA_MSI) += pcie-altera-msi.o obj-$(CONFIG_PCIE_ALTERA_MSI) += pcie-altera-msi.o
obj-$(CONFIG_PCI_HISI) += pcie-hisi.o obj-$(CONFIG_PCI_HISI) += pcie-hisi.o
+obj-$(CONFIG_PCIE_MTK) += pcie-mediatek.o +obj-$(CONFIG_PCIE_MTK) += pcie-mediatek.o
diff --git a/drivers/pci/host/pcie-mediatek.c b/drivers/pci/host/pcie-mediatek.c
new file mode 100644
index 0000000..ef03952
--- /dev/null --- /dev/null
+++ b/drivers/pci/host/pcie-mediatek.c +++ b/drivers/pci/host/pcie-mediatek.c
@@ -0,0 +1,641 @@ @@ -0,0 +1,641 @@
@ -705,6 +696,3 @@ index 0000000..ef03952
+} +}
+ +
+module_init(mtk_pcie_init); +module_init(mtk_pcie_init);
--
1.7.10.4

View file

@ -9,11 +9,9 @@ Subject: [PATCH 26/81] scpsys: various fixes
include/dt-bindings/power/mt2701-power.h | 4 ++-- include/dt-bindings/power/mt2701-power.h | 4 ++--
3 files changed, 4 insertions(+), 10 deletions(-) 3 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/clk/mediatek/clk-mt2701.c b/drivers/clk/mediatek/clk-mt2701.c
index 0e40bb8..812b347 100644
--- a/drivers/clk/mediatek/clk-mt2701.c --- a/drivers/clk/mediatek/clk-mt2701.c
+++ b/drivers/clk/mediatek/clk-mt2701.c +++ b/drivers/clk/mediatek/clk-mt2701.c
@@ -1043,6 +1043,8 @@ static void __init mtk_ethsys_init(struct device_node *node) @@ -1043,6 +1043,8 @@ static void __init mtk_ethsys_init(struc
if (r) if (r)
pr_err("%s(): could not register clock provider: %d\n", pr_err("%s(): could not register clock provider: %d\n",
__func__, r); __func__, r);
@ -22,11 +20,9 @@ index 0e40bb8..812b347 100644
} }
CLK_OF_DECLARE(mtk_ethsys, "mediatek,mt2701-ethsys", mtk_ethsys_init); CLK_OF_DECLARE(mtk_ethsys, "mediatek,mt2701-ethsys", mtk_ethsys_init);
diff --git a/drivers/soc/mediatek/mtk-scpsys-mt2701.c b/drivers/soc/mediatek/mtk-scpsys-mt2701.c
index 3a31946..19489bc 100644
--- a/drivers/soc/mediatek/mtk-scpsys-mt2701.c --- a/drivers/soc/mediatek/mtk-scpsys-mt2701.c
+++ b/drivers/soc/mediatek/mtk-scpsys-mt2701.c +++ b/drivers/soc/mediatek/mtk-scpsys-mt2701.c
@@ -61,14 +61,6 @@ static const struct scp_domain_data scp_domain_data[] = { @@ -61,14 +61,6 @@ static const struct scp_domain_data scp_
.bus_prot_mask = MT2701_TOP_AXI_PROT_EN_DISP, .bus_prot_mask = MT2701_TOP_AXI_PROT_EN_DISP,
.active_wakeup = true, .active_wakeup = true,
}, },
@ -41,8 +37,6 @@ index 3a31946..19489bc 100644
[MT2701_POWER_DOMAIN_VDEC] = { [MT2701_POWER_DOMAIN_VDEC] = {
.name = "vdec", .name = "vdec",
.sta_mask = VDE_PWR_STA_MASK, .sta_mask = VDE_PWR_STA_MASK,
diff --git a/include/dt-bindings/power/mt2701-power.h b/include/dt-bindings/power/mt2701-power.h
index 64cc826..c168597 100644
--- a/include/dt-bindings/power/mt2701-power.h --- a/include/dt-bindings/power/mt2701-power.h
+++ b/include/dt-bindings/power/mt2701-power.h +++ b/include/dt-bindings/power/mt2701-power.h
@@ -16,12 +16,12 @@ @@ -16,12 +16,12 @@
@ -60,6 +54,3 @@ index 64cc826..c168597 100644
+#define MT2701_POWER_DOMAIN_IFR_MSC 2 +#define MT2701_POWER_DOMAIN_IFR_MSC 2
#endif /* _DT_BINDINGS_POWER_MT2701_POWER_H */ #endif /* _DT_BINDINGS_POWER_MT2701_POWER_H */
--
1.7.10.4

View file

@ -20,11 +20,9 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
drivers/soc/mediatek/mtk-pmic-wrap.c | 22 ++++++++++++++++++++-- drivers/soc/mediatek/mtk-pmic-wrap.c | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-) 1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index 105597a..696071b 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
@@ -412,6 +412,20 @@ static bool pwrap_is_fsm_vldclr(struct pmic_wrapper *wrp) @@ -412,6 +412,20 @@ static bool pwrap_is_fsm_vldclr(struct p
return PWRAP_GET_WACS_FSM(val) == PWRAP_WACS_FSM_WFVLDCLR; return PWRAP_GET_WACS_FSM(val) == PWRAP_WACS_FSM_WFVLDCLR;
} }
@ -45,7 +43,7 @@ index 105597a..696071b 100644
static bool pwrap_is_sync_idle(struct pmic_wrapper *wrp) static bool pwrap_is_sync_idle(struct pmic_wrapper *wrp)
{ {
return pwrap_readl(wrp, PWRAP_WACS2_RDATA) & PWRAP_STATE_SYNC_IDLE0; return pwrap_readl(wrp, PWRAP_WACS2_RDATA) & PWRAP_STATE_SYNC_IDLE0;
@@ -445,8 +459,10 @@ static int pwrap_write(struct pmic_wrapper *wrp, u32 adr, u32 wdata) @@ -445,8 +459,10 @@ static int pwrap_write(struct pmic_wrapp
int ret; int ret;
ret = pwrap_wait_for_state(wrp, pwrap_is_fsm_idle); ret = pwrap_wait_for_state(wrp, pwrap_is_fsm_idle);
@ -57,7 +55,7 @@ index 105597a..696071b 100644
pwrap_writel(wrp, (1 << 31) | ((adr >> 1) << 16) | wdata, pwrap_writel(wrp, (1 << 31) | ((adr >> 1) << 16) | wdata,
PWRAP_WACS2_CMD); PWRAP_WACS2_CMD);
@@ -459,8 +475,10 @@ static int pwrap_read(struct pmic_wrapper *wrp, u32 adr, u32 *rdata) @@ -459,8 +475,10 @@ static int pwrap_read(struct pmic_wrappe
int ret; int ret;
ret = pwrap_wait_for_state(wrp, pwrap_is_fsm_idle); ret = pwrap_wait_for_state(wrp, pwrap_is_fsm_idle);
@ -69,6 +67,3 @@ index 105597a..696071b 100644
pwrap_writel(wrp, (adr >> 1) << 16, PWRAP_WACS2_CMD); pwrap_writel(wrp, (adr >> 1) << 16, PWRAP_WACS2_CMD);
--
1.7.10.4

View file

@ -11,11 +11,9 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
arch/arm/mach-mediatek/platsmp.c | 7 +++++++ arch/arm/mach-mediatek/platsmp.c | 7 +++++++
1 file changed, 7 insertions(+) 1 file changed, 7 insertions(+)
diff --git a/arch/arm/mach-mediatek/platsmp.c b/arch/arm/mach-mediatek/platsmp.c
index 8141f3f..8151400 100644
--- a/arch/arm/mach-mediatek/platsmp.c --- a/arch/arm/mach-mediatek/platsmp.c
+++ b/arch/arm/mach-mediatek/platsmp.c +++ b/arch/arm/mach-mediatek/platsmp.c
@@ -44,6 +44,12 @@ static const struct mtk_smp_boot_info mtk_mt6589_boot = { @@ -44,6 +44,12 @@ static const struct mtk_smp_boot_info mt
{ 0x38, 0x3c, 0x40 }, { 0x38, 0x3c, 0x40 },
}; };
@ -28,7 +26,7 @@ index 8141f3f..8151400 100644
static const struct of_device_id mtk_tz_smp_boot_infos[] __initconst = { static const struct of_device_id mtk_tz_smp_boot_infos[] __initconst = {
{ .compatible = "mediatek,mt8135", .data = &mtk_mt8135_tz_boot }, { .compatible = "mediatek,mt8135", .data = &mtk_mt8135_tz_boot },
{ .compatible = "mediatek,mt8127", .data = &mtk_mt8135_tz_boot }, { .compatible = "mediatek,mt8127", .data = &mtk_mt8135_tz_boot },
@@ -51,6 +57,7 @@ static const struct of_device_id mtk_tz_smp_boot_infos[] __initconst = { @@ -51,6 +57,7 @@ static const struct of_device_id mtk_tz_
static const struct of_device_id mtk_smp_boot_infos[] __initconst = { static const struct of_device_id mtk_smp_boot_infos[] __initconst = {
{ .compatible = "mediatek,mt6589", .data = &mtk_mt6589_boot }, { .compatible = "mediatek,mt6589", .data = &mtk_mt6589_boot },
@ -36,6 +34,3 @@ index 8141f3f..8151400 100644
}; };
static void __iomem *mtk_smp_base; static void __iomem *mtk_smp_base;
--
1.7.10.4

View file

@ -14,8 +14,6 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
drivers/soc/mediatek/mtk-pmic-wrap.c | 19 +++++++++++++++++-- drivers/soc/mediatek/mtk-pmic-wrap.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-) 1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index 696071b..0d9b19a 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
@@ -60,6 +60,15 @@ @@ -60,6 +60,15 @@
@ -34,7 +32,7 @@ index 696071b..0d9b19a 100644
/* macro for slave device wrapper registers */ /* macro for slave device wrapper registers */
#define PWRAP_DEW_BASE 0xbc00 #define PWRAP_DEW_BASE 0xbc00
#define PWRAP_DEW_EVENT_OUT_EN (PWRAP_DEW_BASE + 0x0) #define PWRAP_DEW_EVENT_OUT_EN (PWRAP_DEW_BASE + 0x0)
@@ -822,7 +831,7 @@ MODULE_DEVICE_TABLE(of, of_pwrap_match_tbl); @@ -822,7 +831,7 @@ MODULE_DEVICE_TABLE(of, of_pwrap_match_t
static int pwrap_probe(struct platform_device *pdev) static int pwrap_probe(struct platform_device *pdev)
{ {
@ -43,7 +41,7 @@ index 696071b..0d9b19a 100644
struct pmic_wrapper *wrp; struct pmic_wrapper *wrp;
struct device_node *np = pdev->dev.of_node; struct device_node *np = pdev->dev.of_node;
const struct of_device_id *of_id = const struct of_device_id *of_id =
@@ -912,7 +921,13 @@ static int pwrap_probe(struct platform_device *pdev) @@ -912,7 +921,13 @@ static int pwrap_probe(struct platform_d
/* Initialize watchdog, may not be done by the bootloader */ /* Initialize watchdog, may not be done by the bootloader */
pwrap_writel(wrp, 0xf, PWRAP_WDT_UNIT); pwrap_writel(wrp, 0xf, PWRAP_WDT_UNIT);
@ -58,6 +56,3 @@ index 696071b..0d9b19a 100644
pwrap_writel(wrp, 0x1, PWRAP_TIMER_EN); pwrap_writel(wrp, 0x1, PWRAP_TIMER_EN);
pwrap_writel(wrp, ~((1 << 31) | (1 << 1)), PWRAP_INT_EN); pwrap_writel(wrp, ~((1 << 31) | (1 << 1)), PWRAP_INT_EN);
--
1.7.10.4

View file

@ -11,11 +11,9 @@ Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
arch/arm/mach-mediatek/platsmp.c | 1 + arch/arm/mach-mediatek/platsmp.c | 1 +
1 file changed, 1 insertion(+) 1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-mediatek/platsmp.c b/arch/arm/mach-mediatek/platsmp.c
index 8151400..2078f92d5 100644
--- a/arch/arm/mach-mediatek/platsmp.c --- a/arch/arm/mach-mediatek/platsmp.c
+++ b/arch/arm/mach-mediatek/platsmp.c +++ b/arch/arm/mach-mediatek/platsmp.c
@@ -53,6 +53,7 @@ static const struct mtk_smp_boot_info mtk_mt7623_boot = { @@ -53,6 +53,7 @@ static const struct mtk_smp_boot_info mt
static const struct of_device_id mtk_tz_smp_boot_infos[] __initconst = { static const struct of_device_id mtk_tz_smp_boot_infos[] __initconst = {
{ .compatible = "mediatek,mt8135", .data = &mtk_mt8135_tz_boot }, { .compatible = "mediatek,mt8135", .data = &mtk_mt8135_tz_boot },
{ .compatible = "mediatek,mt8127", .data = &mtk_mt8135_tz_boot }, { .compatible = "mediatek,mt8127", .data = &mtk_mt8135_tz_boot },
@ -23,6 +21,3 @@ index 8151400..2078f92d5 100644
}; };
static const struct of_device_id mtk_smp_boot_infos[] __initconst = { static const struct of_device_id mtk_smp_boot_infos[] __initconst = {
--
1.7.10.4

View file

@ -11,8 +11,6 @@ Cc: devicetree@vger.kernel.org
Documentation/devicetree/bindings/soc/mediatek/pwrap.txt | 1 + Documentation/devicetree/bindings/soc/mediatek/pwrap.txt | 1 +
1 file changed, 1 insertion(+) 1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt b/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
index ddeb5b6..107700d 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
@@ -18,6 +18,7 @@ IP Pairing @@ -18,6 +18,7 @@ IP Pairing
@ -23,6 +21,3 @@ index ddeb5b6..107700d 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
--
1.7.10.4

View file

@ -13,8 +13,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
drivers/soc/mediatek/mtk-pmic-wrap.c | 22 ++++++++-------------- drivers/soc/mediatek/mtk-pmic-wrap.c | 22 ++++++++--------------
1 file changed, 8 insertions(+), 14 deletions(-) 1 file changed, 8 insertions(+), 14 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index 0d9b19a..340c4b5 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
@@ -376,9 +376,7 @@ struct pmic_wrapper { @@ -376,9 +376,7 @@ struct pmic_wrapper {
@ -55,7 +53,7 @@ index 0d9b19a..340c4b5 100644
} }
static bool pwrap_is_fsm_idle(struct pmic_wrapper *wrp) static bool pwrap_is_fsm_idle(struct pmic_wrapper *wrp)
@@ -697,7 +695,7 @@ static int pwrap_init(struct pmic_wrapper *wrp) @@ -697,7 +695,7 @@ static int pwrap_init(struct pmic_wrappe
pwrap_writel(wrp, 1, PWRAP_WRAP_EN); pwrap_writel(wrp, 1, PWRAP_WRAP_EN);
@ -64,7 +62,7 @@ index 0d9b19a..340c4b5 100644
pwrap_writel(wrp, 1, PWRAP_WACS2_EN); pwrap_writel(wrp, 1, PWRAP_WACS2_EN);
@@ -742,7 +740,7 @@ static int pwrap_init(struct pmic_wrapper *wrp) @@ -742,7 +740,7 @@ static int pwrap_init(struct pmic_wrappe
pwrap_writel(wrp, 0x1, PWRAP_CRC_EN); pwrap_writel(wrp, 0x1, PWRAP_CRC_EN);
pwrap_writel(wrp, 0x0, PWRAP_SIG_MODE); pwrap_writel(wrp, 0x0, PWRAP_SIG_MODE);
pwrap_writel(wrp, PWRAP_DEW_CRC_VAL, PWRAP_SIG_ADR); pwrap_writel(wrp, PWRAP_DEW_CRC_VAL, PWRAP_SIG_ADR);
@ -73,7 +71,7 @@ index 0d9b19a..340c4b5 100644
if (pwrap_is_mt8135(wrp)) if (pwrap_is_mt8135(wrp))
pwrap_writel(wrp, 0x7, PWRAP_RRARB_EN); pwrap_writel(wrp, 0x7, PWRAP_RRARB_EN);
@@ -836,7 +834,6 @@ static int pwrap_probe(struct platform_device *pdev) @@ -836,7 +834,6 @@ static int pwrap_probe(struct platform_d
struct device_node *np = pdev->dev.of_node; struct device_node *np = pdev->dev.of_node;
const struct of_device_id *of_id = const struct of_device_id *of_id =
of_match_device(of_pwrap_match_tbl, &pdev->dev); of_match_device(of_pwrap_match_tbl, &pdev->dev);
@ -81,7 +79,7 @@ index 0d9b19a..340c4b5 100644
struct resource *res; struct resource *res;
wrp = devm_kzalloc(&pdev->dev, sizeof(*wrp), GFP_KERNEL); wrp = devm_kzalloc(&pdev->dev, sizeof(*wrp), GFP_KERNEL);
@@ -845,10 +842,7 @@ static int pwrap_probe(struct platform_device *pdev) @@ -845,10 +842,7 @@ static int pwrap_probe(struct platform_d
platform_set_drvdata(pdev, wrp); platform_set_drvdata(pdev, wrp);
@ -93,6 +91,3 @@ index 0d9b19a..340c4b5 100644
wrp->dev = &pdev->dev; wrp->dev = &pdev->dev;
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pwrap"); res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pwrap");
--
1.7.10.4

View file

@ -12,8 +12,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
drivers/soc/mediatek/mtk-pmic-wrap.c | 70 ++++++++++++++++++---------------- drivers/soc/mediatek/mtk-pmic-wrap.c | 70 ++++++++++++++++++----------------
1 file changed, 38 insertions(+), 32 deletions(-) 1 file changed, 38 insertions(+), 32 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index 340c4b5..b22b664 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
@@ -354,24 +354,6 @@ enum pwrap_type { @@ -354,24 +354,6 @@ enum pwrap_type {
@ -55,7 +53,7 @@ index 340c4b5..b22b664 100644
static inline int pwrap_is_mt8135(struct pmic_wrapper *wrp) static inline int pwrap_is_mt8135(struct pmic_wrapper *wrp)
{ {
return wrp->master->type == PWRAP_MT8135; return wrp->master->type == PWRAP_MT8135;
@@ -578,20 +567,23 @@ static int pwrap_init_sidly(struct pmic_wrapper *wrp) @@ -578,20 +567,23 @@ static int pwrap_init_sidly(struct pmic_
return 0; return 0;
} }
@ -92,7 +90,7 @@ index 340c4b5..b22b664 100644
return 0; return 0;
} }
@@ -699,7 +691,7 @@ static int pwrap_init(struct pmic_wrapper *wrp) @@ -699,7 +691,7 @@ static int pwrap_init(struct pmic_wrappe
pwrap_writel(wrp, 1, PWRAP_WACS2_EN); pwrap_writel(wrp, 1, PWRAP_WACS2_EN);
@ -101,7 +99,7 @@ index 340c4b5..b22b664 100644
if (ret) if (ret)
return ret; return ret;
@@ -814,6 +806,20 @@ static const struct regmap_config pwrap_regmap_config = { @@ -814,6 +806,20 @@ static const struct regmap_config pwrap_
.max_register = 0xffff, .max_register = 0xffff,
}; };
@ -122,6 +120,3 @@ index 340c4b5..b22b664 100644
static struct of_device_id of_pwrap_match_tbl[] = { static struct of_device_id of_pwrap_match_tbl[] = {
{ {
.compatible = "mediatek,mt8135-pwrap", .compatible = "mediatek,mt8135-pwrap",
--
1.7.10.4

View file

@ -16,8 +16,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
drivers/soc/mediatek/mtk-pmic-wrap.c | 67 +++++++++++++++++++++------------- drivers/soc/mediatek/mtk-pmic-wrap.c | 67 +++++++++++++++++++++-------------
1 file changed, 42 insertions(+), 25 deletions(-) 1 file changed, 42 insertions(+), 25 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index b22b664..22c89e9 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
@@ -372,6 +372,7 @@ struct pmic_wrapper_type { @@ -372,6 +372,7 @@ struct pmic_wrapper_type {
@ -28,7 +26,7 @@ index b22b664..22c89e9 100644
}; };
static inline int pwrap_is_mt8135(struct pmic_wrapper *wrp) static inline int pwrap_is_mt8135(struct pmic_wrapper *wrp)
@@ -665,6 +666,41 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp) @@ -665,6 +666,41 @@ static int pwrap_init_cipher(struct pmic
return 0; return 0;
} }
@ -70,7 +68,7 @@ index b22b664..22c89e9 100644
static int pwrap_init(struct pmic_wrapper *wrp) static int pwrap_init(struct pmic_wrapper *wrp)
{ {
int ret; int ret;
@@ -743,31 +779,10 @@ static int pwrap_init(struct pmic_wrapper *wrp) @@ -743,31 +779,10 @@ static int pwrap_init(struct pmic_wrappe
pwrap_writel(wrp, 0x5, PWRAP_STAUPD_PRD); pwrap_writel(wrp, 0x5, PWRAP_STAUPD_PRD);
pwrap_writel(wrp, 0xff, PWRAP_STAUPD_GRPEN); pwrap_writel(wrp, 0xff, PWRAP_STAUPD_GRPEN);
@ -106,7 +104,7 @@ index b22b664..22c89e9 100644
} }
/* Setup the init done registers */ /* Setup the init done registers */
@@ -811,6 +826,7 @@ static struct pmic_wrapper_type pwrap_mt8135 = { @@ -811,6 +826,7 @@ static struct pmic_wrapper_type pwrap_mt
.type = PWRAP_MT8135, .type = PWRAP_MT8135,
.arb_en_all = 0x1ff, .arb_en_all = 0x1ff,
.init_reg_clock = pwrap_mt8135_init_reg_clock, .init_reg_clock = pwrap_mt8135_init_reg_clock,
@ -114,7 +112,7 @@ index b22b664..22c89e9 100644
}; };
static struct pmic_wrapper_type pwrap_mt8173 = { static struct pmic_wrapper_type pwrap_mt8173 = {
@@ -818,6 +834,7 @@ static struct pmic_wrapper_type pwrap_mt8173 = { @@ -818,6 +834,7 @@ static struct pmic_wrapper_type pwrap_mt
.type = PWRAP_MT8173, .type = PWRAP_MT8173,
.arb_en_all = 0x3f, .arb_en_all = 0x3f,
.init_reg_clock = pwrap_mt8173_init_reg_clock, .init_reg_clock = pwrap_mt8173_init_reg_clock,
@ -122,6 +120,3 @@ index b22b664..22c89e9 100644
}; };
static struct of_device_id of_pwrap_match_tbl[] = { static struct of_device_id of_pwrap_match_tbl[] = {
--
1.7.10.4

View file

@ -11,8 +11,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
drivers/soc/mediatek/mtk-pmic-wrap.c | 5 ++++- drivers/soc/mediatek/mtk-pmic-wrap.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-) 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index 22c89e9..9df1135 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
@@ -371,6 +371,7 @@ struct pmic_wrapper_type { @@ -371,6 +371,7 @@ struct pmic_wrapper_type {
@ -23,7 +21,7 @@ index 22c89e9..9df1135 100644
int (*init_reg_clock)(struct pmic_wrapper *wrp); int (*init_reg_clock)(struct pmic_wrapper *wrp);
int (*init_soc_specific)(struct pmic_wrapper *wrp); int (*init_soc_specific)(struct pmic_wrapper *wrp);
}; };
@@ -825,6 +826,7 @@ static struct pmic_wrapper_type pwrap_mt8135 = { @@ -825,6 +826,7 @@ static struct pmic_wrapper_type pwrap_mt
.regs = mt8135_regs, .regs = mt8135_regs,
.type = PWRAP_MT8135, .type = PWRAP_MT8135,
.arb_en_all = 0x1ff, .arb_en_all = 0x1ff,
@ -31,7 +29,7 @@ index 22c89e9..9df1135 100644
.init_reg_clock = pwrap_mt8135_init_reg_clock, .init_reg_clock = pwrap_mt8135_init_reg_clock,
.init_soc_specific = pwrap_mt8135_init_soc_specific, .init_soc_specific = pwrap_mt8135_init_soc_specific,
}; };
@@ -833,6 +835,7 @@ static struct pmic_wrapper_type pwrap_mt8173 = { @@ -833,6 +835,7 @@ static struct pmic_wrapper_type pwrap_mt
.regs = mt8173_regs, .regs = mt8173_regs,
.type = PWRAP_MT8173, .type = PWRAP_MT8173,
.arb_en_all = 0x3f, .arb_en_all = 0x3f,
@ -39,7 +37,7 @@ index 22c89e9..9df1135 100644
.init_reg_clock = pwrap_mt8173_init_reg_clock, .init_reg_clock = pwrap_mt8173_init_reg_clock,
.init_soc_specific = pwrap_mt8173_init_soc_specific, .init_soc_specific = pwrap_mt8173_init_soc_specific,
}; };
@@ -946,7 +949,7 @@ static int pwrap_probe(struct platform_device *pdev) @@ -946,7 +949,7 @@ static int pwrap_probe(struct platform_d
PWRAP_WDT_SRC_MASK_NO_STAUPD : PWRAP_WDT_SRC_MASK_ALL; PWRAP_WDT_SRC_MASK_NO_STAUPD : PWRAP_WDT_SRC_MASK_ALL;
pwrap_writel(wrp, wdt_src, PWRAP_WDT_SRC_EN); pwrap_writel(wrp, wdt_src, PWRAP_WDT_SRC_EN);
pwrap_writel(wrp, 0x1, PWRAP_TIMER_EN); pwrap_writel(wrp, 0x1, PWRAP_TIMER_EN);
@ -48,6 +46,3 @@ index 22c89e9..9df1135 100644
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
ret = devm_request_irq(wrp->dev, irq, pwrap_interrupt, IRQF_TRIGGER_HIGH, ret = devm_request_irq(wrp->dev, irq, pwrap_interrupt, IRQF_TRIGGER_HIGH,
--
1.7.10.4

View file

@ -13,8 +13,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
drivers/soc/mediatek/mtk-pmic-wrap.c | 11 +++++++---- drivers/soc/mediatek/mtk-pmic-wrap.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-) 1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index 9df1135..8ce1bad 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
@@ -372,6 +372,7 @@ struct pmic_wrapper_type { @@ -372,6 +372,7 @@ struct pmic_wrapper_type {
@ -25,7 +23,7 @@ index 9df1135..8ce1bad 100644
int (*init_reg_clock)(struct pmic_wrapper *wrp); int (*init_reg_clock)(struct pmic_wrapper *wrp);
int (*init_soc_specific)(struct pmic_wrapper *wrp); int (*init_soc_specific)(struct pmic_wrapper *wrp);
}; };
@@ -511,15 +512,15 @@ static int pwrap_reset_spislave(struct pmic_wrapper *wrp) @@ -511,15 +512,15 @@ static int pwrap_reset_spislave(struct p
pwrap_writel(wrp, 1, PWRAP_MAN_EN); pwrap_writel(wrp, 1, PWRAP_MAN_EN);
pwrap_writel(wrp, 0, PWRAP_DIO_EN); pwrap_writel(wrp, 0, PWRAP_DIO_EN);
@ -45,7 +43,7 @@ index 9df1135..8ce1bad 100644
PWRAP_MAN_CMD); PWRAP_MAN_CMD);
ret = pwrap_wait_for_state(wrp, pwrap_is_sync_idle); ret = pwrap_wait_for_state(wrp, pwrap_is_sync_idle);
@@ -827,6 +828,7 @@ static struct pmic_wrapper_type pwrap_mt8135 = { @@ -827,6 +828,7 @@ static struct pmic_wrapper_type pwrap_mt
.type = PWRAP_MT8135, .type = PWRAP_MT8135,
.arb_en_all = 0x1ff, .arb_en_all = 0x1ff,
.int_en_all = ~(BIT(31) | BIT(1)), .int_en_all = ~(BIT(31) | BIT(1)),
@ -53,7 +51,7 @@ index 9df1135..8ce1bad 100644
.init_reg_clock = pwrap_mt8135_init_reg_clock, .init_reg_clock = pwrap_mt8135_init_reg_clock,
.init_soc_specific = pwrap_mt8135_init_soc_specific, .init_soc_specific = pwrap_mt8135_init_soc_specific,
}; };
@@ -836,6 +838,7 @@ static struct pmic_wrapper_type pwrap_mt8173 = { @@ -836,6 +838,7 @@ static struct pmic_wrapper_type pwrap_mt
.type = PWRAP_MT8173, .type = PWRAP_MT8173,
.arb_en_all = 0x3f, .arb_en_all = 0x3f,
.int_en_all = ~(BIT(31) | BIT(1)), .int_en_all = ~(BIT(31) | BIT(1)),
@ -61,6 +59,3 @@ index 9df1135..8ce1bad 100644
.init_reg_clock = pwrap_mt8173_init_reg_clock, .init_reg_clock = pwrap_mt8173_init_reg_clock,
.init_soc_specific = pwrap_mt8173_init_soc_specific, .init_soc_specific = pwrap_mt8173_init_soc_specific,
}; };
--
1.7.10.4

View file

@ -13,8 +13,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
drivers/soc/mediatek/mtk-pmic-wrap.c | 9 +++++---- drivers/soc/mediatek/mtk-pmic-wrap.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-) 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index 8ce1bad..aa54df3 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
@@ -373,6 +373,7 @@ struct pmic_wrapper_type { @@ -373,6 +373,7 @@ struct pmic_wrapper_type {
@ -25,7 +23,7 @@ index 8ce1bad..aa54df3 100644
int (*init_reg_clock)(struct pmic_wrapper *wrp); int (*init_reg_clock)(struct pmic_wrapper *wrp);
int (*init_soc_specific)(struct pmic_wrapper *wrp); int (*init_soc_specific)(struct pmic_wrapper *wrp);
}; };
@@ -829,6 +830,7 @@ static struct pmic_wrapper_type pwrap_mt8135 = { @@ -829,6 +830,7 @@ static struct pmic_wrapper_type pwrap_mt
.arb_en_all = 0x1ff, .arb_en_all = 0x1ff,
.int_en_all = ~(BIT(31) | BIT(1)), .int_en_all = ~(BIT(31) | BIT(1)),
.spi_w = PWRAP_MAN_CMD_SPI_WRITE, .spi_w = PWRAP_MAN_CMD_SPI_WRITE,
@ -33,7 +31,7 @@ index 8ce1bad..aa54df3 100644
.init_reg_clock = pwrap_mt8135_init_reg_clock, .init_reg_clock = pwrap_mt8135_init_reg_clock,
.init_soc_specific = pwrap_mt8135_init_soc_specific, .init_soc_specific = pwrap_mt8135_init_soc_specific,
}; };
@@ -839,6 +841,7 @@ static struct pmic_wrapper_type pwrap_mt8173 = { @@ -839,6 +841,7 @@ static struct pmic_wrapper_type pwrap_mt
.arb_en_all = 0x3f, .arb_en_all = 0x3f,
.int_en_all = ~(BIT(31) | BIT(1)), .int_en_all = ~(BIT(31) | BIT(1)),
.spi_w = PWRAP_MAN_CMD_SPI_WRITE, .spi_w = PWRAP_MAN_CMD_SPI_WRITE,
@ -41,7 +39,7 @@ index 8ce1bad..aa54df3 100644
.init_reg_clock = pwrap_mt8173_init_reg_clock, .init_reg_clock = pwrap_mt8173_init_reg_clock,
.init_soc_specific = pwrap_mt8173_init_soc_specific, .init_soc_specific = pwrap_mt8173_init_soc_specific,
}; };
@@ -858,7 +861,7 @@ MODULE_DEVICE_TABLE(of, of_pwrap_match_tbl); @@ -858,7 +861,7 @@ MODULE_DEVICE_TABLE(of, of_pwrap_match_t
static int pwrap_probe(struct platform_device *pdev) static int pwrap_probe(struct platform_device *pdev)
{ {
@ -50,7 +48,7 @@ index 8ce1bad..aa54df3 100644
struct pmic_wrapper *wrp; struct pmic_wrapper *wrp;
struct device_node *np = pdev->dev.of_node; struct device_node *np = pdev->dev.of_node;
const struct of_device_id *of_id = const struct of_device_id *of_id =
@@ -948,9 +951,7 @@ static int pwrap_probe(struct platform_device *pdev) @@ -948,9 +951,7 @@ static int pwrap_probe(struct platform_d
* Since STAUPD was not used on mt8173 platform, * Since STAUPD was not used on mt8173 platform,
* so STAUPD of WDT_SRC which should be turned off * so STAUPD of WDT_SRC which should be turned off
*/ */
@ -61,6 +59,3 @@ index 8ce1bad..aa54df3 100644
pwrap_writel(wrp, 0x1, PWRAP_TIMER_EN); pwrap_writel(wrp, 0x1, PWRAP_TIMER_EN);
pwrap_writel(wrp, wrp->master->int_en_all, PWRAP_INT_EN); pwrap_writel(wrp, wrp->master->int_en_all, PWRAP_INT_EN);
--
1.7.10.4

View file

@ -18,8 +18,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
drivers/soc/mediatek/mtk-pmic-wrap.c | 28 ++++++++++++---------------- drivers/soc/mediatek/mtk-pmic-wrap.c | 28 ++++++++++++----------------
1 file changed, 12 insertions(+), 16 deletions(-) 1 file changed, 12 insertions(+), 16 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index aa54df3..a2bacda 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
@@ -374,20 +374,11 @@ struct pmic_wrapper_type { @@ -374,20 +374,11 @@ struct pmic_wrapper_type {
@ -44,7 +42,7 @@ index aa54df3..a2bacda 100644
static u32 pwrap_readl(struct pmic_wrapper *wrp, enum pwrap_regs reg) static u32 pwrap_readl(struct pmic_wrapper *wrp, enum pwrap_regs reg)
{ {
return readl(wrp->base + wrp->master->regs[reg]); return readl(wrp->base + wrp->master->regs[reg]);
@@ -619,11 +610,14 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp) @@ -619,11 +610,14 @@ static int pwrap_init_cipher(struct pmic
pwrap_writel(wrp, 0x1, PWRAP_CIPHER_KEY_SEL); pwrap_writel(wrp, 0x1, PWRAP_CIPHER_KEY_SEL);
pwrap_writel(wrp, 0x2, PWRAP_CIPHER_IV_SEL); pwrap_writel(wrp, 0x2, PWRAP_CIPHER_IV_SEL);
@ -61,7 +59,7 @@ index aa54df3..a2bacda 100644
} }
/* Config cipher mode @PMIC */ /* Config cipher mode @PMIC */
@@ -713,7 +707,7 @@ static int pwrap_init(struct pmic_wrapper *wrp) @@ -713,7 +707,7 @@ static int pwrap_init(struct pmic_wrappe
if (wrp->rstc_bridge) if (wrp->rstc_bridge)
reset_control_reset(wrp->rstc_bridge); reset_control_reset(wrp->rstc_bridge);
@ -70,7 +68,7 @@ index aa54df3..a2bacda 100644
/* Enable DCM */ /* Enable DCM */
pwrap_writel(wrp, 3, PWRAP_DCM_EN); pwrap_writel(wrp, 3, PWRAP_DCM_EN);
pwrap_writel(wrp, 0, PWRAP_DCM_DBC_PRD); pwrap_writel(wrp, 0, PWRAP_DCM_DBC_PRD);
@@ -773,7 +767,7 @@ static int pwrap_init(struct pmic_wrapper *wrp) @@ -773,7 +767,7 @@ static int pwrap_init(struct pmic_wrappe
pwrap_writel(wrp, PWRAP_DEW_CRC_VAL, PWRAP_SIG_ADR); pwrap_writel(wrp, PWRAP_DEW_CRC_VAL, PWRAP_SIG_ADR);
pwrap_writel(wrp, wrp->master->arb_en_all, PWRAP_HIPRIO_ARB_EN); pwrap_writel(wrp, wrp->master->arb_en_all, PWRAP_HIPRIO_ARB_EN);
@ -79,7 +77,7 @@ index aa54df3..a2bacda 100644
pwrap_writel(wrp, 0x7, PWRAP_RRARB_EN); pwrap_writel(wrp, 0x7, PWRAP_RRARB_EN);
pwrap_writel(wrp, 0x1, PWRAP_WACS0_EN); pwrap_writel(wrp, 0x1, PWRAP_WACS0_EN);
@@ -793,7 +787,7 @@ static int pwrap_init(struct pmic_wrapper *wrp) @@ -793,7 +787,7 @@ static int pwrap_init(struct pmic_wrappe
pwrap_writel(wrp, 1, PWRAP_INIT_DONE0); pwrap_writel(wrp, 1, PWRAP_INIT_DONE0);
pwrap_writel(wrp, 1, PWRAP_INIT_DONE1); pwrap_writel(wrp, 1, PWRAP_INIT_DONE1);
@ -88,7 +86,7 @@ index aa54df3..a2bacda 100644
writel(1, wrp->bridge_base + PWRAP_MT8135_BRIDGE_INIT_DONE3); writel(1, wrp->bridge_base + PWRAP_MT8135_BRIDGE_INIT_DONE3);
writel(1, wrp->bridge_base + PWRAP_MT8135_BRIDGE_INIT_DONE4); writel(1, wrp->bridge_base + PWRAP_MT8135_BRIDGE_INIT_DONE4);
} }
@@ -831,6 +825,7 @@ static struct pmic_wrapper_type pwrap_mt8135 = { @@ -831,6 +825,7 @@ static struct pmic_wrapper_type pwrap_mt
.int_en_all = ~(BIT(31) | BIT(1)), .int_en_all = ~(BIT(31) | BIT(1)),
.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,
@ -96,7 +94,7 @@ index aa54df3..a2bacda 100644
.init_reg_clock = pwrap_mt8135_init_reg_clock, .init_reg_clock = pwrap_mt8135_init_reg_clock,
.init_soc_specific = pwrap_mt8135_init_soc_specific, .init_soc_specific = pwrap_mt8135_init_soc_specific,
}; };
@@ -842,6 +837,7 @@ static struct pmic_wrapper_type pwrap_mt8173 = { @@ -842,6 +837,7 @@ static struct pmic_wrapper_type pwrap_mt
.int_en_all = ~(BIT(31) | BIT(1)), .int_en_all = ~(BIT(31) | BIT(1)),
.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,
@ -104,7 +102,7 @@ index aa54df3..a2bacda 100644
.init_reg_clock = pwrap_mt8173_init_reg_clock, .init_reg_clock = pwrap_mt8173_init_reg_clock,
.init_soc_specific = pwrap_mt8173_init_soc_specific, .init_soc_specific = pwrap_mt8173_init_soc_specific,
}; };
@@ -889,7 +885,7 @@ static int pwrap_probe(struct platform_device *pdev) @@ -889,7 +885,7 @@ static int pwrap_probe(struct platform_d
return ret; return ret;
} }
@ -113,6 +111,3 @@ index aa54df3..a2bacda 100644
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
"pwrap-bridge"); "pwrap-bridge");
wrp->bridge_base = devm_ioremap_resource(wrp->dev, res); wrp->bridge_base = devm_ioremap_resource(wrp->dev, res);
--
1.7.10.4

View file

@ -12,8 +12,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
drivers/soc/mediatek/mtk-pmic-wrap.c | 159 ++++++++++++++++++++++++---------- drivers/soc/mediatek/mtk-pmic-wrap.c | 159 ++++++++++++++++++++++++----------
1 file changed, 112 insertions(+), 47 deletions(-) 1 file changed, 112 insertions(+), 47 deletions(-)
diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index a2bacda..bcc841e 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
@@ -69,33 +69,54 @@ @@ -69,33 +69,54 @@
@ -125,7 +123,7 @@ index a2bacda..bcc841e 100644
struct clk *clk_spi; struct clk *clk_spi;
struct clk *clk_wrap; struct clk *clk_wrap;
struct reset_control *rstc; struct reset_control *rstc;
@@ -544,7 +575,8 @@ static int pwrap_init_sidly(struct pmic_wrapper *wrp) @@ -544,7 +575,8 @@ static int pwrap_init_sidly(struct pmic_
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
pwrap_writel(wrp, i, PWRAP_SIDLY); pwrap_writel(wrp, i, PWRAP_SIDLY);
@ -135,7 +133,7 @@ index a2bacda..bcc841e 100644
if (rdata == PWRAP_DEW_READ_TEST_VAL) { if (rdata == PWRAP_DEW_READ_TEST_VAL) {
dev_dbg(wrp->dev, "[Read Test] pass, SIDLY=%x\n", i); dev_dbg(wrp->dev, "[Read Test] pass, SIDLY=%x\n", i);
pass |= 1 << i; pass |= 1 << i;
@@ -593,7 +625,8 @@ static bool pwrap_is_pmic_cipher_ready(struct pmic_wrapper *wrp) @@ -593,7 +625,8 @@ static bool pwrap_is_pmic_cipher_ready(s
u32 rdata; u32 rdata;
int ret; int ret;
@ -145,7 +143,7 @@ index a2bacda..bcc841e 100644
if (ret) if (ret)
return 0; return 0;
@@ -621,12 +654,12 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp) @@ -621,12 +654,12 @@ static int pwrap_init_cipher(struct pmic
} }
/* Config cipher mode @PMIC */ /* Config cipher mode @PMIC */
@ -164,7 +162,7 @@ index a2bacda..bcc841e 100644
/* wait for cipher data ready@AP */ /* wait for cipher data ready@AP */
ret = pwrap_wait_for_state(wrp, pwrap_is_cipher_ready); ret = pwrap_wait_for_state(wrp, pwrap_is_cipher_ready);
@@ -643,7 +676,7 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp) @@ -643,7 +676,7 @@ static int pwrap_init_cipher(struct pmic
} }
/* wait for cipher mode idle */ /* wait for cipher mode idle */
@ -173,7 +171,7 @@ index a2bacda..bcc841e 100644
ret = pwrap_wait_for_state(wrp, pwrap_is_fsm_idle_and_sync_idle); ret = pwrap_wait_for_state(wrp, pwrap_is_fsm_idle_and_sync_idle);
if (ret) { if (ret) {
dev_err(wrp->dev, "cipher mode idle fail, ret=%d\n", ret); dev_err(wrp->dev, "cipher mode idle fail, ret=%d\n", ret);
@@ -653,9 +686,11 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp) @@ -653,9 +686,11 @@ static int pwrap_init_cipher(struct pmic
pwrap_writel(wrp, 1, PWRAP_CIPHER_MODE); pwrap_writel(wrp, 1, PWRAP_CIPHER_MODE);
/* Write Test */ /* Write Test */
@ -188,7 +186,7 @@ index a2bacda..bcc841e 100644
dev_err(wrp->dev, "rdata=0x%04X\n", rdata); dev_err(wrp->dev, "rdata=0x%04X\n", rdata);
return -EFAULT; return -EFAULT;
} }
@@ -677,8 +712,10 @@ static int pwrap_mt8135_init_soc_specific(struct pmic_wrapper *wrp) @@ -677,8 +712,10 @@ static int pwrap_mt8135_init_soc_specifi
writel(0x7ff, wrp->bridge_base + PWRAP_MT8135_BRIDGE_INT_EN); writel(0x7ff, wrp->bridge_base + PWRAP_MT8135_BRIDGE_INT_EN);
/* enable PMIC event out and sources */ /* enable PMIC event out and sources */
@ -201,7 +199,7 @@ index a2bacda..bcc841e 100644
dev_err(wrp->dev, "enable dewrap fail\n"); dev_err(wrp->dev, "enable dewrap fail\n");
return -EFAULT; return -EFAULT;
} }
@@ -689,8 +726,10 @@ static int pwrap_mt8135_init_soc_specific(struct pmic_wrapper *wrp) @@ -689,8 +726,10 @@ static int pwrap_mt8135_init_soc_specifi
static int pwrap_mt8173_init_soc_specific(struct pmic_wrapper *wrp) static int pwrap_mt8173_init_soc_specific(struct pmic_wrapper *wrp)
{ {
/* PMIC_DEWRAP enables */ /* PMIC_DEWRAP enables */
@ -214,7 +212,7 @@ index a2bacda..bcc841e 100644
dev_err(wrp->dev, "enable dewrap fail\n"); dev_err(wrp->dev, "enable dewrap fail\n");
return -EFAULT; return -EFAULT;
} }
@@ -734,7 +773,7 @@ static int pwrap_init(struct pmic_wrapper *wrp) @@ -734,7 +773,7 @@ static int pwrap_init(struct pmic_wrappe
return ret; return ret;
/* Enable dual IO mode */ /* Enable dual IO mode */
@ -223,7 +221,7 @@ index a2bacda..bcc841e 100644
/* Check IDLE & INIT_DONE in advance */ /* Check IDLE & INIT_DONE in advance */
ret = pwrap_wait_for_state(wrp, pwrap_is_fsm_idle_and_sync_idle); ret = pwrap_wait_for_state(wrp, pwrap_is_fsm_idle_and_sync_idle);
@@ -746,7 +785,7 @@ static int pwrap_init(struct pmic_wrapper *wrp) @@ -746,7 +785,7 @@ static int pwrap_init(struct pmic_wrappe
pwrap_writel(wrp, 1, PWRAP_DIO_EN); pwrap_writel(wrp, 1, PWRAP_DIO_EN);
/* Read Test */ /* Read Test */
@ -232,7 +230,7 @@ index a2bacda..bcc841e 100644
if (rdata != PWRAP_DEW_READ_TEST_VAL) { if (rdata != PWRAP_DEW_READ_TEST_VAL) {
dev_err(wrp->dev, "Read test failed after switch to DIO mode: 0x%04x != 0x%04x\n", dev_err(wrp->dev, "Read test failed after switch to DIO mode: 0x%04x != 0x%04x\n",
PWRAP_DEW_READ_TEST_VAL, rdata); PWRAP_DEW_READ_TEST_VAL, rdata);
@@ -759,12 +798,13 @@ static int pwrap_init(struct pmic_wrapper *wrp) @@ -759,12 +798,13 @@ static int pwrap_init(struct pmic_wrappe
return ret; return ret;
/* Signature checking - using CRC */ /* Signature checking - using CRC */
@ -248,7 +246,7 @@ index a2bacda..bcc841e 100644
pwrap_writel(wrp, wrp->master->arb_en_all, PWRAP_HIPRIO_ARB_EN); pwrap_writel(wrp, wrp->master->arb_en_all, PWRAP_HIPRIO_ARB_EN);
if (wrp->master->type == PWRAP_MT8135) if (wrp->master->type == PWRAP_MT8135)
@@ -818,6 +858,21 @@ static const struct regmap_config pwrap_regmap_config = { @@ -818,6 +858,21 @@ static const struct regmap_config pwrap_
.max_register = 0xffff, .max_register = 0xffff,
}; };
@ -270,7 +268,7 @@ index a2bacda..bcc841e 100644
static struct pmic_wrapper_type pwrap_mt8135 = { static struct pmic_wrapper_type pwrap_mt8135 = {
.regs = mt8135_regs, .regs = mt8135_regs,
.type = PWRAP_MT8135, .type = PWRAP_MT8135,
@@ -862,8 +917,17 @@ static int pwrap_probe(struct platform_device *pdev) @@ -862,8 +917,17 @@ static int pwrap_probe(struct platform_d
struct device_node *np = pdev->dev.of_node; struct device_node *np = pdev->dev.of_node;
const struct of_device_id *of_id = const struct of_device_id *of_id =
of_match_device(of_pwrap_match_tbl, &pdev->dev); of_match_device(of_pwrap_match_tbl, &pdev->dev);
@ -288,7 +286,7 @@ index a2bacda..bcc841e 100644
wrp = devm_kzalloc(&pdev->dev, sizeof(*wrp), GFP_KERNEL); wrp = devm_kzalloc(&pdev->dev, sizeof(*wrp), GFP_KERNEL);
if (!wrp) if (!wrp)
return -ENOMEM; return -ENOMEM;
@@ -871,6 +935,7 @@ static int pwrap_probe(struct platform_device *pdev) @@ -871,6 +935,7 @@ static int pwrap_probe(struct platform_d
platform_set_drvdata(pdev, wrp); platform_set_drvdata(pdev, wrp);
wrp->master = of_id->data; wrp->master = of_id->data;
@ -296,6 +294,3 @@ index a2bacda..bcc841e 100644
wrp->dev = &pdev->dev; wrp->dev = &pdev->dev;
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pwrap"); res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pwrap");
--
1.7.10.4

View file

@ -11,8 +11,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
drivers/soc/mediatek/mtk-pmic-wrap.c | 43 ++++++++++++++++++++++++++++++++++ drivers/soc/mediatek/mtk-pmic-wrap.c | 43 ++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+) 1 file changed, 43 insertions(+)
diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index bcc841e..0e4ebb8 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
@@ -93,6 +93,27 @@ enum dew_regs { @@ -93,6 +93,27 @@ enum dew_regs {
@ -51,7 +49,7 @@ index bcc841e..0e4ebb8 100644
PMIC_MT6397, PMIC_MT6397,
}; };
@@ -661,6 +683,19 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp) @@ -661,6 +683,19 @@ static int pwrap_init_cipher(struct pmic
pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_LOAD], 0x1); pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_LOAD], 0x1);
pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_START], 0x1); pwrap_write(wrp, wrp->slave->dew_regs[PWRAP_DEW_CIPHER_START], 0x1);
@ -71,7 +69,7 @@ index bcc841e..0e4ebb8 100644
/* wait for cipher data ready@AP */ /* wait for cipher data ready@AP */
ret = pwrap_wait_for_state(wrp, pwrap_is_cipher_ready); ret = pwrap_wait_for_state(wrp, pwrap_is_cipher_ready);
if (ret) { if (ret) {
@@ -858,6 +893,11 @@ static const struct regmap_config pwrap_regmap_config = { @@ -858,6 +893,11 @@ static const struct regmap_config pwrap_
.max_register = 0xffff, .max_register = 0xffff,
}; };
@ -83,7 +81,7 @@ index bcc841e..0e4ebb8 100644
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,
@@ -865,6 +905,9 @@ static const struct pwrap_slv_type pmic_mt6397 = { @@ -865,6 +905,9 @@ static const struct pwrap_slv_type pmic_
static const struct of_device_id of_slave_match_tbl[] = { static const struct of_device_id of_slave_match_tbl[] = {
{ {
@ -93,6 +91,3 @@ index bcc841e..0e4ebb8 100644
.compatible = "mediatek,mt6397", .compatible = "mediatek,mt6397",
.data = &pmic_mt6397, .data = &pmic_mt6397,
}, { }, {
--
1.7.10.4

View file

@ -11,8 +11,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
drivers/soc/mediatek/mtk-pmic-wrap.c | 154 ++++++++++++++++++++++++++++++++++ drivers/soc/mediatek/mtk-pmic-wrap.c | 154 ++++++++++++++++++++++++++++++++++
1 file changed, 154 insertions(+) 1 file changed, 154 insertions(+)
diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
index 0e4ebb8..3c3e56d 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
@@ -52,6 +52,7 @@ @@ -52,6 +52,7 @@
@ -138,7 +136,7 @@ index 0e4ebb8..3c3e56d 100644
PWRAP_MT8135, PWRAP_MT8135,
PWRAP_MT8173, PWRAP_MT8173,
}; };
@@ -637,6 +732,31 @@ static int pwrap_mt8173_init_reg_clock(struct pmic_wrapper *wrp) @@ -637,6 +732,31 @@ static int pwrap_mt8173_init_reg_clock(s
return 0; return 0;
} }
@ -170,7 +168,7 @@ index 0e4ebb8..3c3e56d 100644
static bool pwrap_is_cipher_ready(struct pmic_wrapper *wrp) static bool pwrap_is_cipher_ready(struct pmic_wrapper *wrp)
{ {
return pwrap_readl(wrp, PWRAP_CIPHER_RDY) & 1; return pwrap_readl(wrp, PWRAP_CIPHER_RDY) & 1;
@@ -670,6 +790,7 @@ static int pwrap_init_cipher(struct pmic_wrapper *wrp) @@ -670,6 +790,7 @@ static int pwrap_init_cipher(struct pmic
pwrap_writel(wrp, 1, PWRAP_CIPHER_LOAD); pwrap_writel(wrp, 1, PWRAP_CIPHER_LOAD);
pwrap_writel(wrp, 1, PWRAP_CIPHER_START); pwrap_writel(wrp, 1, PWRAP_CIPHER_START);
break; break;
@ -178,7 +176,7 @@ index 0e4ebb8..3c3e56d 100644
case PWRAP_MT8173: case PWRAP_MT8173:
pwrap_writel(wrp, 1, PWRAP_CIPHER_EN); pwrap_writel(wrp, 1, PWRAP_CIPHER_EN);
break; break;
@@ -772,6 +893,24 @@ static int pwrap_mt8173_init_soc_specific(struct pmic_wrapper *wrp) @@ -772,6 +893,24 @@ static int pwrap_mt8173_init_soc_specifi
return 0; return 0;
} }
@ -203,7 +201,7 @@ index 0e4ebb8..3c3e56d 100644
static int pwrap_init(struct pmic_wrapper *wrp) static int pwrap_init(struct pmic_wrapper *wrp)
{ {
int ret; int ret;
@@ -916,6 +1055,18 @@ static const struct of_device_id of_slave_match_tbl[] = { @@ -916,6 +1055,18 @@ static const struct of_device_id of_slav
}; };
MODULE_DEVICE_TABLE(of, of_slave_match_tbl); MODULE_DEVICE_TABLE(of, of_slave_match_tbl);
@ -222,7 +220,7 @@ index 0e4ebb8..3c3e56d 100644
static struct pmic_wrapper_type pwrap_mt8135 = { static struct pmic_wrapper_type pwrap_mt8135 = {
.regs = mt8135_regs, .regs = mt8135_regs,
.type = PWRAP_MT8135, .type = PWRAP_MT8135,
@@ -942,6 +1093,9 @@ static struct pmic_wrapper_type pwrap_mt8173 = { @@ -942,6 +1093,9 @@ static struct pmic_wrapper_type pwrap_mt
static struct of_device_id of_pwrap_match_tbl[] = { static struct of_device_id of_pwrap_match_tbl[] = {
{ {
@ -232,6 +230,3 @@ index 0e4ebb8..3c3e56d 100644
.compatible = "mediatek,mt8135-pwrap", .compatible = "mediatek,mt8135-pwrap",
.data = &pwrap_mt8135, .data = &pwrap_mt8135,
}, { }, {
--
1.7.10.4

View file

@ -11,8 +11,6 @@ Cc: devicetree@vger.kernel.org
Documentation/devicetree/bindings/mfd/mt6397.txt | 10 ++++++---- Documentation/devicetree/bindings/mfd/mt6397.txt | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-) 1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/mfd/mt6397.txt b/Documentation/devicetree/bindings/mfd/mt6397.txt
index 15043e6..949c85f 100644
--- a/Documentation/devicetree/bindings/mfd/mt6397.txt --- a/Documentation/devicetree/bindings/mfd/mt6397.txt
+++ b/Documentation/devicetree/bindings/mfd/mt6397.txt +++ b/Documentation/devicetree/bindings/mfd/mt6397.txt
@@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
@ -24,7 +22,7 @@ index 15043e6..949c85f 100644
- Regulator - Regulator
- RTC - RTC
- Audio codec - Audio codec
@@ -8,14 +8,14 @@ MT6397 is a multifunction device with the following sub modules: @@ -8,14 +8,14 @@ MT6397 is a multifunction device with th
- Clock - Clock
It is interfaced to host controller using SPI interface by a proprietary hardware It is interfaced to host controller using SPI interface by a proprietary hardware
@ -50,6 +48,3 @@ index 15043e6..949c85f 100644
- codec - codec
Required properties: Required properties:
- compatible: "mediatek,mt6397-codec" - compatible: "mediatek,mt6397-codec"
--
1.7.10.4

View file

@ -13,11 +13,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
include/linux/mfd/mt6397/core.h | 2 ++ include/linux/mfd/mt6397/core.h | 2 ++
2 files changed, 19 insertions(+), 10 deletions(-) 2 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
index 1749c1c..75ad0fe 100644
--- a/drivers/mfd/mt6397-core.c --- a/drivers/mfd/mt6397-core.c
+++ b/drivers/mfd/mt6397-core.c +++ b/drivers/mfd/mt6397-core.c
@@ -69,8 +69,10 @@ static void mt6397_irq_sync_unlock(struct irq_data *data) @@ -69,8 +69,10 @@ static void mt6397_irq_sync_unlock(struc
{ {
struct mt6397_chip *mt6397 = irq_data_get_irq_chip_data(data); struct mt6397_chip *mt6397 = irq_data_get_irq_chip_data(data);
@ -30,7 +28,7 @@ index 1749c1c..75ad0fe 100644
mutex_unlock(&mt6397->irqlock); mutex_unlock(&mt6397->irqlock);
} }
@@ -147,8 +149,8 @@ static irqreturn_t mt6397_irq_thread(int irq, void *data) @@ -147,8 +149,8 @@ static irqreturn_t mt6397_irq_thread(int
{ {
struct mt6397_chip *mt6397 = data; struct mt6397_chip *mt6397 = data;
@ -41,7 +39,7 @@ index 1749c1c..75ad0fe 100644
return IRQ_HANDLED; return IRQ_HANDLED;
} }
@@ -177,8 +179,8 @@ static int mt6397_irq_init(struct mt6397_chip *mt6397) @@ -177,8 +179,8 @@ static int mt6397_irq_init(struct mt6397
mutex_init(&mt6397->irqlock); mutex_init(&mt6397->irqlock);
/* Mask all interrupt sources */ /* Mask all interrupt sources */
@ -52,7 +50,7 @@ index 1749c1c..75ad0fe 100644
mt6397->irq_domain = irq_domain_add_linear(mt6397->dev->of_node, mt6397->irq_domain = irq_domain_add_linear(mt6397->dev->of_node,
MT6397_IRQ_NR, &mt6397_irq_domain_ops, mt6397); MT6397_IRQ_NR, &mt6397_irq_domain_ops, mt6397);
@@ -203,8 +205,8 @@ static int mt6397_irq_suspend(struct device *dev) @@ -203,8 +205,8 @@ static int mt6397_irq_suspend(struct dev
{ {
struct mt6397_chip *chip = dev_get_drvdata(dev); struct mt6397_chip *chip = dev_get_drvdata(dev);
@ -63,7 +61,7 @@ index 1749c1c..75ad0fe 100644
enable_irq_wake(chip->irq); enable_irq_wake(chip->irq);
@@ -215,8 +217,8 @@ static int mt6397_irq_resume(struct device *dev) @@ -215,8 +217,8 @@ static int mt6397_irq_resume(struct devi
{ {
struct mt6397_chip *chip = dev_get_drvdata(dev); struct mt6397_chip *chip = dev_get_drvdata(dev);
@ -74,7 +72,7 @@ index 1749c1c..75ad0fe 100644
disable_irq_wake(chip->irq); disable_irq_wake(chip->irq);
@@ -237,6 +239,11 @@ static int mt6397_probe(struct platform_device *pdev) @@ -237,6 +239,11 @@ static int mt6397_probe(struct platform_
return -ENOMEM; return -ENOMEM;
mt6397->dev = &pdev->dev; mt6397->dev = &pdev->dev;
@ -86,8 +84,6 @@ index 1749c1c..75ad0fe 100644
/* /*
* mt6397 MFD is child device of soc pmic wrapper. * mt6397 MFD is child device of soc pmic wrapper.
* Regmap is set from its parent. * Regmap is set from its parent.
diff --git a/include/linux/mfd/mt6397/core.h b/include/linux/mfd/mt6397/core.h
index 45b8e8a..d678f52 100644
--- a/include/linux/mfd/mt6397/core.h --- a/include/linux/mfd/mt6397/core.h
+++ b/include/linux/mfd/mt6397/core.h +++ b/include/linux/mfd/mt6397/core.h
@@ -60,6 +60,8 @@ struct mt6397_chip { @@ -60,6 +60,8 @@ struct mt6397_chip {
@ -99,6 +95,3 @@ index 45b8e8a..d678f52 100644
}; };
#endif /* __MFD_MT6397_CORE_H__ */ #endif /* __MFD_MT6397_CORE_H__ */
--
1.7.10.4

View file

@ -8,8 +8,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
drivers/mfd/mt6397-core.c | 58 ++++++++++++++++++++++++++++++++------------- drivers/mfd/mt6397-core.c | 58 ++++++++++++++++++++++++++++++++-------------
1 file changed, 41 insertions(+), 17 deletions(-) 1 file changed, 41 insertions(+), 17 deletions(-)
diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
index 75ad0fe..aa91606 100644
--- a/drivers/mfd/mt6397-core.c --- a/drivers/mfd/mt6397-core.c
+++ b/drivers/mfd/mt6397-core.c +++ b/drivers/mfd/mt6397-core.c
@@ -24,6 +24,9 @@ @@ -24,6 +24,9 @@
@ -22,7 +20,7 @@ index 75ad0fe..aa91606 100644
static const struct resource mt6397_rtc_resources[] = { static const struct resource mt6397_rtc_resources[] = {
{ {
.start = MT6397_RTC_BASE, .start = MT6397_RTC_BASE,
@@ -232,39 +235,60 @@ static SIMPLE_DEV_PM_OPS(mt6397_pm_ops, mt6397_irq_suspend, @@ -232,39 +235,60 @@ static SIMPLE_DEV_PM_OPS(mt6397_pm_ops,
static int mt6397_probe(struct platform_device *pdev) static int mt6397_probe(struct platform_device *pdev)
{ {
int ret; int ret;
@ -100,6 +98,3 @@ index 75ad0fe..aa91606 100644
return ret; return ret;
} }
--
1.7.10.4

View file

@ -12,8 +12,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
create mode 100644 include/linux/mfd/mt6323/core.h create mode 100644 include/linux/mfd/mt6323/core.h
create mode 100644 include/linux/mfd/mt6323/registers.h create mode 100644 include/linux/mfd/mt6323/registers.h
diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
index aa91606..8234cd3 100644
--- a/drivers/mfd/mt6397-core.c --- a/drivers/mfd/mt6397-core.c
+++ b/drivers/mfd/mt6397-core.c +++ b/drivers/mfd/mt6397-core.c
@@ -19,11 +19,14 @@ @@ -19,11 +19,14 @@
@ -31,7 +29,7 @@ index aa91606..8234cd3 100644
#define MT6391_CID_CODE 0x91 #define MT6391_CID_CODE 0x91
#define MT6397_CID_CODE 0x97 #define MT6397_CID_CODE 0x97
@@ -40,6 +43,13 @@ static const struct resource mt6397_rtc_resources[] = { @@ -40,6 +43,13 @@ static const struct resource mt6397_rtc_
}, },
}; };
@ -45,7 +43,7 @@ index aa91606..8234cd3 100644
static const struct mfd_cell mt6397_devs[] = { static const struct mfd_cell mt6397_devs[] = {
{ {
.name = "mt6397-rtc", .name = "mt6397-rtc",
@@ -261,6 +271,15 @@ static int mt6397_probe(struct platform_device *pdev) @@ -261,6 +271,15 @@ static int mt6397_probe(struct platform_
} }
switch (id & 0xff) { switch (id & 0xff) {
@ -61,7 +59,7 @@ index aa91606..8234cd3 100644
case MT6397_CID_CODE: case MT6397_CID_CODE:
case MT6391_CID_CODE: case MT6391_CID_CODE:
pmic->int_con[0] = MT6397_INT_CON0; pmic->int_con[0] = MT6397_INT_CON0;
@@ -302,6 +321,7 @@ static int mt6397_remove(struct platform_device *pdev) @@ -302,6 +321,7 @@ static int mt6397_remove(struct platform
static const struct of_device_id mt6397_of_match[] = { static const struct of_device_id mt6397_of_match[] = {
{ .compatible = "mediatek,mt6397" }, { .compatible = "mediatek,mt6397" },
@ -69,9 +67,6 @@ index aa91606..8234cd3 100644
{ } { }
}; };
MODULE_DEVICE_TABLE(of, mt6397_of_match); MODULE_DEVICE_TABLE(of, mt6397_of_match);
diff --git a/include/linux/mfd/mt6323/core.h b/include/linux/mfd/mt6323/core.h
new file mode 100644
index 0000000..06d0ec3
--- /dev/null --- /dev/null
+++ b/include/linux/mfd/mt6323/core.h +++ b/include/linux/mfd/mt6323/core.h
@@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
@ -111,9 +106,6 @@ index 0000000..06d0ec3
+}; +};
+ +
+#endif /* __MFD_MT6323_CORE_H__ */ +#endif /* __MFD_MT6323_CORE_H__ */
diff --git a/include/linux/mfd/mt6323/registers.h b/include/linux/mfd/mt6323/registers.h
new file mode 100644
index 0000000..160f3c0
--- /dev/null --- /dev/null
+++ b/include/linux/mfd/mt6323/registers.h +++ b/include/linux/mfd/mt6323/registers.h
@@ -0,0 +1,408 @@ @@ -0,0 +1,408 @@
@ -525,6 +517,3 @@ index 0000000..160f3c0
+#define MT6323_ACCDET_CON16 0x079A +#define MT6323_ACCDET_CON16 0x079A
+ +
+#endif /* __MFD_MT6323_REGISTERS_H__ */ +#endif /* __MFD_MT6323_REGISTERS_H__ */
--
1.7.10.4

View file

@ -10,9 +10,6 @@ Cc: devicetree@vger.kernel.org
1 file changed, 239 insertions(+) 1 file changed, 239 insertions(+)
create mode 100644 Documentation/devicetree/bindings/regulator/mt6323-regulator.txt create mode 100644 Documentation/devicetree/bindings/regulator/mt6323-regulator.txt
diff --git a/Documentation/devicetree/bindings/regulator/mt6323-regulator.txt b/Documentation/devicetree/bindings/regulator/mt6323-regulator.txt
new file mode 100644
index 0000000..9fd95e7
--- /dev/null --- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/mt6323-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/mt6323-regulator.txt
@@ -0,0 +1,239 @@ @@ -0,0 +1,239 @@
@ -255,6 +252,3 @@ index 0000000..9fd95e7
+ }; + };
+ }; + };
+ }; + };
--
1.7.10.4

View file

@ -18,11 +18,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
create mode 100644 drivers/regulator/mt6323-regulator.c create mode 100644 drivers/regulator/mt6323-regulator.c
create mode 100644 include/linux/regulator/mt6323-regulator.h create mode 100644 include/linux/regulator/mt6323-regulator.h
diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index 8df0b0e..4aec931 100644
--- a/drivers/regulator/Kconfig --- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig
@@ -452,6 +452,15 @@ config REGULATOR_MT6311 @@ -453,6 +453,15 @@ config REGULATOR_MT6311
This driver supports the control of different power rails of device This driver supports the control of different power rails of device
through regulator interface. through regulator interface.
@ -38,11 +36,9 @@ index 8df0b0e..4aec931 100644
config REGULATOR_MT6397 config REGULATOR_MT6397
tristate "MediaTek MT6397 PMIC" tristate "MediaTek MT6397 PMIC"
depends on MFD_MT6397 depends on MFD_MT6397
diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile
index 0f81749..b42a84e 100644
--- a/drivers/regulator/Makefile --- a/drivers/regulator/Makefile
+++ b/drivers/regulator/Makefile +++ b/drivers/regulator/Makefile
@@ -60,6 +60,7 @@ obj-$(CONFIG_REGULATOR_MC13783) += mc13783-regulator.o @@ -60,6 +60,7 @@ obj-$(CONFIG_REGULATOR_MC13783) += mc137
obj-$(CONFIG_REGULATOR_MC13892) += mc13892-regulator.o obj-$(CONFIG_REGULATOR_MC13892) += mc13892-regulator.o
obj-$(CONFIG_REGULATOR_MC13XXX_CORE) += mc13xxx-regulator-core.o obj-$(CONFIG_REGULATOR_MC13XXX_CORE) += mc13xxx-regulator-core.o
obj-$(CONFIG_REGULATOR_MT6311) += mt6311-regulator.o obj-$(CONFIG_REGULATOR_MT6311) += mt6311-regulator.o
@ -50,9 +46,6 @@ index 0f81749..b42a84e 100644
obj-$(CONFIG_REGULATOR_MT6397) += mt6397-regulator.o obj-$(CONFIG_REGULATOR_MT6397) += mt6397-regulator.o
obj-$(CONFIG_REGULATOR_QCOM_RPM) += qcom_rpm-regulator.o obj-$(CONFIG_REGULATOR_QCOM_RPM) += qcom_rpm-regulator.o
obj-$(CONFIG_REGULATOR_QCOM_SMD_RPM) += qcom_smd-regulator.o obj-$(CONFIG_REGULATOR_QCOM_SMD_RPM) += qcom_smd-regulator.o
diff --git a/drivers/regulator/mt6323-regulator.c b/drivers/regulator/mt6323-regulator.c
new file mode 100644
index 0000000..28ebbda
--- /dev/null --- /dev/null
+++ b/drivers/regulator/mt6323-regulator.c +++ b/drivers/regulator/mt6323-regulator.c
@@ -0,0 +1,432 @@ @@ -0,0 +1,432 @@
@ -488,9 +481,6 @@ index 0000000..28ebbda
+MODULE_AUTHOR("Chen Zhong <chen.zhong@mediatek.com>"); +MODULE_AUTHOR("Chen Zhong <chen.zhong@mediatek.com>");
+MODULE_DESCRIPTION("Regulator Driver for MediaTek MT6397 PMIC"); +MODULE_DESCRIPTION("Regulator Driver for MediaTek MT6397 PMIC");
+MODULE_LICENSE("GPL v2"); +MODULE_LICENSE("GPL v2");
diff --git a/include/linux/regulator/mt6323-regulator.h b/include/linux/regulator/mt6323-regulator.h
new file mode 100644
index 0000000..67011cd
--- /dev/null --- /dev/null
+++ b/include/linux/regulator/mt6323-regulator.h +++ b/include/linux/regulator/mt6323-regulator.h
@@ -0,0 +1,52 @@ @@ -0,0 +1,52 @@
@ -546,6 +536,3 @@ index 0000000..67011cd
+#define MT6323_MAX_REGULATOR MT6323_ID_RG_MAX +#define MT6323_MAX_REGULATOR MT6323_ID_RG_MAX
+ +
+#endif /* __LINUX_REGULATOR_MT6323_H */ +#endif /* __LINUX_REGULATOR_MT6323_H */
--
1.7.10.4

View file

@ -15,9 +15,6 @@ Cc: devicetree@vger.kernel.org
1 file changed, 77 insertions(+) 1 file changed, 77 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/mediatek-net.txt create mode 100644 Documentation/devicetree/bindings/net/mediatek-net.txt
diff --git a/Documentation/devicetree/bindings/net/mediatek-net.txt b/Documentation/devicetree/bindings/net/mediatek-net.txt
new file mode 100644
index 0000000..5ca7929
--- /dev/null --- /dev/null
+++ b/Documentation/devicetree/bindings/net/mediatek-net.txt +++ b/Documentation/devicetree/bindings/net/mediatek-net.txt
@@ -0,0 +1,77 @@ @@ -0,0 +1,77 @@
@ -98,6 +95,3 @@ index 0000000..5ca7929
+ }; + };
+ }; + };
+}; +};
--
1.7.10.4

View file

@ -26,9 +26,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
create mode 100644 drivers/net/ethernet/mediatek/mtk_eth_soc.c create mode 100644 drivers/net/ethernet/mediatek/mtk_eth_soc.c
create mode 100644 drivers/net/ethernet/mediatek/mtk_eth_soc.h create mode 100644 drivers/net/ethernet/mediatek/mtk_eth_soc.h
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
new file mode 100644
index 0000000..ba3afa5
--- /dev/null --- /dev/null
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -0,0 +1,1807 @@ @@ -0,0 +1,1807 @@
@ -1839,9 +1836,6 @@ index 0000000..ba3afa5
+MODULE_LICENSE("GPL"); +MODULE_LICENSE("GPL");
+MODULE_AUTHOR("John Crispin <blogic@openwrt.org>"); +MODULE_AUTHOR("John Crispin <blogic@openwrt.org>");
+MODULE_DESCRIPTION("Ethernet driver for MediaTek SoC"); +MODULE_DESCRIPTION("Ethernet driver for MediaTek SoC");
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.h b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
new file mode 100644
index 0000000..48a5292
--- /dev/null --- /dev/null
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
@@ -0,0 +1,421 @@ @@ -0,0 +1,421 @@
@ -2266,6 +2260,3 @@ index 0000000..48a5292
+u32 mtk_r32(struct mtk_eth *eth, unsigned reg); +u32 mtk_r32(struct mtk_eth *eth, unsigned reg);
+ +
+#endif /* MTK_ETH_H */ +#endif /* MTK_ETH_H */
--
1.7.10.4

View file

@ -15,8 +15,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
create mode 100644 drivers/net/ethernet/mediatek/Kconfig create mode 100644 drivers/net/ethernet/mediatek/Kconfig
create mode 100644 drivers/net/ethernet/mediatek/Makefile create mode 100644 drivers/net/ethernet/mediatek/Makefile
diff --git a/drivers/net/ethernet/Kconfig b/drivers/net/ethernet/Kconfig
index 31c5e47..cd28b95 100644
--- a/drivers/net/ethernet/Kconfig --- a/drivers/net/ethernet/Kconfig
+++ b/drivers/net/ethernet/Kconfig +++ b/drivers/net/ethernet/Kconfig
@@ -106,6 +106,7 @@ config LANTIQ_ETOP @@ -106,6 +106,7 @@ config LANTIQ_ETOP
@ -27,8 +25,6 @@ index 31c5e47..cd28b95 100644
source "drivers/net/ethernet/mellanox/Kconfig" source "drivers/net/ethernet/mellanox/Kconfig"
source "drivers/net/ethernet/micrel/Kconfig" source "drivers/net/ethernet/micrel/Kconfig"
source "drivers/net/ethernet/microchip/Kconfig" source "drivers/net/ethernet/microchip/Kconfig"
diff --git a/drivers/net/ethernet/Makefile b/drivers/net/ethernet/Makefile
index 071f84e..c62191f 100644
--- a/drivers/net/ethernet/Makefile --- a/drivers/net/ethernet/Makefile
+++ b/drivers/net/ethernet/Makefile +++ b/drivers/net/ethernet/Makefile
@@ -46,6 +46,7 @@ obj-$(CONFIG_JME) += jme.o @@ -46,6 +46,7 @@ obj-$(CONFIG_JME) += jme.o
@ -39,9 +35,6 @@ index 071f84e..c62191f 100644
obj-$(CONFIG_NET_VENDOR_MELLANOX) += mellanox/ obj-$(CONFIG_NET_VENDOR_MELLANOX) += mellanox/
obj-$(CONFIG_NET_VENDOR_MICREL) += micrel/ obj-$(CONFIG_NET_VENDOR_MICREL) += micrel/
obj-$(CONFIG_NET_VENDOR_MICROCHIP) += microchip/ obj-$(CONFIG_NET_VENDOR_MICROCHIP) += microchip/
diff --git a/drivers/net/ethernet/mediatek/Kconfig b/drivers/net/ethernet/mediatek/Kconfig
new file mode 100644
index 0000000..b0229f4
--- /dev/null --- /dev/null
+++ b/drivers/net/ethernet/mediatek/Kconfig +++ b/drivers/net/ethernet/mediatek/Kconfig
@@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
@ -62,9 +55,6 @@ index 0000000..b0229f4
+ MediaTek MT2701/MT7623 chipset family. + MediaTek MT2701/MT7623 chipset family.
+ +
+endif #NET_VENDOR_MEDIATEK +endif #NET_VENDOR_MEDIATEK
diff --git a/drivers/net/ethernet/mediatek/Makefile b/drivers/net/ethernet/mediatek/Makefile
new file mode 100644
index 0000000..aa3f1c8
--- /dev/null --- /dev/null
+++ b/drivers/net/ethernet/mediatek/Makefile +++ b/drivers/net/ethernet/mediatek/Makefile
@@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
@ -73,6 +63,3 @@ index 0000000..aa3f1c8
+# +#
+ +
+obj-$(CONFIG_NET_MEDIATEK_SOC) += mtk_eth_soc.o +obj-$(CONFIG_NET_MEDIATEK_SOC) += mtk_eth_soc.o
--
1.7.10.4

View file

@ -11,11 +11,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
MAINTAINERS | 7 +++++++ MAINTAINERS | 7 +++++++
1 file changed, 7 insertions(+) 1 file changed, 7 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 156e1d3..7737042 100644
--- a/MAINTAINERS --- a/MAINTAINERS
+++ b/MAINTAINERS +++ b/MAINTAINERS
@@ -6908,6 +6908,13 @@ F: include/uapi/linux/meye.h @@ -6907,6 +6907,13 @@ F: include/uapi/linux/meye.h
F: include/uapi/linux/ivtv* F: include/uapi/linux/ivtv*
F: include/uapi/linux/uvcvideo.h F: include/uapi/linux/uvcvideo.h
@ -29,6 +27,3 @@ index 156e1d3..7737042 100644
MEDIATEK MT7601U WIRELESS LAN DRIVER MEDIATEK MT7601U WIRELESS LAN DRIVER
M: Jakub Kicinski <kubakici@wp.pl> M: Jakub Kicinski <kubakici@wp.pl>
L: linux-wireless@vger.kernel.org L: linux-wireless@vger.kernel.org
--
1.7.10.4

View file

@ -14,8 +14,6 @@ Signed-off-by: Brian Norris <computersforpeace@gmail.com>
include/linux/mtd/nand.h | 5 +++++ include/linux/mtd/nand.h | 5 +++++
1 file changed, 5 insertions(+) 1 file changed, 5 insertions(+)
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 5a9d1d4..a4839b3 100644
--- a/include/linux/mtd/nand.h --- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h
@@ -719,6 +719,11 @@ struct nand_chip { @@ -719,6 +719,11 @@ struct nand_chip {
@ -30,6 +28,3 @@ index 5a9d1d4..a4839b3 100644
/* /*
* NAND Flash Manufacturer ID Codes * NAND Flash Manufacturer ID Codes
*/ */
--
1.7.10.4

View file

@ -11,11 +11,9 @@ Signed-off-by: Brian Norris <computersforpeace@gmail.com>
include/linux/mtd/nand.h | 5 +++++ include/linux/mtd/nand.h | 5 +++++
1 file changed, 5 insertions(+) 1 file changed, 5 insertions(+)
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index a4839b3..c75424f 100644
--- a/include/linux/mtd/nand.h --- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h
@@ -724,6 +724,11 @@ static inline struct nand_chip *mtd_to_nand(struct mtd_info *mtd) @@ -724,6 +724,11 @@ static inline struct nand_chip *mtd_to_n
return mtd->priv; return mtd->priv;
} }
@ -27,6 +25,3 @@ index a4839b3..c75424f 100644
/* /*
* NAND Flash Manufacturer ID Codes * NAND Flash Manufacturer ID Codes
*/ */
--
1.7.10.4

View file

@ -13,11 +13,9 @@ Signed-off-by: Brian Norris <computersforpeace@gmail.com>
include/linux/mtd/nand.h | 10 ++++++++++ include/linux/mtd/nand.h | 10 ++++++++++
1 file changed, 10 insertions(+) 1 file changed, 10 insertions(+)
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index c75424f..345f864 100644
--- a/include/linux/mtd/nand.h --- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h
@@ -729,6 +729,16 @@ static inline struct mtd_info *nand_to_mtd(struct nand_chip *chip) @@ -729,6 +729,16 @@ static inline struct mtd_info *nand_to_m
return &chip->mtd; return &chip->mtd;
} }
@ -34,6 +32,3 @@ index c75424f..345f864 100644
/* /*
* NAND Flash Manufacturer ID Codes * NAND Flash Manufacturer ID Codes
*/ */
--
1.7.10.4

View file

@ -17,8 +17,6 @@ Signed-off-by: Brian Norris <computersforpeace@gmail.com>
include/linux/mtd/nand.h | 2 ++ include/linux/mtd/nand.h | 2 ++
1 file changed, 2 insertions(+) 1 file changed, 2 insertions(+)
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 345f864..1ded588 100644
--- a/include/linux/mtd/nand.h --- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h
@@ -540,6 +540,7 @@ struct nand_buffers { @@ -540,6 +540,7 @@ struct nand_buffers {
@ -37,6 +35,3 @@ index 345f864..1ded588 100644
void __iomem *IO_ADDR_R; void __iomem *IO_ADDR_R;
void __iomem *IO_ADDR_W; void __iomem *IO_ADDR_W;
--
1.7.10.4

View file

@ -16,11 +16,9 @@ Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
include/linux/mtd/spi-nor.h | 11 +++++++++++ include/linux/mtd/spi-nor.h | 11 +++++++++++
3 files changed, 33 insertions(+) 3 files changed, 33 insertions(+)
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index f17fa75..cc84923 100644
--- a/include/linux/mtd/mtd.h --- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h
@@ -254,6 +254,17 @@ struct mtd_info { @@ -258,6 +258,17 @@ struct mtd_info {
int usecount; int usecount;
}; };
@ -38,11 +36,9 @@ index f17fa75..cc84923 100644
int mtd_erase(struct mtd_info *mtd, struct erase_info *instr); int mtd_erase(struct mtd_info *mtd, struct erase_info *instr);
int mtd_point(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, int mtd_point(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen,
void **virt, resource_size_t *phys); void **virt, resource_size_t *phys);
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 1ded588..3c34ca4 100644
--- a/include/linux/mtd/nand.h --- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h
@@ -741,6 +741,17 @@ static inline void nand_set_controller_data(struct nand_chip *chip, void *priv) @@ -741,6 +741,17 @@ static inline void nand_set_controller_d
chip->priv = priv; chip->priv = priv;
} }
@ -60,11 +56,9 @@ index 1ded588..3c34ca4 100644
/* /*
* NAND Flash Manufacturer ID Codes * NAND Flash Manufacturer ID Codes
*/ */
diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h
index c8723b6..6d991df 100644
--- a/include/linux/mtd/spi-nor.h --- a/include/linux/mtd/spi-nor.h
+++ b/include/linux/mtd/spi-nor.h +++ b/include/linux/mtd/spi-nor.h
@@ -185,6 +185,17 @@ struct spi_nor { @@ -184,6 +184,17 @@ struct spi_nor {
void *priv; void *priv;
}; };
@ -82,6 +76,3 @@ index c8723b6..6d991df 100644
/** /**
* spi_nor_scan() - scan the SPI NOR * spi_nor_scan() - scan the SPI NOR
* @nor: the spi_nor structure * @nor: the spi_nor structure
--
1.7.10.4

View file

@ -15,9 +15,6 @@ Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
1 file changed, 38 insertions(+) 1 file changed, 38 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mtd/mtksdg1-nand.txt create mode 100644 Documentation/devicetree/bindings/mtd/mtksdg1-nand.txt
diff --git a/Documentation/devicetree/bindings/mtd/mtksdg1-nand.txt b/Documentation/devicetree/bindings/mtd/mtksdg1-nand.txt
new file mode 100644
index 0000000..129d17b
--- /dev/null --- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/mtksdg1-nand.txt +++ b/Documentation/devicetree/bindings/mtd/mtksdg1-nand.txt
@@ -0,0 +1,38 @@ @@ -0,0 +1,38 @@
@ -59,6 +56,3 @@ index 0000000..129d17b
+ +
+ ... + ...
+ }; + };
--
1.7.10.4

View file

@ -20,8 +20,6 @@ Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
create mode 100644 drivers/mtd/nand/mtksdg1_nand_ecc.h create mode 100644 drivers/mtd/nand/mtksdg1_nand_ecc.h
create mode 100644 drivers/mtd/nand/mtksdg1_nand_nfi.h create mode 100644 drivers/mtd/nand/mtksdg1_nand_nfi.h
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 2896640..5ec072a 100644
--- a/drivers/mtd/nand/Kconfig --- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig
@@ -546,4 +546,10 @@ config MTD_NAND_HISI504 @@ -546,4 +546,10 @@ config MTD_NAND_HISI504
@ -35,20 +33,15 @@ index 2896640..5ec072a 100644
+ Enables support for NAND controller on MTK Smart Device SoCs. + Enables support for NAND controller on MTK Smart Device SoCs.
+ +
endif # MTD_NAND endif # MTD_NAND
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
index 2c7f014..2a2620c 100644
--- a/drivers/mtd/nand/Makefile --- a/drivers/mtd/nand/Makefile
+++ b/drivers/mtd/nand/Makefile +++ b/drivers/mtd/nand/Makefile
@@ -55,5 +55,6 @@ obj-$(CONFIG_MTD_NAND_BCM47XXNFLASH) += bcm47xxnflash/ @@ -55,5 +55,6 @@ obj-$(CONFIG_MTD_NAND_BCM47XXNFLASH) +=
obj-$(CONFIG_MTD_NAND_SUNXI) += sunxi_nand.o obj-$(CONFIG_MTD_NAND_SUNXI) += sunxi_nand.o
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_MTKSDG1) += mtksdg1_nand.o +obj-$(CONFIG_MTD_NAND_MTKSDG1) += mtksdg1_nand.o
nand-objs := nand_base.o nand_bbt.o nand_timings.o nand-objs := nand_base.o nand_bbt.o nand_timings.o
diff --git a/drivers/mtd/nand/mtksdg1_nand.c b/drivers/mtd/nand/mtksdg1_nand.c
new file mode 100644
index 0000000..55dd17d
--- /dev/null --- /dev/null
+++ b/drivers/mtd/nand/mtksdg1_nand.c +++ b/drivers/mtd/nand/mtksdg1_nand.c
@@ -0,0 +1,1535 @@ @@ -0,0 +1,1535 @@
@ -1587,9 +1580,6 @@ index 0000000..55dd17d
+MODULE_AUTHOR("Xiaolei Li <xiaolei.li@mediatek.com>"); +MODULE_AUTHOR("Xiaolei Li <xiaolei.li@mediatek.com>");
+MODULE_DESCRIPTION("MTK Nand Flash Controller Driver"); +MODULE_DESCRIPTION("MTK Nand Flash Controller Driver");
+ +
diff --git a/drivers/mtd/nand/mtksdg1_nand_ecc.h b/drivers/mtd/nand/mtksdg1_nand_ecc.h
new file mode 100644
index 0000000..d90b196
--- /dev/null --- /dev/null
+++ b/drivers/mtd/nand/mtksdg1_nand_ecc.h +++ b/drivers/mtd/nand/mtksdg1_nand_ecc.h
@@ -0,0 +1,75 @@ @@ -0,0 +1,75 @@
@ -1668,9 +1658,6 @@ index 0000000..d90b196
+#define DECFSM_MASK (0x7f0f0f0f) +#define DECFSM_MASK (0x7f0f0f0f)
+#define DECFSM_IDLE (0x01010101) +#define DECFSM_IDLE (0x01010101)
+#endif +#endif
diff --git a/drivers/mtd/nand/mtksdg1_nand_nfi.h b/drivers/mtd/nand/mtksdg1_nand_nfi.h
new file mode 100644
index 0000000..a9aa6f6
--- /dev/null --- /dev/null
+++ b/drivers/mtd/nand/mtksdg1_nand_nfi.h +++ b/drivers/mtd/nand/mtksdg1_nand_nfi.h
@@ -0,0 +1,119 @@ @@ -0,0 +1,119 @@
@ -1793,6 +1780,3 @@ index 0000000..a9aa6f6
+ +
+#endif +#endif
+ +
--
1.7.10.4

View file

@ -7,11 +7,9 @@ Subject: [PATCH 59/81] mtd: nand: backport fixes
drivers/mtd/nand/mtksdg1_nand.c | 9 ++++++++- drivers/mtd/nand/mtksdg1_nand.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-) 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/mtksdg1_nand.c b/drivers/mtd/nand/mtksdg1_nand.c
index 55dd17d..f92b949 100644
--- a/drivers/mtd/nand/mtksdg1_nand.c --- a/drivers/mtd/nand/mtksdg1_nand.c
+++ b/drivers/mtd/nand/mtksdg1_nand.c +++ b/drivers/mtd/nand/mtksdg1_nand.c
@@ -107,6 +107,9 @@ static struct nand_ecclayout nand_4k_128 = { @@ -107,6 +107,9 @@ static struct nand_ecclayout nand_4k_128
.oobfree = { {0, 32} }, .oobfree = { {0, 32} },
}; };
@ -21,7 +19,7 @@ index 55dd17d..f92b949 100644
/* NFI register access */ /* NFI register access */
static inline void mtk_nfi_writel(struct mtk_nfc_host *host, u32 val, u32 reg) static inline void mtk_nfi_writel(struct mtk_nfc_host *host, u32 val, u32 reg)
{ {
@@ -1298,6 +1301,7 @@ static int mtk_nfc_probe(struct platform_device *pdev) @@ -1298,6 +1301,7 @@ static int mtk_nfc_probe(struct platform
chip = &host->chip; chip = &host->chip;
mtd = nand_to_mtd(chip); mtd = nand_to_mtd(chip);
@ -29,7 +27,7 @@ index 55dd17d..f92b949 100644
host->dev = dev; host->dev = dev;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -1428,7 +1432,10 @@ static int mtk_nfc_probe(struct platform_device *pdev) @@ -1428,7 +1432,10 @@ static int mtk_nfc_probe(struct platform
} }
host->switch_oob = false; host->switch_oob = false;
@ -41,6 +39,3 @@ index 55dd17d..f92b949 100644
if (ret) { if (ret) {
dev_err(dev, "mtd parse partition error\n"); dev_err(dev, "mtd parse partition error\n");
goto nand_free; goto nand_free;
--
1.7.10.4

View file

@ -11,11 +11,9 @@ Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 ++-- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-) 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index ba3afa5..9759fe5 100644
--- a/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 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -186,9 +186,9 @@ static int mtk_phy_connect_node(struct mtk_eth *eth, struct mtk_mac *mac, @@ -186,9 +186,9 @@ static int mtk_phy_connect_node(struct m
phydev = of_phy_connect(eth->netdev[mac->id], phy_node, phydev = of_phy_connect(eth->netdev[mac->id], phy_node,
mtk_phy_link_adjust, 0, phy_mode); mtk_phy_link_adjust, 0, phy_mode);
@ -27,6 +25,3 @@ index ba3afa5..9759fe5 100644
} }
dev_info(eth->dev, dev_info(eth->dev,
--
1.7.10.4

View file

@ -11,8 +11,6 @@ Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 ++ drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 ++
1 file changed, 2 insertions(+) 1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index 9759fe5..c2c2e206 100644
--- a/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 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -661,6 +661,8 @@ err_dma: @@ -661,6 +661,8 @@ err_dma:
@ -24,6 +22,3 @@ index 9759fe5..c2c2e206 100644
return -ENOMEM; return -ENOMEM;
} }
--
1.7.10.4

View file

@ -17,11 +17,9 @@ Signed-off-by: Arnd Bergmann <arnd@arndb.de>
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index c2c2e206..a005bc4 100644
--- a/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 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -453,7 +453,7 @@ static inline void mtk_rx_get_desc(struct mtk_rx_dma *rxd, @@ -453,7 +453,7 @@ static inline void mtk_rx_get_desc(struc
/* the qdma core needs scratch memory to be setup */ /* the qdma core needs scratch memory to be setup */
static int mtk_init_fq_dma(struct mtk_eth *eth) static int mtk_init_fq_dma(struct mtk_eth *eth)
{ {
@ -30,6 +28,3 @@ index c2c2e206..a005bc4 100644
int cnt = MTK_DMA_SIZE; int cnt = MTK_DMA_SIZE;
dma_addr_t dma_addr; dma_addr_t dma_addr;
int i; int i;
--
1.7.10.4

View file

@ -17,11 +17,9 @@ Signed-off-by: Arnd Bergmann <arnd@arndb.de>
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 3 --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 3 ---
1 file changed, 3 deletions(-) 1 file changed, 3 deletions(-)
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index a005bc4..fcd4ed7 100644
--- a/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 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -1678,9 +1678,6 @@ static int mtk_probe(struct platform_device *pdev) @@ -1678,9 +1678,6 @@ static int mtk_probe(struct platform_dev
struct mtk_eth *eth; struct mtk_eth *eth;
int err; int err;
@ -31,6 +29,3 @@ index a005bc4..fcd4ed7 100644
device_reset(&pdev->dev); device_reset(&pdev->dev);
match = of_match_device(of_mtk_match, &pdev->dev); match = of_match_device(of_mtk_match, &pdev->dev);
--
1.7.10.4

View file

@ -18,11 +18,9 @@ Signed-off-by: Arnd Bergmann <arnd@arndb.de>
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 +++- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-) 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index fcd4ed7..7f2126b 100644
--- a/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 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -1678,7 +1678,9 @@ static int mtk_probe(struct platform_device *pdev) @@ -1678,7 +1678,9 @@ static int mtk_probe(struct platform_dev
struct mtk_eth *eth; struct mtk_eth *eth;
int err; int err;
@ -33,6 +31,3 @@ index fcd4ed7..7f2126b 100644
match = of_match_device(of_mtk_match, &pdev->dev); match = of_match_device(of_mtk_match, &pdev->dev);
soc = (struct mtk_soc_data *)match->data; soc = (struct mtk_soc_data *)match->data;
--
1.7.10.4

View file

@ -11,11 +11,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 1 + drivers/net/ethernet/mediatek/mtk_eth_soc.c | 1 +
1 file changed, 1 insertion(+) 1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index 7f2126b..7e6d2e2 100644
--- a/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 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -1645,6 +1645,7 @@ static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) @@ -1645,6 +1645,7 @@ static int mtk_add_mac(struct mtk_eth *e
mac->hw_stats->reg_offset = id * MTK_STAT_OFFSET; mac->hw_stats->reg_offset = id * MTK_STAT_OFFSET;
SET_NETDEV_DEV(eth->netdev[id], eth->dev); SET_NETDEV_DEV(eth->netdev[id], eth->dev);
@ -23,6 +21,3 @@ index 7f2126b..7e6d2e2 100644
eth->netdev[id]->netdev_ops = &mtk_netdev_ops; eth->netdev[id]->netdev_ops = &mtk_netdev_ops;
eth->netdev[id]->base_addr = (unsigned long)eth->base; eth->netdev[id]->base_addr = (unsigned long)eth->base;
eth->netdev[id]->vlan_features = MTK_HW_FEATURES & eth->netdev[id]->vlan_features = MTK_HW_FEATURES &
--
1.7.10.4

View file

@ -12,11 +12,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index 7e6d2e2..4d8d0a3 100644
--- a/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 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -681,7 +681,7 @@ static inline int mtk_cal_txd_req(struct sk_buff *skb) @@ -681,7 +681,7 @@ static inline int mtk_cal_txd_req(struct
nfrags += skb_shinfo(skb)->nr_frags; nfrags += skb_shinfo(skb)->nr_frags;
} }
@ -25,6 +23,3 @@ index 7e6d2e2..4d8d0a3 100644
} }
static int mtk_start_xmit(struct sk_buff *skb, struct net_device *dev) static int mtk_start_xmit(struct sk_buff *skb, struct net_device *dev)
--
1.7.10.4

View file

@ -16,11 +16,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
Documentation/devicetree/bindings/net/mediatek-net.txt | 6 ++++-- Documentation/devicetree/bindings/net/mediatek-net.txt | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-) 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/mediatek-net.txt b/Documentation/devicetree/bindings/net/mediatek-net.txt
index 5ca7929..2f142be 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
@@ -9,7 +9,7 @@ have dual GMAC each represented by a child node.. @@ -9,7 +9,7 @@ have dual GMAC each represented by a chi
Required properties: Required properties:
- compatible: Should be "mediatek,mt7623-eth" - compatible: Should be "mediatek,mt7623-eth"
- reg: Address and length of the register set for the device - reg: Address and length of the register set for the device
@ -40,6 +38,3 @@ index 5ca7929..2f142be 100644
power-domains = <&scpsys MT2701_POWER_DOMAIN_ETH>; power-domains = <&scpsys MT2701_POWER_DOMAIN_ETH>;
resets = <&ethsys MT2701_ETHSYS_ETH_RST>; resets = <&ethsys MT2701_ETHSYS_ETH_RST>;
reset-names = "eth"; reset-names = "eth";
--
1.7.10.4

View file

@ -11,11 +11,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 ---- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 ----
1 file changed, 4 deletions(-) 1 file changed, 4 deletions(-)
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index 4d8d0a3..293ea59 100644
--- a/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 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -1679,10 +1679,6 @@ static int mtk_probe(struct platform_device *pdev) @@ -1679,10 +1679,6 @@ static int mtk_probe(struct platform_dev
struct mtk_eth *eth; struct mtk_eth *eth;
int err; int err;
@ -26,6 +24,3 @@ index 4d8d0a3..293ea59 100644
match = of_match_device(of_mtk_match, &pdev->dev); match = of_match_device(of_mtk_match, &pdev->dev);
soc = (struct mtk_soc_data *)match->data; soc = (struct mtk_soc_data *)match->data;
--
1.7.10.4

View file

@ -13,11 +13,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 37 +++++++++++++++++++-------- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 37 +++++++++++++++++++--------
1 file changed, 27 insertions(+), 10 deletions(-) 1 file changed, 27 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index 293ea59..04bdb9d 100644
--- a/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 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -684,6 +684,28 @@ static inline int mtk_cal_txd_req(struct sk_buff *skb) @@ -684,6 +684,28 @@ static inline int mtk_cal_txd_req(struct
return nfrags; return nfrags;
} }
@ -46,7 +44,7 @@ index 293ea59..04bdb9d 100644
static int mtk_start_xmit(struct sk_buff *skb, struct net_device *dev) static int mtk_start_xmit(struct sk_buff *skb, struct net_device *dev)
{ {
struct mtk_mac *mac = netdev_priv(dev); struct mtk_mac *mac = netdev_priv(dev);
@@ -695,7 +717,7 @@ static int mtk_start_xmit(struct sk_buff *skb, struct net_device *dev) @@ -695,7 +717,7 @@ static int mtk_start_xmit(struct sk_buff
tx_num = mtk_cal_txd_req(skb); tx_num = mtk_cal_txd_req(skb);
if (unlikely(atomic_read(&ring->free_count) <= tx_num)) { if (unlikely(atomic_read(&ring->free_count) <= tx_num)) {
@ -55,7 +53,7 @@ index 293ea59..04bdb9d 100644
netif_err(eth, tx_queued, dev, netif_err(eth, tx_queued, dev,
"Tx Ring full when queue awake!\n"); "Tx Ring full when queue awake!\n");
return NETDEV_TX_BUSY; return NETDEV_TX_BUSY;
@@ -720,10 +742,10 @@ static int mtk_start_xmit(struct sk_buff *skb, struct net_device *dev) @@ -720,10 +742,10 @@ static int mtk_start_xmit(struct sk_buff
goto drop; goto drop;
if (unlikely(atomic_read(&ring->free_count) <= ring->thresh)) { if (unlikely(atomic_read(&ring->free_count) <= ring->thresh)) {
@ -68,7 +66,7 @@ index 293ea59..04bdb9d 100644
} }
return NETDEV_TX_OK; return NETDEV_TX_OK;
@@ -897,13 +919,8 @@ static int mtk_poll_tx(struct mtk_eth *eth, int budget, bool *tx_again) @@ -897,13 +919,8 @@ static int mtk_poll_tx(struct mtk_eth *e
if (!total) if (!total)
return 0; return 0;
@ -84,6 +82,3 @@ index 293ea59..04bdb9d 100644
return total; return total;
} }
--
1.7.10.4

View file

@ -13,11 +13,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 30 +++++++++++++++++++-------- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 30 +++++++++++++++++++--------
1 file changed, 21 insertions(+), 9 deletions(-) 1 file changed, 21 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index 04bdb9d..26eeb1a 100644
--- a/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 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -1430,19 +1430,31 @@ static int mtk_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) @@ -1430,19 +1430,31 @@ static int mtk_do_ioctl(struct net_devic
static void mtk_pending_work(struct work_struct *work) static void mtk_pending_work(struct work_struct *work)
{ {
@ -58,6 +56,3 @@ index 04bdb9d..26eeb1a 100644
} }
rtnl_unlock(); rtnl_unlock();
} }
--
1.7.10.4

View file

@ -15,11 +15,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 20 ++++++++++---------- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-) 1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index 26eeb1a..67b18f9 100644
--- a/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 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -536,7 +536,6 @@ static int mtk_tx_map(struct sk_buff *skb, struct net_device *dev, @@ -536,7 +536,6 @@ static int mtk_tx_map(struct sk_buff *sk
struct mtk_eth *eth = mac->hw; struct mtk_eth *eth = mac->hw;
struct mtk_tx_dma *itxd, *txd; struct mtk_tx_dma *itxd, *txd;
struct mtk_tx_buf *tx_buf; struct mtk_tx_buf *tx_buf;
@ -27,7 +25,7 @@ index 26eeb1a..67b18f9 100644
dma_addr_t mapped_addr; dma_addr_t mapped_addr;
unsigned int nr_frags; unsigned int nr_frags;
int i, n_desc = 1; int i, n_desc = 1;
@@ -568,11 +567,6 @@ static int mtk_tx_map(struct sk_buff *skb, struct net_device *dev, @@ -568,11 +567,6 @@ static int mtk_tx_map(struct sk_buff *sk
if (unlikely(dma_mapping_error(&dev->dev, mapped_addr))) if (unlikely(dma_mapping_error(&dev->dev, mapped_addr)))
return -ENOMEM; return -ENOMEM;
@ -39,7 +37,7 @@ index 26eeb1a..67b18f9 100644
WRITE_ONCE(itxd->txd1, mapped_addr); WRITE_ONCE(itxd->txd1, mapped_addr);
tx_buf->flags |= MTK_TX_FLAGS_SINGLE0; tx_buf->flags |= MTK_TX_FLAGS_SINGLE0;
dma_unmap_addr_set(tx_buf, dma_addr0, mapped_addr); dma_unmap_addr_set(tx_buf, dma_addr0, mapped_addr);
@@ -632,8 +626,6 @@ static int mtk_tx_map(struct sk_buff *skb, struct net_device *dev, @@ -632,8 +626,6 @@ static int mtk_tx_map(struct sk_buff *sk
WRITE_ONCE(itxd->txd3, (TX_DMA_SWC | TX_DMA_PLEN0(skb_headlen(skb)) | WRITE_ONCE(itxd->txd3, (TX_DMA_SWC | TX_DMA_PLEN0(skb_headlen(skb)) |
(!nr_frags * TX_DMA_LS0))); (!nr_frags * TX_DMA_LS0)));
@ -57,7 +55,7 @@ index 26eeb1a..67b18f9 100644
return -ENOMEM; return -ENOMEM;
} }
@@ -712,14 +702,22 @@ static int mtk_start_xmit(struct sk_buff *skb, struct net_device *dev) @@ -712,14 +702,22 @@ static int mtk_start_xmit(struct sk_buff
struct mtk_eth *eth = mac->hw; struct mtk_eth *eth = mac->hw;
struct mtk_tx_ring *ring = &eth->tx_ring; struct mtk_tx_ring *ring = &eth->tx_ring;
struct net_device_stats *stats = &dev->stats; struct net_device_stats *stats = &dev->stats;
@ -80,7 +78,7 @@ index 26eeb1a..67b18f9 100644
return NETDEV_TX_BUSY; return NETDEV_TX_BUSY;
} }
@@ -747,10 +745,12 @@ static int mtk_start_xmit(struct sk_buff *skb, struct net_device *dev) @@ -747,10 +745,12 @@ static int mtk_start_xmit(struct sk_buff
ring->thresh)) ring->thresh))
mtk_wake_queue(eth); mtk_wake_queue(eth);
} }
@ -93,6 +91,3 @@ index 26eeb1a..67b18f9 100644
stats->tx_dropped++; stats->tx_dropped++;
dev_kfree_skb(skb); dev_kfree_skb(skb);
return NETDEV_TX_OK; return NETDEV_TX_OK;
--
1.7.10.4

View file

@ -13,11 +13,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
drivers/net/ethernet/mediatek/mtk_eth_soc.h | 4 ++-- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 4 ++--
2 files changed, 6 insertions(+), 8 deletions(-) 2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index 67b18f9..bbcd607 100644
--- a/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 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -1193,7 +1193,7 @@ static void mtk_tx_timeout(struct net_device *dev) @@ -1193,7 +1193,7 @@ static void mtk_tx_timeout(struct net_de
eth->netdev[mac->id]->stats.tx_errors++; eth->netdev[mac->id]->stats.tx_errors++;
netif_err(eth, tx_err, dev, netif_err(eth, tx_err, dev,
"transmit timed out\n"); "transmit timed out\n");
@ -26,7 +24,7 @@ index 67b18f9..bbcd607 100644
} }
static irqreturn_t mtk_handle_irq(int irq, void *_eth) static irqreturn_t mtk_handle_irq(int irq, void *_eth)
@@ -1438,7 +1438,7 @@ static void mtk_pending_work(struct work_struct *work) @@ -1438,7 +1438,7 @@ static void mtk_pending_work(struct work
/* stop all devices to make sure that dma is properly shut down */ /* stop all devices to make sure that dma is properly shut down */
for (i = 0; i < MTK_MAC_COUNT; i++) { for (i = 0; i < MTK_MAC_COUNT; i++) {
@ -35,7 +33,7 @@ index 67b18f9..bbcd607 100644
continue; continue;
mtk_stop(eth->netdev[i]); mtk_stop(eth->netdev[i]);
__set_bit(i, &restart); __set_bit(i, &restart);
@@ -1464,15 +1464,13 @@ static int mtk_cleanup(struct mtk_eth *eth) @@ -1464,15 +1464,13 @@ static int mtk_cleanup(struct mtk_eth *e
int i; int i;
for (i = 0; i < MTK_MAC_COUNT; i++) { for (i = 0; i < MTK_MAC_COUNT; i++) {
@ -52,7 +50,7 @@ index 67b18f9..bbcd607 100644
return 0; return 0;
} }
@@ -1660,7 +1658,6 @@ static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) @@ -1660,7 +1658,6 @@ static int mtk_add_mac(struct mtk_eth *e
mac->id = id; mac->id = id;
mac->hw = eth; mac->hw = eth;
mac->of_node = np; mac->of_node = np;
@ -60,7 +58,7 @@ index 67b18f9..bbcd607 100644
mac->hw_stats = devm_kzalloc(eth->dev, mac->hw_stats = devm_kzalloc(eth->dev,
sizeof(*mac->hw_stats), sizeof(*mac->hw_stats),
@@ -1762,6 +1759,7 @@ static int mtk_probe(struct platform_device *pdev) @@ -1762,6 +1759,7 @@ static int mtk_probe(struct platform_dev
eth->dev = &pdev->dev; eth->dev = &pdev->dev;
eth->msg_enable = netif_msg_init(mtk_msg_level, MTK_DEFAULT_MSG_ENABLE); eth->msg_enable = netif_msg_init(mtk_msg_level, MTK_DEFAULT_MSG_ENABLE);
@ -68,8 +66,6 @@ index 67b18f9..bbcd607 100644
err = mtk_hw_init(eth); err = mtk_hw_init(eth);
if (err) if (err)
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.h b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
index 48a5292..eed626d 100644
--- a/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 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
@@ -363,6 +363,7 @@ struct mtk_rx_ring { @@ -363,6 +363,7 @@ struct mtk_rx_ring {
@ -104,6 +100,3 @@ index 48a5292..eed626d 100644
}; };
/* the struct describing the SoC. these are declared in the soc_xyz.c files */ /* the struct describing the SoC. these are declared in the soc_xyz.c files */
--
1.7.10.4

View file

@ -9,7 +9,7 @@
/* Info for the block device */ /* Info for the block device */
struct block2mtd_dev { struct block2mtd_dev {
struct list_head list; struct list_head list;
@@ -227,6 +229,7 @@ @@ -227,6 +229,7 @@ static struct block2mtd_dev *add_device(
#endif #endif
const fmode_t mode = FMODE_READ | FMODE_WRITE | FMODE_EXCL; const fmode_t mode = FMODE_READ | FMODE_WRITE | FMODE_EXCL;
struct block_device *bdev = ERR_PTR(-ENODEV); struct block_device *bdev = ERR_PTR(-ENODEV);
@ -17,7 +17,7 @@
struct block2mtd_dev *dev; struct block2mtd_dev *dev;
struct mtd_partition *part; struct mtd_partition *part;
char *name; char *name;
@@ -307,11 +310,7 @@ @@ -307,11 +310,7 @@ static struct block2mtd_dev *add_device(
dev->mtd.priv = dev; dev->mtd.priv = dev;
dev->mtd.owner = THIS_MODULE; dev->mtd.owner = THIS_MODULE;

View file

@ -1,6 +1,6 @@
--- a/drivers/mtd/spi-nor/spi-nor.c --- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -1011,6 +1011,66 @@ write_err: @@ -1008,6 +1008,66 @@ write_err:
return ret; return ret;
} }
@ -67,7 +67,7 @@
static int macronix_quad_enable(struct spi_nor *nor) static int macronix_quad_enable(struct spi_nor *nor)
{ {
int ret, val; int ret, val;
@@ -1232,10 +1292,12 @@ int spi_nor_scan(struct spi_nor *nor, co @@ -1229,10 +1289,12 @@ int spi_nor_scan(struct spi_nor *nor, co
} }
/* sst nor chips use AAI word program */ /* sst nor chips use AAI word program */
@ -82,7 +82,7 @@
if (info->flags & USE_FSR) if (info->flags & USE_FSR)
nor->flags |= SNOR_F_USE_FSR; nor->flags |= SNOR_F_USE_FSR;
@@ -1263,11 +1325,20 @@ int spi_nor_scan(struct spi_nor *nor, co @@ -1260,11 +1322,20 @@ int spi_nor_scan(struct spi_nor *nor, co
mtd->writebufsize = nor->page_size; mtd->writebufsize = nor->page_size;
if (np) { if (np) {