* [PATCH 5/5] arm: dts: sun8i: a83t: a711: Add touchscreen node
From: Mylène Josserand @ 2017-12-08 21:54 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20171208215419.30396-1-mylene.josserand@free-electrons.com>
Tha A711 tablet has a FocalTech EDT-FT5x06 Polytouch touchscreen.
It is connected via I2C0 so add his node in i2c0's node.
The reset line is PD5, the interrupt line is PL7 and the power
supply is the ldo_io0 regulator.
Signed-off-by: Myl?ne Josserand <mylene.josserand@free-electrons.com>
---
arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts
index 84cca1a48cea..738359917a34 100644
--- a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts
+++ b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts
@@ -110,6 +110,17 @@
pinctrl-0 = <&i2c0_pins>;
clock-frequency = <400000>;
status = "okay";
+
+ polytouch: edt-ft5x06 at 38 {
+ compatible = "edt,edt-ft5x06";
+ reg = <0x38>;
+ interrupt-parent = <&r_pio>;
+ interrupts = <0 7 IRQ_TYPE_EDGE_FALLING>;
+ reset-gpios = <&pio 3 5 GPIO_ACTIVE_LOW>;
+ power-supply = <®_ldo_io0>;
+ touchscreen-size-x = <1024>;
+ touchscreen-size-y = <600>;
+ };
};
&mmc0 {
--
2.11.0
^ permalink raw reply related
* [PATCH 4/5] Input: edt-ft5x06 - Add support for regulator
From: Mylène Josserand @ 2017-12-08 21:54 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20171208215419.30396-1-mylene.josserand@free-electrons.com>
Add the support of regulator to use them as VCC source.
Signed-off-by: Myl?ne Josserand <mylene.josserand@free-electrons.com>
---
drivers/input/touchscreen/edt-ft5x06.c | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
index c53a3d7239e7..44b0e04a8f35 100644
--- a/drivers/input/touchscreen/edt-ft5x06.c
+++ b/drivers/input/touchscreen/edt-ft5x06.c
@@ -39,6 +39,7 @@
#include <linux/input/mt.h>
#include <linux/input/touchscreen.h>
#include <linux/of_device.h>
+#include <linux/regulator/consumer.h>
#define WORK_REGISTER_THRESHOLD 0x00
#define WORK_REGISTER_REPORT_RATE 0x08
@@ -91,6 +92,7 @@ struct edt_ft5x06_ts_data {
struct touchscreen_properties prop;
u16 num_x;
u16 num_y;
+ struct regulator *supply;
struct gpio_desc *reset_gpio;
struct gpio_desc *wake_gpio;
@@ -993,6 +995,23 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client,
tsdata->max_support_points = chip_data->max_support_points;
+ tsdata->supply = devm_regulator_get_optional(&client->dev, "power");
+ if (IS_ERR(tsdata->supply)) {
+ error = PTR_ERR(tsdata->supply);
+ dev_err(&client->dev, "failed to request regulator: %d\n",
+ error);
+ return error;
+ };
+
+ if (tsdata->supply) {
+ error = regulator_enable(tsdata->supply);
+ if (error < 0) {
+ dev_err(&client->dev, "failed to enable supply: %d\n",
+ error);
+ return error;
+ }
+ }
+
tsdata->reset_gpio = devm_gpiod_get_optional(&client->dev,
"reset", GPIOD_OUT_HIGH);
if (IS_ERR(tsdata->reset_gpio)) {
@@ -1122,20 +1141,34 @@ static int edt_ft5x06_ts_remove(struct i2c_client *client)
static int __maybe_unused edt_ft5x06_ts_suspend(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
+ struct edt_ft5x06_ts_data *tsdata = i2c_get_clientdata(client);
if (device_may_wakeup(dev))
enable_irq_wake(client->irq);
+ if (tsdata->supply)
+ regulator_disable(tsdata->supply);
+
return 0;
}
static int __maybe_unused edt_ft5x06_ts_resume(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
+ struct edt_ft5x06_ts_data *tsdata = i2c_get_clientdata(client);
+ int ret;
if (device_may_wakeup(dev))
disable_irq_wake(client->irq);
+ if (tsdata->supply) {
+ ret = regulator_enable(tsdata->supply);
+ if (ret < 0) {
+ dev_err(dev, "failed to enable supply: %d\n", ret);
+ return ret;
+ }
+ }
+
return 0;
}
--
2.11.0
^ permalink raw reply related
* [PATCH 3/5] arm: dts: sun8i: a83t: a711: Enable I2C0
From: Mylène Josserand @ 2017-12-08 21:54 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20171208215419.30396-1-mylene.josserand@free-electrons.com>
The A711 has a touchscreen connected by I2C0.
Enable only I2C0 node for the moment.
Signed-off-by: Myl?ne Josserand <mylene.josserand@free-electrons.com>
---
arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts
index a021ee6da396..84cca1a48cea 100644
--- a/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts
+++ b/arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts
@@ -105,6 +105,13 @@
status = "okay";
};
+&i2c0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c0_pins>;
+ clock-frequency = <400000>;
+ status = "okay";
+};
+
&mmc0 {
vmmc-supply = <®_dcdc1>;
pinctrl-names = "default";
--
2.11.0
^ permalink raw reply related
* [PATCH 2/5] arm: dts: sun8i: a83t: Add I2C0 pins group
From: Mylène Josserand @ 2017-12-08 21:54 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20171208215419.30396-1-mylene.josserand@free-electrons.com>
Add pins group to configure it as I2C0.
Signed-off-by: Myl?ne Josserand <mylene.josserand@free-electrons.com>
---
arch/arm/boot/dts/sun8i-a83t.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-a83t.dtsi b/arch/arm/boot/dts/sun8i-a83t.dtsi
index 848cf3f19962..3bce6bd3dc79 100644
--- a/arch/arm/boot/dts/sun8i-a83t.dtsi
+++ b/arch/arm/boot/dts/sun8i-a83t.dtsi
@@ -347,6 +347,11 @@
#interrupt-cells = <3>;
#gpio-cells = <3>;
+ i2c0_pins: i2c0-pins {
+ pins = "PH0", "PH1";
+ function = "i2c0";
+ };
+
mmc0_pins: mmc0-pins {
pins = "PF0", "PF1", "PF2",
"PF3", "PF4", "PF5";
--
2.11.0
^ permalink raw reply related
* [PATCH 1/5] arm: dts: sun8i: a83t: Add I2C0 node
From: Mylène Josserand @ 2017-12-08 21:54 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20171208215419.30396-1-mylene.josserand@free-electrons.com>
Add I2C0 node for A83T.
Signed-off-by: Myl?ne Josserand <mylene.josserand@free-electrons.com>
---
arch/arm/boot/dts/sun8i-a83t.dtsi | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-a83t.dtsi b/arch/arm/boot/dts/sun8i-a83t.dtsi
index 19acae1b4089..848cf3f19962 100644
--- a/arch/arm/boot/dts/sun8i-a83t.dtsi
+++ b/arch/arm/boot/dts/sun8i-a83t.dtsi
@@ -177,6 +177,17 @@
#dma-cells = <1>;
};
+ i2c0: i2c at 01c2ac00 {
+ compatible = "allwinner,sun6i-a31-i2c";
+ reg = <0x01c2ac00 0x400>;
+ interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ccu CLK_BUS_I2C0>;
+ resets = <&ccu RST_BUS_I2C0>;
+ status = "disabled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+
mmc0: mmc at 1c0f000 {
compatible = "allwinner,sun8i-a83t-mmc",
"allwinner,sun7i-a20-mmc";
--
2.11.0
^ permalink raw reply related
* [PATCH 0/5] sun8i-a83t: Add touchscreen support on TBS A711
From: Mylène Josserand @ 2017-12-08 21:54 UTC (permalink / raw)
To: linux-arm-kernel
Hello everyone,
This patch series adds touchscreen support (FocalTech EDT-FT5x06
Polytouch) for TBS A711 (Allwinner sun8i-a83t SoC).
This touchscreen is using i2c so this series adds support of this bus
on A83T.
Series information:
- Based on last linux-next (next-20171208)
- Had dependencies on AXP209 Quentin Schultz's series:
https://www.spinics.net/lists/linux-gpio/msg26913.htmlx
Patch 01: Add i2c0 node on a83t device tree.
Patch 02: Add i2c0 pin group.
Patch 03: Enable i2c0 on TBS A711.
Patch 04: Add support for regulator in the FocalTech touchscreen driver
because A711 tablet is using a regulator to power-up the touchscreen.
Patch 05: Add the touchscreen node in A711 TBS tablet.
Thank you in advance for any review.
Best regards,
Myl?ne
Myl?ne Josserand (5):
arm: dts: sun8i: a83t: Add I2C0 node
arm: dts: sun8i: a83t: Add I2C0 pins group
arm: dts: sun8i: a83t: a711: Enable I2C0
Input: edt-ft5x06 - Add support for regulator
arm: dts: sun8i: a83t: a711: Add touchscreen node
arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 18 +++++++++++++++++
arch/arm/boot/dts/sun8i-a83t.dtsi | 16 +++++++++++++++
drivers/input/touchscreen/edt-ft5x06.c | 33 +++++++++++++++++++++++++++++++
3 files changed, 67 insertions(+)
--
2.11.0
^ permalink raw reply
* [kernel-hardening][PATCH] arm: mm: idmap: Mark variables as ro_after_init
From: Kees Cook @ 2017-12-08 20:59 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20171208111318.GA12346@pjb1027-Latitude-E5410>
On Fri, Dec 8, 2017 at 3:13 AM, Jinbum Park <jinb.park7@gmail.com> wrote:
> idmap_pgd, arch_phys_to_idmap_offset are setup once
> while init stage, and never changed after that.
> so, it is good candidate for __ro_after_init.
>
> Signed-off-by: Jinbum Park <jinb.park7@gmail.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Does arm64 have anything like this? Just grepping for similar names,
idmap_t0sz looks like it could actually be const.
-Kees
> ---
> arch/arm/mm/idmap.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mm/idmap.c b/arch/arm/mm/idmap.c
> index 10bfba8..1d1edd0 100644
> --- a/arch/arm/mm/idmap.c
> +++ b/arch/arm/mm/idmap.c
> @@ -16,8 +16,8 @@
> * are not supported on any CPU using the idmap tables as its current
> * page tables.
> */
> -pgd_t *idmap_pgd;
> -long long arch_phys_to_idmap_offset;
> +pgd_t *idmap_pgd __ro_after_init;
> +long long arch_phys_to_idmap_offset __ro_after_init;
>
> #ifdef CONFIG_ARM_LPAE
> static void idmap_add_pmd(pud_t *pud, unsigned long addr, unsigned long end,
> --
> 1.9.1
>
--
Kees Cook
Pixel Security
^ permalink raw reply
* [PATCH 01/12] dt-bindings: mtd: add Marvell NAND controller documentation
From: Boris Brezillon @ 2017-12-08 20:56 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20171207201814.30411-2-miquel.raynal@free-electrons.com>
On Thu, 7 Dec 2017 21:18:03 +0100
Miquel Raynal <miquel.raynal@free-electrons.com> wrote:
> Document the legacy and the new bindings for Marvell NAND controller.
>
> The pxa3xx_nand.c driver does only support legacy bindings, which are
> incomplete and inaccurate. A rework of this controller (called
> marvell_nand.c) does support both.
>
> Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
> ---
> .../devicetree/bindings/mtd/marvell-nand.txt | 84 ++++++++++++++++++++++
> 1 file changed, 84 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/mtd/marvell-nand.txt
>
> diff --git a/Documentation/devicetree/bindings/mtd/marvell-nand.txt b/Documentation/devicetree/bindings/mtd/marvell-nand.txt
> new file mode 100644
> index 000000000000..0b3d5e0bab83
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mtd/marvell-nand.txt
> @@ -0,0 +1,84 @@
> +Marvell NAND Flash Controller (NFC)
> +
> +Required properties:
> +- compatible: can be one of the following:
> + * "marvell,armada-8k-nand-controller"
> + * "marvell,armada370-nand-controller"
> + * "marvell,pxa3xx-nand-controller"
> + * "marvell,armada-8k-nand" (deprecated)
> + * "marvell,armada370-nand" (deprecated)
> + * "marvell,pxa3xx-nand" (deprecated)
> +- reg: NAND flash controller memory area.
> +- #address-cells: shall be set to 1. Encode the NAND CS.
> +- #size-cells: shall be set to 0.
> +- interrupts: shall define the NAND controller interrupt.
> +- clocks: shall reference the NAND controller clock.
> +- marvell,system-controller: Set to retrieve the syscon node that handles
> + NAND controller related registers (only required with the
> + "marvell,armada-8k-nand[-controller]" compatibles).
> +
> +Optional properties:
> +- label: see partition.txt. New platforms shall omit this property.
> +- dmas: shall reference DMA channel associated to the NAND controller.
> +- dma-names: shall be "rxtx".
> +
> +Optional children nodes:
> +Children nodes represent the available NAND chips.
> +
> +Required properties:
> +- reg: shall contain the native Chip Select ids (0-3)
> +- marvell,rb: shall contain the native Ready/Busy ids (0-1)
> +
> +Optional properties:
> +- marvell,nand-keep-config: orders the driver not to take the timings
> + from the core and leaving them completely untouched. Bootloader
> + timings will then be used.
> +- nand-on-flash-bbt: see nand.txt.
> +- nand-ecc-mode: see nand.txt. Will use hardware ECC if not specified.
> +- nand-ecc-algo: see nand.txt. This property may be added when using
> + hardware ECC for clarification but will be ignored by the driver
> + because ECC mode is chosen depending on the page size and the strength
> + required by the NAND chip. This value may be overwritten with
> + nand-ecc-strength property.
> +- nand-ecc-strength: see nand.txt.
> +- nand-ecc-step-size: see nand.txt. This has no effect and will be
> + ignored by the driver when using hardware ECC because Marvell's NAND
> + flash controller does use fixed strength (1-bit for Hamming, 16-bit
> + for BCH), so the step size will shrink or grow in order to fit the
> + required strength. Step sizes are not completely random for all and
> + follow certain patterns described in AN-379, "Marvell SoC NFC ECC".
> +
> +See Documentation/devicetree/bindings/mtd/nand.txt for more details on
> +generic bindings.
> +
> +
> +Example:
> +nand_controller: nand-controller at d0000 {
> + compatible = "marvell,armada370-nand-controller";
> + reg = <0xd0000 0x54>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&coredivclk 0>;
> +
> + nand at 0 {
> + reg = <0>;
> + marvell,rb = <0>;
> + nand-ecc-mode = "hw";
> + marvell,nand-keep-config;
> + nand-on-flash-bbt;
> + nand-ecc-strength = <4>;
> + nand-ecc-step-size = <512>;
> +
> + partitions {
> + compatible = "fixed-partitions";
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + partition at 0 {
> + label = "Rootfs";
> + reg = <0x00000000 0x40000000>;
> + };
> + };
> + };
> +};
Maybe you should also give an example for the old bindings.
BTW, given your properties description, it's not clear which properties
are deprecated. Maybe you should split the doc in 2 sections: one
describing the new bindings, and the other one describing the deprecated
bindings.
^ permalink raw reply
* [PATCH] pinctrl: meson-axg: adjust spicc pin naming
From: Kevin Hilman @ 2017-12-08 19:54 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20171208152909.15632-1-yixun.lan@amlogic.com>
Yixun Lan <yixun.lan@amlogic.com> writes:
> According to datasheet, we should use numbers for the pin naming
> instead of letters. The patch here try to fix this to keep
> the consistency.
>
> This patch should not bring any functional change.
>
> Fixes: 83c566806a68 ("pinctrl: meson-axg: Add new pinctrl driver for Meson AXG SoC")
> Suggested-by: Kevin Hilman <khilman@baylibre.com>
> Signed-off-by: Yixun Lan <yixun.lan@amlogic.com>
Acked-by: Kevin Hilman <khilman@baylibre.com>
> ---
> The issue was raised by Kevin while review the SPI DT part patches, see [1]
> [1] http://lists.infradead.org/pipermail/linux-amlogic/2017-December/005641.html
>
> Note: the 'Fixes' is coming from pinctrl's tree 'for-next' branch
Linus, please consider this change for your next branch. I'd like to
get the names aligned with the datasheet before we have any users in DT.
Thanks,
Kevin
^ permalink raw reply
* [PATCH 1/2] acpi, spcr: Make SPCR avialable to other architectures
From: Prarit Bhargava @ 2017-12-08 19:42 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CAOZdJXV4E6gu=Ed6nOCcEp2afe_g8Ot-H5oO5=6+ye51cv9hUg@mail.gmail.com>
On 12/07/2017 01:43 PM, Timur Tabi wrote:
> On Thu, Dec 7, 2017 at 11:29 AM, Prarit Bhargava <prarit@redhat.com> wrote:
>> Other architectures can use SPCR to setup an early console or console but
>> the current code is ARM64 specific.
>>
>> Change the name of parse_spcr() to acpi_parse_spcr(). Add a weak
>> function acpi_arch_setup_console() that can be used for arch-specific
>> setup. Move SPCR initialization flag into ACPI code. Update the
>> Documention on the use of the SPCR earlycon.
>>
>> This patch does not change arm64 behaviour.
>
> Let's hope so. Our E44 erratum work-around has caused lots of
> problems in the past, so the code is a bit fragile.
So it does look like I broke something :( I'll fix this and do more testing.
One thing that I just learned (relative to x86) is that you have to test much
further and wider than on x86.
P.
>
>> +static bool qdf2400_erratum_44_present(struct acpi_table_header *h)
>> +{
>> + if (memcmp(h->oem_id, "QCOM ", ACPI_OEM_ID_SIZE))
>> + return false;
>> +
>> + if (!memcmp(h->oem_table_id, "QDF2432 ", ACPI_OEM_TABLE_ID_SIZE))
>> + return true;
>> +
>> + if (!memcmp(h->oem_table_id, "QDF2400 ", ACPI_OEM_TABLE_ID_SIZE) &&
>> + h->oem_revision == 1)
>> + return true;
>> +
>> + return false;
>> +}
>
> Please give us a chance to test this patch before merging. We've had a
> lot of problems with our E44 work-around, and we need to make sure
> that qdf2400_erratum_44_present function is called before the pl011
> driver is probed.
>
>> +
>> +/*
>> + * APM X-Gene v1 and v2 UART hardware is an 16550 like device but has its
>> + * register aligned to 32-bit. In addition, the BIOS also encoded the
>> + * access width to be 8 bits. This function detects this errata condition.
>> + */
>> +static bool xgene_8250_erratum_present(struct acpi_table_spcr *tb)
>> +{
>> + bool xgene_8250 = false;
>> +
>> + if (tb->interface_type != ACPI_DBG2_16550_COMPATIBLE)
>> + return false;
>> +
>> + if (memcmp(tb->header.oem_id, "APMC0D", ACPI_OEM_ID_SIZE) &&
>> + memcmp(tb->header.oem_id, "HPE ", ACPI_OEM_ID_SIZE))
>> + return false;
>> +
>> + if (!memcmp(tb->header.oem_table_id, "XGENESPC",
>> + ACPI_OEM_TABLE_ID_SIZE) && tb->header.oem_revision == 0)
>> + xgene_8250 = true;
>> +
>> + if (!memcmp(tb->header.oem_table_id, "ProLiant",
>> + ACPI_OEM_TABLE_ID_SIZE) && tb->header.oem_revision == 1)
>> + xgene_8250 = true;
>> +
>> + return xgene_8250;
>> +}
>
> I suspect that this function has the same issues as
> qdf2400_erratum_44_present().
>
>> +config ACPI_SPCR_TABLE
>> + bool "ACPI Serial Port Console Redirection Support"
>> + default y if ARM64
>> + help
>> + Enable support for Serial Port Console Redirection (SPCR) Table.
>> + This table provides information about the configuration of the
>> + earlycon console.
>> +
>
> So ACPI without SPCR has never been tested by us. Making it optional
> makes me a little nervous. We'll have to evaluate this change.
>
^ permalink raw reply
* [GIT PULL] Amlogic fixes for v4.15-rc (redo v2)
From: Kevin Hilman @ 2017-12-08 19:34 UTC (permalink / raw)
To: linux-arm-kernel
Arnd, Olof,
Here's a re-spin of the Amlogic fixes for v4.15-rc with the DT changes
for new hardware dropped. Will (re)send those for v4.16.
Also, since the last round, I've collected one more fix for a UART clock
naming bug.
Kevin
The following changes since commit 4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323:
Linux 4.15-rc1 (2017-11-26 16:01:47 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic.git tags/amlogic-fixes-1
for you to fetch changes up to 39005e562a88c61fa77acef1d2c0cb81ee6b0423:
ARM64: dts: meson-gx: fix UART pclk clock name (2017-12-08 10:39:11 -0800)
----------------------------------------------------------------
Amlogic fixes for v4.15-rc
- GPIO interrupt fixes
- socinfo fix for GX series
- fix typo
----------------------------------------------------------------
Arnaud Patard (1):
meson-gx-socinfo: Fix package id parsing
Colin Ian King (1):
ARM: meson: fix spelling mistake: "Couln't" -> "Couldn't"
Martin Blumenstingl (2):
ARM: dts: meson: correct the sort order for the the gpio_intc node
ARM: dts: meson: fix the memory region of the GPIO interrupt controller
Neil Armstrong (1):
ARM64: dts: meson-gx: fix UART pclk clock name
arch/arm/boot/dts/meson.dtsi | 18 +++++++++---------
arch/arm/mach-meson/platsmp.c | 2 +-
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 4 ++--
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 6 +++---
drivers/soc/amlogic/meson-gx-socinfo.c | 4 ++--
5 files changed, 17 insertions(+), 17 deletions(-)
^ permalink raw reply
* [PATCH 2/2] usb: musb: davinci: Pass file_mode in platform data
From: Alejandro Mery @ 2017-12-08 19:23 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20171208192355.32735-1-amery@hanoverdisplays.com>
as it was done for glues to allow setting the correct
fifo_mode when multiple MUSB glue layers are built-in
Fixes: 8a77f05aa39b ("usb: musb: Pass fifo_mode in platform data")
Signed-off-by: Alejandro Mery <amery@hanoverdisplays.com>
---
drivers/usb/musb/davinci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c
index 6571f9e59f8f..2632efd3d598 100644
--- a/drivers/usb/musb/davinci.c
+++ b/drivers/usb/musb/davinci.c
@@ -472,6 +472,7 @@ static const struct musb_platform_ops davinci_ops = {
.quirks = MUSB_DMA_CPPI,
.init = davinci_musb_init,
.exit = davinci_musb_exit,
+ .fifo_mode = 2,
#ifdef CONFIG_USB_TI_CPPI_DMA
.dma_init = cppi_dma_controller_create,
--
2.15.0
^ permalink raw reply related
* [PATCH 1/2] usb: musb: un-break davinci glue layer
From: Alejandro Mery @ 2017-12-08 19:23 UTC (permalink / raw)
To: linux-arm-kernel
MUSB's davinci glue was made to depend on BROKEN by Felipe Balbi back in
2013 because of lack of active development. needed changes were actually trivial
Fixes: 787f5627bec8 (usb: musb: make davinci and da8xx glues depend on BROKEN)
Signed-off-by: Alejandro Mery <amery@hanoverdisplays.com>
---
drivers/usb/musb/Kconfig | 1 -
drivers/usb/musb/davinci.c | 20 ++++++++++----------
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
index 5506a9c03c1f..e13320eebbbf 100644
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
@@ -76,7 +76,6 @@ config USB_MUSB_DAVINCI
tristate "DaVinci"
depends on ARCH_DAVINCI_DMx
depends on NOP_USB_XCEIV
- depends on BROKEN
config USB_MUSB_DA8XX
tristate "DA8xx/OMAP-L1x"
diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c
index 2ad39dcd2f4c..6571f9e59f8f 100644
--- a/drivers/usb/musb/davinci.c
+++ b/drivers/usb/musb/davinci.c
@@ -39,6 +39,7 @@
struct davinci_glue {
struct device *dev;
struct platform_device *musb;
+ struct platform_device *phy;
struct clk *clk;
};
@@ -363,10 +364,8 @@ static int davinci_musb_init(struct musb *musb)
int ret = -ENODEV;
musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2);
- if (IS_ERR_OR_NULL(musb->xceiv)) {
- ret = -EPROBE_DEFER;
- goto unregister;
- }
+ if (IS_ERR_OR_NULL(musb->xceiv))
+ return -EPROBE_DEFER;
musb->mregs += DAVINCI_BASE_OFFSET;
@@ -418,8 +417,6 @@ static int davinci_musb_init(struct musb *musb)
fail:
usb_put_phy(musb->xceiv);
-unregister:
- usb_phy_generic_unregister();
return ret;
}
@@ -527,7 +524,9 @@ static int davinci_probe(struct platform_device *pdev)
pdata->platform_ops = &davinci_ops;
- usb_phy_generic_register();
+ glue->phy = usb_phy_generic_register();
+ if (IS_ERR(glue->phy))
+ goto err1;
platform_set_drvdata(pdev, glue);
memset(musb_resources, 0x00, sizeof(*musb_resources) *
@@ -563,14 +562,15 @@ static int davinci_probe(struct platform_device *pdev)
if (IS_ERR(musb)) {
ret = PTR_ERR(musb);
dev_err(&pdev->dev, "failed to register musb device: %d\n", ret);
- goto err1;
+ goto err2;
}
return 0;
+err2:
+ usb_phy_generic_unregister(glue->phy);
err1:
clk_disable(clk);
-
err0:
return ret;
}
@@ -580,7 +580,7 @@ static int davinci_remove(struct platform_device *pdev)
struct davinci_glue *glue = platform_get_drvdata(pdev);
platform_device_unregister(glue->musb);
- usb_phy_generic_unregister();
+ usb_phy_generic_unregister(glue->phy);
clk_disable(glue->clk);
return 0;
--
2.15.0
^ permalink raw reply related
* [PATCH v4 4/8] arm: OMAP: Move dmtimer driver out of plat-omap to drivers under clocksource
From: Ladislav Michl @ 2017-12-08 19:19 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <a2f06a16-2468-6b09-171a-ad96e39af3eb@linaro.org>
On Fri, Dec 08, 2017 at 06:50:32PM +0100, Daniel Lezcano wrote:
> On 08/12/2017 18:20, Ladislav Michl wrote:
> > Daniel,
> >
> > On Thu, Dec 07, 2017 at 11:54:27AM +0100, Daniel Lezcano wrote:
> >> On 01/12/2017 06:16, Keerthy wrote:
> >>> Move the dmtimer driver out of plat-omap to clocksource.
> >>> So that non-omap devices also could use this.
> >>>
> >>> No Code changes done to the driver file.
> >>>
> >>> Signed-off-by: Keerthy <j-keerthy@ti.com>
> >>> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
> >>> ---
> >>>
> >>> Changes in v3:
> >>>
> >>> * Added Sebastian's Reviewed-by.
> >>>
> >>> Changes in v2:
> >>>
> >>> * No code changes in this v2 version. Only enhanced patch
> >>> statistics for renames.
> >>>
> >>> arch/arm/plat-omap/Kconfig | 6 ------
> >>> arch/arm/plat-omap/Makefile | 1 -
> >>> drivers/clocksource/Kconfig | 6 ++++++
> >>> drivers/clocksource/Makefile | 1 +
> >>> {arch/arm/plat-omap => drivers/clocksource}/dmtimer.c | 0
> >>> 5 files changed, 7 insertions(+), 7 deletions(-)
> >>> rename {arch/arm/plat-omap => drivers/clocksource}/dmtimer.c (100%)
> >>
> >> Take the opportunity to rename it timer-dm.c
> >
> > seems the drivers/clocksource subdirectory contains what its name state.
>
> Yes, clocksource, clockevent.
>
> > However OMAP dual mode timers have also event capture capability, which
> > I'd like to use to measure pulse/space width and pass measured values
> > to IR protocol decoders.
> > Do you have any idea how to split code, so that event capture capability
> > could be used by other drivers?
> Not 100% sure but could be drivers/pwm, using the capture API.
I hoped for another answer as pwm_capture is blocking operation while
something event (interrupt) driven would be more usefull.
But that's for different debate, so I'll prepare quick and dirty patch
to start with.
Thank you,
ladis
^ permalink raw reply
* [PATCH v1 1/6] ARM: davinci: clean up map_io functions
From: David Lechner @ 2017-12-08 19:14 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <0dad9d38-3645-c295-212b-6b66733f633b@ti.com>
On 12/08/2017 09:34 AM, Sekhar Nori wrote:
> On Thursday 07 December 2017 10:44 PM, David Lechner wrote:
>> On 12/07/2017 08:52 AM, Sekhar Nori wrote:
>>> On Saturday 02 December 2017 08:04 AM, David Lechner wrote:
>>>> This cleans up the map_io functions in the board init files for
>>>> mach-davinci.
>>>>
>>>> Most of the boards had a wrapper function around <board>_init(). This
>>>> wrapper is removed and the function is used directly. Additionally, the
>>>> <board>_init() functions are renamed to <board>_map_io() to match the
>>>> field name.
>>>>
>>>> Signed-off-by: David Lechner <david@lechnology.com>
>>>
>>>> diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c
>>>> b/arch/arm/mach-davinci/board-dm646x-evm.c
>>>> index cb0a41e..f0e2762 100644
>>>> --- a/arch/arm/mach-davinci/board-dm646x-evm.c
>>>> +++ b/arch/arm/mach-davinci/board-dm646x-evm.c
>>>> @@ -716,16 +716,6 @@ static void __init evm_init_i2c(void)
>>>> ? }
>>>> ? #endif
>>>> ? -#define DM6467T_EVM_REF_FREQ??????? 33000000
>>>> -
>>>> -static void __init davinci_map_io(void)
>>>> -{
>>>> -??? dm646x_init();
>>>
>>> The call to dm646x_init() is dropped here, but I don't see it added
>>> back, at least in this patch.
>>
>> dm646x_init() is renamed to dm646x_map_io(), which is used directly in
>> MACHINE_START().
>
> Ah, I missed that. But I think its a symptom of too many things going on
> in the patch. How about splitting the patch to:
>
> a) Remove trivial <board>_map_io() wrappers and use <soc>_init()
> directly to initialize .map_io
>
> b) Rename <soc>_init() to <soc>_map_io
>
>>
>>>
>>>> diff --git a/arch/arm/mach-davinci/dm646x.c
>>>> b/arch/arm/mach-davinci/dm646x.c
>>>> index da21353..b3be5c8 100644
>>>> --- a/arch/arm/mach-davinci/dm646x.c
>>>> +++ b/arch/arm/mach-davinci/dm646x.c
>>>> @@ -17,6 +17,7 @@
>>>> ? #include <linux/platform_data/edma.h>
>>>> ? #include <linux/platform_data/gpio-davinci.h>
>>>> ? +#include <asm/mach-types.h>
>>>> ? #include <asm/mach/map.h>
>>>> ? ? #include <mach/cputype.h>
>>>> @@ -952,11 +953,16 @@ int __init dm646x_init_edma(struct
>>>> edma_rsv_info *rsv)
>>>> ????? return IS_ERR(edma_pdev) ? PTR_ERR(edma_pdev) : 0;
>>>> ? }
>>>> ? -void __init dm646x_init(void)
>>>> +#define DM6467T_EVM_REF_FREQ??????? 33000000
>>>> +
>>>> +void __init dm646x_map_io(void)
>>>> ? {
>>>> ????? davinci_common_init(&davinci_soc_info_dm646x);
>>>> ????? davinci_map_sysmod();
>>>> ????? davinci_clk_init(davinci_soc_info_dm646x.cpu_clks);
>>>> +
>>>> +??? if (machine_is_davinci_dm6467tevm())
>>>> +??????? davinci_set_refclk_rate(DM6467T_EVM_REF_FREQ);
>>>> ? }
>>>
>>> I think we should leave the DM646x case out of this since there are
>>> additional issues like introducing these EVM specific defines in a file
>>> meant for SoC.
>>
>> I agree with the sentiment. This quirk gets moved around several times
>> in this series just to keep things working for a git bisect even if it
>> is not the ideal place for it to be.
>>
>> Currently, all boards use a common reference frequency from the common
>> SoC files instead of the board file. I have not done so in this version
>> of the series, but I could rework it so that this happens, which would
>> remove the need for this quirk altogether. But even then, it would
>> probably get shuffled around a bit before being eliminated.
>
> We should avoid shuffling and modifying the same code repeatedly if we
> can. I think, it will be easier to read if patch 2 and 1 are interchanged.
>
> There is a lot going on and I wasn't sure how that will look so I tried
> it briefly and pushed a branch.
>
> Do have a look, but this seems better to me.
>
> https://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci.git/log/?h=for-davidl
>
Thank you for the suggestion. I think it will be better as well. I'll
respin the series and we'll see how it works.
^ permalink raw reply
* [PATCH v1 1/6] ARM: davinci: clean up map_io functions
From: David Lechner @ 2017-12-08 19:11 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <2f847539-0425-5d26-a48c-537ed32940ca@ti.com>
On 12/08/2017 09:38 AM, Sekhar Nori wrote:
> On Saturday 02 December 2017 08:04 AM, David Lechner wrote:
>> static int dm355leopard_mmc_get_cd(int module)
>> {
>> if (!gpio_is_valid(leopard_mmc_gpio))
>> @@ -269,7 +264,7 @@ static __init void dm355_leopard_init(void)
>>
>> MACHINE_START(DM355_LEOPARD, "DaVinci DM355 leopard")
>> .atag_offset = 0x100,
>> - .map_io = dm355_leopard_map_io,
>> + .map_io = dm355_map_io,
>> .init_irq = davinci_irq_init,
>> .init_time = davinci_timer_init,
>> .init_machine = dm355_leopard_init,
>
> It seems like spaces were used in original code for indentation. Can you
> please introduce a patch to fix that first since you are now touching
> this part of the code?
Many of the board files have mixed spaces and tabs here. I went with
tabs since the newest commits used tabs. But, yes, I can clean this up.
^ permalink raw reply
* [PATCH] ARM64: dts: meson-gx: fix UART pclk clock name
From: Kevin Hilman @ 2017-12-08 18:56 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1512378293-22198-1-git-send-email-narmstrong@baylibre.com>
Neil Armstrong <narmstrong@baylibre.com> writes:
> The clock-names for pclk was wrongly set to "core", but the bindings
> specifies "pclk".
> This was not cathed until the legacy non-documented bindings were removed.
>
> Reported-by: Andreas F?rber <afaerber@suse.de>
> Fixes: f72d6f6037b7 ("ARM64: dts: meson-gx: use stable UART bindings with correct gate clock")
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Applied to v4.15/fixes,
Thanks,
Kevin
^ permalink raw reply
* Applied "ASoC: atmel-classd: select correct Kconfig symbol" to the asoc tree
From: Mark Brown @ 2017-12-08 18:50 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20171208141853.3879-1-alexandre.belloni@free-electrons.com>
The patch
ASoC: atmel-classd: select correct Kconfig symbol
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 0f0be40ba59c2d5fdfea48e3ff93f6165d616440 Mon Sep 17 00:00:00 2001
From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Date: Fri, 8 Dec 2017 15:18:53 +0100
Subject: [PATCH] ASoC: atmel-classd: select correct Kconfig symbol
SND_ATMEL_SOC_CLASSD selects SND_ATMEL_SOC_DMA but the driver itself
handles its own DMA operations and doesn't need anything from
atmel-pcm-dma.c or atmel_ssc_dai.c.
Replace SND_ATMEL_SOC_DMA by SND_SOC_GENERIC_DMAENGINE_PCM which is the
only one actually required.
This may end up in a configuration leading to a link error:
sound/soc/atmel/atmel_ssc_dai.o: In function `atmel_ssc_set_audio':
atmel_ssc_dai.c:(.text+0x79c): undefined reference to `atmel_pcm_dma_platform_register'
atmel_ssc_dai.c:(.text+0x79c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `atmel_pcm_dma_platform_register'
sound/soc/atmel/atmel_ssc_dai.o: In function `atmel_ssc_put_audio':
atmel_ssc_dai.c:(.text+0xf24): undefined reference to `atmel_pcm_dma_platform_unregister'
atmel_ssc_dai.c:(.text+0xf24): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `atmel_pcm_dma_platform_unregister'
Tested on sama5d2 xplained with the following configuration
where nothing selects SND_ATMEL_SOC_DMA:
CONFIG_SND_ATMEL_SOC=y
CONFIG_SND_ATMEL_SOC_CLASSD=y
Reported-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Arnd Bergmann <arnd@arndb.de>
Fixes: e0a25b6d1862 ("ASoC: atmel-classd: add the Audio Class D Amplifier")
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/atmel/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/atmel/Kconfig b/sound/soc/atmel/Kconfig
index 4a56f3dfba51..dcee145dd179 100644
--- a/sound/soc/atmel/Kconfig
+++ b/sound/soc/atmel/Kconfig
@@ -64,7 +64,7 @@ config SND_AT91_SOC_SAM9X5_WM8731
config SND_ATMEL_SOC_CLASSD
tristate "Atmel ASoC driver for boards using CLASSD"
depends on ARCH_AT91 || COMPILE_TEST
- select SND_ATMEL_SOC_DMA
+ select SND_SOC_GENERIC_DMAENGINE_PCM
select REGMAP_MMIO
help
Say Y if you want to add support for Atmel ASoC driver for boards using
--
2.15.1
^ permalink raw reply related
* [PATCH v3 1/3] interconnect: Add generic on-chip interconnect API
From: Amit Kucheria @ 2017-12-08 18:38 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20170908171830.13813-2-georgi.djakov@linaro.org>
On Fri, Sep 8, 2017 at 10:48 PM, Georgi Djakov <georgi.djakov@linaro.org> wrote:
> This patch introduce a new API to get requirements and configure the
> interconnect buses across the entire chipset to fit with the current demand.
>
> The API is using a consumer/provider-based model, where the providers are
> the interconnect buses and the consumers could be various drivers.
> The consumers request interconnect resources (path) between endpoints and
> set the desired constraints on this data flow path. The providers receive
> requests from consumers and aggregate these requests for all master-slave
> pairs on that path. Then the providers configure each participating in the
> topology node according to the requested data flow path, physical links and
> constraints. The topology could be complicated and multi-tiered and is SoC
> specific.
>
> Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
> ---
> Documentation/interconnect/interconnect.rst | 93 +++++++
> drivers/Kconfig | 2 +
> drivers/Makefile | 1 +
> drivers/interconnect/Kconfig | 10 +
> drivers/interconnect/Makefile | 1 +
> drivers/interconnect/interconnect.c | 382 ++++++++++++++++++++++++++++
> include/linux/interconnect-consumer.h | 73 ++++++
> include/linux/interconnect-provider.h | 119 +++++++++
> 8 files changed, 681 insertions(+)
> create mode 100644 Documentation/interconnect/interconnect.rst
> create mode 100644 drivers/interconnect/Kconfig
> create mode 100644 drivers/interconnect/Makefile
> create mode 100644 drivers/interconnect/interconnect.c
> create mode 100644 include/linux/interconnect-consumer.h
> create mode 100644 include/linux/interconnect-provider.h
>
<snip>
> diff --git a/include/linux/interconnect-consumer.h b/include/linux/interconnect-consumer.h
> new file mode 100644
> index 000000000000..6e71bf7a63c0
> --- /dev/null
> +++ b/include/linux/interconnect-consumer.h
> @@ -0,0 +1,73 @@
> +/*
> + * Copyright (c) 2017, Linaro Ltd.
> + *
> + * This software is licensed under the terms of the GNU General Public
> + * License version 2, as published by the Free Software Foundation, and
> + * may be copied, distributed, and modified under those terms.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + */
> +
> +#ifndef _LINUX_INTERCONNECT_CONSUMER_H
> +#define _LINUX_INTERCONNECT_CONSUMER_H
> +
> +struct interconnect_node;
> +struct interconnect_path;
> +
> +#if IS_ENABLED(CONFIG_INTERCONNECT)
> +
> +struct interconnect_path *interconnect_get(const char *sdev, const int sid,
> + const char *ddev, const int did);
> +
> +void interconnect_put(struct interconnect_path *path);
> +
> +/**
> + * struct creq - interconnect consumer request
> + * @avg_bw: the average requested bandwidth (over longer period of time) in kbps
> + * @peak_bw: the peak (maximum) bandwidth in kpbs
> + */
> +struct interconnect_creq {
> + u32 avg_bw;
> + u32 peak_bw;
> +};
> +
> +/**
> + * interconnect_set() - set constraints on a path between two endpoints
> + * @path: reference to the path returned by interconnect_get()
> + * @creq: request from the consumer, containing its requirements
> + *
> + * This function is used by an interconnect consumer to express its own needs
> + * in term of bandwidth and QoS for a previously requested path between two
> + * endpoints. The requests are aggregated and each node is updated accordingly.
> + *
> + * Returns 0 on success, or an approproate error code otherwise.
> + */
> +int interconnect_set(struct interconnect_path *path,
> + struct interconnect_creq *creq);
> +
> +#else
> +
> +inline struct interconnect_path *interconnect_get(const char *sdev,
> + const int sid,
> + const char *ddev,
> + const int did)
> +{
> + return ERR_PTR(-ENOTSUPP);
> +}
> +
> +inline void interconnect_put(struct interconnect_path *path)
> +{
> +}
> +
> +inline int interconnect_set(struct interconnect_path *path,
> + struct interconnect_creq *creq);
Remove the semi colon
> +{
> + return -ENOTSUPP
return ERR_PTR(-ENOTSUPP);
> +}
> +
This breaks the build with INTERCONNECT disabled in Kconfig.
^ permalink raw reply
* [PATCH 4/4] PCI: dwc: pci-dra7xx: Fix legacy IRQ handling
From: Lorenzo Pieralisi @ 2017-12-08 18:35 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20171201061311.16691-5-vigneshr@ti.com>
On Fri, Dec 01, 2017 at 11:43:11AM +0530, Vignesh R wrote:
> Legacy INTD IRQ handling is broken on dra7xx due to fact that driver
> uses hwirq in range of 1-4 for INTA, INTD whereas IRQ domain is of size
> 4 which is numbered 0-3. Therefore when INTD IRQ line is used with
> pci-dra7xx driver following warning is seen:
>
> WARNING: CPU: 0 PID: 1 at kernel/irq/irqdomain.c:342 irq_domain_associate+0x12c/0x1c4
> error: hwirq 0x4 is too large for dummy
>
> Fix this by using pci_irqd_intx_xlate() helper to translate the INTx 1-4
> range into the 0-3 as done in other PCIe drivers.
>
> Also, iterate over all the INTx bits and call their respective IRQ
> handlers before clearing the status register.
It seems to me that you are fixing two bugs with one patch and therefore
I would ask you to split it in two or explain to me why we should
consider lumping them together.
Thanks,
Lorenzo
> Suggested-by: Bjorn Helgaas <bhelgaas@google.com>
> Reported-by: Chris Welch <Chris.Welch@viavisolutions.com>
> Signed-off-by: Vignesh R <vigneshr@ti.com>
> ---
> drivers/pci/dwc/pci-dra7xx.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pci/dwc/pci-dra7xx.c b/drivers/pci/dwc/pci-dra7xx.c
> index 53f721d1cc40..59e8de34cec6 100644
> --- a/drivers/pci/dwc/pci-dra7xx.c
> +++ b/drivers/pci/dwc/pci-dra7xx.c
> @@ -226,6 +226,7 @@ static int dra7xx_pcie_intx_map(struct irq_domain *domain, unsigned int irq,
>
> static const struct irq_domain_ops intx_domain_ops = {
> .map = dra7xx_pcie_intx_map,
> + .xlate = pci_irqd_intx_xlate,
> };
>
> static int dra7xx_pcie_init_irq_domain(struct pcie_port *pp)
> @@ -256,7 +257,8 @@ static irqreturn_t dra7xx_pcie_msi_irq_handler(int irq, void *arg)
> struct dra7xx_pcie *dra7xx = arg;
> struct dw_pcie *pci = dra7xx->pci;
> struct pcie_port *pp = &pci->pp;
> - u32 reg;
> + unsigned long reg;
> + u32 virq, bit;
>
> reg = dra7xx_pcie_readl(dra7xx, PCIECTRL_DRA7XX_CONF_IRQSTATUS_MSI);
>
> @@ -268,8 +270,11 @@ static irqreturn_t dra7xx_pcie_msi_irq_handler(int irq, void *arg)
> case INTB:
> case INTC:
> case INTD:
> - generic_handle_irq(irq_find_mapping(dra7xx->irq_domain,
> - ffs(reg)));
> + for_each_set_bit(bit, ®, PCI_NUM_INTX) {
> + virq = irq_find_mapping(dra7xx->irq_domain, bit);
> + if (virq)
> + generic_handle_irq(virq);
> + }
> break;
> }
>
> --
> 2.15.0
>
^ permalink raw reply
* [PATCH] PCI: xgene: Remove leftover pci_scan_child_bus() call
From: Khuong Dinh @ 2017-12-08 18:32 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20171121154931.7724-1-lorenzo.pieralisi@arm.com>
Hi Lorenzo,
On Tue, Nov 21, 2017 at 7:49 AM, Lorenzo Pieralisi
<lorenzo.pieralisi@arm.com> wrote:
> The changes in commit 9af275be15f7 ("PCI: xgene: Convert PCI scan API to
> pci_scan_root_bus_bridge()") converted the xgene PCI host driver to
> the new pci_scan_root_bus_bridge() bus scanning API but erroneously left
> the existing pci_scan_child_bus() call in place which resulted in duplicate
> PCI bus enumerations.
>
> Remove the leftover pci_scan_child_bus() call to properly complete the API
> conversion.
>
> Fixes: 9af275be15f7 ("PCI: xgene: Convert PCI scan API to pci_scan_root_bus_bridge()")
> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Tanmay Inamdar <tinamdar@apm.com>
> ---
> drivers/pci/host/pci-xgene.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci/host/pci-xgene.c
> index 465aa2a..e60c457 100644
> --- a/drivers/pci/host/pci-xgene.c
> +++ b/drivers/pci/host/pci-xgene.c
> @@ -668,7 +668,6 @@ static int xgene_pcie_probe(struct platform_device *pdev)
>
> bus = bridge->bus;
>
> - pci_scan_child_bus(bus);
> pci_assign_unassigned_bus_resources(bus);
> list_for_each_entry(child, &bus->children, node)
> pcie_bus_configure_settings(child);
> --
> 2.9.5
>
It is good with X-Gene
Tested-by: Khuong Dinh <kdinh@apm.com>
^ permalink raw reply
* [PATCH v4 4/8] arm: OMAP: Move dmtimer driver out of plat-omap to drivers under clocksource
From: Daniel Lezcano @ 2017-12-08 17:50 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20171208172031.GA4146@lenoch>
On 08/12/2017 18:20, Ladislav Michl wrote:
> Daniel,
>
> On Thu, Dec 07, 2017 at 11:54:27AM +0100, Daniel Lezcano wrote:
>> On 01/12/2017 06:16, Keerthy wrote:
>>> Move the dmtimer driver out of plat-omap to clocksource.
>>> So that non-omap devices also could use this.
>>>
>>> No Code changes done to the driver file.
>>>
>>> Signed-off-by: Keerthy <j-keerthy@ti.com>
>>> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
>>> ---
>>>
>>> Changes in v3:
>>>
>>> * Added Sebastian's Reviewed-by.
>>>
>>> Changes in v2:
>>>
>>> * No code changes in this v2 version. Only enhanced patch
>>> statistics for renames.
>>>
>>> arch/arm/plat-omap/Kconfig | 6 ------
>>> arch/arm/plat-omap/Makefile | 1 -
>>> drivers/clocksource/Kconfig | 6 ++++++
>>> drivers/clocksource/Makefile | 1 +
>>> {arch/arm/plat-omap => drivers/clocksource}/dmtimer.c | 0
>>> 5 files changed, 7 insertions(+), 7 deletions(-)
>>> rename {arch/arm/plat-omap => drivers/clocksource}/dmtimer.c (100%)
>>
>> Take the opportunity to rename it timer-dm.c
>
> seems the drivers/clocksource subdirectory contains what its name state.
Yes, clocksource, clockevent.
> However OMAP dual mode timers have also event capture capability, which
> I'd like to use to measure pulse/space width and pass measured values
> to IR protocol decoders.
> Do you have any idea how to split code, so that event capture capability
> could be used by other drivers?
Not 100% sure but could be drivers/pwm, using the capture API.
--
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply
* [PATCH v4 4/8] arm: OMAP: Move dmtimer driver out of plat-omap to drivers under clocksource
From: Ladislav Michl @ 2017-12-08 17:20 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <e71f4c7b-e5c7-6305-dc1c-274da6fbf07d@linaro.org>
Daniel,
On Thu, Dec 07, 2017 at 11:54:27AM +0100, Daniel Lezcano wrote:
> On 01/12/2017 06:16, Keerthy wrote:
> > Move the dmtimer driver out of plat-omap to clocksource.
> > So that non-omap devices also could use this.
> >
> > No Code changes done to the driver file.
> >
> > Signed-off-by: Keerthy <j-keerthy@ti.com>
> > Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
> > ---
> >
> > Changes in v3:
> >
> > * Added Sebastian's Reviewed-by.
> >
> > Changes in v2:
> >
> > * No code changes in this v2 version. Only enhanced patch
> > statistics for renames.
> >
> > arch/arm/plat-omap/Kconfig | 6 ------
> > arch/arm/plat-omap/Makefile | 1 -
> > drivers/clocksource/Kconfig | 6 ++++++
> > drivers/clocksource/Makefile | 1 +
> > {arch/arm/plat-omap => drivers/clocksource}/dmtimer.c | 0
> > 5 files changed, 7 insertions(+), 7 deletions(-)
> > rename {arch/arm/plat-omap => drivers/clocksource}/dmtimer.c (100%)
>
> Take the opportunity to rename it timer-dm.c
seems the drivers/clocksource subdirectory contains what its name state.
However OMAP dual mode timers have also event capture capability, which
I'd like to use to measure pulse/space width and pass measured values
to IR protocol decoders.
Do you have any idea how to split code, so that event capture capability
could be used by other drivers?
Thank you,
ladis
> > diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
> > index 7276afe..afc1a1d 100644
> > --- a/arch/arm/plat-omap/Kconfig
> > +++ b/arch/arm/plat-omap/Kconfig
> > @@ -106,12 +106,6 @@ config OMAP3_L2_AUX_SECURE_SERVICE_SET_ID
> > help
> > PPA routine service ID for setting L2 auxiliary control register.
> >
> > -config OMAP_DM_TIMER
> > - bool "Use dual-mode timer"
> > - depends on ARCH_OMAP16XX || ARCH_OMAP2PLUS
> > - help
> > - Select this option if you want to use OMAP Dual-Mode timers.
> > -
> > config OMAP_SERIAL_WAKE
> > bool "Enable wake-up events for serial ports"
> > depends on ARCH_OMAP1 && OMAP_MUX
> > diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
> > index 47e1867..7215ada 100644
> > --- a/arch/arm/plat-omap/Makefile
> > +++ b/arch/arm/plat-omap/Makefile
> > @@ -9,5 +9,4 @@ obj-y := sram.o dma.o counter_32k.o
> >
> > # omap_device support (OMAP2+ only at the moment)
> >
> > -obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o
> > obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o
> > diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
> > index c729a88..4da66cf 100644
> > --- a/drivers/clocksource/Kconfig
> > +++ b/drivers/clocksource/Kconfig
> > @@ -46,6 +46,12 @@ config DIGICOLOR_TIMER
> > help
> > Enables the support for the digicolor timer driver.
> >
> > +config OMAP_DM_TIMER
> > + bool "Use dual-mode timer"
> > + depends on ARCH_OMAP16XX || ARCH_OMAP2PLUS
> > + help
> > + Select this option if you want to use Dual-Mode timers.
> > +
>
> So in the clocksource directory the rule is the following:
>
> The config option is silent except if COMPILE_TEST is set.
>
> It is the Kconfig's platform which select the driver so there is no deps
> on the ARCH.
>
> config OMAP_DM_TIMER
> bool "Use dual-mode timer" if COMPILE_TEST
> help
> Select this option if you want to use Dual-Mode timers.
>
> Here you will have to make sure the driver compiles on x86.
>
> > config DW_APB_TIMER
> > bool "DW APB timer driver" if COMPILE_TEST
> > help
> > diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile
> > index 72711f1..b077076 100644
> > --- a/drivers/clocksource/Makefile
> > +++ b/drivers/clocksource/Makefile
> > @@ -16,6 +16,7 @@ obj-$(CONFIG_EM_TIMER_STI) += em_sti.o
> > obj-$(CONFIG_CLKBLD_I8253) += i8253.o
> > obj-$(CONFIG_CLKSRC_MMIO) += mmio.o
> > obj-$(CONFIG_DIGICOLOR_TIMER) += timer-digicolor.o
> > +obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o
> > obj-$(CONFIG_DW_APB_TIMER) += dw_apb_timer.o
> > obj-$(CONFIG_DW_APB_TIMER_OF) += dw_apb_timer_of.o
> > obj-$(CONFIG_FTTMR010_TIMER) += timer-fttmr010.o
> > diff --git a/arch/arm/plat-omap/dmtimer.c b/drivers/clocksource/dmtimer.c
> > similarity index 100%
> > rename from arch/arm/plat-omap/dmtimer.c
> > rename to drivers/clocksource/dmtimer.c
> >
>
>
> --
> <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs
>
> Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
> <http://twitter.com/#!/linaroorg> Twitter |
> <http://www.linaro.org/linaro-blog/> Blog
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH v4.14] Add support for bq27521 battery monitor
From: Sebastian Reichel @ 2017-12-08 17:06 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <cfa89227-e08a-849f-c886-723268ae657c@ti.com>
Hi,
On Mon, Dec 04, 2017 at 09:20:33AM -0600, Andrew F. Davis wrote:
> On 12/01/2017 05:06 PM, Pavel Machek wrote:
> > Hi!
> >
> >> This adds basic support for BQ27521 battery monitor, used in Nokia N9
> >> and N950. In particular, battery voltage is important to be able to
> >> tell when the battery is almost empty. Emptying battery on N950 is
> >> pretty painful, as flasher needs to be used to recover phone in such
> >> case.
> >
> > Sebastian, ping? This one should not be too controversial.
>
> Acked-by: Andrew F. Davis <afd@ti.com>
Thanks, queued, I dropped the spurious change in twl.h and added the
dt-binding from the previous patch version, that was lost somehow.
> > If you could also apply the "shut down when battery is low", that
> > would be nice.
I only have one with values specific to N900 hardcoded in the
driver. That one can't be applied for obvious reasons.
-- Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171208/e6e946c7/attachment-0001.sig>
^ permalink raw reply
* [PATCH v2] firmware: qcom: scm: Fix incorrect of_node_put call in scm_init
From: Stephen Boyd @ 2017-12-08 17:04 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <c049d689-44f0-3ee6-ca50-af4873545fce@baylibre.com>
On 12/07, Loys Ollivier wrote:
>
>
> On 07/12/2017 09:42, Jerome Forissier wrote:
> >
> >
> > On 12/06/2017 09:06 PM, Stephen Boyd wrote:
> >> On 12/06, Loys Ollivier wrote:
> >>> When using other platform architectures, in the init of the qcom_scm
> >>> driver, of_node_put is called on /firmware if no qcom dt is found.
> >>> This results in a kernel error: Bad of_node_put() on /firmware.
> >>>
> >>> The call to of_node_put from the qcom_scm init is unnecessary as
> >>> of_find_matching_node is calling it automatically.
> >>>
> >>> Remove this of_node_put().
> >>>
> >>> Fixes: d0f6fa7ba2d6 ("firmware: qcom: scm: Convert SCM to platform driver")
> >>> Signed-off-by: Loys Ollivier <lollivier@baylibre.com>
> >>> ---
> >>
> >> This still looks wrong. Especially if of_find_matching_node() is
> >> going to look for siblings of the /firmware node for the
> >> compatible string for scm device. Why do we check at all? Can't
> >> we just delete this and let of_platform_populate() take care of
> >> it? BTW, OP-TEE driver seems to have a similar problem.
> >
> > https://lkml.org/lkml/2017/11/29/230
> >
> Well, the patch I sent is a fix for a specific bug I am encountering.
> I tested the patch and it solves my problem. Stephen, your changes looks
> good but it's a change in the driver's behavior. Maybe it could be
> another patch ?
Sure. But there's another of_node_put(fw_np) in this function, so
why isn't that also removed? Assuming of_find_matching_node() is
calling of_node_put() on what's passed in, then the node is going
to get put twice in the "working" case.
Andy?
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply
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