Skip to content

Commit

Permalink
Merge tag 'mips_4.17' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/jhogan/mips

Pull MIPS updates from James Hogan:
 "These are the main MIPS changes for 4.17. Rough overview:

   (1) generic platform: Add support for Microsemi Ocelot SoCs

   (2) crypto: Add CRC32 and CRC32C HW acceleration module

   (3) Various cleanups and misc improvements

  More detailed summary:

  Miscellaneous:
   - hang more efficiently on halt/powerdown/restart
   - pm-cps: Block system suspend when a JTAG probe is present
   - expand make help text for generic defconfigs
   - refactor handling of legacy defconfigs
   - determine the entry point from the ELF file header to fix microMIPS
     for certain toolchains
   - introduce isa-rev.h for MIPS_ISA_REV and use to simplify other code

  Minor cleanups:
   - DTS: boston/ci20: Unit name cleanups and correction
   - kdump: Make the default for PHYSICAL_START always 64-bit
   - constify gpio_led in Alchemy, AR7, and TXX9
   - silence a couple of W=1 warnings
   - remove duplicate includes

  Platform support:
  Generic platform:
   - add support for Microsemi Ocelot
   - dt-bindings: Add vendor prefix for Microsemi Corporation
   - dt-bindings: Add bindings for Microsemi SoCs
   - add ocelot SoC & PCB123 board DTS files
   - MAINTAINERS: Add entry for Microsemi MIPS SoCs
   - enable crc32-mips on r6 configs

  ath79:
   - fix AR724X_PLL_REG_PCIE_CONFIG offset

  BCM47xx:
   - firmware: Use mac_pton() for MAC address parsing
   - add Luxul XAP1500/XWR1750 WiFi LEDs
   - use standard reset button for Luxul XWR-1750

  BMIPS:
   - enable CONFIG_BRCMSTB_PM in bmips_stb_defconfig for build coverage
   - add STB PM, wake-up timer, watchdog DT nodes

  Octeon:
   - drop '.' after newlines in printk calls

  ralink:
   - pci-mt7621: Enable PCIe on MT7688"

* tag 'mips_4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips: (37 commits)
  MIPS: BCM47XX: Use standard reset button for Luxul XWR-1750
  MIPS: BCM47XX: Add Luxul XAP1500/XWR1750 WiFi LEDs
  MIPS: Make the default for PHYSICAL_START always 64-bit
  MIPS: Use the entry point from the ELF file header
  MAINTAINERS: Add entry for Microsemi MIPS SoCs
  MIPS: generic: Add support for Microsemi Ocelot
  MIPS: mscc: Add ocelot PCB123 device tree
  MIPS: mscc: Add ocelot dtsi
  dt-bindings: mips: Add bindings for Microsemi SoCs
  dt-bindings: Add vendor prefix for Microsemi Corporation
  MIPS: ath79: Fix AR724X_PLL_REG_PCIE_CONFIG offset
  MIPS: pci-mt7620: Enable PCIe on MT7688
  MIPS: pm-cps: Block system suspend when a JTAG probe is present
  MIPS: VDSO: Replace __mips_isa_rev with MIPS_ISA_REV
  MIPS: BPF: Replace __mips_isa_rev with MIPS_ISA_REV
  MIPS: cpu-features.h: Replace __mips_isa_rev with MIPS_ISA_REV
  MIPS: Introduce isa-rev.h to define MIPS_ISA_REV
  MIPS: Hang more efficiently on halt/powerdown/restart
  FIRMWARE: bcm47xx_nvram: Replace mac address parsing
  MIPS: BMIPS: Add Broadcom STB watchdog nodes
  ...
  • Loading branch information
torvalds committed Apr 10, 2018
2 parents 2a56bb5 + a5075e6 commit 948869f
Show file tree
Hide file tree
Showing 59 changed files with 1,381 additions and 84 deletions.
43 changes: 43 additions & 0 deletions Documentation/devicetree/bindings/mips/mscc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
* Microsemi MIPS CPUs

Boards with a SoC of the Microsemi MIPS family shall have the following
properties:

Required properties:
- compatible: "mscc,ocelot"


* Other peripherals:

o CPU chip regs:

The SoC has a few registers (DEVCPU_GCB:CHIP_REGS) handling miscellaneous
functionalities: chip ID, general purpose register for software use, reset
controller, hardware status and configuration, efuses.

Required properties:
- compatible: Should be "mscc,ocelot-chip-regs", "simple-mfd", "syscon"
- reg : Should contain registers location and length

Example:
syscon@71070000 {
compatible = "mscc,ocelot-chip-regs", "simple-mfd", "syscon";
reg = <0x71070000 0x1c>;
};


o CPU system control:

The SoC has a few registers (ICPU_CFG:CPU_SYSTEM_CTRL) handling configuration of
the CPU: 8 general purpose registers, reset control, CPU en/disabling, CPU
endianness, CPU bus control, CPU status.

Required properties:
- compatible: Should be "mscc,ocelot-cpu-syscon", "syscon"
- reg : Should contain registers location and length

Example:
syscon@70000000 {
compatible = "mscc,ocelot-cpu-syscon", "syscon";
reg = <0x70000000 0x2c>;
};
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/vendor-prefixes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ motorola Motorola, Inc.
moxa Moxa Inc.
mpl MPL AG
mqmaker mqmaker Inc.
mscc Microsemi Corporation
msi Micro-Star International Co. Ltd.
mti Imagination Technologies Ltd. (formerly MIPS Technologies Inc.)
multi-inno Multi-Inno Technology Co.,Ltd
Expand Down
9 changes: 9 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -9230,6 +9230,15 @@ S: Maintained
F: drivers/usb/misc/usb251xb.c
F: Documentation/devicetree/bindings/usb/usb251xb.txt

MICROSEMI MIPS SOCS
M: Alexandre Belloni <[email protected]>
L: [email protected]
S: Maintained
F: arch/mips/generic/board-ocelot.c
F: arch/mips/configs/generic/board-ocelot.config
F: arch/mips/boot/dts/mscc/
F: Documentation/devicetree/bindings/mips/mscc.txt

MICROSEMI SMART ARRAY SMARTPQI DRIVER (smartpqi)
M: Don Brace <[email protected]>
L: [email protected]
Expand Down
7 changes: 5 additions & 2 deletions arch/mips/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2029,6 +2029,7 @@ config CPU_MIPSR6
select CPU_HAS_RIXI
select HAVE_ARCH_BITREVERSE
select MIPS_ASID_BITS_VARIABLE
select MIPS_CRC_SUPPORT
select MIPS_SPRAM

config EVA
Expand Down Expand Up @@ -2502,6 +2503,9 @@ config MIPS_ASID_BITS
config MIPS_ASID_BITS_VARIABLE
bool

config MIPS_CRC_SUPPORT
bool

#
# - Highmem only makes sense for the 32-bit kernel.
# - The current highmem code will only work properly on physically indexed
Expand Down Expand Up @@ -2850,8 +2854,7 @@ config CRASH_DUMP

config PHYSICAL_START
hex "Physical address where the kernel is loaded"
default "0xffffffff84000000" if 64BIT
default "0x84000000" if 32BIT
default "0xffffffff84000000"
depends on CRASH_DUMP
help
This gives the CKSEG0 or KSEG0 address where the kernel is loaded.
Expand Down
64 changes: 41 additions & 23 deletions arch/mips/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ xpa-cflags-y := $(mips-cflags)
xpa-cflags-$(micromips-ase) += -mmicromips -Wa$(comma)-fatal-warnings
toolchain-xpa := $(call cc-option-yn,$(xpa-cflags-y) -mxpa)
cflags-$(toolchain-xpa) += -DTOOLCHAIN_SUPPORTS_XPA
toolchain-crc := $(call cc-option-yn,$(mips-cflags) -Wa$(comma)-mcrc)
cflags-$(toolchain-crc) += -DTOOLCHAIN_SUPPORTS_CRC

#
# Firmware support
Expand Down Expand Up @@ -249,20 +251,12 @@ ifdef CONFIG_PHYSICAL_START
load-y = $(CONFIG_PHYSICAL_START)
endif

entry-noisa-y = 0x$(shell $(NM) vmlinux 2>/dev/null \
| grep "\bkernel_entry\b" | cut -f1 -d \ )
ifdef CONFIG_CPU_MICROMIPS
#
# Set the ISA bit, since the kernel_entry symbol in the ELF will have it
# clear which would lead to images containing addresses which bootloaders may
# jump to as MIPS32 code.
#
entry-y = $(patsubst %0,%1,$(patsubst %2,%3,$(patsubst %4,%5, \
$(patsubst %6,%7,$(patsubst %8,%9,$(patsubst %a,%b, \
$(patsubst %c,%d,$(patsubst %e,%f,$(entry-noisa-y)))))))))
else
entry-y = $(entry-noisa-y)
endif
# Sign-extend the entry point to 64 bits if retrieved as a 32-bit number.
entry-y = $(shell $(OBJDUMP) -f vmlinux 2>/dev/null \
| sed -n '/^start address / { \
s/^.* //; \
s/0x\([0-7].......\)$$/0x00000000\1/; \
s/0x\(........\)$$/0xffffffff\1/; p }')

cflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic
drivers-$(CONFIG_PCI) += arch/mips/pci/
Expand Down Expand Up @@ -330,6 +324,7 @@ libs-y += arch/mips/math-emu/
# See arch/mips/Kbuild for content of core part of the kernel
core-y += arch/mips/

drivers-$(CONFIG_MIPS_CRC_SUPPORT) += arch/mips/crypto/
drivers-$(CONFIG_OPROFILE) += arch/mips/oprofile/

# suspend and hibernation support
Expand Down Expand Up @@ -473,6 +468,21 @@ define archhelp
echo
echo ' {micro32,32,64}{r1,r2,r6}{el,}_defconfig <BOARDS="list of boards">'
echo
echo ' Where BOARDS is some subset of the following:'
for board in $(sort $(BOARDS)); do echo " $${board}"; done
echo
echo ' Specifically the following generic default configurations are'
echo ' supported:'
echo
$(foreach cfg,$(generic_defconfigs),
printf " %-24s - Build generic kernel for $(call describe_generic_defconfig,$(cfg))\n" $(cfg);)
echo
echo ' The following legacy default configurations have been converted to'
echo ' generic and can still be used:'
echo
$(foreach cfg,$(sort $(legacy_defconfigs)),
printf " %-24s - Build $($(cfg)-y)\n" $(cfg);)
echo
echo ' Otherwise, the following default configurations are available:'
endef

Expand Down Expand Up @@ -507,6 +517,10 @@ endef
$(eval $(call gen_generic_defconfigs,32 64,r1 r2 r6,eb el))
$(eval $(call gen_generic_defconfigs,micro32,r2,eb el))

define describe_generic_defconfig
$(subst 32r,MIPS32 r,$(subst 64r,MIPS64 r,$(subst el, little endian,$(patsubst %_defconfig,%,$(1)))))
endef

.PHONY: $(generic_defconfigs)
$(generic_defconfigs):
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \
Expand Down Expand Up @@ -543,14 +557,18 @@ generic_defconfig:
# now that the boards have been converted to use the generic kernel they are
# wrappers around the generic rules above.
#
.PHONY: sead3_defconfig
sead3_defconfig:
$(Q)$(MAKE) -f $(srctree)/Makefile 32r2el_defconfig BOARDS=sead-3
legacy_defconfigs += ocelot_defconfig
ocelot_defconfig-y := 32r2el_defconfig BOARDS=ocelot

legacy_defconfigs += sead3_defconfig
sead3_defconfig-y := 32r2el_defconfig BOARDS=sead-3

legacy_defconfigs += sead3micro_defconfig
sead3micro_defconfig-y := micro32r2el_defconfig BOARDS=sead-3

.PHONY: sead3micro_defconfig
sead3micro_defconfig:
$(Q)$(MAKE) -f $(srctree)/Makefile micro32r2el_defconfig BOARDS=sead-3
legacy_defconfigs += xilfpga_defconfig
xilfpga_defconfig-y := 32r2el_defconfig BOARDS=xilfpga

.PHONY: xilfpga_defconfig
xilfpga_defconfig:
$(Q)$(MAKE) -f $(srctree)/Makefile 32r2el_defconfig BOARDS=xilfpga
.PHONY: $(legacy_defconfigs)
$(legacy_defconfigs):
$(Q)$(MAKE) -f $(srctree)/Makefile $($@-y)
2 changes: 1 addition & 1 deletion arch/mips/alchemy/board-gpr.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ static struct platform_device gpr_mtd_device = {
/*
* LEDs
*/
static struct gpio_led gpr_gpio_leds[] = {
static const struct gpio_led gpr_gpio_leds[] = {
{ /* green */
.name = "gpr:green",
.gpio = 4,
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/alchemy/board-mtx1.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ static struct platform_device mtx1_wdt = {
.resource = mtx1_wdt_res,
};

static struct gpio_led default_leds[] = {
static const struct gpio_led default_leds[] = {
{
.name = "mtx1:green",
.gpio = 211,
Expand Down
14 changes: 7 additions & 7 deletions arch/mips/ar7/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,20 +346,20 @@ static struct platform_device ar7_udc = {
/*****************************************************************************
* LEDs
****************************************************************************/
static struct gpio_led default_leds[] = {
static const struct gpio_led default_leds[] = {
{
.name = "status",
.gpio = 8,
.active_low = 1,
},
};

static struct gpio_led titan_leds[] = {
static const struct gpio_led titan_leds[] = {
{ .name = "status", .gpio = 8, .active_low = 1, },
{ .name = "wifi", .gpio = 13, .active_low = 1, },
};

static struct gpio_led dsl502t_leds[] = {
static const struct gpio_led dsl502t_leds[] = {
{
.name = "status",
.gpio = 9,
Expand All @@ -377,7 +377,7 @@ static struct gpio_led dsl502t_leds[] = {
},
};

static struct gpio_led dg834g_leds[] = {
static const struct gpio_led dg834g_leds[] = {
{
.name = "ppp",
.gpio = 6,
Expand Down Expand Up @@ -406,7 +406,7 @@ static struct gpio_led dg834g_leds[] = {
},
};

static struct gpio_led fb_sl_leds[] = {
static const struct gpio_led fb_sl_leds[] = {
{
.name = "1",
.gpio = 7,
Expand All @@ -433,7 +433,7 @@ static struct gpio_led fb_sl_leds[] = {
},
};

static struct gpio_led fb_fon_leds[] = {
static const struct gpio_led fb_fon_leds[] = {
{
.name = "1",
.gpio = 8,
Expand All @@ -459,7 +459,7 @@ static struct gpio_led fb_fon_leds[] = {
},
};

static struct gpio_led gt701_leds[] = {
static const struct gpio_led gt701_leds[] = {
{
.name = "inet:green",
.gpio = 13,
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/bcm47xx/buttons.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ bcm47xx_buttons_luxul_xwr_600_v1[] = {

static const struct gpio_keys_button
bcm47xx_buttons_luxul_xwr_1750_v1[] = {
BCM47XX_GPIO_KEY(14, BTN_TASK),
BCM47XX_GPIO_KEY(14, KEY_RESTART),
};

/* Microsoft */
Expand Down
21 changes: 21 additions & 0 deletions arch/mips/bcm47xx/leds.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,12 @@ bcm47xx_leds_luxul_xap_1500_v1[] __initconst = {
BCM47XX_GPIO_LED_TRIGGER(13, "green", "status", 1, "timer"),
};

static const struct gpio_led
bcm47xx_leds_luxul_xap1500_v1_extra[] __initconst = {
BCM47XX_GPIO_LED(44, "green", "5ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
BCM47XX_GPIO_LED(76, "green", "2ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
};

static const struct gpio_led
bcm47xx_leds_luxul_xbr_4400_v1[] __initconst = {
BCM47XX_GPIO_LED(12, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
Expand Down Expand Up @@ -435,6 +441,11 @@ bcm47xx_leds_luxul_xwr_1750_v1[] __initconst = {
BCM47XX_GPIO_LED(15, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
};

static const struct gpio_led
bcm47xx_leds_luxul_xwr1750_v1_extra[] __initconst = {
BCM47XX_GPIO_LED(76, "green", "2ghz", 0, LEDS_GPIO_DEFSTATE_OFF),
};

/* Microsoft */

static const struct gpio_led
Expand Down Expand Up @@ -528,6 +539,12 @@ static struct gpio_led_platform_data bcm47xx_leds_pdata;
bcm47xx_leds_pdata.num_leds = ARRAY_SIZE(dev_leds); \
} while (0)

static struct gpio_led_platform_data bcm47xx_leds_pdata_extra __initdata = {};
#define bcm47xx_set_pdata_extra(dev_leds) do { \
bcm47xx_leds_pdata_extra.leds = dev_leds; \
bcm47xx_leds_pdata_extra.num_leds = ARRAY_SIZE(dev_leds); \
} while (0)

void __init bcm47xx_leds_register(void)
{
enum bcm47xx_board board = bcm47xx_board_get();
Expand Down Expand Up @@ -705,6 +722,7 @@ void __init bcm47xx_leds_register(void)
break;
case BCM47XX_BOARD_LUXUL_XAP_1500_V1:
bcm47xx_set_pdata(bcm47xx_leds_luxul_xap_1500_v1);
bcm47xx_set_pdata_extra(bcm47xx_leds_luxul_xap1500_v1_extra);
break;
case BCM47XX_BOARD_LUXUL_XBR_4400_V1:
bcm47xx_set_pdata(bcm47xx_leds_luxul_xbr_4400_v1);
Expand All @@ -717,6 +735,7 @@ void __init bcm47xx_leds_register(void)
break;
case BCM47XX_BOARD_LUXUL_XWR_1750_V1:
bcm47xx_set_pdata(bcm47xx_leds_luxul_xwr_1750_v1);
bcm47xx_set_pdata_extra(bcm47xx_leds_luxul_xwr1750_v1_extra);
break;

case BCM47XX_BOARD_MICROSOFT_MN700:
Expand Down Expand Up @@ -760,4 +779,6 @@ void __init bcm47xx_leds_register(void)
}

gpio_led_register_device(-1, &bcm47xx_leds_pdata);
if (bcm47xx_leds_pdata_extra.num_leds)
gpio_led_register_device(0, &bcm47xx_leds_pdata_extra);
}
1 change: 1 addition & 0 deletions arch/mips/boot/dts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ subdir-y += cavium-octeon
subdir-y += img
subdir-y += ingenic
subdir-y += lantiq
subdir-y += mscc
subdir-y += mti
subdir-y += netlogic
subdir-y += ni
Expand Down
7 changes: 7 additions & 0 deletions arch/mips/boot/dts/brcm/bcm7125.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,13 @@
status = "disabled";
};

watchdog: watchdog@4067e8 {
clocks = <&upg_clk>;
compatible = "brcm,bcm7038-wdt";
reg = <0x4067e8 0x14>;
status = "disabled";
};

upg_gio: gpio@406700 {
compatible = "brcm,brcmstb-gpio";
reg = <0x406700 0x80>;
Expand Down
Loading

0 comments on commit 948869f

Please sign in to comment.