* [PATCH 3/9] crypto: s390 - Rename functions to avoid conflict with crypto/sha256.h
From: Hans de Goede @ 2019-09-01 20:35 UTC (permalink / raw)
To: Herbert Xu, David S . Miller, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, H . Peter Anvin, Heiko Carstens, Vasily Gorbik,
Christian Borntraeger, Russell King, Catalin Marinas, Will Deacon,
Gilad Ben-Yossef, Atul Gupta
Cc: linux-s390, linux-efi, Ard Biesheuvel, Marc Zyngier, x86,
linux-kernel, Eric Biggers, Hans de Goede, linux-crypto,
Andy Lutomirski, linux-arm-kernel
In-Reply-To: <20190901203532.2615-1-hdegoede@redhat.com>
Rename static / file-local functions so that they do not conflict with
the functions declared in crypto/sha256.h.
This is a preparation patch for folding crypto/sha256.h into crypto/sha.h.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
arch/s390/crypto/sha256_s390.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/s390/crypto/sha256_s390.c b/arch/s390/crypto/sha256_s390.c
index af7505148f80..b52c87e44939 100644
--- a/arch/s390/crypto/sha256_s390.c
+++ b/arch/s390/crypto/sha256_s390.c
@@ -17,7 +17,7 @@
#include "sha.h"
-static int sha256_init(struct shash_desc *desc)
+static int s390_sha256_init(struct shash_desc *desc)
{
struct s390_sha_ctx *sctx = shash_desc_ctx(desc);
@@ -60,7 +60,7 @@ static int sha256_import(struct shash_desc *desc, const void *in)
static struct shash_alg sha256_alg = {
.digestsize = SHA256_DIGEST_SIZE,
- .init = sha256_init,
+ .init = s390_sha256_init,
.update = s390_sha_update,
.final = s390_sha_final,
.export = sha256_export,
@@ -76,7 +76,7 @@ static struct shash_alg sha256_alg = {
}
};
-static int sha224_init(struct shash_desc *desc)
+static int s390_sha224_init(struct shash_desc *desc)
{
struct s390_sha_ctx *sctx = shash_desc_ctx(desc);
@@ -96,7 +96,7 @@ static int sha224_init(struct shash_desc *desc)
static struct shash_alg sha224_alg = {
.digestsize = SHA224_DIGEST_SIZE,
- .init = sha224_init,
+ .init = s390_sha224_init,
.update = s390_sha_update,
.final = s390_sha_final,
.export = sha256_export,
--
2.23.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH 2/9] crypto: arm64 - Rename functions to avoid conflict with crypto/sha256.h
From: Hans de Goede @ 2019-09-01 20:35 UTC (permalink / raw)
To: Herbert Xu, David S . Miller, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, H . Peter Anvin, Heiko Carstens, Vasily Gorbik,
Christian Borntraeger, Russell King, Catalin Marinas, Will Deacon,
Gilad Ben-Yossef, Atul Gupta
Cc: linux-s390, linux-efi, Ard Biesheuvel, Marc Zyngier, x86,
linux-kernel, Eric Biggers, Hans de Goede, linux-crypto,
Andy Lutomirski, linux-arm-kernel
In-Reply-To: <20190901203532.2615-1-hdegoede@redhat.com>
Rename static / file-local functions so that they do not conflict with
the functions declared in crypto/sha256.h.
This is a preparation patch for folding crypto/sha256.h into crypto/sha.h.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
arch/arm64/crypto/sha256-glue.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/arch/arm64/crypto/sha256-glue.c b/arch/arm64/crypto/sha256-glue.c
index 04b9d17b0733..e273faca924f 100644
--- a/arch/arm64/crypto/sha256-glue.c
+++ b/arch/arm64/crypto/sha256-glue.c
@@ -30,15 +30,15 @@ EXPORT_SYMBOL(sha256_block_data_order);
asmlinkage void sha256_block_neon(u32 *digest, const void *data,
unsigned int num_blks);
-static int sha256_update(struct shash_desc *desc, const u8 *data,
- unsigned int len)
+static int crypto_sha256_arm64_update(struct shash_desc *desc, const u8 *data,
+ unsigned int len)
{
return sha256_base_do_update(desc, data, len,
(sha256_block_fn *)sha256_block_data_order);
}
-static int sha256_finup(struct shash_desc *desc, const u8 *data,
- unsigned int len, u8 *out)
+static int crypto_sha256_arm64_finup(struct shash_desc *desc, const u8 *data,
+ unsigned int len, u8 *out)
{
if (len)
sha256_base_do_update(desc, data, len,
@@ -49,17 +49,17 @@ static int sha256_finup(struct shash_desc *desc, const u8 *data,
return sha256_base_finish(desc, out);
}
-static int sha256_final(struct shash_desc *desc, u8 *out)
+static int crypto_sha256_arm64_final(struct shash_desc *desc, u8 *out)
{
- return sha256_finup(desc, NULL, 0, out);
+ return crypto_sha256_arm64_finup(desc, NULL, 0, out);
}
static struct shash_alg algs[] = { {
.digestsize = SHA256_DIGEST_SIZE,
.init = sha256_base_init,
- .update = sha256_update,
- .final = sha256_final,
- .finup = sha256_finup,
+ .update = crypto_sha256_arm64_update,
+ .final = crypto_sha256_arm64_final,
+ .finup = crypto_sha256_arm64_finup,
.descsize = sizeof(struct sha256_state),
.base.cra_name = "sha256",
.base.cra_driver_name = "sha256-arm64",
@@ -69,9 +69,9 @@ static struct shash_alg algs[] = { {
}, {
.digestsize = SHA224_DIGEST_SIZE,
.init = sha224_base_init,
- .update = sha256_update,
- .final = sha256_final,
- .finup = sha256_finup,
+ .update = crypto_sha256_arm64_update,
+ .final = crypto_sha256_arm64_final,
+ .finup = crypto_sha256_arm64_finup,
.descsize = sizeof(struct sha256_state),
.base.cra_name = "sha224",
.base.cra_driver_name = "sha224-arm64",
--
2.23.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH 1/9] crypto: arm - Rename functions to avoid conflict with crypto/sha256.h
From: Hans de Goede @ 2019-09-01 20:35 UTC (permalink / raw)
To: Herbert Xu, David S . Miller, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, H . Peter Anvin, Heiko Carstens, Vasily Gorbik,
Christian Borntraeger, Russell King, Catalin Marinas, Will Deacon,
Gilad Ben-Yossef, Atul Gupta
Cc: linux-s390, linux-efi, Ard Biesheuvel, Marc Zyngier, x86,
linux-kernel, Eric Biggers, Hans de Goede, linux-crypto,
Andy Lutomirski, linux-arm-kernel
In-Reply-To: <20190901203532.2615-1-hdegoede@redhat.com>
Rename static / file-local functions so that they do not conflict with
the functions declared in crypto/sha256.h.
This is a preparation patch for folding crypto/sha256.h into crypto/sha.h.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
arch/arm/crypto/sha256_glue.c | 8 ++++----
arch/arm/crypto/sha256_neon_glue.c | 24 ++++++++++++------------
2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/arch/arm/crypto/sha256_glue.c b/arch/arm/crypto/sha256_glue.c
index 70efa9656bff..215497f011f2 100644
--- a/arch/arm/crypto/sha256_glue.c
+++ b/arch/arm/crypto/sha256_glue.c
@@ -39,7 +39,7 @@ int crypto_sha256_arm_update(struct shash_desc *desc, const u8 *data,
}
EXPORT_SYMBOL(crypto_sha256_arm_update);
-static int sha256_final(struct shash_desc *desc, u8 *out)
+static int crypto_sha256_arm_final(struct shash_desc *desc, u8 *out)
{
sha256_base_do_finalize(desc,
(sha256_block_fn *)sha256_block_data_order);
@@ -51,7 +51,7 @@ int crypto_sha256_arm_finup(struct shash_desc *desc, const u8 *data,
{
sha256_base_do_update(desc, data, len,
(sha256_block_fn *)sha256_block_data_order);
- return sha256_final(desc, out);
+ return crypto_sha256_arm_final(desc, out);
}
EXPORT_SYMBOL(crypto_sha256_arm_finup);
@@ -59,7 +59,7 @@ static struct shash_alg algs[] = { {
.digestsize = SHA256_DIGEST_SIZE,
.init = sha256_base_init,
.update = crypto_sha256_arm_update,
- .final = sha256_final,
+ .final = crypto_sha256_arm_final,
.finup = crypto_sha256_arm_finup,
.descsize = sizeof(struct sha256_state),
.base = {
@@ -73,7 +73,7 @@ static struct shash_alg algs[] = { {
.digestsize = SHA224_DIGEST_SIZE,
.init = sha224_base_init,
.update = crypto_sha256_arm_update,
- .final = sha256_final,
+ .final = crypto_sha256_arm_final,
.finup = crypto_sha256_arm_finup,
.descsize = sizeof(struct sha256_state),
.base = {
diff --git a/arch/arm/crypto/sha256_neon_glue.c b/arch/arm/crypto/sha256_neon_glue.c
index a7ce38a36006..38645e415196 100644
--- a/arch/arm/crypto/sha256_neon_glue.c
+++ b/arch/arm/crypto/sha256_neon_glue.c
@@ -25,8 +25,8 @@
asmlinkage void sha256_block_data_order_neon(u32 *digest, const void *data,
unsigned int num_blks);
-static int sha256_update(struct shash_desc *desc, const u8 *data,
- unsigned int len)
+static int crypto_sha256_neon_update(struct shash_desc *desc, const u8 *data,
+ unsigned int len)
{
struct sha256_state *sctx = shash_desc_ctx(desc);
@@ -42,8 +42,8 @@ static int sha256_update(struct shash_desc *desc, const u8 *data,
return 0;
}
-static int sha256_finup(struct shash_desc *desc, const u8 *data,
- unsigned int len, u8 *out)
+static int crypto_sha256_neon_finup(struct shash_desc *desc, const u8 *data,
+ unsigned int len, u8 *out)
{
if (!crypto_simd_usable())
return crypto_sha256_arm_finup(desc, data, len, out);
@@ -59,17 +59,17 @@ static int sha256_finup(struct shash_desc *desc, const u8 *data,
return sha256_base_finish(desc, out);
}
-static int sha256_final(struct shash_desc *desc, u8 *out)
+static int crypto_sha256_neon_final(struct shash_desc *desc, u8 *out)
{
- return sha256_finup(desc, NULL, 0, out);
+ return crypto_sha256_neon_finup(desc, NULL, 0, out);
}
struct shash_alg sha256_neon_algs[] = { {
.digestsize = SHA256_DIGEST_SIZE,
.init = sha256_base_init,
- .update = sha256_update,
- .final = sha256_final,
- .finup = sha256_finup,
+ .update = crypto_sha256_neon_update,
+ .final = crypto_sha256_neon_final,
+ .finup = crypto_sha256_neon_finup,
.descsize = sizeof(struct sha256_state),
.base = {
.cra_name = "sha256",
@@ -81,9 +81,9 @@ struct shash_alg sha256_neon_algs[] = { {
}, {
.digestsize = SHA224_DIGEST_SIZE,
.init = sha224_base_init,
- .update = sha256_update,
- .final = sha256_final,
- .finup = sha256_finup,
+ .update = crypto_sha256_neon_update,
+ .final = crypto_sha256_neon_final,
+ .finup = crypto_sha256_neon_finup,
.descsize = sizeof(struct sha256_state),
.base = {
.cra_name = "sha224",
--
2.23.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH 0/9] crypto: sha256 - Merge crypto/sha256.h into crypto/sha.h
From: Hans de Goede @ 2019-09-01 20:35 UTC (permalink / raw)
To: Herbert Xu, David S . Miller, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, H . Peter Anvin, Heiko Carstens, Vasily Gorbik,
Christian Borntraeger, Russell King, Catalin Marinas, Will Deacon,
Gilad Ben-Yossef, Atul Gupta
Cc: linux-s390, linux-efi, Ard Biesheuvel, Marc Zyngier, x86,
linux-kernel, Eric Biggers, Hans de Goede, linux-crypto,
Andy Lutomirski, linux-arm-kernel
Hi All,
As promised here is a follow-up series to my earlier sha256 series.
Note I have only compiled and tested this series on x86_64 !!
All changes to architecture specific code on other archs have not even
been tested to compile! With that said most of these changes were done
using my editors search - replace function so things should be fine...
(and FWIW I did do a Kconfig hack to compile test the ccree change).
The first patch in this series rename various file local functions /
arrays to avoid conflicts with the new include/crypto/sha256.h, followed
by a patch merging include/crypto/sha256.h into include/crypto/sha.h.
The last patch makes use of this merging to remove a bit more code
duplication, making sha256_generic use sha256_init and sha224_init from
lib/crypto/sha256.c. An added advantage of this, is that this gives these
2 functions coverage by the crypto selftests.
Regards,
Hans
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH] spi: ep93xx: Repair SPI CS lookup tables
From: Linus Walleij @ 2019-09-01 20:16 UTC (permalink / raw)
To: Alexander Sverdlin
Cc: Hartley Sweeten, Russell King, stable, linux-spi,
open list:GPIO SUBSYSTEM, Mark Brown, Lukasz Majewski, Linux ARM
In-Reply-To: <20190831180402.10008-1-alexander.sverdlin@gmail.com>
On Sat, Aug 31, 2019 at 8:05 PM Alexander Sverdlin
<alexander.sverdlin@gmail.com> wrote:
> The actual device name of the SPI controller being registered on EP93xx is
> "spi0" (as seen by gpiod_find_lookup_table()). This patch fixes all
> relevant lookup tables and the following failure (seen on EDB9302):
>
> ep93xx-spi ep93xx-spi.0: failed to register SPI master
> ep93xx-spi: probe of ep93xx-spi.0 failed with error -22
>
> Fixes: 1dfbf334f1236 ("spi: ep93xx: Convert to use CS GPIO descriptors")
> Cc: stable@vger.kernel.org
> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Sorry for the mistakes and thanks for fixing, much appreciated!
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH v6 12/13] MAINTAINERS: add Mediatek shutdown drivers
From: Sebastian Reichel @ 2019-09-01 20:12 UTC (permalink / raw)
To: Frank Wunderlich
Cc: linux-rtc, devicetree, Alexandre Belloni, Eddie Huang,
linux-arm-kernel @ lists . infradead . org Alessandro Zummo,
linux-pm, Sean Wang, Josef Friedl, linux-kernel, Rob Herring,
linux-mediatek, Matthias Brugger, Mark Rutland, Tianping Fang,
Lee Jones, linux-arm-kernel
In-Reply-To: <20190818135611.7776-13-frank-w@public-files.de>
[-- Attachment #1.1: Type: text/plain, Size: 1394 bytes --]
Hi,
On Sun, Aug 18, 2019 at 03:56:10PM +0200, Frank Wunderlich wrote:
> From: Josef Friedl <josef.friedl@speed.at>
>
> add Section in MAINTAINERS file for poweroff driver
>
> Signed-off-by: Josef Friedl <josef.friedl@speed.at>
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
> ---
> changes since v5: none
> changes since v4: none
> changes since v3: moved SOB
> changes since v2: none (=v2 part 6)
> ---
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>
-- Sebastian
> MAINTAINERS | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 6426db5198f0..4172a3177633 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -10128,6 +10128,13 @@ S: Maintained
> F: drivers/net/dsa/mt7530.*
> F: net/dsa/tag_mtk.c
>
> +MEDIATEK BOARD LEVEL SHUTDOWN DRIVERS
> +M: Sean Wang <sean.wang@mediatek.com>
> +L: linux-pm@vger.kernel.org
> +S: Maintained
> +F: Documentation/devicetree/bindings/power/reset/mt6323-poweroff.txt
> +F: drivers/power/reset/mt6323-poweroff.c
> +
> MEDIATEK JPEG DRIVER
> M: Rick Chang <rick.chang@mediatek.com>
> M: Bin Liu <bin.liu@mediatek.com>
> --
> 2.17.1
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH v6 11/13] power: reset: add driver for mt6323 poweroff
From: Sebastian Reichel @ 2019-09-01 20:11 UTC (permalink / raw)
To: Frank Wunderlich
Cc: linux-rtc, devicetree, Alexandre Belloni, Eddie Huang,
linux-arm-kernel @ lists . infradead . org Alessandro Zummo,
linux-pm, Sean Wang, Josef Friedl, linux-kernel, Rob Herring,
linux-mediatek, Matthias Brugger, Mark Rutland, Tianping Fang,
Lee Jones, linux-arm-kernel
In-Reply-To: <20190818135611.7776-12-frank-w@public-files.de>
[-- Attachment #1.1: Type: text/plain, Size: 5568 bytes --]
Hi,
On Sun, Aug 18, 2019 at 03:56:09PM +0200, Frank Wunderlich wrote:
> From: Josef Friedl <josef.friedl@speed.at>
>
> add poweroff driver for mt6323 and make Makefile and Kconfig-Entries
>
> Suggested-by: Frank Wunderlich <frank-w@public-files.de>
> Signed-off-by: Josef Friedl <josef.friedl@speed.at>
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
> ---
> changes since v5: split out mfd/mt6397/core.h
> changes since v4: none
> changes since v3: none
> changes since v2: none (=v2 part 5)
> ---
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>
-- Sebastian
> drivers/power/reset/Kconfig | 10 +++
> drivers/power/reset/Makefile | 1 +
> drivers/power/reset/mt6323-poweroff.c | 97 +++++++++++++++++++++++++++
> 3 files changed, 108 insertions(+)
> create mode 100644 drivers/power/reset/mt6323-poweroff.c
>
> diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig
> index a564237278ff..c721939767eb 100644
> --- a/drivers/power/reset/Kconfig
> +++ b/drivers/power/reset/Kconfig
> @@ -140,6 +140,16 @@ config POWER_RESET_LTC2952
> This driver supports an external powerdown trigger and board power
> down via the LTC2952. Bindings are made in the device tree.
>
> +config POWER_RESET_MT6323
> + bool "MediaTek MT6323 power-off driver"
> + depends on MFD_MT6397
> + help
> + The power-off driver is responsible for externally shutdown down
> + the power of a remote MediaTek SoC MT6323 is connected to through
> + controlling a tiny circuit BBPU inside MT6323 RTC.
> +
> + Say Y if you have a board where MT6323 could be found.
> +
> config POWER_RESET_QNAP
> bool "QNAP power-off driver"
> depends on OF_GPIO && PLAT_ORION
> diff --git a/drivers/power/reset/Makefile b/drivers/power/reset/Makefile
> index 85da3198e4e0..da37f8b851dc 100644
> --- a/drivers/power/reset/Makefile
> +++ b/drivers/power/reset/Makefile
> @@ -11,6 +11,7 @@ obj-$(CONFIG_POWER_RESET_GPIO) += gpio-poweroff.o
> obj-$(CONFIG_POWER_RESET_GPIO_RESTART) += gpio-restart.o
> obj-$(CONFIG_POWER_RESET_HISI) += hisi-reboot.o
> obj-$(CONFIG_POWER_RESET_MSM) += msm-poweroff.o
> +obj-$(CONFIG_POWER_RESET_MT6323) += mt6323-poweroff.o
> obj-$(CONFIG_POWER_RESET_QCOM_PON) += qcom-pon.o
> obj-$(CONFIG_POWER_RESET_OCELOT_RESET) += ocelot-reset.o
> obj-$(CONFIG_POWER_RESET_PIIX4_POWEROFF) += piix4-poweroff.o
> diff --git a/drivers/power/reset/mt6323-poweroff.c b/drivers/power/reset/mt6323-poweroff.c
> new file mode 100644
> index 000000000000..1caf43d9e46d
> --- /dev/null
> +++ b/drivers/power/reset/mt6323-poweroff.c
> @@ -0,0 +1,97 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Power off through MediaTek PMIC
> + *
> + * Copyright (C) 2018 MediaTek Inc.
> + *
> + * Author: Sean Wang <sean.wang@mediatek.com>
> + *
> + */
> +
> +#include <linux/err.h>
> +#include <linux/module.h>
> +#include <linux/of.h>
> +#include <linux/platform_device.h>
> +#include <linux/mfd/mt6397/core.h>
> +#include <linux/mfd/mt6397/rtc.h>
> +
> +struct mt6323_pwrc {
> + struct device *dev;
> + struct regmap *regmap;
> + u32 base;
> +};
> +
> +static struct mt6323_pwrc *mt_pwrc;
> +
> +static void mt6323_do_pwroff(void)
> +{
> + struct mt6323_pwrc *pwrc = mt_pwrc;
> + unsigned int val;
> + int ret;
> +
> + regmap_write(pwrc->regmap, pwrc->base + RTC_BBPU, RTC_BBPU_KEY);
> + regmap_write(pwrc->regmap, pwrc->base + RTC_WRTGR, 1);
> +
> + ret = regmap_read_poll_timeout(pwrc->regmap,
> + pwrc->base + RTC_BBPU, val,
> + !(val & RTC_BBPU_CBUSY),
> + MTK_RTC_POLL_DELAY_US,
> + MTK_RTC_POLL_TIMEOUT);
> + if (ret)
> + dev_err(pwrc->dev, "failed to write BBPU: %d\n", ret);
> +
> + /* Wait some time until system down, otherwise, notice with a warn */
> + mdelay(1000);
> +
> + WARN_ONCE(1, "Unable to power off system\n");
> +}
> +
> +static int mt6323_pwrc_probe(struct platform_device *pdev)
> +{
> + struct mt6397_chip *mt6397_chip = dev_get_drvdata(pdev->dev.parent);
> + struct mt6323_pwrc *pwrc;
> + struct resource *res;
> +
> + pwrc = devm_kzalloc(&pdev->dev, sizeof(*pwrc), GFP_KERNEL);
> + if (!pwrc)
> + return -ENOMEM;
> +
> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> + pwrc->base = res->start;
> + pwrc->regmap = mt6397_chip->regmap;
> + pwrc->dev = &pdev->dev;
> + mt_pwrc = pwrc;
> +
> + pm_power_off = &mt6323_do_pwroff;
> +
> + return 0;
> +}
> +
> +static int mt6323_pwrc_remove(struct platform_device *pdev)
> +{
> + if (pm_power_off == &mt6323_do_pwroff)
> + pm_power_off = NULL;
> +
> + return 0;
> +}
> +
> +static const struct of_device_id mt6323_pwrc_dt_match[] = {
> + { .compatible = "mediatek,mt6323-pwrc" },
> + {},
> +};
> +MODULE_DEVICE_TABLE(of, mt6323_pwrc_dt_match);
> +
> +static struct platform_driver mt6323_pwrc_driver = {
> + .probe = mt6323_pwrc_probe,
> + .remove = mt6323_pwrc_remove,
> + .driver = {
> + .name = "mt6323-pwrc",
> + .of_match_table = mt6323_pwrc_dt_match,
> + },
> +};
> +
> +module_platform_driver(mt6323_pwrc_driver);
> +
> +MODULE_DESCRIPTION("Poweroff driver for MT6323 PMIC");
> +MODULE_AUTHOR("Sean Wang <sean.wang@mediatek.com>");
> +MODULE_LICENSE("GPL v2");
> --
> 2.17.1
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: next-20190830 on Droid 4 was Re: [PATCH 0/4] musb host improvments mostly for omap2430 glue
From: Pavel Machek @ 2019-09-01 19:49 UTC (permalink / raw)
To: Pavel Machek
Cc: Jacopo Mondi, mpartap, Tony Lindgren, Greg Kroah-Hartman, merlijn,
linux-usb, kernel list, sre, nekit1000, Michael Scott, linux-omap,
Bin Liu, linux-arm-kernel
In-Reply-To: <20190901193925.GA30586@amd>
[-- Attachment #1.1: Type: text/plain, Size: 2423 bytes --]
On Sun 2019-09-01 21:39:25, Pavel Machek wrote:
> Hi!
>
> > So I ended up cleaning up omap2430 glue layer a bit for host mode with the
> > various reproducable errors I was seeing docking droid4 to a lapdock. There
> > are a few fixes, and then we end up removing all the devctl register tinkering
> > for omap2430 glue layer.
>
> I thought I'd test this, so I took
>
> commit 6d028043b55e54f48fbdf62ea8ce11a4ad830cac
> Add linux-next specific files for 20190830
>
> Series (and the other two patches you sent around it) applies ok, but
> the result does not boot.
Hmm. Maybe I'm just having problem with the backlight. I do see
regulator failure:
[ 2.143920] cpcap-usb-phy cpcap-usb-phy.0: using device tree for
GPIO lookup
[ 2.151031] of_get_named_gpiod_flags: parsed 'mode-gpios' property
of node ')
[ 2.166015] gpio gpiochip2: Persistence not supported for GPIO 28
214935] ------------[ cut here ]------------
[ 2.219604] WARNING: CPU: 0 PID: 1 at drivers/regulator/core.c:2040
_regulat0
[ 2.228118] Modules linked in:
[ 2.231201] CPU: 0 PID: 1 Comm: swapper/0 Not tainted
5.3.0-rc6-next-20190834
[ 2.238800] Hardware name: Generic OMAP4 (Flattened Device Tree)
[ 2.244873] [<c010f224>] (unwind_backtrace) from [<c010b4fc>]
(show_stack+0x)
[ 2.252655] [<c010b4fc>] (show_stack) from [<c08ca584>]
(dump_stack+0xa8/0xc)
and some drm problems:
[ 59.303253] omap-mcbsp 40124000.mcbsp: CLKS: could not clk_get()
prcm_fck
[ 59.311492] ------------[ cut here ]------------
[ 59.314666] WARNING: CPU: 0 PID: 2704 at
drivers/gpu/drm/omapdrm/dss/hdmi4.c0
[ 59.325866] Modules linked in:
[ 59.328948] CPU: 0 PID: 2704 Comm: alsa-sink-HDMI Tainted: G
W 4
[ 59.337982] Hardware name: Generic OMAP4 (Flattened Device Tree)
[ 59.344757] [<c010f224>] (unwind_backtrace) from [<c010b4fc>]
(show_stack+0x)
[ 59.352569] [<c010b4fc>] (show_stack) from [<c08ca584>]
(dump_stack+0xa8/0xc)
[ 59.359832] [<c08ca584>] (dump_stack) from [<c012de94>]
(__warn+0xc8/0xf0)
But I get login prompt on the serial. And after I do:
root@devuan:/sys/class/leds/lm3532::backlight# echo 255 > brightness
I can even see X are running.
Good so far :-).
Best regards, Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* next-20190830 on Droid 4 was Re: [PATCH 0/4] musb host improvments mostly for omap2430 glue
From: Pavel Machek @ 2019-09-01 19:39 UTC (permalink / raw)
To: Tony Lindgren, kernel list, linux-arm-kernel, linux-omap, sre,
nekit1000, mpartap, merlijn
Cc: Jacopo Mondi, Marcel Partap, Greg Kroah-Hartman, Merlijn Wajer,
linux-usb, Sebastian Reichel, NeKit, Michael Scott, linux-omap,
Bin Liu
In-Reply-To: <20190830232058.53414-1-tony@atomide.com>
[-- Attachment #1.1: Type: text/plain, Size: 748 bytes --]
Hi!
> So I ended up cleaning up omap2430 glue layer a bit for host mode with the
> various reproducable errors I was seeing docking droid4 to a lapdock. There
> are a few fixes, and then we end up removing all the devctl register tinkering
> for omap2430 glue layer.
I thought I'd test this, so I took
commit 6d028043b55e54f48fbdf62ea8ce11a4ad830cac
Add linux-next specific files for 20190830
Series (and the other two patches you sent around it) applies ok, but
the result does not boot.
Hmm.
I guess I'll need to resurrect the serial port cable.
Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [PATCH 2/2] arm64: defconfig: enable NET_SCHED
From: Florian Klink @ 2019-09-01 17:51 UTC (permalink / raw)
To: linux-arm-kernel; +Cc: Florian Klink, Toke Høiland-Jørgensen
In-Reply-To: <20190901175137.32672-1-flokli@flokli.de>
This enables QoS and/or fair queueing, and allows to build and configure
various schedulers.
Those are widely used already in desktop systems and routers, and
present in x86_64_defconfig as well.
Cc: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: Florian Klink <flokli@flokli.de>
---
arch/arm64/configs/defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 0e58ef02880c..7f8d79d6899c 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -135,6 +135,7 @@ CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m
CONFIG_NETFILTER_XT_TARGET_LOG=m
CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
+CONFIG_NET_SCHED=y
CONFIG_IP_NF_IPTABLES=m
CONFIG_IP_NF_FILTER=m
CONFIG_IP_NF_TARGET_REJECT=m
--
2.22.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH 1/2] ARM: multi_v7_defconfig: enable NET_SCHED
From: Florian Klink @ 2019-09-01 17:51 UTC (permalink / raw)
To: linux-arm-kernel; +Cc: Florian Klink, Toke Høiland-Jørgensen
This enables QoS and/or fair queueing, and allows to build and configure
various schedulers.
Those are widely used already in desktop systems and routers, and
present in x86_64_defconfig as well.
Cc: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: Florian Klink <flokli@flokli.de>
---
arch/arm/configs/multi_v7_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index 6a40bc2ef271..778265f19b8f 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -132,6 +132,7 @@ CONFIG_MODULE_UNLOAD=y
CONFIG_PARTITION_ADVANCED=y
CONFIG_CMDLINE_PARTITION=y
CONFIG_NET=y
+CONFIG_NET_SCHED=y
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_INET=y
--
2.22.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH] PCI: aardvark: Don't rely on jiffies while holding spinlock
From: Remi Pommarel @ 2019-09-01 14:23 UTC (permalink / raw)
To: Thomas Petazzoni, Lorenzo Pieralisi, Bjorn Helgaas
Cc: linux-pci, Remi Pommarel, linux-kernel, linux-arm-kernel
advk_pcie_wait_pio() can be called while holding a spinlock (from
pci_bus_read_config_dword()), then depends on jiffies in order to
timeout while polling on PIO state registers. In the case the PIO
transaction failed, the timeout will never happen and will also cause
the cpu to stall.
This decrements a variable and wait instead of using jiffies.
Signed-off-by: Remi Pommarel <repk@triplefau.lt>
---
drivers/pci/controller/pci-aardvark.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/controller/pci-aardvark.c
index fc0fe4d4de49..1fa6d04ad7aa 100644
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
@@ -175,7 +175,8 @@
(PCIE_CONF_BUS(bus) | PCIE_CONF_DEV(PCI_SLOT(devfn)) | \
PCIE_CONF_FUNC(PCI_FUNC(devfn)) | PCIE_CONF_REG(where))
-#define PIO_TIMEOUT_MS 1
+#define PIO_RETRY_CNT 10
+#define PIO_RETRY_DELAY 100 /* 100 us*/
#define LINK_WAIT_MAX_RETRIES 10
#define LINK_WAIT_USLEEP_MIN 90000
@@ -383,17 +384,16 @@ static void advk_pcie_check_pio_status(struct advk_pcie *pcie)
static int advk_pcie_wait_pio(struct advk_pcie *pcie)
{
struct device *dev = &pcie->pdev->dev;
- unsigned long timeout;
+ size_t i;
- timeout = jiffies + msecs_to_jiffies(PIO_TIMEOUT_MS);
-
- while (time_before(jiffies, timeout)) {
+ for (i = 0; i < PIO_RETRY_CNT; ++i) {
u32 start, isr;
start = advk_readl(pcie, PIO_START);
isr = advk_readl(pcie, PIO_ISR);
if (!start && isr)
return 0;
+ udelay(PIO_RETRY_DELAY);
}
dev_err(dev, "config read/write timed out\n");
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* Re: [PATCHv1 3/3] arm64: dts: meson: odroid-c2: Add missing regulator linked to HDMI supply
From: Anand Moon @ 2019-09-01 13:58 UTC (permalink / raw)
To: Martin Blumenstingl
Cc: devicetree, Neil Armstrong, Kevin Hilman, Linux Kernel,
Rob Herring, linux-amlogic, linux-arm-kernel, Jerome Brunet
In-Reply-To: <CAFBinCB9NPtncyJCMWDbbzJnQafeaY5U3XHh=NuRZSCNDdO=Hg@mail.gmail.com>
Hi Martin,
On Sun, 1 Sep 2019 at 17:14, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
>
> Hi Anand,
>
> On Wed, Aug 28, 2019 at 10:27 PM Anand Moon <linux.amoon@gmail.com> wrote:
> >
> > As per shematics HDMI_P5V0 is supplied by P5V0 so add missing link.
> typo: "schematics"
>
> > Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> > Cc: Jerome Brunet <jbrunet@baylibre.com>
> > Cc: Neil Armstrong <narmstrong@baylibre.com>
> > Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> > ---
> > arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> > index a078a1ee5004..47789fd50415 100644
> > --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> > +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> > @@ -213,6 +213,8 @@
> > status = "okay";
> > pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
> > pinctrl-names = "default";
> > + /* AP2331SA-7 */
> > + hdmi-supply = <&p5v0>;
> > };
> my understanding based on odroid-c2_rev0.1_20150930.pdf is that:
> - there's a (fixed) hdmi_p5v0 regulator using p5v0 as input
> - the hdmi_p5v0 is the hdmi-supply
>
> it doesn't change the functionality of this patch (since both supplies
> are fixed regulators anyways)
> you are already doing a nice cleanup with this series, so it would be
> a shame to take a shortcut here
>
I could not find gpio control pin which could be used to enable
hdmi-supply node.
So that the reason for direct linking this to p5v0 node.
But looking back at the schematics it and datasheet their are two more
regulator supplies to HDMI.
HDMITX_AVDD33-1 ---- VDDIO_AO3V3
HDMITX_AVDD18-1 ---- VCC1V8
Need to check the hdmi driver if these need to enable.
Best Regards
-Anand
>
> Martin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCHv1 1/3] arm64: dts: meson: odroid-c2: Add missing regulator linked to P5V0 regulator
From: Anand Moon @ 2019-09-01 13:57 UTC (permalink / raw)
To: Martin Blumenstingl
Cc: devicetree, Neil Armstrong, Kevin Hilman, Linux Kernel,
Rob Herring, linux-amlogic, linux-arm-kernel, Jerome Brunet
In-Reply-To: <CAFBinCBWq0LcdA1-a5W06zKp0RzGs5_=Mph6StGKXJ7npCgbfg@mail.gmail.com>
Hi Martin,
Thanks for your review comments.
Their have been some revision changes in S905 Odroid Schematics.
[0] https://dn.odroid.com/S905/Schematic/
Well I have make my changes based on old odroid-c2_rev0.2_20151218.pdf
On Sun, 1 Sep 2019 at 17:07, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
>
> On Wed, Aug 28, 2019 at 10:27 PM Anand Moon <linux.amoon@gmail.com> wrote:
> >
> > As per shematics VDDIO_AO18, VDDIO_AO3V3/VDD3V3 DDR3_1V5/DDR_VDDC:
> typo: "schematics"
>
OK. next time will run spell check before I send these changes.
> > fixed regulator output which is supplied by P5V0.
> >
> > Rename vcc3v3 regulator node to vddio_ao3v3 as per shematics.
> typo: "schematics"
Ok.
>
> according to the schematics there's both:
> - VDDIO_AO3V3
> - VCC3V3 (which is turned on by VDDIO_AO3V3, see [0])
>
From the schematics it seams same.
VDDIO_AO3V3---DMG340LSQN4 (Q4)---VCC3V3
But this name change was done to link TFLASH_VDD_EN to TFLASH_VDD for eMMC
VDDIO_AO3V3-----TFLASH_VDD using TFLASH_VDD_EN gpio pin.
Well I have tested this changes on eMMC module.
> > Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> > Cc: Jerome Brunet <jbrunet@baylibre.com>
> > Cc: Neil Armstrong <narmstrong@baylibre.com>
> > Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> > ---
> > .../boot/dts/amlogic/meson-gxbb-odroidc2.dts | 29 +++++++++++++++++--
> > 1 file changed, 26 insertions(+), 3 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> > index 792698a60a12..98e742bf44c1 100644
> > --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> > +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> > @@ -104,11 +104,34 @@
> > regulator-max-microvolt = <1800000>;
> > };
> >
> > - vcc3v3: regulator-vcc3v3 {
> > + vddio_ao1v8: regulator-vddio-ao1v8 {
> > compatible = "regulator-fixed";
> > - regulator-name = "VCC3V3";
> > + regulator-name = "VDDIO_AO1V8";
> > + regulator-min-microvolt = <1800000>;
> > + regulator-max-microvolt = <1800000>;
> > + regulator-always-on;
> > + /* U17 RT9179GB */
> > + vin-supply = <&p5v0>;
> > + };
> > +
> > + vddio_ao3v3: regulator-vddio-ao3v3 {
> > + compatible = "regulator-fixed";
> > + regulator-name = "VDDIO_AO3V3";
> > regulator-min-microvolt = <3300000>;
> > regulator-max-microvolt = <3300000>;
> > + regulator-always-on;
> > + /* U11 MP2161GJ-C499 */
> > + vin-supply = <&p5v0>;
> > + };
> > +
> > + vddc_ddr: regulator-vddc-ddr {
> > + compatible = "regulator-fixed";
> > + regulator-name = "DDR_VDDC";
> personally I would call this (along with the node name and alias) DDR3_1V5
> odroid-c2_rev0.1_20150930.pdf shows that DDR3_1V5 and DDR_VDDC are
> both the same. however, the DDR_VDDC signal name is not used by any
> component in the datasheet
Ok Thanks I will change this to DDR3_1V5 as per the datasheet.
>
> > + regulator-min-microvolt = <1500000>;
> > + regulator-max-microvolt = <1500000>;
> > + regulator-always-on;
> > + /* U15 MP2161GJ-C499 */
> > + vin-supply = <&p5v0>;
> > };
> >
> > emmc_pwrseq: emmc-pwrseq {
> > @@ -301,7 +324,7 @@
> > mmc-hs200-1_8v;
> >
> > mmc-pwrseq = <&emmc_pwrseq>;
> > - vmmc-supply = <&vcc3v3>;
> > + vmmc-supply = <&vddio_ao3v3>;
> odroid-c2_rev0.1_20150930.pdf uses VCC3V3 as supply
>
>
> Martin
Best Regards
-Anand
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCHv1 2/3] arm64: dts: meson: odroid-c2: Add missing regulator linked to VDDIO_AO3V3 regulator
From: Anand Moon @ 2019-09-01 13:56 UTC (permalink / raw)
To: Martin Blumenstingl
Cc: devicetree, Neil Armstrong, Kevin Hilman, Linux Kernel,
Rob Herring, linux-amlogic, linux-arm-kernel, Jerome Brunet
In-Reply-To: <CAFBinCBA-sQcshd9iAVn=ZDBKkDN3OgJs-WjKEhVLw===b0AdQ@mail.gmail.com>
Hi Martin,
Thanks of your review comments.
On Sun, 1 Sep 2019 at 17:11, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
>
> On Wed, Aug 28, 2019 at 10:27 PM Anand Moon <linux.amoon@gmail.com> wrote:
> >
> > As per shematics TFLASH_VDD, TF_IO, VCC3V3 fixed regulator output which
> typo: "schematics"
>
Ok
> > is supplied by VDDIO_AO3V3.
> please add a short sentence to the description (since you probably
> have to re-send a v2) like:
> "While here, move the comment name with the signal name in the
> schematics above the gpio property to make it consistent with other
> regulators"
>
Ok I will append this in next version.
> > Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> > Cc: Jerome Brunet <jbrunet@baylibre.com>
> > Cc: Neil Armstrong <narmstrong@baylibre.com>
> > Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> with the patch rebased (see below) and the two issues from above addressed:
> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
>
> > ---
> > arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 13 ++++++++++---
> > 1 file changed, 10 insertions(+), 3 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> > index 98e742bf44c1..a078a1ee5004 100644
> > --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> > +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> > @@ -67,17 +67,19 @@
> > };
> >
> > tflash_vdd: regulator-tflash_vdd {
> > - /*
> > - * signal name from schematics: TFLASH_VDD_EN
> > - */
> > compatible = "regulator-fixed";
> >
> > regulator-name = "TFLASH_VDD";
> > regulator-min-microvolt = <3300000>;
> > regulator-max-microvolt = <3300000>;
> >
> > + /*
> > + * signal name from schematics: TFLASH_VDD_EN
> > + */
> > gpio = <&gpio GPIOY_12 GPIO_ACTIVE_HIGH>;
> > enable-active-high;
> > + /* U16 RT9179GB */
> > + vin-supply = <&vddio_ao3v3>;
> > };
> >
> > tf_io: gpio-regulator-tf_io {
> > @@ -95,6 +97,8 @@
> >
> > states = <3300000 0
> > 1800000 1>;
> > + /* U12/U13 RT9179GB */
> > + vin-supply = <&vddio_ao3v3>;
> > };
> thank you for the patch but I think it won't apply on top of Neil's
> "arm64: dts: meson: fix boards regulators states format" (which was
> applied just after you sent this series)
>
>
> Martin
Ok will re-base these changes on linux-next next time.
Best Regards
-Anand
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCHv1 3/3] arm64: dts: meson: odroid-c2: Add missing regulator linked to HDMI supply
From: Martin Blumenstingl @ 2019-09-01 11:44 UTC (permalink / raw)
To: Anand Moon
Cc: devicetree, Neil Armstrong, Kevin Hilman, linux-kernel,
Rob Herring, linux-amlogic, linux-arm-kernel, Jerome Brunet
In-Reply-To: <20190828202723.1145-4-linux.amoon@gmail.com>
Hi Anand,
On Wed, Aug 28, 2019 at 10:27 PM Anand Moon <linux.amoon@gmail.com> wrote:
>
> As per shematics HDMI_P5V0 is supplied by P5V0 so add missing link.
typo: "schematics"
> Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Cc: Jerome Brunet <jbrunet@baylibre.com>
> Cc: Neil Armstrong <narmstrong@baylibre.com>
> Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> ---
> arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> index a078a1ee5004..47789fd50415 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> @@ -213,6 +213,8 @@
> status = "okay";
> pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
> pinctrl-names = "default";
> + /* AP2331SA-7 */
> + hdmi-supply = <&p5v0>;
> };
my understanding based on odroid-c2_rev0.1_20150930.pdf is that:
- there's a (fixed) hdmi_p5v0 regulator using p5v0 as input
- the hdmi_p5v0 is the hdmi-supply
it doesn't change the functionality of this patch (since both supplies
are fixed regulators anyways)
you are already doing a nice cleanup with this series, so it would be
a shame to take a shortcut here
Martin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCHv1 2/3] arm64: dts: meson: odroid-c2: Add missing regulator linked to VDDIO_AO3V3 regulator
From: Martin Blumenstingl @ 2019-09-01 11:41 UTC (permalink / raw)
To: Anand Moon
Cc: devicetree, Neil Armstrong, Kevin Hilman, linux-kernel,
Rob Herring, linux-amlogic, linux-arm-kernel, Jerome Brunet
In-Reply-To: <20190828202723.1145-3-linux.amoon@gmail.com>
On Wed, Aug 28, 2019 at 10:27 PM Anand Moon <linux.amoon@gmail.com> wrote:
>
> As per shematics TFLASH_VDD, TF_IO, VCC3V3 fixed regulator output which
typo: "schematics"
> is supplied by VDDIO_AO3V3.
please add a short sentence to the description (since you probably
have to re-send a v2) like:
"While here, move the comment name with the signal name in the
schematics above the gpio property to make it consistent with other
regulators"
> Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Cc: Jerome Brunet <jbrunet@baylibre.com>
> Cc: Neil Armstrong <narmstrong@baylibre.com>
> Signed-off-by: Anand Moon <linux.amoon@gmail.com>
with the patch rebased (see below) and the two issues from above addressed:
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> ---
> arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 13 ++++++++++---
> 1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> index 98e742bf44c1..a078a1ee5004 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> @@ -67,17 +67,19 @@
> };
>
> tflash_vdd: regulator-tflash_vdd {
> - /*
> - * signal name from schematics: TFLASH_VDD_EN
> - */
> compatible = "regulator-fixed";
>
> regulator-name = "TFLASH_VDD";
> regulator-min-microvolt = <3300000>;
> regulator-max-microvolt = <3300000>;
>
> + /*
> + * signal name from schematics: TFLASH_VDD_EN
> + */
> gpio = <&gpio GPIOY_12 GPIO_ACTIVE_HIGH>;
> enable-active-high;
> + /* U16 RT9179GB */
> + vin-supply = <&vddio_ao3v3>;
> };
>
> tf_io: gpio-regulator-tf_io {
> @@ -95,6 +97,8 @@
>
> states = <3300000 0
> 1800000 1>;
> + /* U12/U13 RT9179GB */
> + vin-supply = <&vddio_ao3v3>;
> };
thank you for the patch but I think it won't apply on top of Neil's
"arm64: dts: meson: fix boards regulators states format" (which was
applied just after you sent this series)
Martin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCHv1 1/3] arm64: dts: meson: odroid-c2: Add missing regulator linked to P5V0 regulator
From: Martin Blumenstingl @ 2019-09-01 11:37 UTC (permalink / raw)
To: Anand Moon
Cc: devicetree, Neil Armstrong, Kevin Hilman, linux-kernel,
Rob Herring, linux-amlogic, linux-arm-kernel, Jerome Brunet
In-Reply-To: <20190828202723.1145-2-linux.amoon@gmail.com>
On Wed, Aug 28, 2019 at 10:27 PM Anand Moon <linux.amoon@gmail.com> wrote:
>
> As per shematics VDDIO_AO18, VDDIO_AO3V3/VDD3V3 DDR3_1V5/DDR_VDDC:
typo: "schematics"
> fixed regulator output which is supplied by P5V0.
>
> Rename vcc3v3 regulator node to vddio_ao3v3 as per shematics.
typo: "schematics"
according to the schematics there's both:
- VDDIO_AO3V3
- VCC3V3 (which is turned on by VDDIO_AO3V3, see [0])
> Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Cc: Jerome Brunet <jbrunet@baylibre.com>
> Cc: Neil Armstrong <narmstrong@baylibre.com>
> Signed-off-by: Anand Moon <linux.amoon@gmail.com>
> ---
> .../boot/dts/amlogic/meson-gxbb-odroidc2.dts | 29 +++++++++++++++++--
> 1 file changed, 26 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> index 792698a60a12..98e742bf44c1 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> @@ -104,11 +104,34 @@
> regulator-max-microvolt = <1800000>;
> };
>
> - vcc3v3: regulator-vcc3v3 {
> + vddio_ao1v8: regulator-vddio-ao1v8 {
> compatible = "regulator-fixed";
> - regulator-name = "VCC3V3";
> + regulator-name = "VDDIO_AO1V8";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-always-on;
> + /* U17 RT9179GB */
> + vin-supply = <&p5v0>;
> + };
> +
> + vddio_ao3v3: regulator-vddio-ao3v3 {
> + compatible = "regulator-fixed";
> + regulator-name = "VDDIO_AO3V3";
> regulator-min-microvolt = <3300000>;
> regulator-max-microvolt = <3300000>;
> + regulator-always-on;
> + /* U11 MP2161GJ-C499 */
> + vin-supply = <&p5v0>;
> + };
> +
> + vddc_ddr: regulator-vddc-ddr {
> + compatible = "regulator-fixed";
> + regulator-name = "DDR_VDDC";
personally I would call this (along with the node name and alias) DDR3_1V5
odroid-c2_rev0.1_20150930.pdf shows that DDR3_1V5 and DDR_VDDC are
both the same. however, the DDR_VDDC signal name is not used by any
component in the datasheet
> + regulator-min-microvolt = <1500000>;
> + regulator-max-microvolt = <1500000>;
> + regulator-always-on;
> + /* U15 MP2161GJ-C499 */
> + vin-supply = <&p5v0>;
> };
>
> emmc_pwrseq: emmc-pwrseq {
> @@ -301,7 +324,7 @@
> mmc-hs200-1_8v;
>
> mmc-pwrseq = <&emmc_pwrseq>;
> - vmmc-supply = <&vcc3v3>;
> + vmmc-supply = <&vddio_ao3v3>;
odroid-c2_rev0.1_20150930.pdf uses VCC3V3 as supply
Martin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH] iio: adc: meson_saradc: Fix memory allocation order
From: Martin Blumenstingl @ 2019-09-01 11:29 UTC (permalink / raw)
To: Remi Pommarel
Cc: Lars-Peter Clausen, Neil Armstrong, linux-iio, Kevin Hilman,
linux-kernel, Elie Roudninski, linux-arm-kernel,
Peter Meerwald-Stadler, Hartmut Knaack, linux-amlogic,
Jonathan Cameron
In-Reply-To: <20190901105410.23567-1-repk@triplefau.lt>
On Sun, Sep 1, 2019 at 12:45 PM Remi Pommarel <repk@triplefau.lt> wrote:
>
> meson_saradc's irq handler uses priv->regmap so make sure that it is
> allocated before the irq get enabled.
>
> This also fixes crash when CONFIG_DEBUG_SHIRQ is enabled, as device
> managed resources are freed in the inverted order they had been
> allocated, priv->regmap was freed before the spurious fake irq that
> CONFIG_DEBUG_SHIRQ adds called the handler.
>
Fixes: 3af109131b7eb8 ("iio: adc: meson-saradc: switch from polling to
interrupt mode")
> Reported-by: Elie Roudninski <xademax@gmail.com>
> Signed-off-by: Remi Pommarel <repk@triplefau.lt>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
thank you for fixing this!
Martin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [PATCH] PCI: Remove unused includes and superfluous struct declaration
From: Krzysztof Wilczynski @ 2019-09-01 11:25 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: devicetree, Lorenzo Pieralisi, Jingoo Han, Joerg Roedel,
linux-pci, linux-kernel, iommu, Rob Herring, Thomas Petazzoni,
Gustavo Pimentel, Frank Rowand, linux-arm-kernel
Remove <linux/pci.h> and <linux/msi.h> from being included
directly as part of the include/linux/of_pci.h, and remove
superfluous declaration of struct of_phandle_args.
Move users of include <linux/of_pci.h> to include <linux/pci.h>
and <linux/msi.h> directly rather than rely on both being
included transitively through <linux/of_pci.h>.
Signed-off-by: Krzysztof Wilczynski <kw@linux.com>
---
drivers/iommu/of_iommu.c | 2 ++
drivers/pci/controller/dwc/pcie-designware-host.c | 1 +
drivers/pci/controller/pci-aardvark.c | 1 +
drivers/pci/pci.c | 1 +
drivers/pci/probe.c | 1 +
include/linux/of_pci.h | 4 +---
6 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c
index 614a93aa5305..026ad2b29dcd 100644
--- a/drivers/iommu/of_iommu.c
+++ b/drivers/iommu/of_iommu.c
@@ -8,6 +8,8 @@
#include <linux/export.h>
#include <linux/iommu.h>
#include <linux/limits.h>
+#include <linux/pci.h>
+#include <linux/msi.h>
#include <linux/of.h>
#include <linux/of_iommu.h>
#include <linux/of_pci.h>
diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c
index d3156446ff27..7a9bef993e57 100644
--- a/drivers/pci/controller/dwc/pcie-designware-host.c
+++ b/drivers/pci/controller/dwc/pcie-designware-host.c
@@ -10,6 +10,7 @@
#include <linux/irqchip/chained_irq.h>
#include <linux/irqdomain.h>
+#include <linux/msi.h>
#include <linux/of_address.h>
#include <linux/of_pci.h>
#include <linux/pci_regs.h>
diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/controller/pci-aardvark.c
index fc0fe4d4de49..3a05f6ca95b0 100644
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
@@ -16,6 +16,7 @@
#include <linux/pci.h>
#include <linux/init.h>
#include <linux/platform_device.h>
+#include <linux/msi.h>
#include <linux/of_address.h>
#include <linux/of_pci.h>
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 484e35349565..571e7e00984b 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -13,6 +13,7 @@
#include <linux/delay.h>
#include <linux/dmi.h>
#include <linux/init.h>
+#include <linux/msi.h>
#include <linux/of.h>
#include <linux/of_pci.h>
#include <linux/pci.h>
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 169943f17a4c..11b11a652d18 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -7,6 +7,7 @@
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/pci.h>
+#include <linux/msi.h>
#include <linux/of_device.h>
#include <linux/of_pci.h>
#include <linux/pci_hotplug.h>
diff --git a/include/linux/of_pci.h b/include/linux/of_pci.h
index 21a89c4880fa..7929b4c0e886 100644
--- a/include/linux/of_pci.h
+++ b/include/linux/of_pci.h
@@ -2,11 +2,9 @@
#ifndef __OF_PCI_H
#define __OF_PCI_H
-#include <linux/pci.h>
-#include <linux/msi.h>
+#include <linux/types.h>
struct pci_dev;
-struct of_phandle_args;
struct device_node;
#if IS_ENABLED(CONFIG_OF) && IS_ENABLED(CONFIG_PCI)
--
2.23.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH] iio: adc: meson_saradc: Fix memory allocation order
From: Remi Pommarel @ 2019-09-01 10:54 UTC (permalink / raw)
To: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald-Stadler, Kevin Hilman
Cc: Neil Armstrong, Martin Blumenstingl, Elie Roudninski,
linux-kernel, linux-iio, Remi Pommarel, linux-amlogic,
linux-arm-kernel
meson_saradc's irq handler uses priv->regmap so make sure that it is
allocated before the irq get enabled.
This also fixes crash when CONFIG_DEBUG_SHIRQ is enabled, as device
managed resources are freed in the inverted order they had been
allocated, priv->regmap was freed before the spurious fake irq that
CONFIG_DEBUG_SHIRQ adds called the handler.
Reported-by: Elie Roudninski <xademax@gmail.com>
Signed-off-by: Remi Pommarel <repk@triplefau.lt>
---
drivers/iio/adc/meson_saradc.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c
index 7b28d045d271..7b27306330a3 100644
--- a/drivers/iio/adc/meson_saradc.c
+++ b/drivers/iio/adc/meson_saradc.c
@@ -1219,6 +1219,11 @@ static int meson_sar_adc_probe(struct platform_device *pdev)
if (IS_ERR(base))
return PTR_ERR(base);
+ priv->regmap = devm_regmap_init_mmio(&pdev->dev, base,
+ priv->param->regmap_config);
+ if (IS_ERR(priv->regmap))
+ return PTR_ERR(priv->regmap);
+
irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
if (!irq)
return -EINVAL;
@@ -1228,11 +1233,6 @@ static int meson_sar_adc_probe(struct platform_device *pdev)
if (ret)
return ret;
- priv->regmap = devm_regmap_init_mmio(&pdev->dev, base,
- priv->param->regmap_config);
- if (IS_ERR(priv->regmap))
- return PTR_ERR(priv->regmap);
-
priv->clkin = devm_clk_get(&pdev->dev, "clkin");
if (IS_ERR(priv->clkin)) {
dev_err(&pdev->dev, "failed to get clkin\n");
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* Re: [PATCH] drm: dw-hdmi-i2s: enable audio clock in audio_startup
From: Jonas Karlman @ 2019-09-01 10:03 UTC (permalink / raw)
To: Cheng-Yi Chiang, linux-kernel@vger.kernel.org
Cc: Jernej Skrabec, alsa-devel@alsa-project.org, tzungbi@chromium.org,
zhengxing@rock-chips.com, kuninori.morimoto.gx@renesas.com,
linux-rockchip@lists.infradead.org, airlied@linux.ie,
jeffy.chen@rock-chips.com, dianders@chromium.org,
dri-devel@lists.freedesktop.org, cain.cai@rock-chips.com,
Neil Armstrong, a.hajda@samsung.com, eddie.cai@rock-chips.com,
Laurent.pinchart@ideasonboard.com, daniel@ffwll.ch,
enric.balletbo@collabora.com, dgreid@chromium.org,
sam@ravnborg.org, linux-arm-kernel@lists.infradead.org
In-Reply-To: <20190829042957.150929-1-cychiang@chromium.org>
On 2019-08-29 06:29, Cheng-Yi Chiang wrote:
> In the designware databook, the sequence of enabling audio clock and
> setting format is not clearly specified.
> Currently, audio clock is enabled in the end of hw_param ops after
> setting format.
>
> On some monitors, there is a possibility that audio does not come out.
> Fix this by enabling audio clock in audio_startup ops
> before hw_param ops setting format.
>
> Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org>
> ---
> drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c
> index 5cbb71a866d5..08b4adbb1ddc 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c
> @@ -69,6 +69,14 @@ static int dw_hdmi_i2s_hw_params(struct device *dev, void *data,
> hdmi_write(audio, conf0, HDMI_AUD_CONF0);
> hdmi_write(audio, conf1, HDMI_AUD_CONF1);
>
> + return 0;
> +}
> +
> +static int dw_hdmi_i2s_audio_startup(struct device *dev, void *data)
> +{
> + struct dw_hdmi_i2s_audio_data *audio = data;
> + struct dw_hdmi *hdmi = audio->hdmi;
> +
> dw_hdmi_audio_enable(hdmi);
>
> return 0;
> @@ -105,6 +113,7 @@ static int dw_hdmi_i2s_get_dai_id(struct snd_soc_component *component,
> }
>
> static struct hdmi_codec_ops dw_hdmi_i2s_ops = {
> + .audio_startup = dw_hdmi_i2s_audio_startup,
A small white space nit, there should be a tab and not space to align the equal sign above.
Also this patch do not cleanly apply to drm-misc-next or linux-next after
fc1ca6e01d0a "drm/bridge: dw-hdmi-i2s: add .get_eld support" was merged.
This patch does fix an issue I have observed on my Rockchip devices where audio would not always
came out after switching between audio streams having different rate and channels parameters.
I used to carry [1] to fix that issue, but this seems like a more sane fix.
[1] https://github.com/Kwiboo/linux-rockchip/commit/4862e4044532b8b480fa3a0faddc197586623808
With above fixed,
Reviewed-by: Jonas Karlman <jonas@kwiboo.se>
Regards,
Jonas
> .hw_params = dw_hdmi_i2s_hw_params,
> .audio_shutdown = dw_hdmi_i2s_audio_shutdown,
> .get_dai_id = dw_hdmi_i2s_get_dai_id,
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [RESEND PATCH 1/1] rtc: sun6i: Allow using as wakeup source from suspend
From: Alexandre Belloni @ 2019-09-01 9:02 UTC (permalink / raw)
To: Alejandro González
Cc: linux-rtc, a.zummo, maxime.ripard, linux-sunxi, linux-kernel,
wens, linux-arm-kernel
In-Reply-To: <20190821210056.11995-1-alejandro.gonzalez.correo@gmail.com>
On 21/08/2019 23:00:56+0200, Alejandro González wrote:
> This patch allows userspace to set up wakeup alarms on any RTC handled by the
> sun6i driver, and adds the necessary PM operations to allow resuming from
> suspend when the configured wakeup alarm fires a IRQ. Of course, that the
> device actually resumes depends on the suspend state and how a particular
> hardware reacts to it, but that is out of scope for this patch.
>
> I've tested these changes on a Pine H64 model B, which contains a
> Allwinner H6 SoC, with the help of CONFIG_PM_TEST_SUSPEND kernel option.
> These are the interesting outputs from the kernel and commands which
> show that it works. As every RTC handled by this driver is largely the
> same, I think that it shouldn't introduce any regression on other SoCs,
> but I may be wrong.
>
> [ 1.092705] PM: test RTC wakeup from 'freeze' suspend
> [ 1.098230] PM: suspend entry (s2idle)
> [ 1.212907] PM: suspend devices took 0.080 seconds
> (The SoC freezes for some seconds)
> [ 3.197604] PM: resume devices took 0.104 seconds
> [ 3.215937] PM: suspend exit
>
> [ 1.092812] PM: test RTC wakeup from 'mem' suspend
> [ 1.098089] PM: suspend entry (deep)
> [ 1.102033] PM: suspend exit
> [ 1.105205] PM: suspend test failed, error -22
>
> In any case, the RTC alarm interrupt gets fired as exptected:
>
> $ echo +5 > /sys/class/rtc/rtc0/wakealarm && sleep 5 && grep rtc /proc/interrupts
> 29: 1 0 0 0 GICv2 133 Level 7000000.rtc
>
> Signed-off-by: Alejandro González <alejandro.gonzalez.correo@gmail.com>
> ---
> drivers/rtc/rtc-sun6i.c | 30 ++++++++++++++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
Applied, thanks.
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH 24/26] riscv: use the generic ioremap code
From: Christoph Hellwig @ 2019-09-01 8:02 UTC (permalink / raw)
To: Paul Walmsley
Cc: linux-ia64, linux-sh, linux-kernel, Guo Ren, sparclinux,
linux-riscv, Vincent Chen, Christoph Hellwig, linux-arch,
linux-s390, linux-hexagon, x86, linux-snps-arc, linux-xtensa,
Arnd Bergmann, linux-m68k, openrisc, Greentime Hu, nios2-dev,
Guan Xuetao, linux-arm-kernel, Michal Simek, linux-parisc,
linux-mips, linux-alpha, linux-mtd
In-Reply-To: <alpine.DEB.2.21.9999.1908171421560.4130@viisi.sifive.com>
On Sat, Aug 17, 2019 at 02:22:15PM -0700, Paul Walmsley wrote:
> Reviewed-by: Paul Walmsley <paul.walmsley@sifive.com>
> Tested-by: Paul Walmsley <paul.walmsley@sifive.com> # rv32, rv64 boot
> Acked-by: Paul Walmsley <paul.walmsley@sifive.com> # arch/riscv
Can you also take a look at the patch adding the generic code?
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [PATCH v5 2/3] arm64: dts: ls1028a: Add PCIe controller DT nodes
From: Xiaowei Bao @ 2019-09-01 7:41 UTC (permalink / raw)
To: robh+dt, mark.rutland, shawnguo, leoyang.li, minghuan.Lian,
mingkai.hu, roy.zang, lorenzo.pieralisi, linux-pci, devicetree,
linux-kernel, linux-arm-kernel, linuxppc-dev
Cc: bhelgaas, Hou Zhiqiang, Xiaowei Bao
In-Reply-To: <20190901074134.24455-1-xiaowei.bao@nxp.com>
LS1028a implements 2 PCIe 3.0 controllers.
Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
---
v2:
- Fix up the legacy INTx allocate failed issue.
v3:
- No change.
v4:
- Remove the num-lanes property.
v5:
- Add the num-viewport property.
arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 52 ++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
index 72b9a75..c043b1d 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
@@ -625,6 +625,58 @@
};
};
+ pcie@3400000 {
+ compatible = "fsl,ls1028a-pcie";
+ reg = <0x00 0x03400000 0x0 0x00100000 /* controller registers */
+ 0x80 0x00000000 0x0 0x00002000>; /* configuration space */
+ reg-names = "regs", "config";
+ interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>, /* PME interrupt */
+ <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>; /* aer interrupt */
+ interrupt-names = "pme", "aer";
+ #address-cells = <3>;
+ #size-cells = <2>;
+ device_type = "pci";
+ dma-coherent;
+ num-viewport = <6>;
+ bus-range = <0x0 0xff>;
+ ranges = <0x81000000 0x0 0x00000000 0x80 0x00010000 0x0 0x00010000 /* downstream I/O */
+ 0x82000000 0x0 0x40000000 0x80 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
+ msi-parent = <&its>;
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0 0 0 7>;
+ interrupt-map = <0000 0 0 1 &gic 0 0 GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+ <0000 0 0 2 &gic 0 0 GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+ <0000 0 0 3 &gic 0 0 GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>,
+ <0000 0 0 4 &gic 0 0 GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
+
+ pcie@3500000 {
+ compatible = "fsl,ls1028a-pcie";
+ reg = <0x00 0x03500000 0x0 0x00100000 /* controller registers */
+ 0x88 0x00000000 0x0 0x00002000>; /* configuration space */
+ reg-names = "regs", "config";
+ interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "pme", "aer";
+ #address-cells = <3>;
+ #size-cells = <2>;
+ device_type = "pci";
+ dma-coherent;
+ num-viewport = <6>;
+ bus-range = <0x0 0xff>;
+ ranges = <0x81000000 0x0 0x00000000 0x88 0x00010000 0x0 0x00010000 /* downstream I/O */
+ 0x82000000 0x0 0x40000000 0x88 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
+ msi-parent = <&its>;
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0 0 0 7>;
+ interrupt-map = <0000 0 0 1 &gic 0 0 GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
+ <0000 0 0 2 &gic 0 0 GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
+ <0000 0 0 3 &gic 0 0 GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
+ <0000 0 0 4 &gic 0 0 GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
+
pcie@1f0000000 { /* Integrated Endpoint Root Complex */
compatible = "pci-host-ecam-generic";
reg = <0x01 0xf0000000 0x0 0x100000>;
--
2.9.5
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox