RE: [alsa-devel] [PATCH] ASoC: SAMSUNG: spdif: use clk_prepare_enable and clk_disable_unprepare
On Wednesday, Oct 03, 2012 at 8:48 AM, Thomas Abraham wrote: > Subject: [alsa-devel] [PATCH] ASoC: SAMSUNG: spdif: use clk_prepare_enable and > clk_disable_unprepare > > Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare > calls as required by common clock framework. > > Signed-off-by: Thomas Abraham Acked-by: Sangbeom Kim Thanks, Sangbeom. -- 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] ARM: EXYNOS: Remove wrong I2S0 clock from peril clock
Remove I2S0 clk from peril since peril clock doesn't have I2S0 clk for EXYNOS4. Audio Subsystem block has I2S0 clk. Signed-off-by: Sangsu Park --- arch/arm/mach-exynos/clock-exynos4.c |5 - 1 file changed, 5 deletions(-) diff --git a/arch/arm/mach-exynos/clock-exynos4.c b/arch/arm/mach-exynos/clock-exynos4.c index 6a45c9a..fa8a134 100644 --- a/arch/arm/mach-exynos/clock-exynos4.c +++ b/arch/arm/mach-exynos/clock-exynos4.c @@ -613,11 +613,6 @@ static struct clk exynos4_init_clocks_off[] = { .ctrlbit= (1 << 18), }, { .name = "iis", - .devname= "samsung-i2s.0", - .enable = exynos4_clk_ip_peril_ctrl, - .ctrlbit= (1 << 19), - }, { - .name = "iis", .devname= "samsung-i2s.1", .enable = exynos4_clk_ip_peril_ctrl, .ctrlbit= (1 << 20), -- 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
Re: [PATCH 14/24] USB: ohci: merge ohci_finish_controller_resume with ohci_resume
On 10/04/2012 05:17 PM, Florian Fainelli : > Merge ohci_finish_controller_resume with ohci_resume as suggested by Alan > Stern. Since ohci_finish_controller_resume no longer exists, update the > various OHCI drivers to call ohci_resume() instead. Some drivers used to set > themselves the bit HCD_FLAG_HW_ACCESSIBLE, which is now handled by > ohci_resume(). > > Signed-off-by: Florian Fainelli > --- > drivers/usb/host/ohci-at91.c |2 +- Seems ok for AT91, so Acked-by: Nicolas Ferre Thanks Florian, bye, > drivers/usb/host/ohci-ep93xx.c |2 +- > drivers/usb/host/ohci-exynos.c |5 + > drivers/usb/host/ohci-hcd.c | 41 +++-- > drivers/usb/host/ohci-hub.c | 42 > -- > drivers/usb/host/ohci-omap.c |2 +- > drivers/usb/host/ohci-platform.c |2 +- > drivers/usb/host/ohci-pxa27x.c |2 +- > drivers/usb/host/ohci-s3c2410.c |3 +-- > drivers/usb/host/ohci-spear.c|2 +- > drivers/usb/host/ohci-tmio.c |2 +- > 11 files changed, 48 insertions(+), 57 deletions(-) > > diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c > index 0bf72f9..908d84a 100644 > --- a/drivers/usb/host/ohci-at91.c > +++ b/drivers/usb/host/ohci-at91.c > @@ -705,7 +705,7 @@ static int ohci_hcd_at91_drv_resume(struct > platform_device *pdev) > if (!clocked) > at91_start_clock(); > > - ohci_finish_controller_resume(hcd); > + ohci_resume(hcd, false); > return 0; > } > #else > diff --git a/drivers/usb/host/ohci-ep93xx.c b/drivers/usb/host/ohci-ep93xx.c > index dbfbd1d..a982f04 100644 > --- a/drivers/usb/host/ohci-ep93xx.c > +++ b/drivers/usb/host/ohci-ep93xx.c > @@ -194,7 +194,7 @@ static int ohci_hcd_ep93xx_drv_resume(struct > platform_device *pdev) > > ep93xx_start_hc(&pdev->dev); > > - ohci_finish_controller_resume(hcd); > + ohci_resume(hcd, false); > return 0; > } > #endif > diff --git a/drivers/usb/host/ohci-exynos.c b/drivers/usb/host/ohci-exynos.c > index fc3091b..53c5a989 100644 > --- a/drivers/usb/host/ohci-exynos.c > +++ b/drivers/usb/host/ohci-exynos.c > @@ -252,10 +252,7 @@ static int exynos_ohci_resume(struct device *dev) > if (pdata && pdata->phy_init) > pdata->phy_init(pdev, S5P_USB_PHY_HOST); > > - /* Mark hardware accessible again as we are out of D3 state by now */ > - set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); > - > - ohci_finish_controller_resume(hcd); > + ohci_resume(hcd, false); > > return 0; > } > diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c > index 5d30992..568bdb3 100644 > --- a/drivers/usb/host/ohci-hcd.c > +++ b/drivers/usb/host/ohci-hcd.c > @@ -1003,13 +1003,50 @@ static int __maybe_unused ohci_suspend(struct usb_hcd > *hcd, bool do_wakeup) > > static int __maybe_unused ohci_resume(struct usb_hcd *hcd, bool hibernated) > { > + struct ohci_hcd *ohci = hcd_to_ohci(hcd); > + int port; > + boolneed_reinit = false; > + > set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); > > /* Make sure resume from hibernation re-enumerates everything */ > if (hibernated) > - ohci_usb_reset(hcd_to_ohci(hcd)); > + ohci_usb_reset(ohci); > + > + /* See if the controller is already running or has been reset */ > + ohci->hc_control = ohci_readl(ohci, &ohci->regs->control); > + if (ohci->hc_control & (OHCI_CTRL_IR | OHCI_SCHED_ENABLES)) { > + need_reinit = true; > + } else { > + switch (ohci->hc_control & OHCI_CTRL_HCFS) { > + case OHCI_USB_OPER: > + case OHCI_USB_RESET: > + need_reinit = true; > + } > + } > + > + /* If needed, reinitialize and suspend the root hub */ > + if (need_reinit) { > + spin_lock_irq(&ohci->lock); > + ohci_rh_resume(ohci); > + ohci_rh_suspend(ohci, 0); > + spin_unlock_irq(&ohci->lock); > + } > + > + /* Normally just turn on port power and enable interrupts */ > + else { > + ohci_dbg(ohci, "powerup ports\n"); > + for (port = 0; port < ohci->num_ports; port++) > + ohci_writel(ohci, RH_PS_PPS, > + &ohci->regs->roothub.portstatus[port]); > + > + ohci_writel(ohci, OHCI_INTR_MIE, &ohci->regs->intrenable); > + ohci_readl(ohci, &ohci->regs->intrenable); > + msleep(20); > + } > + > + usb_hcd_resume_root_hub(hcd); > > - ohci_finish_controller_resume(hcd); > return 0; > } > > diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c > index 2f3619e..db09dae 100644 > --- a/drivers/usb/host/ohci-hub.c > +++ b/drivers/usb/host/ohci-hub.c > @@ -316,48 +316,6 @@ static int ohci_bus_resume (struct usb_hcd *hcd) > ret
Re: [PATCH] input: keyboard: gpio-keys: Try to parse IRQ from device tree
Hi Dmitry, On Thursday 04 of October 2012 23:23:15 Dmitry Torokhov wrote: > Hi Tomasz, > > On Wed, Oct 03, 2012 at 01:20:00PM +0200, Tomasz Figa wrote: > > On modern platforms using device tree and non-legacy IRQ domains there > > is usually no way to perform direct translation between GPIO and IRQ, > > because the IRQ of interest is not mapped yet into sparse IRQ > > namespace. > > > > This patch modifies the gpio_keys driver to parse IRQ from device tree > > and use gpio_to_irq only as a fallback. > > This means that this change would need to be applied to every driver > that currently maps gpio to IRQ. Why can't gpio_to_irq() be fixed > instead? > Now when I think of it again, there is a possibility of creating an IRQ mapping in .to_irq callback of GPIO chip, if it does not exist yet. This should be a better solution indeed. I will send a patch for pinctrl-samsung driver adding it. Please disregard this patch. Best regards, -- Tomasz Figa Samsung Poland R&D Center -- 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/2] Enable ehci and ohci devices for exynos5250
Based on for-next branch of linux-samsung. Vivek Gautam (2): ARM: Exynos5250: Enabling ehci-s5p driver ARM: Exynos5250: Enabling ohci-exynos driver .../devicetree/bindings/usb/exynos-usb.txt | 40 arch/arm/boot/dts/exynos5250-smdk5250.dts |4 ++ arch/arm/boot/dts/exynos5250.dtsi | 12 ++ arch/arm/mach-exynos/include/mach/map.h|2 + arch/arm/mach-exynos/mach-exynos5-dt.c |4 ++ 5 files changed, 62 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/exynos-usb.txt -- 1.7.6.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/2] ARM: Exynos5250: Enabling ehci-s5p driver
Adding EHCI device tree node for Exynos5250 along with the device base adress and gpio line for vbus. Signed-off-by: Vivek Gautam --- .../devicetree/bindings/usb/exynos-usb.txt | 25 arch/arm/boot/dts/exynos5250-smdk5250.dts |4 +++ arch/arm/boot/dts/exynos5250.dtsi |6 arch/arm/mach-exynos/include/mach/map.h|1 + arch/arm/mach-exynos/mach-exynos5-dt.c |2 + 5 files changed, 38 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/exynos-usb.txt diff --git a/Documentation/devicetree/bindings/usb/exynos-usb.txt b/Documentation/devicetree/bindings/usb/exynos-usb.txt new file mode 100644 index 000..56e35c7 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/exynos-usb.txt @@ -0,0 +1,25 @@ +Samsung Exynos SoC USB controller + +The USB devices interface with USB controllers on Exynos SOCs. +The device node has following properties. + +EHCI +Required properties: + - compatible: should be "samsung,exynos-ehci" for USB 2.0 + EHCI controller in host mode. + - reg: physical base address of the controller and length of memory mapped + region. + - interrupts: interrupt number to the cpu. + +Optional properties: + - samsung,vbus-gpio: if present, specifies the GPIO that + needs to be pulled up for the bus to be powered. + +Example: + + ehci { + compatible = "samsung,exynos-ehci"; + reg = <0x1211 0x100>; + interrupts = <0 71 0>; + samsung,vbus-gpio = <&gpx2 6 1 3 3>; + }; diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts b/arch/arm/boot/dts/exynos5250-smdk5250.dts index a352df4..089576b 100644 --- a/arch/arm/boot/dts/exynos5250-smdk5250.dts +++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts @@ -166,4 +166,8 @@ spi_2: spi@12d4 { status = "disabled"; }; + + ehci { + samsung,vbus-gpio = <&gpx2 6 1 3 3>; + }; }; diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index dddfd6e..73ea844 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -218,6 +218,12 @@ #size-cells = <0>; }; + ehci { + compatible = "samsung,exynos-ehci"; + reg = <0x1211 0x100>; + interrupts = <0 71 0>; + }; + amba { #address-cells = <1>; #size-cells = <1>; diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index 8480849..825fe40 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h @@ -195,6 +195,7 @@ #define EXYNOS4_PA_EHCI0x1258 #define EXYNOS4_PA_OHCI0x1259 #define EXYNOS4_PA_HSPHY 0x125B +#define EXYNOS5_PA_EHCI0x1211 #define EXYNOS4_PA_MFC 0x1340 #define EXYNOS4_PA_UART0x1380 diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index fee9dcd..6d950d7b 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c @@ -72,6 +72,8 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = { "exynos-gsc.2", NULL), OF_DEV_AUXDATA("samsung,exynos5-gsc", EXYNOS5_PA_GSC3, "exynos-gsc.3", NULL), + OF_DEV_AUXDATA("samsung,exynos-ehci", EXYNOS5_PA_EHCI, + "s5p-ehci", NULL), {}, }; -- 1.7.6.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 2/2] ARM: Exynos5250: Enabling ohci-exynos driver
Adding OHCI device tree node for Exynos5250 along with the device base address. Signed-off-by: Vivek Gautam --- .../devicetree/bindings/usb/exynos-usb.txt | 15 +++ arch/arm/boot/dts/exynos5250.dtsi |6 ++ arch/arm/mach-exynos/include/mach/map.h|1 + arch/arm/mach-exynos/mach-exynos5-dt.c |2 ++ 4 files changed, 24 insertions(+), 0 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/exynos-usb.txt b/Documentation/devicetree/bindings/usb/exynos-usb.txt index 56e35c7..bff10a8 100644 --- a/Documentation/devicetree/bindings/usb/exynos-usb.txt +++ b/Documentation/devicetree/bindings/usb/exynos-usb.txt @@ -23,3 +23,18 @@ Example: interrupts = <0 71 0>; samsung,vbus-gpio = <&gpx2 6 1 3 3>; }; + +OHCI +Required properties: + - compatible: should be "samsung,exynos-ohci" for USB 2.0 + OHCI companion controller in host mode. + - reg: physical base address of the controller and length of memory mapped + region. + - interrupts: interrupt number to the cpu. + +Example: + ohci { + compatible = "samsung,exynos-ohci"; + reg = <0x1212 0x100>; + interrupts = <0 71 0>; + }; diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index 73ea844..bcdfbe2 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -224,6 +224,12 @@ interrupts = <0 71 0>; }; + ohci { + compatible = "samsung,exynos-ohci"; + reg = <0x1212 0x100>; + interrupts = <0 71 0>; + }; + amba { #address-cells = <1>; #size-cells = <1>; diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index 825fe40..cfede1f 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h @@ -196,6 +196,7 @@ #define EXYNOS4_PA_OHCI0x1259 #define EXYNOS4_PA_HSPHY 0x125B #define EXYNOS5_PA_EHCI0x1211 +#define EXYNOS5_PA_OHCI0x1212 #define EXYNOS4_PA_MFC 0x1340 #define EXYNOS4_PA_UART0x1380 diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index 6d950d7b..e6c2144 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c @@ -74,6 +74,8 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = { "exynos-gsc.3", NULL), OF_DEV_AUXDATA("samsung,exynos-ehci", EXYNOS5_PA_EHCI, "s5p-ehci", NULL), + OF_DEV_AUXDATA("samsung,exynos-ohci", EXYNOS5_PA_OHCI, + "exynos-ohci", NULL), {}, }; -- 1.7.6.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 v2 0/4] DMA: PL330: Fix mem leaks and balance probe/remove
The first 2 patches of this series fix memory leaks because the memory allocated for peripheral channels and DMA descriptors were not getting freed. The last 2 patches balance the module's remove function. This series depends on "61c6e7531d3b66b3 DMA: PL330: Check the pointer returned by kzalloc" which is on slave-dma's "fixes" branch. Hence slave-dma tree's "next" branch was merged with "fixes" and applied patch at [1] to fix the build error. [1] http://permalink.gmane.org/gmane.linux.kernel.next/24274 Changes since v1: - Protect only list_add_tail with spin_locks - Return EBUSY from remove if channel is in use - unregister dma_device in remove Inderpal Singh (4): DMA: PL330: Free memory allocated for peripheral channels DMA: PL330: Change allocation method to properly free DMA descriptors DMA: PL330: Balance module remove function with probe DMA: PL330: unregister dma_device in module's remove function drivers/dma/pl330.c | 53 --- 1 file changed, 38 insertions(+), 15 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
[PATCH v2 3/4] DMA: PL330: Balance module remove function with probe
Since peripheral channel resources are not being allocated at probe, no need to flush the channels and free the resources in remove function. In case, the channel is in use by some client, return EBUSY. Signed-off-by: Inderpal Singh --- drivers/dma/pl330.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index bf71ff7..4b7a34d 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -3009,18 +3009,21 @@ static int __devexit pl330_remove(struct amba_device *adev) if (!pdmac) return 0; + /* check if any client is using any channel */ + list_for_each_entry(pch, &pdmac->ddma.channels, + chan.device_node) { + + if (pch->chan.client_count) + return -EBUSY; + } + amba_set_drvdata(adev, NULL); - /* Idle the DMAC */ list_for_each_entry_safe(pch, _p, &pdmac->ddma.channels, chan.device_node) { /* Remove the channel */ list_del(&pch->chan.device_node); - - /* Flush the channel */ - pl330_control(&pch->chan, DMA_TERMINATE_ALL, 0); - pl330_free_chan_resources(&pch->chan); } while (!list_empty(&pdmac->desc_pool)) { -- 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 v2 4/4] DMA: PL330: unregister dma_device in module's remove function
unregister dma_device in module's remove function. Signed-off-by: Inderpal Singh --- drivers/dma/pl330.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 4b7a34d..e7dc040 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -3017,6 +3017,8 @@ static int __devexit pl330_remove(struct amba_device *adev) return -EBUSY; } + dma_async_device_unregister(&pdmac->ddma); + amba_set_drvdata(adev, NULL); list_for_each_entry_safe(pch, _p, &pdmac->ddma.channels, -- 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 v2 1/4] DMA: PL330: Free memory allocated for peripheral channels
The allocated memory for peripheral channels is not being freed upon failure in probe and in module's remove funtion. It will lead to memory leakage. Hence free the allocated memory. Signed-off-by: Inderpal Singh --- drivers/dma/pl330.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 2ebd4cd..10c6b6a 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2962,7 +2962,7 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) ret = dma_async_device_register(pd); if (ret) { dev_err(&adev->dev, "unable to register DMAC\n"); - goto probe_err4; + goto probe_err5; } dev_info(&adev->dev, @@ -2975,6 +2975,8 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) return 0; +probe_err5: + kfree(pdmac->peripherals); probe_err4: pl330_del(pi); probe_err3: @@ -3025,6 +3027,7 @@ static int __devexit pl330_remove(struct amba_device *adev) res = &adev->res; release_mem_region(res->start, resource_size(res)); + kfree(pdmac->peripherals); kfree(pdmac); return 0; -- 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 v2 2/4] DMA: PL330: Change allocation method to properly free DMA descriptors
In probe, memory for multiple DMA descriptors were being allocated at once and then it was being split and added into DMA pool one by one. The address of this memory allocation is not being saved anywhere. To free this memory, the address is required. Initially the first node of the pool will be pointed by this address but as we use this pool the descs will shuffle and hence we will lose the track of the address. This patch does following: 1. Allocates DMA descs one by one and then adds them to pool so that all descs can be fetched and memory freed one by one. This way runtime added descs can also be freed. 2. Free DMA descs in case of error in probe and in module's remove function Signed-off-by: Inderpal Singh --- drivers/dma/pl330.c | 35 +-- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 10c6b6a..bf71ff7 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2541,20 +2541,20 @@ static int add_desc(struct dma_pl330_dmac *pdmac, gfp_t flg, int count) if (!pdmac) return 0; - desc = kmalloc(count * sizeof(*desc), flg); - if (!desc) - return 0; + for (i = 0; i < count; i++) { + desc = kmalloc(sizeof(*desc), flg); + if (!desc) + break; + _init_desc(desc); - spin_lock_irqsave(&pdmac->pool_lock, flags); + spin_lock_irqsave(&pdmac->pool_lock, flags); - for (i = 0; i < count; i++) { - _init_desc(&desc[i]); - list_add_tail(&desc[i].node, &pdmac->desc_pool); - } + list_add_tail(&desc->node, &pdmac->desc_pool); - spin_unlock_irqrestore(&pdmac->pool_lock, flags); + spin_unlock_irqrestore(&pdmac->pool_lock, flags); + } - return count; + return i; } static struct dma_pl330_desc * @@ -2857,6 +2857,7 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) struct dma_pl330_platdata *pdat; struct dma_pl330_dmac *pdmac; struct dma_pl330_chan *pch; + struct dma_pl330_desc *desc; struct pl330_info *pi; struct dma_device *pd; struct resource *res; @@ -2978,6 +2979,12 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) probe_err5: kfree(pdmac->peripherals); probe_err4: + while (!list_empty(&pdmac->desc_pool)) { + desc = list_entry(pdmac->desc_pool.next, + struct dma_pl330_desc, node); + list_del(&desc->node); + kfree(desc); + } pl330_del(pi); probe_err3: free_irq(irq, pi); @@ -2994,6 +3001,7 @@ static int __devexit pl330_remove(struct amba_device *adev) { struct dma_pl330_dmac *pdmac = amba_get_drvdata(adev); struct dma_pl330_chan *pch, *_p; + struct dma_pl330_desc *desc; struct pl330_info *pi; struct resource *res; int irq; @@ -3015,6 +3023,13 @@ static int __devexit pl330_remove(struct amba_device *adev) pl330_free_chan_resources(&pch->chan); } + while (!list_empty(&pdmac->desc_pool)) { + desc = list_entry(pdmac->desc_pool.next, + struct dma_pl330_desc, node); + list_del(&desc->node); + kfree(desc); + } + pi = &pdmac->pif; pl330_del(pi); -- 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] ARM: EXYNOS5: Remove wrongly placed usb2.0 PHY_CFG definition from PMU_REG
EXYNOS5_USB_CFG macro should actually point to USB20PHY_CFG system register (base addr + 0x230). It's wrongly placed in regs-pmu. Actual register at offset 0x230 in PMU is SEQ_TRANSITION4. Signed-off-by: Vivek Gautam --- arch/arm/mach-exynos/include/mach/regs-pmu.h |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-exynos/include/mach/regs-pmu.h b/arch/arm/mach-exynos/include/mach/regs-pmu.h index d4e392b..70b2795 100644 --- a/arch/arm/mach-exynos/include/mach/regs-pmu.h +++ b/arch/arm/mach-exynos/include/mach/regs-pmu.h @@ -230,8 +230,6 @@ /* For EXYNOS5 */ -#define EXYNOS5_USB_CFG S5P_PMUREG(0x0230) - #define EXYNOS5_AUTO_WDTRESET_DISABLE S5P_PMUREG(0x0408) #define EXYNOS5_MASK_WDTRESET_REQUEST S5P_PMUREG(0x040C) -- 1.7.6.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 15/16] spi/s3c64xx: use correct dma_transfer_direction type
There is a subtle difference between dma_transfer_direction and dma_data_direction: the former is used by the dmaengine framework, while the latter is used by the dma-mapping API. Although the purpose is comparable, the actual values are different and must not be mixed. In this case, the driver just wants to use dma_transfer_direction. Without this patch, building s3c6400_defconfig results in: drivers/spi/spi-s3c64xx.c: In function 's3c64xx_spi_dmacb': drivers/spi/spi-s3c64xx.c:239:21: warning: comparison between 'enum dma_data_direction' and 'enum dma_transfer_direction' [-Wenum-compare] Signed-off-by: Arnd Bergmann Cc: Ben Dooks Cc: Kukjin Kim Cc: Grant Likely Cc: linux-arm-ker...@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: spi-devel-gene...@lists.sourceforge.net --- drivers/spi/spi-s3c64xx.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index d1c8441f..2e44dd6 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -132,7 +132,7 @@ struct s3c64xx_spi_dma_data { unsignedch; - enum dma_data_direction direction; + enum dma_transfer_direction direction; enum dma_ch dmach; struct property *dma_prop; }; -- 1.7.10 -- 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 2/2] ARM: Exynos4: Register clocks via common clock framework
Hello, On 10/01/2012 02:09 PM, chander.kash...@linaro.org wrote: > From: Thomas Abraham > > Register clocks for Exynos4 platfotms using common clock framework. > Also included are set of helper functions for clock registration > that can be reused on other Samsung platforms as well. > > Cc: Mike Turquette > Cc: Kukjin Kim > Signed-off-by: Thomas Abraham > --- > arch/arm/mach-exynos/Kconfig |1 + > arch/arm/mach-exynos/common.h |3 + > arch/arm/mach-exynos/mct.c| 11 +- > arch/arm/plat-samsung/Kconfig |4 +- > drivers/clk/Makefile |1 + > drivers/clk/clk.c | 12 +- > drivers/clk/samsung/Makefile |6 + > drivers/clk/samsung/clk-exynos4.c | 585 > + > drivers/clk/samsung/clk.c | 231 +++ > drivers/clk/samsung/clk.h | 190 > 10 files changed, 1037 insertions(+), 7 deletions(-) > create mode 100644 drivers/clk/samsung/Makefile > create mode 100644 drivers/clk/samsung/clk-exynos4.c > create mode 100644 drivers/clk/samsung/clk.c > create mode 100644 drivers/clk/samsung/clk.h ... > diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c > index 56e4495..456c50b 100644 > --- a/drivers/clk/clk.c > +++ b/drivers/clk/clk.c > @@ -1196,6 +1196,7 @@ EXPORT_SYMBOL_GPL(clk_set_parent); > int __clk_init(struct device *dev, struct clk *clk) > { > int i, ret = 0; > + u8 index; > struct clk *orphan; > struct hlist_node *tmp, *tmp2; > > @@ -1259,6 +1260,7 @@ int __clk_init(struct device *dev, struct clk *clk) > __clk_lookup(clk->parent_names[i]); > } > > + > clk->parent = __clk_init_parent(clk); > > /* > @@ -1298,11 +1300,13 @@ int __clk_init(struct device *dev, struct clk *clk) >* this clock >*/ > hlist_for_each_entry_safe(orphan, tmp, tmp2,&clk_orphan_list, > child_node) > - for (i = 0; i< orphan->num_parents; i++) > - if (!strcmp(clk->name, orphan->parent_names[i])) { > + if (orphan->num_parents> 1) { > + index = orphan->ops->get_parent(orphan->hw); > + if (!strcmp(clk->name, orphan->parent_names[index])) > __clk_reparent(orphan, clk); > - break; > - } > + } else if (!strcmp(clk->name, orphan->parent_names[0])) { > + __clk_reparent(orphan, clk); > + } As this touches generic code it should rather be put into a separate patch, along with an explanation why such a change is needed. > > /* >* optional platform-specific magic > diff --git a/drivers/clk/samsung/Makefile b/drivers/clk/samsung/Makefile > new file mode 100644 > index 000..69487f7 > --- /dev/null > +++ b/drivers/clk/samsung/Makefile > @@ -0,0 +1,6 @@ > +# > +# Samsung Clock specific Makefile > +# > + > +obj-$(CONFIG_PLAT_SAMSUNG) += clk.o > +obj-$(CONFIG_ARCH_EXYNOS4) += clk-exynos4.o > diff --git a/drivers/clk/samsung/clk-exynos4.c > b/drivers/clk/samsung/clk-exynos4.c > new file mode 100644 > index 000..74a6f03 > --- /dev/null > +++ b/drivers/clk/samsung/clk-exynos4.c > @@ -0,0 +1,585 @@ > +/* > + * Copyright (c) 2012 Samsung Electronics Co., Ltd. > + * Copyright (c) 2012 Linaro Ltd. > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License version 2 as > + * published by the Free Software Foundation. > + * > + * Common Clock Framework support for all Exynos4 platforms > +*/ > + > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > +#include > +#include > + > +#include "clk.h" > + > +#define EXYNOS4_OP_MODE (S5P_VA_CHIPID + 8) > + > +static const char *pll_parent_names[] __initdata = { "fin_pll" }; > +static const char *fin_pll_parents[] __initdata = { "xxti", "xusbxti" }; > +static const char *mout_apll_parents[] __initdata = { "fin_pll", > "fout_apll", }; > +static const char *mout_mpll_parents[] __initdata = { "fin_pll", > "fout_mpll", }; > +static const char *mout_epll_parents[] __initdata = { "fin_pll", > "fout_epll", }; > + > +static const char *sclk_ampll_parents[] __initdata = { > + "mout_mpll", "sclk_apll", }; > + > +static const char *sclk_evpll_parents[] __initdata = { > + "mout_epll", "mout_vpll", }; > + > +static const char *mout_core_parents[] __initdata = { > + "mout_apll", "mout_mpll", }; > + > +static const char *mout_mfc_parents[] __initdata = { > + "mout_mfc0", "mout_mfc1", }; > + > +static const char *mout_dac_parents[] __initdata = { > + "mout_vpll", "sclk_hdmiphy", }; > + > +static const char *mout_hdmi_parents[] __initdata = { > + "sclk_pixel", "sclk_hdmiphy", }; > + > +static const char *mout_mixer_parents[] __initdata = { >
[PATCH 15/32 v2] USB: ohci: merge ohci_finish_controller_resume with ohci_resume
Merge ohci_finish_controller_resume with ohci_resume as suggested by Alan Stern. Since ohci_finish_controller_resume no longer exists, update the various OHCI drivers to call ohci_resume() instead. Some drivers used to set themselves the bit HCD_FLAG_HW_ACCESSIBLE, which is now handled by ohci_resume(). Acked-by: Jingoo Han Acked-by: Nicolas Ferre Signed-off-by: Florian Fainelli --- Changes since v1: - added Nicolas and Jingoo's Acked-by drivers/usb/host/ohci-at91.c |2 +- drivers/usb/host/ohci-ep93xx.c |2 +- drivers/usb/host/ohci-exynos.c |5 + drivers/usb/host/ohci-hcd.c | 41 +++-- drivers/usb/host/ohci-hub.c | 42 -- drivers/usb/host/ohci-omap.c |2 +- drivers/usb/host/ohci-platform.c |2 +- drivers/usb/host/ohci-pxa27x.c |2 +- drivers/usb/host/ohci-s3c2410.c |3 +-- drivers/usb/host/ohci-spear.c|2 +- drivers/usb/host/ohci-tmio.c |2 +- 11 files changed, 48 insertions(+), 57 deletions(-) diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index 0bf72f9..908d84a 100644 --- a/drivers/usb/host/ohci-at91.c +++ b/drivers/usb/host/ohci-at91.c @@ -705,7 +705,7 @@ static int ohci_hcd_at91_drv_resume(struct platform_device *pdev) if (!clocked) at91_start_clock(); - ohci_finish_controller_resume(hcd); + ohci_resume(hcd, false); return 0; } #else diff --git a/drivers/usb/host/ohci-ep93xx.c b/drivers/usb/host/ohci-ep93xx.c index dbfbd1d..a982f04 100644 --- a/drivers/usb/host/ohci-ep93xx.c +++ b/drivers/usb/host/ohci-ep93xx.c @@ -194,7 +194,7 @@ static int ohci_hcd_ep93xx_drv_resume(struct platform_device *pdev) ep93xx_start_hc(&pdev->dev); - ohci_finish_controller_resume(hcd); + ohci_resume(hcd, false); return 0; } #endif diff --git a/drivers/usb/host/ohci-exynos.c b/drivers/usb/host/ohci-exynos.c index fc3091b..53c5a989 100644 --- a/drivers/usb/host/ohci-exynos.c +++ b/drivers/usb/host/ohci-exynos.c @@ -252,10 +252,7 @@ static int exynos_ohci_resume(struct device *dev) if (pdata && pdata->phy_init) pdata->phy_init(pdev, S5P_USB_PHY_HOST); - /* Mark hardware accessible again as we are out of D3 state by now */ - set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); - - ohci_finish_controller_resume(hcd); + ohci_resume(hcd, false); return 0; } diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index acf8c83..d97dc48 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c @@ -1005,13 +1005,50 @@ static int __maybe_unused ohci_suspend(struct usb_hcd *hcd, bool do_wakeup) static int __maybe_unused ohci_resume(struct usb_hcd *hcd, bool hibernated) { + struct ohci_hcd *ohci = hcd_to_ohci(hcd); + int port; + boolneed_reinit = false; + set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); /* Make sure resume from hibernation re-enumerates everything */ if (hibernated) - ohci_usb_reset(hcd_to_ohci(hcd)); + ohci_usb_reset(ohci); + + /* See if the controller is already running or has been reset */ + ohci->hc_control = ohci_readl(ohci, &ohci->regs->control); + if (ohci->hc_control & (OHCI_CTRL_IR | OHCI_SCHED_ENABLES)) { + need_reinit = true; + } else { + switch (ohci->hc_control & OHCI_CTRL_HCFS) { + case OHCI_USB_OPER: + case OHCI_USB_RESET: + need_reinit = true; + } + } + + /* If needed, reinitialize and suspend the root hub */ + if (need_reinit) { + spin_lock_irq(&ohci->lock); + ohci_rh_resume(ohci); + ohci_rh_suspend(ohci, 0); + spin_unlock_irq(&ohci->lock); + } + + /* Normally just turn on port power and enable interrupts */ + else { + ohci_dbg(ohci, "powerup ports\n"); + for (port = 0; port < ohci->num_ports; port++) + ohci_writel(ohci, RH_PS_PPS, + &ohci->regs->roothub.portstatus[port]); + + ohci_writel(ohci, OHCI_INTR_MIE, &ohci->regs->intrenable); + ohci_readl(ohci, &ohci->regs->intrenable); + msleep(20); + } + + usb_hcd_resume_root_hub(hcd); - ohci_finish_controller_resume(hcd); return 0; } diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c index 2f3619e..db09dae 100644 --- a/drivers/usb/host/ohci-hub.c +++ b/drivers/usb/host/ohci-hub.c @@ -316,48 +316,6 @@ static int ohci_bus_resume (struct usb_hcd *hcd) return rc; } -/* Carry out the final steps of resuming the controller device */ -static void __maybe_unused ohci_finish_controller_resume(struct usb_hcd *hcd) -