/* ----------------------------------- Host OS */
+#include <plat/dsp.h>
+
#include <dspbridge/host_os.h>
#include <linux/types.h>
#include <linux/platform_device.h>
#include <dspbridge/dbc.h>
/* ----------------------------------- OS Adaptation Layer */
-#include <dspbridge/services.h>
#include <dspbridge/clk.h>
#include <dspbridge/sync.h>
/* ----------------------------------- This */
#include <drv_interface.h>
-#include <dspbridge/cfg.h>
#include <dspbridge/resourcecleanup.h>
#include <dspbridge/chnl.h>
#include <dspbridge/proc.h>
#include <mach-omap2/omap3-opp.h>
#endif
-#define BRIDGE_NAME "C6410"
/* ----------------------------------- Globals */
#define DRIVER_NAME "DspBridge"
#define DSPBRIDGE_VERSION "0.3"
#endif
#endif
-struct dspbridge_platform_data *omap_dspbridge_pdata;
+struct omap_dsp_platform_data *omap_dspbridge_pdata;
u32 vdd1_dsp_freq[6][4] = {
{0, 0, 0, 0},
static int dspbridge_scale_notification(struct notifier_block *op,
unsigned long val, void *ptr)
{
- struct dspbridge_platform_data *pdata =
- omap_dspbridge_dev->dev.platform_data;
+ struct omap_dsp_platform_data *pdata =
+ omap_dspbridge_dev->dev.platform_data;
if (CPUFREQ_POSTCHANGE == val && pdata->dsp_get_opp)
pwr_pm_post_scale(PRCM_VDD1, pdata->dsp_get_opp());
*/
static int omap3_bridge_startup(struct platform_device *pdev)
{
- struct dspbridge_platform_data *pdata = pdev->dev.platform_data;
+ struct omap_dsp_platform_data *pdata = pdev->dev.platform_data;
struct drv_data *drv_datap = NULL;
u32 phys_membase, phys_memsize;
int err;
#endif
dsp_clk_init();
- services_init();
drv_datap = kzalloc(sizeof(struct drv_data), GFP_KERNEL);
if (!drv_datap) {
CPUFREQ_TRANSITION_NOTIFIER);
#endif
dsp_clk_exit();
- services_exit();
return err;
}
dev_t devno;
bool ret;
int status = 0;
- void *hdrv_obj = NULL;
+ struct drv_data *drv_datap = dev_get_drvdata(bridge);
- status = cfg_get_object((u32 *) &hdrv_obj, REG_DRV_OBJECT);
- if (status)
+ /* Retrieve the Object handle from the driver data */
+ if (!drv_datap || !drv_datap->drv_object) {
+ status = -ENODATA;
+ pr_err("%s: Failed to retrieve the object handle\n", __func__);
goto func_cont;
+ }
#ifdef CONFIG_TIDSPBRIDGE_DVFS
if (cpufreq_unregister_notifier(&iva_clk_notifier,
mem_ext_phys_pool_release();
dsp_clk_exit();
- services_exit();
devno = MKDEV(driver_major, 0);
cdev_del(&bridge_cdev);
static struct platform_driver bridge_driver = {
.driver = {
- .name = BRIDGE_NAME,
+ .name = "omap-dsp",
},
.probe = omap34_xx_bridge_probe,
.remove = __devexit_p(omap34_xx_bridge_remove),
pr_ctxt->res_state = PROC_RES_ALLOCATED;
spin_lock_init(&pr_ctxt->dmm_map_lock);
INIT_LIST_HEAD(&pr_ctxt->dmm_map_list);
- spin_lock_init(&pr_ctxt->dmm_rsv_lock);
- INIT_LIST_HEAD(&pr_ctxt->dmm_rsv_list);
pr_ctxt->node_id = kzalloc(sizeof(struct idr), GFP_KERNEL);
if (pr_ctxt->node_id) {