Commit 5644f690 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'samsung-soc-5.9' of...

Merge tag 'samsung-soc-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/soc

Samsung mach/soc changes for v5.9

1. Restore big.LITTLE cpuidle support on Exynos542x boards.
2. Cleanups and minor fixes.

* tag 'samsung-soc-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  ARM: s3c24xx: Replace HTTP links with HTTPS ones
  ARM: s3c24xx: leds: Convert to use GPIO descriptors
  ARM: exynos: MCPM: Restore big.LITTLE cpuidle support
  ARM: exynos: clear L310_AUX_CTRL_FULL_LINE_ZERO in default l2c_aux_val

Link: https://lore.kernel.org/r/20200721180900.13844-4-krzk@kernel.org


Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents 62e7df65 3ecdf2a5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -193,7 +193,7 @@ static void __init exynos_dt_fixup(void)
}

DT_MACHINE_START(EXYNOS_DT, "Samsung Exynos (Flattened Device Tree)")
	.l2c_aux_val	= 0x3c400001,
	.l2c_aux_val	= 0x3c400000,
	.l2c_aux_mask	= 0xc20fffff,
	.smp		= smp_ops(exynos_smp_ops),
	.map_io		= exynos_init_io,
+7 −3
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
#define EXYNOS5420_USE_L2_COMMON_UP_STATE	BIT(30)

static void __iomem *ns_sram_base_addr __ro_after_init;
static bool secure_firmware __ro_after_init;

/*
 * The common v7_exit_coherency_flush API could not be used because of the
@@ -58,15 +59,16 @@ static void __iomem *ns_sram_base_addr __ro_after_init;
static int exynos_cpu_powerup(unsigned int cpu, unsigned int cluster)
{
	unsigned int cpunr = cpu + (cluster * EXYNOS5420_CPUS_PER_CLUSTER);
	bool state;

	pr_debug("%s: cpu %u cluster %u\n", __func__, cpu, cluster);
	if (cpu >= EXYNOS5420_CPUS_PER_CLUSTER ||
		cluster >= EXYNOS5420_NR_CLUSTERS)
		return -EINVAL;

	if (!exynos_cpu_power_state(cpunr)) {
	state = exynos_cpu_power_state(cpunr);
	exynos_cpu_power_up(cpunr);

	if (!state && secure_firmware) {
		/*
		 * This assumes the cluster number of the big cores(Cortex A15)
		 * is 0 and the Little cores(Cortex A7) is 1.
@@ -258,6 +260,8 @@ static int __init exynos_mcpm_init(void)
		return -ENOMEM;
	}

	secure_firmware = exynos_secure_firmware_available();

	/*
	 * To increase the stability of KFC reset we need to program
	 * the PMU SPARE3 register
+1 −1
Original line number Diff line number Diff line
@@ -267,7 +267,7 @@ config MACH_TCT_HAMMER
	select S3C_DEV_USB_HOST
	help
	  Say Y here if you are using the TinCanTools Hammer Board
	  <http://www.tincantools.com>
	  <https://www.tincantools.com>

config MACH_VR1000
	bool "Thorcom VR1000"
+45 −22
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
#include <linux/timer.h>
#include <linux/init.h>
#include <linux/gpio.h>
#include <linux/gpio/machine.h>
#include <linux/device.h>
#include <linux/platform_device.h>

@@ -44,29 +45,53 @@

/* LED devices */

static struct gpiod_lookup_table smdk_led4_gpio_table = {
	.dev_id = "s3c24xx_led.0",
	.table = {
		GPIO_LOOKUP("GPF", 4, NULL, GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN),
		{ },
	},
};

static struct gpiod_lookup_table smdk_led5_gpio_table = {
	.dev_id = "s3c24xx_led.1",
	.table = {
		GPIO_LOOKUP("GPF", 5, NULL, GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN),
		{ },
	},
};

static struct gpiod_lookup_table smdk_led6_gpio_table = {
	.dev_id = "s3c24xx_led.2",
	.table = {
		GPIO_LOOKUP("GPF", 6, NULL, GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN),
		{ },
	},
};

static struct gpiod_lookup_table smdk_led7_gpio_table = {
	.dev_id = "s3c24xx_led.3",
	.table = {
		GPIO_LOOKUP("GPF", 7, NULL, GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN),
		{ },
	},
};

static struct s3c24xx_led_platdata smdk_pdata_led4 = {
	.gpio		= S3C2410_GPF(4),
	.flags		= S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE,
	.name		= "led4",
	.def_trigger	= "timer",
};

static struct s3c24xx_led_platdata smdk_pdata_led5 = {
	.gpio		= S3C2410_GPF(5),
	.flags		= S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE,
	.name		= "led5",
	.def_trigger	= "nand-disk",
};

static struct s3c24xx_led_platdata smdk_pdata_led6 = {
	.gpio		= S3C2410_GPF(6),
	.flags		= S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE,
	.name		= "led6",
};

static struct s3c24xx_led_platdata smdk_pdata_led7 = {
	.gpio		= S3C2410_GPF(7),
	.flags		= S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE,
	.name		= "led7",
};

@@ -179,27 +204,25 @@ static struct platform_device __initdata *smdk_devs[] = {
	&smdk_led7,
};

static const struct gpio smdk_led_gpios[] = {
	{ S3C2410_GPF(4), GPIOF_OUT_INIT_HIGH, NULL },
	{ S3C2410_GPF(5), GPIOF_OUT_INIT_HIGH, NULL },
	{ S3C2410_GPF(6), GPIOF_OUT_INIT_HIGH, NULL },
	{ S3C2410_GPF(7), GPIOF_OUT_INIT_HIGH, NULL },
};

void __init smdk_machine_init(void)
{
	/* Configure the LEDs (even if we have no LED support)*/

	int ret = gpio_request_array(smdk_led_gpios,
				     ARRAY_SIZE(smdk_led_gpios));
	if (!WARN_ON(ret < 0))
		gpio_free_array(smdk_led_gpios, ARRAY_SIZE(smdk_led_gpios));

	if (machine_is_smdk2443())
		smdk_nand_info.twrph0 = 50;

	s3c_nand_set_platdata(&smdk_nand_info);

	/* Disable pull-up on the LED lines */
	s3c_gpio_setpull(S3C2410_GPF(4), S3C_GPIO_PULL_NONE);
	s3c_gpio_setpull(S3C2410_GPF(5), S3C_GPIO_PULL_NONE);
	s3c_gpio_setpull(S3C2410_GPF(6), S3C_GPIO_PULL_NONE);
	s3c_gpio_setpull(S3C2410_GPF(7), S3C_GPIO_PULL_NONE);

	/* Add lookups for the lines */
	gpiod_add_lookup_table(&smdk_led4_gpio_table);
	gpiod_add_lookup_table(&smdk_led5_gpio_table);
	gpiod_add_lookup_table(&smdk_led6_gpio_table);
	gpiod_add_lookup_table(&smdk_led7_gpio_table);

	platform_add_devices(smdk_devs, ARRAY_SIZE(smdk_devs));

	s3c_pm_init();
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
// Copyright (c) 2003-2005 Simtec Electronics
//   Ben Dooks <ben@simtec.co.uk>
//
// http://www.handhelds.org/projects/h1940.html
// https://www.handhelds.org/projects/h1940.html

#include <linux/kernel.h>
#include <linux/types.h>
Loading