diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-08-24 17:01:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-08-24 17:01:18 -0400 |
commit | 1cffe5955f1d16523e2850382f4971c5ec8da5c5 (patch) | |
tree | ed179a7248db194abd0fd6b1baeadd980b5eafda | |
parent | 311fc65c9fb9c966bca8e6f3ff8132ce57344ab9 (diff) | |
parent | 93a4c8355e0e448d83f31801b4c72f66e4360975 (diff) |
Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC fixes from Arnd Bergmann:
"A small number of bugfixes, again nothing serious.
- Alexander Dahl found multiple bugs in the Atmel memory interface
driver
- A randconfig build fix for at91 was incomplete, the second attempt
fixes the remaining corner case
- One fix for the TI Keystone queue handler
- The Odroid XU4 HDMI port (added in 4.13) needs a small DT fix"
* tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
ARM: dts: exynos: add needs-hpd for Odroid-XU3/4
ARM: at91: don't select CONFIG_ARM_CPU_SUSPEND for old platforms
soc: ti: knav: Add a NULL pointer check for kdev in knav_pool_create
memory: atmel-ebi: Fix smc cycle xlate converter
memory: atmel-ebi: Allow t_DF timings of zero ns
memory: atmel-ebi: Fix smc timing return value evaluation
-rw-r--r-- | arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 1 | ||||
-rw-r--r-- | arch/arm/mach-at91/Kconfig | 2 | ||||
-rw-r--r-- | arch/arm/mach-at91/pm.c | 12 | ||||
-rw-r--r-- | drivers/memory/atmel-ebi.c | 10 | ||||
-rw-r--r-- | drivers/mfd/atmel-smc.c | 2 | ||||
-rw-r--r-- | drivers/soc/ti/knav_qmss_queue.c | 3 |
6 files changed, 24 insertions, 6 deletions
diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi index f92f95741207..a183b56283f8 100644 --- a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +++ b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | |||
@@ -266,6 +266,7 @@ | |||
266 | 266 | ||
267 | &hdmicec { | 267 | &hdmicec { |
268 | status = "okay"; | 268 | status = "okay"; |
269 | needs-hpd; | ||
269 | }; | 270 | }; |
270 | 271 | ||
271 | &hsi2c_4 { | 272 | &hsi2c_4 { |
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index d735e5fc4772..195da38cb9a2 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | menuconfig ARCH_AT91 | 1 | menuconfig ARCH_AT91 |
2 | bool "Atmel SoCs" | 2 | bool "Atmel SoCs" |
3 | depends on ARCH_MULTI_V4T || ARCH_MULTI_V5 || ARCH_MULTI_V7 || ARM_SINGLE_ARMV7M | 3 | depends on ARCH_MULTI_V4T || ARCH_MULTI_V5 || ARCH_MULTI_V7 || ARM_SINGLE_ARMV7M |
4 | select ARM_CPU_SUSPEND if PM | 4 | select ARM_CPU_SUSPEND if PM && ARCH_MULTI_V7 |
5 | select COMMON_CLK_AT91 | 5 | select COMMON_CLK_AT91 |
6 | select GPIOLIB | 6 | select GPIOLIB |
7 | select PINCTRL | 7 | select PINCTRL |
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index 667fddac3856..5036f996e694 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c | |||
@@ -608,6 +608,9 @@ static void __init at91_pm_init(void (*pm_idle)(void)) | |||
608 | 608 | ||
609 | void __init at91rm9200_pm_init(void) | 609 | void __init at91rm9200_pm_init(void) |
610 | { | 610 | { |
611 | if (!IS_ENABLED(CONFIG_SOC_AT91RM9200)) | ||
612 | return; | ||
613 | |||
611 | at91_dt_ramc(); | 614 | at91_dt_ramc(); |
612 | 615 | ||
613 | /* | 616 | /* |
@@ -620,18 +623,27 @@ void __init at91rm9200_pm_init(void) | |||
620 | 623 | ||
621 | void __init at91sam9_pm_init(void) | 624 | void __init at91sam9_pm_init(void) |
622 | { | 625 | { |
626 | if (!IS_ENABLED(CONFIG_SOC_AT91SAM9)) | ||
627 | return; | ||
628 | |||
623 | at91_dt_ramc(); | 629 | at91_dt_ramc(); |
624 | at91_pm_init(at91sam9_idle); | 630 | at91_pm_init(at91sam9_idle); |
625 | } | 631 | } |
626 | 632 | ||
627 | void __init sama5_pm_init(void) | 633 | void __init sama5_pm_init(void) |
628 | { | 634 | { |
635 | if (!IS_ENABLED(CONFIG_SOC_SAMA5)) | ||
636 | return; | ||
637 | |||
629 | at91_dt_ramc(); | 638 | at91_dt_ramc(); |
630 | at91_pm_init(NULL); | 639 | at91_pm_init(NULL); |
631 | } | 640 | } |
632 | 641 | ||
633 | void __init sama5d2_pm_init(void) | 642 | void __init sama5d2_pm_init(void) |
634 | { | 643 | { |
644 | if (!IS_ENABLED(CONFIG_SOC_SAMA5D2)) | ||
645 | return; | ||
646 | |||
635 | at91_pm_backup_init(); | 647 | at91_pm_backup_init(); |
636 | sama5_pm_init(); | 648 | sama5_pm_init(); |
637 | } | 649 | } |
diff --git a/drivers/memory/atmel-ebi.c b/drivers/memory/atmel-ebi.c index 99e644cda4d1..ebf69ff48ae2 100644 --- a/drivers/memory/atmel-ebi.c +++ b/drivers/memory/atmel-ebi.c | |||
@@ -72,7 +72,7 @@ struct atmel_smc_timing_xlate { | |||
72 | { .name = nm, .converter = atmel_smc_cs_conf_set_pulse, .shift = pos} | 72 | { .name = nm, .converter = atmel_smc_cs_conf_set_pulse, .shift = pos} |
73 | 73 | ||
74 | #define ATMEL_SMC_CYCLE_XLATE(nm, pos) \ | 74 | #define ATMEL_SMC_CYCLE_XLATE(nm, pos) \ |
75 | { .name = nm, .converter = atmel_smc_cs_conf_set_setup, .shift = pos} | 75 | { .name = nm, .converter = atmel_smc_cs_conf_set_cycle, .shift = pos} |
76 | 76 | ||
77 | static void at91sam9_ebi_get_config(struct atmel_ebi_dev *ebid, | 77 | static void at91sam9_ebi_get_config(struct atmel_ebi_dev *ebid, |
78 | struct atmel_ebi_dev_config *conf) | 78 | struct atmel_ebi_dev_config *conf) |
@@ -120,12 +120,14 @@ static int atmel_ebi_xslate_smc_timings(struct atmel_ebi_dev *ebid, | |||
120 | if (!ret) { | 120 | if (!ret) { |
121 | required = true; | 121 | required = true; |
122 | ncycles = DIV_ROUND_UP(val, clk_period_ns); | 122 | ncycles = DIV_ROUND_UP(val, clk_period_ns); |
123 | if (ncycles > ATMEL_SMC_MODE_TDF_MAX || | 123 | if (ncycles > ATMEL_SMC_MODE_TDF_MAX) { |
124 | ncycles < ATMEL_SMC_MODE_TDF_MIN) { | ||
125 | ret = -EINVAL; | 124 | ret = -EINVAL; |
126 | goto out; | 125 | goto out; |
127 | } | 126 | } |
128 | 127 | ||
128 | if (ncycles < ATMEL_SMC_MODE_TDF_MIN) | ||
129 | ncycles = ATMEL_SMC_MODE_TDF_MIN; | ||
130 | |||
129 | smcconf->mode |= ATMEL_SMC_MODE_TDF(ncycles); | 131 | smcconf->mode |= ATMEL_SMC_MODE_TDF(ncycles); |
130 | } | 132 | } |
131 | 133 | ||
@@ -263,7 +265,7 @@ static int atmel_ebi_xslate_smc_config(struct atmel_ebi_dev *ebid, | |||
263 | } | 265 | } |
264 | 266 | ||
265 | ret = atmel_ebi_xslate_smc_timings(ebid, np, &conf->smcconf); | 267 | ret = atmel_ebi_xslate_smc_timings(ebid, np, &conf->smcconf); |
266 | if (ret) | 268 | if (ret < 0) |
267 | return -EINVAL; | 269 | return -EINVAL; |
268 | 270 | ||
269 | if ((ret > 0 && !required) || (!ret && required)) { | 271 | if ((ret > 0 && !required) || (!ret && required)) { |
diff --git a/drivers/mfd/atmel-smc.c b/drivers/mfd/atmel-smc.c index 954cf0f66a31..20cc0ea470fa 100644 --- a/drivers/mfd/atmel-smc.c +++ b/drivers/mfd/atmel-smc.c | |||
@@ -206,7 +206,7 @@ EXPORT_SYMBOL_GPL(atmel_smc_cs_conf_set_pulse); | |||
206 | * parameter | 206 | * parameter |
207 | * | 207 | * |
208 | * This function encodes the @ncycles value as described in the datasheet | 208 | * This function encodes the @ncycles value as described in the datasheet |
209 | * (section "SMC Pulse Register"), and then stores the result in the | 209 | * (section "SMC Cycle Register"), and then stores the result in the |
210 | * @conf->setup field at @shift position. | 210 | * @conf->setup field at @shift position. |
211 | * | 211 | * |
212 | * Returns -EINVAL if @shift is invalid, -ERANGE if @ncycles does not fit in | 212 | * Returns -EINVAL if @shift is invalid, -ERANGE if @ncycles does not fit in |
diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c index 279e7c5551dd..39225de9d7f1 100644 --- a/drivers/soc/ti/knav_qmss_queue.c +++ b/drivers/soc/ti/knav_qmss_queue.c | |||
@@ -745,6 +745,9 @@ void *knav_pool_create(const char *name, | |||
745 | bool slot_found; | 745 | bool slot_found; |
746 | int ret; | 746 | int ret; |
747 | 747 | ||
748 | if (!kdev) | ||
749 | return ERR_PTR(-EPROBE_DEFER); | ||
750 | |||
748 | if (!kdev->dev) | 751 | if (!kdev->dev) |
749 | return ERR_PTR(-ENODEV); | 752 | return ERR_PTR(-ENODEV); |
750 | 753 | ||