From 63f37ddf5c221c5a86ea9e45625bd0381feabc13 Mon Sep 17 00:00:00 2001 From: Jon Mason Date: Wed, 26 Aug 2015 18:35:30 -0400 Subject: MAINTAINERS: add entry for the Broadcom Northstar Plus SoCs Modify the iProc MAINTAINER to cover the Nortstar Plus SoCs, and add me to the list of people responsible for it. Since iProc is a family of SoCs that includes more than just Cygnus (i.e., Northstar (BCM5301X), Northstar Plus, Northstar 2, and a number of other platforms), remove it from the title to avoid any future confusion. Signed-off-by: Jon Mason Acked-by: Scott Branden Signed-off-by: Florian Fainelli diff --git a/MAINTAINERS b/MAINTAINERS index 7ba7ab7..84e306b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2354,19 +2354,27 @@ L: linux-scsi@vger.kernel.org S: Supported F: drivers/scsi/bnx2i/ -BROADCOM CYGNUS/IPROC ARM ARCHITECTURE +BROADCOM IPROC ARM ARCHITECTURE M: Ray Jui M: Scott Branden +M: Jon Mason L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: bcm-kernel-feedback-list@broadcom.com T: git git://github.com/broadcom/cygnus-linux.git S: Maintained N: iproc N: cygnus +N: nsp N: bcm9113* N: bcm9583* -N: bcm583* +N: bcm9585* +N: bcm9586* +N: bcm988312 N: bcm113* +N: bcm583* +N: bcm585* +N: bcm586* +N: bcm88312 BROADCOM BRCMSTB GPIO DRIVER M: Gregory Fong -- cgit v0.10.2 From d1a31e975738c215f450f3d7c15d5fb96942a866 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Thu, 1 Oct 2015 16:13:05 +0300 Subject: ARM: davinci: re-use %*ph specifier %*ph specifier allows to dump data in hex format using the pointer to a buffer. This is suitable to use here. Signed-off-by: Andy Shevchenko Signed-off-by: Sekhar Nori diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index 1a0898c..bbdd2d6 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c @@ -546,9 +546,7 @@ static int dm6444evm_msp430_get_pins(void) if (status < 0) return status; - dev_dbg(&dm6446evm_msp->dev, - "PINS: %02x %02x %02x %02x\n", - buf[0], buf[1], buf[2], buf[3]); + dev_dbg(&dm6446evm_msp->dev, "PINS: %4ph\n", buf); return (buf[3] << 8) | buf[2]; } -- cgit v0.10.2 From f6c1a8a6ce19d30c235ef0fa285d5110aafaefe2 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Mon, 14 Sep 2015 12:29:39 +0300 Subject: ARM: davinci: clock: Correct return values for API functions Fix the values returned by the publicly used functions. These function should return 0 when they are called with clk == NULL in similar manner as the clock API does to avoid different behavior in drivers used by daVinci and other architectures. Signed-off-by: Peter Ujfalusi Signed-off-by: Sekhar Nori diff --git a/arch/arm/mach-davinci/clock.c b/arch/arm/mach-davinci/clock.c index c70bb0a..3caff96 100644 --- a/arch/arm/mach-davinci/clock.c +++ b/arch/arm/mach-davinci/clock.c @@ -97,7 +97,9 @@ int clk_enable(struct clk *clk) { unsigned long flags; - if (clk == NULL || IS_ERR(clk)) + if (!clk) + return 0; + else if (IS_ERR(clk)) return -EINVAL; spin_lock_irqsave(&clockfw_lock, flags); @@ -124,7 +126,7 @@ EXPORT_SYMBOL(clk_disable); unsigned long clk_get_rate(struct clk *clk) { if (clk == NULL || IS_ERR(clk)) - return -EINVAL; + return 0; return clk->rate; } @@ -159,8 +161,10 @@ int clk_set_rate(struct clk *clk, unsigned long rate) unsigned long flags; int ret = -EINVAL; - if (clk == NULL || IS_ERR(clk)) - return ret; + if (!clk) + return 0; + else if (IS_ERR(clk)) + return -EINVAL; if (clk->set_rate) ret = clk->set_rate(clk, rate); @@ -181,7 +185,9 @@ int clk_set_parent(struct clk *clk, struct clk *parent) { unsigned long flags; - if (clk == NULL || IS_ERR(clk)) + if (!clk) + return 0; + else if (IS_ERR(clk)) return -EINVAL; /* Cannot change parent on enabled clock */ -- cgit v0.10.2 From 498a92d42596a7a32c042319eb62a4c3d8081cf1 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Wed, 7 Oct 2015 22:05:49 +0200 Subject: ARM: cns3xxx: pci: avoid potential stack overflow The cns3xxx_pcie_hw_init function uses excessive kernel stack space because of a hack that puts a fake struct pci_sys_data and struct pci_bus on the stack in order to call the generic pci_bus_read_config accessors, which causes a warning in ARM allmodconfig builds: arch/arm/mach-cns3xxx/pcie.c:266:1: warning: the frame size of 1080 bytes is larger than 1024 bytes I've spent a few hours trying to find out what exactly this code is wants to achieve here. The obvious part is setting up the host_regs using config space accessors, and this can simply be changed to use direct MMIO accesses, as I do in this patch. The second part is how the driver sets up the Max_Read_Request_Size value for the first device/function on bus 1, i.e. the device plugged directly into the PCIe root port. For all I can tell, this is in fact incomplete, as it does not perform the same setting on devices attached to a PCIe switch, or multi-function devices. The solution for this part fortunately is even easier: if we just set the global pcie_bus_config variable to PCIE_BUS_PEER2PEER, all PCIe devices in the system are limited to 128 byte MPS, which in turn limits the MRRS to 128 bytes for all devices, and we no longer even need to touch any devices. With those two changes in place, we no longer need the fake pci_sys_data/pci_bus structures for faking config space writes, and the stack usage goes down as well. Signed-off-by: Arnd Bergmann Acked-by: Krzysztof Halasa diff --git a/arch/arm/mach-cns3xxx/pcie.c b/arch/arm/mach-cns3xxx/pcie.c index c622c30..47905a5 100644 --- a/arch/arm/mach-cns3xxx/pcie.c +++ b/arch/arm/mach-cns3xxx/pcie.c @@ -65,8 +65,9 @@ static void __iomem *cns3xxx_pci_map_bus(struct pci_bus *bus, /* * The CNS PCI bridge doesn't fit into the PCI hierarchy, though - * we still want to access it. For this to work, we must place - * the first device on the same bus as the CNS PCI bridge. + * we still want to access it. + * We place the host bridge on bus 0, and the directly connected + * device on bus 1, slot 0. */ if (busno == 0) { /* internal PCIe bus, host bridge device */ if (devfn == 0) /* device# and function# are ignored by hw */ @@ -211,58 +212,46 @@ static void __init cns3xxx_pcie_check_link(struct cns3xxx_pcie *cnspci) } } +static void cns3xxx_write_config(struct cns3xxx_pcie *cnspci, + int where, int size, u32 val) +{ + void __iomem *base = cnspci->host_regs + (where & 0xffc); + u32 v; + u32 mask = (0x1ull << (size * 8)) - 1; + int shift = (where % 4) * 8; + + v = readl_relaxed(base + (where & 0xffc)); + + v &= ~(mask << shift); + v |= (val & mask) << shift; + + writel_relaxed(v, base + (where & 0xffc)); + readl_relaxed(base + (where & 0xffc)); +} + static void __init cns3xxx_pcie_hw_init(struct cns3xxx_pcie *cnspci) { - int port = cnspci->port; - struct pci_sys_data sd = { - .private_data = cnspci, - }; - struct pci_bus bus = { - .number = 0, - .ops = &cns3xxx_pcie_ops, - .sysdata = &sd, - }; u16 mem_base = cnspci->res_mem.start >> 16; u16 mem_limit = cnspci->res_mem.end >> 16; u16 io_base = cnspci->res_io.start >> 16; u16 io_limit = cnspci->res_io.end >> 16; - u32 devfn = 0; - u8 tmp8; - u16 pos; - u16 dc; - - pci_bus_write_config_byte(&bus, devfn, PCI_PRIMARY_BUS, 0); - pci_bus_write_config_byte(&bus, devfn, PCI_SECONDARY_BUS, 1); - pci_bus_write_config_byte(&bus, devfn, PCI_SUBORDINATE_BUS, 1); - pci_bus_read_config_byte(&bus, devfn, PCI_PRIMARY_BUS, &tmp8); - pci_bus_read_config_byte(&bus, devfn, PCI_SECONDARY_BUS, &tmp8); - pci_bus_read_config_byte(&bus, devfn, PCI_SUBORDINATE_BUS, &tmp8); - - pci_bus_write_config_word(&bus, devfn, PCI_MEMORY_BASE, mem_base); - pci_bus_write_config_word(&bus, devfn, PCI_MEMORY_LIMIT, mem_limit); - pci_bus_write_config_word(&bus, devfn, PCI_IO_BASE_UPPER16, io_base); - pci_bus_write_config_word(&bus, devfn, PCI_IO_LIMIT_UPPER16, io_limit); + cns3xxx_write_config(cnspci, PCI_PRIMARY_BUS, 1, 0); + cns3xxx_write_config(cnspci, PCI_SECONDARY_BUS, 1, 1); + cns3xxx_write_config(cnspci, PCI_SUBORDINATE_BUS, 1, 1); + cns3xxx_write_config(cnspci, PCI_MEMORY_BASE, 2, mem_base); + cns3xxx_write_config(cnspci, PCI_MEMORY_LIMIT, 2, mem_limit); + cns3xxx_write_config(cnspci, PCI_IO_BASE_UPPER16, 2, io_base); + cns3xxx_write_config(cnspci, PCI_IO_LIMIT_UPPER16, 2, io_limit); if (!cnspci->linked) return; /* Set Device Max_Read_Request_Size to 128 byte */ - bus.number = 1; /* directly connected PCIe device */ - devfn = PCI_DEVFN(0, 0); - pos = pci_bus_find_capability(&bus, devfn, PCI_CAP_ID_EXP); - pci_bus_read_config_word(&bus, devfn, pos + PCI_EXP_DEVCTL, &dc); - if (dc & PCI_EXP_DEVCTL_READRQ) { - dc &= ~PCI_EXP_DEVCTL_READRQ; - pci_bus_write_config_word(&bus, devfn, pos + PCI_EXP_DEVCTL, dc); - pci_bus_read_config_word(&bus, devfn, pos + PCI_EXP_DEVCTL, &dc); - if (dc & PCI_EXP_DEVCTL_READRQ) - pr_warn("PCIe: Unable to set device Max_Read_Request_Size\n"); - else - pr_info("PCIe: Max_Read_Request_Size set to 128 bytes\n"); - } + pcie_bus_config = PCIE_BUS_PEER2PEER; + /* Disable PCIe0 Interrupt Mask INTA to INTD */ - __raw_writel(~0x3FFF, MISC_PCIE_INT_MASK(port)); + __raw_writel(~0x3FFF, MISC_PCIE_INT_MASK(cnspci->port)); } static int cns3xxx_pcie_abort_handler(unsigned long addr, unsigned int fsr, -- cgit v0.10.2 From 72affdecdd4901a8a1b71b2120731498e46347a4 Mon Sep 17 00:00:00 2001 From: Murali Karicheri Date: Thu, 17 Sep 2015 09:02:14 -0700 Subject: soc: ti: reset irq affinity before freeing irq When using accumulator queue for rx side for network driver, following warning is seen when doing a reboot command from Linux console. This is because, affinity value is not reset before calling free_irq(). This patch fixes this. Deconfiguring network interfaces... ------------[ cut here ]----------- WARNING: CPU: 0 PID: 2081 at kernel/irq/manage.c:1370 __free_irq+0x208/0x214 Modules linked in: CPU: 0 PID: 2081 Comm: ifconfig Not tainted 4.1.5-00908-g1049e206-dirty #1 Hardware name: Keystone Backtrace: [] (dump_backtrace) from [] (show_stack+0x18/0x1c) r7:c005d0a8 r6:c06e2184 r5:c06e2184 r4:00000000 [] (show_stack) from [] (dump_stack+0x8c/0xcc) [] (dump_stack) from [] (warn_slowpath_common+0x88/0xb8) r7:c005d0a8 r6:0000055a r5:00000009 r4:0000000 [] (warn_slowpath_common) from [] (warn_slowpath_null+0x 24/0x2c) r8:0000006c r7:ee513f60 r6:ee513f00 r5:ee611010 r4:cc873a00 (warn_slowpath_null) from [] (__free_irq+0x208/0x214) [] (__free_irq) from [] (free_irq+0x54/0xac) r10:00000002 r9:00000000 r8:00000000 r7:ee611010 r6:0000006c r5:00000000 r4:ee513f00 r3:00000000 [] (free_irq) from [] (knav_range_setup_acc_irq+0xb0/0x1 28) r7:00000001 r6:0000006c r5:ee611010 r4:00000001 [] (knav_range_setup_acc_irq) from [] (knav_acc_close_qu eue+0x20/0x24) r8:edd1a4c8 r7:00001000 r6:eed89980 r5:ee616650 r4:edf9d990 [] (knav_acc_close_queue) from [] (knav_queue_close+0xb4 /0xb8) [] (knav_queue_close) from [] (netcp_free_navigator_reso urces+0x1d4/0x2c0) r5:edd1a480 r4:00000400 [] (netcp_free_navigator_resources) from [] (netcp_ndo_stop+0x220/0x230) r10:00008914 r9:edf34400 r8:00000000 r7:edd1a5d8 r6:edd1a480 r5:00000400 r4:edd1a000 [] (netcp_ndo_stop) from [ (__dev_close_many+0x90/0xd8) r7:00001003 r6:00001042 r5:edb0de20 r4:edd1a000 [] (__dev_close_many) from [] (__dev_close+0x30/0x48) r5:00000001 r4:edd1a000 [] (__dev_close) from [] (__dev_change_flags+0x9c/0x14c) [] (__dev_change_flags) from [] (dev_change_flags+0x20/0 r9:edf34400 r8:00000000 r7:00000000 r6:00001003 r5:edd1a138 r4:edd1a000 [] (dev_change_flags) from [] (devinet_ioctl+0x680/0x754 r9:edf34400 r8:bef6af3c r7:00000000 r6:bef6ac64 r5:edf3440c r4:00000000 [] (devinet_ioctl) from [] (inet_ioctl+0x1a8/0x1d0) r10:00000000 r9:edb0c000 r8:bef6ac64 r7:00000003 r6:bef6ac64 r5:bef6ac64 r4:00008914 [] (inet_ioctl) from [] (sock_ioctl+0x1d0/0x2a8) [] (sock_ioctl) from [] (do_vfs_ioctl+0x414/0x604) r7:00000003 r6:ed8b60c0 r5:bef6ac64 r4:ccc88f20 [] (do_vfs_ioctl) from [] (SyS_ioctl+0x3c/0x64) r9:edb0c000 r8:bef6ac64 r7:00008914 r6:ed8b60c0 r5:00000003 r4:ed8b60c0 [] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x3c) r9:edb0c000 r8:c000f924 r7:00000036 r6:0007e77c r5:bef6ac64 r4:0007e7d0 ---[ end trace f565594c905af0b4 ]--- Signed-off-by: Murali Karicheri Signed-off-by: Santosh Shilimkar Signed-off-by: Arnd Bergmann diff --git a/drivers/soc/ti/knav_qmss_acc.c b/drivers/soc/ti/knav_qmss_acc.c index ef6f69d..b98fe56 100644 --- a/drivers/soc/ti/knav_qmss_acc.c +++ b/drivers/soc/ti/knav_qmss_acc.c @@ -261,6 +261,10 @@ static int knav_range_setup_acc_irq(struct knav_range_info *range, if (old && !new) { dev_dbg(kdev->dev, "setup-acc-irq: freeing %s for channel %s\n", acc->name, acc->name); + ret = irq_set_affinity_hint(irq, NULL); + if (ret) + dev_warn(range->kdev->dev, + "Failed to set IRQ affinity\n"); free_irq(irq, range); } -- cgit v0.10.2 From 19c1c32c66514fabeffa029507cdd808b3ee854c Mon Sep 17 00:00:00 2001 From: Joachim Eastwood Date: Sun, 11 Oct 2015 22:40:42 +0200 Subject: MAINTAINERS: update lpc18xx entry with more drivers Add explicit entries for drivers used by the lpc18xx that is not caught by the "lpc18xx" regex pattern. Signed-off-by: Joachim Eastwood Signed-off-by: Arnd Bergmann diff --git a/MAINTAINERS b/MAINTAINERS index b5292ac..0d9d6b1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1230,6 +1230,13 @@ ARM/LPC18XX ARCHITECTURE M: Joachim Eastwood L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) S: Maintained +F: arch/arm/boot/dts/lpc43* +F: drivers/clk/nxp/clk-lpc18xx* +F: drivers/clocksource/time-lpc32xx.c +F: drivers/i2c/busses/i2c-lpc2k.c +F: drivers/memory/pl172.c +F: drivers/mtd/spi-nor/nxp-spifi.c +F: drivers/rtc/rtc-lpc24xx.c N: lpc18xx ARM/MAGICIAN MACHINE SUPPORT -- cgit v0.10.2