diff options
author | Tom Rini <trini@konsulko.com> | 2021-11-09 08:51:00 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-11-09 15:05:33 -0500 |
commit | e8e9c6f48400989c5fc54467576f8d535bd713e6 (patch) | |
tree | 4373b185408793bbb2ba1a9cacdd82d8a7265cad | |
parent | b842340a108f463e66aaaca75c0831a224612190 (diff) | |
parent | a80f582688fb3c961f521a978d428092f5bab483 (diff) | |
download | u-boot-e8e9c6f48400989c5fc54467576f8d535bd713e6.tar.gz u-boot-e8e9c6f48400989c5fc54467576f8d535bd713e6.tar.bz2 u-boot-e8e9c6f48400989c5fc54467576f8d535bd713e6.zip |
Merge https://source.denx.de/u-boot/custodians/u-boot-samsung
[trini: Migrate CONFIG_EXYNOS7420 as part of merging, so espresso7420
still builds]
Signed-off-by: Tom Rini <trini@konsulko.com>
-rw-r--r-- | arch/arm/mach-exynos/mmu-arm64.c | 11 | ||||
-rw-r--r-- | board/samsung/espresso7420/Kconfig | 3 | ||||
-rw-r--r-- | drivers/pinctrl/exynos/pinctrl-exynos78x0.c | 14 | ||||
-rw-r--r-- | drivers/pwm/exynos_pwm.c | 4 | ||||
-rw-r--r-- | include/configs/exynos7420-common.h | 1 |
5 files changed, 20 insertions, 13 deletions
diff --git a/arch/arm/mach-exynos/mmu-arm64.c b/arch/arm/mach-exynos/mmu-arm64.c index e3bd995143..d2c550b27d 100644 --- a/arch/arm/mach-exynos/mmu-arm64.c +++ b/arch/arm/mach-exynos/mmu-arm64.c @@ -7,7 +7,8 @@ #include <common.h> #include <asm/armv8/mmu.h> -#ifdef CONFIG_EXYNOS7420 +#if CONFIG_IS_ENABLED(EXYNOS7420) + static struct mm_region exynos7420_mem_map[] = { { .virt = 0x10000000UL, @@ -28,9 +29,9 @@ static struct mm_region exynos7420_mem_map[] = { }; struct mm_region *mem_map = exynos7420_mem_map; -#endif -#ifdef CONFIG_EXYNOS7870 +#elif CONFIG_IS_ENABLED(EXYNOS7870) + static struct mm_region exynos7870_mem_map[] = { { .virt = 0x10000000UL, @@ -61,9 +62,9 @@ static struct mm_region exynos7870_mem_map[] = { }; struct mm_region *mem_map = exynos7870_mem_map; -#endif -#ifdef CONFIG_EXYNOS7880 +#elif CONFIG_IS_ENABLED(EXYNOS7880) + static struct mm_region exynos7880_mem_map[] = { { .virt = 0x10000000UL, diff --git a/board/samsung/espresso7420/Kconfig b/board/samsung/espresso7420/Kconfig index 62251c5126..6a088a2702 100644 --- a/board/samsung/espresso7420/Kconfig +++ b/board/samsung/espresso7420/Kconfig @@ -1,5 +1,8 @@ if TARGET_ESPRESSO7420 +config EXYNOS7420 + def_bool y + config SYS_BOARD default "espresso7420" help diff --git a/drivers/pinctrl/exynos/pinctrl-exynos78x0.c b/drivers/pinctrl/exynos/pinctrl-exynos78x0.c index 01e9a4fede..1b696fdfd2 100644 --- a/drivers/pinctrl/exynos/pinctrl-exynos78x0.c +++ b/drivers/pinctrl/exynos/pinctrl-exynos78x0.c @@ -19,12 +19,12 @@ #include <asm/arch/pinmux.h> #include "pinctrl-exynos.h" -static struct pinctrl_ops exynos78x0_pinctrl_ops = { +static const struct pinctrl_ops exynos78x0_pinctrl_ops = { .set_state = exynos_pinctrl_set_state }; /* pin banks of exynos78x0 pin-controller 0 (ALIVE) */ -static struct samsung_pin_bank_data exynos78x0_pin_banks0[] = { +static const struct samsung_pin_bank_data exynos78x0_pin_banks0[] = { EXYNOS_PIN_BANK(6, 0x000, "etc0"), EXYNOS_PIN_BANK(3, 0x020, "etc1"), EXYNOS_PIN_BANK(8, 0x040, "gpa0"), @@ -35,19 +35,19 @@ static struct samsung_pin_bank_data exynos78x0_pin_banks0[] = { }; /* pin banks of exynos78x0 pin-controller 1 (CCORE) */ -static struct samsung_pin_bank_data exynos78x0_pin_banks1[] = { +static const struct samsung_pin_bank_data exynos78x0_pin_banks1[] = { EXYNOS_PIN_BANK(2, 0x000, "gpm0"), }; /* pin banks of exynos78x0 pin-controller 2 (DISPAUD) */ -static struct samsung_pin_bank_data exynos78x0_pin_banks2[] = { +static const struct samsung_pin_bank_data exynos78x0_pin_banks2[] = { EXYNOS_PIN_BANK(4, 0x000, "gpz0"), EXYNOS_PIN_BANK(6, 0x020, "gpz1"), EXYNOS_PIN_BANK(4, 0x040, "gpz2"), }; /* pin banks of exynos78x0 pin-controller 4 (FSYS) */ -static struct samsung_pin_bank_data exynos78x0_pin_banks4[] = { +static const struct samsung_pin_bank_data exynos78x0_pin_banks4[] = { EXYNOS_PIN_BANK(3, 0x000, "gpr0"), EXYNOS_PIN_BANK(8, 0x020, "gpr1"), EXYNOS_PIN_BANK(2, 0x040, "gpr2"), @@ -56,7 +56,7 @@ static struct samsung_pin_bank_data exynos78x0_pin_banks4[] = { }; /* pin banks of exynos78x0 pin-controller 6 (TOP) */ -static struct samsung_pin_bank_data exynos78x0_pin_banks6[] = { +static const struct samsung_pin_bank_data exynos78x0_pin_banks6[] = { EXYNOS_PIN_BANK(4, 0x000, "gpb0"), EXYNOS_PIN_BANK(3, 0x020, "gpc0"), EXYNOS_PIN_BANK(4, 0x040, "gpc1"), @@ -78,7 +78,7 @@ static struct samsung_pin_bank_data exynos78x0_pin_banks6[] = { EXYNOS_PIN_BANK(5, 0x240, "gpf4"), }; -struct samsung_pin_ctrl exynos78x0_pin_ctrl[] = { +const struct samsung_pin_ctrl exynos78x0_pin_ctrl[] = { { /* pin-controller instance 0 Alive data */ .pin_banks = exynos78x0_pin_banks0, diff --git a/drivers/pwm/exynos_pwm.c b/drivers/pwm/exynos_pwm.c index 1afaf784da..609025d680 100644 --- a/drivers/pwm/exynos_pwm.c +++ b/drivers/pwm/exynos_pwm.c @@ -43,6 +43,10 @@ static int exynos_pwm_set_config(struct udevice *dev, uint channel, tcnt = period_ns / rate_ns; tcmp = duty_ns / rate_ns; debug("%s: tcnt %u, tcmp %u\n", __func__, tcnt, tcmp); + + /* Ensure that the comparitor will actually hit the target */ + if (tcmp == tcnt) + tcmp = tcnt - 1; offset = channel * 3; writel(tcnt, ®s->tcntb0 + offset); writel(tcmp, ®s->tcmpb0 + offset); diff --git a/include/configs/exynos7420-common.h b/include/configs/exynos7420-common.h index 4a1ecbb832..464f927431 100644 --- a/include/configs/exynos7420-common.h +++ b/include/configs/exynos7420-common.h @@ -10,7 +10,6 @@ /* High Level Configuration Options */ #define CONFIG_SAMSUNG /* in a SAMSUNG core */ -#define CONFIG_EXYNOS7420 /* Exynos7 Family */ #define CONFIG_S5P #include <asm/arch/cpu.h> /* get chip and board defs */ |