Skip to content

Commit 5644f69

Browse files
committed
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/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
2 parents 62e7df6 + 3ecdf2a commit 5644f69

File tree

12 files changed

+212
-86
lines changed

12 files changed

+212
-86
lines changed

arch/arm/mach-exynos/exynos.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ static void __init exynos_dt_fixup(void)
193193
}
194194

195195
DT_MACHINE_START(EXYNOS_DT, "Samsung Exynos (Flattened Device Tree)")
196-
.l2c_aux_val = 0x3c400001,
196+
.l2c_aux_val = 0x3c400000,
197197
.l2c_aux_mask = 0xc20fffff,
198198
.smp = smp_ops(exynos_smp_ops),
199199
.map_io = exynos_init_io,

arch/arm/mach-exynos/mcpm-exynos.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#define EXYNOS5420_USE_L2_COMMON_UP_STATE BIT(30)
2727

2828
static void __iomem *ns_sram_base_addr __ro_after_init;
29+
static bool secure_firmware __ro_after_init;
2930

3031
/*
3132
* 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;
5859
static int exynos_cpu_powerup(unsigned int cpu, unsigned int cluster)
5960
{
6061
unsigned int cpunr = cpu + (cluster * EXYNOS5420_CPUS_PER_CLUSTER);
62+
bool state;
6163

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

67-
if (!exynos_cpu_power_state(cpunr)) {
68-
exynos_cpu_power_up(cpunr);
69-
69+
state = exynos_cpu_power_state(cpunr);
70+
exynos_cpu_power_up(cpunr);
71+
if (!state && secure_firmware) {
7072
/*
7173
* This assumes the cluster number of the big cores(Cortex A15)
7274
* is 0 and the Little cores(Cortex A7) is 1.
@@ -258,6 +260,8 @@ static int __init exynos_mcpm_init(void)
258260
return -ENOMEM;
259261
}
260262

263+
secure_firmware = exynos_secure_firmware_available();
264+
261265
/*
262266
* To increase the stability of KFC reset we need to program
263267
* the PMU SPARE3 register

arch/arm/mach-s3c24xx/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ config MACH_TCT_HAMMER
267267
select S3C_DEV_USB_HOST
268268
help
269269
Say Y here if you are using the TinCanTools Hammer Board
270-
<http://www.tincantools.com>
270+
<https://www.tincantools.com>
271271

272272
config MACH_VR1000
273273
bool "Thorcom VR1000"

arch/arm/mach-s3c24xx/common-smdk.c

Lines changed: 45 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <linux/timer.h>
1515
#include <linux/init.h>
1616
#include <linux/gpio.h>
17+
#include <linux/gpio/machine.h>
1718
#include <linux/device.h>
1819
#include <linux/platform_device.h>
1920

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

4546
/* LED devices */
4647

48+
static struct gpiod_lookup_table smdk_led4_gpio_table = {
49+
.dev_id = "s3c24xx_led.0",
50+
.table = {
51+
GPIO_LOOKUP("GPF", 4, NULL, GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN),
52+
{ },
53+
},
54+
};
55+
56+
static struct gpiod_lookup_table smdk_led5_gpio_table = {
57+
.dev_id = "s3c24xx_led.1",
58+
.table = {
59+
GPIO_LOOKUP("GPF", 5, NULL, GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN),
60+
{ },
61+
},
62+
};
63+
64+
static struct gpiod_lookup_table smdk_led6_gpio_table = {
65+
.dev_id = "s3c24xx_led.2",
66+
.table = {
67+
GPIO_LOOKUP("GPF", 6, NULL, GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN),
68+
{ },
69+
},
70+
};
71+
72+
static struct gpiod_lookup_table smdk_led7_gpio_table = {
73+
.dev_id = "s3c24xx_led.3",
74+
.table = {
75+
GPIO_LOOKUP("GPF", 7, NULL, GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN),
76+
{ },
77+
},
78+
};
79+
4780
static struct s3c24xx_led_platdata smdk_pdata_led4 = {
48-
.gpio = S3C2410_GPF(4),
49-
.flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE,
5081
.name = "led4",
5182
.def_trigger = "timer",
5283
};
5384

5485
static struct s3c24xx_led_platdata smdk_pdata_led5 = {
55-
.gpio = S3C2410_GPF(5),
56-
.flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE,
5786
.name = "led5",
5887
.def_trigger = "nand-disk",
5988
};
6089

6190
static struct s3c24xx_led_platdata smdk_pdata_led6 = {
62-
.gpio = S3C2410_GPF(6),
63-
.flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE,
6491
.name = "led6",
6592
};
6693

6794
static struct s3c24xx_led_platdata smdk_pdata_led7 = {
68-
.gpio = S3C2410_GPF(7),
69-
.flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE,
7095
.name = "led7",
7196
};
7297

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

182-
static const struct gpio smdk_led_gpios[] = {
183-
{ S3C2410_GPF(4), GPIOF_OUT_INIT_HIGH, NULL },
184-
{ S3C2410_GPF(5), GPIOF_OUT_INIT_HIGH, NULL },
185-
{ S3C2410_GPF(6), GPIOF_OUT_INIT_HIGH, NULL },
186-
{ S3C2410_GPF(7), GPIOF_OUT_INIT_HIGH, NULL },
187-
};
188-
189207
void __init smdk_machine_init(void)
190208
{
191-
/* Configure the LEDs (even if we have no LED support)*/
192-
193-
int ret = gpio_request_array(smdk_led_gpios,
194-
ARRAY_SIZE(smdk_led_gpios));
195-
if (!WARN_ON(ret < 0))
196-
gpio_free_array(smdk_led_gpios, ARRAY_SIZE(smdk_led_gpios));
197-
198209
if (machine_is_smdk2443())
199210
smdk_nand_info.twrph0 = 50;
200211

201212
s3c_nand_set_platdata(&smdk_nand_info);
202213

214+
/* Disable pull-up on the LED lines */
215+
s3c_gpio_setpull(S3C2410_GPF(4), S3C_GPIO_PULL_NONE);
216+
s3c_gpio_setpull(S3C2410_GPF(5), S3C_GPIO_PULL_NONE);
217+
s3c_gpio_setpull(S3C2410_GPF(6), S3C_GPIO_PULL_NONE);
218+
s3c_gpio_setpull(S3C2410_GPF(7), S3C_GPIO_PULL_NONE);
219+
220+
/* Add lookups for the lines */
221+
gpiod_add_lookup_table(&smdk_led4_gpio_table);
222+
gpiod_add_lookup_table(&smdk_led5_gpio_table);
223+
gpiod_add_lookup_table(&smdk_led6_gpio_table);
224+
gpiod_add_lookup_table(&smdk_led7_gpio_table);
225+
203226
platform_add_devices(smdk_devs, ARRAY_SIZE(smdk_devs));
204227

205228
s3c_pm_init();

arch/arm/mach-s3c24xx/mach-h1940.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Copyright (c) 2003-2005 Simtec Electronics
44
// Ben Dooks <[email protected]>
55
//
6-
// http://www.handhelds.org/projects/h1940.html
6+
// https://www.handhelds.org/projects/h1940.html
77

88
#include <linux/kernel.h>
99
#include <linux/types.h>

arch/arm/mach-s3c24xx/mach-mini2440.c

Lines changed: 55 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Weibing <http://weibing.blogbus.com> and
77
// Michel Pollet <[email protected]>
88
//
9-
// For product information, visit http://code.google.com/p/mini2440/
9+
// For product information, visit https://code.google.com/p/mini2440/
1010

1111
#include <linux/kernel.h>
1212
#include <linux/types.h>
@@ -402,37 +402,68 @@ static struct platform_device mini2440_button_device = {
402402

403403
/* LEDS */
404404

405+
static struct gpiod_lookup_table mini2440_led1_gpio_table = {
406+
.dev_id = "s3c24xx_led.1",
407+
.table = {
408+
GPIO_LOOKUP("GPB", 5, NULL, GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN),
409+
{ },
410+
},
411+
};
412+
413+
static struct gpiod_lookup_table mini2440_led2_gpio_table = {
414+
.dev_id = "s3c24xx_led.2",
415+
.table = {
416+
GPIO_LOOKUP("GPB", 6, NULL, GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN),
417+
{ },
418+
},
419+
};
420+
421+
static struct gpiod_lookup_table mini2440_led3_gpio_table = {
422+
.dev_id = "s3c24xx_led.3",
423+
.table = {
424+
GPIO_LOOKUP("GPB", 7, NULL, GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN),
425+
{ },
426+
},
427+
};
428+
429+
static struct gpiod_lookup_table mini2440_led4_gpio_table = {
430+
.dev_id = "s3c24xx_led.4",
431+
.table = {
432+
GPIO_LOOKUP("GPB", 8, NULL, GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN),
433+
{ },
434+
},
435+
};
436+
437+
static struct gpiod_lookup_table mini2440_backlight_gpio_table = {
438+
.dev_id = "s3c24xx_led.5",
439+
.table = {
440+
GPIO_LOOKUP("GPG", 4, NULL, GPIO_ACTIVE_HIGH),
441+
{ },
442+
},
443+
};
444+
405445
static struct s3c24xx_led_platdata mini2440_led1_pdata = {
406446
.name = "led1",
407-
.gpio = S3C2410_GPB(5),
408-
.flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE,
409447
.def_trigger = "heartbeat",
410448
};
411449

412450
static struct s3c24xx_led_platdata mini2440_led2_pdata = {
413451
.name = "led2",
414-
.gpio = S3C2410_GPB(6),
415-
.flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE,
416452
.def_trigger = "nand-disk",
417453
};
418454

419455
static struct s3c24xx_led_platdata mini2440_led3_pdata = {
420456
.name = "led3",
421-
.gpio = S3C2410_GPB(7),
422-
.flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE,
423457
.def_trigger = "mmc0",
424458
};
425459

426460
static struct s3c24xx_led_platdata mini2440_led4_pdata = {
427461
.name = "led4",
428-
.gpio = S3C2410_GPB(8),
429-
.flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE,
430462
.def_trigger = "",
431463
};
432464

433465
static struct s3c24xx_led_platdata mini2440_led_backlight_pdata = {
434466
.name = "backlight",
435-
.gpio = S3C2410_GPG(4),
436467
.def_trigger = "backlight",
437468
};
438469

@@ -714,6 +745,20 @@ static void __init mini2440_init(void)
714745
i2c_register_board_info(0, mini2440_i2c_devs,
715746
ARRAY_SIZE(mini2440_i2c_devs));
716747

748+
/* Disable pull-up on the LED lines */
749+
s3c_gpio_setpull(S3C2410_GPB(5), S3C_GPIO_PULL_NONE);
750+
s3c_gpio_setpull(S3C2410_GPB(6), S3C_GPIO_PULL_NONE);
751+
s3c_gpio_setpull(S3C2410_GPB(7), S3C_GPIO_PULL_NONE);
752+
s3c_gpio_setpull(S3C2410_GPB(8), S3C_GPIO_PULL_NONE);
753+
s3c_gpio_setpull(S3C2410_GPG(4), S3C_GPIO_PULL_NONE);
754+
755+
/* Add lookups for the lines */
756+
gpiod_add_lookup_table(&mini2440_led1_gpio_table);
757+
gpiod_add_lookup_table(&mini2440_led2_gpio_table);
758+
gpiod_add_lookup_table(&mini2440_led3_gpio_table);
759+
gpiod_add_lookup_table(&mini2440_led4_gpio_table);
760+
gpiod_add_lookup_table(&mini2440_backlight_gpio_table);
761+
717762
platform_add_devices(mini2440_devices, ARRAY_SIZE(mini2440_devices));
718763

719764
if (features.count) /* the optional features */

arch/arm/mach-s3c24xx/mach-n30.c

Lines changed: 49 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// Copyright (c) 2005-2008 Christer Weinigel <[email protected]>
1010
//
1111
// There is a wiki with more information about the n30 port at
12-
// http://handhelds.org/moin/moin.cgi/AcerN30Documentation .
12+
// https://handhelds.org/moin/moin.cgi/AcerN30Documentation .
1313

1414
#include <linux/kernel.h>
1515
#include <linux/types.h>
@@ -45,6 +45,7 @@
4545

4646
#include <plat/cpu.h>
4747
#include <plat/devs.h>
48+
#include <plat/gpio-cfg.h>
4849
#include <linux/platform_data/mmc-s3cmci.h>
4950
#include <linux/platform_data/usb-s3c2410_udc.h>
5051
#include <plat/samsung-time.h>
@@ -246,35 +247,64 @@ static struct platform_device n35_button_device = {
246247
};
247248

248249
/* This is the bluetooth LED on the device. */
250+
251+
static struct gpiod_lookup_table n30_blue_led_gpio_table = {
252+
.dev_id = "s3c24xx_led.1",
253+
.table = {
254+
GPIO_LOOKUP("GPG", 6, NULL, GPIO_ACTIVE_HIGH),
255+
{ },
256+
},
257+
};
258+
249259
static struct s3c24xx_led_platdata n30_blue_led_pdata = {
250260
.name = "blue_led",
251-
.gpio = S3C2410_GPG(6),
252261
.def_trigger = "",
253262
};
254263

255264
/* This is the blue LED on the device. Originally used to indicate GPS activity
256265
* by flashing. */
266+
267+
static struct gpiod_lookup_table n35_blue_led_gpio_table = {
268+
.dev_id = "s3c24xx_led.1",
269+
.table = {
270+
GPIO_LOOKUP("GPD", 8, NULL, GPIO_ACTIVE_HIGH),
271+
{ },
272+
},
273+
};
274+
257275
static struct s3c24xx_led_platdata n35_blue_led_pdata = {
258276
.name = "blue_led",
259-
.gpio = S3C2410_GPD(8),
260277
.def_trigger = "",
261278
};
262279

263280
/* This LED is driven by the battery microcontroller, and is blinking
264281
* red, blinking green or solid green when the battery is low,
265282
* charging or full respectively. By driving GPD9 low, it's possible
266283
* to force the LED to blink red, so call that warning LED. */
284+
285+
static struct gpiod_lookup_table n30_warning_led_gpio_table = {
286+
.dev_id = "s3c24xx_led.2",
287+
.table = {
288+
GPIO_LOOKUP("GPD", 9, NULL, GPIO_ACTIVE_LOW),
289+
{ },
290+
},
291+
};
292+
267293
static struct s3c24xx_led_platdata n30_warning_led_pdata = {
268294
.name = "warning_led",
269-
.flags = S3C24XX_LEDF_ACTLOW,
270-
.gpio = S3C2410_GPD(9),
271295
.def_trigger = "",
272296
};
273297

298+
static struct gpiod_lookup_table n35_warning_led_gpio_table = {
299+
.dev_id = "s3c24xx_led.2",
300+
.table = {
301+
GPIO_LOOKUP("GPD", 9, NULL, GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN),
302+
{ },
303+
},
304+
};
305+
274306
static struct s3c24xx_led_platdata n35_warning_led_pdata = {
275307
.name = "warning_led",
276-
.flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE,
277-
.gpio = S3C2410_GPD(9),
278308
.def_trigger = "",
279309
};
280310

@@ -577,6 +607,12 @@ static void __init n30_init(void)
577607
S3C2410_MISCCR_USBSUSPND0 |
578608
S3C2410_MISCCR_USBSUSPND1, 0x0);
579609

610+
/* Disable pull-up and add GPIO tables */
611+
s3c_gpio_setpull(S3C2410_GPG(6), S3C_GPIO_PULL_NONE);
612+
s3c_gpio_setpull(S3C2410_GPD(9), S3C_GPIO_PULL_NONE);
613+
gpiod_add_lookup_table(&n30_blue_led_gpio_table);
614+
gpiod_add_lookup_table(&n30_warning_led_gpio_table);
615+
580616
platform_add_devices(n30_devices, ARRAY_SIZE(n30_devices));
581617
}
582618

@@ -594,6 +630,12 @@ static void __init n30_init(void)
594630
S3C2410_MISCCR_USBSUSPND1,
595631
S3C2410_MISCCR_USBSUSPND0);
596632

633+
/* Disable pull-up and add GPIO tables */
634+
s3c_gpio_setpull(S3C2410_GPD(8), S3C_GPIO_PULL_NONE);
635+
s3c_gpio_setpull(S3C2410_GPD(9), S3C_GPIO_PULL_NONE);
636+
gpiod_add_lookup_table(&n35_blue_led_gpio_table);
637+
gpiod_add_lookup_table(&n35_warning_led_gpio_table);
638+
597639
platform_add_devices(n35_devices, ARRAY_SIZE(n35_devices));
598640
}
599641
}

0 commit comments

Comments
 (0)