Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'arm-soc/for-4.2/soc-part2' of http://github.com/broadcom/stblinux into next/soc

Merge "changes for Broadcom SoCs":

- Dan fixes an error path in the BCM63xx SMP code

- Ray adds the relevant Kconfig selects to enable the Broadcom NAND driver on Cygnus

- Kevin provides a change to the Broadcom GISB arbiter driver to make it work with
MIPS-based big-endian STB SoCs (this was a long-standing change that had dependencies on
code in drivers/of/*)

- Gregory enables the use of GPIOLIB for brcmstb SoCs and bumps the number of GPIOs for
these platforms

* tag 'arm-soc/for-4.2/soc-part2' of http://github.com/broadcom/stblinux:
ARM: brcmstb: Add default gpio number
ARM: brcmstb: Select ARCH_WANT_OPTIONAL_GPIOLIB
bus: brcmstb_gisb: Honor the "big-endian" and "native-endian" DT properties
ARM: BCM: Enable NAND support for iProc SoCs
ARM: BCM63xx: fix an error path in bcm63xx_pmb_power_on_cpu()

+16 -4
+2 -1
arch/arm/Kconfig
··· 1509 1509 # selected platforms. 1510 1510 config ARCH_NR_GPIO 1511 1511 int 1512 - default 1024 if ARCH_SHMOBILE || ARCH_TEGRA || ARCH_ZYNQ 1512 + default 1024 if ARCH_BRCMSTB || ARCH_SHMOBILE || ARCH_TEGRA || \ 1513 + ARCH_ZYNQ 1513 1514 default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5 || \ 1514 1515 SOC_DRA7XX || ARCH_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210 1515 1516 default 416 if ARCH_SUNXI
+2
arch/arm/mach-bcm/Kconfig
··· 19 19 select ARCH_REQUIRE_GPIOLIB 20 20 select ARM_AMBA 21 21 select PINCTRL 22 + select MTD_NAND_BRCMNAND 22 23 help 23 24 This enables support for systems based on Broadcom IPROC architected SoCs. 24 25 The IPROC complex contains one or more ARM CPUs along with common ··· 145 144 select BRCMSTB_GISB_ARB 146 145 select BRCMSTB_L2_IRQ 147 146 select BCM7120_L2_IRQ 147 + select ARCH_WANT_OPTIONAL_GPIOLIB 148 148 help 149 149 Say Y if you intend to run the kernel on a Broadcom ARM-based STB 150 150 chipset.
+1 -1
arch/arm/mach-bcm/bcm63xx_pmb.c
··· 150 150 */ 151 151 ret = bpcm_rd(base, addr, ARM_CONTROL, &ctrl); 152 152 if (ret) 153 - return ret; 153 + goto out; 154 154 155 155 if (ctrl & CPU_RESET_N(cpu)) { 156 156 pr_info("PMB: CPU%d is already powered on\n", cpu);
+11 -2
drivers/bus/brcmstb_gisb.c
··· 91 91 struct brcmstb_gisb_arb_device { 92 92 void __iomem *base; 93 93 const int *gisb_offsets; 94 + bool big_endian; 94 95 struct mutex lock; 95 96 struct list_head next; 96 97 u32 valid_mask; ··· 109 108 if (offset == -1) 110 109 return 1; 111 110 112 - return ioread32(gdev->base + offset); 111 + if (gdev->big_endian) 112 + return ioread32be(gdev->base + offset); 113 + else 114 + return ioread32(gdev->base + offset); 113 115 } 114 116 115 117 static void gisb_write(struct brcmstb_gisb_arb_device *gdev, u32 val, int reg) ··· 121 117 122 118 if (offset == -1) 123 119 return; 124 - iowrite32(val, gdev->base + reg); 120 + 121 + if (gdev->big_endian) 122 + iowrite32be(val, gdev->base + reg); 123 + else 124 + iowrite32(val, gdev->base + reg); 125 125 } 126 126 127 127 static ssize_t gisb_arb_get_timeout(struct device *dev, ··· 304 296 return -EINVAL; 305 297 } 306 298 gdev->gisb_offsets = of_id->data; 299 + gdev->big_endian = of_device_is_big_endian(dn); 307 300 308 301 err = devm_request_irq(&pdev->dev, timeout_irq, 309 302 brcmstb_gisb_timeout_handler, 0, pdev->name,