Re: [PATCH 00/13] ARM: OMAP2+: clock cleanup series for 3.17
Quoting Tero Kristo (2014-07-02 01:47:34) Hi, This sets cleans up some of the omap specific clock drivers still residing under arch/arm/mach-omap2. This set is done in preparation to migrate these drivers eventually under drivers/clk/ti, where we don't have access to certain board specific functionality. The basic idea of this set is to introduce clk_features struct which contains any SoC specific data / flags within it, and this is used runtime instead of the current cpu_is_? checks. Reviewed-by: Mike Turquette mturque...@linaro.org There are also a couple of bug fixes introduced in this set: - Patch #1 : fix potential overflow in _dpll_test_fint - Patch #8 : embeds a fix for checking omap5/dra7 for the bypass modes also Set tested on following boards: - omap2430-sdp : boot - omap3-beagle : boot / suspend - omap4-panda-es : boot / suspend - omap5-uevm : boot - dra7-evm : boot Branch also available: tree: https://github.com/t-kristo/linux-pm.git branch: for-v3.17/omap2-clk-cleanup -Tero -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Fix Me in file gpmc-onenand.c
Hey Kevin, I am using cscope to find fix mes in the latest git kernels that still need cleanup. Furthermore I seem to hitting one in a that file that you maintain. Due to this I am wondering should I remove this code or does it still need to be in the mainline kernel and what mach-omap2 cpus does it check for. to support with this if statement. I am pasting the FiXME and the code that code around it. Cheers Nick else { /* * FIXME: Appears to be legacy code from initial ONENAND commit. * Unclear what boards this is for and if this can be removed. */ if (!cpu_is_omap34xx()) onenand_sync.wait_on_read = true; } -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
ARM: OMAP2+: gpmc: fix gpmc_hwecc_bch_capable()
This patch adds bch8 ecc software fallback which is mostly used by omap3s because they lack hardware elm support. Fixes: 0611c41934ab35ce84dea34ab291897ad3cbc7be (ARM: OMAP2+: gpmc: update gpmc_hwecc_bch_capable() for new platforms and ECC schemes) Cc: sta...@vger.kernel.org # 3.15.x+ Signed-off-by: Christoph Fritz chf.fr...@googlemail.com --- arch/arm/mach-omap2/gpmc-nand.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c index 17cd393..93914d2 100644 --- a/arch/arm/mach-omap2/gpmc-nand.c +++ b/arch/arm/mach-omap2/gpmc-nand.c @@ -50,6 +50,16 @@ static bool gpmc_hwecc_bch_capable(enum omap_ecc ecc_opt) soc_is_omap54xx() || soc_is_dra7xx()) return 1; + if (ecc_opt == OMAP_ECC_BCH4_CODE_HW_DETECTION_SW || +ecc_opt == OMAP_ECC_BCH8_CODE_HW_DETECTION_SW) { + if (cpu_is_omap24xx()) + return 0; + else if (cpu_is_omap3630() (GET_OMAP_REVISION() == 0)) + return 0; + else + return 1; + } + /* OMAP3xxx do not have ELM engine, so cannot support ECC schemes * which require H/W based ECC error detection */ if ((cpu_is_omap34xx() || cpu_is_omap3630()) @@ -57,14 +67,6 @@ static bool gpmc_hwecc_bch_capable(enum omap_ecc ecc_opt) (ecc_opt == OMAP_ECC_BCH8_CODE_HW))) return 0; - /* -* For now, assume 4-bit mode is only supported on OMAP3630 ES1.x, x=1 -* and AM33xx derivates. Other chips may be added if confirmed to work. -*/ - if ((ecc_opt == OMAP_ECC_BCH4_CODE_HW_DETECTION_SW) - (!cpu_is_omap3630() || (GET_OMAP_REVISION() == 0))) - return 0; - /* legacy platforms support only HAM1 (1-bit Hamming) ECC scheme */ if (ecc_opt == OMAP_ECC_HAM1_CODE_HW) return 1; -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ASoC: omap-dmic: Use devm_clk_get
On 07/11/2014 07:14 AM, Himangi Saraogi wrote: This patch introduces the use of managed interfaces like devm_clk_get and does away with the clk_puts in the probe and remove functions. A label is also done away with. Acked-by: Peter Ujfalusi peter.ujfal...@ti.com Signed-off-by: Himangi Saraogi himangi...@gmail.com --- This is a follow up to ASoC: omap-dmic: use managed interfaces which failed to apply as the other devm_ functions were introduced by a patch ASoC: omap-dmic: Use devm_snd_soc_register_component. sound/soc/omap/omap-dmic.c | 29 ++--- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/sound/soc/omap/omap-dmic.c b/sound/soc/omap/omap-dmic.c index f125eb9..0f34e28 100644 --- a/sound/soc/omap/omap-dmic.c +++ b/sound/soc/omap/omap-dmic.c @@ -466,7 +466,7 @@ static int asoc_dmic_probe(struct platform_device *pdev) mutex_init(dmic-mutex); - dmic-fclk = clk_get(dmic-dev, fck); + dmic-fclk = devm_clk_get(dmic-dev, fck); if (IS_ERR(dmic-fclk)) { dev_err(dmic-dev, cant get fck\n); return -ENODEV; @@ -475,8 +475,7 @@ static int asoc_dmic_probe(struct platform_device *pdev) res = platform_get_resource_byname(pdev, IORESOURCE_MEM, dma); if (!res) { dev_err(dmic-dev, invalid dma memory resource\n); - ret = -ENODEV; - goto err_put_clk; + return -ENODEV; } dmic-dma_data.addr = res-start + OMAP_DMIC_DATA_REG; @@ -484,34 +483,19 @@ static int asoc_dmic_probe(struct platform_device *pdev) res = platform_get_resource_byname(pdev, IORESOURCE_MEM, mpu); dmic-io_base = devm_ioremap_resource(pdev-dev, res); - if (IS_ERR(dmic-io_base)) { - ret = PTR_ERR(dmic-io_base); - goto err_put_clk; - } + if (IS_ERR(dmic-io_base)) + return PTR_ERR(dmic-io_base); ret = devm_snd_soc_register_component(pdev-dev, omap_dmic_component, omap_dmic_dai, 1); if (ret) - goto err_put_clk; + return ret; ret = omap_pcm_platform_register(pdev-dev); if (ret) - goto err_put_clk; - - return 0; - -err_put_clk: - clk_put(dmic-fclk); - return ret; -} - -static int asoc_dmic_remove(struct platform_device *pdev) -{ - struct omap_dmic *dmic = platform_get_drvdata(pdev); - - clk_put(dmic-fclk); + return ret; return 0; } @@ -529,7 +513,6 @@ static struct platform_driver asoc_dmic_driver = { .of_match_table = omap_dmic_of_match, }, .probe = asoc_dmic_probe, - .remove = asoc_dmic_remove, }; module_platform_driver(asoc_dmic_driver); -- Péter -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: OMAP2+: gpmc: fix gpmc_hwecc_bch_capable()
From: Christoph Fritz [mailto:chf.fr...@googlemail.com] This patch adds bch8 ecc software fallback which is mostly used by omap3s because they lack hardware elm support. Fixes: 0611c41934ab35ce84dea34ab291897ad3cbc7be (ARM: OMAP2+: gpmc: update gpmc_hwecc_bch_capable() for new platforms and ECC schemes) Cc: sta...@vger.kernel.org # 3.15.x+ Signed-off-by: Christoph Fritz chf.fr...@googlemail.com --- arch/arm/mach-omap2/gpmc-nand.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c index 17cd393..93914d2 100644 --- a/arch/arm/mach-omap2/gpmc-nand.c +++ b/arch/arm/mach-omap2/gpmc-nand.c @@ -50,6 +50,16 @@ static bool gpmc_hwecc_bch_capable(enum omap_ecc ecc_opt) soc_is_omap54xx() || soc_is_dra7xx()) return 1; + if (ecc_opt == OMAP_ECC_BCH4_CODE_HW_DETECTION_SW || + ecc_opt == OMAP_ECC_BCH8_CODE_HW_DETECTION_SW) { + if (cpu_is_omap24xx()) + return 0; + else if (cpu_is_omap3630() (GET_OMAP_REVISION() == 0)) + return 0; + else + return 1; + } + /* OMAP3xxx do not have ELM engine, so cannot support ECC schemes * which require H/W based ECC error detection */ if ((cpu_is_omap34xx() || cpu_is_omap3630()) @@ -57,14 +67,6 @@ static bool gpmc_hwecc_bch_capable(enum omap_ecc ecc_opt) (ecc_opt == OMAP_ECC_BCH8_CODE_HW))) return 0; - /* - * For now, assume 4-bit mode is only supported on OMAP3630 ES1.x, x=1 - * and AM33xx derivates. Other chips may be added if confirmed to work. - */ - if ((ecc_opt == OMAP_ECC_BCH4_CODE_HW_DETECTION_SW) - (!cpu_is_omap3630() || (GET_OMAP_REVISION() == 0))) - return 0; - /* legacy platforms support only HAM1 (1-bit Hamming) ECC scheme */ if (ecc_opt == OMAP_ECC_HAM1_CODE_HW) return 1; -- 1.7.10.4 Thanks much for this fix. Reviewed-by: Pekon Gupta pe...@ti.com with regards, pekon