Re: OMAP3 migrating: partition / clock
Hello Arno, On Thu, 4 Feb 2010, Arno Steffen wrote: I am trying to migrate from kernel 28 to 32 on TI OMA3. Our board is derived from EVM board. ... Also I do get this warning now while boot: Hierarchical RCU implementation. NR_IRQS:368 Clocking rate (Crystal/Core/MPU): 12.0/332/500 MHz I don't have an 3530 EVM here, but I'd assume this is one difference between your board and the EVM, since TI usually seems to build boards with 26MHz HF clock (resulting in a 13MHz sys_clk). [ cut here ] WARNING: at arch/arm/mach-omap2/clock34xx.c:773 omap3_noncore_dpll_set_rate+0x280/0x2c4() The above lines tell you exactly where to find the code that's emitting the warning. In this case, the problem is that the DPLL rate rounding code picked DPLL parameters that resulted in an invalid jitter correction value (from _omap3_dpll_compute_freqsel()). The caller is presumably omap3_clk_lock_dpll5() in clock34xx.c, which probably got inlined which is why it isn't showing up specifically in the backtrace. I'd first suggest confirming this by changing the '#undef DEBUG' to '#define DEBUG' in clock34xx.c and mach-omap2/clock.c, rebuilding, and sending along the output. If the above hypothesis is confirmed, and the problem is not due to some other bug in the code, it might be necessary to call _omap3_dpll_compute_freqsel() to test the freqsel value in _dpll_test_mult(), and reject values that result in an invalid freqsel. Modules linked in: [c002a924] (unwind_backtrace+0x0/0xdc) from [c0049e74] (warn_slowpath_common+0x48/0x60) [c0049e74] (warn_slowpath_common+0x48/0x60) from [c0033d30] (omap3_noncore_dpll_set_rate+0x280/0x2c4) [c0033d30] (omap3_noncore_dpll_set_rate+0x280/0x2c4) from [c0031674] (omap2_clk_set_rate+0x20/0x2c) [c0031674] (omap2_clk_set_rate+0x20/0x2c) from [c003494c] (clk_set_rate+0x4c/0xb0) [c003494c] (clk_set_rate+0x4c/0xb0) from [c000e980] (omap2_clk_init+0x124/0x1a0) [c000e980] (omap2_clk_init+0x124/0x1a0) from [c000d6ec] (omap2_init_common_hw+0x4c/0xe0) [c000d6ec] (omap2_init_common_hw+0x4c/0xe0) from [c000ead8] (omap3_evm_init_irq+0x28/0x94) [c000ead8] (omap3_evm_init_irq+0x28/0x94) from [c000b1b0] (init_IRQ+0x30/0x40) [c000b1b0] (init_IRQ+0x30/0x40) from [c0008978] (start_kernel+0x140/0x29c) [c0008978] (start_kernel+0x140/0x29c) from [80008034] (0x80008034) ---[ end trace 1b75b31a2719ed1c ]--- Reprogramming SDRC clock to 33200 Hz GPMC revision 5.0 Do you know the reason and how to solve it? Thanks regards Arno - Paul -- 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 3/3] OMAP3: PM: Wakeup from TWL4030 keypad with OFF mode
-Original Message- From: Kevin Hilman [mailto:khil...@deeprootsystems.com] Sent: Friday, February 05, 2010 3:22 AM To: Premi, Sanjeev Cc: linux-omap@vger.kernel.org Subject: Re: [PATCH 3/3] OMAP3: PM: Wakeup from TWL4030 keypad with OFF mode Sanjeev Premi pr...@ti.com writes: This patch allows wakeup from TWL4030 keypad when OFF mode is hit during suspend. Tested on OMAP3EVM. Signed-off-by: Sanjeev Premi pr...@ti.com The idea here looks good, but there is nothing realy EVM specific here AFAICT, and this exact code could be used on any other board using the T2 keypad, right? How about a common location? [sp] The EVM uses SYS_NIRQ for hooking up with the T2 keypad. Not sure of everyone would be doing so. Also, PADCONFs are more applicable for OMAP3, but T2 can be used with other processors as well... I did initially inplement these functions in: drivers/input/keyboard/twl4030_keypad.c ...but then moved to board specific file. Also, after looking at this patch, I think the 'void *pstate' member of struct twl4030_keypad_data should be renamed to 'void *data' to be more clear that it's just a pointer. [sp] Will make the change. However, will wait for your response on the earlier comment before re-submit. ~sanjeev Kevin [snip]--[snip] -- 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/RFC 4/4] OMAP2/3 MMC: initial conversion to runtime PM
Kevin Hilman wrote: Convert the HSMMC driver to use the runtime PM layer. A notable aspect of this is that the use of the dev_attr data from the omap_hwmod allows the redaction of all of the integration-specific hacks inside this driver. Regulator control has not yet been converted; the driver still uses the platform_data set_power hook. In converting to runtime PM layer, the clock frameworks is no longer used for fclk and iclk. Instead, the runtime PM get and put functions are used. These result in calls into the OMAP runtime PM core which internally uses the omap_device API to disable/re-enable the device. (Note that the 2430 debounce clock is not currently handled here, only the fclk and iclk are managed.) In addition, the context_loss tracking has been removed from the driver and is now handled by omap_device + runtime PM core. The driver's -runtime_suspend() hook will be called before device is disabled, and the driver's -runtime_resume() hook will be called if context has been lost. Based on an initial conversion of this driver to use omap_device by by Paul Walmsely: http://marc.info/?l=linux-omapm=124419789124570w=2 and then converted to use runtime PM API instead of omap_device API. The omap_hsmmc driver has some hacks in this version to compensate for the fact that the main runtime PM core prevents runtime transitions during suspend. This prevens us from using common hooks for runtime PM and static PM. Current workaround is to hack in some extra put/get calls in the suspend/resume path while this issue is being discussed on linux-pm. Cc: Paul Walmsley p...@pwsan.com Signed-off-by: Kevin Hilman khil...@deeprootsystems.com --- arch/arm/mach-omap2/devices.c | 152 +-- arch/arm/mach-omap2/hsmmc.c | 12 +- arch/arm/plat-omap/include/plat/mmc.h |5 + drivers/mmc/host/omap_hsmmc.c | 226 +++-- 4 files changed, 176 insertions(+), 219 deletions(-) Why is PM runtime not simply PM? Can pm_runtime_put_sync() and pm_runtime_get_sync() have less obscure names? snip -- 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] OMAP2/3 PM: Adding powerdomain APIs for reading the next logic and mem state
On Thu, 4 Feb 2010, Thara Gopinath wrote: This patch adds APIs pwrdm_read_logic_retst and pwrdm_read_mem_retst for reading the next programmed logic and memory state a powerdomain is to hit in event of the next power domain state being retention. Signed-off-by: Thara Gopinath th...@ti.com Cc: Paul Walmsley p...@pwsan.com Thanks, looks good Thara. Queued for 2.6.34. - Paul -- 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 2/3] OMAP3 PM: Defining .pwrsts_logic_ret field for core power domain structure
On Thu, 4 Feb 2010, Thara Gopinath wrote: This patch adds the flag .pwrsts_logic_ret info for the core power domain in the associated powerdomain structure. This flag specifies the states core domain logic can hit in event of the domain entering retention. Signed-off-by: Thara Gopinath th...@ti.com Cc: Paul Walmsley p...@pwsan.com Also queued for 2.6.34. - Paul -- 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 3/3] OMAP3 PM: Adding counters for power domain logic off and mem off during retention.
Hi Thara, On Thu, 4 Feb 2010, Thara Gopinath wrote: This patch adds counters to keep track of whether the powerdomain logic or software controllable memory banks are turned off when the power domain enters retention. During power domain retention if logic gets turned off, the scenario is known as Open Switch Retention. Also during retention s/w controllable memory banks of a power domain can be chosen to be kept in retention or off. This patch adds one counter per powerdomain to track the power domain logic state during retention. Number of memory bank state counters added depends on the number of software controllable memory banks of the powerdomain. To view these counters do cat ../debug/pm_debug/count Signed-off-by: Thara Gopinath th...@ti.com Cc: Paul Walmsley p...@pwsan.com I've moved the OSWR counter incrementing code out into its own function, and simplified the conditionals, both per Documentation/CodingStyle. Revised patch attached below. Could you please check this to confirm that it works as intended? - Paul From 3fe59666447821406068ee7f48aa7f1698e51a72 Mon Sep 17 00:00:00 2001 From: Thara Gopinath th...@ti.com Date: Thu, 4 Feb 2010 22:17:51 +0530 Subject: [PATCH] OMAP3 PM: Adding counters for power domain logic off and mem off during retention. This patch adds counters to keep track of whether the powerdomain logic or software controllable memory banks are turned off when the power domain enters retention. During power domain retention if logic gets turned off, the scenario is known as Open Switch Retention. Also during retention s/w controllable memory banks of a power domain can be chosen to be kept in retention or off. This patch adds one counter per powerdomain to track the power domain logic state during retention. Number of memory bank state counters added depends on the number of software controllable memory banks of the powerdomain. To view these counters do cat ../debug/pm_debug/count Signed-off-by: Thara Gopinath th...@ti.com [p...@pwsan.com: conditional expressions simplified; counter increment code moved to its own function] Signed-off-by: Paul Walmsley p...@pwsan.com --- arch/arm/mach-omap2/pm-debug.c|5 + arch/arm/mach-omap2/powerdomain.c | 25 + arch/arm/plat-omap/include/plat/powerdomain.h |2 ++ 3 files changed, 32 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c index 0ce356f..c18f7f2 100644 --- a/arch/arm/mach-omap2/pm-debug.c +++ b/arch/arm/mach-omap2/pm-debug.c @@ -385,6 +385,11 @@ static int pwrdm_dbg_show_counter(struct powerdomain *pwrdm, void *user) seq_printf(s, ,%s:%d, pwrdm_state_names[i], pwrdm-state_counter[i]); + seq_printf(s, ,RET-LOGIC-OFF:%d, pwrdm-ret_logic_off_counter); + for (i = 0; i pwrdm-banks; i++) + seq_printf(s, ,RET-MEMBANK%d-OFF:%d, i + 1, + pwrdm-ret_mem_off_counter[i]); + seq_printf(s, \n); return 0; diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index e9eeaa4..9a0fb38 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c @@ -125,6 +125,10 @@ static int _pwrdm_register(struct powerdomain *pwrdm) for (i = 0; i PWRDM_MAX_PWRSTS; i++) pwrdm-state_counter[i] = 0; + pwrdm-ret_logic_off_counter = 0; + for (i = 0; i pwrdm-banks; i++) + pwrdm-ret_mem_off_counter[i] = 0; + pwrdm_wait_transition(pwrdm); pwrdm-state = pwrdm_read_pwrst(pwrdm); pwrdm-state_counter[pwrdm-state] = 1; @@ -134,6 +138,25 @@ static int _pwrdm_register(struct powerdomain *pwrdm) return 0; } +static void _update_logic_membank_counters(struct powerdomain *pwrdm) +{ + int i; + u8 prev_logic_pwrst, prev_mem_pwrst; + + prev_logic_pwrst = pwrdm_read_prev_logic_pwrst(pwrdm); + if ((pwrdm-pwrsts_logic_ret == PWRSTS_OFF_RET) + (prev_logic_pwrst == PWRDM_POWER_OFF)) + pwrdm-ret_logic_off_counter++; + + for (i = 0; i pwrdm-banks; i++) { + prev_mem_pwrst = pwrdm_read_prev_mem_pwrst(pwrdm, i); + + if ((pwrdm-pwrsts_mem_ret[i] == PWRSTS_OFF_RET) + (prev_mem_pwrst == PWRDM_POWER_OFF)) + pwrdm-ret_mem_off_counter[i]++; + } +} + static int _pwrdm_state_switch(struct powerdomain *pwrdm, int flag) { @@ -153,6 +176,8 @@ static int _pwrdm_state_switch(struct powerdomain *pwrdm, int flag) prev = pwrdm_read_prev_pwrst(pwrdm); if (pwrdm-state != prev) pwrdm-state_counter[prev]++; + if (prev == PWRDM_POWER_RET) + _update_logic_membank_counters(pwrdm); break; default: return -EINVAL; diff --git
[PATCH 1/3] omap3evm: Add mux settings for keypad
This patch sets SYS_NIRQ for keypad input. It also sets the same as a wakeup event from OFF mode. Signed-off-by: Sanjeev Premi pr...@ti.com --- arch/arm/mach-omap2/board-omap3evm.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index fde27cf..19363bd 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c @@ -424,6 +424,10 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { #ifdef CONFIG_OMAP_MUX static struct omap_board_mux board_mux[] __initdata = { + OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP | + OMAP_PIN_OFF_INPUT_PULLUP | + OMAP_PIN_OFF_WAKEUPENABLE), + { .reg_offset = OMAP_MUX_TERMINATOR }, }; #else -- 1.6.2.2 -- 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 2/3] omap3evm: Fixes after moving to matrix_keypad
The keypad was not working properly after migrating to matrix_keypad. Swapped the row, col fields of the KEY() macro in the keymap definition to get it working again. Signed-off-by: Sanjeev Premi pr...@ti.com --- arch/arm/mach-omap2/board-omap3evm.c | 27 +++ 1 files changed, 15 insertions(+), 12 deletions(-) diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index 19363bd..c8e1208 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c @@ -258,20 +258,23 @@ static struct twl4030_usb_data omap3evm_usb_data = { static int board_keymap[] = { KEY(0, 0, KEY_LEFT), - KEY(0, 1, KEY_RIGHT), - KEY(0, 2, KEY_A), - KEY(0, 3, KEY_B), - KEY(1, 0, KEY_DOWN), + KEY(0, 1, KEY_DOWN), + KEY(0, 2, KEY_ENTER), + KEY(0, 3, KEY_M), + + KEY(1, 0, KEY_RIGHT), KEY(1, 1, KEY_UP), - KEY(1, 2, KEY_E), - KEY(1, 3, KEY_F), - KEY(2, 0, KEY_ENTER), - KEY(2, 1, KEY_I), + KEY(1, 2, KEY_I), + KEY(1, 3, KEY_N), + + KEY(2, 0, KEY_A), + KEY(2, 1, KEY_E), KEY(2, 2, KEY_J), - KEY(2, 3, KEY_K), - KEY(3, 0, KEY_M), - KEY(3, 1, KEY_N), - KEY(3, 2, KEY_O), + KEY(2, 3, KEY_O), + + KEY(3, 0, KEY_B), + KEY(3, 1, KEY_F), + KEY(3, 2, KEY_K), KEY(3, 3, KEY_P) }; -- 1.6.2.2 -- 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 3/3] omap3evm: Configure GPIO175 for touchscreen PEN_IRQ
GPIO175 is used for PEN_IRQ on the EVM. This patch sets the mux settings for the same. Signed-off-by: Sanjeev Premi pr...@ti.com --- arch/arm/mach-omap2/board-omap3evm.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index c8e1208..00bfe9b 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c @@ -430,7 +430,9 @@ static struct omap_board_mux board_mux[] __initdata = { OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE), - + OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP | + OMAP_PIN_OFF_INPUT_PULLUP | + OMAP_PIN_OFF_WAKEUPENABLE), { .reg_offset = OMAP_MUX_TERMINATOR }, }; #else -- 1.6.2.2 -- 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: [PATCHv2 1/4] Regulator: OMAP: Creating TWL4030 file having supplies init data
Hello Anuj, First of all, I liked the idea of unifying the regulator definitions for boards that use twl regulators. But I guess we need to improve a little bit. See following comments. On Tue, Jan 12, 2010 at 10:13:52AM +0100, ext Anuj Aggarwal wrote: A new file for TWL4030/TPS65950 is created which has common supplies and regulator init data structures. They will be referenced from the various board-evm files depending upon the EVM requirements, using the twl4030-pmic.h header file. Signed-off-by: Anuj Aggarwal anuj.aggar...@ti.com --- arch/arm/mach-omap2/twl4030-pmic.c | 175 arch/arm/mach-omap2/twl4030-pmic.h | 34 +++ 2 files changed, 209 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-omap2/twl4030-pmic.c create mode 100644 arch/arm/mach-omap2/twl4030-pmic.h diff --git a/arch/arm/mach-omap2/twl4030-pmic.c b/arch/arm/mach-omap2/twl4030-pmic.c new file mode 100644 index 000..0c0a860 --- /dev/null +++ b/arch/arm/mach-omap2/twl4030-pmic.c @@ -0,0 +1,175 @@ +/* + * twl4030-pmic.c + * + * Common regulator supplies and init data structs for TWL4030/TPS65950 + * PMIC for OMAP3 based EVMs. They can be used in various board-evm + * files for OMAP3 based platforms using TWL4030. + * + * Copyright (C) 2010 Texas Instrument Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation version 2. + * + * This program is distributed as is WITHOUT ANY WARRANTY of any kind, + * whether express or implied; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + */ + +#include linux/regulator/machine.h + +/* VDAC */ +struct regulator_consumer_supply twl4030_vdac_supply = { + .supply = vdac, +}; + +/* VMMC1 */ +struct regulator_consumer_supply twl4030_vmmc1_supply = { + .supply = vmmc, +}; + +/* VMMC2 */ +struct regulator_consumer_supply twl4030_vmmc2_supply = { + .supply = vmmc, +}; + +/* VSIM */ +struct regulator_consumer_supply twl4030_vsim_supply = { + .supply = vmmc_aux, +}; + +/* VPLL2 for digital video outputs */ +struct regulator_consumer_supply twl4030_vpll2_supply = { + .supply = vdvi, +}; Ohh no! This is not good! Defining here the supply list would make things harder. Because from board to board the supply list will change! That's the whole point of having the supply list. We can't share them for all boards definitions. + +/* Regulator initialization data */ +/* VAUX1 */ +struct regulator_init_data twl4030_vaux1_data = { + .constraints = { + .min_uV = 280, + .max_uV = 280, + .apply_uV = true, + .valid_modes_mask = REGULATOR_MODE_NORMAL + | REGULATOR_MODE_STANDBY, + .valid_ops_mask = REGULATOR_CHANGE_MODE + | REGULATOR_CHANGE_STATUS, + }, +}; + +/* VAUX2 */ +struct regulator_init_data twl4030_vaux2_data = { + .constraints = { + .min_uV = 280, + .max_uV = 280, + .apply_uV = true, + .valid_modes_mask = REGULATOR_MODE_NORMAL + | REGULATOR_MODE_STANDBY, + .valid_ops_mask = REGULATOR_CHANGE_MODE + | REGULATOR_CHANGE_STATUS, + }, +}; + +/* VAUX3 */ +struct regulator_init_data twl4030_vaux3_data = { + .constraints = { + .min_uV = 280, + .max_uV = 280, + .apply_uV = true, + .valid_modes_mask = REGULATOR_MODE_NORMAL + | REGULATOR_MODE_STANDBY, + .valid_ops_mask = REGULATOR_CHANGE_MODE + | REGULATOR_CHANGE_STATUS, + }, +}; + +/* VAUX4 */ +struct regulator_init_data twl4030_vaux4_data = { + .constraints = { + .min_uV = 180, + .max_uV = 180, + .apply_uV = true, + .valid_modes_mask = REGULATOR_MODE_NORMAL + | REGULATOR_MODE_STANDBY, + .valid_ops_mask = REGULATOR_CHANGE_MODE + | REGULATOR_CHANGE_STATUS, + }, +}; + +/* VMMC1 */ +struct regulator_init_data twl4030_vmmc1_data = { + .constraints = { + .min_uV = 185, + .max_uV = 315, + .valid_modes_mask =
Re: [PATCHv2 4/4] Regulator: OMAP: Use common regulator supplies and init data structs
hello again, On Tue, Jan 12, 2010 at 10:14:08AM +0100, ext Anuj Aggarwal wrote: Removing the common supplies and regulator init data structs for various OMAP3 platforms and referring them from the twl4030 common file. Signed-off-by: Anuj Aggarwal anuj.aggar...@ti.com --- arch/arm/mach-omap2/board-3430sdp.c | 135 ++--- arch/arm/mach-omap2/board-cm-t35.c | 47 + arch/arm/mach-omap2/board-igep0020.c | 24 + arch/arm/mach-omap2/board-ldp.c | 24 + arch/arm/mach-omap2/board-omap3beagle.c | 47 + arch/arm/mach-omap2/board-omap3evm.c | 47 + arch/arm/mach-omap2/board-omap3touchbook.c | 47 + arch/arm/mach-omap2/board-overo.c| 23 + arch/arm/mach-omap2/board-zoom-peripherals.c | 71 ++ 9 files changed, 47 insertions(+), 418 deletions(-) mode change 100755 = 100644 arch/arm/mach-omap2/board-zoom-peripherals.c diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index c90b0d0..39860fb 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c @@ -44,6 +44,7 @@ #include mux.h #include sdram-qimonda-hyb18m512160af-6.h #include mmc-twl4030.h +#include twl4030-pmic.h #define CONFIG_DISABLE_HFCLK 1 @@ -343,18 +344,6 @@ static struct twl4030_hsmmc_info mmc[] = { {} /* Terminator */ }; -static struct regulator_consumer_supply sdp3430_vmmc1_supply = { - .supply = vmmc, -}; - -static struct regulator_consumer_supply sdp3430_vsim_supply = { - .supply = vmmc_aux, -}; - -static struct regulator_consumer_supply sdp3430_vmmc2_supply = { - .supply = vmmc, -}; - static int sdp3430_twl_gpio_setup(struct device *dev, unsigned gpio, unsigned ngpio) { @@ -368,9 +357,9 @@ static int sdp3430_twl_gpio_setup(struct device *dev, /* link regulators to MMC adapters ... we know the * regulators will be set up only *after* we return. */ - sdp3430_vmmc1_supply.dev = mmc[0].dev; - sdp3430_vsim_supply.dev = mmc[0].dev; - sdp3430_vmmc2_supply.dev = mmc[1].dev; + twl4030_vmmc1_supply.dev = mmc[0].dev; + twl4030_vsim_supply.dev = mmc[0].dev; + twl4030_vmmc2_supply.dev = mmc[1].dev; /* gpio + 7 is sub_lcd_en_bkl (output/PWM1) */ gpio_request(gpio + 7, sub_lcd_en_bkl); @@ -400,108 +389,6 @@ static struct twl4030_madc_platform_data sdp3430_madc_data = { .irq_line = 1, }; -/* - * Apply all the fixed voltages since most versions of U-Boot - * don't bother with that initialization. - */ - -/* VAUX1 for mainboard (irda and sub-lcd) */ -static struct regulator_init_data sdp3430_vaux1 = { - .constraints = { - .min_uV = 280, - .max_uV = 280, - .apply_uV = true, - .valid_modes_mask = REGULATOR_MODE_NORMAL - | REGULATOR_MODE_STANDBY, - .valid_ops_mask = REGULATOR_CHANGE_MODE - | REGULATOR_CHANGE_STATUS, - }, -}; - -/* VAUX2 for camera module */ -static struct regulator_init_data sdp3430_vaux2 = { - .constraints = { - .min_uV = 280, - .max_uV = 280, - .apply_uV = true, - .valid_modes_mask = REGULATOR_MODE_NORMAL - | REGULATOR_MODE_STANDBY, - .valid_ops_mask = REGULATOR_CHANGE_MODE - | REGULATOR_CHANGE_STATUS, - }, -}; - -/* VAUX3 for LCD board */ -static struct regulator_init_data sdp3430_vaux3 = { - .constraints = { - .min_uV = 280, - .max_uV = 280, - .apply_uV = true, - .valid_modes_mask = REGULATOR_MODE_NORMAL - | REGULATOR_MODE_STANDBY, - .valid_ops_mask = REGULATOR_CHANGE_MODE - | REGULATOR_CHANGE_STATUS, - }, -}; - -/* VAUX4 for OMAP VDD_CSI2 (camera) */ -static struct regulator_init_data sdp3430_vaux4 = { - .constraints = { - .min_uV = 180, - .max_uV = 180, - .apply_uV = true, - .valid_modes_mask = REGULATOR_MODE_NORMAL - | REGULATOR_MODE_STANDBY, - .valid_ops_mask = REGULATOR_CHANGE_MODE - | REGULATOR_CHANGE_STATUS, - },
Re: [PATCH 2/2] OMAP: DSS2: OMAPFB: implement OMAPFB_GET_DISPLAY_INFO
On Fri, 2010-02-05 at 00:05 +0100, ext Ville Syrjälä wrote: On Thu, Feb 04, 2010 at 05:31:26PM +0200, Tomi Valkeinen wrote: Previously the only place to get the size of the display was from the DSS's sysfs interface, making, for example, configuring overlays and doing updates on manual displays more difficult. Signed-off-by: Tomi Valkeinen tomi.valkei...@nokia.com --- drivers/video/omap2/omapfb/omapfb-ioctl.c | 18 ++ include/linux/omapfb.h|7 +++ 2 files changed, 25 insertions(+), 0 deletions(-) snip @@ -216,6 +217,12 @@ struct omapfb_tearsync_info { __u16 reserved2; }; +struct omapfb_display_info { + __u16 width; + __u16 height; How about adding the physical display size here as well? I suppose mm is the standard unit for such things but for small displays more accuracy might be nice. That can be read from framebuffer's var struct. But I could add it here also for completeness. Perhaps also some other display related info, like capabilities. Tomi -- 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: [PATCHv2 1/4] Regulator: OMAP: Creating TWL4030 file having supplies init data
On Fri, 2010-02-05 at 10:45 +0200, Eduardo Valentin wrote: Hello Anuj, First of all, I liked the idea of unifying the regulator definitions for boards that use twl regulators. But I guess we need to improve a little bit. See following comments. On Tue, Jan 12, 2010 at 10:13:52AM +0100, ext Anuj Aggarwal wrote: A new file for TWL4030/TPS65950 is created which has common supplies and regulator init data structures. They will be referenced from the various board-evm files depending upon the EVM requirements, using the twl4030-pmic.h header file. Signed-off-by: Anuj Aggarwal anuj.aggar...@ti.com --- arch/arm/mach-omap2/twl4030-pmic.c | 175 arch/arm/mach-omap2/twl4030-pmic.h | 34 +++ 2 files changed, 209 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-omap2/twl4030-pmic.c create mode 100644 arch/arm/mach-omap2/twl4030-pmic.h diff --git a/arch/arm/mach-omap2/twl4030-pmic.c b/arch/arm/mach-omap2/twl4030-pmic.c new file mode 100644 index 000..0c0a860 --- /dev/null +++ b/arch/arm/mach-omap2/twl4030-pmic.c @@ -0,0 +1,175 @@ +/* + * twl4030-pmic.c + * + * Common regulator supplies and init data structs for TWL4030/TPS65950 + * PMIC for OMAP3 based EVMs. They can be used in various board-evm + * files for OMAP3 based platforms using TWL4030. + * + * Copyright (C) 2010 Texas Instrument Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation version 2. + * + * This program is distributed as is WITHOUT ANY WARRANTY of any kind, + * whether express or implied; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + */ + +#include linux/regulator/machine.h + +/* VDAC */ +struct regulator_consumer_supply twl4030_vdac_supply = { + .supply = vdac, +}; + +/* VMMC1 */ +struct regulator_consumer_supply twl4030_vmmc1_supply = { + .supply = vmmc, +}; + +/* VMMC2 */ +struct regulator_consumer_supply twl4030_vmmc2_supply = { + .supply = vmmc, +}; + +/* VSIM */ +struct regulator_consumer_supply twl4030_vsim_supply = { + .supply = vmmc_aux, +}; + +/* VPLL2 for digital video outputs */ +struct regulator_consumer_supply twl4030_vpll2_supply = { + .supply = vdvi, +}; Ohh no! This is not good! Defining here the supply list would make things harder. Because from board to board the supply list will change! That's the whole point of having the supply list. We can't share them for all boards definitions. OK, my understanding here was that this change was only to support a set of similar OMAP + TWL4030 boards and not *all* OMAP + TWL4030 boards. Anuj, what were your intentions here ? Thanks Liam -- Freelance Developer, SlimLogic Ltd ASoC and Voltage Regulator Maintainer. http://www.slimlogic.co.uk -- 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: [PATCHv2 1/4] Regulator: OMAP: Creating TWL4030 file having supplies init data
On Fri, Feb 05, 2010 at 11:09:28AM +0100, Liam Girdwood wrote: On Fri, 2010-02-05 at 10:45 +0200, Eduardo Valentin wrote: Hello Anuj, First of all, I liked the idea of unifying the regulator definitions for boards that use twl regulators. But I guess we need to improve a little bit. See following comments. On Tue, Jan 12, 2010 at 10:13:52AM +0100, ext Anuj Aggarwal wrote: A new file for TWL4030/TPS65950 is created which has common supplies and regulator init data structures. They will be referenced from the various board-evm files depending upon the EVM requirements, using the twl4030-pmic.h header file. Signed-off-by: Anuj Aggarwal anuj.aggar...@ti.com --- arch/arm/mach-omap2/twl4030-pmic.c | 175 arch/arm/mach-omap2/twl4030-pmic.h | 34 +++ 2 files changed, 209 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-omap2/twl4030-pmic.c create mode 100644 arch/arm/mach-omap2/twl4030-pmic.h diff --git a/arch/arm/mach-omap2/twl4030-pmic.c b/arch/arm/mach-omap2/twl4030-pmic.c new file mode 100644 index 000..0c0a860 --- /dev/null +++ b/arch/arm/mach-omap2/twl4030-pmic.c @@ -0,0 +1,175 @@ +/* + * twl4030-pmic.c + * + * Common regulator supplies and init data structs for TWL4030/TPS65950 + * PMIC for OMAP3 based EVMs. They can be used in various board-evm + * files for OMAP3 based platforms using TWL4030. + * + * Copyright (C) 2010 Texas Instrument Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation version 2. + * + * This program is distributed as is WITHOUT ANY WARRANTY of any kind, + * whether express or implied; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + */ + +#include linux/regulator/machine.h + +/* VDAC */ +struct regulator_consumer_supply twl4030_vdac_supply = { + .supply = vdac, +}; + +/* VMMC1 */ +struct regulator_consumer_supply twl4030_vmmc1_supply = { + .supply = vmmc, +}; + +/* VMMC2 */ +struct regulator_consumer_supply twl4030_vmmc2_supply = { + .supply = vmmc, +}; + +/* VSIM */ +struct regulator_consumer_supply twl4030_vsim_supply = { + .supply = vmmc_aux, +}; + +/* VPLL2 for digital video outputs */ +struct regulator_consumer_supply twl4030_vpll2_supply = { + .supply = vdvi, +}; Ohh no! This is not good! Defining here the supply list would make things harder. Because from board to board the supply list will change! That's the whole point of having the supply list. We can't share them for all boards definitions. OK, my understanding here was that this change was only to support a set of similar OMAP + TWL4030 boards and not *all* OMAP + TWL4030 boards. Right. Yeah. Now I read patches carefully and that is the case. His patch set is designed to board-evm's. Which I suppose is TI's boards. But, can't we extend the set to keep the code available for all of them? I guess that would be just a matter of defining the twl regulators inside twl4030-pmic.c and exporting them via that header, but supplies are left for board specific code? Anuj, what were your intentions here ? Thanks Liam -- Freelance Developer, SlimLogic Ltd ASoC and Voltage Regulator Maintainer. http://www.slimlogic.co.uk -- Eduardo Valentin -- 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] OMAP2/3/4: ioremap address space
Tony, -Original Message- From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Shilimkar, Santosh Sent: Friday, February 05, 2010 11:02 AM To: Tony Lindgren Cc: linux-omap@vger.kernel.org; Kevin Hilman Subject: RE: [PATCH] OMAP2/3/4: ioremap address space -Original Message- From: Tony Lindgren [mailto:t...@atomide.com] Sent: Friday, February 05, 2010 3:21 AM To: Shilimkar, Santosh Cc: linux-omap@vger.kernel.org; Kevin Hilman Subject: Re: [PATCH] OMAP2/3/4: ioremap address space * Shilimkar, Santosh santosh.shilim...@ti.com [100204 11:45]: Tony, -Original Message- From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Shilimkar, Santosh Sent: Wednesday, January 27, 2010 11:14 AM To: Tony Lindgren Cc: linux-omap@vger.kernel.org; Kevin Hilman Subject: RE: [PATCH] OMAP2/3/4: ioremap address space snip void __iomem *omap_ctrl_base_get(void) diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index a091b53..fb5921b 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -407,7 +407,12 @@ void __init omap2_check_revision(void) void __init omap2_set_globals_tap(struct omap_globals *omap2_globals) { omap_revision = omap2_globals-class; - tap_base = omap2_globals-tap; + + /* Static mapping, never released */ + if (omap2_globals-tap) { + tap_base = ioremap(omap2_globals-tap, SZ_4K); + WARN_ON(!tap_base); + } if (cpu_is_omap34xx()) tap_prod_id = 0x0210; Nice clean-up. We need to check carefully that the cpu detection is done by the time we do the ioremap.. Initially we only know the machine class such as 34xx/24xx. Machine class is good enough to select the correct omap_global descriptor. Yeah but ioremap uses cpu_is_omap2420() and cpu_is_omap2430(), so we can't use that for setting tap_base. Basically ioremap() won't work in this case until omap2_check_revision() is done. I _think_ the others are safe.. You are correct. Isn't it ? We have at least cpu_is_omap2420 and cpu_is_omap2430 being used in io.c, so all these mappings may not work properly. Also, we should merge this as one patch to keep the system booting between the patches. Git bisect would be problem. We can merge them together. Merged patch attached. How do we proceed with this? I can test this patch with omap3_defconfig and see if the Image works on OMAP3430, OMAP3630 and OMAP4430 SDPs. How about leave tap changes from this patcht, and ioremap the rest? Then let's try it out in l-o master for next few weeks and then merge it assuming things are OK. Sound good to me. Will spin the new version with this and post. Attached version generated against mainline with tap changes is dropped tested on OMAP3430 and OMAP4430 SDP A slightly modified version because of recent uart changes also attached Tested with linux-omap multi-omap(omap3_defconfig) build on OMAP4430 and OMAP3430 SDP. Regards, Santosh 0001-V2-OMAP2-3-4-ioremap-omap_globals-modules.patch Description: 0001-V2-OMAP2-3-4-ioremap-omap_globals-modules.patch 0001-multi-omap4-OMAP2-3-4-ioremap-omap_globals-modules.patch Description: 0001-multi-omap4-OMAP2-3-4-ioremap-omap_globals-modules.patch
RE: [PATCH 3/3] OMAP3 PM: Adding counters for power domain logic off and mem off during retention.
-Original Message- From: Paul Walmsley [mailto:p...@pwsan.com] Sent: Friday, February 05, 2010 1:59 PM To: Gopinath, Thara Cc: linux-omap@vger.kernel.org Subject: Re: [PATCH 3/3] OMAP3 PM: Adding counters for power domain logic off and mem off during retention. Hi Thara, On Thu, 4 Feb 2010, Thara Gopinath wrote: This patch adds counters to keep track of whether the powerdomain logic or software controllable memory banks are turned off when the power domain enters retention. During power domain retention if logic gets turned off, the scenario is known as Open Switch Retention. Also during retention s/w controllable memory banks of a power domain can be chosen to be kept in retention or off. This patch adds one counter per powerdomain to track the power domain logic state during retention. Number of memory bank state counters added depends on the number of software controllable memory banks of the powerdomain. To view these counters do cat ../debug/pm_debug/count Signed-off-by: Thara Gopinath th...@ti.com Cc: Paul Walmsley p...@pwsan.com I've moved the OSWR counter incrementing code out into its own function, and simplified the conditionals, both per Documentation/CodingStyle. Revised patch attached below. Could you please check this to confirm that it works as intended? Hello Paul, This patch looks fine to me. Regards Thara - Paul From 3fe59666447821406068ee7f48aa7f1698e51a72 Mon Sep 17 00:00:00 2001 From: Thara Gopinath th...@ti.com Date: Thu, 4 Feb 2010 22:17:51 +0530 Subject: [PATCH] OMAP3 PM: Adding counters for power domain logic off and mem off during retention. This patch adds counters to keep track of whether the powerdomain logic or software controllable memory banks are turned off when the power domain enters retention. During power domain retention if logic gets turned off, the scenario is known as Open Switch Retention. Also during retention s/w controllable memory banks of a power domain can be chosen to be kept in retention or off. This patch adds one counter per powerdomain to track the power domain logic state during retention. Number of memory bank state counters added depends on the number of software controllable memory banks of the powerdomain. To view these counters do cat ../debug/pm_debug/count Signed-off-by: Thara Gopinath th...@ti.com [p...@pwsan.com: conditional expressions simplified; counter increment code moved to its own function] Signed-off-by: Paul Walmsley p...@pwsan.com --- arch/arm/mach-omap2/pm-debug.c|5 + arch/arm/mach-omap2/powerdomain.c | 25 + arch/arm/plat-omap/include/plat/powerdomain.h |2 ++ 3 files changed, 32 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c index 0ce356f..c18f7f2 100644 --- a/arch/arm/mach-omap2/pm-debug.c +++ b/arch/arm/mach-omap2/pm-debug.c @@ -385,6 +385,11 @@ static int pwrdm_dbg_show_counter(struct powerdomain *pwrdm, void *user) seq_printf(s, ,%s:%d, pwrdm_state_names[i], pwrdm-state_counter[i]); + seq_printf(s, ,RET-LOGIC-OFF:%d, pwrdm-ret_logic_off_counter); + for (i = 0; i pwrdm-banks; i++) + seq_printf(s, ,RET-MEMBANK%d-OFF:%d, i + 1, + pwrdm-ret_mem_off_counter[i]); + seq_printf(s, \n); return 0; diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index e9eeaa4..9a0fb38 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c @@ -125,6 +125,10 @@ static int _pwrdm_register(struct powerdomain *pwrdm) for (i = 0; i PWRDM_MAX_PWRSTS; i++) pwrdm-state_counter[i] = 0; + pwrdm-ret_logic_off_counter = 0; + for (i = 0; i pwrdm-banks; i++) + pwrdm-ret_mem_off_counter[i] = 0; + pwrdm_wait_transition(pwrdm); pwrdm-state = pwrdm_read_pwrst(pwrdm); pwrdm-state_counter[pwrdm-state] = 1; @@ -134,6 +138,25 @@ static int _pwrdm_register(struct powerdomain *pwrdm) return 0; } +static void _update_logic_membank_counters(struct powerdomain *pwrdm) +{ + int i; + u8 prev_logic_pwrst, prev_mem_pwrst; + + prev_logic_pwrst = pwrdm_read_prev_logic_pwrst(pwrdm); + if ((pwrdm-pwrsts_logic_ret == PWRSTS_OFF_RET) + (prev_logic_pwrst == PWRDM_POWER_OFF)) + pwrdm-ret_logic_off_counter++; + + for (i = 0; i pwrdm-banks; i++) { + prev_mem_pwrst = pwrdm_read_prev_mem_pwrst(pwrdm, i); + + if ((pwrdm-pwrsts_mem_ret[i] == PWRSTS_OFF_RET) + (prev_mem_pwrst == PWRDM_POWER_OFF)) + pwrdm-ret_mem_off_counter[i]++; + } +} + static int _pwrdm_state_switch(struct powerdomain *pwrdm, int flag) { @@ -153,6 +176,8 @@ static int _pwrdm_state_switch(struct powerdomain *pwrdm, int flag) prev = pwrdm_read_prev_pwrst(pwrdm); if (pwrdm-state !=
Re: [APPLIED] [PATCH 2/4-V1] AM3517: Enable TSC2004 driver support for AM3517EVM
* Hiremath, Vaibhav hvaib...@ti.com [100204 21:31]: -Original Message- From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap- ow...@vger.kernel.org] On Behalf Of Tony Lindgren Sent: Friday, February 05, 2010 6:35 AM To: linux-omap@vger.kernel.org Subject: [APPLIED] [PATCH 2/4-V1] AM3517: Enable TSC2004 driver support for AM3517EVM This patch has been applied to the linux-omap by youw fwiendly patch wobot. [Hiremath, Vaibhav] Tony, Please revert this single commit. Actually I had a discussion with Dmitry Torokhov and the conclusion is, as of now for TSC2004 we can reuse TSC2007, and once they start diverging we can split them. I will be submitting patches for this support shortly. So please revert hits commit. Yeah noticed that as they did not compile with omap3_defconfig. Reverted all of them except patch AM3517: Enable basic I2C Support. Regards, Tony -- 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 3/3] OMAP3 PM: Adding counters for power domain logic off and mem off during retention.
On Fri, 5 Feb 2010, Gopinath, Thara wrote: This patch looks fine to me. Thanks, it's queued for 2.6.34. - Paul -- 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/2] OMAP2/3 clock: Extend find_idlest() to pass back idle state value
Hi Ranjith, On Tue, 19 Jan 2010, Ranjith Lohithakshan wrote: Current implementation defines clock idle state indicators based on the cpu information (cpu_is_omap24xx() or cpu_is_omap34xx()) in a system wide manner. This patch extends the find_idlest() function in clkops to pass back the idle state indicator for that clock, thus allowing idle state indicators to be defined on a per clock basis if required. This is specifically needed on AM35xx devices as the new IPSS clocks indicates the idle status (0 is idle, 1 is ready) in a way just opposite to how its handled in OMAP3 (0 is ready, 1 is idle). Signed-off-by: Ranjith Lohithakshan ranji...@ti.com I had to make some changes to this patch for it to apply after the recent clock split patches. Could you please check this patch and make sure it is okay? - Paul From: Ranjith Lohithakshan ranji...@ti.com Date: Fri, 5 Feb 2010 12:55:21 -0700 Subject: [PATCH] OMAP2/3 clock: Extend find_idlest() to pass back idle state value Current implementation defines clock idle state indicators based on the cpu information (cpu_is_omap24xx() or cpu_is_omap34xx()) in a system wide manner. This patch extends the find_idlest() function in clkops to pass back the idle state indicator for that clock, thus allowing idle state indicators to be defined on a per clock basis if required. This is specifically needed on AM35xx devices as the new IPSS clocks indicates the idle status (0 is idle, 1 is ready) in a way just opposite to how its handled in OMAP3 (0 is ready, 1 is idle). Signed-off-by: Ranjith Lohithakshan ranji...@ti.com [p...@pwsan.com: updated to apply after commit 98c45457 et seq.] Signed-off-by: Paul Walmsley p...@pwsan.com --- arch/arm/mach-omap2/clkt2xxx_apll.c |2 +- arch/arm/mach-omap2/clock.c | 25 - arch/arm/mach-omap2/clock.h |2 +- arch/arm/mach-omap2/clock2xxx.c |5 - arch/arm/mach-omap2/clock34xx.c | 15 --- arch/arm/mach-omap2/cm.h|3 +++ arch/arm/mach-omap2/prcm.c | 14 +- arch/arm/plat-omap/include/plat/clock.h |6 -- arch/arm/plat-omap/include/plat/prcm.h |3 ++- 9 files changed, 52 insertions(+), 23 deletions(-) diff --git a/arch/arm/mach-omap2/clkt2xxx_apll.c b/arch/arm/mach-omap2/clkt2xxx_apll.c index fc32ff8..d5b8b2b 100644 --- a/arch/arm/mach-omap2/clkt2xxx_apll.c +++ b/arch/arm/mach-omap2/clkt2xxx_apll.c @@ -57,7 +57,7 @@ static int omap2_clk_apll_enable(struct clk *clk, u32 status_mask) cm_write_mod_reg(cval, PLL_MOD, CM_CLKEN); omap2_cm_wait_idlest(OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), status_mask, -clk-name); +OMAP24XX_CM_IDLEST_VAL, clk-name); /* * REVISIT: Should we return an error code if omap2_wait_clock_ready() diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index 999b91e..3bb3292 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c @@ -57,7 +57,7 @@ u8 cpu_mask; static void _omap2_module_wait_ready(struct clk *clk) { void __iomem *companion_reg, *idlest_reg; - u8 other_bit, idlest_bit; + u8 other_bit, idlest_bit, idlest_val; /* Not all modules have multiple clocks that their IDLEST depends on */ if (clk-ops-find_companion) { @@ -66,9 +66,10 @@ static void _omap2_module_wait_ready(struct clk *clk) return; } - clk-ops-find_idlest(clk, idlest_reg, idlest_bit); + clk-ops-find_idlest(clk, idlest_reg, idlest_bit, idlest_val); - omap2_cm_wait_idlest(idlest_reg, (1 idlest_bit), clk-name); + omap2_cm_wait_idlest(idlest_reg, (1 idlest_bit), idlest_val, +clk-name); } /* Enables clock without considering parent dependencies or use count @@ -175,7 +176,8 @@ void omap2_clk_dflt_find_companion(struct clk *clk, void __iomem **other_reg, * omap2_clk_dflt_find_idlest - find CM_IDLEST reg va, bit shift for @clk * @clk: struct clk * to find IDLEST info for * @idlest_reg: void __iomem ** to return the CM_IDLEST va in - * @idlest_bit: u8 ** to return the CM_IDLEST bit shift in + * @idlest_bit: u8 * to return the CM_IDLEST bit shift in + * @idlest_val: u8 * to return the idle status indicator * * Return the CM_IDLEST register address and bit shift corresponding * to the module that owns this clock. This default code assumes @@ -185,13 +187,26 @@ void omap2_clk_dflt_find_companion(struct clk *clk, void __iomem **other_reg, * CM_IDLEST2). This is not true for all modules. No return value. */ void omap2_clk_dflt_find_idlest(struct clk *clk, void __iomem **idlest_reg, - u8 *idlest_bit) + u8 *idlest_bit, u8 *idlest_val) { u32 r; r = (((__force u32)clk-enable_reg ~0xf0) | 0x20); *idlest_reg = (__force void
Re: [PATCH v2 2/2] AM35xx: Add clock support for new modules on AM35xx
On Thu, 28 Jan 2010, Ranjith Lohithakshan wrote: This patch adds clock support for the following AM35xx modules - Ethernet MAC - CAN Controller (HECC) - New MUSB OTG Controller with integrated Phy - Video Processing Front End (VPFE) - Additional UART (UART4) Signed-off-by: Ranjith Lohithakshan ranji...@ti.com Once you've verified the previous patch in this series, this patch will be queued for 2.6.34. - Paul -- 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: [PATCHv2] omap3: Check return values for clk_get()
On Thu, 28 Jan 2010, Sanjeev Premi wrote: This patch checks if clk_get() returned success for the clocks used in function omap2_clk_arch_init(). This version incorporates review comments from Kevin Hilman and Paul Walmsley. Signed-off-by: Sanjeev Premi pr...@ti.com Thanks, queued for 2.6.34 with one change: --- arch/arm/mach-omap2/clock34xx.c | 16 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c index 1f1b5a6..ad09f04 100644 --- a/arch/arm/mach-omap2/clock34xx.c +++ b/arch/arm/mach-omap2/clock34xx.c @@ -184,6 +185,7 @@ static int __init omap3xxx_clk_arch_init(void) { struct clk *osc_sys_ck, *dpll1_ck, *arm_fck, *core_ck; unsigned long osc_sys_rate; + bool err = 0 ; There should not be a space before the semicolon in the above line and so the space has been removed. if (!cpu_is_omap34xx()) return 0; - Paul -- 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 4/4] OMAP2/3: PRCM: fix misc. compiler warnings
On Thu, 28 Jan 2010, Kevin Hilman wrote: - missing return in omap_prcm_get_reset_sources() - potential use of uninitialized variable in omap_prcm_arch_reset() Signed-off-by: Kevin Hilman khil...@deeprootsystems.com Thanks, queued for 2.6.34. - Paul -- 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] Input: ads7846: add regulator support
On Thu, Feb 4, 2010 at 6:21 PM, Mark Brown broo...@opensource.wolfsonmicro.com wrote: On Thu, Feb 04, 2010 at 04:52:26PM +0200, Grazvydas Ignotas wrote: On Thu, Feb 4, 2010 at 4:24 PM, Mark Brown The bodge I'm thinking of would do something like log an error and substitute in a dummy regulator when regulator_get() would have failed so that the driver sees behaviour equivalent to the stubbed regulator API if the bodge is active. A central thing seems much more sensible here - there's nothing specific to this driver going on here and having the API behave in a consistent manner seems good. I agree that such approach have more sense than checking for -ENODEV in each and every driver that uses the regulator framework. I just wonder, if there should be some mechanism that can switch the substitution of the dummy regulators on and off. And if yes, how should the platform code communicate with the regulator core the need for such dummy regulators... -- 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 -- Sincerely Yours, Mike. -- 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 8/8] DSPBRIDGE: typedef cleanup -CHNL_MODE
Hi, On 2/2/2010 6:44 PM, Hebbar, Shivananda wrote: From 23b8b63a9f57c20b3f87ac886623d227d5448e8f Mon Sep 17 00:00:00 2001 From: Shivananda Hebbarx0heb...@ti.com Date: Thu, 28 Jan 2010 20:53:48 -0600 Subject: [PATCH] DSPBRIDGE: Remove typedef CHNL_MODE and replace it with normal C type This patch removes the typedef CHNL_MODE. CHNL_MODE values are well within the range of short int. Hence changing it from u32 type to short int. Signed-off-by: Shivananda Hebbarx0heb...@ti.com --- arch/arm/plat-omap/include/dspbridge/chnldefs.h |2 -- arch/arm/plat-omap/include/dspbridge/wmd.h |2 +- arch/arm/plat-omap/include/dspbridge/wmdchnl.h |2 +- drivers/dsp/bridge/rmgr/node.c |2 +- drivers/dsp/bridge/rmgr/strm.c |2 +- drivers/dsp/bridge/wmd/chnl_sm.c|8 6 files changed, 8 insertions(+), 10 deletions(-) diff --git a/arch/arm/plat-omap/include/dspbridge/chnldefs.h b/arch/arm/plat-omap/include/dspbridge/chnldefs.h index be405ba..43df8b7 100644 --- a/arch/arm/plat-omap/include/dspbridge/chnldefs.h +++ b/arch/arm/plat-omap/include/dspbridge/chnldefs.h @@ -45,8 +45,6 @@ #define CHNL_IsIOCancelled(ioc) (ioc.status CHNL_IOCSTATCANCEL) #define CHNL_IsTimedOut(ioc)(ioc.status CHNL_IOCSTATTIMEOUT) -/* CHNL types: */ - typedef u32 CHNL_MODE; /* Channel transfer mode. */ /* Channel attributes: */ struct CHNL_ATTRS { diff --git a/arch/arm/plat-omap/include/dspbridge/wmd.h b/arch/arm/plat-omap/include/dspbridge/wmd.h index 70f3970..95c79f2 100644 --- a/arch/arm/plat-omap/include/dspbridge/wmd.h +++ b/arch/arm/plat-omap/include/dspbridge/wmd.h @@ -418,7 +418,7 @@ typedef DSP_STATUS(*WMD_BRD_WRITE)(struct WMD_DEV_CONTEXT *hDevContext, typedef DSP_STATUS(*WMD_CHNL_OPEN) (OUT struct CHNL_OBJECT **phChnl, struct CHNL_MGR *hChnlMgr, - CHNL_MODE uMode, + short int chnlMode, changing name of variable breaks compilation u32 uChnlId, CONST IN OPTIONAL struct CHNL_ATTRS *pAttrs); diff --git a/arch/arm/plat-omap/include/dspbridge/wmdchnl.h b/arch/arm/plat-omap/include/dspbridge/wmdchnl.h index 4b733d8..9e73516 100644 --- a/arch/arm/plat-omap/include/dspbridge/wmdchnl.h +++ b/arch/arm/plat-omap/include/dspbridge/wmdchnl.h @@ -33,7 +33,7 @@ extern DSP_STATUS WMD_CHNL_Open(OUT struct CHNL_OBJECT **phChnl, struct CHNL_MGR *hChnlMgr, - CHNL_MODE uMode, + short int chnlMode, u32 uChnlId, CONST IN OPTIONAL struct CHNL_ATTRS *pAttrs); diff --git a/drivers/dsp/bridge/rmgr/node.c b/drivers/dsp/bridge/rmgr/node.c index 5352923..538c806 100644 --- a/drivers/dsp/bridge/rmgr/node.c +++ b/drivers/dsp/bridge/rmgr/node.c @@ -895,7 +895,7 @@ DSP_STATUS NODE_Connect(struct NODE_OBJECT *hNode1, u32 uStream1, struct STREAM *pStream; GB_BitNum pipeId = GB_NOBITS; GB_BitNum chnlId = GB_NOBITS; - CHNL_MODE uMode; + short int uMode; u32 dwLength; DSP_STATUS status = DSP_SOK; DBC_Require(cRefs 0); diff --git a/drivers/dsp/bridge/rmgr/strm.c b/drivers/dsp/bridge/rmgr/strm.c index febb6c2..f03064e 100644 --- a/drivers/dsp/bridge/rmgr/strm.c +++ b/drivers/dsp/bridge/rmgr/strm.c @@ -524,7 +524,7 @@ DSP_STATUS STRM_Open(struct NODE_OBJECT *hNode, u32 uDir, u32 uIndex, struct WMD_DRV_INTERFACE *pIntfFxns; u32 ulChnlId; struct STRM_OBJECT *pStrm = NULL; - CHNL_MODE uMode; + short int uMode; struct CHNL_ATTRS chnlAttrs; DSP_STATUS status = DSP_SOK; struct CMM_OBJECT *hCmmMgr = NULL; /* Shared memory manager hndl */ diff --git a/drivers/dsp/bridge/wmd/chnl_sm.c b/drivers/dsp/bridge/wmd/chnl_sm.c index ca5662d..5d3f71e 100644 --- a/drivers/dsp/bridge/wmd/chnl_sm.c +++ b/drivers/dsp/bridge/wmd/chnl_sm.c @@ -253,7 +253,7 @@ DSP_STATUS WMD_CHNL_CancelIO(struct CHNL_OBJECT *hChnl) DSP_STATUS status = DSP_SOK; struct CHNL_OBJECT *pChnl = (struct CHNL_OBJECT *)hChnl; u32 iChnl = -1; - CHNL_MODE uMode; + short int chnlMode; here struct CHNL_IRP *pChirp; struct CHNL_MGR *pChnlMgr = NULL; @@ -483,7 +483,7 @@ DSP_STATUS WMD_CHNL_FlushIO(struct CHNL_OBJECT *hChnl, u32 dwTimeOut) { DSP_STATUS status = DSP_SOK; struct CHNL_OBJECT *pChnl = (struct CHNL_OBJECT *)hChnl; - CHNL_MODE uMode = -1; + short int chnlMode = -1; and
Re: [Patch 5/8] DSPBRIDGE: typedef cleanup -DSP_HPROCESSOR
Hi, On 2/2/2010 6:44 PM, Hebbar, Shivananda wrote: From 82f402b577d1afb535b319eed4a18087010ef679 Mon Sep 17 00:00:00 2001 From: Shivananda Hebbarx0heb...@ti.com Date: Thu, 28 Jan 2010 20:06:40 -0600 Subject: [PATCH] DSPBRIDGE: Remove typdef used for Processor type replace it with standard C type Signed-off-by: Shivananda Hebbarx0heb...@ti.com --- arch/arm/plat-omap/include/dspbridge/cmm.h |2 +- arch/arm/plat-omap/include/dspbridge/dbdefs.h |2 - arch/arm/plat-omap/include/dspbridge/dmm.h |2 +- arch/arm/plat-omap/include/dspbridge/drv.h |2 +- arch/arm/plat-omap/include/dspbridge/node.h |2 +- arch/arm/plat-omap/include/dspbridge/proc.h | 41 +++--- arch/arm/plat-omap/include/dspbridge/wcdioctl.h | 40 +++--- drivers/dsp/bridge/pmgr/cmm.c |2 +- drivers/dsp/bridge/pmgr/dev.c |6 ++-- drivers/dsp/bridge/pmgr/dmm.c |2 +- drivers/dsp/bridge/pmgr/wcd.c |2 +- drivers/dsp/bridge/rmgr/node.c |2 +- drivers/dsp/bridge/rmgr/proc.c | 42 +++--- 13 files changed, 72 insertions(+), 75 deletions(-) missing this hunk for proc.c @@ -246,7 +246,7 @@ PROC_Attach(u32 uProcessor, OPTIONAL CONST struct DSP_PROCESSORATTRIN *pAttrIn, Proc Object into DEV, 0x%x!\n, status); } if (DSP_SUCCEEDED(status)) { - *phProcessor = (DSP_HPROCESSOR)pProcObject; + *phProcessor = (void *)pProcObject; pr_ctxt-hProcessor = *phProcessor; (void)PROC_NotifyClients(pProcObject, DSP_PROCESSORATTACH); [...] - omar -- 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] DSPBRIDGE: Fix memory leak in PROC_AutoStart()
Hi, On 2/1/2010 11:31 AM, Ameya Palande wrote: Hi Omar, On Mon, 2010-01-25 at 20:21 +0100, ext Omar Ramirez Luna wrote: Hi, On 1/21/2010 7:03 AM, Ameya Palande wrote: Signed-off-by: Ameya Palandeameya.pala...@nokia.com --- drivers/dsp/bridge/rmgr/proc.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/dsp/bridge/rmgr/proc.c b/drivers/dsp/bridge/rmgr/proc.c index a75b64a..91ab64f 100644 --- a/drivers/dsp/bridge/rmgr/proc.c +++ b/drivers/dsp/bridge/rmgr/proc.c @@ -512,6 +512,10 @@ DSP_STATUS PROC_AutoStart(struct CFG_DEVNODE *hDevNode, No Exec file found \n); } func_cont: + if (hProcObject-g_pszLastCoff) { + MEM_Free(hProcObject-g_pszLastCoff); + hProcObject-g_pszLastCoff = NULL; + } Wouldn't be better to keep this inside PROC_Load in case of error? PROC_Load allocates the memory to hProcObject-g_pszLastCoff which gets freed in PROC_Detach. But PROC_AutoStart is a special case. It creates a dummy ProcObject and after it is done with it, it frees it. And there it leaks the memory. So IMO this is the correct place. Ok, agree. Also MEM_Free checks for NULL. Agreed! I will send a V2 of the patch with without the check. MEM_FreeObject(hProcObject); func_end: GT_1trace(PROC_DebugMask, GT_ENTER, Regards, Omar Thanks for your review! Cheers, Ameya. - omar -- 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
[Patchv2 0/8] DSPBRIDGE: typedef cleanup
Resending the patches after updating review comments and also Fixing some compilation breaks. These patches remove the typedefs and replace it with normal C types: Shivananda Hebbar (8) DSPBRIDGE: typedef cleanup -DSP RTOS DSPBRIDGE: typedef cleanup -PROCTYPE DSPBRIDGE: typedef cleanup -PROCFAMILY DSPBRIDGE: typedef cleanup -DSP_HSTREAM DSPBRIDGE: typedef cleanup -DSP_HPROCESSOR DSPBRIDGE: typedef cleanup -DSP_HNODE DSPBRIDGE: typedef cleanup -BRD_STATUS DSPBRIDGE: typedef cleanup -CHNL_MODE arch/arm/plat-omap/include/dspbridge/brddefs.h |1 - arch/arm/plat-omap/include/dspbridge/chnldefs.h |2 - arch/arm/plat-omap/include/dspbridge/cmm.h |2 +- arch/arm/plat-omap/include/dspbridge/dbdefs.h | 18 +--- arch/arm/plat-omap/include/dspbridge/dispdefs.h |4 +- arch/arm/plat-omap/include/dspbridge/dmm.h |2 +- arch/arm/plat-omap/include/dspbridge/drv.h |6 +- arch/arm/plat-omap/include/dspbridge/node.h |4 +- arch/arm/plat-omap/include/dspbridge/proc.h | 43 +- arch/arm/plat-omap/include/dspbridge/wcdioctl.h | 96 +++--- arch/arm/plat-omap/include/dspbridge/wmd.h |4 +- arch/arm/plat-omap/include/dspbridge/wmdchnl.h |2 +- drivers/dsp/bridge/pmgr/cmm.c |2 +- drivers/dsp/bridge/pmgr/dev.c |6 +- drivers/dsp/bridge/pmgr/dmm.c |2 +- drivers/dsp/bridge/pmgr/wcd.c |4 +- drivers/dsp/bridge/rmgr/node.c | 12 ++-- drivers/dsp/bridge/rmgr/proc.c | 56 +++--- drivers/dsp/bridge/rmgr/strm.c |2 +- drivers/dsp/bridge/wmd/chnl_sm.c|8 +- drivers/dsp/bridge/wmd/tiomap3430.c |4 +- 21 files changed, 134 insertions(+), 146 deletions(-) -- 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 1/8] DSPBRIDGE: typedef cleanup -DSP RTOS
From 5855acc38e699f9abfcdd11f1dbd5d648feecb74 Mon Sep 17 00:00:00 2001 From: Shivananda Hebbar x0heb...@ti.com Date: Thu, 28 Jan 2010 18:57:02 -0600 Subject: [PATCH] DSPBRIDGE: typedef cleanup -DSPRTOS This patch removes the typdef used for DSPRTOS type and replaces it with normal C type. Signed-off-by: Shivananda Hebbar x0heb...@ti.com --- arch/arm/plat-omap/include/dspbridge/dbdefs.h |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/arch/arm/plat-omap/include/dspbridge/dbdefs.h b/arch/arm/plat-omap/include/dspbridge/dbdefs.h index fc9fdc8..049fcee 100644 --- a/arch/arm/plat-omap/include/dspbridge/dbdefs.h +++ b/arch/arm/plat-omap/include/dspbridge/dbdefs.h @@ -115,7 +115,6 @@ typedef u32 DSP_PROCFAMILY; /* Processor family */ typedef u32 DSP_PROCTYPE; /* Processor type (w/in family) */ - typedef u32 DSP_RTOSTYPE; /* Type of DSP RTOS */ /* Handy Macros */ #define IsValidProcEvent(x) (((x) == 0) || (((x) (DSP_PROCESSORSTATECHANGE | \ @@ -422,7 +421,7 @@ u32 ulInternalMemSize; u32 ulExternalMemSize; u32 uProcessorID; - DSP_RTOSTYPE tyRunningRTOS; + int tyRunningRTOS; s32 nNodeMinPriority; s32 nNodeMaxPriority; } ; -- 1.6.0.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
[Patch 2/8] DSPBRIDGE: typedef cleanup -PROCTYPE
From 40939eb42f476a0ef7b4f67ebcb412b562daed81 Mon Sep 17 00:00:00 2001 From: Shivananda Hebbar x0heb...@ti.com Date: Thu, 28 Jan 2010 19:14:21 -0600 Subject: [PATCH] DSPBRIDGE: typedef cleanup -PROCTYPE This patch removes the typedef used for PROCTYPE and replace it with the normal C type. Signed-off-by: Shivananda Hebbar x0heb...@ti.com --- arch/arm/plat-omap/include/dspbridge/dbdefs.h |3 +-- arch/arm/plat-omap/include/dspbridge/dispdefs.h |2 +- drivers/dsp/bridge/rmgr/node.c |2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/arm/plat-omap/include/dspbridge/dbdefs.h b/arch/arm/plat-omap/include/dspbridge/dbdefs.h index 049fcee..37ac1dd 100644 --- a/arch/arm/plat-omap/include/dspbridge/dbdefs.h +++ b/arch/arm/plat-omap/include/dspbridge/dbdefs.h @@ -114,7 +114,6 @@ typedef HANDLE DSP_HSTREAM; /* Handle to a Stream object*/ typedef u32 DSP_PROCFAMILY; /* Processor family */ - typedef u32 DSP_PROCTYPE; /* Processor type (w/in family) */ /* Handy Macros */ #define IsValidProcEvent(x) (((x) == 0) || (((x) (DSP_PROCESSORSTATECHANGE | \ @@ -416,7 +415,7 @@ struct DSP_PROCESSORINFO { u32 cbStruct; DSP_PROCFAMILY uProcessorFamily; - DSP_PROCTYPE uProcessorType; + int uProcessorType; u32 uClockRate; u32 ulInternalMemSize; u32 ulExternalMemSize; diff --git a/arch/arm/plat-omap/include/dspbridge/dispdefs.h b/arch/arm/plat-omap/include/dspbridge/dispdefs.h index 9633bbc..f60b351 100644 --- a/arch/arm/plat-omap/include/dspbridge/dispdefs.h +++ b/arch/arm/plat-omap/include/dspbridge/dispdefs.h @@ -27,7 +27,7 @@ /* Size of buffer for sending data to RMS */ u32 ulChnlBufSize; DSP_PROCFAMILY procFamily; /* eg, 5000 */ - DSP_PROCTYPE procType; /* eg, 5510 */ + int procType; /* eg, 5510 */ HANDLE hReserved1; /* Reserved for future use. */ u32 hReserved2; /* Reserved for future use. */ } ; diff --git a/drivers/dsp/bridge/rmgr/node.c b/drivers/dsp/bridge/rmgr/node.c index 336abea..92d51d1 100644 --- a/drivers/dsp/bridge/rmgr/node.c +++ b/drivers/dsp/bridge/rmgr/node.c @@ -153,7 +153,7 @@ struct NODE_MGR { u32 ulChnlOffset; /* Offset of chnl ids rsvd for RMS */ u32 ulChnlBufSize; /* Buffer size for data to RMS */ DSP_PROCFAMILY procFamily; /* eg, 5000 */ - DSP_PROCTYPE procType; /* eg, 5510 */ + int procType; /* eg, 5510 */ u32 uDSPWordSize; /* Size of DSP word on host bytes */ u32 uDSPDataMauSize;/* Size of DSP data MAU */ u32 uDSPMauSize;/* Size of MAU */ -- 1.6.0.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
[Patch 3/8] DSPBRIDGE: typedef cleanup -PROCFAMILY
From 108329666e2bf829915c7de4a693fd83c00581a3 Mon Sep 17 00:00:00 2001 From: Shivananda Hebbar x0heb...@ti.com Date: Fri, 29 Jan 2010 15:03:02 -0600 Subject: [PATCH] DSPBRIDGE: typedef cleanup -PROCFAMILY This patch removes the typdef used for PROCFAMILY and replaces it with normal C type. Signed-off-by: Shivananda Hebbar x0heb...@ti.com --- arch/arm/plat-omap/include/dspbridge/dbdefs.h |4 +--- arch/arm/plat-omap/include/dspbridge/dispdefs.h |2 +- drivers/dsp/bridge/rmgr/node.c |2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/arch/arm/plat-omap/include/dspbridge/dbdefs.h b/arch/arm/plat-omap/include/dspbridge/dbdefs.h index 37ac1dd..36cd569 100644 --- a/arch/arm/plat-omap/include/dspbridge/dbdefs.h +++ b/arch/arm/plat-omap/include/dspbridge/dbdefs.h @@ -113,8 +113,6 @@ typedef HANDLE DSP_HPROCESSOR; /* Handle to a Processor object */ typedef HANDLE DSP_HSTREAM; /* Handle to a Stream object*/ - typedef u32 DSP_PROCFAMILY; /* Processor family */ - /* Handy Macros */ #define IsValidProcEvent(x) (((x) == 0) || (((x) (DSP_PROCESSORSTATECHANGE | \ DSP_PROCESSORATTACH | \ @@ -414,7 +412,7 @@ */ struct DSP_PROCESSORINFO { u32 cbStruct; - DSP_PROCFAMILY uProcessorFamily; + int uProcessorFamily; int uProcessorType; u32 uClockRate; u32 ulInternalMemSize; diff --git a/arch/arm/plat-omap/include/dspbridge/dispdefs.h b/arch/arm/plat-omap/include/dspbridge/dispdefs.h index f60b351..a9a2961 100644 --- a/arch/arm/plat-omap/include/dspbridge/dispdefs.h +++ b/arch/arm/plat-omap/include/dspbridge/dispdefs.h @@ -26,7 +26,7 @@ u32 ulChnlOffset; /* Offset of channel ids reserved for RMS */ /* Size of buffer for sending data to RMS */ u32 ulChnlBufSize; - DSP_PROCFAMILY procFamily; /* eg, 5000 */ + int procFamily; /* eg, 5000 */ int procType; /* eg, 5510 */ HANDLE hReserved1; /* Reserved for future use. */ u32 hReserved2; /* Reserved for future use. */ diff --git a/drivers/dsp/bridge/rmgr/node.c b/drivers/dsp/bridge/rmgr/node.c index 92d51d1..4bc0435 100644 --- a/drivers/dsp/bridge/rmgr/node.c +++ b/drivers/dsp/bridge/rmgr/node.c @@ -152,7 +152,7 @@ struct NODE_MGR { u32 ulNumChnls; /* Total number of channels */ u32 ulChnlOffset; /* Offset of chnl ids rsvd for RMS */ u32 ulChnlBufSize; /* Buffer size for data to RMS */ - DSP_PROCFAMILY procFamily; /* eg, 5000 */ + int procFamily; /* eg, 5000 */ int procType; /* eg, 5510 */ u32 uDSPWordSize; /* Size of DSP word on host bytes */ u32 uDSPDataMauSize;/* Size of DSP data MAU */ -- 1.6.0.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
[Patch 4/8] DSPBRIDGE: typedef cleanup -DSP_HSTREAM
From d3edb20499a7b084a7510d9930264ff2935a6048 Mon Sep 17 00:00:00 2001 From: Shivananda Hebbar x0heb...@ti.com Date: Fri, 29 Jan 2010 15:32:44 -0600 Subject: [PATCH] DSPBRIDGE :typedef cleanup -DSP_HSTREAM This patch removes typedef used for stream handle and replaces it with the normal C types. Signed-off-by: Shivananda Hebbar x0heb...@ti.com --- arch/arm/plat-omap/include/dspbridge/dbdefs.h |1 - arch/arm/plat-omap/include/dspbridge/drv.h |2 +- arch/arm/plat-omap/include/dspbridge/wcdioctl.h | 22 +++--- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/arch/arm/plat-omap/include/dspbridge/dbdefs.h b/arch/arm/plat-omap/include/dspbridge/dbdefs.h index 36cd569..c0d4c1d 100644 --- a/arch/arm/plat-omap/include/dspbridge/dbdefs.h +++ b/arch/arm/plat-omap/include/dspbridge/dbdefs.h @@ -111,7 +111,6 @@ typedef HANDLE DSP_HNODE; /* Handle to a DSP Node object */ typedef HANDLE DSP_HPROCESSOR; /* Handle to a Processor object */ - typedef HANDLE DSP_HSTREAM; /* Handle to a Stream object*/ /* Handy Macros */ #define IsValidProcEvent(x) (((x) == 0) || (((x) (DSP_PROCESSORSTATECHANGE | \ diff --git a/arch/arm/plat-omap/include/dspbridge/drv.h b/arch/arm/plat-omap/include/dspbridge/drv.h index e4e91f3..3eb1abd 100644 --- a/arch/arm/plat-omap/include/dspbridge/drv.h +++ b/arch/arm/plat-omap/include/dspbridge/drv.h @@ -116,7 +116,7 @@ struct DSPHEAP_RES_OBJECT { /* New structure (member of process context) abstracts stream resource info */ struct STRM_RES_OBJECT { s32streamAllocated; /* Stream status */ - DSP_HSTREAM hStream; + void *hStream; u32uNumBufs; u32uDir; struct STRM_RES_OBJECT *next; diff --git a/arch/arm/plat-omap/include/dspbridge/wcdioctl.h b/arch/arm/plat-omap/include/dspbridge/wcdioctl.h index 0dcbef7..9d1cdb3 100644 --- a/arch/arm/plat-omap/include/dspbridge/wcdioctl.h +++ b/arch/arm/plat-omap/include/dspbridge/wcdioctl.h @@ -262,40 +262,40 @@ union Trapped_Args { /* STRM module */ struct { - DSP_HSTREAM hStream; + void *hStream; u32 uSize; u8 *__user *apBuffer; u32 uNumBufs; } ARGS_STRM_ALLOCATEBUFFER; struct { - DSP_HSTREAM hStream; + void *hStream; } ARGS_STRM_CLOSE; struct { - DSP_HSTREAM hStream; + void *hStream; u8 *__user *apBuffer; u32 uNumBufs; } ARGS_STRM_FREEBUFFER; struct { - DSP_HSTREAM hStream; + void *hStream; HANDLE *phEvent; } ARGS_STRM_GETEVENTHANDLE; struct { - DSP_HSTREAM hStream; + void *hStream; struct STRM_INFO __user *pStreamInfo; u32 uStreamInfoSize; } ARGS_STRM_GETINFO; struct { - DSP_HSTREAM hStream; + void *hStream; bool bFlush; } ARGS_STRM_IDLE; struct { - DSP_HSTREAM hStream; + void *hStream; u8 *pBuffer; u32 dwBytes; u32 dwBufSize; @@ -307,11 +307,11 @@ union Trapped_Args { u32 uDirection; u32 uIndex; struct STRM_ATTR __user *pAttrIn; - DSP_HSTREAM __user *phStream; + void *__user *phStream; } ARGS_STRM_OPEN; struct { - DSP_HSTREAM hStream; + void *hStream; u8 *__user *pBufPtr; u32 __user *pBytes; u32 __user *pBufSize; @@ -319,14 +319,14 @@ union Trapped_Args { } ARGS_STRM_RECLAIM; struct { - DSP_HSTREAM hStream; + void *hStream; u32 uEventMask; u32 uNotifyType; struct DSP_NOTIFICATION __user *hNotification; } ARGS_STRM_REGISTERNOTIFY; struct { - DSP_HSTREAM __user *aStreamTab; + void *__user *aStreamTab; u32 nStreams; u32 __user *pMask; u32 uTimeout; -- 1.6.0.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
[Patch 5/8] DSPBRIDGE: typedef cleanup -DSP_HPROCESSOR
From fce3de8671931f5af3df467e0f923e86e9d1f9b3 Mon Sep 17 00:00:00 2001 From: Shivananda Hebbar x0heb...@ti.com Date: Thu, 28 Jan 2010 20:06:40 -0600 Subject: [PATCH] DSPBRIDGE : typedef cleanup -DSP_HPROCESSOR This patch removes the typedef used for processor handle and replaces it with the normal C type. Signed-off-by: Shivananda Hebbar x0heb...@ti.com --- arch/arm/plat-omap/include/dspbridge/cmm.h |2 +- arch/arm/plat-omap/include/dspbridge/dbdefs.h |1 - arch/arm/plat-omap/include/dspbridge/dmm.h |2 +- arch/arm/plat-omap/include/dspbridge/drv.h |2 +- arch/arm/plat-omap/include/dspbridge/node.h |2 +- arch/arm/plat-omap/include/dspbridge/proc.h | 41 ++--- arch/arm/plat-omap/include/dspbridge/wcdioctl.h | 40 ++-- drivers/dsp/bridge/pmgr/cmm.c |2 +- drivers/dsp/bridge/pmgr/dev.c |6 ++-- drivers/dsp/bridge/pmgr/dmm.c |2 +- drivers/dsp/bridge/pmgr/wcd.c |2 +- drivers/dsp/bridge/rmgr/node.c |2 +- drivers/dsp/bridge/rmgr/proc.c | 44 +++--- 13 files changed, 73 insertions(+), 75 deletions(-) diff --git a/arch/arm/plat-omap/include/dspbridge/cmm.h b/arch/arm/plat-omap/include/dspbridge/cmm.h index fc2f51e..bad3ab0 100644 --- a/arch/arm/plat-omap/include/dspbridge/cmm.h +++ b/arch/arm/plat-omap/include/dspbridge/cmm.h @@ -160,7 +160,7 @@ * hDevObject != NULL * Ensures: */ - extern DSP_STATUS CMM_GetHandle(DSP_HPROCESSOR hProcessor, + extern DSP_STATUS CMM_GetHandle(void *hProcessor, OUT struct CMM_OBJECT **phCmmMgr); /* diff --git a/arch/arm/plat-omap/include/dspbridge/dbdefs.h b/arch/arm/plat-omap/include/dspbridge/dbdefs.h index 222a93e..f2ff74c 100644 --- a/arch/arm/plat-omap/include/dspbridge/dbdefs.h +++ b/arch/arm/plat-omap/include/dspbridge/dbdefs.h @@ -110,7 +110,6 @@ typedef u32 DSP_STATUS; /* API return code type */ typedef HANDLE DSP_HNODE; /* Handle to a DSP Node object */ - typedef HANDLE DSP_HPROCESSOR; /* Handle to a Processor object */ /* Handy Macros */ #define IsValidProcEvent(x) (((x) == 0) || (((x) (DSP_PROCESSORSTATECHANGE | \ diff --git a/arch/arm/plat-omap/include/dspbridge/dmm.h b/arch/arm/plat-omap/include/dspbridge/dmm.h index 13a5088..688473a 100644 --- a/arch/arm/plat-omap/include/dspbridge/dmm.h +++ b/arch/arm/plat-omap/include/dspbridge/dmm.h @@ -38,7 +38,7 @@ * This is typically called from the client process. */ - extern DSP_STATUS DMM_GetHandle(DSP_HPROCESSOR hProcessor, + extern DSP_STATUS DMM_GetHandle(void *hProcessor, OUT struct DMM_OBJECT **phDmmMgr); extern DSP_STATUS DMM_ReserveMemory(struct DMM_OBJECT *hDmmMgr, diff --git a/arch/arm/plat-omap/include/dspbridge/drv.h b/arch/arm/plat-omap/include/dspbridge/drv.h index 3eb1abd..c6d4626 100644 --- a/arch/arm/plat-omap/include/dspbridge/drv.h +++ b/arch/arm/plat-omap/include/dspbridge/drv.h @@ -134,7 +134,7 @@ struct PROCESS_CONTEXT{ enum GPP_PROC_RES_STATE resState; /* Handle to Processor */ - DSP_HPROCESSOR hProcessor; + void *hProcessor; /* DSP Node resources */ struct NODE_RES_OBJECT *pNodeList; diff --git a/arch/arm/plat-omap/include/dspbridge/node.h b/arch/arm/plat-omap/include/dspbridge/node.h index df15884..9f0110a 100644 --- a/arch/arm/plat-omap/include/dspbridge/node.h +++ b/arch/arm/plat-omap/include/dspbridge/node.h @@ -570,7 +570,7 @@ * Parameters: * */ - extern DSP_STATUS NODE_GetUUIDProps(DSP_HPROCESSOR hProcessor, + extern DSP_STATUS NODE_GetUUIDProps(void *hProcessor, IN CONST struct DSP_UUID *pNodeId, OUT struct DSP_NDBPROPS *pNodeProps); diff --git a/arch/arm/plat-omap/include/dspbridge/proc.h b/arch/arm/plat-omap/include/dspbridge/proc.h index 8dbdaac..bbb089e 100644 --- a/arch/arm/plat-omap/include/dspbridge/proc.h +++ b/arch/arm/plat-omap/include/dspbridge/proc.h @@ -51,8 +51,7 @@ */ extern DSP_STATUS PROC_Attach(u32 uProcessor, OPTIONAL CONST struct DSP_PROCESSORATTRIN - *pAttrIn, - OUT DSP_HPROCESSOR *phProcessor, + *pAttrIn, void **phProcessor, struct PROCESS_CONTEXT *pr_ctxt); /* @@ -101,7 +100,7 @@ * Details: * This function Calls WMD_BRD_Ioctl. */ - extern DSP_STATUS PROC_Ctrl(DSP_HPROCESSOR hProcessor, + extern DSP_STATUS PROC_Ctrl(void *hProcessor, u32 dwCmd, IN struct DSP_CBDATA *pArgs); /* @@ -153,7 +152,7 @@ * Ensures: *
[Patch 6/8] DSPBRIDGE: typedef cleanup -DSP_HNODE
From b90284e0c81aa983ee60ce1fee8d69beba4061a6 Mon Sep 17 00:00:00 2001 From: Shivananda Hebbar x0heb...@ti.com Date: Thu, 28 Jan 2010 20:22:04 -0600 Subject: [PATCH] DSPBRIDGE: typdef cleanup -DSP_HNODE This patch removes the typedef used for node handle and replaces it with the normal C type. Signed-off-by: Shivananda Hebbar x0heb...@ti.com --- arch/arm/plat-omap/include/dspbridge/dbdefs.h |6 +--- arch/arm/plat-omap/include/dspbridge/drv.h |2 +- arch/arm/plat-omap/include/dspbridge/node.h |2 +- arch/arm/plat-omap/include/dspbridge/proc.h |2 +- arch/arm/plat-omap/include/dspbridge/wcdioctl.h | 34 +++--- drivers/dsp/bridge/pmgr/wcd.c |2 +- drivers/dsp/bridge/rmgr/node.c |4 +- drivers/dsp/bridge/rmgr/proc.c |4 +- 8 files changed, 27 insertions(+), 29 deletions(-) diff --git a/arch/arm/plat-omap/include/dspbridge/dbdefs.h b/arch/arm/plat-omap/include/dspbridge/dbdefs.h index e3be0fc..472b62f 100644 --- a/arch/arm/plat-omap/include/dspbridge/dbdefs.h +++ b/arch/arm/plat-omap/include/dspbridge/dbdefs.h @@ -109,8 +109,6 @@ /* Types defined for 'Bridge API */ typedef u32 DSP_STATUS; /* API return code type */ - typedef HANDLE DSP_HNODE; /* Handle to a DSP Node object */ - /* Handy Macros */ #define IsValidProcEvent(x) (((x) == 0) || (((x) (DSP_PROCESSORSTATECHANGE | \ DSP_PROCESSORATTACH | \ @@ -318,7 +316,7 @@ u32 cbStruct; enum DSP_CONNECTTYPE lType; u32 uThisNodeStreamIndex; - DSP_HNODE hConnectedNode; + void *hConnectedNode; struct DSP_UUID uiConnectedNodeID; u32 uConnectedNodeStreamIndex; } ; @@ -368,7 +366,7 @@ struct DSP_NDBPROPS nbNodeDatabaseProps; u32 uExecutionPriority; enum NODE_STATE nsExecutionState; - DSP_HNODE hDeviceOwner; + void *hDeviceOwner; u32 uNumberStreams; struct DSP_STREAMCONNECT scStreamConnection[16]; u32 uNodeEnv; diff --git a/arch/arm/plat-omap/include/dspbridge/drv.h b/arch/arm/plat-omap/include/dspbridge/drv.h index c6d4626..b31c8e3 100644 --- a/arch/arm/plat-omap/include/dspbridge/drv.h +++ b/arch/arm/plat-omap/include/dspbridge/drv.h @@ -84,7 +84,7 @@ /* New structure (member of process context) abstracts NODE resource info */ struct NODE_RES_OBJECT { - DSP_HNODE hNode; + void *hNode; s32nodeAllocated; /* Node status */ s32heapAllocated; /* Heap status */ s32streamsAllocated; /* Streams status */ diff --git a/arch/arm/plat-omap/include/dspbridge/node.h b/arch/arm/plat-omap/include/dspbridge/node.h index 9f0110a..2a45fc0 100644 --- a/arch/arm/plat-omap/include/dspbridge/node.h +++ b/arch/arm/plat-omap/include/dspbridge/node.h @@ -308,7 +308,7 @@ *(*puAllocated == *puNumNodes) */ extern DSP_STATUS NODE_EnumNodes(struct NODE_MGR *hNodeMgr, -IN DSP_HNODE *aNodeTab, +void **aNodeTab, u32 uNodeTabSize, OUT u32 *puNumNodes, OUT u32 *puAllocated); diff --git a/arch/arm/plat-omap/include/dspbridge/proc.h b/arch/arm/plat-omap/include/dspbridge/proc.h index bbb089e..d5edbd5 100644 --- a/arch/arm/plat-omap/include/dspbridge/proc.h +++ b/arch/arm/plat-omap/include/dspbridge/proc.h @@ -153,7 +153,7 @@ * Details: */ extern DSP_STATUS PROC_EnumNodes(void *hProcessor, -IN DSP_HNODE *aNodeTab, +void **aNodeTab, IN u32 uNodeTabSize, OUT u32 *puNumNodes, OUT u32 *puAllocated); diff --git a/arch/arm/plat-omap/include/dspbridge/wcdioctl.h b/arch/arm/plat-omap/include/dspbridge/wcdioctl.h index 4f5a274..eccda18 100644 --- a/arch/arm/plat-omap/include/dspbridge/wcdioctl.h +++ b/arch/arm/plat-omap/include/dspbridge/wcdioctl.h @@ -79,7 +79,7 @@ union Trapped_Args { struct { void *hProcessor; - DSP_HNODE __user *aNodeTab; + void *__user *aNodeTab; u32 uNodeTabSize; u32 __user *puNumNodes; u32 __user *puAllocated; @@ -177,79 +177,79 @@ union Trapped_Args { struct DSP_UUID __user *pNodeID; struct DSP_CBDATA __user *pArgs; struct DSP_NODEATTRIN __user *pAttrIn; - DSP_HNODE __user *phNode; + void *__user *phNode; } ARGS_NODE_ALLOCATE; struct { - DSP_HNODE
[Patch 7/8] DSPBRIDGE: typedef cleanup -BRD_STATUS
From 75fabc1654f4671906f64c12a348aa38625d4f28 Mon Sep 17 00:00:00 2001 From: Shivananda Hebbar x0heb...@ti.com Date: Thu, 28 Jan 2010 20:40:48 -0600 Subject: [PATCH] DSPBRIDGE: typedef cleanup - BRD_STATUS This patch removes the typedef BRD_STATUS and replaces it with the normal C type. Here it need not be u32 value. So replacing it with int type. Signed-off-by: Shivananda Hebbar x0heb...@ti.com --- arch/arm/plat-omap/include/dspbridge/brddefs.h |1 - arch/arm/plat-omap/include/dspbridge/wmd.h |2 +- drivers/dsp/bridge/rmgr/proc.c | 10 +- drivers/dsp/bridge/wmd/tiomap3430.c|4 ++-- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/arch/arm/plat-omap/include/dspbridge/brddefs.h b/arch/arm/plat-omap/include/dspbridge/brddefs.h index ca503e2..ff83166 100644 --- a/arch/arm/plat-omap/include/dspbridge/brddefs.h +++ b/arch/arm/plat-omap/include/dspbridge/brddefs.h @@ -32,7 +32,6 @@ #define BRD_RETENTION 0x8 /* Retention mode */ #define BRD_DSP_HIBERNATION 0x9 /* DSP initiated hibernation */ #define BRD_ERROR 0xA /* Board state is Error */ - typedef u32 BRD_STATUS; /* BRD Object */ struct BRD_OBJECT; diff --git a/arch/arm/plat-omap/include/dspbridge/wmd.h b/arch/arm/plat-omap/include/dspbridge/wmd.h index 748b1c6..70f3970 100644 --- a/arch/arm/plat-omap/include/dspbridge/wmd.h +++ b/arch/arm/plat-omap/include/dspbridge/wmd.h @@ -244,7 +244,7 @@ */ typedef DSP_STATUS(* WMD_BRD_STATUS) (struct WMD_DEV_CONTEXT *hDevContext, - OUT BRD_STATUS * pdwState); + int *pdwState); /* * WMD_BRD_Read diff --git a/drivers/dsp/bridge/rmgr/proc.c b/drivers/dsp/bridge/rmgr/proc.c index 439dbe8..5a33df7 100644 --- a/drivers/dsp/bridge/rmgr/proc.c +++ b/drivers/dsp/bridge/rmgr/proc.c @@ -808,7 +808,7 @@ DSP_STATUS PROC_GetState(void *hProcessor, { DSP_STATUS status = DSP_SOK; struct PROC_OBJECT *pProcObject = (struct PROC_OBJECT *)hProcessor; - BRD_STATUS brdStatus; + int brdStatus; struct DEH_MGR *hDehMgr; DBC_Require(cRefs 0); @@ -949,7 +949,7 @@ DSP_STATUS PROC_Load(void *hProcessor, IN CONST s32 iArgc, u32 dwExtEnd; u32 uProcId; #ifdef CONFIG_BRIDGE_DEBUG - BRD_STATUS uBrdState; + int uBrdState; #endif #ifdef OPT_LOAD_TIME_INSTRUMENTATION @@ -1442,7 +1442,7 @@ DSP_STATUS PROC_Start(void *hProcessor) struct COD_MANAGER *hCodMgr;/* Code manager handle*/ u32 dwDspAddr; /* Loaded code's entry point.*/ #ifdef CONFIG_BRIDGE_DEBUG - BRD_STATUS uBrdState; + int uBrdState; #endif DBC_Require(cRefs 0); GT_1trace(PROC_DebugMask, GT_ENTER, Entered PROC_Start, args:\n\t @@ -1538,7 +1538,7 @@ DSP_STATUS PROC_Stop(void *hProcessor) u32 uNodeTabSize = 1; u32 uNumNodes = 0; u32 uNodesAllocated = 0; - BRD_STATUS uBrdState; + int uBrdState; DBC_Require(cRefs 0); GT_1trace(PROC_DebugMask, GT_ENTER, Entered PROC_Stop, args:\n\t @@ -1730,7 +1730,7 @@ static DSP_STATUS PROC_Monitor(struct PROC_OBJECT *hProcObject) struct PROC_OBJECT *pProcObject = (struct PROC_OBJECT *)hProcObject; struct MSG_MGR *hMsgMgr; #ifdef CONFIG_BRIDGE_DEBUG - BRD_STATUS uBrdState; + int uBrdState; #endif DBC_Require(cRefs 0); diff --git a/drivers/dsp/bridge/wmd/tiomap3430.c b/drivers/dsp/bridge/wmd/tiomap3430.c index 3b9052e..a17a9ff 100644 --- a/drivers/dsp/bridge/wmd/tiomap3430.c +++ b/drivers/dsp/bridge/wmd/tiomap3430.c @@ -93,7 +93,7 @@ static DSP_STATUS WMD_BRD_Read(struct WMD_DEV_CONTEXT *pDevContext, static DSP_STATUS WMD_BRD_Start(struct WMD_DEV_CONTEXT *pDevContext, u32 dwDSPAddr); static DSP_STATUS WMD_BRD_Status(struct WMD_DEV_CONTEXT *pDevContext, - OUT BRD_STATUS *pdwState); + int *pdwState); static DSP_STATUS WMD_BRD_Stop(struct WMD_DEV_CONTEXT *pDevContext); static DSP_STATUS WMD_BRD_Write(struct WMD_DEV_CONTEXT *pDevContext, IN u8 *pbHostBuf, @@ -926,7 +926,7 @@ static DSP_STATUS WMD_BRD_Delete(struct WMD_DEV_CONTEXT *hDevContext) * Returns the board status. */ static DSP_STATUS WMD_BRD_Status(struct WMD_DEV_CONTEXT *hDevContext, -OUT BRD_STATUS *pdwState) +int *pdwState) { struct WMD_DEV_CONTEXT *pDevContext = hDevContext; *pdwState = pDevContext-dwBrdState; -- 1.6.0.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
[Patch 8/8] DSPBRIDGE: typedef cleanup -CHNL_MODE
From 607802b2c411265fefa29983ea08e0e0d44d9f1a Mon Sep 17 00:00:00 2001 From: Shivananda Hebbar x0heb...@ti.com Date: Thu, 28 Jan 2010 20:53:48 -0600 Subject: [PATCH] DSPBRIDGE: typedef cleanup -CHNL_MODE This patch removes the typedef CHNL_MODE. CHNL_MODE values are well within the range of short int. Hence changing it from u32 to short int. Signed-off-by: Shivananda Hebbar x0heb...@ti.com --- arch/arm/plat-omap/include/dspbridge/chnldefs.h |2 -- arch/arm/plat-omap/include/dspbridge/wmd.h |2 +- arch/arm/plat-omap/include/dspbridge/wmdchnl.h |2 +- drivers/dsp/bridge/rmgr/node.c |2 +- drivers/dsp/bridge/rmgr/strm.c |2 +- drivers/dsp/bridge/wmd/chnl_sm.c|8 6 files changed, 8 insertions(+), 10 deletions(-) diff --git a/arch/arm/plat-omap/include/dspbridge/chnldefs.h b/arch/arm/plat-omap/include/dspbridge/chnldefs.h index be405ba..43df8b7 100644 --- a/arch/arm/plat-omap/include/dspbridge/chnldefs.h +++ b/arch/arm/plat-omap/include/dspbridge/chnldefs.h @@ -45,8 +45,6 @@ #define CHNL_IsIOCancelled(ioc) (ioc.status CHNL_IOCSTATCANCEL) #define CHNL_IsTimedOut(ioc)(ioc.status CHNL_IOCSTATTIMEOUT) -/* CHNL types: */ - typedef u32 CHNL_MODE; /* Channel transfer mode. */ /* Channel attributes: */ struct CHNL_ATTRS { diff --git a/arch/arm/plat-omap/include/dspbridge/wmd.h b/arch/arm/plat-omap/include/dspbridge/wmd.h index 70f3970..3305eab 100644 --- a/arch/arm/plat-omap/include/dspbridge/wmd.h +++ b/arch/arm/plat-omap/include/dspbridge/wmd.h @@ -418,7 +418,7 @@ typedef DSP_STATUS(*WMD_BRD_WRITE)(struct WMD_DEV_CONTEXT *hDevContext, typedef DSP_STATUS(*WMD_CHNL_OPEN) (OUT struct CHNL_OBJECT **phChnl, struct CHNL_MGR *hChnlMgr, - CHNL_MODE uMode, + short int uMode, u32 uChnlId, CONST IN OPTIONAL struct CHNL_ATTRS *pAttrs); diff --git a/arch/arm/plat-omap/include/dspbridge/wmdchnl.h b/arch/arm/plat-omap/include/dspbridge/wmdchnl.h index 4b733d8..f2608e0 100644 --- a/arch/arm/plat-omap/include/dspbridge/wmdchnl.h +++ b/arch/arm/plat-omap/include/dspbridge/wmdchnl.h @@ -33,7 +33,7 @@ extern DSP_STATUS WMD_CHNL_Open(OUT struct CHNL_OBJECT **phChnl, struct CHNL_MGR *hChnlMgr, - CHNL_MODE uMode, + short int uMode, u32 uChnlId, CONST IN OPTIONAL struct CHNL_ATTRS *pAttrs); diff --git a/drivers/dsp/bridge/rmgr/node.c b/drivers/dsp/bridge/rmgr/node.c index 11af1dc..ed8f2b9 100644 --- a/drivers/dsp/bridge/rmgr/node.c +++ b/drivers/dsp/bridge/rmgr/node.c @@ -895,7 +895,7 @@ DSP_STATUS NODE_Connect(struct NODE_OBJECT *hNode1, u32 uStream1, struct STREAM *pStream; GB_BitNum pipeId = GB_NOBITS; GB_BitNum chnlId = GB_NOBITS; - CHNL_MODE uMode; + short int uMode; u32 dwLength; DSP_STATUS status = DSP_SOK; DBC_Require(cRefs 0); diff --git a/drivers/dsp/bridge/rmgr/strm.c b/drivers/dsp/bridge/rmgr/strm.c index febb6c2..f03064e 100644 --- a/drivers/dsp/bridge/rmgr/strm.c +++ b/drivers/dsp/bridge/rmgr/strm.c @@ -524,7 +524,7 @@ DSP_STATUS STRM_Open(struct NODE_OBJECT *hNode, u32 uDir, u32 uIndex, struct WMD_DRV_INTERFACE *pIntfFxns; u32 ulChnlId; struct STRM_OBJECT *pStrm = NULL; - CHNL_MODE uMode; + short int uMode; struct CHNL_ATTRS chnlAttrs; DSP_STATUS status = DSP_SOK; struct CMM_OBJECT *hCmmMgr = NULL; /* Shared memory manager hndl */ diff --git a/drivers/dsp/bridge/wmd/chnl_sm.c b/drivers/dsp/bridge/wmd/chnl_sm.c index ca5662d..362dc99 100644 --- a/drivers/dsp/bridge/wmd/chnl_sm.c +++ b/drivers/dsp/bridge/wmd/chnl_sm.c @@ -253,7 +253,7 @@ DSP_STATUS WMD_CHNL_CancelIO(struct CHNL_OBJECT *hChnl) DSP_STATUS status = DSP_SOK; struct CHNL_OBJECT *pChnl = (struct CHNL_OBJECT *)hChnl; u32 iChnl = -1; - CHNL_MODE uMode; + short int uMode; struct CHNL_IRP *pChirp; struct CHNL_MGR *pChnlMgr = NULL; @@ -483,7 +483,7 @@ DSP_STATUS WMD_CHNL_FlushIO(struct CHNL_OBJECT *hChnl, u32 dwTimeOut) { DSP_STATUS status = DSP_SOK; struct CHNL_OBJECT *pChnl = (struct CHNL_OBJECT *)hChnl; - CHNL_MODE uMode = -1; + short int uMode = -1; struct CHNL_MGR *pChnlMgr; struct CHNL_IOC chnlIOC; /* Check args: */ @@ -758,7 +758,7 @@ DSP_STATUS WMD_CHNL_GetMgrInfo(struct CHNL_MGR *hChnlMgr, u32 uChnlID,
Re: [PATCH] DSPBRIDGE: Fix to avoid possible memory leaks in bridge driver.
On 1/28/2010 12:27 PM, Ramos Falcon, Ernesto wrote: From e586fe38099ac140e037fda9d2e7d3a846ec023c Mon Sep 17 00:00:00 2001 From: Ernesto Ramoserne...@ti.com Date: Thu, 28 Jan 2010 12:11:39 -0600 Subject: [PATCH] DSPBRIDGE: Fix to avoid possible memory leaks in bridge driver. This patch fixes possible memory leaks detected in dsp bridge. Signed-off-by: Ernesto Ramoserne...@ti.com Acked-by: Omar Ramirez Luna omar.rami...@ti.com --- drivers/dsp/bridge/pmgr/dbll.c |3 ++- drivers/dsp/bridge/rmgr/drv.c |4 ++-- drivers/dsp/bridge/wmd/msg_sm.c |8 ++-- 3 files changed, 6 insertions(+), 9 deletions(-) Pushed to dspbridge. - omar -- 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: [PATCHv2] DSPBRIDGE: Fix memory leak in PROC_AutoStart()
On 2/1/2010 11:36 AM, Ameya Palande wrote: Signed-off-by: Ameya Palandeameya.pala...@nokia.com Acked-by: Omar Ramirez Luna omar.rami...@ti.com --- drivers/dsp/bridge/rmgr/proc.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/dsp/bridge/rmgr/proc.c b/drivers/dsp/bridge/rmgr/proc.c index 491661f..ff3329f 100644 --- a/drivers/dsp/bridge/rmgr/proc.c +++ b/drivers/dsp/bridge/rmgr/proc.c @@ -411,6 +411,8 @@ DSP_STATUS PROC_AutoStart(struct CFG_DEVNODE *hDevNode, No Exec file found \n); } func_cont: + MEM_Free(hProcObject-g_pszLastCoff); + hProcObject-g_pszLastCoff = NULL; MEM_FreeObject(hProcObject); func_end: GT_1trace(PROC_DebugMask, GT_ENTER, Pushed to dspbridge. - omar -- 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] DSPBRIDGE: Get rid of driver_minor global variable
On 2/1/2010 12:18 PM, Ameya Palande wrote: Since there is only 1 device there is no need of driver_minor global variable. Signed-off-by: Ameya Palandeameya.pala...@nokia.com Acked-by: Omar Ramirez Luna omar.rami...@ti.com Pushed to dspbridge - omar -- 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] DSPBRIDGE: Get rid of bridge_dev and bridge_device pointer
On 2/1/2010 1:00 PM, Ameya Palande wrote: Signed-off-by: Ameya Palandeameya.pala...@nokia.com --- drivers/dsp/bridge/rmgr/drv_interface.c | 28 ++-- 1 files changed, 6 insertions(+), 22 deletions(-) Acked-by: Omar Ramirez Luna omar.rami...@ti.com Pushed to dspbridge - omar -- 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 2/3] DSPBRIDGE: Get rid of MEM_Free()
On 2/4/2010 9:33 AM, Ameya Palande wrote: kfree() is NULL and ZERO pointer safe so MEM_Free() doesn't provide any significant advantage. By getting rid of MEM_Free() and the NULL pointer check associated with it, we can save on: 1. One level of indirection which translates to a function call cost. 2. NULL pointer checking cost. Signed-off-by: Ameya Palandeameya.pala...@nokia.com --- arch/arm/plat-omap/include/dspbridge/mem.h | 19 +-- drivers/dsp/bridge/gen/gs.c|4 +- drivers/dsp/bridge/pmgr/cmm.c | 12 ++-- drivers/dsp/bridge/pmgr/cod.c |4 +- drivers/dsp/bridge/pmgr/dbll.c | 15 ++--- drivers/dsp/bridge/pmgr/dev.c |9 +-- drivers/dsp/bridge/pmgr/wcd.c | 46 ++- drivers/dsp/bridge/rmgr/dbdcd.c| 13 ++--- drivers/dsp/bridge/rmgr/disp.c |3 +- drivers/dsp/bridge/rmgr/drv.c | 38 +--- drivers/dsp/bridge/rmgr/drv_interface.c|2 +- drivers/dsp/bridge/rmgr/nldr.c | 52 ++--- drivers/dsp/bridge/rmgr/node.c | 87 ++-- drivers/dsp/bridge/rmgr/proc.c | 10 +-- drivers/dsp/bridge/rmgr/rmm.c | 19 +++--- drivers/dsp/bridge/rmgr/strm.c |3 +- drivers/dsp/bridge/services/mem.c | 17 -- drivers/dsp/bridge/services/ntfy.c |7 +- drivers/dsp/bridge/services/regsup.c | 10 ++-- drivers/dsp/bridge/services/sync.c |3 +- drivers/dsp/bridge/wmd/chnl_sm.c | 11 ++-- drivers/dsp/bridge/wmd/io_sm.c | 12 ++-- drivers/dsp/bridge/wmd/msg_sm.c|8 +- drivers/dsp/bridge/wmd/tiomap3430.c| 17 ++ drivers/dsp/bridge/wmd/ue_deh.c|6 +- 25 files changed, 157 insertions(+), 270 deletions(-) Acked-by: Omar Ramirez Luna omar.rami...@ti.com I had to rework the patch as it sits on top of changes adding 3 more MEM_Free lines. drv.c @@ -603,10 +603,10 @@ DSP_STATUS DRV_Create(OUT struct DRV_OBJECT **phDRVObject) pDRVObject); *phDRVObject = pDRVObject; } else { - MEM_Free(pDRVObject-devList); - MEM_Free(pDRVObject-devNodeString); + kfree(pDRVObject-devList); + kfree(pDRVObject-devNodeString); proc.c @@ -409,7 +409,7 @@ DSP_STATUS PROC_AutoStart(struct CFG_DEVNODE *hDevNode, No Exec file found \n); } func_cont: - MEM_Free(hProcObject-g_pszLastCoff); + kfree(hProcObject-g_pszLastCoff); hProcObject-g_pszLastCoff = NULL; MEM_FreeObject(hProcObject); func_end: If no objection I'll be pushing tomorrow. - omar -- 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