Re: [PATCH 14/28] Remove MACH_SMDKC210
On Fri, Feb 28, 2014 at 10:43:09PM +0100, Paul Bolle wrote: > That commit is fine with me, of course. I now see no reason to continue > my, rather slowly progressing, search for the problem that you wanted to > get properly fixed. I suppose another commit already fixed it. No, but it's someone from Samsung (Sachin works with the Samsung landing team at Linaro) not caring about those drivers on these boards any more and mentioning the DT conversion which is rather different to someone doing mechanical cleanup with no mention of where the symbols went. It should be fairly obvious that if the reason symbols are being removed due to DT conversion of the platforms then the default thing should be that the drivers be being converted to DT and appropriate DT entries being added to the board DTS files, but more generally the important thing is that some understanding is shown as to why the symbols vanished and why the mechanical fix suggested is OK. signature.asc Description: Digital signature
Re: [PATCH 0/7] PCI irq mapping fixes and cleanups
On Fri, Feb 28, 2014 at 9:28 AM, Lucas Stach wrote: > This series cleans up the PCI irq mapping for all > the ARM PCI host drivers, so they handle it in the > way defined in the common PCI bindings. > > Testing appreciated. > > Lucas Stach (7): > ARM: dts: tegra: add PCIe interrupt mapping properties > PCI: tegra: use new OF interrupt mapping when possible > PCI: rcar: use new OF interrupt mapping when possible > ARM: dts: exynos5440: fix PCIe interrupt mapping > ARM: dts: imx6: add PCIe interrupt mapping properties > PCI: designware: use new OF interrupt mapping when possible > PCI: designware: split samsung and fsl bindings > > .../devicetree/bindings/pci/designware-pcie.txt| 69 + > .../devicetree/bindings/pci/fsl,imx6q-pcie.txt | 48 +++ > .../bindings/pci/nvidia,tegra20-pcie.txt | 8 +++ > .../bindings/pci/samsung,exynos5440-pcie.txt | 70 > ++ > arch/arm/boot/dts/exynos5440.dtsi | 4 +- > arch/arm/boot/dts/imx6qdl.dtsi | 11 > arch/arm/boot/dts/tegra20.dtsi | 4 ++ > arch/arm/boot/dts/tegra30.dtsi | 4 ++ > drivers/pci/host/pci-rcar-gen2.c | 8 ++- > drivers/pci/host/pci-tegra.c | 7 ++- > drivers/pci/host/pcie-designware.c | 8 ++- > 11 files changed, 168 insertions(+), 73 deletions(-) > create mode 100644 Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt > create mode 100644 > Documentation/devicetree/bindings/pci/samsung,exynos5440-pcie.txt > > -- > 1.8.5.3 > Lucas, In testing this on IMX6 I'm finding that 'of_irq_parse_and_map_pci()' always returns -EINVAL because it can't find a dt node for the host bridge: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/of/of_pci_irq.c#n60. So it seems there is still something missing in the imx6 devicetree regarding a 'host bridge'? Is this solution expecting the range/interrupt data from the PCI host controller to be encapsulated in a host-bridge node such as http://lxr.missinglinkelectronics.com/linux/Documentation/devicetree/bindings/pci/ralink,rt3883-pci.txt#L124? If so, thats not how the imx6 host controller node is currently defined. In my particular test case I have a baseboard with a socket on it and a PLX PEX860x PCIe switch on an add-in card. So I don't think it makes sense to me to describe the add-in card in the baseboard DT - that wouldn't be very plug-n-play. By the way, I'm not referring to the add-in card with the TI-XIO2001 PCIe-to-PCI bridge with the mismapped IRQ's - I'm aware that I would need to deal with that somehow in devicetree (still trying to understand how). Thanks, Tim -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
CONTACT KENYA COMMERCIAL BANK LTD IMMEDIATELY FOR YOUR PAYMENT (3MILLION UNITED STATE DOLLARS)
Attention: Please, Kindly contact KENYA COMMERCIAL BANK immediately for your compensation payment of (3MILLION UNITED STATE DOLLARS) via email: Email:(servic...@kenya.ncommercialbnk.com) quote your payment Ref No:KCB/00Y/2014 For purposes of immediate payment. -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 14/28] Remove MACH_SMDKC210
On Wed, 2014-02-12 at 16:04 +, Mark Brown wrote: > On Mon, Feb 10, 2014 at 11:09:19PM +0100, Paul Bolle wrote: > > See, if you scan v3.10:arch/arm/mach-exynos/mach-smdkv310.c you'll > > notice the string "smdk-audio". If you grep that string you get a few > > hits. But none in v3.10:sound/soc/samsung/smdk_wm9713.c. And if you scan > > v3.10:sound/soc/samsung/smdk_wm9713.c for strings you'll find stuff like > > "wm9713-hifi", "wm9713-codec", and "soc-audio". But these don't show up > > in v3.10:arch/arm/mach-exynos/mach-smdkv310.c. So it's not obvious how > > these two files relate. > > > And I'm left wondering why SND_SOC_SAMSUNG_SMDK_WM9713 actually depends > > on (among other symbols) MACH_SMDKV310 and MACH_SMDKC210 in v3.10. > > The hardware is physically present on those boards but must be selected > with DIP switches, the device registration needs to be changed in the > kernel when that happens (as the DT must be when it is in use). In v3.14-rc4 these two symbols suddenly got removed, see commit eaff64705dd5 ("ASoC: samsung: Remove invalid dependencies"). It does exactly what I proposed last year, see https://lkml.org/lkml/2013/7/14/27 . (That link currently shows a rather empty page; is lkml.org having problems again?) That commit is fine with me, of course. I now see no reason to continue my, rather slowly progressing, search for the problem that you wanted to get properly fixed. I suppose another commit already fixed it. Thanks, Paul Bolle -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/7] ARM: dts: tegra: add PCIe interrupt mapping properties
On 02/28/2014 10:28 AM, Lucas Stach wrote: > Those are defined by the common PCI binding. I have no reason to object to the two Tegra patches, but I'll wait for Thierry to take a closer look. I expect once he does, I would apply patch 1/7 through the Tegra tree, and Bjorn would take patch 2/7 through the PCI tree. Does that make sense? -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 7/7] PCI: designware: split samsung and fsl bindings
On Fri, Feb 28, 2014 at 9:28 AM, Lucas Stach wrote: > The glue around the core designware IP is > significantly different between the Exynos and > i.MX, which is reflected in the DT bindings. > > Note that this patch doesn't change any bindings, > but just alters the documentation to match reality > of deployed DTs and kernels. > > Signed-off-by: Lucas Stach > --- > .../devicetree/bindings/pci/designware-pcie.txt| 69 + > .../devicetree/bindings/pci/fsl,imx6q-pcie.txt | 48 +++ > .../bindings/pci/samsung,exynos5440-pcie.txt | 70 > ++ > 3 files changed, 119 insertions(+), 68 deletions(-) > create mode 100644 Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt > create mode 100644 > Documentation/devicetree/bindings/pci/samsung,exynos5440-pcie.txt > > diff --git a/Documentation/devicetree/bindings/pci/designware-pcie.txt > b/Documentation/devicetree/bindings/pci/designware-pcie.txt > index d6fae13ff062..8274c80fe874 100644 > --- a/Documentation/devicetree/bindings/pci/designware-pcie.txt > +++ b/Documentation/devicetree/bindings/pci/designware-pcie.txt > @@ -1,15 +1,7 @@ > * Synopsys Designware PCIe interface > > Required properties: > -- compatible: should contain "snps,dw-pcie" to identify the > - core, plus an identifier for the specific instance, such > - as "samsung,exynos5440-pcie" or "fsl,imx6q-pcie". > -- reg: base addresses and lengths of the pcie controller, > - the phy controller, additional register for the phy controller. > -- interrupts: interrupt values for level interrupt, > - pulse interrupt, special interrupt. > -- clocks: from common clock binding: handle to pci clock. > -- clock-names: from common clock binding: should be "pcie" and "pcie_bus". > +- compatible: should contain "snps,dw-pcie" to identify the core. > - #address-cells: set to <3> > - #size-cells: set to <2> > - device_type: set to "pci" > @@ -22,62 +14,3 @@ Required properties: > > Optional properties: > - reset-gpio: gpio pin number of power good signal > - > -Optional properties for fsl,imx6q-pcie > -- power-on-gpio: gpio pin number of power-enable signal > -- wake-up-gpio: gpio pin number of incoming wakeup signal > -- disable-gpio: gpio pin number of outgoing rfkill/endpoint disable signal > - > -Example: > - > -SoC specific DT Entry: > - > - pcie@29 { > - compatible = "samsung,exynos5440-pcie", "snps,dw-pcie"; > - reg = <0x29 0x1000 > - 0x27 0x1000 > - 0x271000 0x40>; > - interrupts = <0 20 0>, <0 21 0>, <0 22 0>; > - clocks = <&clock 28>, <&clock 27>; > - clock-names = "pcie", "pcie_bus"; > - #address-cells = <3>; > - #size-cells = <2>; > - device_type = "pci"; > - ranges = <0x0800 0 0x4000 0x4000 0 0x1000 > /* configuration space */ > - 0x8100 0 0 0x40001000 0 0x0001 > /* downstream I/O */ > - 0x8200 0 0x40011000 0x40011000 0 0x1ffef000>; > /* non-prefetchable memory */ > - #interrupt-cells = <1>; > - interrupt-map-mask = <0 0 0 0>; > - interrupt-map = <0x0 0 &gic 53>; > - num-lanes = <4>; > - }; > - > - pcie@2a { > - compatible = "samsung,exynos5440-pcie", "snps,dw-pcie"; > - reg = <0x2a 0x1000 > - 0x272000 0x1000 > - 0x271040 0x40>; > - interrupts = <0 23 0>, <0 24 0>, <0 25 0>; > - clocks = <&clock 29>, <&clock 27>; > - clock-names = "pcie", "pcie_bus"; > - #address-cells = <3>; > - #size-cells = <2>; > - device_type = "pci"; > - ranges = <0x0800 0 0x6000 0x6000 0 0x1000 > /* configuration space */ > - 0x8100 0 0 0x60001000 0 0x0001 > /* downstream I/O */ > - 0x8200 0 0x60011000 0x60011000 0 0x1ffef000>; > /* non-prefetchable memory */ > - #interrupt-cells = <1>; > - interrupt-map-mask = <0 0 0 0>; > - interrupt-map = <0x0 0 &gic 56>; > - num-lanes = <4>; > - }; > - > -Board specific DT Entry: > - > - pcie@29 { > - reset-gpio = <&pin_ctrl 5 0>; > - }; > - > - pcie@2a { > - reset-gpio = <&pin_ctrl 22 0>; > - }; > diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt > b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt > new file mode 100644 > index ..93fbfd62f13c > --- /dev/null > +++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt > @@ -0,0 +1,48 @@ > +* Freescale i.MX6 PCIe interface > + > +This PCIe host controller is based on the S
Re: [PATCH 0/7] PCI irq mapping fixes and cleanups
On Friday 28 February 2014, Lucas Stach wrote: > This series cleans up the PCI irq mapping for all > the ARM PCI host drivers, so they handle it in the > way defined in the common PCI bindings. > > Testing appreciated. > > Lucas Stach (7): > ARM: dts: tegra: add PCIe interrupt mapping properties > PCI: tegra: use new OF interrupt mapping when possible > PCI: rcar: use new OF interrupt mapping when possible > ARM: dts: exynos5440: fix PCIe interrupt mapping > ARM: dts: imx6: add PCIe interrupt mapping properties > PCI: designware: use new OF interrupt mapping when possible > PCI: designware: split samsung and fsl bindings Patches 1-6 Acked-by: Arnd Bergmann For the last patch, the clock information looks like it needs to be fixed. I realize that you are just documenting what the driver is using at the moment, but that is not a proper way of establishing a binding. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 7/7] PCI: designware: split samsung and fsl bindings
On Friday 28 February 2014, Lucas Stach wrote: > +Required properties: > +- compatible: "fsl,imx6q-pcie" > +- reg: base addresse and length of the pcie controller > +- interrupts: First entry must contain interrupt handle for controller > + INTA output. I think this should be documented as "optional" and only for backwards compatibility with old kernels. > +- clocks: Must contain an entry for each entry in clock-names. > + See ../clocks/clock-bindings.txt for details. > +- clock-names: Must include the following entries: > + - "pcie_ref_125m" > + - "sata_ref_100m" > + - "lvds_gate" > + - "pcie_axi" I don't understand why you have completely different clocks here from the exynos documentation. The clock names should really be the same. Also, why do you have a "sata_ref_100m" clock? Is this just driving a device that happens to be on-board for a specific machine? Same for the "lvds_gate". Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 4/7] ARM: dts: exynos5440: fix PCIe interrupt mapping
So it actually works. Signed-off-by: Lucas Stach --- arch/arm/boot/dts/exynos5440.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/exynos5440.dtsi b/arch/arm/boot/dts/exynos5440.dtsi index 02a0a1226cef..65d425d9ec27 100644 --- a/arch/arm/boot/dts/exynos5440.dtsi +++ b/arch/arm/boot/dts/exynos5440.dtsi @@ -274,7 +274,7 @@ 0x8200 0 0x40011000 0x40011000 0 0x1ffef000>; /* non-prefetchable memory */ #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 0>; - interrupt-map = <0x0 0 &gic 53>; + interrupt-map = <0 0 0 0 &gic GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; num-lanes = <4>; status = "disabled"; }; @@ -295,7 +295,7 @@ 0x8200 0 0x60011000 0x60011000 0 0x1ffef000>; /* non-prefetchable memory */ #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 0>; - interrupt-map = <0x0 0 &gic 56>; + interrupt-map = <0 0 0 0 &gic GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>; num-lanes = <4>; status = "disabled"; }; -- 1.8.5.3 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 5/7] ARM: dts: imx6: add PCIe interrupt mapping properties
As defined by the common PCI bindings. Signed-off-by: Lucas Stach --- arch/arm/boot/dts/imx6qdl.dtsi | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi index fb28b2ecb1db..db3339e7d3a2 100644 --- a/arch/arm/boot/dts/imx6qdl.dtsi +++ b/arch/arm/boot/dts/imx6qdl.dtsi @@ -10,6 +10,8 @@ * http://www.gnu.org/copyleft/gpl.html */ +#include + #include "skeleton.dtsi" / { @@ -126,7 +128,16 @@ 0x8100 0 0 0x01f8 0 0x0001 /* downstream I/O */ 0x8200 0 0x0100 0x0100 0 0x00f0>; /* non-prefetchable memory */ num-lanes = <1>; + interrupts = <0 123 0x04>; + + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 0x7>; + interrupt-map = <0 0 0 1 &intc GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>, + <0 0 0 2 &intc GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>, + <0 0 0 3 &intc GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>, + <0 0 0 4 &intc GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clks 189>, <&clks 187>, <&clks 206>, <&clks 144>; clock-names = "pcie_ref_125m", "sata_ref_100m", "lvds_gate", "pcie_axi"; status = "disabled"; -- 1.8.5.3 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/7] PCI: tegra: use new OF interrupt mapping when possible
This is the recommended method of doing the IRQ mapping. For old devicetrees we fall back to the previous practice. Signed-off-by: Lucas Stach --- drivers/pci/host/pci-tegra.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c index 330f7e3a32dd..083cf37ca047 100644 --- a/drivers/pci/host/pci-tegra.c +++ b/drivers/pci/host/pci-tegra.c @@ -639,10 +639,15 @@ static int tegra_pcie_setup(int nr, struct pci_sys_data *sys) static int tegra_pcie_map_irq(const struct pci_dev *pdev, u8 slot, u8 pin) { struct tegra_pcie *pcie = sys_to_pcie(pdev->bus->sysdata); + int irq; tegra_cpuidle_pcie_irqs_in_use(); - return pcie->irq; + irq = of_irq_parse_and_map_pci(pdev, slot, pin); + if (!irq) + irq = pcie->irq; + + return irq; } static void tegra_pcie_add_bus(struct pci_bus *bus) -- 1.8.5.3 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/7] PCI: rcar: use new OF interrupt mapping when possible
This is the recommended method of doing the IRQ mapping. Still fall back to the old method in order to not break the just submitted board files. Signed-off-by: Lucas Stach --- drivers/pci/host/pci-rcar-gen2.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c index ceec147baec3..3aa0c6311a42 100644 --- a/drivers/pci/host/pci-rcar-gen2.c +++ b/drivers/pci/host/pci-rcar-gen2.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -160,8 +161,13 @@ static int __init rcar_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) { struct pci_sys_data *sys = dev->bus->sysdata; struct rcar_pci_priv *priv = sys->private_data; + int irq; + + irq = of_irq_parse_and_map_pci(dev, slot, pin); + if (!irq) + irq = priv->irq; - return priv->irq; + return irq; } /* PCI host controller setup */ -- 1.8.5.3 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 6/7] PCI: designware: use new OF interrupt mapping when possible
This is the recommended method of doing the IRQ mapping. For old devicetrees we fall back to the previous practice. Signed-off-by: Lucas Stach --- drivers/pci/host/pcie-designware.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c index 17ce88f79d2b..3e0c2af11528 100644 --- a/drivers/pci/host/pcie-designware.c +++ b/drivers/pci/host/pcie-designware.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -738,8 +739,13 @@ static struct pci_bus *dw_pcie_scan_bus(int nr, struct pci_sys_data *sys) static int dw_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) { struct pcie_port *pp = sys_to_pcie(dev->bus->sysdata); + int irq; - return pp->irq; + irq = of_irq_parse_and_map_pci(dev, slot, pin); + if (!irq) + irq = pp->irq; + + return irq; } static void dw_pcie_add_bus(struct pci_bus *bus) -- 1.8.5.3 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/7] ARM: dts: tegra: add PCIe interrupt mapping properties
Those are defined by the common PCI binding. Signed-off-by: Lucas Stach --- Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt | 8 arch/arm/boot/dts/tegra20.dtsi| 4 arch/arm/boot/dts/tegra30.dtsi| 4 3 files changed, 16 insertions(+) diff --git a/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt b/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt index 24cee06915c9..c300391e8d3e 100644 --- a/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt +++ b/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt @@ -42,6 +42,10 @@ Required properties: - 0xc200: prefetchable memory region Please refer to the standard PCI bus binding document for a more detailed explanation. +- #interrupt-cells: Size representation for interrupts (must be 1) +- interrupt-map-mask and interrupt-map: Standard PCI IRQ mapping properties + Please refer to the standard PCI bus binding document for a more detailed + explanation. - clocks: Must contain an entry for each entry in clock-names. See ../clocks/clock-bindings.txt for details. - clock-names: Must include the following entries: @@ -86,6 +90,10 @@ SoC DTSI: 0 99 0x04>; /* MSI interrupt */ interrupt-names = "intr", "msi"; + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 0>; + interrupt-map = <0 0 0 0 &intc GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>; + bus-range = <0x00 0xff>; #address-cells = <3>; #size-cells = <2>; diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi index 480ecda3416b..52ef2cf0b142 100644 --- a/arch/arm/boot/dts/tegra20.dtsi +++ b/arch/arm/boot/dts/tegra20.dtsi @@ -552,6 +552,10 @@ GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>; /* MSI interrupt */ interrupt-names = "intr", "msi"; + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 0>; + interrupt-map = <0 0 0 0 &intc GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>; + bus-range = <0x00 0xff>; #address-cells = <3>; #size-cells = <2>; diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi index ed8e7700b46d..e5ab7adbc28a 100644 --- a/arch/arm/boot/dts/tegra30.dtsi +++ b/arch/arm/boot/dts/tegra30.dtsi @@ -28,6 +28,10 @@ GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>; /* MSI interrupt */ interrupt-names = "intr", "msi"; + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 0>; + interrupt-map = <0 0 0 0 &intc GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>; + bus-range = <0x00 0xff>; #address-cells = <3>; #size-cells = <2>; -- 1.8.5.3 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 0/7] PCI irq mapping fixes and cleanups
This series cleans up the PCI irq mapping for all the ARM PCI host drivers, so they handle it in the way defined in the common PCI bindings. Testing appreciated. Lucas Stach (7): ARM: dts: tegra: add PCIe interrupt mapping properties PCI: tegra: use new OF interrupt mapping when possible PCI: rcar: use new OF interrupt mapping when possible ARM: dts: exynos5440: fix PCIe interrupt mapping ARM: dts: imx6: add PCIe interrupt mapping properties PCI: designware: use new OF interrupt mapping when possible PCI: designware: split samsung and fsl bindings .../devicetree/bindings/pci/designware-pcie.txt| 69 + .../devicetree/bindings/pci/fsl,imx6q-pcie.txt | 48 +++ .../bindings/pci/nvidia,tegra20-pcie.txt | 8 +++ .../bindings/pci/samsung,exynos5440-pcie.txt | 70 ++ arch/arm/boot/dts/exynos5440.dtsi | 4 +- arch/arm/boot/dts/imx6qdl.dtsi | 11 arch/arm/boot/dts/tegra20.dtsi | 4 ++ arch/arm/boot/dts/tegra30.dtsi | 4 ++ drivers/pci/host/pci-rcar-gen2.c | 8 ++- drivers/pci/host/pci-tegra.c | 7 ++- drivers/pci/host/pcie-designware.c | 8 ++- 11 files changed, 168 insertions(+), 73 deletions(-) create mode 100644 Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt create mode 100644 Documentation/devicetree/bindings/pci/samsung,exynos5440-pcie.txt -- 1.8.5.3 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 7/7] PCI: designware: split samsung and fsl bindings
The glue around the core designware IP is significantly different between the Exynos and i.MX, which is reflected in the DT bindings. Note that this patch doesn't change any bindings, but just alters the documentation to match reality of deployed DTs and kernels. Signed-off-by: Lucas Stach --- .../devicetree/bindings/pci/designware-pcie.txt| 69 + .../devicetree/bindings/pci/fsl,imx6q-pcie.txt | 48 +++ .../bindings/pci/samsung,exynos5440-pcie.txt | 70 ++ 3 files changed, 119 insertions(+), 68 deletions(-) create mode 100644 Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt create mode 100644 Documentation/devicetree/bindings/pci/samsung,exynos5440-pcie.txt diff --git a/Documentation/devicetree/bindings/pci/designware-pcie.txt b/Documentation/devicetree/bindings/pci/designware-pcie.txt index d6fae13ff062..8274c80fe874 100644 --- a/Documentation/devicetree/bindings/pci/designware-pcie.txt +++ b/Documentation/devicetree/bindings/pci/designware-pcie.txt @@ -1,15 +1,7 @@ * Synopsys Designware PCIe interface Required properties: -- compatible: should contain "snps,dw-pcie" to identify the - core, plus an identifier for the specific instance, such - as "samsung,exynos5440-pcie" or "fsl,imx6q-pcie". -- reg: base addresses and lengths of the pcie controller, - the phy controller, additional register for the phy controller. -- interrupts: interrupt values for level interrupt, - pulse interrupt, special interrupt. -- clocks: from common clock binding: handle to pci clock. -- clock-names: from common clock binding: should be "pcie" and "pcie_bus". +- compatible: should contain "snps,dw-pcie" to identify the core. - #address-cells: set to <3> - #size-cells: set to <2> - device_type: set to "pci" @@ -22,62 +14,3 @@ Required properties: Optional properties: - reset-gpio: gpio pin number of power good signal - -Optional properties for fsl,imx6q-pcie -- power-on-gpio: gpio pin number of power-enable signal -- wake-up-gpio: gpio pin number of incoming wakeup signal -- disable-gpio: gpio pin number of outgoing rfkill/endpoint disable signal - -Example: - -SoC specific DT Entry: - - pcie@29 { - compatible = "samsung,exynos5440-pcie", "snps,dw-pcie"; - reg = <0x29 0x1000 - 0x27 0x1000 - 0x271000 0x40>; - interrupts = <0 20 0>, <0 21 0>, <0 22 0>; - clocks = <&clock 28>, <&clock 27>; - clock-names = "pcie", "pcie_bus"; - #address-cells = <3>; - #size-cells = <2>; - device_type = "pci"; - ranges = <0x0800 0 0x4000 0x4000 0 0x1000 /* configuration space */ - 0x8100 0 0 0x40001000 0 0x0001 /* downstream I/O */ - 0x8200 0 0x40011000 0x40011000 0 0x1ffef000>; /* non-prefetchable memory */ - #interrupt-cells = <1>; - interrupt-map-mask = <0 0 0 0>; - interrupt-map = <0x0 0 &gic 53>; - num-lanes = <4>; - }; - - pcie@2a { - compatible = "samsung,exynos5440-pcie", "snps,dw-pcie"; - reg = <0x2a 0x1000 - 0x272000 0x1000 - 0x271040 0x40>; - interrupts = <0 23 0>, <0 24 0>, <0 25 0>; - clocks = <&clock 29>, <&clock 27>; - clock-names = "pcie", "pcie_bus"; - #address-cells = <3>; - #size-cells = <2>; - device_type = "pci"; - ranges = <0x0800 0 0x6000 0x6000 0 0x1000 /* configuration space */ - 0x8100 0 0 0x60001000 0 0x0001 /* downstream I/O */ - 0x8200 0 0x60011000 0x60011000 0 0x1ffef000>; /* non-prefetchable memory */ - #interrupt-cells = <1>; - interrupt-map-mask = <0 0 0 0>; - interrupt-map = <0x0 0 &gic 56>; - num-lanes = <4>; - }; - -Board specific DT Entry: - - pcie@29 { - reset-gpio = <&pin_ctrl 5 0>; - }; - - pcie@2a { - reset-gpio = <&pin_ctrl 22 0>; - }; diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt new file mode 100644 index ..93fbfd62f13c --- /dev/null +++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt @@ -0,0 +1,48 @@ +* Freescale i.MX6 PCIe interface + +This PCIe host controller is based on the Synopsis Designware PCIe IP +and thus inherits all the common properties defined in designware-pcie.txt. + +Required properties: +- compatible: "fsl,imx6q-pcie" +- reg: base addresse and length of the pcie controller +- interrupts: First entry must contain interrupt handle for controller
Re: [RFC PATCH v2 19/21] ARM: dts: exynos5250-arndale: add dsi and panel nodes
On 12/02/14 13:31, Andrzej Hajda wrote: > The patch adds bridge and panel nodes. > It adds also DSI properties specific for arndale board. > > Signed-off-by: Andrzej Hajda > --- > arch/arm/boot/dts/exynos5250-arndale.dts | 39 > > 1 file changed, 39 insertions(+) > > diff --git a/arch/arm/boot/dts/exynos5250-arndale.dts > b/arch/arm/boot/dts/exynos5250-arndale.dts > index a0a985d..7d666b1 100644 > --- a/arch/arm/boot/dts/exynos5250-arndale.dts > +++ b/arch/arm/boot/dts/exynos5250-arndale.dts > @@ -584,6 +584,45 @@ > }; > }; > > + panel: panel { > + compatible = "boe,hv070wsa-100"; > + power-supply = <&vcc_3v3_reg>; > + enable-gpios = <&gpd1 3 0>; > + port { > + panel_ep: endpoint { > + remote-endpoint = <&bridge_out_ep>; > + }; > + }; > + }; > + > + dsi_0: dsi@1450 { > + vddcore-supply = <&ldo8_reg>; > + vddio-supply = <&ldo10_reg>; > + samsung,pll-clock-frequency = <2400>; > + samsung,burst-clock-frequency = <32000>; > + samsung,esc-clock-frequency = <1000>; > + status = "okay"; > + > + bridge@0 { > + reg = <0>; > + compatible = "toshiba,tc358764"; > + vddc-supply = <&vcc_1v2_reg>; > + vddio-supply = <&vcc_1v8_reg>; > + vddmipi-supply = <&vcc_1v2_reg>; > + vddlvds133-supply = <&vcc_3v3_reg>; > + vddlvds112-supply = <&vcc_1v2_reg>; > + reset-gpio = <&gpd1 6 1>; > + #address-cells = <1>; > + #size-cells = <0>; > + port@1 { > + reg = <1>; > + bridge_out_ep: endpoint { > + remote-endpoint = <&panel_ep>; > + }; > + }; > + }; > + }; Compared to what I've done on OMAP, you don't seem to specify the video inputs for the tc358764 at all. In this case it's obvious, as the chip is a child of the DSI master. But the chip could as well be controlled via i2c, and so be placed as a child of the i2c nodes. So even if the driver doesn't use it, maybe it would be more future proof to have both input and output endpoints for the tc358764? Tomi signature.asc Description: OpenPGP digital signature
Re: [RFC PATCH v2 19/21] ARM: dts: exynos5250-arndale: add dsi and panel nodes
On 28/02/14 15:31, Tomi Valkeinen wrote: > Compared to what I've done on OMAP, you don't seem to specify the video > inputs for the tc358764 at all. In this case it's obvious, as the chip > is a child of the DSI master. But the chip could as well be controlled > via i2c, and so be placed as a child of the i2c nodes. > > So even if the driver doesn't use it, maybe it would be more future > proof to have both input and output endpoints for the tc358764? Oh, and one addition: how me and Laurent see the DSI case (and other similar ones), the child/parent relationship gives the control bus path, and the video ports give the video data path. So both are always needed. A DSI panel may be controlled via DSI, i2c, spi, but the video path will always go from DSI master to the panel. Or, as a theoretical panel, you could have a DSI controlled panel, being a child of the DSI master, but the video data would come via, say, parallel RGB. You can actually do that with some panels/encoders, even if the concept is silly. Tomi signature.asc Description: OpenPGP digital signature
Re: [RFC PATCH v2 14/21] ARM: dts: exynos4412-trats2: add panel node
On 12/02/14 13:31, Andrzej Hajda wrote: > The patch adds s6e8aa0 panel node for trats2. > It adds also trats2 specific properties for DSI > and regulator required by panel. > > Signed-off-by: Andrzej Hajda > --- > arch/arm/boot/dts/exynos4412-trats2.dts | 47 > + > 1 file changed, 47 insertions(+) > > diff --git a/arch/arm/boot/dts/exynos4412-trats2.dts > b/arch/arm/boot/dts/exynos4412-trats2.dts > index fb7b9ae..0986d08 100644 > --- a/arch/arm/boot/dts/exynos4412-trats2.dts > +++ b/arch/arm/boot/dts/exynos4412-trats2.dts > @@ -442,6 +442,15 @@ > }; > }; > > + lcd_vdd3_reg: voltage-regulator@1 { > + compatible = "regulator-fixed"; > + regulator-name = "LCD_VDD_2.2V"; > + regulator-min-microvolt = <220>; > + regulator-max-microvolt = <220>; > + gpio = <&gpc0 1 0>; > + enable-active-high; > + }; > + > sdhci@1251 { > bus-width = <8>; > non-removable; > @@ -498,6 +507,44 @@ > }; > }; > > + dsi_0: dsi@11C8 { > + vddcore-supply = <&ldo8_reg>; > + vddio-supply = <&ldo10_reg>; > + samsung,pll-clock-frequency = <2400>; > + samsung,burst-clock-frequency = <5>; > + samsung,esc-clock-frequency = <2000>; > + status = "okay"; > + > + panel@0 { > + compatible = "samsung,s6e8aa0"; > + reg = <0>; > + vdd3-supply = <&lcd_vdd3_reg>; > + vci-supply = <&ldo25_reg>; > + reset-gpio = <&gpy4 5 0>; > + power-on-delay= <50>; > + reset-delay = <100>; > + init-delay = <100>; > + flip-horizontal; > + flip-vertical; > + panel-width-mm = <58>; > + panel-height-mm = <103>; I have the same comment here as for the bridge chip: I would specify the video ports/endpoints between DSI master and the panel, even if you don't use them at the moment. Tomi signature.asc Description: OpenPGP digital signature
Re: [PATCH 0/4] mfd: sec: Add support for S2MPS14
> > > Few days ago I sent patches adding support for S2MPS14 device to the > > > sec-core/s2mps11 drivers. These patches were rather large as they covered > > > multiple subsystems so I decided to split everything into smaller, > > > separate > > > patches. > > > > > > The original patchset (version 3) can be found here: > > > http://thread.gmane.org/gmane.linux.kernel.samsung-soc/27194/focus=1649217 > > > > > > This patchset is a small subset of the patchset related to the MFD core > > > driver. It adds support for the S2MPS14 device only to the MFD core > > > driver. > > > I already obtained acks from Lee Jones during previous reviews. > > > > > > The patchset is based on current Linus' tree *with* patch: > > > mfd: sec-core: Fix possible NULL pointer dereference when i2c_new_dummy > > > error > > > (which is already in Lee Jones' MFD tree) > > > > Can all of these patches be applied as they are? > > > > Is anything going to break as a result? > > Yes, they can be applied as they are. That was the reason behind > splitting everything. Nothing should break, as far as I reviewed this > and tested. Very well, all applied, thanks. > > > Krzysztof Kozlowski (4): > > > mfd: sec: Add maximum RTC register for regmap config > > > mfd: sec: Select different RTC regmaps for devices > > > mfd: sec: Use consistent S2MPS11 RTC alarm interrupt indexes > > > mfd: sec: Add support for S2MPS14 > > > > > > drivers/mfd/sec-core.c | 57 - > > > drivers/mfd/sec-irq.c | 97 -- > > > include/linux/mfd/samsung/core.h|1 + > > > include/linux/mfd/samsung/irq.h | 31 ++- > > > include/linux/mfd/samsung/rtc.h | 57 +++-- > > > include/linux/mfd/samsung/s2mps14.h | 152 > > > +++ > > > 6 files changed, 378 insertions(+), 17 deletions(-) > > > create mode 100644 include/linux/mfd/samsung/s2mps14.h > > > > > > -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/4] mfd: sec: Add support for S2MPS14
On Fri, 2014-02-28 at 10:49 +, Lee Jones wrote: > > Few days ago I sent patches adding support for S2MPS14 device to the > > sec-core/s2mps11 drivers. These patches were rather large as they covered > > multiple subsystems so I decided to split everything into smaller, separate > > patches. > > > > The original patchset (version 3) can be found here: > > http://thread.gmane.org/gmane.linux.kernel.samsung-soc/27194/focus=1649217 > > > > This patchset is a small subset of the patchset related to the MFD core > > driver. It adds support for the S2MPS14 device only to the MFD core driver. > > I already obtained acks from Lee Jones during previous reviews. > > > > The patchset is based on current Linus' tree *with* patch: > > mfd: sec-core: Fix possible NULL pointer dereference when i2c_new_dummy > > error > > (which is already in Lee Jones' MFD tree) > > Can all of these patches be applied as they are? > > Is anything going to break as a result? Yes, they can be applied as they are. That was the reason behind splitting everything. Nothing should break, as far as I reviewed this and tested. Best regards, Krzysztof > > > Krzysztof Kozlowski (4): > > mfd: sec: Add maximum RTC register for regmap config > > mfd: sec: Select different RTC regmaps for devices > > mfd: sec: Use consistent S2MPS11 RTC alarm interrupt indexes > > mfd: sec: Add support for S2MPS14 > > > > drivers/mfd/sec-core.c | 57 - > > drivers/mfd/sec-irq.c | 97 -- > > include/linux/mfd/samsung/core.h|1 + > > include/linux/mfd/samsung/irq.h | 31 ++- > > include/linux/mfd/samsung/rtc.h | 57 +++-- > > include/linux/mfd/samsung/s2mps14.h | 152 > > +++ > > 6 files changed, 378 insertions(+), 17 deletions(-) > > create mode 100644 include/linux/mfd/samsung/s2mps14.h > > > -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/4] mfd: sec: Add support for S2MPS14
> Few days ago I sent patches adding support for S2MPS14 device to the > sec-core/s2mps11 drivers. These patches were rather large as they covered > multiple subsystems so I decided to split everything into smaller, separate > patches. > > The original patchset (version 3) can be found here: > http://thread.gmane.org/gmane.linux.kernel.samsung-soc/27194/focus=1649217 > > This patchset is a small subset of the patchset related to the MFD core > driver. It adds support for the S2MPS14 device only to the MFD core driver. > I already obtained acks from Lee Jones during previous reviews. > > The patchset is based on current Linus' tree *with* patch: > mfd: sec-core: Fix possible NULL pointer dereference when i2c_new_dummy error > (which is already in Lee Jones' MFD tree) Can all of these patches be applied as they are? Is anything going to break as a result? > Krzysztof Kozlowski (4): > mfd: sec: Add maximum RTC register for regmap config > mfd: sec: Select different RTC regmaps for devices > mfd: sec: Use consistent S2MPS11 RTC alarm interrupt indexes > mfd: sec: Add support for S2MPS14 > > drivers/mfd/sec-core.c | 57 - > drivers/mfd/sec-irq.c | 97 -- > include/linux/mfd/samsung/core.h|1 + > include/linux/mfd/samsung/irq.h | 31 ++- > include/linux/mfd/samsung/rtc.h | 57 +++-- > include/linux/mfd/samsung/s2mps14.h | 152 > +++ > 6 files changed, 378 insertions(+), 17 deletions(-) > create mode 100644 include/linux/mfd/samsung/s2mps14.h > -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/4] mfd: sec: Select different RTC regmaps for devices
This patch prepares for adding support for S2MPS14 RTC driver by selecting different regmaps for S2MPS1X/S5M876X RTC devices. Signed-off-by: Krzysztof Kozlowski Acked-by: Lee Jones --- drivers/mfd/sec-core.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index 074939c9bd42..e717c6dfb105 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c @@ -199,7 +199,7 @@ static int sec_pmic_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { struct sec_platform_data *pdata = dev_get_platdata(&i2c->dev); - const struct regmap_config *regmap; + const struct regmap_config *regmap, *regmap_rtc; struct sec_pmic_dev *sec_pmic; int ret; @@ -233,15 +233,25 @@ static int sec_pmic_probe(struct i2c_client *i2c, switch (sec_pmic->device_type) { case S2MPS11X: regmap = &s2mps11_regmap_config; + /* +* The rtc-s5m driver does not support S2MPS11 and there +* is no mfd_cell for S2MPS11 RTC device. +* However we must pass something to devm_regmap_init_i2c() +* so use S5M-like regmap config even though it wouldn't work. +*/ + regmap_rtc = &sec_rtc_regmap_config; break; case S5M8763X: regmap = &s5m8763_regmap_config; + regmap_rtc = &sec_rtc_regmap_config; break; case S5M8767X: regmap = &s5m8767_regmap_config; + regmap_rtc = &sec_rtc_regmap_config; break; default: regmap = &sec_regmap_config; + regmap_rtc = &sec_rtc_regmap_config; break; } @@ -260,8 +270,7 @@ static int sec_pmic_probe(struct i2c_client *i2c, } i2c_set_clientdata(sec_pmic->rtc, sec_pmic); - sec_pmic->regmap_rtc = devm_regmap_init_i2c(sec_pmic->rtc, - &sec_rtc_regmap_config); + sec_pmic->regmap_rtc = devm_regmap_init_i2c(sec_pmic->rtc, regmap_rtc); if (IS_ERR(sec_pmic->regmap_rtc)) { ret = PTR_ERR(sec_pmic->regmap_rtc); dev_err(&i2c->dev, "Failed to allocate RTC register map: %d\n", -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 4/4] mfd: sec: Add support for S2MPS14
Add support for S2MPS14 PMIC device to the MFD sec-core driver. The S2MPS14 is similar to S2MPS11 but it has fewer regulators, two clocks instead of three and a little different registers layout. Signed-off-by: Krzysztof Kozlowski Acked-by: Lee Jones --- drivers/mfd/sec-core.c | 48 +-- drivers/mfd/sec-irq.c | 89 +++- include/linux/mfd/samsung/core.h|1 + include/linux/mfd/samsung/irq.h | 27 +++ include/linux/mfd/samsung/rtc.h | 55 +++-- include/linux/mfd/samsung/s2mps14.h | 152 +++ 6 files changed, 360 insertions(+), 12 deletions(-) create mode 100644 include/linux/mfd/samsung/s2mps14.h diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index e717c6dfb105..d163c66edebb 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -69,6 +70,16 @@ static const struct mfd_cell s2mps11_devs[] = { } }; +static const struct mfd_cell s2mps14_devs[] = { + { + .name = "s2mps14-pmic", + }, { + .name = "s2mps14-rtc", + }, { + .name = "s2mps14-clk", + } +}; + #ifdef CONFIG_OF static struct of_device_id sec_dt_match[] = { { .compatible = "samsung,s5m8767-pmic", @@ -77,6 +88,9 @@ static struct of_device_id sec_dt_match[] = { { .compatible = "samsung,s2mps11-pmic", .data = (void *)S2MPS11X, }, + { .compatible = "samsung,s2mps14-pmic", + .data = (void *)S2MPS14X, + }, {}, }; #endif @@ -120,6 +134,15 @@ static const struct regmap_config s2mps11_regmap_config = { .cache_type = REGCACHE_FLAT, }; +static const struct regmap_config s2mps14_regmap_config = { + .reg_bits = 8, + .val_bits = 8, + + .max_register = S2MPS14_REG_LDODSCH3, + .volatile_reg = s2mps11_volatile, + .cache_type = REGCACHE_FLAT, +}; + static const struct regmap_config s5m8763_regmap_config = { .reg_bits = 8, .val_bits = 8, @@ -138,13 +161,20 @@ static const struct regmap_config s5m8767_regmap_config = { .cache_type = REGCACHE_FLAT, }; -static const struct regmap_config sec_rtc_regmap_config = { +static const struct regmap_config s5m_rtc_regmap_config = { .reg_bits = 8, .val_bits = 8, .max_register = SEC_RTC_REG_MAX, }; +static const struct regmap_config s2mps14_rtc_regmap_config = { + .reg_bits = 8, + .val_bits = 8, + + .max_register = S2MPS_RTC_REG_MAX, +}; + #ifdef CONFIG_OF /* * Only the common platform data elements for s5m8767 are parsed here from the @@ -239,19 +269,23 @@ static int sec_pmic_probe(struct i2c_client *i2c, * However we must pass something to devm_regmap_init_i2c() * so use S5M-like regmap config even though it wouldn't work. */ - regmap_rtc = &sec_rtc_regmap_config; + regmap_rtc = &s5m_rtc_regmap_config; + break; + case S2MPS14X: + regmap = &s2mps14_regmap_config; + regmap_rtc = &s2mps14_rtc_regmap_config; break; case S5M8763X: regmap = &s5m8763_regmap_config; - regmap_rtc = &sec_rtc_regmap_config; + regmap_rtc = &s5m_rtc_regmap_config; break; case S5M8767X: regmap = &s5m8767_regmap_config; - regmap_rtc = &sec_rtc_regmap_config; + regmap_rtc = &s5m_rtc_regmap_config; break; default: regmap = &sec_regmap_config; - regmap_rtc = &sec_rtc_regmap_config; + regmap_rtc = &s5m_rtc_regmap_config; break; } @@ -302,6 +336,10 @@ static int sec_pmic_probe(struct i2c_client *i2c, ret = mfd_add_devices(sec_pmic->dev, -1, s2mps11_devs, ARRAY_SIZE(s2mps11_devs), NULL, 0, NULL); break; + case S2MPS14X: + ret = mfd_add_devices(sec_pmic->dev, -1, s2mps14_devs, + ARRAY_SIZE(s2mps14_devs), NULL, 0, NULL); + break; default: /* If this happens the probe function is problem */ BUG(); diff --git a/drivers/mfd/sec-irq.c b/drivers/mfd/sec-irq.c index e403c293b437..64e7913aadc6 100644 --- a/drivers/mfd/sec-irq.c +++ b/drivers/mfd/sec-irq.c @@ -1,7 +1,7 @@ /* * sec-irq.c * - * Copyright (c) 2011 Samsung Electronics Co., Ltd + * Copyright (c) 2011-2014 Samsung Electronics Co., Ltd * http://www.samsung.com * * This program is free software; you can redistribute it and/or modify it @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -89,6 +90,76 @@ static
[PATCH 1/4] mfd: sec: Add maximum RTC register for regmap config
Add maximum register to the regmap used by rtc-s5m driver. Signed-off-by: Krzysztof Kozlowski Acked-by: Lee Jones --- drivers/mfd/sec-core.c |2 ++ include/linux/mfd/samsung/rtc.h |2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index a76cd85a2868..074939c9bd42 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c @@ -141,6 +141,8 @@ static const struct regmap_config s5m8767_regmap_config = { static const struct regmap_config sec_rtc_regmap_config = { .reg_bits = 8, .val_bits = 8, + + .max_register = SEC_RTC_REG_MAX, }; #ifdef CONFIG_OF diff --git a/include/linux/mfd/samsung/rtc.h b/include/linux/mfd/samsung/rtc.h index 94b7cd6d8891..4627f59ebd84 100644 --- a/include/linux/mfd/samsung/rtc.h +++ b/include/linux/mfd/samsung/rtc.h @@ -43,6 +43,8 @@ enum sec_rtc_reg { SEC_RTC_STATUS, SEC_WTSR_SMPL_CNTL, SEC_RTC_UDR_CON, + + SEC_RTC_REG_MAX, }; #define RTC_I2C_ADDR (0x0C >> 1) -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/4] mfd: sec: Use consistent S2MPS11 RTC alarm interrupt indexes
The S2MPS11 RTC has two alarms: alarm0 and alarm1 (corresponding interrupts are named similarly). Use consistent names for interrupts to limit possible errors. Signed-off-by: Krzysztof Kozlowski Acked-by: Lee Jones --- drivers/mfd/sec-irq.c |8 include/linux/mfd/samsung/irq.h |4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/mfd/sec-irq.c b/drivers/mfd/sec-irq.c index 4de494f51d40..e403c293b437 100644 --- a/drivers/mfd/sec-irq.c +++ b/drivers/mfd/sec-irq.c @@ -59,13 +59,13 @@ static const struct regmap_irq s2mps11_irqs[] = { .reg_offset = 1, .mask = S2MPS11_IRQ_RTC60S_MASK, }, - [S2MPS11_IRQ_RTCA1] = { + [S2MPS11_IRQ_RTCA0] = { .reg_offset = 1, - .mask = S2MPS11_IRQ_RTCA1_MASK, + .mask = S2MPS11_IRQ_RTCA0_MASK, }, - [S2MPS11_IRQ_RTCA2] = { + [S2MPS11_IRQ_RTCA1] = { .reg_offset = 1, - .mask = S2MPS11_IRQ_RTCA2_MASK, + .mask = S2MPS11_IRQ_RTCA1_MASK, }, [S2MPS11_IRQ_SMPL] = { .reg_offset = 1, diff --git a/include/linux/mfd/samsung/irq.h b/include/linux/mfd/samsung/irq.h index d43b4f9e7fb2..abe1a6aae3b7 100644 --- a/include/linux/mfd/samsung/irq.h +++ b/include/linux/mfd/samsung/irq.h @@ -24,8 +24,8 @@ enum s2mps11_irq { S2MPS11_IRQ_MRB, S2MPS11_IRQ_RTC60S, + S2MPS11_IRQ_RTCA0, S2MPS11_IRQ_RTCA1, - S2MPS11_IRQ_RTCA2, S2MPS11_IRQ_SMPL, S2MPS11_IRQ_RTC1S, S2MPS11_IRQ_WTSR, @@ -47,7 +47,7 @@ enum s2mps11_irq { #define S2MPS11_IRQ_RTC60S_MASK(1 << 0) #define S2MPS11_IRQ_RTCA1_MASK (1 << 1) -#define S2MPS11_IRQ_RTCA2_MASK (1 << 2) +#define S2MPS11_IRQ_RTCA0_MASK (1 << 2) #define S2MPS11_IRQ_SMPL_MASK (1 << 3) #define S2MPS11_IRQ_RTC1S_MASK (1 << 4) #define S2MPS11_IRQ_WTSR_MASK (1 << 5) -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 0/4] mfd: sec: Add support for S2MPS14
Hi, Few days ago I sent patches adding support for S2MPS14 device to the sec-core/s2mps11 drivers. These patches were rather large as they covered multiple subsystems so I decided to split everything into smaller, separate patches. The original patchset (version 3) can be found here: http://thread.gmane.org/gmane.linux.kernel.samsung-soc/27194/focus=1649217 This patchset is a small subset of the patchset related to the MFD core driver. It adds support for the S2MPS14 device only to the MFD core driver. I already obtained acks from Lee Jones during previous reviews. The patchset is based on current Linus' tree *with* patch: mfd: sec-core: Fix possible NULL pointer dereference when i2c_new_dummy error (which is already in Lee Jones' MFD tree) Best regards, Krzysztof Krzysztof Kozlowski (4): mfd: sec: Add maximum RTC register for regmap config mfd: sec: Select different RTC regmaps for devices mfd: sec: Use consistent S2MPS11 RTC alarm interrupt indexes mfd: sec: Add support for S2MPS14 drivers/mfd/sec-core.c | 57 - drivers/mfd/sec-irq.c | 97 -- include/linux/mfd/samsung/core.h|1 + include/linux/mfd/samsung/irq.h | 31 ++- include/linux/mfd/samsung/rtc.h | 57 +++-- include/linux/mfd/samsung/s2mps14.h | 152 +++ 6 files changed, 378 insertions(+), 17 deletions(-) create mode 100644 include/linux/mfd/samsung/s2mps14.h -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/3] regulator: s2mps11: Copy supported regulators from initconst
Add __initconst to 'regulator_desc' array with supported regulators. During probe choose how many and which regulators will be supported according to device ID. Then copy the 'regulator_desc' array to allocated memory so the regulator core can use it. Additionally allocate array of of_regulator_match() dynamically (based on number of regulators) instead of allocation on the stack. This is needed for supporting different devices in s2mps11 driver and actually prepares the regulator driver for supporting the S2MPS14 device. Code for supporting the S2MPS14 device will add its own array of 'regulator_desc' (also marked as __initconst). This way memory footprint of the driver will be reduced (approximately 'regulators_desc' array for S2MPS11 occupies 5 kB on 32-bit ARM, for S2MPS14 will occupy 3 kB). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Chanwoo Choi Cc: Yadwinder Singh Brar Reviewed-by: Yadwinder Singh Brar --- drivers/regulator/s2mps11.c | 75 +++ 1 file changed, 62 insertions(+), 13 deletions(-) diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c index 189038aecbf5..ca66fc56fa58 100644 --- a/drivers/regulator/s2mps11.c +++ b/drivers/regulator/s2mps11.c @@ -25,9 +25,8 @@ #include #include -#define S2MPS11_REGULATOR_CNT ARRAY_SIZE(regulators) - struct s2mps11_info { + unsigned int rdev_num; int ramp_delay2; int ramp_delay34; int ramp_delay5; @@ -343,7 +342,7 @@ static struct regulator_ops s2mps11_buck_ops = { .enable_mask= S2MPS11_ENABLE_MASK \ } -static const struct regulator_desc regulators[] = { +static const struct regulator_desc s2mps11_regulators[] __initconst = { regulator_desc_ldo2(1), regulator_desc_ldo1(2), regulator_desc_ldo1(3), @@ -394,21 +393,62 @@ static const struct regulator_desc regulators[] = { regulator_desc_buck10, }; +/* + * Allocates memory under 'regulators' pointer and copies there array + * of regulator_desc for given device. + * + * Returns number of regulators or negative ERRNO on error. + */ +static int __init +s2mps11_pmic_init_regulators_desc(struct platform_device *pdev, + struct regulator_desc **regulators) +{ + const struct regulator_desc *regulators_init; + enum sec_device_type dev_type; + int rdev_num; + + dev_type = platform_get_device_id(pdev)->driver_data; + switch (dev_type) { + case S2MPS11X: + rdev_num = ARRAY_SIZE(s2mps11_regulators); + regulators_init = s2mps11_regulators; + break; + default: + dev_err(&pdev->dev, "Invalid device type: %u\n", dev_type); + return -EINVAL; + }; + + *regulators = devm_kzalloc(&pdev->dev, + sizeof(**regulators) * rdev_num, GFP_KERNEL); + if (!*regulators) + return -ENOMEM; + + memcpy(*regulators, regulators_init, sizeof(**regulators) * rdev_num); + + return rdev_num; +} + static int s2mps11_pmic_probe(struct platform_device *pdev) { struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent); - struct sec_platform_data *pdata = dev_get_platdata(iodev->dev); - struct of_regulator_match rdata[S2MPS11_REGULATOR_MAX]; + struct sec_platform_data *pdata = iodev->pdata; + struct of_regulator_match *rdata = NULL; struct device_node *reg_np = NULL; struct regulator_config config = { }; struct s2mps11_info *s2mps11; - int i, ret; + int i, ret = 0; + struct regulator_desc *regulators = NULL; + int rdev_num; s2mps11 = devm_kzalloc(&pdev->dev, sizeof(struct s2mps11_info), GFP_KERNEL); if (!s2mps11) return -ENOMEM; + rdev_num = s2mps11_pmic_init_regulators_desc(pdev, ®ulators); + if (rdev_num < 0) + return rdev_num; + if (!iodev->dev->of_node) { if (pdata) { goto common_reg; @@ -419,24 +459,30 @@ static int s2mps11_pmic_probe(struct platform_device *pdev) } } - for (i = 0; i < S2MPS11_REGULATOR_CNT; i++) + rdata = kzalloc(sizeof(*rdata) * rdev_num, GFP_KERNEL); + if (!rdata) + return -ENOMEM; + + for (i = 0; i < rdev_num; i++) rdata[i].name = regulators[i].name; reg_np = of_find_node_by_name(iodev->dev->of_node, "regulators"); if (!reg_np) { dev_err(&pdev->dev, "could not find regulators sub-node\n"); - return -EINVAL; + ret = -EINVAL; + goto out; } - of_regulator_match(&pdev->dev, reg_np, rdata, S2MPS11_REGULATOR_MAX); + of_regulator_match(&pdev->dev, reg_np, rdata, rdev_num); common_reg: platform_set_drvdata(pdev, s2mps11); + s2mps11->rdev_num = rdev_num;
[PATCH 2/3] regulator: s2mps11: Constify regulator_desc array
Constify the regulator_desc 'regulators' array. Signed-off-by: Krzysztof Kozlowski --- drivers/regulator/s2mps11.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c index 3647d590b962..189038aecbf5 100644 --- a/drivers/regulator/s2mps11.c +++ b/drivers/regulator/s2mps11.c @@ -343,7 +343,7 @@ static struct regulator_ops s2mps11_buck_ops = { .enable_mask= S2MPS11_ENABLE_MASK \ } -static struct regulator_desc regulators[] = { +static const struct regulator_desc regulators[] = { regulator_desc_ldo2(1), regulator_desc_ldo1(2), regulator_desc_ldo1(3), -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/3] regulator: s2mps11: Don't store registered regulators in state container
Regulators registered by devm_regulator_register() do not have to be stored in state container because they are never dereferenced later. The array of regulator_dev can be safely removed from state container. Signed-off-by: Krzysztof Kozlowski --- drivers/regulator/s2mps11.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c index cd0b9e35a56d..3647d590b962 100644 --- a/drivers/regulator/s2mps11.c +++ b/drivers/regulator/s2mps11.c @@ -28,8 +28,6 @@ #define S2MPS11_REGULATOR_CNT ARRAY_SIZE(regulators) struct s2mps11_info { - struct regulator_dev *rdev[S2MPS11_REGULATOR_MAX]; - int ramp_delay2; int ramp_delay34; int ramp_delay5; @@ -439,6 +437,8 @@ common_reg: config.regmap = iodev->regmap_pmic; config.driver_data = s2mps11; for (i = 0; i < S2MPS11_REGULATOR_MAX; i++) { + struct regulator_dev *regulator; + if (!reg_np) { config.init_data = pdata->regulators[i].initdata; config.of_node = pdata->regulators[i].reg_node; @@ -447,10 +447,10 @@ common_reg: config.of_node = rdata[i].of_node; } - s2mps11->rdev[i] = devm_regulator_register(&pdev->dev, + regulator = devm_regulator_register(&pdev->dev, ®ulators[i], &config); - if (IS_ERR(s2mps11->rdev[i])) { - ret = PTR_ERR(s2mps11->rdev[i]); + if (IS_ERR(regulator)) { + ret = PTR_ERR(regulator); dev_err(&pdev->dev, "regulator init failed for %d\n", i); return ret; -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 0/3] regulator: s2mps11: Minor fixes and prepare for S2MPS14
Hi, Few days ago I sent patches adding support for S2MPS14 device to the sec-core/s2mps11 drivers. These patches were rather large as they covered multiple subsystems so I decided to split everything into smaller, separate patches. The original patchset (version 3) can be found here: http://thread.gmane.org/gmane.linux.kernel.samsung-soc/27194/focus=1649217 This patchset is a small subset of the patchset related to the s2mps11 regulator driver. The third patch here prepares for supporting the S2MPS14 device. I would be glad if it comes in however I understand that without further patches it is a little premature. Best regards, Krzysztof Krzysztof Kozlowski (3): regulator: s2mps11: Don't store registered regulators in state container regulator: s2mps11: Constify regulator_desc array regulator: s2mps11: Copy supported regulators from initconst drivers/regulator/s2mps11.c | 85 ++- 1 file changed, 67 insertions(+), 18 deletions(-) -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html