aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-11-10 17:45:05 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-11-10 17:45:05 -0500
commit64fd8c8a0ff421b47a879fbff5b82563b7fb82f5 (patch)
tree03e7230a36e641ad495cc4f6ceef6a5e848de4c0
parentb0aeba741b2d082e4f0773881af4906ce2bb8231 (diff)
parent19c1c32c66514fabeffa029507cdd808b3ee854c (diff)
Merge tag 'armsoc-fixes-nc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC non-urgent fixes from Olof Johansson: "A handful of fixes that came in and didn't seem warranted to go in through the 4.3-rc cycle. - MAINTAINERS updates for one of the Broadcom platforms and lpc18xx - A couple of non-critical Davinci bugfixes - A fix to reset irq affinity for TI platforms (silences a warning at reboot)" * tag 'armsoc-fixes-nc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: MAINTAINERS: update lpc18xx entry with more drivers soc: ti: reset irq affinity before freeing irq ARM: cns3xxx: pci: avoid potential stack overflow ARM: davinci: clock: Correct return values for API functions ARM: davinci: re-use %*ph specifier MAINTAINERS: add entry for the Broadcom Northstar Plus SoCs
-rw-r--r--MAINTAINERS19
-rw-r--r--arch/arm/mach-cns3xxx/pcie.c71
-rw-r--r--arch/arm/mach-davinci/board-dm644x-evm.c4
-rw-r--r--arch/arm/mach-davinci/clock.c16
-rw-r--r--drivers/soc/ti/knav_qmss_acc.c4
5 files changed, 63 insertions, 51 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 8f10834124a9..bc93927db022 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1233,6 +1233,13 @@ ARM/LPC18XX ARCHITECTURE
1233M: Joachim Eastwood <manabian@gmail.com> 1233M: Joachim Eastwood <manabian@gmail.com>
1234L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 1234L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
1235S: Maintained 1235S: Maintained
1236F: arch/arm/boot/dts/lpc43*
1237F: drivers/clk/nxp/clk-lpc18xx*
1238F: drivers/clocksource/time-lpc32xx.c
1239F: drivers/i2c/busses/i2c-lpc2k.c
1240F: drivers/memory/pl172.c
1241F: drivers/mtd/spi-nor/nxp-spifi.c
1242F: drivers/rtc/rtc-lpc24xx.c
1236N: lpc18xx 1243N: lpc18xx
1237 1244
1238ARM/MAGICIAN MACHINE SUPPORT 1245ARM/MAGICIAN MACHINE SUPPORT
@@ -2388,19 +2395,27 @@ L: linux-scsi@vger.kernel.org
2388S: Supported 2395S: Supported
2389F: drivers/scsi/bnx2i/ 2396F: drivers/scsi/bnx2i/
2390 2397
2391BROADCOM CYGNUS/IPROC ARM ARCHITECTURE 2398BROADCOM IPROC ARM ARCHITECTURE
2392M: Ray Jui <rjui@broadcom.com> 2399M: Ray Jui <rjui@broadcom.com>
2393M: Scott Branden <sbranden@broadcom.com> 2400M: Scott Branden <sbranden@broadcom.com>
2401M: Jon Mason <jonmason@broadcom.com>
2394L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 2402L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
2395L: bcm-kernel-feedback-list@broadcom.com 2403L: bcm-kernel-feedback-list@broadcom.com
2396T: git git://github.com/broadcom/cygnus-linux.git 2404T: git git://github.com/broadcom/cygnus-linux.git
2397S: Maintained 2405S: Maintained
2398N: iproc 2406N: iproc
2399N: cygnus 2407N: cygnus
2408N: nsp
2400N: bcm9113* 2409N: bcm9113*
2401N: bcm9583* 2410N: bcm9583*
2402N: bcm583* 2411N: bcm9585*
2412N: bcm9586*
2413N: bcm988312
2403N: bcm113* 2414N: bcm113*
2415N: bcm583*
2416N: bcm585*
2417N: bcm586*
2418N: bcm88312
2404 2419
2405BROADCOM BRCMSTB GPIO DRIVER 2420BROADCOM BRCMSTB GPIO DRIVER
2406M: Gregory Fong <gregory.0xf0@gmail.com> 2421M: Gregory Fong <gregory.0xf0@gmail.com>
diff --git a/arch/arm/mach-cns3xxx/pcie.c b/arch/arm/mach-cns3xxx/pcie.c
index c622c306c390..47905a50e075 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,
65 65
66 /* 66 /*
67 * The CNS PCI bridge doesn't fit into the PCI hierarchy, though 67 * The CNS PCI bridge doesn't fit into the PCI hierarchy, though
68 * we still want to access it. For this to work, we must place 68 * we still want to access it.
69 * the first device on the same bus as the CNS PCI bridge. 69 * We place the host bridge on bus 0, and the directly connected
70 * device on bus 1, slot 0.
70 */ 71 */
71 if (busno == 0) { /* internal PCIe bus, host bridge device */ 72 if (busno == 0) { /* internal PCIe bus, host bridge device */
72 if (devfn == 0) /* device# and function# are ignored by hw */ 73 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)
211 } 212 }
212} 213}
213 214
215static void cns3xxx_write_config(struct cns3xxx_pcie *cnspci,
216 int where, int size, u32 val)
217{
218 void __iomem *base = cnspci->host_regs + (where & 0xffc);
219 u32 v;
220 u32 mask = (0x1ull << (size * 8)) - 1;
221 int shift = (where % 4) * 8;
222
223 v = readl_relaxed(base + (where & 0xffc));
224
225 v &= ~(mask << shift);
226 v |= (val & mask) << shift;
227
228 writel_relaxed(v, base + (where & 0xffc));
229 readl_relaxed(base + (where & 0xffc));
230}
231
214static void __init cns3xxx_pcie_hw_init(struct cns3xxx_pcie *cnspci) 232static void __init cns3xxx_pcie_hw_init(struct cns3xxx_pcie *cnspci)
215{ 233{
216 int port = cnspci->port;
217 struct pci_sys_data sd = {
218 .private_data = cnspci,
219 };
220 struct pci_bus bus = {
221 .number = 0,
222 .ops = &cns3xxx_pcie_ops,
223 .sysdata = &sd,
224 };
225 u16 mem_base = cnspci->res_mem.start >> 16; 234 u16 mem_base = cnspci->res_mem.start >> 16;
226 u16 mem_limit = cnspci->res_mem.end >> 16; 235 u16 mem_limit = cnspci->res_mem.end >> 16;
227 u16 io_base = cnspci->res_io.start >> 16; 236 u16 io_base = cnspci->res_io.start >> 16;
228 u16 io_limit = cnspci->res_io.end >> 16; 237 u16 io_limit = cnspci->res_io.end >> 16;
229 u32 devfn = 0;
230 u8 tmp8;
231 u16 pos;
232 u16 dc;
233
234 pci_bus_write_config_byte(&bus, devfn, PCI_PRIMARY_BUS, 0);
235 pci_bus_write_config_byte(&bus, devfn, PCI_SECONDARY_BUS, 1);
236 pci_bus_write_config_byte(&bus, devfn, PCI_SUBORDINATE_BUS, 1);
237 238
238 pci_bus_read_config_byte(&bus, devfn, PCI_PRIMARY_BUS, &tmp8); 239 cns3xxx_write_config(cnspci, PCI_PRIMARY_BUS, 1, 0);
239 pci_bus_read_config_byte(&bus, devfn, PCI_SECONDARY_BUS, &tmp8); 240 cns3xxx_write_config(cnspci, PCI_SECONDARY_BUS, 1, 1);
240 pci_bus_read_config_byte(&bus, devfn, PCI_SUBORDINATE_BUS, &tmp8); 241 cns3xxx_write_config(cnspci, PCI_SUBORDINATE_BUS, 1, 1);
241 242 cns3xxx_write_config(cnspci, PCI_MEMORY_BASE, 2, mem_base);
242 pci_bus_write_config_word(&bus, devfn, PCI_MEMORY_BASE, mem_base); 243 cns3xxx_write_config(cnspci, PCI_MEMORY_LIMIT, 2, mem_limit);
243 pci_bus_write_config_word(&bus, devfn, PCI_MEMORY_LIMIT, mem_limit); 244 cns3xxx_write_config(cnspci, PCI_IO_BASE_UPPER16, 2, io_base);
244 pci_bus_write_config_word(&bus, devfn, PCI_IO_BASE_UPPER16, io_base); 245 cns3xxx_write_config(cnspci, PCI_IO_LIMIT_UPPER16, 2, io_limit);
245 pci_bus_write_config_word(&bus, devfn, PCI_IO_LIMIT_UPPER16, io_limit);
246 246
247 if (!cnspci->linked) 247 if (!cnspci->linked)
248 return; 248 return;
249 249
250 /* Set Device Max_Read_Request_Size to 128 byte */ 250 /* Set Device Max_Read_Request_Size to 128 byte */
251 bus.number = 1; /* directly connected PCIe device */ 251 pcie_bus_config = PCIE_BUS_PEER2PEER;
252 devfn = PCI_DEVFN(0, 0); 252
253 pos = pci_bus_find_capability(&bus, devfn, PCI_CAP_ID_EXP);
254 pci_bus_read_config_word(&bus, devfn, pos + PCI_EXP_DEVCTL, &dc);
255 if (dc & PCI_EXP_DEVCTL_READRQ) {
256 dc &= ~PCI_EXP_DEVCTL_READRQ;
257 pci_bus_write_config_word(&bus, devfn, pos + PCI_EXP_DEVCTL, dc);
258 pci_bus_read_config_word(&bus, devfn, pos + PCI_EXP_DEVCTL, &dc);
259 if (dc & PCI_EXP_DEVCTL_READRQ)
260 pr_warn("PCIe: Unable to set device Max_Read_Request_Size\n");
261 else
262 pr_info("PCIe: Max_Read_Request_Size set to 128 bytes\n");
263 }
264 /* Disable PCIe0 Interrupt Mask INTA to INTD */ 253 /* Disable PCIe0 Interrupt Mask INTA to INTD */
265 __raw_writel(~0x3FFF, MISC_PCIE_INT_MASK(port)); 254 __raw_writel(~0x3FFF, MISC_PCIE_INT_MASK(cnspci->port));
266} 255}
267 256
268static int cns3xxx_pcie_abort_handler(unsigned long addr, unsigned int fsr, 257static int cns3xxx_pcie_abort_handler(unsigned long addr, unsigned int fsr,
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
index 1a0898c1c17e..bbdd2d614b49 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)
546 if (status < 0) 546 if (status < 0)
547 return status; 547 return status;
548 548
549 dev_dbg(&dm6446evm_msp->dev, 549 dev_dbg(&dm6446evm_msp->dev, "PINS: %4ph\n", buf);
550 "PINS: %02x %02x %02x %02x\n",
551 buf[0], buf[1], buf[2], buf[3]);
552 550
553 return (buf[3] << 8) | buf[2]; 551 return (buf[3] << 8) | buf[2];
554} 552}
diff --git a/arch/arm/mach-davinci/clock.c b/arch/arm/mach-davinci/clock.c
index c70bb0a4dfb4..3caff9637a82 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)
97{ 97{
98 unsigned long flags; 98 unsigned long flags;
99 99
100 if (clk == NULL || IS_ERR(clk)) 100 if (!clk)
101 return 0;
102 else if (IS_ERR(clk))
101 return -EINVAL; 103 return -EINVAL;
102 104
103 spin_lock_irqsave(&clockfw_lock, flags); 105 spin_lock_irqsave(&clockfw_lock, flags);
@@ -124,7 +126,7 @@ EXPORT_SYMBOL(clk_disable);
124unsigned long clk_get_rate(struct clk *clk) 126unsigned long clk_get_rate(struct clk *clk)
125{ 127{
126 if (clk == NULL || IS_ERR(clk)) 128 if (clk == NULL || IS_ERR(clk))
127 return -EINVAL; 129 return 0;
128 130
129 return clk->rate; 131 return clk->rate;
130} 132}
@@ -159,8 +161,10 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
159 unsigned long flags; 161 unsigned long flags;
160 int ret = -EINVAL; 162 int ret = -EINVAL;
161 163
162 if (clk == NULL || IS_ERR(clk)) 164 if (!clk)
163 return ret; 165 return 0;
166 else if (IS_ERR(clk))
167 return -EINVAL;
164 168
165 if (clk->set_rate) 169 if (clk->set_rate)
166 ret = clk->set_rate(clk, rate); 170 ret = clk->set_rate(clk, rate);
@@ -181,7 +185,9 @@ int clk_set_parent(struct clk *clk, struct clk *parent)
181{ 185{
182 unsigned long flags; 186 unsigned long flags;
183 187
184 if (clk == NULL || IS_ERR(clk)) 188 if (!clk)
189 return 0;
190 else if (IS_ERR(clk))
185 return -EINVAL; 191 return -EINVAL;
186 192
187 /* Cannot change parent on enabled clock */ 193 /* Cannot change parent on enabled clock */
diff --git a/drivers/soc/ti/knav_qmss_acc.c b/drivers/soc/ti/knav_qmss_acc.c
index ef6f69db0bd0..b98fe56598dd 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,
261 if (old && !new) { 261 if (old && !new) {
262 dev_dbg(kdev->dev, "setup-acc-irq: freeing %s for channel %s\n", 262 dev_dbg(kdev->dev, "setup-acc-irq: freeing %s for channel %s\n",
263 acc->name, acc->name); 263 acc->name, acc->name);
264 ret = irq_set_affinity_hint(irq, NULL);
265 if (ret)
266 dev_warn(range->kdev->dev,
267 "Failed to set IRQ affinity\n");
264 free_irq(irq, range); 268 free_irq(irq, range);
265 } 269 }
266 270