1
0
Fork 0
Commit Graph

310 Commits (b721420e8719131896b009b11edbbd27d9b85e98)

Author SHA1 Message Date
Wei Yongjun b0ba76785e staging: tidspbridge: fix return value check in dsp_wdt_init()
In case of error, the function clk_get() returns ERR_PTR()
and never returns NULL pointer. The NULL test in the error
handling should be replaced with IS_ERR().

dpatch engine is used to auto generated this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-21 09:02:23 -07:00
Arnd Bergmann 2203747c97 ARM: omap: move platform_data definitions
Platform data for device drivers should be defined in
include/linux/platform_data/*.h, not in the architecture
and platform specific directories.

This moves such data out of the omap include directories

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Tony Lindgren <tony@atomide.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: "Benoît Cousson" <b-cousson@ti.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Ohad Ben-Cohen <ohad@wizery.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Omar Ramirez Luna <omar.ramirez@ti.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Cc: Jean Pihet <j-pihet@ti.com>
Cc: J Keerthy <j-keerthy@ti.com>
Cc: linux-omap@vger.kernel.org
2012-09-19 17:39:52 +02:00
Tony Lindgren ec2c0825ca ARM: OMAP2+: Remove hardcoded IRQs and enable SPARSE_IRQ
Remove hardcoded IRQs in irqs.h and related files as these
are no longer needed.

Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-09-12 18:06:30 -07:00
Tony Lindgren c37a1747ac staging: tidspbridge: Prepare for irqs.h removal
Let's define some things locally to avoid breaking build
when irqs.h is removed.

This is needed for the ARM common zImage support.

Cc: Omar Ramirez Luna <omar.ramirez@ti.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-11 12:09:31 -07:00
Wei Yongjun e89a3370b0 staging: tidspbridge: move the dereference below the NULL test
The dereference should be moved below the NULL test.

spatch with a semantic match is used to found this.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-07 22:02:20 -07:00
Omar Ramirez Luna 424d56ec3c staging: tidspbridge: fix uuid strings
Commit 8cb05f4b54 (staging:
tidspbridge: eliminate uuid_uuid_to_string), not only broke
compilation but also functionality for tidspbridge driver.

So:
- Replace remaining instances of uuid_uuid_to_string with snprintf
  to fix compilation.
- Fix the format from %pU to %pUL.
- Since these UUIDs are used in the firmware to reference section
  names, the firmware doesn't follow the standard uuid delimiter '-'
  it uses '_' instead. The driver can follow the standard convention
  however for dsp sections we must transform the uuid to what is
  expected by the firmware. E.g.:

  tidspbridge sees: 24BC8D90-BB45-11D4-B756-006008BDB66F
  firmware expects: .24BC8D90_BB45_11D4_B756_006008BDB66F

Signed-off-by: Omar Ramirez Luna <omar.ramirez@copitl.com>
CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-17 08:10:28 -07:00
Devendra Naga b95dd03df2 staging/tidspbridge: use module_platform_driver
the code under _init and _exit does platform_driver_register and
platform_driver_unregister respectively only,

so its better to use the module_platform_driver than just replicating
the module_platform_driver's implementation

Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-13 19:06:59 -07:00
Justin P. Mattock 0142919c58 staging: tidspbridge: Fix typos.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-13 19:06:59 -07:00
Andy Shevchenko 8cb05f4b54 staging: tidspbridge: eliminate uuid_uuid_to_string
There is native specificator for snprintf to get UUID in human readable format.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-13 19:06:59 -07:00
Omar Ramirez Luna ec4c667523 staging: tidspbridge: dynamically allocate my_sym_buf in dload_symbols
Dynamically allocate my_sym_buf to silence the following warning:

drivers/staging/tidspbridge/dynload/cload.c:
    In function 'dload_symbols':
drivers/staging/tidspbridge/dynload/cload.c:890:
    warning: the frame size of 1040 bytes is larger than 1024 bytes

Signed-off-by: Omar Ramirez Luna <omar.ramirez@copitl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-06 16:17:01 -07:00
Omar Ramirez Luna a2fa68fd76 staging: tidspbridge: dynamically allocate ibuf in dload_data
Dynamically allocate ibuf to silence the following warning:

drivers/staging/tidspbridge/dynload/cload.c:
    In function 'dload_data':
drivers/staging/tidspbridge/dynload/cload.c:1337:
    warning: the frame size of 1216 bytes is larger than 1024 bytes

Signed-off-by: Omar Ramirez Luna <omar.ramirez@copitl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-06 16:17:01 -07:00
Omar Ramirez Luna e8cfe4116d staging: tidspbridge: split bridge_io_on_loaded
Due to its size, this function declares too many variables,
to split it a new structure has been declared to hold values
as they are read from the baseimage.

While at it, indentation was reduced by renaming variables
and reducing blocks of code with the following structure:

if (success) {
    ...
    if (success)
        ...
}

This fixes the following warning:
drivers/staging/tidspbridge/core/io_sm.c:
	In function 'bridge_io_on_loaded':
drivers/staging/tidspbridge/core/io_sm.c:777:
	warning: the frame size of 1032 bytes is larger
	than 1024 bytes

Signed-off-by: Omar Ramirez Luna <omar.ramirez@copitl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-06 16:17:01 -07:00
Omar Ramirez Luna a454ad15e0 staging: tidspbridge: add pud code
And fix the following warning for passing an incorrect
variable type.

../tiomap3430.c: In function 'user_va2_pa':
../tiomap3430.c:1555:
    warning: passing argument 1 of 'pmd_offset' from
    incompatible pointer type
arch/arm/include/asm/pgtable-2level.h:156:
    note: expected 'struct pud_t *' but argument is of
    type 'pmdval_t (*)[2]'

While at it, eliminate 'if' nesting to increase readability.

Signed-off-by: Omar Ramirez Luna <omar.ramirez@copitl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-06 16:17:01 -07:00
Greg Kroah-Hartman d210267741 Merge 3.4-rc5 into staging-next
This resolves the conflict in:
	drivers/staging/vt6656/ioctl.c

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-02 11:48:07 -07:00
Omar Ramirez Luna a2cd62ec9a staging: tidspbridge: remove usage of OMAP2_L4_IO_ADDRESS
Instead now use ioremap. This is needed for 3.4 since this change
emerged in mainline during one of the previous rc cycles.

These solves the following compilation breaks:

drivers/staging/tidspbridge/core/tiomap3430.c:
    In function ‘bridge_brd_start’:
drivers/staging/tidspbridge/core/tiomap3430.c:425:4:
    error: implicit declaration of function ‘OMAP2_L4_IO_ADDRESS’

drivers/staging/tidspbridge/core/wdt.c: In function ‘dsp_wdt_init’:
drivers/staging/tidspbridge/core/wdt.c:56:2:
    error: implicit declaration of function ‘OMAP2_L4_IO_ADDRESS’

For control registers a new function needs to be defined so we
can get rid of a layer violation, but that approach must be queued
for the next merge window.

As seen in:
http://www.arm.linux.org.uk/developer/build/
platform: omap4430-sdp		build: uImage
config: randconfig			version: 3.4.0-rc3
start time: Apr 20 2012 01:07

Reported-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-24 11:57:36 -07:00
Masanari Iida 73e2918990 staging: Fix typo in multiple files
Collect spelling typo in multiple files within staging directory.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10 10:31:01 -07:00
David Howells 9ffc93f203 Remove all #inclusions of asm/system.h
Remove all #inclusions of asm/system.h preparatory to splitting and killing
it.  Performed with the following command:

perl -p -i -e 's!^#\s*include\s*<asm/system[.]h>.*\n!!' `grep -Irl '^#\s*include\s*<asm/system[.]h>' *`

Signed-off-by: David Howells <dhowells@redhat.com>
2012-03-28 18:30:03 +01:00
Víctor Manuel Jáquez Leal 4d3bfdda15 staging: tidspbridge: remove nldr_init() and nldr_exit()
The dynamic loader was called by node.c with an interface. This interface was
also modified to avoid the use of nldr_init() and nldr_exit().

There is not functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:08 -08:00
Víctor Manuel Jáquez Leal 81e8b88a14 staging: tidspbridge: remove ref counting in nldr.c
The nldr module has a nldr_init() and a nldr_exit() whose only purpose
is to keep a reference counting which is not used at all.

This patch only removes the reference count variable, but not the
functions, because they are used through an interface.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:08 -08:00
Víctor Manuel Jáquez Leal d111f6e94d staging: tidspbridge: remove gh_init() and gh_exit()
The gh module has a gh_init() and a gh_exit(), but they don't do
anything, they are just noops.

This patch removes these functions.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:08 -08:00
Víctor Manuel Jáquez Leal 5204133879 staging: tidspbridge: simplify mgr_init()
No functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:08 -08:00
Víctor Manuel Jáquez Leal a05c5dc3fc staging: tidspbridge: remove dev_init() and dev_exit()
The dev module has a dev_init() and a dev_exit() whose only purpose is
to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:08 -08:00
Víctor Manuel Jáquez Leal d071c0e9ca staging: tidspbridge: remove dmm_init() and dmm_exit()
The dmm module has a dmm_init() and a dmm_exit() whose only purpose is
to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:07 -08:00
Víctor Manuel Jáquez Leal a71aa396ee staging: tidspbridge: remove cmm_init() and cmm_exit()
The cmm module has a cmm_init() and a cmm_exit() whose only purpose is
to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:07 -08:00
Víctor Manuel Jáquez Leal b4aac487b0 staging: tidspbridge: remove io_init() and io_exit()
The io module has a io_init() and a io_exit() whose only purpose is to
keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:07 -08:00
Víctor Manuel Jáquez Leal 1471d6c69f staging: tidspbridge: remove msg_mod_init() and msg_exit()
The msg module has a msg_mod_init() and a msg_exit() whose only
purpose is to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:07 -08:00
Víctor Manuel Jáquez Leal 9658a54dfa staging: tidspbridge: remove chnl_init() and chnl_exit()
The chnl module has a chnl_init() and a chnl_exit() whose only purpose
is to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:07 -08:00
Víctor Manuel Jáquez Leal 974f9cd50a staging: tidspbridge: remove rmm_init() and rmm_exit()
The rmm module has a rmm_init() and a rmm_exit() whose only purpose is
to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:07 -08:00
Víctor Manuel Jáquez Leal 311abd9ac4 staging: tidspbridge: remove strm_init() and strm_exit()
The strm module has a strm_init() and a strm_exit() whose only purpose
is to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:06 -08:00
Víctor Manuel Jáquez Leal 2f69a43b8f staging: tidspbridge: remove disp_init() and disp_exit()
The disp module has a disp_init() and a disp_exit() whose only purpose
is to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:06 -08:00
Víctor Manuel Jáquez Leal 18ff159260 staging: tidspbridge: remove node_init() and node_exit()
The node module has a node_init() and a node_exit() whose only purpose
is to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:06 -08:00
Víctor Manuel Jáquez Leal 02a63f9dbc staging: tidspbridge: remove proc_init() and proc_exit()
The proc module has a proc_init() and a proc_exit() whose only purpose
is to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:06 -08:00
Víctor Manuel Jáquez Leal d4040fadc0 staging: tidspbridge: remove cod_init() and cod_exit()
The cod module has a cod_init() and a cod_exit() whose only purpose is
to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:06 -08:00
Víctor Manuel Jáquez Leal 1f2cd527e2 staging: tidspbridge: remove drv_init() and drv_exit()
The drv module has a drv_init() and a drv_exit() whose only purpose is
to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-09 13:21:05 -08:00
Omar Ramirez Luna 08cd9ef4ec staging: tidspbridge: detect wdt3 feature at runtime
In order to detect WDT feature on the dsp code, we need to
find the symbol used to enable it inside the baseimage.

This should fix the warning comming from L3 driver:

    WARNING: at arch/arm/mach-omap2/omap_l3_smx.c:161 omap3_l3_app_irq...
    In-band Error seen by IVA_SS  at address 0
    ...

That occurs because the dsp tries to access wdt3 registers when the clock
for those registers is not enabled.

Reported-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:05:38 -08:00
Omar Ramirez Luna 18db4fe098 staging: tidspbridge: always compile dsp wdt code
In order to detect it at runtime, we need the code handling wdt
clock available at runtime to decide whether to enable or disable
based on the baseimage symbols. Default timeout has been set to 5
seconds.

Downside is that we will lose the option to set a custom timeout
for overflow, but than can be added (if needed) as part of debugfs.

Signed-off-by: Omar Ramirez <omar.ramirez@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:05:38 -08:00
Omar Ramirez Luna 2573897816 staging: tidspbridge: fix bridge_open memory leaks
There are two members of pr_ctxt allocated during bridge_open that
are never freed resulting in memory leaks, these are stream_id and
node_id, they are now freed on release of the handle (bridge_release)
right before freeing pr_ctxt.

Error path for bridge_open was also fixed since the same variables
could result in memory leaking due to missing handling of failure
scenarios. While at it, the indentation changes were introduced to
avoid interleaved goto statements inside big if blocks.

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-14 15:38:51 -08:00
Greg Kroah-Hartman b91867f2ee Merge tag 'staging-3.3-rc3' into staging-next
This was done to resolve some merge issues with the following files that
had changed in both branches:
	drivers/staging/rtl8712/rtl871x_sta_mgt.c
	drivers/staging/tidspbridge/rmgr/drv_interface.c
	drivers/staging/zcache/zcache-main.c

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 10:58:25 -08:00
Víctor Manuel Jáquez Leal 451196a338 staging: tidspbridge: remove CONFIG_TIDSPBRIDGE_DEBUG
Since all the asserts and DBC macros are gone, the kconfig macro
CONFIG_TIDSPBRIDGE_DEBUG is not almost used, but for printing trace messages.

Since it is almost not used, I don't see any case for keep it churning the
configuration menu.

This patch removes completely the kconfig macro CONFIG_TIDSPBRIDGE_DEBUG,
using only TIDSPBRIDGE_BACKTRACE for enabling the debug trace messages.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:38:19 -08:00
Víctor Manuel Jáquez Leal f7c908ef87 staging: tidspbridge: remove dbc.h
All the macros in dbc.h are removed now so this patch removes it completely.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:38:19 -08:00
Víctor Manuel Jáquez Leal 40e6336d1b staging: tidspbridge: remove DBC_ASSERT macro
This macro is only valid when CONFIG_TIDSPBRDIGE_DEBUG is enabled and it only
prints a log message, it is not a real assertion mechanism like BUG_ON() or
WARN_ON().

It is better to remove them: less code to maintain.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:38:19 -08:00
Víctor Manuel Jáquez Leal 276cc746d5 staging: tidspbridge: remove DBC_ENSURE and DBC_REQUIRED
The kernel does not use a "Design by Contract" approach, and it is only
activated in the module if CONFIG_TIDSPBRDIGE_DEBUG is enabled, so they are
executed rarely. It is better to remove them: less code to maintain.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:38:18 -08:00
Joe Perches 8900f00b15 staging: tidspbridge: Rename module from bridgedriver to tidspbridge
tidspbridge when built as a module is named bridgedriver.

bridgedriver is not a particularly good module name.

tidspbridge is what the source is named.  That seems
a more appropriate module name too as it describes
the hardware function better.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Acked-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:37:11 -08:00
Víctor Manuel Jáquez Leal 3bdb54fc54 staging: tidspbridge: use the driver name string
Instead of assign it to a global variable which is not used anymore.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:32:10 -08:00
Víctor Manuel Jáquez Leal 4f8aae5375 staging: tidspbridge: clean up bridge_mmap()
The variable offset is not used but in the debug log, so I don't see reason to
calculate it here.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:32:09 -08:00
Víctor Manuel Jáquez Leal b8bfa4c57c staging: tidspbridge: remove trivial assert
The function dsp_deinit() always return true, so assert its output is
pointless. As consequence the variable were the returned value is stored, is
no longer needed.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:32:09 -08:00
Víctor Manuel Jáquez Leal 0b86809a90 staging: tidspbridge: remove header inclusions
drv_interface.c include several header files that are not really used.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:32:09 -08:00
Víctor Manuel Jáquez Leal 9fdf655061 staging: tidspbridge: silence the compiler
When compiling this report is raised by the compiler:

  CC [M]  drivers/staging/tidspbridge/rmgr/drv_interface.o
drivers/staging/tidspbridge/rmgr/drv_interface.c: In function 'bridge_mmap':
drivers/staging/tidspbridge/rmgr/drv_interface.c:275:2: warning: format '%lx' expects type 'long unsigned int', but argument 9 has type 'pgprot_t'

This patch fixes that warning message.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:32:08 -08:00
Víctor Manuel Jáquez Leal 7724e8bfda staging: tidspbridge: Lindent to drv_interface.c
No functional changes.

According to Lindent, the file drv_internface.c had some lines with bad
indentation.

This commit is the output of Lindent.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:32:08 -08:00
Víctor Manuel Jáquez Leal 518761dba1 staging: tidspbridge: remove unused header
No functional changes.

The header file drv_interface.h was only used locally, hence there's no need
to have it.

Also the only prototyped functions were the file_operations callbacks, then
this commit moves them up to avoid prototyping too.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:32:07 -08:00
Víctor Manuel Jáquez Leal 4f1ef76165 staging: tidspbridge: more readable code
Uppercase function names are not pretty. Also the code flow readability is
enhanced.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:32:07 -08:00
Omar Ramirez Luna 44c5435064 staging: tidspbridge: fix incorrect free to drv_datap
This structure is still used after it has been freed, since it
is being allocated in probe, calls to free it have been moved to
module's remove routine.

This should fix the follwoing messages when attempting to remove the
module:
 drv_get_first_dev_extension: Failed to retrieve the object handle
 drv_get_first_dev_extension: Failed to retrieve the object handle
 drv_destroy: Failed to store DRV object
 mgr_destroy: Failed to store MGR object

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-08 14:14:14 -08:00
Omar Ramirez Luna 5a63177a69 staging: tidspbridge: fix bridge_open memory leaks
There are two members of pr_ctxt allocated during bridge_open that
are never freed resulting in memory leaks, these are stream_id and
node_id, they are now freed on release of the handle (bridge_release)
right before freeing pr_ctxt.

Error path for bridge_open was also fixed since the same variables
could result in memory leaking due to missing handling of failure
scenarios. While at it, the indentation changes were introduced to
avoid interleaved goto statements inside big if blocks.

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-08 14:14:14 -08:00
Linus Torvalds 98793265b4 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (53 commits)
  Kconfig: acpi: Fix typo in comment.
  misc latin1 to utf8 conversions
  devres: Fix a typo in devm_kfree comment
  btrfs: free-space-cache.c: remove extra semicolon.
  fat: Spelling s/obsolate/obsolete/g
  SCSI, pmcraid: Fix spelling error in a pmcraid_err() call
  tools/power turbostat: update fields in manpage
  mac80211: drop spelling fix
  types.h: fix comment spelling for 'architectures'
  typo fixes: aera -> area, exntension -> extension
  devices.txt: Fix typo of 'VMware'.
  sis900: Fix enum typo 'sis900_rx_bufer_status'
  decompress_bunzip2: remove invalid vi modeline
  treewide: Fix comment and string typo 'bufer'
  hyper-v: Update MAINTAINERS
  treewide: Fix typos in various parts of the kernel, and fix some comments.
  clockevents: drop unknown Kconfig symbol GENERIC_CLOCKEVENTS_MIGR
  gpio: Kconfig: drop unknown symbol 'CS5535_GPIO'
  leds: Kconfig: Fix typo 'D2NET_V2'
  sound: Kconfig: drop unknown symbol ARCH_CLPS7500
  ...

Fix up trivial conflicts in arch/powerpc/platforms/40x/Kconfig (some new
kconfig additions, close to removed commented-out old ones)
2012-01-08 13:21:22 -08:00
Omar Ramirez Luna ed625b9143 staging: tidspbridge: request dmtimer clocks on init
Given that dm timer framework doesn't support request of clocks
by soft | hard irqs because some recent changes, tidspbridge needs
to request its clocks on init and enable/disable them on demand.

This was first seen on 3.2-rc1.

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-13 16:12:06 -08:00
Omar Ramirez Luna 0a7e22e61e staging: tidspbridge: include module.h by default
Fixes compilation break when compiled as part of the kernel:

drivers/staging/tidspbridge/rmgr/drv_interface.c:134: error: expected declaration specifiers or '...' before string constant
drivers/staging/tidspbridge/rmgr/drv_interface.c:134: warning: data definition has no type or storage class
drivers/staging/tidspbridge/rmgr/drv_interface.c:134: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/staging/tidspbridge/rmgr/drv_interface.c:134: warning: function declaration isn't a prototype
drivers/staging/tidspbridge/rmgr/drv_interface.c:135: error: expected declaration specifiers or '...' before string constant
drivers/staging/tidspbridge/rmgr/drv_interface.c:135: warning: data definition has no type or storage class
drivers/staging/tidspbridge/rmgr/drv_interface.c:135: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
drivers/staging/tidspbridge/rmgr/drv_interface.c:135: warning: function declaration isn't a prototype
drivers/staging/tidspbridge/rmgr/drv_interface.c:136: error: expected declaration specifiers or '...' before string constant
drivers/staging/tidspbridge/rmgr/drv_interface.c:136: warning: data definition has no type or storage class
drivers/staging/tidspbridge/rmgr/drv_interface.c:136: warning: type defaults to 'int' in declaration of 'MODULE_VERSION'
drivers/staging/tidspbridge/rmgr/drv_interface.c:136: warning: function declaration isn't a prototype
drivers/staging/tidspbridge/rmgr/drv_interface.c: In function 'omap34_xx_bridge_probe':
drivers/staging/tidspbridge/rmgr/drv_interface.c:359: error: 'THIS_MODULE' undeclared (first use in this function)
drivers/staging/tidspbridge/rmgr/drv_interface.c:359: error: (Each undeclared identifier is reported only once
drivers/staging/tidspbridge/rmgr/drv_interface.c:359: error: for each function it appears in.)

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-13 16:11:37 -08:00
Justin P. Mattock 42b2aa86c6 treewide: Fix typos in various parts of the kernel, and fix some comments.
The below patch fixes some typos in various parts of the kernel, as well as fixes some comments.
Please let me know if I missed anything, and I will try to get it changed and resent.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-12-02 14:57:31 +01:00
Vladimir Zapolskiy fcde2bf0b9 staging: tidspbridge: MMU2 registers are limited to 32-bit data access
According to OMAP3 TRM access to MMU registers shall be strictly 32-bit
aligned.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Acked-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-19 13:42:49 -07:00
Greg Kroah-Hartman 6eafa4604c Merge 3.1-rc4 into staging-next
This resolves a conflict with:
	drivers/staging/brcm80211/brcmsmac/types.h

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 08:47:46 -07:00
Omar Ramirez Luna 1b965f1891 staging: tidspbridge: fix compilation on dsp clock functions
Seen on v3.1-rc3, patch:

omap: mcbsp: Drop in-driver transfer support
bafe2721a0

Removed code that now cause tidspbridge to break while compiling.

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-24 14:35:26 -07:00
Thomas Meyer 8c670f4d15 staging: tidspbridge: dont cast void* from kmalloc()
Casting (void *) value returned by kmalloc is useless
 as mentioned in Documentation/CodingStyle, Chap 14.

 The semantic patch that makes this output is available
 in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci.

 More information about semantic patching is available at
 http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 15:22:57 -07:00
Arun Sharma 60063497a9 atomic: use <linux/atomic.h>
This allows us to move duplicated code in <asm/atomic.h>
(atomic_inc_not_zero() for now) to <linux/atomic.h>

Signed-off-by: Arun Sharma <asharma@fb.com>
Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: David Miller <davem@davemloft.net>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-07-26 16:49:47 -07:00
Jesper Juhl 4756dc5901 Remove unneeded version.h include from drivers/staging/tidspbridge/include/dspbridge/host_os.h
It was pointed out by 'make versioncheck' that include of
linux/version.h is not needed in
drivers/staging/tidspbridge/include/dspbridge/host_os.h
This patch removes it.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-05 10:39:38 -07:00
Lucas De Marchi e9c549998d Revert wrong fixes for common misspellings
These changes were incorrectly fixed by codespell. They were now
manually corrected.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-04-26 23:31:11 -07:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Felipe Contreras ab42abf33a staging: tidspbridge: protect dmm_map properly
We need to protect not only the dmm_map list, but the individual
map_obj's, otherwise, we might be building the scatter-gather list with
garbage. So, use the existing proc_lock for that.

I observed race conditions which caused kernel panics while running
stress tests, also, Tuomas Kulve found it happening quite often in
Gumstix Over. This patch fixes those.

Cc: Tuomas Kulve <tuomas@kulve.fi>
Signed-off-by: Felipe Contreras <felipe.contreras@nokia.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14 12:22:27 -07:00
Ilia Mirkin 9f7ff701ad staging: tidspbridge: Remove NULL check before kfree
This patch was generated by the following semantic patch:
// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);

@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14 11:57:36 -07:00
Justin P. Mattock 012983a2e8 drivers:staging:dspbridge:node.h Remove one to many n's in a word.
The Patch below removes one to many "n's" in a word..

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
CC: Greg Kroah-Hartman <gregkh@suse.de>
CC: Rene Sapiens <rene.sapiens@ti.com>
CC: devel@driverdev.osuosl.org
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 19:00:29 -08:00
Uwe Kleine-König 9e36261d45 staging/trivial: fix typos concerning "consistent"
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:30:10 -08:00
Rene Sapiens fbbb4959ee staging: tidspbridge: set12 remove hungarian from structs
hungarian notation will be removed from the elements inside
structures, the next varibles will be renamed:

Original:               Replacement:
dw_buf_size             buf_size
dw_bytes                bytes
pattr                   attr
pdw_arg                 arg
ph_cmm_mgr              cmm_mgr
ph_event                event
ph_node                 node
ph_stream               stream
pmask                   mask
pp_argv                 argv
pp_buf_va               buf_va
pstatus                 status
ul_flags                flags
ul_seg_id               seg_id
usize                   size

Signed-off-by: Rene Sapiens <rene.sapiens@ti.com>
Signed-off-by: Armando Uribe <x0095078@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:12:30 -06:00
Rene Sapiens 121e8f9b9f staging: tidspbridge: set11 remove hungarian from structs
hungarian notation will be removed from the elements inside
structures, the next varibles will be renamed:

Original:               Replacement:
hio_mgr                 io_mgr
dw_api_reg_base         api_reg_base
dw_api_clk_base         api_clk_base
ap_channel              channels
pio_requests            io_requests
pio_completions         io_completions
pndb_props              ndb_props
pndb_props_size         ndb_props_size
pu_num_nodes            num_nodes
pu_num_procs            num_procs
psz_path_name           sz_path_name
pu_index                index
pargs                   args
pu_allocated            allocated
psize                   size
hnotification           notification
pp_rsv_addr             rsv_addr
prsv_addr               rsv_addr
pmpu_addr               mpu_addr
pp_map_addr             map_addr
ul_map_attr             map_attr
undb_props_size         ndb_props_size

Signed-off-by: Rene Sapiens <rene.sapiens@ti.com>
Signed-off-by: Armando Uribe <x0095078@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:12:28 -06:00
Rene Sapiens ee4317f78c staging: tidspbridge: set10 remove hungarian from structs
hungarian notation will be removed from the elements inside
structures, the next varibles will be renamed:

Original:               Replacement:
hnext                   next
hnode                   node
hprev                   prev
hroot                   root
hstream                 stream
pbuf                    buf
pcb_arg                 cb_arg
pdspheap_list           dspheap_list
pmsg                    msg
ps_name                 name
pstr_create_phase_fxn   str_create_phase_fxn
pstr_delete_phase_fxn   str_delete_phase_fxn
pstr_dev_name           str_dev_name
pstr_event_name         str_event_name
pstr_execute_phase_fxn  str_execute_phase_fxn
pstr_i_alg_name         str_i_alg_name
udma_chnl_id            dma_chnl_id
un_bufs_in_strm         bufs_in_strm
usm_buf_size            sm_buf_size

Signed-off-by: Rene Sapiens <rene.sapiens@ti.com>
Signed-off-by: Armando Uribe <x0095078@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:12:26 -06:00
Rene Sapiens a534f17bd5 staging: tidspbridge: set9 remove hungarian from structs
hungarian notation will be removed from the elements inside
structures, the next varibles will be renamed:

Original:               Replacement:
hprocessor              processor
udma_priority           dma_priority
udsp_data_mau_size      dsp_data_mau_size
udsp_heap_addr          dsp_heap_addr
udsp_heap_res_addr      dsp_heap_res_addr
udsp_heap_virt_addr     dsp_heap_virt_addr
udsp_mau_size           dsp_mau_size
udsp_word_size          dsp_word_size
ugpp_heap_addr          gpp_heap_addr
ugpp_heap_virt_addr     gpp_heap_virt_addr
us_data2                data2
us_data3                data3
uc_data4                data4
uc_data5                data5
uc_data6                data6
us_load_type            load_type
usm_length              sm_length
utimeout                timeout
uwc_deadline            wc_deadline
uwc_execution_time      wc_execution_time
uwc_period              wc_period

Signed-off-by: Rene Sapiens <rene.sapiens@ti.com>
Signed-off-by: Armando Uribe <x0095078@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:12:24 -06:00
Rene Sapiens 085467b8f5 staging: tidspbridge: set8 remove hungarian from structs
hungarian notation will be removed from the elements inside
structures, the next varibles will be renamed:

Original:                Replacement:
hbridge_context          bridge_context
hchnl_mgr                chnl_mgr
hcmm_mgr                 cmm_mgr
hdcd_mgr                 dcd_mgr
hdeh_mgr                 deh_mgr
hdev_obj                 dev_obj
hdrv_obj                 drv_obj
hmgr_obj                 mgr_obj
hmsg_mgr                 msg_mgr
hnode_mgr                node_mgr
psz_last_coff            last_coff
ul_resource              resource
ul_seg_id                seg_id
ul_size                  size
ul_sm_size               sm_size
ul_total_free_size       total_free_size
ul_total_in_use_cnt      total_in_use_cnt
ul_total_seg_size        total_seg_size
ul_trace_buffer_begin    trace_buffer_begin
ul_trace_buffer_current  trace_buffer_current
ul_trace_buffer_end      trace_buffer_end
ul_unit                  unit
ul_virt_size             virt_size
us_dsp_mau_size          dsp_mau_size
us_dsp_word_size         dsp_word_size

Signed-off-by: Rene Sapiens <rene.sapiens@ti.com>
Signed-off-by: Armando Uribe <x0095078@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:12:22 -06:00
Rene Sapiens 6c66e948d2 staging: tidspbridge: set7 remove hungarian from structs
hungarian notation will be removed from the elements inside
structures, the next varibles will be renamed:

Original:               Replacement:
ul_gpp_phys             gpp_phys
ul_gpp_read_pointer     gpp_read_pointer
ul_gpp_size             gpp_size
ul_gpp_va               gpp_va
ul_heap_size            heap_size
ul_internal_mem_size    internal_mem_size
ul_in_use_cnt           in_use_cnt
ul_len_max_free_block   len_max_free_block
ul_max                  max
ul_min_block_size       min_block_size
ul_min                  min
ul_mpu_addr             mpu_addr
ul_n_bytes              bytes
ul_num_alloc_blocks     num_alloc_blocks
ul_number_bytes         number_bytes
ul_num_chnls            num_chnls
ul_num_free_blocks      num_free_blocks
ul_num_gppsm_segs       num_gppsm_segs
ul_pos                  pos
ul_reserved             reserved

Signed-off-by: Rene Sapiens <rene.sapiens@ti.com>
Signed-off-by: Armando Uribe <x0095078@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:12:19 -06:00
Rene Sapiens dab7f7fee0 staging: tidspbridge: set6 remove hungarian from structs
hungarian notation will be removed from the elements inside
structures, the next varibles will be renamed:

Original:		Replacement:
pfn_write               write
pf_phase_split          phase_split
ul_alignment            alignment
ul_bufsize              bufsize
ul_bufsize_rms          bufsize_rms
ul_chnl_buf_size        chnl_buf_size
ul_chnl_offset          chnl_offset
ul_code_mem_seg_mask    code_mem_seg_mask
ul_dais_arg             dais_arg
ul_data1                data1
ul_data_mem_seg_mask    data_mem_seg_mask
ul_dsp_addr             dsp_addr
ul_dsp_res_addr         dsp_res_addr
ul_dsp_size             dsp_size
ul_dsp_va               dsp_va
ul_dsp_virt             dsp_virt
ul_entry                entry
ul_external_mem_size    external_mem_size
ul_fxn_addrs            fxn_addrs
ul_gpp_pa               gpp_pa

Signed-off-by: Rene Sapiens <rene.sapiens@ti.com>
Signed-off-by: Armando Uribe <x0095078@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:12:17 -06:00
Rene Sapiens 09f133045c staging: tidspbridge: set5 remove hungarian from structs
hungarian notation will be removed from the elements inside
structures, the next varibles will be renamed:

Original:                Replacement:
pfn_dev_create           by dev_create
pfn_dev_destroy          dev_destroy
pfn_exit                 exit
pfn_get_fxn_addr         get_fxn_addr
pfn_init                 init
pfn_io_create            io_create
pfn_io_destroy           io_destroy
pfn_io_get_proc_load     io_get_proc_load
pfn_io_on_loaded         io_on_loaded
pfn_load                 load
pfn_msg_create           msg_create
pfn_msg_create_queue     msg_create_queue
pfn_msg_delete           msg_delete
pfn_msg_delete_queue     msg_delete_queue
pfn_msg_get              msg_get
pfn_msg_put              msg_put
pfn_msg_register_notify  msg_register_notify
pfn_msg_set_queue_id     msg_set_queue_id
pfn_ovly                 ovly
pfn_unload               unload

Signed-off-by: Rene Sapiens <rene.sapiens@ti.com>
Signed-off-by: Armando Uribe <x0095078@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:12:15 -06:00
Rene Sapiens e17ba7f202 staging: tidspbridge: set4 remove hungarian from structs
hungarian notation will be removed from the elements inside
structures, the next varibles will be renamed:

Original:                Replacement:
pfn_brd_set_state        brd_set_state
pfn_brd_start            brd_start
pfn_brd_status           brd_status
pfn_brd_stop             brd_stop
pfn_brd_write            brd_write
pfn_chnl_add_io_req      chnl_add_io_req
pfn_chnl_cancel_io       chnl_cancel_io
pfn_chnl_close           chnl_close
pfn_chnl_create          chnl_create
pfn_chnl_destroy         chnl_destroy
pfn_chnl_flush_io        chnl_flush_io
pfn_chnl_get_info        chnl_get_info
pfn_chnl_get_ioc         chnl_get_ioc
pfn_chnl_get_mgr_info    chnl_get_mgr_info
pfn_chnl_idle            chnl_idle
pfn_chnl_open            chnl_open
pfn_chnl_register_notify chnl_register_notify
pfn_create		 create
pfn_delete		 delete
pfn_dev_cntrl		 dev_cntrl

Signed-off-by: Rene Sapiens <rene.sapiens@ti.com>
Signed-off-by: Armando Uribe <x0095078@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:12:13 -06:00
Rene Sapiens 3c882de542 staging: tidspbridge: set3 remove hungarian from structs
hungarian notation will be removed from the elements inside
structures, the next varibles will be renamed:

Original:               Replacement:
dw_seg_base_va          seg_base_va
dw_self_loop            self_loop
dw_state                state
dw_tc_endianism         tc_endianism
dw_test_base            test_base
dw_type                 type
dw_val1                 val1
dw_val2                 val2
dw_val3                 val3
dw_va                   va
dw_virt_base            virt_base
dw_vm_base              vm_base
dw_vm_size              vm_size
pfn_allocate            allocate
pfn_brd_mem_copy        brd_mem_copy
pfn_brd_mem_map         brd_mem_map
pfn_brd_mem_un_map      brd_mem_un_map
pfn_brd_mem_write       brd_mem_write
pfn_brd_monitor         brd_monitor
pfn_brd_read            brd_read

Signed-off-by: Rene Sapiens <rene.sapiens@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:12:11 -06:00
Rene Sapiens 5108de0ae0 staging: tidspbridge: set2 remove hungarian from structs
hungarian notation will be removed from the elements inside
structures, the next varibles will be renamed:

Original:               Replacement:
dw_dsp_base_addr        dsp_base_addr
dw_dmmu_base            dmmu_base
dw_index                index
dw_int_addr             int_addr
dw_internal_size        internal_size
dw_last_output          last_output
dw_mem_base             mem_base
dw_mem_length           mem_length
dw_mem_phys             mem_phys
dw_mode                 mode
dw_num_chnls            num_chnls
dw_offset_for_monitor   offset_for_monitor
dw_output_mask          output_mask
dw_page_size            page_size
dw_pa                   pa
dw_per_base             per_base
dw_per_pm_base          per_pm_base
dw_public_rhea          public_rhea
dw_seg_base_pa          seg_base_pa

Signed-off-by: Rene Sapiens <rene.sapiens@ti.com>
Signed-off-by: Armando Uribe <x0095078@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:12:09 -06:00
Rene Sapiens b4da7fc381 staging: tidspbridge: set1 remove hungarian from structs
hungarian notation will be removed from the elements inside
structures, the next varibles will be renamed:

dw_api_reg_base         api_reg_base
dw_brd_state            brd_state
dw_chnl_buf_size        chnl_buf_size
dw_chnl_offset          chnl_offset
dw_cmd                  cmd
dw_core_pm_base         core_pm_base
dw_dsp_base             dsp_base
dw_dsp_base_va          dsp_base_va
dw_dsp_bufs             dsp_bufs
dw_dsp_buf_size         dsp_buf_size
dw_dsp_clk_m2_base      dsp_clk_m2_base
dw_dsp_ext_base_addr    dsp_ext_base_addr
dw_dsp_phys_addr_offset dsp_phys_addr_offset
dw_dsp_start_add        dsp_start_add
dw_err_mask             err_mask
dw_gpp_base_pa          gpp_base_pa
dw_api_clk_base         api_clk_base
dw_api_reg_base         api_reg_base
dw_arg                  arg
dw_arg1                 arg1
dw_arg2                 arg2
dw_chnl_buf_size        chnl_buf_size

Signed-off-by: Rene Sapiens <rene.sapiens@ti.com>
Signed-off-by: Armando Uribe <x0095078@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:12:07 -06:00
Ramos Falcon, Ernesto 92d0293038 staging: tidspbridge: remove code referred by OPT_ZERO_COPY_LOADER
Remove code referred by OPT_ZERO_COPY_LOADER since it is
not used.

Signed-off-by: Ernesto Ramos <ernesto@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:12:05 -06:00
Armando Uribe 157bc26dac staging: tidspbridge: Remove trivial header files
Remove the header files that contains few declarations
and can be merged onto more generic headers.

Signed-off-by: Armando Uribe <x0095078@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:12:02 -06:00
Armando Uribe 7792724074 staging: tidspbridge: Remove unused typedefs
Unsed typedefs are removed, because of there are not
used or because previous clean ups.

Signed-off-by: Armando Uribe <x0095078@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:12:00 -06:00
Armando Uribe 5db9e2bf44 staging: tidspbridge: Remove unused structs
Remove unused structs and its dependencies, like references
in other structs or as arguments of certain functions.

Signed-off-by: Armando Uribe <x0095078@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:11:58 -06:00
Armando Uribe 57e6a9f2a8 staging: tidspbridge: Remove unused functions
Remove functions that are not used at all, also remove the dependencies
of this functions like struct members, comments and calls.

Signed-off-by: Armando Uribe <x0095078@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:11:56 -06:00
Armando Uribe 2c36fac485 staging: tidspbridge: Remove unused defined constants
Remove defined constants not being used.

Signed-off-by: Armando Uribe <x0095078@ti.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:11:54 -06:00
Laurent Pinchart c378204afa staging: tidspbridge: Fix atoi to support hexadecimal numbers correctly
For some strange reason, the DSP base image node/object properties
description string stores hexadecimal numbers with a 'h' or 'H' suffix
instead of a '0x' prefix. This causes parsing issue because the
dspbridge atoi() implementation relies on strict_strtoul(), which will
return an error because of the trailing 'h' character.

As the atoi() return value is never checked for an error anyway, replace
strict_strtoul() with simple_strtoul() to ignore the suffix.

This fix gets rid of the following assertion failed messages that were
printed when running the dsp-dummy test application.

drivers/staging/tidspbridge/rmgr/nldr.c, line 1691:
Assertion (segid == MEMINTERNALID || segid == MEMEXTERNALID) failed.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:11:51 -06:00
Ionut Nicu 57104f0fbe staging: tidspbridge: rmgr/node.c code cleanup
Reorganized some code in rmgr/node.c to increase its
readability. Most of the changes reduce the code
indentation level and simplifiy the code. No functional
changes were done.

Signed-off-by: Ionut Nicu <ionut.nicu@mindbit.ro>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:11:49 -06:00
Omar Ramirez Luna a994b051b6 staging: tidspbridge: use the right type for list_is_last
Removes the following warning:

  CC [M]  drivers/staging/tidspbridge/rmgr/rmm.o
drivers/staging/tidspbridge/rmgr/rmm.c: In function 'rmm_alloc':
drivers/staging/tidspbridge/rmgr/rmm.c:147: warning: passing
	argument 1 of 'list_is_last' from incompatible pointer type
include/linux/list.h:170: note: expected 'const struct list_head *'
	but argument is of type 'struct rmm_ovly_sect *'

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Ionut Nicu <ionut.nicu@mindbit.ro>
2011-02-04 20:11:47 -06:00
Ionut Nicu ba44df6f88 staging: tidspbridge: pmgr code cleanup
Reorganized some code in the pmgr module to increase
its readability. No functional changes were done.

Signed-off-by: Ionut Nicu <ionut.nicu@mindbit.ro>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:11:45 -06:00
Ionut Nicu d65c14b361 staging: tidspbridge: core code cleanup
Reorganized some code in the core module to increase its
readability. Most of the changes reduce the code
indentation level and simplifiy the code. No functional
changes were done.

Signed-off-by: Ionut Nicu <ionut.nicu@mindbit.ro>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:11:43 -06:00
Ionut Nicu edbeef9647 staging: tidspbridge: remove custom linked list
Now that all users of lst_list have been converted to the
standard linux list_head API, we can remove the associated
header file.

Signed-off-by: Ionut Nicu <ionut.nicu@mindbit.ro>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:11:41 -06:00
Ionut Nicu 0005391f30 staging: tidspbridge: convert rmgr to list_head
Convert the rmgr module of the tidspbridge driver
to use struct list_head instead of struct lst_list.

Signed-off-by: Ionut Nicu <ionut.nicu@mindbit.ro>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:11:39 -06:00
Ionut Nicu 5fb45dac37 staging: tidspbridge: convert pmgr to list_head
Convert the pmgr module of the tidspbridge driver
to use struct list_head instead of struct lst_list.

Signed-off-by: Ionut Nicu <ionut.nicu@mindbit.ro>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:11:37 -06:00
Ionut Nicu 3c6bf30f1e staging: tidspbridge: convert core to list_head
Convert the core module of the tidspbridge driver
to use struct list_head instead of struct lst_list.

Signed-off-by: Ionut Nicu <ionut.nicu@mindbit.ro>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:11:35 -06:00
Ionut Nicu 6d7e925b88 staging: tidspbridge: remove gb bitmap implementation
Now that all users of gb have been converted to the
standard linux bitmap API, we can remove it from the
gen library.

Signed-off-by: Ionut Nicu <ionut.nicu@mindbit.ro>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:11:33 -06:00
Ionut Nicu b5a38abad0 staging: tidspbridge: switch to linux bitmap API
Replace the tidspbridge generic bitmap operations
with the linux standard bitmap implementation.

Signed-off-by: Ionut Nicu <ionut.nicu@mindbit.ro>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:11:30 -06:00
Ionut Nicu ad4adcc495 staging: tidspbridge: remove utildefs
Remove a header file that was not very useful to
the dspbridge driver.

Signed-off-by: Ionut Nicu <ionut.nicu@mindbit.ro>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:11:28 -06:00
Ionut Nicu 31de278078 staging: tidspbridge: remove gs memory allocator
Remove unnecessary wrappers for linux kernel memory
allocation primitives.

Signed-off-by: Ionut Nicu <ionut.nicu@mindbit.ro>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
2011-02-04 20:11:26 -06:00