* [PATCH 1/5] omap: OMAP_DSP is not in mainline, remove it
2010-05-16 15:46 [PATCH 0/8] dspbridge: improve Kconfig Felipe Contreras
@ 2010-05-16 15:46 ` Felipe Contreras
0 siblings, 0 replies; 8+ messages in thread
From: Felipe Contreras @ 2010-05-16 15:46 UTC (permalink / raw)
To: linux-omap
Cc: Omar Ramirez Luna, Fernando Guzman Lugo, Felipe Contreras,
Tony Lindgren
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
arch/arm/plat-omap/devices.c | 62 ------------------------------------------
1 files changed, 0 insertions(+), 62 deletions(-)
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
index dc2e631..b552976 100644
--- a/arch/arm/plat-omap/devices.c
+++ b/arch/arm/plat-omap/devices.c
@@ -30,67 +30,6 @@
#include <plat/mcbsp.h>
#include <plat/dsp_common.h>
-#if defined(CONFIG_OMAP_DSP) || defined(CONFIG_OMAP_DSP_MODULE)
-
-static struct dsp_platform_data dsp_pdata = {
- .kdev_list = LIST_HEAD_INIT(dsp_pdata.kdev_list),
-};
-
-static struct resource omap_dsp_resources[] = {
- {
- .name = "dsp_mmu",
- .start = -1,
- .flags = IORESOURCE_IRQ,
- },
-};
-
-static struct platform_device omap_dsp_device = {
- .name = "dsp",
- .id = -1,
- .num_resources = ARRAY_SIZE(omap_dsp_resources),
- .resource = omap_dsp_resources,
- .dev = {
- .platform_data = &dsp_pdata,
- },
-};
-
-static inline void omap_init_dsp(void)
-{
- struct resource *res;
- int irq;
-
- if (cpu_is_omap15xx())
- irq = INT_1510_DSP_MMU;
- else if (cpu_is_omap16xx())
- irq = INT_1610_DSP_MMU;
- else if (cpu_is_omap24xx())
- irq = INT_24XX_DSP_MMU;
-
- res = platform_get_resource_byname(&omap_dsp_device,
- IORESOURCE_IRQ, "dsp_mmu");
- res->start = irq;
-
- platform_device_register(&omap_dsp_device);
-}
-
-int dsp_kfunc_device_register(struct dsp_kfunc_device *kdev)
-{
- static DEFINE_MUTEX(dsp_pdata_lock);
-
- spin_lock_init(&kdev->lock);
-
- mutex_lock(&dsp_pdata_lock);
- list_add_tail(&kdev->entry, &dsp_pdata.kdev_list);
- mutex_unlock(&dsp_pdata_lock);
-
- return 0;
-}
-EXPORT_SYMBOL(dsp_kfunc_device_register);
-
-#else
-static inline void omap_init_dsp(void) { }
-#endif /* CONFIG_OMAP_DSP */
-
#if defined(CONFIG_MPU_BRIDGE) || defined(CONFIG_MPU_BRIDGE_MODULE)
static unsigned long dspbridge_phys_mempool_base;
@@ -410,7 +349,6 @@ static int __init omap_init_devices(void)
/* please keep these calls, and their implementations above,
* in alphabetical order so they're easier to sort through.
*/
- omap_init_dsp();
omap_init_kp();
omap_init_rng();
omap_init_uwire();
--
1.7.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 0/5] staging: ti dspbridge: improve Kconfig
@ 2010-07-04 13:36 Felipe Contreras
2010-07-04 13:36 ` [PATCH 1/5] omap: OMAP_DSP is not in mainline, remove it Felipe Contreras
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: Felipe Contreras @ 2010-07-04 13:36 UTC (permalink / raw)
To: linux-omap; +Cc: Ohad Ben-Cohen, Omar Ramirez Luna, Greg KH, Felipe Contreras
Hi,
The current Kconfig really needed some attention. I have tried to standarize
everything to CONFIG_TIDSPBRIDGE, unfortunately, it seems the dspgateway was
using that. Since that was never mainlined, I removed the dead code that was
relying on it (should move to the dspgateway branch).
Also, make some code only useful for debugging or testing configurable.
1) in production, DEBUG=n BACKTRACE=n
2) in internal testing, DEBUG=n BACKTRACE=y
3) in development debugging, DEBUG=y BACKTRACE=y
These apply on top of the deh rewrite patches.
(Essentially the same as the previous try, but rebased on top of staging tree)
Felipe Contreras (5):
omap: OMAP_DSP is not in mainline, remove it
staging: ti dspbridge: prefix configs with TIDSPBRIDGE
staging: ti dspbridge: improve Kconfig
staging: ti dspbridge: use _DEBUG for debug trace
staging: ti dspbridge: add _BACKTRACE config
arch/arm/plat-omap/devices.c | 62 --------------------
drivers/staging/tidspbridge/Kconfig | 42 +++++++------
drivers/staging/tidspbridge/core/io_sm.c | 30 +++++-----
drivers/staging/tidspbridge/core/tiomap3430_pwr.c | 30 +++++-----
drivers/staging/tidspbridge/core/tiomap_io.c | 4 +-
drivers/staging/tidspbridge/core/ue_deh.c | 8 ++-
drivers/staging/tidspbridge/core/wdt.c | 4 +-
drivers/staging/tidspbridge/gen/gh.c | 2 +
.../tidspbridge/include/dspbridge/_chnl_sm.h | 2 +-
.../staging/tidspbridge/include/dspbridge/dbc.h | 2 +-
.../staging/tidspbridge/include/dspbridge/dbll.h | 2 +
.../staging/tidspbridge/include/dspbridge/drv.h | 2 +-
drivers/staging/tidspbridge/include/dspbridge/gh.h | 2 +
.../staging/tidspbridge/include/dspbridge/io_sm.h | 6 +-
.../staging/tidspbridge/include/dspbridge/nldr.h | 2 +
.../staging/tidspbridge/include/dspbridge/node.h | 2 +
drivers/staging/tidspbridge/pmgr/dbll.c | 2 +
drivers/staging/tidspbridge/rmgr/drv.c | 2 +-
drivers/staging/tidspbridge/rmgr/drv_interface.c | 32 +++++-----
drivers/staging/tidspbridge/rmgr/nldr.c | 2 +
drivers/staging/tidspbridge/rmgr/node.c | 9 ++-
drivers/staging/tidspbridge/rmgr/proc.c | 8 +-
22 files changed, 111 insertions(+), 146 deletions(-)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/5] omap: OMAP_DSP is not in mainline, remove it
2010-07-04 13:36 [PATCH 0/5] staging: ti dspbridge: improve Kconfig Felipe Contreras
@ 2010-07-04 13:36 ` Felipe Contreras
2010-07-05 9:29 ` Tony Lindgren
2010-07-04 13:36 ` [PATCH 2/5] staging: ti dspbridge: prefix configs with TIDSPBRIDGE Felipe Contreras
` (3 subsequent siblings)
4 siblings, 1 reply; 8+ messages in thread
From: Felipe Contreras @ 2010-07-04 13:36 UTC (permalink / raw)
To: linux-omap
Cc: Ohad Ben-Cohen, Omar Ramirez Luna, Greg KH, Felipe Contreras,
Tony Lindgren
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
arch/arm/plat-omap/devices.c | 62 ------------------------------------------
1 files changed, 0 insertions(+), 62 deletions(-)
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
index 95677d1..a3997ec 100644
--- a/arch/arm/plat-omap/devices.c
+++ b/arch/arm/plat-omap/devices.c
@@ -31,67 +31,6 @@
#include <plat/dsp_common.h>
#include <plat/omap44xx.h>
-#if defined(CONFIG_OMAP_DSP) || defined(CONFIG_OMAP_DSP_MODULE)
-
-static struct dsp_platform_data dsp_pdata = {
- .kdev_list = LIST_HEAD_INIT(dsp_pdata.kdev_list),
-};
-
-static struct resource omap_dsp_resources[] = {
- {
- .name = "dsp_mmu",
- .start = -1,
- .flags = IORESOURCE_IRQ,
- },
-};
-
-static struct platform_device omap_dsp_device = {
- .name = "dsp",
- .id = -1,
- .num_resources = ARRAY_SIZE(omap_dsp_resources),
- .resource = omap_dsp_resources,
- .dev = {
- .platform_data = &dsp_pdata,
- },
-};
-
-static inline void omap_init_dsp(void)
-{
- struct resource *res;
- int irq;
-
- if (cpu_is_omap15xx())
- irq = INT_1510_DSP_MMU;
- else if (cpu_is_omap16xx())
- irq = INT_1610_DSP_MMU;
- else if (cpu_is_omap24xx())
- irq = INT_24XX_DSP_MMU;
-
- res = platform_get_resource_byname(&omap_dsp_device,
- IORESOURCE_IRQ, "dsp_mmu");
- res->start = irq;
-
- platform_device_register(&omap_dsp_device);
-}
-
-int dsp_kfunc_device_register(struct dsp_kfunc_device *kdev)
-{
- static DEFINE_MUTEX(dsp_pdata_lock);
-
- spin_lock_init(&kdev->lock);
-
- mutex_lock(&dsp_pdata_lock);
- list_add_tail(&kdev->entry, &dsp_pdata.kdev_list);
- mutex_unlock(&dsp_pdata_lock);
-
- return 0;
-}
-EXPORT_SYMBOL(dsp_kfunc_device_register);
-
-#else
-static inline void omap_init_dsp(void) { }
-#endif /* CONFIG_OMAP_DSP */
-
/*-------------------------------------------------------------------------*/
#if defined(CONFIG_KEYBOARD_OMAP) || defined(CONFIG_KEYBOARD_OMAP_MODULE)
@@ -419,7 +358,6 @@ static int __init omap_init_devices(void)
/* please keep these calls, and their implementations above,
* in alphabetical order so they're easier to sort through.
*/
- omap_init_dsp();
omap_init_kp();
omap_init_rng();
omap_init_mcpdm();
--
1.7.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/5] staging: ti dspbridge: prefix configs with TIDSPBRIDGE
2010-07-04 13:36 [PATCH 0/5] staging: ti dspbridge: improve Kconfig Felipe Contreras
2010-07-04 13:36 ` [PATCH 1/5] omap: OMAP_DSP is not in mainline, remove it Felipe Contreras
@ 2010-07-04 13:36 ` Felipe Contreras
2010-07-04 13:36 ` [PATCH 3/5] staging: ti dspbridge: improve Kconfig Felipe Contreras
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Felipe Contreras @ 2010-07-04 13:36 UTC (permalink / raw)
To: linux-omap; +Cc: Ohad Ben-Cohen, Omar Ramirez Luna, Greg KH, Felipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
drivers/staging/tidspbridge/Kconfig | 18 +++++-----
drivers/staging/tidspbridge/core/io_sm.c | 2 +-
drivers/staging/tidspbridge/core/tiomap3430_pwr.c | 30 +++++++++---------
drivers/staging/tidspbridge/core/tiomap_io.c | 4 +-
drivers/staging/tidspbridge/core/ue_deh.c | 2 +-
drivers/staging/tidspbridge/core/wdt.c | 4 +-
.../tidspbridge/include/dspbridge/_chnl_sm.h | 2 +-
.../staging/tidspbridge/include/dspbridge/dbc.h | 2 +-
.../staging/tidspbridge/include/dspbridge/drv.h | 2 +-
.../staging/tidspbridge/include/dspbridge/io_sm.h | 2 +-
drivers/staging/tidspbridge/rmgr/drv.c | 2 +-
drivers/staging/tidspbridge/rmgr/drv_interface.c | 32 ++++++++++----------
drivers/staging/tidspbridge/rmgr/node.c | 6 ++--
drivers/staging/tidspbridge/rmgr/proc.c | 8 ++--
14 files changed, 58 insertions(+), 58 deletions(-)
diff --git a/drivers/staging/tidspbridge/Kconfig b/drivers/staging/tidspbridge/Kconfig
index 45372cd..6ce443a 100644
--- a/drivers/staging/tidspbridge/Kconfig
+++ b/drivers/staging/tidspbridge/Kconfig
@@ -14,7 +14,7 @@ menuconfig TIDSPBRIDGE
This driver depends on OMAP Mailbox (OMAP_MBOX_FWK).
-config BRIDGE_DVFS
+config TIDSPBRIDGE_DVFS
bool "Enable Bridge Dynamic Voltage and Frequency Scaling (DVFS)"
depends on TIDSPBRIDGE && OMAP_PM_SRF && CPU_FREQ
default n
@@ -24,7 +24,7 @@ config BRIDGE_DVFS
performance and power consumption to the current processing
requirements.
-config BRIDGE_MEMPOOL_SIZE
+config TIDSPBRIDGE_MEMPOOL_SIZE
hex "Physical memory pool size (Byte)"
depends on TIDSPBRIDGE
default 0x600000
@@ -32,20 +32,20 @@ config BRIDGE_MEMPOOL_SIZE
Allocate specified size of memory at booting time to avoid allocation
failure under heavy memory fragmentation after some use time.
-config BRIDGE_DEBUG
+config TIDSPBRIDGE_DEBUG
bool "DSP Bridge Debug Support"
depends on TIDSPBRIDGE
help
Say Y to enable Bridge debugging capabilities
-config BRIDGE_RECOVERY
+config TIDSPBRIDGE_RECOVERY
bool "DSP Recovery Support"
depends on TIDSPBRIDGE
help
In case of DSP fatal error, BRIDGE driver will try to
recover itself.
-config BRIDGE_CACHE_LINE_CHECK
+config TIDSPBRIDGE_CACHE_LINE_CHECK
bool "Check buffers to be 128 byte aligned"
depends on TIDSPBRIDGE
default n
@@ -59,7 +59,7 @@ config BRIDGE_CACHE_LINE_CHECK
This can lead to heap corruption. Say Y, to enforce the check for 128
byte alignment, buffers failing this check will be rejected.
-config BRIDGE_WDT3
+config TIDSPBRIDGE_WDT3
bool "Enable WDT3 interruptions"
depends on TIDSPBRIDGE
default n
@@ -68,9 +68,9 @@ config BRIDGE_WDT3
charge of refreshing the timer before overflow, if the DSP hangs MPU
will caught the interrupt and try to recover DSP.
-config WDT_TIMEOUT
+config TIDSPBRIDGE_WDT_TIMEOUT
int "DSP watchdog timer timeout (in secs)"
- depends on BRIDGE_WDT3
+ depends on TIDSPBRIDGE_WDT3
default 5
help
Watchdog timer timeout value, after that time if the watchdog timer
@@ -79,7 +79,7 @@ config WDT_TIMEOUT
comment "Bridge Notifications"
depends on TIDSPBRIDGE
-config BRIDGE_NTFY_PWRERR
+config TIDSPBRIDGE_NTFY_PWRERR
bool "Notify DSP Power Error"
depends on TIDSPBRIDGE
help
diff --git a/drivers/staging/tidspbridge/core/io_sm.c b/drivers/staging/tidspbridge/core/io_sm.c
index 7fb840d..ee33abb 100644
--- a/drivers/staging/tidspbridge/core/io_sm.c
+++ b/drivers/staging/tidspbridge/core/io_sm.c
@@ -1731,7 +1731,7 @@ void io_intr_dsp2(IN struct io_mgr *pio_mgr, IN u16 mb_val)
*/
int io_sh_msetting(struct io_mgr *hio_mgr, u8 desc, void *pargs)
{
-#ifdef CONFIG_BRIDGE_DVFS
+#ifdef CONFIG_TIDSPBRIDGE_DVFS
u32 i;
struct dspbridge_platform_data *pdata =
omap_dspbridge_dev->dev.platform_data;
diff --git a/drivers/staging/tidspbridge/core/tiomap3430_pwr.c b/drivers/staging/tidspbridge/core/tiomap3430_pwr.c
index 00ebc0b..5df9421 100644
--- a/drivers/staging/tidspbridge/core/tiomap3430_pwr.c
+++ b/drivers/staging/tidspbridge/core/tiomap3430_pwr.c
@@ -52,7 +52,7 @@
int handle_constraints_set(struct bridge_dev_context *dev_context,
IN void *pargs)
{
-#ifdef CONFIG_BRIDGE_DVFS
+#ifdef CONFIG_TIDSPBRIDGE_DVFS
u32 *constraint_val;
struct dspbridge_platform_data *pdata =
omap_dspbridge_dev->dev.platform_data;
@@ -65,7 +65,7 @@ int handle_constraints_set(struct bridge_dev_context *dev_context,
/* Set the new opp value */
if (pdata->dsp_set_min_opp)
(*pdata->dsp_set_min_opp) ((u32) *(constraint_val + 1));
-#endif /* #ifdef CONFIG_BRIDGE_DVFS */
+#endif /* #ifdef CONFIG_TIDSPBRIDGE_DVFS */
return 0;
}
@@ -79,7 +79,7 @@ int handle_hibernation_from_dsp(struct bridge_dev_context *dev_context)
#ifdef CONFIG_PM
u16 timeout = PWRSTST_TIMEOUT / 10;
u32 pwr_state;
-#ifdef CONFIG_BRIDGE_DVFS
+#ifdef CONFIG_TIDSPBRIDGE_DVFS
u32 opplevel;
struct io_mgr *hio_mgr;
#endif
@@ -115,7 +115,7 @@ int handle_hibernation_from_dsp(struct bridge_dev_context *dev_context)
if (DSP_SUCCEEDED(status)) {
/* Update the Bridger Driver state */
dev_context->dw_brd_state = BRD_DSP_HIBERNATION;
-#ifdef CONFIG_BRIDGE_DVFS
+#ifdef CONFIG_TIDSPBRIDGE_DVFS
status =
dev_get_io_mgr(dev_context->hdev_obj, &hio_mgr);
if (!hio_mgr) {
@@ -131,7 +131,7 @@ int handle_hibernation_from_dsp(struct bridge_dev_context *dev_context)
if (pdata->dsp_set_min_opp)
(*pdata->dsp_set_min_opp) (VDD1_OPP1);
status = 0;
-#endif /* CONFIG_BRIDGE_DVFS */
+#endif /* CONFIG_TIDSPBRIDGE_DVFS */
}
}
#endif
@@ -147,9 +147,9 @@ int sleep_dsp(struct bridge_dev_context *dev_context, IN u32 dw_cmd,
{
int status = 0;
#ifdef CONFIG_PM
-#ifdef CONFIG_BRIDGE_NTFY_PWRERR
+#ifdef CONFIG_TIDSPBRIDGE_NTFY_PWRERR
struct deh_mgr *hdeh_mgr;
-#endif /* CONFIG_BRIDGE_NTFY_PWRERR */
+#endif /* CONFIG_TIDSPBRIDGE_NTFY_PWRERR */
u16 timeout = PWRSTST_TIMEOUT / 10;
u32 pwr_state, target_pwr_state;
struct dspbridge_platform_data *pdata =
@@ -211,10 +211,10 @@ int sleep_dsp(struct bridge_dev_context *dev_context, IN u32 dw_cmd,
if (!timeout) {
pr_err("%s: Timed out waiting for DSP off mode, state %x\n",
__func__, pwr_state);
-#ifdef CONFIG_BRIDGE_NTFY_PWRERR
+#ifdef CONFIG_TIDSPBRIDGE_NTFY_PWRERR
dev_get_deh_mgr(dev_context->hdev_obj, &hdeh_mgr);
bridge_deh_notify(hdeh_mgr, DSP_PWRERROR, 0);
-#endif /* CONFIG_BRIDGE_NTFY_PWRERR */
+#endif /* CONFIG_TIDSPBRIDGE_NTFY_PWRERR */
return -ETIMEDOUT;
} else {
/* Update the Bridger Driver state */
@@ -230,7 +230,7 @@ int sleep_dsp(struct bridge_dev_context *dev_context, IN u32 dw_cmd,
status = dsp_clock_disable_all(dev_context->dsp_per_clks);
if (DSP_FAILED(status))
return status;
-#ifdef CONFIG_BRIDGE_DVFS
+#ifdef CONFIG_TIDSPBRIDGE_DVFS
else if (target_pwr_state == PWRDM_POWER_OFF) {
/*
* Set the OPP to low level before moving to OFF mode
@@ -238,7 +238,7 @@ int sleep_dsp(struct bridge_dev_context *dev_context, IN u32 dw_cmd,
if (pdata->dsp_set_min_opp)
(*pdata->dsp_set_min_opp) (VDD1_OPP1);
}
-#endif /* CONFIG_BRIDGE_DVFS */
+#endif /* CONFIG_TIDSPBRIDGE_DVFS */
}
#endif /* CONFIG_PM */
return status;
@@ -338,7 +338,7 @@ int dsp_peripheral_clk_ctrl(struct bridge_dev_context *dev_context,
*/
int pre_scale_dsp(struct bridge_dev_context *dev_context, IN void *pargs)
{
-#ifdef CONFIG_BRIDGE_DVFS
+#ifdef CONFIG_TIDSPBRIDGE_DVFS
u32 level;
u32 voltage_domain;
@@ -360,7 +360,7 @@ int pre_scale_dsp(struct bridge_dev_context *dev_context, IN void *pargs)
} else {
return -EPERM;
}
-#endif /* #ifdef CONFIG_BRIDGE_DVFS */
+#endif /* #ifdef CONFIG_TIDSPBRIDGE_DVFS */
return 0;
}
@@ -373,7 +373,7 @@ int post_scale_dsp(struct bridge_dev_context *dev_context,
IN void *pargs)
{
int status = 0;
-#ifdef CONFIG_BRIDGE_DVFS
+#ifdef CONFIG_TIDSPBRIDGE_DVFS
u32 level;
u32 voltage_domain;
struct io_mgr *hio_mgr;
@@ -403,7 +403,7 @@ int post_scale_dsp(struct bridge_dev_context *dev_context,
} else {
status = -EPERM;
}
-#endif /* #ifdef CONFIG_BRIDGE_DVFS */
+#endif /* #ifdef CONFIG_TIDSPBRIDGE_DVFS */
return status;
}
diff --git a/drivers/staging/tidspbridge/core/tiomap_io.c b/drivers/staging/tidspbridge/core/tiomap_io.c
index 3b2ea70..e7cfbee 100644
--- a/drivers/staging/tidspbridge/core/tiomap_io.c
+++ b/drivers/staging/tidspbridge/core/tiomap_io.c
@@ -388,7 +388,7 @@ int write_ext_dsp_data(struct bridge_dev_context *dev_context,
int sm_interrupt_dsp(struct bridge_dev_context *dev_context, u16 mb_val)
{
-#ifdef CONFIG_BRIDGE_DVFS
+#ifdef CONFIG_TIDSPBRIDGE_DVFS
u32 opplevel = 0;
#endif
struct dspbridge_platform_data *pdata =
@@ -405,7 +405,7 @@ int sm_interrupt_dsp(struct bridge_dev_context *dev_context, u16 mb_val)
if (dev_context->dw_brd_state == BRD_DSP_HIBERNATION ||
dev_context->dw_brd_state == BRD_HIBERNATION) {
-#ifdef CONFIG_BRIDGE_DVFS
+#ifdef CONFIG_TIDSPBRIDGE_DVFS
if (pdata->dsp_get_opp)
opplevel = (*pdata->dsp_get_opp) ();
if (opplevel == VDD1_OPP1) {
diff --git a/drivers/staging/tidspbridge/core/ue_deh.c b/drivers/staging/tidspbridge/core/ue_deh.c
index f73604f..2bdf92e 100644
--- a/drivers/staging/tidspbridge/core/ue_deh.c
+++ b/drivers/staging/tidspbridge/core/ue_deh.c
@@ -250,7 +250,7 @@ void bridge_deh_notify(struct deh_mgr *deh, int event, int info)
/* Filter subsequent notifications when an error occurs */
if (dev_context->dw_brd_state != BRD_ERROR) {
ntfy_notify(deh->ntfy_obj, event);
-#ifdef CONFIG_BRIDGE_RECOVERY
+#ifdef CONFIG_TIDSPBRIDGE_RECOVERY
bridge_recover_schedule();
#endif
}
diff --git a/drivers/staging/tidspbridge/core/wdt.c b/drivers/staging/tidspbridge/core/wdt.c
index 5881fe0..dd1afe7 100644
--- a/drivers/staging/tidspbridge/core/wdt.c
+++ b/drivers/staging/tidspbridge/core/wdt.c
@@ -25,7 +25,7 @@
#include <dspbridge/host_os.h>
-#ifdef CONFIG_BRIDGE_WDT3
+#ifdef CONFIG_TIDSPBRIDGE_WDT3
#define OMAP34XX_WDT3_BASE (L4_PER_34XX_BASE + 0x30000)
@@ -84,7 +84,7 @@ int dsp_wdt_init(void)
void dsp_wdt_sm_set(void *data)
{
dsp_wdt.sm_wdt = data;
- dsp_wdt.sm_wdt->wdt_overflow = CONFIG_WDT_TIMEOUT;
+ dsp_wdt.sm_wdt->wdt_overflow = CONFIG_TIDSPBRIDGE_WDT_TIMEOUT;
}
diff --git a/drivers/staging/tidspbridge/include/dspbridge/_chnl_sm.h b/drivers/staging/tidspbridge/include/dspbridge/_chnl_sm.h
index cdca172..8efd1fb 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/_chnl_sm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/_chnl_sm.h
@@ -99,7 +99,7 @@ struct shm {
struct opp_rqst_struct opp_request;
/* load monitor information structure */
struct load_mon_struct load_mon_info;
-#ifdef CONFIG_BRIDGE_WDT3
+#ifdef CONFIG_TIDSPBRIDGE_WDT3
/* Flag for WDT enable/disable F/I clocks */
u32 wdt_setclocks;
u32 wdt_overflow; /* WDT overflow time */
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dbc.h b/drivers/staging/tidspbridge/include/dspbridge/dbc.h
index 76f049e..463760f 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dbc.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dbc.h
@@ -26,7 +26,7 @@
#define DBC_
/* Assertion Macros: */
-#ifdef CONFIG_BRIDGE_DEBUG
+#ifdef CONFIG_TIDSPBRIDGE_DEBUG
#define DBC_ASSERT(exp) \
if (!(exp)) \
diff --git a/drivers/staging/tidspbridge/include/dspbridge/drv.h b/drivers/staging/tidspbridge/include/dspbridge/drv.h
index 66f12ef..020bed0 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/drv.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/drv.h
@@ -419,7 +419,7 @@ extern int drv_release_resources(IN u32 dw_context,
*/
int drv_request_bridge_res_dsp(void **phost_resources);
-#ifdef CONFIG_BRIDGE_RECOVERY
+#ifdef CONFIG_TIDSPBRIDGE_RECOVERY
void bridge_recover_schedule(void);
#endif
diff --git a/drivers/staging/tidspbridge/include/dspbridge/io_sm.h b/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
index 3ffd542..c3557ef 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
@@ -41,7 +41,7 @@
#define IO_SET_LONG(pContext, type, base, field, value) (base->field = value)
#define IO_GET_LONG(pContext, type, base, field) (base->field)
-#ifdef CONFIG_BRIDGE_DVFS
+#ifdef CONFIG_TIDSPBRIDGE_DVFS
/* The maximum number of OPPs that are supported */
extern s32 dsp_max_opps;
/* The Vdd1 opp table information */
diff --git a/drivers/staging/tidspbridge/rmgr/drv.c b/drivers/staging/tidspbridge/rmgr/drv.c
index c6e38e5..72e2804 100644
--- a/drivers/staging/tidspbridge/rmgr/drv.c
+++ b/drivers/staging/tidspbridge/rmgr/drv.c
@@ -517,7 +517,7 @@ int drv_get_dev_object(u32 index, struct drv_object *hdrv_obj,
struct dev_object **phDevObject)
{
int status = 0;
-#ifdef CONFIG_BRIDGE_DEBUG
+#ifdef CONFIG_TIDSPBRIDGE_DEBUG
/* used only for Assertions and debug messages */
struct drv_object *pdrv_obj = (struct drv_object *)hdrv_obj;
#endif
diff --git a/drivers/staging/tidspbridge/rmgr/drv_interface.c b/drivers/staging/tidspbridge/rmgr/drv_interface.c
index f0f089b..27db842 100644
--- a/drivers/staging/tidspbridge/rmgr/drv_interface.c
+++ b/drivers/staging/tidspbridge/rmgr/drv_interface.c
@@ -62,7 +62,7 @@
#include <dspbridge/drvdefs.h>
#include <dspbridge/drv.h>
-#ifdef CONFIG_BRIDGE_DVFS
+#ifdef CONFIG_TIDSPBRIDGE_DVFS
#include <mach-omap2/omap3-opp.h>
#endif
@@ -88,7 +88,7 @@ static char *base_img;
char *iva_img;
static s32 shm_size = 0x500000; /* 5 MB */
static int tc_wordswapon; /* Default value is always false */
-#ifdef CONFIG_BRIDGE_RECOVERY
+#ifdef CONFIG_TIDSPBRIDGE_RECOVERY
#define REC_TIMEOUT 5000 /*recovery timeout in msecs */
static atomic_t bridge_cref; /* number of bridge open handles */
static struct workqueue_struct *bridge_rec_queue;
@@ -148,13 +148,13 @@ static const struct file_operations bridge_fops = {
#ifdef CONFIG_PM
static u32 time_out = 1000;
-#ifdef CONFIG_BRIDGE_DVFS
+#ifdef CONFIG_TIDSPBRIDGE_DVFS
s32 dsp_max_opps = VDD1_OPP5;
#endif
/* Maximum Opps that can be requested by IVA */
/*vdd1 rate table */
-#ifdef CONFIG_BRIDGE_DVFS
+#ifdef CONFIG_TIDSPBRIDGE_DVFS
const struct omap_opp vdd1_rate_table_bridge[] = {
{0, 0, 0},
/*OPP1 */
@@ -187,7 +187,7 @@ u32 vdd1_dsp_freq[6][4] = {
{0, 430000, 355000, 430000},
};
-#ifdef CONFIG_BRIDGE_RECOVERY
+#ifdef CONFIG_TIDSPBRIDGE_RECOVERY
static void bridge_recover(struct work_struct *work)
{
struct dev_object *dev;
@@ -214,7 +214,7 @@ void bridge_recover_schedule(void)
queue_work(bridge_rec_queue, &bridge_recovery_work);
}
#endif
-#ifdef CONFIG_BRIDGE_DVFS
+#ifdef CONFIG_TIDSPBRIDGE_DVFS
static int dspbridge_scale_notification(struct notifier_block *op,
unsigned long val, void *ptr)
{
@@ -247,7 +247,7 @@ static int omap3_bridge_startup(struct platform_device *pdev)
u32 phys_membase, phys_memsize;
int err;
-#ifdef CONFIG_BRIDGE_RECOVERY
+#ifdef CONFIG_TIDSPBRIDGE_RECOVERY
bridge_rec_queue = create_workqueue("bridge_rec_queue");
INIT_WORK(&bridge_recovery_work, bridge_recover);
INIT_COMPLETION(bridge_comp);
@@ -258,7 +258,7 @@ static int omap3_bridge_startup(struct platform_device *pdev)
bridge_suspend_data.suspended = 0;
init_waitqueue_head(&bridge_suspend_data.suspend_wq);
-#ifdef CONFIG_BRIDGE_DVFS
+#ifdef CONFIG_TIDSPBRIDGE_DVFS
for (i = 0; i < 6; i++)
pdata->mpu_speed[i] = vdd1_rate_table_bridge[i].rate;
@@ -323,7 +323,7 @@ err3:
err2:
kfree(drv_datap);
err1:
-#ifdef CONFIG_BRIDGE_DVFS
+#ifdef CONFIG_TIDSPBRIDGE_DVFS
cpufreq_unregister_notifier(&iva_clk_notifier,
CPUFREQ_TRANSITION_NOTIFIER);
#endif
@@ -337,7 +337,7 @@ static int __devinit omap34_xx_bridge_probe(struct platform_device *pdev)
{
int err;
dev_t dev = 0;
-#ifdef CONFIG_BRIDGE_DVFS
+#ifdef CONFIG_TIDSPBRIDGE_DVFS
int i = 0;
#endif
@@ -400,12 +400,12 @@ static int __devexit omap34_xx_bridge_remove(struct platform_device *pdev)
if (DSP_FAILED(status))
goto func_cont;
-#ifdef CONFIG_BRIDGE_DVFS
+#ifdef CONFIG_TIDSPBRIDGE_DVFS
if (cpufreq_unregister_notifier(&iva_clk_notifier,
CPUFREQ_TRANSITION_NOTIFIER))
pr_err("%s: cpufreq_unregister_notifier failed for iva2_ck\n",
__func__);
-#endif /* #ifdef CONFIG_BRIDGE_DVFS */
+#endif /* #ifdef CONFIG_TIDSPBRIDGE_DVFS */
if (driver_context) {
/* Put the DSP in reset state */
@@ -497,7 +497,7 @@ static int bridge_open(struct inode *ip, struct file *filp)
* process context list.
*/
-#ifdef CONFIG_BRIDGE_RECOVERY
+#ifdef CONFIG_TIDSPBRIDGE_RECOVERY
if (recover) {
if (filp->f_flags & O_NONBLOCK ||
wait_for_completion_interruptible(&bridge_open_comp))
@@ -518,7 +518,7 @@ static int bridge_open(struct inode *ip, struct file *filp)
}
filp->private_data = pr_ctxt;
-#ifdef CONFIG_BRIDGE_RECOVERY
+#ifdef CONFIG_TIDSPBRIDGE_RECOVERY
if (!status)
atomic_inc(&bridge_cref);
#endif
@@ -548,7 +548,7 @@ static int bridge_release(struct inode *ip, struct file *filp)
filp->private_data = NULL;
err:
-#ifdef CONFIG_BRIDGE_RECOVERY
+#ifdef CONFIG_TIDSPBRIDGE_RECOVERY
if (!atomic_dec_return(&bridge_cref))
complete(&bridge_comp);
#endif
@@ -564,7 +564,7 @@ static long bridge_ioctl(struct file *filp, unsigned int code,
union Trapped_Args buf_in;
DBC_REQUIRE(filp != NULL);
-#ifdef CONFIG_BRIDGE_RECOVERY
+#ifdef CONFIG_TIDSPBRIDGE_RECOVERY
if (recover) {
status = -EIO;
goto err;
diff --git a/drivers/staging/tidspbridge/rmgr/node.c b/drivers/staging/tidspbridge/rmgr/node.c
index b5c99dc..329fe5e 100644
--- a/drivers/staging/tidspbridge/rmgr/node.c
+++ b/drivers/staging/tidspbridge/rmgr/node.c
@@ -1156,7 +1156,7 @@ int node_create(struct node_object *hnode)
u32 proc_id = 255;
struct dsp_processorstate proc_state;
struct proc_object *hprocessor;
-#if defined(CONFIG_BRIDGE_DVFS) && !defined(CONFIG_CPU_FREQ)
+#if defined(CONFIG_TIDSPBRIDGE_DVFS) && !defined(CONFIG_CPU_FREQ)
struct dspbridge_platform_data *pdata =
omap_dspbridge_dev->dev.platform_data;
#endif
@@ -1208,7 +1208,7 @@ int node_create(struct node_object *hnode)
if (DSP_SUCCEEDED(status)) {
/* If node's create function is not loaded, load it */
/* Boost the OPP level to max level that DSP can be requested */
-#if defined(CONFIG_BRIDGE_DVFS) && !defined(CONFIG_CPU_FREQ)
+#if defined(CONFIG_TIDSPBRIDGE_DVFS) && !defined(CONFIG_CPU_FREQ)
if (pdata->cpu_set_freq)
(*pdata->cpu_set_freq) (pdata->mpu_speed[VDD1_OPP3]);
#endif
@@ -1226,7 +1226,7 @@ int node_create(struct node_object *hnode)
__func__, status);
}
/* Request the lowest OPP level */
-#if defined(CONFIG_BRIDGE_DVFS) && !defined(CONFIG_CPU_FREQ)
+#if defined(CONFIG_TIDSPBRIDGE_DVFS) && !defined(CONFIG_CPU_FREQ)
if (pdata->cpu_set_freq)
(*pdata->cpu_set_freq) (pdata->mpu_speed[VDD1_OPP1]);
#endif
diff --git a/drivers/staging/tidspbridge/rmgr/proc.c b/drivers/staging/tidspbridge/rmgr/proc.c
index 084f7b9..d138d11 100644
--- a/drivers/staging/tidspbridge/rmgr/proc.c
+++ b/drivers/staging/tidspbridge/rmgr/proc.c
@@ -1081,7 +1081,7 @@ int proc_load(void *hprocessor, IN CONST s32 argc_index,
struct timeval tv2;
#endif
-#if defined(CONFIG_BRIDGE_DVFS) && !defined(CONFIG_CPU_FREQ)
+#if defined(CONFIG_TIDSPBRIDGE_DVFS) && !defined(CONFIG_CPU_FREQ)
struct dspbridge_platform_data *pdata =
omap_dspbridge_dev->dev.platform_data;
#endif
@@ -1218,7 +1218,7 @@ int proc_load(void *hprocessor, IN CONST s32 argc_index,
/* Now, attempt to load an exec: */
/* Boost the OPP level to Maximum level supported by baseport */
-#if defined(CONFIG_BRIDGE_DVFS) && !defined(CONFIG_CPU_FREQ)
+#if defined(CONFIG_TIDSPBRIDGE_DVFS) && !defined(CONFIG_CPU_FREQ)
if (pdata->cpu_set_freq)
(*pdata->cpu_set_freq) (pdata->mpu_speed[VDD1_OPP5]);
#endif
@@ -1236,7 +1236,7 @@ int proc_load(void *hprocessor, IN CONST s32 argc_index,
}
}
/* Requesting the lowest opp supported */
-#if defined(CONFIG_BRIDGE_DVFS) && !defined(CONFIG_CPU_FREQ)
+#if defined(CONFIG_TIDSPBRIDGE_DVFS) && !defined(CONFIG_CPU_FREQ)
if (pdata->cpu_set_freq)
(*pdata->cpu_set_freq) (pdata->mpu_speed[VDD1_OPP1]);
#endif
@@ -1338,7 +1338,7 @@ int proc_map(void *hprocessor, void *pmpu_addr, u32 ul_size,
struct dmm_map_object *map_obj;
u32 tmp_addr = 0;
-#ifdef CONFIG_BRIDGE_CACHE_LINE_CHECK
+#ifdef CONFIG_TIDSPBRIDGE_CACHE_LINE_CHECK
if ((ul_map_attr & BUFMODE_MASK) != RBUF) {
if (!IS_ALIGNED((u32)pmpu_addr, DSP_CACHE_LINE) ||
!IS_ALIGNED(ul_size, DSP_CACHE_LINE)) {
--
1.7.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/5] staging: ti dspbridge: improve Kconfig
2010-07-04 13:36 [PATCH 0/5] staging: ti dspbridge: improve Kconfig Felipe Contreras
2010-07-04 13:36 ` [PATCH 1/5] omap: OMAP_DSP is not in mainline, remove it Felipe Contreras
2010-07-04 13:36 ` [PATCH 2/5] staging: ti dspbridge: prefix configs with TIDSPBRIDGE Felipe Contreras
@ 2010-07-04 13:36 ` Felipe Contreras
2010-07-04 13:36 ` [PATCH 4/5] staging: ti dspbridge: use _DEBUG for debug trace Felipe Contreras
2010-07-04 13:36 ` [PATCH 5/5] staging: ti dspbridge: add _BACKTRACE config Felipe Contreras
4 siblings, 0 replies; 8+ messages in thread
From: Felipe Contreras @ 2010-07-04 13:36 UTC (permalink / raw)
To: linux-omap; +Cc: Ohad Ben-Cohen, Omar Ramirez Luna, Greg KH, Felipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
drivers/staging/tidspbridge/Kconfig | 19 +++++++------------
1 files changed, 7 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/tidspbridge/Kconfig b/drivers/staging/tidspbridge/Kconfig
index 6ce443a..4d63b66 100644
--- a/drivers/staging/tidspbridge/Kconfig
+++ b/drivers/staging/tidspbridge/Kconfig
@@ -17,7 +17,6 @@ menuconfig TIDSPBRIDGE
config TIDSPBRIDGE_DVFS
bool "Enable Bridge Dynamic Voltage and Frequency Scaling (DVFS)"
depends on TIDSPBRIDGE && OMAP_PM_SRF && CPU_FREQ
- default n
help
DVFS allows DSP Bridge to initiate the operating point change to
scale the chip voltage and frequency in order to match the
@@ -33,14 +32,15 @@ config TIDSPBRIDGE_MEMPOOL_SIZE
failure under heavy memory fragmentation after some use time.
config TIDSPBRIDGE_DEBUG
- bool "DSP Bridge Debug Support"
+ bool "Debug Support"
depends on TIDSPBRIDGE
help
Say Y to enable Bridge debugging capabilities
config TIDSPBRIDGE_RECOVERY
- bool "DSP Recovery Support"
+ bool "Recovery Support"
depends on TIDSPBRIDGE
+ default y
help
In case of DSP fatal error, BRIDGE driver will try to
recover itself.
@@ -48,7 +48,6 @@ config TIDSPBRIDGE_RECOVERY
config TIDSPBRIDGE_CACHE_LINE_CHECK
bool "Check buffers to be 128 byte aligned"
depends on TIDSPBRIDGE
- default n
help
When the DSP processes data, the DSP cache controller loads 128-Byte
chunks (lines) from SDRAM and writes the data back in 128-Byte chunks.
@@ -60,27 +59,23 @@ config TIDSPBRIDGE_CACHE_LINE_CHECK
byte alignment, buffers failing this check will be rejected.
config TIDSPBRIDGE_WDT3
- bool "Enable WDT3 interruptions"
+ bool "Enable watchdog timer"
depends on TIDSPBRIDGE
- default n
help
WTD3 is managed by DSP and once it is enabled, DSP side bridge is in
charge of refreshing the timer before overflow, if the DSP hangs MPU
will caught the interrupt and try to recover DSP.
config TIDSPBRIDGE_WDT_TIMEOUT
- int "DSP watchdog timer timeout (in secs)"
- depends on TIDSPBRIDGE_WDT3
+ int "Watchdog timer timeout (in secs)"
+ depends on TIDSPBRIDGE && TIDSPBRIDGE_WDT3
default 5
help
Watchdog timer timeout value, after that time if the watchdog timer
counter is not reset the wdt overflow interrupt will be triggered
-comment "Bridge Notifications"
- depends on TIDSPBRIDGE
-
config TIDSPBRIDGE_NTFY_PWRERR
- bool "Notify DSP Power Error"
+ bool "Notify power errors"
depends on TIDSPBRIDGE
help
Enable notifications to registered clients on the event of power errror
--
1.7.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/5] staging: ti dspbridge: use _DEBUG for debug trace
2010-07-04 13:36 [PATCH 0/5] staging: ti dspbridge: improve Kconfig Felipe Contreras
` (2 preceding siblings ...)
2010-07-04 13:36 ` [PATCH 3/5] staging: ti dspbridge: improve Kconfig Felipe Contreras
@ 2010-07-04 13:36 ` Felipe Contreras
2010-07-04 13:36 ` [PATCH 5/5] staging: ti dspbridge: add _BACKTRACE config Felipe Contreras
4 siblings, 0 replies; 8+ messages in thread
From: Felipe Contreras @ 2010-07-04 13:36 UTC (permalink / raw)
To: linux-omap; +Cc: Ohad Ben-Cohen, Omar Ramirez Luna, Greg KH, Felipe Contreras
Obviously nobody was using DSP_TRACEBUF_DISABLED, since it wasn't even
standarized between TRACEBUF and TRACE_BUF.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
drivers/staging/tidspbridge/core/io_sm.c | 16 ++++++++--------
.../staging/tidspbridge/include/dspbridge/io_sm.h | 2 +-
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/tidspbridge/core/io_sm.c b/drivers/staging/tidspbridge/core/io_sm.c
index ee33abb..8909c41 100644
--- a/drivers/staging/tidspbridge/core/io_sm.c
+++ b/drivers/staging/tidspbridge/core/io_sm.c
@@ -114,7 +114,7 @@ struct io_mgr {
struct mgr_processorextinfo ext_proc_info;
struct cmm_object *hcmm_mgr; /* Shared Mem Mngr */
struct work_struct io_workq; /* workqueue */
-#ifndef DSP_TRACEBUF_DISABLED
+#ifdef CONFIG_TIDSPBRIDGE_DEBUG
u32 ul_trace_buffer_begin; /* Trace message start address */
u32 ul_trace_buffer_end; /* Trace message end address */
u32 ul_trace_buffer_current; /* Trace message current address */
@@ -210,7 +210,7 @@ int bridge_io_create(OUT struct io_mgr **phIOMgr,
}
/* Initialize chnl_mgr object */
-#ifndef DSP_TRACEBUF_DISABLED
+#ifdef CONFIG_TIDSPBRIDGE_DEBUG
pio_mgr->pmsg = NULL;
#endif
pio_mgr->hchnl_mgr = hchnl_mgr;
@@ -265,7 +265,7 @@ int bridge_io_destroy(struct io_mgr *hio_mgr)
/* Free IO DPC object */
tasklet_kill(&hio_mgr->dpc_tasklet);
-#ifndef DSP_TRACEBUF_DISABLED
+#ifdef CONFIG_TIDSPBRIDGE_DEBUG
kfree(hio_mgr->pmsg);
#endif
dsp_wdt_exit();
@@ -407,7 +407,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
status = -EFAULT;
}
if (DSP_SUCCEEDED(status)) {
-#ifndef DSP_TRACEBUF_DISABLED
+#ifdef CONFIG_TIDSPBRIDGE_DEBUG
status =
cod_get_sym_value(cod_man, DSP_TRACESEC_END, &shm0_end);
#else
@@ -752,7 +752,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
hmsg_mgr->max_msgs);
memset((void *)hio_mgr->shared_mem, 0, sizeof(struct shm));
-#ifndef DSP_TRACEBUF_DISABLED
+#ifdef CONFIG_TIDSPBRIDGE_DEBUG
/* Get the start address of trace buffer */
status = cod_get_sym_value(cod_man, SYS_PUTCBEG,
&hio_mgr->ul_trace_buffer_begin);
@@ -949,7 +949,7 @@ void io_dpc(IN OUT unsigned long pRefData)
(pio_mgr->intr_val < DEH_LIMIT)) {
/* Notify DSP/BIOS exception */
if (hdeh_mgr) {
-#ifndef DSP_TRACE_BUF_DISABLED
+#ifdef CONFIG_TIDSPBRIDGE_DEBUG
print_dsp_debug_trace(pio_mgr);
#endif
bridge_deh_notify(hdeh_mgr, DSP_SYSERROR,
@@ -961,7 +961,7 @@ void io_dpc(IN OUT unsigned long pRefData)
if (msg_mgr_obj)
io_dispatch_msg(pio_mgr, msg_mgr_obj);
#endif
-#ifndef DSP_TRACEBUF_DISABLED
+#ifdef CONFIG_TIDSPBRIDGE_DEBUG
if (pio_mgr->intr_val & MBX_DBG_SYSPRINTF) {
/* Notify DSP Trace message */
print_dsp_debug_trace(pio_mgr);
@@ -1810,7 +1810,7 @@ int bridge_io_get_proc_load(IN struct io_mgr *hio_mgr,
return 0;
}
-#ifndef DSP_TRACEBUF_DISABLED
+#ifdef CONFIG_TIDSPBRIDGE_DEBUG
void print_dsp_debug_trace(struct io_mgr *hio_mgr)
{
u32 ul_new_message_length = 0, ul_gpp_cur_pointer;
diff --git a/drivers/staging/tidspbridge/include/dspbridge/io_sm.h b/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
index c3557ef..6e67f10 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
@@ -302,7 +302,7 @@ int dump_dsp_stack(struct bridge_dev_context *bridge_context);
void dump_dl_modules(struct bridge_dev_context *bridge_context);
-#ifndef DSP_TRACEBUF_DISABLED
+#ifdef CONFIG_TIDSPBRIDGE_DEBUG
void print_dsp_debug_trace(struct io_mgr *hio_mgr);
#endif
--
1.7.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/5] staging: ti dspbridge: add _BACKTRACE config
2010-07-04 13:36 [PATCH 0/5] staging: ti dspbridge: improve Kconfig Felipe Contreras
` (3 preceding siblings ...)
2010-07-04 13:36 ` [PATCH 4/5] staging: ti dspbridge: use _DEBUG for debug trace Felipe Contreras
@ 2010-07-04 13:36 ` Felipe Contreras
4 siblings, 0 replies; 8+ messages in thread
From: Felipe Contreras @ 2010-07-04 13:36 UTC (permalink / raw)
To: linux-omap; +Cc: Ohad Ben-Cohen, Omar Ramirez Luna, Greg KH, Felipe Contreras
We only want this code when testing.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
drivers/staging/tidspbridge/Kconfig | 7 +++++
drivers/staging/tidspbridge/core/io_sm.c | 26 ++++++++++---------
drivers/staging/tidspbridge/core/ue_deh.c | 6 ++++
drivers/staging/tidspbridge/gen/gh.c | 2 +
.../staging/tidspbridge/include/dspbridge/dbll.h | 2 +
drivers/staging/tidspbridge/include/dspbridge/gh.h | 2 +
.../staging/tidspbridge/include/dspbridge/io_sm.h | 4 ++-
.../staging/tidspbridge/include/dspbridge/nldr.h | 2 +
.../staging/tidspbridge/include/dspbridge/node.h | 2 +
drivers/staging/tidspbridge/pmgr/dbll.c | 2 +
drivers/staging/tidspbridge/rmgr/nldr.c | 2 +
drivers/staging/tidspbridge/rmgr/node.c | 3 +-
12 files changed, 46 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/tidspbridge/Kconfig b/drivers/staging/tidspbridge/Kconfig
index 4d63b66..93de4f2 100644
--- a/drivers/staging/tidspbridge/Kconfig
+++ b/drivers/staging/tidspbridge/Kconfig
@@ -81,3 +81,10 @@ config TIDSPBRIDGE_NTFY_PWRERR
Enable notifications to registered clients on the event of power errror
trying to suspend bridge driver. Say Y, to signal this event as a fatal
error, this will require a bridge restart to recover.
+
+config TIDSPBRIDGE_BACKTRACE
+ bool "Dump backtraces on fatal errors"
+ depends on TIDSPBRIDGE
+ help
+ Enable useful information to backtrace fatal errors. Say Y if you
+ want to dump information for testing purposes.
diff --git a/drivers/staging/tidspbridge/core/io_sm.c b/drivers/staging/tidspbridge/core/io_sm.c
index 8909c41..1503968 100644
--- a/drivers/staging/tidspbridge/core/io_sm.c
+++ b/drivers/staging/tidspbridge/core/io_sm.c
@@ -114,7 +114,7 @@ struct io_mgr {
struct mgr_processorextinfo ext_proc_info;
struct cmm_object *hcmm_mgr; /* Shared Mem Mngr */
struct work_struct io_workq; /* workqueue */
-#ifdef CONFIG_TIDSPBRIDGE_DEBUG
+#if defined(CONFIG_TIDSPBRIDGE_BACKTRACE) || defined(CONFIG_TIDSPBRIDGE_DEBUG)
u32 ul_trace_buffer_begin; /* Trace message start address */
u32 ul_trace_buffer_end; /* Trace message end address */
u32 ul_trace_buffer_current; /* Trace message current address */
@@ -210,7 +210,7 @@ int bridge_io_create(OUT struct io_mgr **phIOMgr,
}
/* Initialize chnl_mgr object */
-#ifdef CONFIG_TIDSPBRIDGE_DEBUG
+#if defined(CONFIG_TIDSPBRIDGE_BACKTRACE) || defined(CONFIG_TIDSPBRIDGE_DEBUG)
pio_mgr->pmsg = NULL;
#endif
pio_mgr->hchnl_mgr = hchnl_mgr;
@@ -265,7 +265,7 @@ int bridge_io_destroy(struct io_mgr *hio_mgr)
/* Free IO DPC object */
tasklet_kill(&hio_mgr->dpc_tasklet);
-#ifdef CONFIG_TIDSPBRIDGE_DEBUG
+#if defined(CONFIG_TIDSPBRIDGE_BACKTRACE) || defined(CONFIG_TIDSPBRIDGE_DEBUG)
kfree(hio_mgr->pmsg);
#endif
dsp_wdt_exit();
@@ -407,7 +407,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
status = -EFAULT;
}
if (DSP_SUCCEEDED(status)) {
-#ifdef CONFIG_TIDSPBRIDGE_DEBUG
+#if defined(CONFIG_TIDSPBRIDGE_BACKTRACE) || defined(CONFIG_TIDSPBRIDGE_DEBUG)
status =
cod_get_sym_value(cod_man, DSP_TRACESEC_END, &shm0_end);
#else
@@ -752,7 +752,7 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
hmsg_mgr->max_msgs);
memset((void *)hio_mgr->shared_mem, 0, sizeof(struct shm));
-#ifdef CONFIG_TIDSPBRIDGE_DEBUG
+#if defined(CONFIG_TIDSPBRIDGE_BACKTRACE) || defined(CONFIG_TIDSPBRIDGE_DEBUG)
/* Get the start address of trace buffer */
status = cod_get_sym_value(cod_man, SYS_PUTCBEG,
&hio_mgr->ul_trace_buffer_begin);
@@ -949,7 +949,7 @@ void io_dpc(IN OUT unsigned long pRefData)
(pio_mgr->intr_val < DEH_LIMIT)) {
/* Notify DSP/BIOS exception */
if (hdeh_mgr) {
-#ifdef CONFIG_TIDSPBRIDGE_DEBUG
+#ifdef CONFIG_TIDSPBRIDGE_BACKTRACE
print_dsp_debug_trace(pio_mgr);
#endif
bridge_deh_notify(hdeh_mgr, DSP_SYSERROR,
@@ -1810,7 +1810,12 @@ int bridge_io_get_proc_load(IN struct io_mgr *hio_mgr,
return 0;
}
-#ifdef CONFIG_TIDSPBRIDGE_DEBUG
+void io_sm_init(void)
+{
+ /* Do nothing */
+}
+
+#if defined(CONFIG_TIDSPBRIDGE_BACKTRACE) || defined(CONFIG_TIDSPBRIDGE_DEBUG)
void print_dsp_debug_trace(struct io_mgr *hio_mgr)
{
u32 ul_new_message_length = 0, ul_gpp_cur_pointer;
@@ -1871,6 +1876,7 @@ void print_dsp_debug_trace(struct io_mgr *hio_mgr)
}
#endif
+#ifdef CONFIG_TIDSPBRIDGE_BACKTRACE
/*
* ======== print_dsp_trace_buffer ========
* Prints the trace buffer returned from the DSP (if DBG_Trace is enabled).
@@ -2045,10 +2051,6 @@ func_end:
return status;
}
-void io_sm_init(void)
-{
- /* Do nothing */
-}
/**
* dump_dsp_stack() - This function dumps the data on the DSP stack.
* @bridge_context: Bridge driver's device context pointer.
@@ -2407,4 +2409,4 @@ void dump_dl_modules(struct bridge_dev_context *bridge_context)
func_end:
kfree(module_struct);
}
-
+#endif
diff --git a/drivers/staging/tidspbridge/core/ue_deh.c b/drivers/staging/tidspbridge/core/ue_deh.c
index 2bdf92e..3430418 100644
--- a/drivers/staging/tidspbridge/core/ue_deh.c
+++ b/drivers/staging/tidspbridge/core/ue_deh.c
@@ -166,6 +166,7 @@ int bridge_deh_register_notify(struct deh_mgr *deh, u32 event_mask,
return ntfy_unregister(deh->ntfy_obj, hnotification);
}
+#ifdef CONFIG_TIDSPBRIDGE_BACKTRACE
static void mmu_fault_print_stack(struct bridge_dev_context *dev_context)
{
struct cfg_hostres *resources;
@@ -205,6 +206,7 @@ static void mmu_fault_print_stack(struct bridge_dev_context *dev_context)
hw_mmu_disable(resources->dw_dmmu_base);
free_page((unsigned long)dummy_va_addr);
}
+#endif
static inline const char *event_to_string(int event)
{
@@ -232,15 +234,19 @@ void bridge_deh_notify(struct deh_mgr *deh, int event, int info)
case DSP_SYSERROR:
dev_err(bridge, "%s: %s, info=0x%x", __func__,
str, info);
+#ifdef CONFIG_TIDSPBRIDGE_BACKTRACE
dump_dl_modules(dev_context);
dump_dsp_stack(dev_context);
+#endif
break;
case DSP_MMUFAULT:
dev_err(bridge, "%s: %s, addr=0x%x", __func__,
str, fault_addr);
+#ifdef CONFIG_TIDSPBRIDGE_BACKTRACE
print_dsp_trace_buffer(dev_context);
dump_dl_modules(dev_context);
mmu_fault_print_stack(dev_context);
+#endif
break;
default:
dev_err(bridge, "%s: %s", __func__, str);
diff --git a/drivers/staging/tidspbridge/gen/gh.c b/drivers/staging/tidspbridge/gen/gh.c
index d1e7b38..44fad88 100644
--- a/drivers/staging/tidspbridge/gen/gh.c
+++ b/drivers/staging/tidspbridge/gen/gh.c
@@ -188,6 +188,7 @@ static void myfree(void *ptr, s32 size)
gs_free(ptr);
}
+#ifdef CONFIG_TIDSPBRIDGE_BACKTRACE
/**
* gh_iterate() - This function goes through all the elements in the hash table
* looking for the dsp symbols.
@@ -211,3 +212,4 @@ void gh_iterate(struct gh_t_hash_tab *hash_tab,
}
}
}
+#endif
diff --git a/drivers/staging/tidspbridge/include/dspbridge/dbll.h b/drivers/staging/tidspbridge/include/dspbridge/dbll.h
index 54c6219..0d03714 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/dbll.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/dbll.h
@@ -53,7 +53,9 @@ extern void dbll_set_attrs(struct dbll_tar_obj *target,
extern void dbll_unload(struct dbll_library_obj *lib, struct dbll_attrs *attrs);
extern int dbll_unload_sect(struct dbll_library_obj *lib,
char *sectName, struct dbll_attrs *attrs);
+#ifdef CONFIG_TIDSPBRIDGE_BACKTRACE
bool dbll_find_dsp_symbol(struct dbll_library_obj *zl_lib, u32 address,
u32 offset_range, u32 *sym_addr_output, char *name_output);
+#endif
#endif /* DBLL_ */
diff --git a/drivers/staging/tidspbridge/include/dspbridge/gh.h b/drivers/staging/tidspbridge/include/dspbridge/gh.h
index 55c0489..9de291d 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/gh.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/gh.h
@@ -27,6 +27,8 @@ extern void gh_exit(void);
extern void *gh_find(struct gh_t_hash_tab *hash_tab, void *key);
extern void gh_init(void);
extern void *gh_insert(struct gh_t_hash_tab *hash_tab, void *key, void *value);
+#ifdef CONFIG_TIDSPBRIDGE_BACKTRACE
void gh_iterate(struct gh_t_hash_tab *hash_tab,
void (*callback)(void *, void *), void *user_data);
+#endif
#endif /* GH_ */
diff --git a/drivers/staging/tidspbridge/include/dspbridge/io_sm.h b/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
index 6e67f10..0befe90 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/io_sm.h
@@ -291,6 +291,7 @@ extern void io_intr_dsp2(IN struct io_mgr *pio_mgr, IN u16 mb_val);
extern void io_sm_init(void);
+#ifdef CONFIG_TIDSPBRIDGE_BACKTRACE
/*
* ========print_dsp_trace_buffer ========
* Print DSP tracebuffer.
@@ -302,7 +303,8 @@ int dump_dsp_stack(struct bridge_dev_context *bridge_context);
void dump_dl_modules(struct bridge_dev_context *bridge_context);
-#ifdef CONFIG_TIDSPBRIDGE_DEBUG
+#endif
+#if defined(CONFIG_TIDSPBRIDGE_BACKTRACE) || defined(CONFIG_TIDSPBRIDGE_DEBUG)
void print_dsp_debug_trace(struct io_mgr *hio_mgr);
#endif
diff --git a/drivers/staging/tidspbridge/include/dspbridge/nldr.h b/drivers/staging/tidspbridge/include/dspbridge/nldr.h
index 073aa9f..b1dbccd 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/nldr.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/nldr.h
@@ -49,7 +49,9 @@ extern int nldr_load(struct nldr_nodeobject *nldr_node_obj,
enum nldr_phase phase);
extern int nldr_unload(struct nldr_nodeobject *nldr_node_obj,
enum nldr_phase phase);
+#ifdef CONFIG_TIDSPBRIDGE_BACKTRACE
int nldr_find_addr(struct nldr_nodeobject *nldr_node, u32 sym_addr,
u32 offset_range, void *offset_output, char *sym_name);
+#endif
#endif /* NLDR_ */
diff --git a/drivers/staging/tidspbridge/include/dspbridge/node.h b/drivers/staging/tidspbridge/include/dspbridge/node.h
index 7587213..e9d8439 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/node.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/node.h
@@ -558,6 +558,7 @@ extern int node_get_uuid_props(void *hprocessor,
OUT struct dsp_ndbprops
*node_props);
+#ifdef CONFIG_TIDSPBRIDGE_BACKTRACE
/**
* node_find_addr() - Find the closest symbol to the given address.
*
@@ -575,5 +576,6 @@ int node_find_addr(struct node_mgr *node_mgr, u32 sym_addr,
char *sym_name);
enum node_state node_get_state(void *hnode);
+#endif
#endif /* NODE_ */
diff --git a/drivers/staging/tidspbridge/pmgr/dbll.c b/drivers/staging/tidspbridge/pmgr/dbll.c
index 3619d53..3636aa3 100644
--- a/drivers/staging/tidspbridge/pmgr/dbll.c
+++ b/drivers/staging/tidspbridge/pmgr/dbll.c
@@ -1500,6 +1500,7 @@ static void release(struct dynamic_loader_initialize *this)
{
}
+#ifdef CONFIG_TIDSPBRIDGE_BACKTRACE
/**
* find_symbol_context - Basic symbol context structure
* @address: Symbol Adress
@@ -1583,3 +1584,4 @@ bool dbll_find_dsp_symbol(struct dbll_library_obj *zl_lib, u32 address,
return status;
}
+#endif
diff --git a/drivers/staging/tidspbridge/rmgr/nldr.c b/drivers/staging/tidspbridge/rmgr/nldr.c
index d0138af..53fd371 100644
--- a/drivers/staging/tidspbridge/rmgr/nldr.c
+++ b/drivers/staging/tidspbridge/rmgr/nldr.c
@@ -1919,6 +1919,7 @@ static u32 find_gcf(u32 a, u32 b)
return b;
}
+#ifdef CONFIG_TIDSPBRIDGE_BACKTRACE
/**
* nldr_find_addr() - Find the closest symbol to the given address based on
* dynamic node object.
@@ -1997,3 +1998,4 @@ int nldr_find_addr(struct nldr_nodeobject *nldr_node, u32 sym_addr,
return status;
}
+#endif
diff --git a/drivers/staging/tidspbridge/rmgr/node.c b/drivers/staging/tidspbridge/rmgr/node.c
index 329fe5e..1870b80 100644
--- a/drivers/staging/tidspbridge/rmgr/node.c
+++ b/drivers/staging/tidspbridge/rmgr/node.c
@@ -3200,6 +3200,7 @@ static u32 mem_write(void *priv_ref, u32 ulDspAddr, void *pbuf,
return ul_num_bytes;
}
+#ifdef CONFIG_TIDSPBRIDGE_BACKTRACE
/*
* ======== node_find_addr ========
*/
@@ -3229,4 +3230,4 @@ int node_find_addr(struct node_mgr *node_mgr, u32 sym_addr,
return status;
}
-
+#endif
--
1.7.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/5] omap: OMAP_DSP is not in mainline, remove it
2010-07-04 13:36 ` [PATCH 1/5] omap: OMAP_DSP is not in mainline, remove it Felipe Contreras
@ 2010-07-05 9:29 ` Tony Lindgren
0 siblings, 0 replies; 8+ messages in thread
From: Tony Lindgren @ 2010-07-05 9:29 UTC (permalink / raw)
To: Felipe Contreras; +Cc: linux-omap, Ohad Ben-Cohen, Omar Ramirez Luna, Greg KH
* Felipe Contreras <felipe.contreras@gmail.com> [100704 16:30]:
> Cc: Tony Lindgren <tony@atomide.com>
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Missing description, maybe check your other patches for that too.
Anyways, I've queued up an earlier similar patch from
Christoph Egger <siccegge@cs.fau.de>:
https://patchwork.kernel.org/patch/110186/
Regards,
Tony
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-07-05 9:29 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-04 13:36 [PATCH 0/5] staging: ti dspbridge: improve Kconfig Felipe Contreras
2010-07-04 13:36 ` [PATCH 1/5] omap: OMAP_DSP is not in mainline, remove it Felipe Contreras
2010-07-05 9:29 ` Tony Lindgren
2010-07-04 13:36 ` [PATCH 2/5] staging: ti dspbridge: prefix configs with TIDSPBRIDGE Felipe Contreras
2010-07-04 13:36 ` [PATCH 3/5] staging: ti dspbridge: improve Kconfig Felipe Contreras
2010-07-04 13:36 ` [PATCH 4/5] staging: ti dspbridge: use _DEBUG for debug trace Felipe Contreras
2010-07-04 13:36 ` [PATCH 5/5] staging: ti dspbridge: add _BACKTRACE config Felipe Contreras
-- strict thread matches above, loose matches on Subject: below --
2010-05-16 15:46 [PATCH 0/8] dspbridge: improve Kconfig Felipe Contreras
2010-05-16 15:46 ` [PATCH 1/5] omap: OMAP_DSP is not in mainline, remove it Felipe Contreras
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).