Commit 7a3984bb authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull MIPS updates from Thomas Bogendoerfer:
 "Just cleanups and fixes"

* tag 'mips_6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
  MIPS: Fix whitespace damage in r4k_wait from VS timer fix
  mips: kvm: simplify kvm_mips_deliver_interrupts()
  MIPS: alchemy: mtx1: switch to static device properties
  mips: Remove __GFP_HIGHMEM masking
  MIPS: ftrace: Fix memory corruption when kernel is located beyond 32 bits
  MIPS: dts: Always descend vendor subdirectories
  mips: configs: loongson1: Update defconfig
  MIPS: Fix HOTPLUG_PARALLEL dependency
parents 12eef14b 2b6d718c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -658,7 +658,7 @@ config EYEQ
	select USB_UHCI_BIG_ENDIAN_DESC if CPU_BIG_ENDIAN
	select USB_UHCI_BIG_ENDIAN_MMIO if CPU_BIG_ENDIAN
	select USE_OF
	select HOTPLUG_PARALLEL if SMP
	select HOTPLUG_PARALLEL if HOTPLUG_CPU
	help
	  Select this to build a kernel supporting EyeQ SoC from Mobileye.

+124 −57
Original line number Diff line number Diff line
@@ -9,10 +9,8 @@
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/leds.h>
#include <linux/gpio.h>
#include <linux/gpio/machine.h>
#include <linux/gpio_keys.h>
#include <linux/gpio/property.h>
#include <linux/input.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h>
@@ -80,63 +78,133 @@ void __init board_setup(void)

/******************************************************************************/

static struct gpio_keys_button mtx1_gpio_button[] = {
	{
		.gpio = 207,
		.code = BTN_0,
		.desc = "System button",
	}
static const struct software_node mtx1_gpiochip_node = {
	.name = "alchemy-gpio2",
};

static const struct software_node mtx1_gpio_keys_node = {
	.name = "mtx1-gpio-keys",
};

static const struct property_entry mtx1_button_props[] = {
	PROPERTY_ENTRY_U32("linux,code", BTN_0),
	PROPERTY_ENTRY_GPIO("gpios", &mtx1_gpiochip_node, 7, GPIO_ACTIVE_HIGH),
	PROPERTY_ENTRY_STRING("label", "System button"),
	{ }
};

static struct gpio_keys_platform_data mtx1_buttons_data = {
	.buttons = mtx1_gpio_button,
	.nbuttons = ARRAY_SIZE(mtx1_gpio_button),
static const struct software_node mtx1_button_node = {
	.parent = &mtx1_gpio_keys_node,
	.properties = mtx1_button_props,
};

static struct platform_device mtx1_button = {
static const struct software_node *mtx1_gpio_keys_swnodes[] __initconst = {
	&mtx1_gpio_keys_node,
	&mtx1_button_node,
	NULL
};

static void __init mtx1_keys_init(void)
{
	struct platform_device_info keys_info = {
		.name	= "gpio-keys",
	.id = -1,
	.dev = {
		.platform_data = &mtx1_buttons_data,
	}
		.id	= PLATFORM_DEVID_NONE,
	};
	struct platform_device *pd;
	int err;

	err = software_node_register_node_group(mtx1_gpio_keys_swnodes);
	if (err) {
		pr_err("failed to register gpio-keys software nodes: %d\n", err);
		return;
	}

	keys_info.fwnode = software_node_fwnode(&mtx1_gpio_keys_node);

	pd = platform_device_register_full(&keys_info);
	err = PTR_ERR_OR_ZERO(pd);
	if (err)
		pr_err("failed to create gpio-keys device: %d\n", err);
}

static struct gpiod_lookup_table mtx1_wdt_gpio_table = {
	.dev_id = "mtx1-wdt.0",
	.table = {
/* Global number 215 is offset 15 on Alchemy GPIO 2 */
		GPIO_LOOKUP("alchemy-gpio2", 15, NULL, GPIO_ACTIVE_HIGH),
		{ },
	},
static const struct property_entry mtx1_wdt_props[] = {
	PROPERTY_ENTRY_GPIO("gpios", &mtx1_gpiochip_node, 15, GPIO_ACTIVE_HIGH),
	{ }
};

static struct platform_device mtx1_wdt = {
static struct platform_device_info mtx1_wdt_info __initconst = {
	.name = "mtx1-wdt",
	.id = 0,
	.properties = mtx1_wdt_props,
};

static const struct gpio_led default_leds[] = {
static void __init mtx1_wdt_init(void)
{
	struct platform_device *pd;
	int err;

	pd = platform_device_register_full(&mtx1_wdt_info);
	err = PTR_ERR_OR_ZERO(pd);
	if (err)
		pr_err("failed to create gpio-keys device: %d\n", err);
}

static const struct software_node mtx1_gpio_leds_node = {
	.name = "mtx1-leds",
};

static const struct property_entry mtx1_green_led_props[] = {
	PROPERTY_ENTRY_GPIO("gpios", &mtx1_gpiochip_node, 11, GPIO_ACTIVE_HIGH),
	{ }
};

static const struct software_node mtx1_green_led_node = {
	.name = "mtx1:green",
		.gpio = 211,
	}, {
	.parent = &mtx1_gpio_leds_node,
	.properties = mtx1_green_led_props,
};

static const struct property_entry mtx1_red_led_props[] = {
	PROPERTY_ENTRY_GPIO("gpios", &mtx1_gpiochip_node, 12, GPIO_ACTIVE_HIGH),
	{ }
};

static const struct software_node mtx1_red_led_node = {
	.name = "mtx1:red",
		.gpio = 212,
	},
	.parent = &mtx1_gpio_leds_node,
	.properties = mtx1_red_led_props,
};

static struct gpio_led_platform_data mtx1_led_data = {
	.num_leds = ARRAY_SIZE(default_leds),
	.leds = default_leds,
static const struct software_node *mtx1_gpio_leds_swnodes[] = {
	&mtx1_gpio_leds_node,
	&mtx1_green_led_node,
	&mtx1_red_led_node,
	NULL
};

static struct platform_device mtx1_gpio_leds = {
static void __init mtx1_leds_init(void)
{
	struct platform_device_info led_info = {
		.name	= "leds-gpio",
	.id = -1,
	.dev = {
		.platform_data = &mtx1_led_data,
	}
		.id	= PLATFORM_DEVID_NONE,
	};
	struct platform_device *led_dev;
	int err;

	err = software_node_register_node_group(mtx1_gpio_leds_swnodes);
	if (err) {
		pr_err("failed to register LED software nodes: %d\n", err);
		return;
	}

	led_info.fwnode = software_node_fwnode(&mtx1_gpio_leds_node);

	led_dev = platform_device_register_full(&led_info);
	err = PTR_ERR_OR_ZERO(led_dev);
	if (err)
		pr_err("failed to create LED device: %d\n", err);
}

static struct mtd_partition mtx1_mtd_partitions[] = {
	{
@@ -247,9 +315,6 @@ static struct platform_device mtx1_pci_host = {

static struct platform_device *mtx1_devs[] __initdata = {
	&mtx1_pci_host,
	&mtx1_gpio_leds,
	&mtx1_wdt,
	&mtx1_button,
	&mtx1_mtd,
};

@@ -270,16 +335,18 @@ static int __init mtx1_register_devices(void)

	au1xxx_override_eth_cfg(0, &mtx1_au1000_eth0_pdata);

	rc = gpio_request(mtx1_gpio_button[0].gpio,
					mtx1_gpio_button[0].desc);
	if (rc < 0) {
		printk(KERN_INFO "mtx1: failed to request %d\n",
					mtx1_gpio_button[0].gpio);
		goto out;
	}
	gpio_direction_input(mtx1_gpio_button[0].gpio);
out:
	gpiod_add_lookup_table(&mtx1_wdt_gpio_table);
	return platform_add_devices(mtx1_devs, ARRAY_SIZE(mtx1_devs));
	rc = software_node_register(&mtx1_gpiochip_node);
	if (rc)
		return rc;

	rc = platform_add_devices(mtx1_devs, ARRAY_SIZE(mtx1_devs));
	if (rc)
		return rc;

	mtx1_leds_init();
	mtx1_wdt_init();
	mtx1_keys_init();

	return 0;
}
arch_initcall(mtx1_register_devices);
+16 −19
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
subdir-$(CONFIG_BMIPS_GENERIC)		+= brcm
subdir-$(CONFIG_CAVIUM_OCTEON_SOC)	+= cavium-octeon
subdir-$(CONFIG_ECONET)			+= econet
subdir-$(CONFIG_EYEQ)			+= mobileye
subdir-$(CONFIG_FIT_IMAGE_FDT_MARDUK)   += img
subdir-$(CONFIG_FIT_IMAGE_FDT_BOSTON)	+= img
subdir-$(CONFIG_MACH_INGENIC)		+= ingenic
subdir-$(CONFIG_LANTIQ)			+= lantiq
subdir-$(CONFIG_MACH_LOONGSON64)	+= loongson
subdir-$(CONFIG_MACH_LOONGSON32)	+= loongson
subdir-$(CONFIG_SOC_VCOREIII)		+= mscc
subdir-$(CONFIG_MIPS_MALTA)		+= mti
subdir-$(CONFIG_LEGACY_BOARD_SEAD3)	+= mti
subdir-$(CONFIG_FIT_IMAGE_FDT_NI169445)	+= ni
subdir-$(CONFIG_MACH_PIC32)		+= pic32
subdir-$(CONFIG_ATH79)			+= qca
subdir-$(CONFIG_RALINK)			+= ralink
subdir-$(CONFIG_MACH_REALTEK_RTL)	+= realtek
subdir-$(CONFIG_FIT_IMAGE_FDT_XILFPGA)	+= xilfpga
subdir-y	+= brcm
subdir-y	+= cavium-octeon
subdir-y	+= econet
subdir-y	+= mobileye
subdir-y	+= img
subdir-y	+= ingenic
subdir-y	+= lantiq
subdir-y	+= loongson
subdir-y	+= mscc
subdir-y	+= mti
subdir-y	+= ni
subdir-y	+= pic32
subdir-y	+= qca
subdir-y	+= ralink
subdir-y	+= realtek
subdir-y	+= xilfpga
+2 −2
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
dtb-y	+= cisco_sg220-26.dtb
dtb-y	+= cameo-rtl9302c-2x-rtl8224-2xge.dtb
dtb-$(CONFIG_MACH_REALTEK_RTL)	+= cisco_sg220-26.dtb
dtb-$(CONFIG_MACH_REALTEK_RTL)	+= cameo-rtl9302c-2x-rtl8224-2xge.dtb
+7 −9
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ CONFIG_EXPERT=y
CONFIG_PERF_EVENTS=y
CONFIG_MACH_LOONGSON32=y
# CONFIG_SUSPEND is not set
CONFIG_JUMP_LABEL=y
# CONFIG_SECCOMP is not set
# CONFIG_GCC_PLUGINS is not set
CONFIG_MODULES=y
@@ -30,8 +31,8 @@ CONFIG_IP_PNP_DHCP=y
CONFIG_SYN_COOKIES=y
# CONFIG_INET_DIAG is not set
# CONFIG_IPV6 is not set
# CONFIG_BQL is not set
# CONFIG_WIRELESS is not set
# CONFIG_ETHTOOL_NETLINK is not set
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
# CONFIG_STANDALONE is not set
@@ -39,7 +40,7 @@ CONFIG_MTD=y
CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_BLOCK=y
CONFIG_MTD_RAW_NAND=y
CONFIG_MTD_NAND_LOONGSON1=y
CONFIG_MTD_NAND_LOONGSON=y
CONFIG_MTD_UBI=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_SCSI=m
@@ -72,6 +73,7 @@ CONFIG_NETDEVICES=y
# CONFIG_NET_VENDOR_MICROCHIP is not set
# CONFIG_NET_VENDOR_MICROSEMI is not set
# CONFIG_NET_VENDOR_MICROSOFT is not set
# CONFIG_NET_VENDOR_MUCSE is not set
# CONFIG_NET_VENDOR_NI is not set
# CONFIG_NET_VENDOR_NATSEMI is not set
# CONFIG_NET_VENDOR_NETRONOME is not set
@@ -166,15 +168,11 @@ CONFIG_ROOT_NFS=y
CONFIG_NLS_CODEPAGE_437=m
CONFIG_NLS_ISO8859_1=m
# CONFIG_CRYPTO_HW is not set
# CONFIG_XZ_DEC_X86 is not set
# CONFIG_XZ_DEC_POWERPC is not set
# CONFIG_XZ_DEC_ARM is not set
# CONFIG_XZ_DEC_ARMTHUMB is not set
# CONFIG_XZ_DEC_ARM64 is not set
# CONFIG_XZ_DEC_SPARC is not set
# CONFIG_XZ_DEC_RISCV is not set
CONFIG_DYNAMIC_DEBUG=y
# CONFIG_DEBUG_MISC is not set
CONFIG_MAGIC_SYSRQ=y
# CONFIG_SLUB_DEBUG is not set
# CONFIG_RCU_TRACE is not set
# CONFIG_FTRACE is not set
# CONFIG_EARLY_PRINTK is not set
CONFIG_TEST_DHRY=m
Loading