Re: [PATCH v4 1/5] PCI: designware: add memory barrier after enabling region
On Friday, December 11, 2015 2:49 PM, Jisheng Zhang wrote: > > On Fri, 11 Dec 2015 09:35:10 +0530 Pratyush Anand wrote: > > > On Wed, Dec 9, 2015 at 3:53 PM, Russell King - ARM Linux wrote: > > > > [...] > > > > >> > > dw_pcie_writel_rc(pp, PCIE_ATU_ENABLE, PCIE_ATU_CR2); > > >> > > + /* > > >> > > + * ensure that the ATU enable has been happaned before > > >> > > accessing > > >> > > + * pci configuration/io spaces through > > >> > > dw_pcie_cfg_[read|write]. > > >> > > + */ > > >> > > + wmb(); > > >> > > } > > >> > > > > >> > > >> > > >> My understnading is that since writel() of dw_pcie_writel_rc() in > > >> above code and readl(), writel() of dw_pcie_cfg_[read|write]() (which > > >> will follow) goes through same device (ie PCIe host here). So, it is > > >> guaranteed that 1st writel() will be executed before later > > >> readl()/writel(). If that is true then we do not need any explicit > > >> barrier here. > > >> > > >> Arnd, Russel: whats your opinion here. > > > ^l > > > > Sorry :( > > > > > > > > writel() has a barrier _before_ the access but not after. > > > > > > The fact is that there's nothing which guarantees that the write will hit > > > the hardware in a timely manner (forget any rules about PCI config space, > > > the PCI ordering rules apply to the PCI bus, not to the ARM buses.) > > > > > > If you need this write to have hit the hardware before continuing, you > > > need to read back from the same register. > > > > OK, so better to replace wmb() with read back of control register. > > > > > > > > I'm just looking at this driver, trying to decipher what it's doing. It > > > _looks_ to me like it's reprogramming one of the outbound windows (IO?) > > > so that configuration space can be accessed. Doesn't this have the > > > effect of disabling access to the IO segment of the PCI bus from the > > > host CPU? > > > > > > What protections are there against other CPUs in the system issuing a > > > PCI I/O read/write while this outbound window is programmed as > > > configuration space? > > > > > > Yes, that is an issue with this driver. Most of the host controller > > has 4 or more viewpoints, and it is very easy to handle for them. But > > there are few which has only two viewpoints. Do not know how to solve > > it, so that it works for all. > > > > The default outbound iATU number is two, this may be the reason why the driver > is written in current style. And two outbound iATUs may be common for pcie dw > users because ASIC people just follow the default configuration ;). > > In our case, Marvell Berlin SoCs have two outbound iATUs. Hmm, we need to add new DT property to handle the number of outbound iATUs. Then, 'pcie-designware.c' should configure registers according to the number. Anyway, we should add this agenda to ToDo list. Best regards, Jingoo Han > > Thanks, > Jisheng -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2] backlight: pm8941-wled: Move PM8941 WLED driver to backlight
On Wednesday, July 22, 2015 9:45 AM, Bjorn Andersson wrote: The Qualcomm PM8941 WLED block is used for backlight and should therefor be in the backlight framework and not in the LED framework. This moves the driver and adapts to the backlight api instead. Acked-by: Jacek Anaszewski j.anaszew...@samsung.com Tested-by: Rob Clark robdcl...@gmail.com Signed-off-by: Bjorn Andersson bjorn.anders...@sonymobile.com Acked-by: Jingoo Han jingooh...@gmail.com Best regards, Jingoo Han --- .../backlight/pm8941-wled.txt} | 5 +- drivers/leds/Kconfig | 8 --- drivers/leds/Makefile | 1 - drivers/video/backlight/Kconfig| 7 +++ drivers/video/backlight/Makefile | 1 + .../backlight/pm8941-wled.c} | 60 ++ 6 files changed, 35 insertions(+), 47 deletions(-) rename Documentation/devicetree/bindings/{leds/leds-pm8941-wled.txt = video/backlight/pm8941- wled.txt} (84%) rename drivers/{leds/leds-pm8941-wled.c = video/backlight/pm8941-wled.c} (90%) diff --git a/Documentation/devicetree/bindings/leds/leds-pm8941-wled.txt b/Documentation/devicetree/bindings/video/backlight/pm8941-wled.txt similarity index 84% rename from Documentation/devicetree/bindings/leds/leds-pm8941-wled.txt rename to Documentation/devicetree/bindings/video/backlight/pm8941-wled.txt index a85a964d61f5..424f8444a6cd 100644 --- a/Documentation/devicetree/bindings/leds/leds-pm8941-wled.txt +++ b/Documentation/devicetree/bindings/video/backlight/pm8941-wled.txt @@ -5,10 +5,7 @@ Required properties: - reg: slave address Optional properties: -- label: The label for this led - See Documentation/devicetree/bindings/leds/common.txt -- linux,default-trigger: Default trigger assigned to the LED - See Documentation/devicetree/bindings/leds/common.txt +- label: The name of the backlight device - qcom,cs-out: bool; enable current sink output - qcom,cabc: bool; enable content adaptive backlight control - qcom,ext-gen: bool; use externally generated modulator signal to dim diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig index 9ad35f72ab4c..b8d4b965ca2a 100644 --- a/drivers/leds/Kconfig +++ b/drivers/leds/Kconfig @@ -578,14 +578,6 @@ config LEDS_VERSATILE This option enabled support for the LEDs on the ARM Versatile and RealView boards. Say Y to enabled these. -config LEDS_PM8941_WLED - tristate LED support for the Qualcomm PM8941 WLED block - depends on LEDS_CLASS - select REGMAP - help - This option enables support for the 'White' LED block - on Qualcomm PM8941 PMICs. - comment LED Triggers source drivers/leds/trigger/Kconfig diff --git a/drivers/leds/Makefile b/drivers/leds/Makefile index 8d6a24a2f513..abe96d960ebe 100644 --- a/drivers/leds/Makefile +++ b/drivers/leds/Makefile @@ -63,7 +63,6 @@ obj-$(CONFIG_LEDS_BLINKM) += leds-blinkm.o obj-$(CONFIG_LEDS_SYSCON)+= leds-syscon.o obj-$(CONFIG_LEDS_VERSATILE) += leds-versatile.o obj-$(CONFIG_LEDS_MENF21BMC) += leds-menf21bmc.o -obj-$(CONFIG_LEDS_PM8941_WLED) += leds-pm8941-wled.o obj-$(CONFIG_LEDS_KTD2692) += leds-ktd2692.o # LED SPI Drivers diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig index 0505b796d743..5ffa4b4e26c0 100644 --- a/drivers/video/backlight/Kconfig +++ b/drivers/video/backlight/Kconfig @@ -299,6 +299,13 @@ config BACKLIGHT_TOSA If you have an Sharp SL-6000 Zaurus say Y to enable a driver for its backlight +config BACKLIGHT_PM8941_WLED + tristate Qualcomm PM8941 WLED Driver + select REGMAP + help + If you have the Qualcomm PM8941, say Y to enable a driver for the + WLED block. + config BACKLIGHT_SAHARA tristate Tabletkiosk Sahara Touch-iT Backlight Driver depends on X86 diff --git a/drivers/video/backlight/Makefile b/drivers/video/backlight/Makefile index d67073f9d421..16ec534cff30 100644 --- a/drivers/video/backlight/Makefile +++ b/drivers/video/backlight/Makefile @@ -48,6 +48,7 @@ obj-$(CONFIG_BACKLIGHT_OMAP1) += omap1_bl.o obj-$(CONFIG_BACKLIGHT_OT200)+= ot200_bl.o obj-$(CONFIG_BACKLIGHT_PANDORA) += pandora_bl.o obj-$(CONFIG_BACKLIGHT_PCF50633) += pcf50633-backlight.o +obj-$(CONFIG_BACKLIGHT_PM8941_WLED) += pm8941-wled.o obj-$(CONFIG_BACKLIGHT_PWM) += pwm_bl.o obj-$(CONFIG_BACKLIGHT_SAHARA) += kb3886_bl.o obj-$(CONFIG_BACKLIGHT_SKY81452) += sky81452-backlight.o diff --git a/drivers/leds/leds-pm8941-wled.c b/drivers/video/backlight/pm8941-wled.c similarity index 90% rename from drivers/leds/leds-pm8941-wled.c rename to drivers/video/backlight/pm8941-wled.c index bf64a593fbf1..c704c3236034 100644 --- a/drivers/leds/leds-pm8941
Re: [PATCH] backlight: pm8941-wled: Move PM8941 WLED driver to backlight
On Thursday, July 16, 2015 5:01 PM, Jacek Anaszewski wrote: On 07/15/2015 10:02 PM, Bjorn Andersson wrote: The Qualcomm PM8941 WLED block is used for backlight and should therefor be in the backlight framework and not in the LED framework. This moves the driver and adapts to the backlight api instead. Signed-off-by: Bjorn Andersson bjorn.anders...@sonymobile.com --- .../devicetree/bindings/leds/leds-pm8941-wled.txt | 5 +- drivers/leds/Kconfig | 8 --- drivers/leds/Makefile | 1 - drivers/video/backlight/Kconfig| 8 +++ drivers/video/backlight/Makefile | 1 + .../backlight/pm8941-wled.c} | 59 ++ 6 files changed, 36 insertions(+), 46 deletions(-) rename drivers/{leds/leds-pm8941-wled.c = video/backlight/pm8941-wled.c} (90%) Acked-by: Jacek Anaszewski j.anaszew...@samsung.com If you are not an author of this driver or a maintainer affected by this patch, Just 'Reviewed-by' looks good. Best regards, Jingoo Han -- Best Regards, Jacek Anaszewski -- To unsubscribe from this list: send the line unsubscribe linux-arm-msm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] backlight: pm8941-wled: Move PM8941 WLED driver to backlight
On 2015. 7. 21., at AM 6:11, Jacek Anaszewski jacek.anaszew...@gmail.com wrote: On 20.07.2015 16:15, Jingoo Han wrote: On Thursday, July 16, 2015 5:01 PM, Jacek Anaszewski wrote: On 07/15/2015 10:02 PM, Bjorn Andersson wrote: The Qualcomm PM8941 WLED block is used for backlight and should therefor be in the backlight framework and not in the LED framework. This moves the driver and adapts to the backlight api instead. Signed-off-by: Bjorn Andersson bjorn.anders...@sonymobile.com --- .../devicetree/bindings/leds/leds-pm8941-wled.txt | 5 +- drivers/leds/Kconfig | 8 --- drivers/leds/Makefile | 1 - drivers/video/backlight/Kconfig | 8 +++ drivers/video/backlight/Makefile | 1 + .../backlight/pm8941-wled.c} | 59 ++ 6 files changed, 36 insertions(+), 46 deletions(-) rename drivers/{leds/leds-pm8941-wled.c = video/backlight/pm8941-wled.c} (90%) Acked-by: Jacek Anaszewski j.anaszew...@samsung.com If you are not an author of this driver or a maintainer affected by this patch, Just 'Reviewed-by' looks good. I am a LED subsystem maintainer. OK, I see. I didn't notice that you were added as the maintainer 2 months ago. Best regards, Jingoo Han-- To unsubscribe from this list: send the line unsubscribe linux-arm-msm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] usb: phy: msm: Make of_device_id array const
On Wednesday, July 23, 2014 4:38 PM, Kiran Padwal wrote: Make of_device_id array const, because all OF functions handle it as const. Hi Kiran Padwal, The same patch was already submitted and merged to USB tree. Thank you. Best regards, Jingoo Han Signed-off-by: Kiran Padwal kiran.pad...@smartplayin.com --- drivers/usb/phy/phy-msm-usb.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c index 78cc870..e4108ee 100644 --- a/drivers/usb/phy/phy-msm-usb.c +++ b/drivers/usb/phy/phy-msm-usb.c @@ -1429,7 +1429,7 @@ static void msm_otg_debugfs_cleanup(void) debugfs_remove(msm_otg_dbg_root); } -static struct of_device_id msm_otg_dt_match[] = { +static const struct of_device_id msm_otg_dt_match[] = { { .compatible = qcom,usb-otg-ci, .data = (void *) CI_45NM_INTEGRATED_PHY -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-arm-msm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html