Re: [PATCH 1/3] tty: serial: 8250_omap: do not use RX DMA if pause is not supported
On Mon, Aug 10, 2015 at 09:00:29AM -0400, Peter Hurley wrote: Russell seemed to think that the current dma operation was necessary information to differentiate types of pause support, but I don't think that's required. As Sebastian's omap-dma driver patch shows, partial pause support has more to do with how it's being used. Do you think you can rewrite the first sentence above in gramatically correct English please, I'm failing to understand what you're saying. -- FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net. -- 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
[RFC/PATCH-v4.2-rc6 5/5] arm: omap2: board-generic: use omap4_local_timer_init for AM437x
AM437x-based boards, can use omap4_local_timer_init() just fine. Let's use that instead. Signed-off-by: Felipe Balbi ba...@ti.com --- arch/arm/mach-omap2/board-generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index 34ff14b7beab..8acb3b4c84e3 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c @@ -279,7 +279,7 @@ DT_MACHINE_START(AM43_DT, Generic AM43 (Flattened Device Tree)) .init_late = am43xx_init_late, .init_irq = omap_gic_of_init, .init_machine = omap_generic_init, - .init_time = omap3_gptimer_timer_init, + .init_time = omap4_local_timer_init, .dt_compat = am43_boards_compat, .restart= omap44xx_restart, MACHINE_END -- 2.5.0 -- 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
[RFC/PATCH-v4.2-rc6 2/5] arm: boot: dts: am4372: add ARM timers and SCU nodes
AM437x devices sport SCU, TWD and Global timers, let's add them to DTS so they have a chance to probe and be used by Linux. Signed-off-by: Felipe Balbi ba...@ti.com --- arch/arm/boot/dts/am4372.dtsi | 21 + 1 file changed, 21 insertions(+) diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi index ade28c790f4b..08bcdc8f0b6f 100644 --- a/arch/arm/boot/dts/am4372.dtsi +++ b/arch/arm/boot/dts/am4372.dtsi @@ -59,6 +59,27 @@ interrupt-parent = gic; }; + scu: scu@4824 { + compatible = arm,cortex-a9-scu; + reg = 0x4824 0x100; + }; + + global_timer: timer@48240200 { + compatible = arm,cortex-a9-global-timer; + reg = 0x48240200 0x100; + interrupts = GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH; + interrupt-parent = gic; + clocks = dpll_mpu_m2_ck; + }; + + local_timer: timer@48240600 { + compatible = arm,cortex-a9-twd-timer; + reg = 0x48240600 0x100; + interrupts = GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH; + interrupt-parent = gic; + clocks = dpll_mpu_m2_ck; + }; + l2-cache-controller@48242000 { compatible = arm,pl310-cache; reg = 0x48242000 0x1000; -- 2.5.0 -- 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
[RFC/PATCH-v4.2-rc6 0/5] arm: am437x: use TWD/Global timers
Hi, with these patches AM437x devices can use TWD/global timers. At least TWD is now used as sched_clock() which gives better latency as seen below. Keep in mind that while I ran cyclictest to have a feel for avg latency this test was not against an RT kernel, so results should be taken with a grain of salt. Also, I'm not 100% sure clock rate is correct. According to TRM, this timer should run as MPU_CLK/2 which would be 1GHz / 2 = 500MHz, but even though I'm using dpll_mpu_m2_ck clock, it still shows as 1000MHz. Are there any other tests I could/should run ? BTW, I boot-tested on AM4372 with and without 'nosmp' on cmdline. pre-patch: T: 0 ( 245) P:95 I:1000 C: 9995 Min: 24 Act: 31 Avg: 36 Max: 596 post-patch: T: 0 ( 253) P:95 I:1000 C: 9995 Min: 10 Act: 12 Avg: 14 Max: 68 Felipe Balbi (5): Revert ARM: 7655/1: smp_twd: make twd_local_timer_of_register() no-op for nosmp arm: boot: dts: am4372: add ARM timers and SCU nodes arm: omap2: Kconfig: select TWD and global timer on AM43xx devices arm: omap2: timer: simplify omap4_local_timer_init() arm: omap2: board-generic: use omap4_local_timer_init for AM437x arch/arm/boot/dts/am4372.dtsi | 21 + arch/arm/kernel/smp_twd.c | 4 arch/arm/mach-omap2/Kconfig | 3 +++ arch/arm/mach-omap2/board-generic.c | 2 +- arch/arm/mach-omap2/timer.c | 16 5 files changed, 29 insertions(+), 17 deletions(-) -- 2.5.0 -- 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
[RFC/PATCH-v4.2-rc6 4/5] arm: omap2: timer: simplify omap4_local_timer_init()
all users of omap4_local_timer_init() are already DT-only, so we can remove the check for having DTB or not. While at that, fix a typo in comment. Signed-off-by: Felipe Balbi ba...@ti.com --- arch/arm/mach-omap2/timer.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index cac46d852da1..88d39f98e7ff 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c @@ -649,23 +649,15 @@ static OMAP_SYS_32K_TIMER_INIT(4, 1, timer_32k_ck, ti,timer-alwon, #ifdef CONFIG_ARCH_OMAP4 #ifdef CONFIG_HAVE_ARM_TWD -static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, OMAP44XX_LOCAL_TWD_BASE, 29); void __init omap4_local_timer_init(void) { omap4_sync32k_timer_init(); - /* Local timers are not supprted on OMAP4430 ES1.0 */ - if (omap_rev() != OMAP4430_REV_ES1_0) { - int err; - if (of_have_populated_dt()) { - clocksource_of_init(); - return; - } + /* Local timers are not supported on OMAP4430 ES1.0 */ + if (omap_rev() == OMAP4430_REV_ES1_0) + return; - err = twd_local_timer_register(twd_local_timer); - if (err) - pr_err(twd_local_timer_register failed %d\n, err); - } + clocksource_of_init(); } #else void __init omap4_local_timer_init(void) -- 2.5.0 -- 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
[RFC/PATCH-v4.2-rc6 3/5] arm: omap2: Kconfig: select TWD and global timer on AM43xx devices
Make sure to tell the kernel that AM437x has TWD and global timers. Signed-off-by: Felipe Balbi ba...@ti.com --- arch/arm/mach-omap2/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 4a023e8d1bdb..eea902280989 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -61,6 +61,9 @@ config SOC_AM43XX select MACH_OMAP_GENERIC select MIGHT_HAVE_CACHE_L2X0 select HAVE_ARM_SCU + select HAVE_ARM_TWD + select ARM_GLOBAL_TIMER + select CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK config SOC_DRA7XX bool TI DRA7XX -- 2.5.0 -- 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
[RFC/PATCH-v4.2-rc6 1/5] Revert ARM: 7655/1: smp_twd: make twd_local_timer_of_register() no-op for nosmp
This reverts commit 904464b91eca8c665acea033489225af02eeb75a. The problem pointed out by commit 904464b91eca (ARM: 7655/1: smp_twd: make twd_local_timer_of_register() no-op for nosmp) doesn't exist anymore. We can safely boot with nosmp and the warning won't show up. The other side benefit of this patch is that TWD has a chance to probe on single-core A9 systems such as AM437x which sport TWD. Cc: Shawn Guo shawn@linaro.org Cc: Dirk Behme dirk.be...@de.bosch.com Cc: Russell King rmk+ker...@arm.linux.org.uk Signed-off-by: Felipe Balbi ba...@ti.com --- arch/arm/kernel/smp_twd.c | 4 1 file changed, 4 deletions(-) diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c index 172c6a05d27f..e8f6d241881f 100644 --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c @@ -23,7 +23,6 @@ #include linux/of_irq.h #include linux/of_address.h -#include asm/smp_plat.h #include asm/smp_twd.h /* set up by the platform code */ @@ -388,9 +387,6 @@ static void __init twd_local_timer_of_register(struct device_node *np) { int err; - if (!is_smp() || !setup_max_cpus) - return; - twd_ppi = irq_of_parse_and_map(np, 0); if (!twd_ppi) { err = -EINVAL; -- 2.5.0 -- 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 16/27] mfd: Export OF module alias information in missing drivers
On Thu, 30 Jul 2015, Javier Martinez Canillas wrote: The I2C core always reports the MODALIAS uevent as i2c:client name regardless if the driver was matched using the I2C id_table or the of_match_table. So technically there's no need for a driver to export the OF table since currently it's not used. In fact, the I2C device ID table is mandatory for I2C drivers since a i2c_device_id is passed to the driver's probe function even if the I2C core used the OF table to match the driver. And since the I2C core uses different tables, OF-only drivers needs to have duplicated data that has to be kept in sync and also the dev node compatible manufacturer prefix is stripped when reporting the MODALIAS. To avoid the above, the I2C core behavior may be changed in the future to not require an I2C device table for OF-only drivers and report the OF module alias. So, it's better to also export the OF table to prevent breaking module autoloading if that happens. Signed-off-by: Javier Martinez Canillas jav...@osg.samsung.com --- drivers/mfd/rt5033.c | 1 + drivers/mfd/tps65217.c | 1 + drivers/mfd/tps65218.c | 1 + 3 files changed, 3 insertions(+) Applied, thanks. diff --git a/drivers/mfd/rt5033.c b/drivers/mfd/rt5033.c index db395a6c52bc..d60f91619c4a 100644 --- a/drivers/mfd/rt5033.c +++ b/drivers/mfd/rt5033.c @@ -124,6 +124,7 @@ static const struct of_device_id rt5033_dt_match[] = { { .compatible = richtek,rt5033, }, { } }; +MODULE_DEVICE_TABLE(of, rt5033_dt_match); static struct i2c_driver rt5033_driver = { .driver = { diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c index bc455feb42be..55add0453ae9 100644 --- a/drivers/mfd/tps65217.c +++ b/drivers/mfd/tps65217.c @@ -156,6 +156,7 @@ static const struct of_device_id tps65217_of_match[] = { { .compatible = ti,tps65217, .data = (void *)TPS65217 }, { /* sentinel */ }, }; +MODULE_DEVICE_TABLE(of, tps65217_of_match); static int tps65217_probe(struct i2c_client *client, const struct i2c_device_id *ids) diff --git a/drivers/mfd/tps65218.c b/drivers/mfd/tps65218.c index cb38d725250f..80b9dc363cd8 100644 --- a/drivers/mfd/tps65218.c +++ b/drivers/mfd/tps65218.c @@ -211,6 +211,7 @@ static const struct of_device_id of_tps65218_match_table[] = { { .compatible = ti,tps65218, }, {} }; +MODULE_DEVICE_TABLE(of, of_tps65218_match_table); static int tps65218_probe(struct i2c_client *client, const struct i2c_device_id *ids) -- 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-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 1/3] tty: serial: 8250_omap: do not use RX DMA if pause is not supported
On 08/10/2015 07:54 AM, Peter Ujfalusi wrote: On 08/07/2015 11:00 PM, Sebastian Andrzej Siewior wrote: I don't think this is good thing for the stable _and_ for the mainline at the same time: in stable the rx DMA should not be allowed since the stable kernels does not allow pause/resume with omap-dma, so there the rx DMA should be just disabled for UART. This change will cause regression since it introduce a WARN_ON_ONCE, which will be printed if the user tries to use non working feature. In mainline you will eventually going to have pause/resume support so this patch will make no sense there. No, the whole point of this mess is that omap-dma does not provide pause/resume support (without data loss). omap-dma will only be suitable for pause/terminate dma. And adding pause support doesn't address the underlying problem that dmaengine is not providing a means of determining if suitable support is available for use by serial drivers, so this same problem is just waiting to happen again. I think the way forward is, For -stable, disable dma in the 8250_omap driver. Then for mainline, * extend the dma_get_slave_caps() api to differentiate the types of pause support * query dma_get_slave_caps() when setting up the slave channel in 8250_dma 8250_omap and only enable dma if suitable pause support is available * add required dmaengine error checking in 8250_dma 8250_omap _for unexpected errors_ (so _not_ WARNs) * do whatever with omap-dma. Not even sure it's worth trying to support dma with that; it still won't fully support tx dma which is forcing all kinds of goofy workarounds Russell seemed to think that the current dma operation was necessary information to differentiate types of pause support, but I don't think that's required. As Sebastian's omap-dma driver patch shows, partial pause support has more to do with how it's being used. Regards, Peter Hurley -- 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 v4 1/2] extcon: palmas: Support GPIO based USB ID detection
On Mon, 03 Aug 2015, Roger Quadros wrote: Some palmas based chip variants do not have OTG based ID logic. For these variants we rely on GPIO based USB ID detection. These chips do have VBUS comparator for VBUS detection so we continue to use the old way of detecting VBUS. Acked-by: Chanwoo Choi cw00.c...@samsung.com Signed-off-by: Roger Quadros rog...@ti.com --- v4: updated gpio debounce logic to use delayed_workqueue. .../devicetree/bindings/extcon/extcon-palmas.txt | 5 +- drivers/extcon/extcon-palmas.c | 129 ++--- drivers/extcon/extcon-usb-gpio.c | 1 + include/linux/mfd/palmas.h | 7 ++ 4 files changed, 126 insertions(+), 16 deletions(-) Acked-by: Lee Jones lee.jo...@linaro.org diff --git a/Documentation/devicetree/bindings/extcon/extcon-palmas.txt b/Documentation/devicetree/bindings/extcon/extcon-palmas.txt index 45414bb..f61d5af 100644 --- a/Documentation/devicetree/bindings/extcon/extcon-palmas.txt +++ b/Documentation/devicetree/bindings/extcon/extcon-palmas.txt @@ -10,8 +10,11 @@ Required Properties: Optional Properties: - ti,wakeup : To enable the wakeup comparator in probe - - ti,enable-id-detection: Perform ID detection. + - ti,enable-id-detection: Perform ID detection. If id-gpio is specified + it performs id-detection using GPIO else using OTG core. - ti,enable-vbus-detection: Perform VBUS detection. + - id-gpio: gpio for GPIO ID detection. See gpio binding. + - debounce-delay-ms: debounce delay for GPIO ID pin in milliseconds. palmas-usb { compatible = ti,twl6035-usb, ti,palmas-usb; diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c index 8933e7e..662e917 100644 --- a/drivers/extcon/extcon-palmas.c +++ b/drivers/extcon/extcon-palmas.c @@ -28,6 +28,10 @@ #include linux/mfd/palmas.h #include linux/of.h #include linux/of_platform.h +#include linux/of_gpio.h +#include linux/workqueue.h + +#define USB_GPIO_DEBOUNCE_MS 20 /* ms */ static const unsigned int palmas_extcon_cable[] = { EXTCON_USB, @@ -118,19 +122,54 @@ static irqreturn_t palmas_id_irq_handler(int irq, void *_palmas_usb) return IRQ_HANDLED; } +static void palmas_gpio_id_detect(struct work_struct *work) +{ + int id; + struct palmas_usb *palmas_usb = container_of(to_delayed_work(work), + struct palmas_usb, + wq_detectid); + struct extcon_dev *edev = palmas_usb-edev; + + if (!palmas_usb-id_gpiod) + return; + + id = gpiod_get_value_cansleep(palmas_usb-id_gpiod); + + if (id) { + extcon_set_cable_state_(edev, EXTCON_USB_HOST, false); + dev_info(palmas_usb-dev, USB-HOST cable is detached\n); + } else { + extcon_set_cable_state_(edev, EXTCON_USB_HOST, true); + dev_info(palmas_usb-dev, USB-HOST cable is attached\n); + } +} + +static irqreturn_t palmas_gpio_id_irq_handler(int irq, void *_palmas_usb) +{ + struct palmas_usb *palmas_usb = _palmas_usb; + + queue_delayed_work(system_power_efficient_wq, palmas_usb-wq_detectid, +palmas_usb-sw_debounce_jiffies); + + return IRQ_HANDLED; +} + static void palmas_enable_irq(struct palmas_usb *palmas_usb) { palmas_write(palmas_usb-palmas, PALMAS_USB_OTG_BASE, PALMAS_USB_VBUS_CTRL_SET, PALMAS_USB_VBUS_CTRL_SET_VBUS_ACT_COMP); - palmas_write(palmas_usb-palmas, PALMAS_USB_OTG_BASE, - PALMAS_USB_ID_CTRL_SET, PALMAS_USB_ID_CTRL_SET_ID_ACT_COMP); + if (palmas_usb-enable_id_detection) { + palmas_write(palmas_usb-palmas, PALMAS_USB_OTG_BASE, + PALMAS_USB_ID_CTRL_SET, + PALMAS_USB_ID_CTRL_SET_ID_ACT_COMP); - palmas_write(palmas_usb-palmas, PALMAS_USB_OTG_BASE, - PALMAS_USB_ID_INT_EN_HI_SET, - PALMAS_USB_ID_INT_EN_HI_SET_ID_GND | - PALMAS_USB_ID_INT_EN_HI_SET_ID_FLOAT); + palmas_write(palmas_usb-palmas, PALMAS_USB_OTG_BASE, + PALMAS_USB_ID_INT_EN_HI_SET, + PALMAS_USB_ID_INT_EN_HI_SET_ID_GND | + PALMAS_USB_ID_INT_EN_HI_SET_ID_FLOAT); + } if (palmas_usb-enable_vbus_detection) palmas_vbus_irq_handler(palmas_usb-vbus_irq, palmas_usb); @@ -169,20 +208,36 @@ static int palmas_usb_probe(struct platform_device *pdev) palmas_usb-wakeup = pdata-wakeup; } + palmas_usb-id_gpiod = devm_gpiod_get_optional(pdev-dev, id); + if (IS_ERR(palmas_usb-id_gpiod)) { + dev_err(pdev-dev, failed to get id gpio\n); + return PTR_ERR(palmas_usb-id_gpiod); + } + + if
Re: [PATCH v2 0/2] OMAPDSS: Fix of-node refcount issues
On 07/08/15 14:04, Jyri Sarha wrote: Changes since the first version: - Fix commit descriptions and subject according to Tomi's comments I found couple of refcounting issues related to OMAP DSS of-node handling. Second patch should fix the ERROR: Bad of_node_put() on /encoder@0/ports/port@1 -problem. In the long run it would make sense start using of_graph_*() functions in OMAP DSS too. However the semantics of of_graph_*() functions are quite different from omapdss_of_*() counterparts. So it better to just fix these bugs first. Jyri Sarha (2): OMAPDSS: Fix node refcount leak in omapdss_of_get_next_port() OMAPDSS: Fix omap_dss_find_output_by_port_node() port refcount decrement drivers/video/fbdev/omap2/dss/dss-of.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Thanks, I've picked these up for 4.2 fixes. Tomi signature.asc Description: OpenPGP digital signature
[PATCH v2 5/6] ARM: AM43XX: HWMOD: Add rtc hwmod
The patch adds rtc hwmod. This is present on gp and sk evm and not on epos evm. Hence adding it selectively using a seprate list. Signed-off-by: Keerthy j-keer...@ti.com --- arch/arm/mach-omap2/omap_hwmod_43xx_data.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c index 215d5ef..a0850b9 100644 --- a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c @@ -21,7 +21,7 @@ #include prcm43xx.h #include omap_hwmod_common_data.h #include hdq1w.h - +#include soc.h /* IP blocks */ static struct omap_hwmod am43xx_emif_hwmod = { @@ -1020,9 +1020,21 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = { NULL, }; +static struct omap_hwmod_ocp_if *am43xx_rtc_hwmod_ocp_ifs[] __initdata = { + am33xx_l4_wkup__rtc, + NULL, +}; + int __init am43xx_hwmod_init(void) { + int ret; + omap_hwmod_am43xx_reg(); omap_hwmod_init(); - return omap_hwmod_register_links(am43xx_hwmod_ocp_ifs); + ret = omap_hwmod_register_links(am43xx_hwmod_ocp_ifs); + + if (!soc_is_am438x()) + ret = omap_hwmod_register_links(am43xx_rtc_hwmod_ocp_ifs); + + return ret; } -- 1.9.1 -- 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
[PATCH v2 6/6] ARM: dts: AM437X-GP-EVM: Enable rtc
Enables rtc. RTC can be used to wake up system from suspend when used with external clock source. Signed-off-by: Keerthy j-keer...@ti.com --- arch/arm/boot/dts/am437x-gp-evm.dts | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/am437x-gp-evm.dts b/arch/arm/boot/dts/am437x-gp-evm.dts index 215775d..1c897be 100644 --- a/arch/arm/boot/dts/am437x-gp-evm.dts +++ b/arch/arm/boot/dts/am437x-gp-evm.dts @@ -941,3 +941,7 @@ tx-num-evt = 32; rx-num-evt = 32; }; + +rtc { + status = okay; +}; -- 1.9.1 -- 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
[PATCH v2 4/6] ARM: dts: am43x-epos-evm: Add the am438 compatible string
The SoCs on am43x-epos-evm are named am438x. Hence add the compatiblity string and remove the am4372 string. Signed-off-by: Keerthy j-keer...@ti.com --- arch/arm/boot/dts/am43x-epos-evm.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/am43x-epos-evm.dts b/arch/arm/boot/dts/am43x-epos-evm.dts index 86c2dfb..7e473c2 100644 --- a/arch/arm/boot/dts/am43x-epos-evm.dts +++ b/arch/arm/boot/dts/am43x-epos-evm.dts @@ -18,7 +18,7 @@ / { model = TI AM43x EPOS EVM; - compatible = ti,am43x-epos-evm,ti,am4372,ti,am43; + compatible = ti,am43x-epos-evm,ti,am438x,ti,am43; aliases { display0 = lcd0; -- 1.9.1 -- 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
[PATCH v2 0/6] ARM: AM4372: Enable RTC
The series brings multiple fixes needed to get rtc ticking on am437x-gp-evm. This is tested on top of omap-for-v4.3/dt-v2 branch. Boot tested on AM437X-GP-EVM also tested rtc ticking via sysfs nodes. The series is on top of this patch: http://comments.gmane.org/gmane.linux.drivers.devicetree/131026 Keerthy (6): ARM: dts: AM43XX: Add clk_32k_rtc node rtc: omap: Add external clock enabling support ARM: AM43xx: Introduce a separate soc_is function for am438x series of SoCs ARM: dts: am43x-epos-evm: Add the am438 compatible string ARM: AM43XX: HWMOD: Add rtc hwmod ARM: dts: AM437X-GP-EVM: Enable rtc Changes in v2: * Couple of patches already pulled in. * Removed dt ext-clk-src and made use of clocks property to determine presence of external clock source. .../devicetree/bindings/arm/omap/omap.txt | 3 +++ arch/arm/boot/dts/am4372.dtsi | 2 ++ arch/arm/boot/dts/am437x-gp-evm.dts| 4 +++ arch/arm/boot/dts/am43x-epos-evm.dts | 2 +- arch/arm/boot/dts/am43xx-clocks.dtsi | 6 + arch/arm/mach-omap2/board-generic.c| 1 + arch/arm/mach-omap2/id.c | 2 ++ arch/arm/mach-omap2/omap_hwmod_43xx_data.c | 16 ++-- arch/arm/mach-omap2/soc.h | 7 +++-- drivers/rtc/rtc-omap.c | 30 ++ 10 files changed, 68 insertions(+), 5 deletions(-) -- 1.9.1 -- 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
[PATCH v2 3/6] ARM: AM43xx: Introduce a separate soc_is function for am438x series of SoCs
EPOS evms are fitted with a separate family of am43xx SoCs and are named am438x series. Adding a separate soc_is function to identify that particular series of SoCs. This can be done to avoid unnecessarily registering hwmods like rtc when not needed on EPOS evms. Signed-off-by: Keerthy j-keer...@ti.com --- Documentation/devicetree/bindings/arm/omap/omap.txt | 3 +++ arch/arm/mach-omap2/board-generic.c | 1 + arch/arm/mach-omap2/id.c| 2 ++ arch/arm/mach-omap2/soc.h | 7 +-- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt index 9f4e513..4269c13 100644 --- a/Documentation/devicetree/bindings/arm/omap/omap.txt +++ b/Documentation/devicetree/bindings/arm/omap/omap.txt @@ -100,6 +100,9 @@ SoCs: - AM4372 compatible = ti,am4372, ti,am43 +- AM438x + compatible = ti,am438x, ti,am43 + Boards: - OMAP3 BeagleBoard : Low cost community board diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index 34ff14b..3d70d6a 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c @@ -266,6 +266,7 @@ MACHINE_END #ifdef CONFIG_SOC_AM43XX static const char *const am43_boards_compat[] __initconst = { ti,am4372, + ti,am438x, ti,am43, NULL, }; diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index e3f713f..1bab9f5 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -228,6 +228,8 @@ static void __init omap3_cpuinfo(void) cpu_name = AM335X; } else if (soc_is_am437x()) { cpu_name = AM437x; + } else if (soc_is_am438x()) { + cpu_name = AM438X; } else if (cpu_is_ti814x()) { cpu_name = TI814X; } else if (omap3_has_iva() omap3_has_sgx()) { diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h index f97654d..feb27fd 100644 --- a/arch/arm/mach-omap2/soc.h +++ b/arch/arm/mach-omap2/soc.h @@ -238,6 +238,7 @@ IS_AM_SUBCLASS(437x, 0x437) #define soc_is_am335x()0 #define soc_is_am43xx()0 #define soc_is_am437x()0 +#define soc_is_am438x()0 #define cpu_is_omap44xx() 0 #define cpu_is_omap443x() 0 #define cpu_is_omap446x() 0 @@ -371,8 +372,10 @@ IS_OMAP_TYPE(3430, 0x3430) #ifdef CONFIG_SOC_AM43XX # undef soc_is_am43xx # undef soc_is_am437x -# define soc_is_am43xx() is_am43xx() -# define soc_is_am437x() is_am437x() +# undef soc_is_am438x +# define soc_is_am43xx() of_machine_is_compatible(ti,am43) +# define soc_is_am437x() of_machine_is_compatible(ti,am4372) +# define soc_is_am438x() of_machine_is_compatible(ti,am438x) #endif # if defined(CONFIG_ARCH_OMAP4) -- 1.9.1 -- 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
[PATCH v2 1/6] ARM: dts: AM43XX: Add clk_32k_rtc node
Add the clk_32k_rtc this is the external clock source for the rtc. Signed-off-by: Keerthy j-keer...@ti.com --- arch/arm/boot/dts/am43xx-clocks.dtsi | 6 ++ drivers/clk/ti/clk-43xx.c| 1 + 2 files changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/am43xx-clocks.dtsi b/arch/arm/boot/dts/am43xx-clocks.dtsi index d0c0dfa..31f1d96 100644 --- a/arch/arm/boot/dts/am43xx-clocks.dtsi +++ b/arch/arm/boot/dts/am43xx-clocks.dtsi @@ -159,6 +159,12 @@ clock-frequency = 32768; }; + clk_32k_rtc: clk_32k_rtc { + #clock-cells = 0; + compatible = fixed-clock; + clock-frequency = 32768; + }; + clk_rc32k_ck: clk_rc32k_ck { #clock-cells = 0; compatible = fixed-clock; diff --git a/drivers/clk/ti/clk-43xx.c b/drivers/clk/ti/clk-43xx.c index 3795fce..af393c2 100644 --- a/drivers/clk/ti/clk-43xx.c +++ b/drivers/clk/ti/clk-43xx.c @@ -22,6 +22,7 @@ static struct ti_dt_clk am43xx_clks[] = { DT_CLK(NULL, clk_32768_ck, clk_32768_ck), DT_CLK(NULL, clk_rc32k_ck, clk_rc32k_ck), + DT_CLK(NULL, clk_32k_rtc, clk_32k_rtc), DT_CLK(NULL, virt_1920_ck, virt_1920_ck), DT_CLK(NULL, virt_2400_ck, virt_2400_ck), DT_CLK(NULL, virt_2500_ck, virt_2500_ck), -- 1.9.1 -- 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
[PATCH v2 2/6] rtc: omap: Add external clock enabling support
Switch to external clock source during suspend and switch back to internal source on resume. This helps rtc ticking across suspend. Signed-off-by: Keerthy j-keer...@ti.com --- arch/arm/boot/dts/am4372.dtsi | 2 ++ drivers/rtc/rtc-omap.c| 31 +++ 2 files changed, 33 insertions(+) diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi index d99b2ee..756819f 100644 --- a/arch/arm/boot/dts/am4372.dtsi +++ b/arch/arm/boot/dts/am4372.dtsi @@ -336,6 +336,8 @@ interrupts = GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH; ti,hwmods = rtc; + clocks = clk_32768_ck, clk_32k_rtc; + clock-names = int-clk, ext-clk; status = disabled; }; diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c index 8b6355f..cfc8558 100644 --- a/drivers/rtc/rtc-omap.c +++ b/drivers/rtc/rtc-omap.c @@ -25,6 +25,7 @@ #include linux/of_device.h #include linux/pm_runtime.h #include linux/io.h +#include linux/clk.h /* * The OMAP RTC is a year/month/day/hours/minutes/seconds BCD clock @@ -107,6 +108,7 @@ /* OMAP_RTC_OSC_REG bit fields: */ #define OMAP_RTC_OSC_32KCLK_EN BIT(6) +#define OMAP_RTC_OSC_SEL_32KCLK_SRCBIT(3) /* OMAP_RTC_IRQWAKEEN bit fields: */ #define OMAP_RTC_IRQWAKEEN_ALARM_WAKEENBIT(1) @@ -136,6 +138,7 @@ struct omap_rtc { int irq_timer; u8 interrupts_reg; bool is_pmic_controller; + bool has_ext_clk; const struct omap_rtc_device_type *type; }; @@ -525,6 +528,7 @@ static int omap_rtc_probe(struct platform_device *pdev) { struct omap_rtc *rtc; struct resource *res; + struct clk *ext_clk; u8 reg, mask, new_ctrl; const struct platform_device_id *id_entry; const struct of_device_id *of_id; @@ -553,6 +557,10 @@ static int omap_rtc_probe(struct platform_device *pdev) if (rtc-irq_alarm = 0) return -ENOENT; + ext_clk = devm_clk_get(pdev-dev, ext-clk); + if (!IS_ERR(ext_clk)) + rtc-has_ext_clk = true; + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); rtc-base = devm_ioremap_resource(pdev-dev, res); if (IS_ERR(rtc-base)) @@ -698,6 +706,7 @@ static int __exit omap_rtc_remove(struct platform_device *pdev) static int omap_rtc_suspend(struct device *dev) { struct omap_rtc *rtc = dev_get_drvdata(dev); + u8 reg; rtc-interrupts_reg = rtc_read(rtc, OMAP_RTC_INTERRUPTS_REG); @@ -711,6 +720,18 @@ static int omap_rtc_suspend(struct device *dev) enable_irq_wake(rtc-irq_alarm); else rtc_write(rtc, OMAP_RTC_INTERRUPTS_REG, 0); + + /* +* If we have the luxury of external clock then +* Switch to external clock so we can keep ticking +* acorss suspend +*/ + if (rtc-has_ext_clk) { + reg = rtc_read(rtc, OMAP_RTC_OSC_REG); + rtc_write(rtc, OMAP_RTC_OSC_REG, reg | + OMAP_RTC_OSC_SEL_32KCLK_SRC); + } + rtc-type-lock(rtc); /* Disable the clock/module */ @@ -722,6 +743,7 @@ static int omap_rtc_suspend(struct device *dev) static int omap_rtc_resume(struct device *dev) { struct omap_rtc *rtc = dev_get_drvdata(dev); + u8 reg; /* Enable the clock/module so that we can access the registers */ pm_runtime_get_sync(dev); @@ -731,6 +753,15 @@ static int omap_rtc_resume(struct device *dev) disable_irq_wake(rtc-irq_alarm); else rtc_write(rtc, OMAP_RTC_INTERRUPTS_REG, rtc-interrupts_reg); + /* +* Switch back to internal source +*/ + if (rtc-has_ext_clk) { + reg = rtc_read(rtc, OMAP_RTC_OSC_REG); + reg = ~OMAP_RTC_OSC_SEL_32KCLK_SRC; + rtc_write(rtc, OMAP_RTC_OSC_REG, reg); + } + rtc-type-lock(rtc); return 0; -- 1.9.1 -- 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 1/3] tty: serial: 8250_omap: do not use RX DMA if pause is not supported
On 08/07/2015 11:00 PM, Sebastian Andrzej Siewior wrote: The 8250-omap driver requires the DMA-engine driver to support the pause command in order to properly turn off programmed RX transfer before the driver stars manually reading from the FIFO. The lacking support of the requirement has been discovered recently. In order to stay safe here we disable support for RX-DMA as soon as we notice that it does not work. This should happen very early. If the user does not want to see this backtrace he can either disable DMA support (completely or RX-only) or backport the required patches for edma / omap-dma once they hit mainline. Cc: sta...@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250_omap.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c index 0340ee6ba970..07a11e0935e4 100644 --- a/drivers/tty/serial/8250/8250_omap.c +++ b/drivers/tty/serial/8250/8250_omap.c @@ -112,6 +112,7 @@ struct omap8250_priv { struct work_struct qos_work; struct uart_8250_dma omap8250_dma; spinlock_t rx_dma_lock; + bool rx_dma_broken; }; static u32 uart_read(struct uart_8250_port *up, u32 reg) @@ -761,6 +762,7 @@ static void omap_8250_rx_dma_flush(struct uart_8250_port *p) struct omap8250_priv*priv = p-port.private_data; struct uart_8250_dma*dma = p-dma; unsigned long flags; + int ret; spin_lock_irqsave(priv-rx_dma_lock, flags); @@ -769,7 +771,9 @@ static void omap_8250_rx_dma_flush(struct uart_8250_port *p) return; } - dmaengine_pause(dma-rxchan); + ret = dmaengine_pause(dma-rxchan); + if (WARN_ON_ONCE(ret)) + priv-rx_dma_broken = true; I don't think this is good thing for the stable _and_ for the mainline at the same time: in stable the rx DMA should not be allowed since the stable kernels does not allow pause/resume with omap-dma, so there the rx DMA should be just disabled for UART. This change will cause regression since it introduce a WARN_ON_ONCE, which will be printed if the user tries to use non working feature. In mainline you will eventually going to have pause/resume support so this patch will make no sense there. spin_unlock_irqrestore(priv-rx_dma_lock, flags); @@ -813,6 +817,9 @@ static int omap_8250_rx_dma(struct uart_8250_port *p, unsigned int iir) break; } + if (priv-rx_dma_broken) + return -EINVAL; + spin_lock_irqsave(priv-rx_dma_lock, flags); if (dma-rx_running) -- 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: [PATCH 1/3] tty: serial: 8250_omap: do not use RX DMA if pause is not supported
On 08/10/2015 01:54 PM, Peter Ujfalusi wrote: diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c index 0340ee6ba970..07a11e0935e4 100644 --- a/drivers/tty/serial/8250/8250_omap.c @@ -769,7 +771,9 @@ static void omap_8250_rx_dma_flush(struct uart_8250_port *p) return; } -dmaengine_pause(dma-rxchan); +ret = dmaengine_pause(dma-rxchan); +if (WARN_ON_ONCE(ret)) +priv-rx_dma_broken = true; I don't think this is good thing for the stable _and_ for the mainline at the same time: in stable the rx DMA should not be allowed since the stable kernels does not allow pause/resume with omap-dma, so there the rx DMA should be just disabled for UART. This change will cause regression since it introduce a WARN_ON_ONCE, which will be printed if the user tries to use non working feature. Okay. We do have pause support in mainline for edma since v4.2-rc1. This driver can use edma or sdma depending on the configuration. But it is not yet released. So you suggest remove RX-DMA support completely from the 8250-omap, mark it stable, and revert that patch once we have it fixed in sdma? In mainline you will eventually going to have pause/resume support so this patch will make no sense there. The way this works is that it has to be fixed upstream before it can be backported stable. Also Russell made clear (for a good reason) that the RX problem has to be fixed upstream before he thinks about acking the SDMA patch. So if you prefer to instead remove RX-DMA until it is fixed, I am all yours. Sebastian -- 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