Commit 82d4b477 authored by Felipe Contreras's avatar Felipe Contreras Committed by Greg Kroah-Hartman

staging: tidspbridge: use omap_dsp_platform_data

Signed-off-by: default avatarFelipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 90173882
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/ */
#include <plat/dsp.h>
#include <linux/types.h> #include <linux/types.h>
/* ----------------------------------- Host OS */ /* ----------------------------------- Host OS */
#include <dspbridge/host_os.h> #include <dspbridge/host_os.h>
...@@ -265,7 +267,7 @@ static int bridge_brd_monitor(struct bridge_dev_context *dev_ctxt) ...@@ -265,7 +267,7 @@ static int bridge_brd_monitor(struct bridge_dev_context *dev_ctxt)
{ {
struct bridge_dev_context *dev_context = dev_ctxt; struct bridge_dev_context *dev_context = dev_ctxt;
u32 temp; u32 temp;
struct dspbridge_platform_data *pdata = struct omap_dsp_platform_data *pdata =
omap_dspbridge_dev->dev.platform_data; omap_dspbridge_dev->dev.platform_data;
temp = (*pdata->dsp_prm_read)(OMAP3430_IVA2_MOD, OMAP2_PM_PWSTST) & temp = (*pdata->dsp_prm_read)(OMAP3430_IVA2_MOD, OMAP2_PM_PWSTST) &
...@@ -376,7 +378,7 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt, ...@@ -376,7 +378,7 @@ static int bridge_brd_start(struct bridge_dev_context *dev_ctxt,
u32 clk_cmd; u32 clk_cmd;
struct io_mgr *hio_mgr; struct io_mgr *hio_mgr;
u32 ul_load_monitor_timer; u32 ul_load_monitor_timer;
struct dspbridge_platform_data *pdata = struct omap_dsp_platform_data *pdata =
omap_dspbridge_dev->dev.platform_data; omap_dspbridge_dev->dev.platform_data;
mmu = dev_context->dsp_mmu; mmu = dev_context->dsp_mmu;
...@@ -582,7 +584,7 @@ static int bridge_brd_stop(struct bridge_dev_context *dev_ctxt) ...@@ -582,7 +584,7 @@ static int bridge_brd_stop(struct bridge_dev_context *dev_ctxt)
struct bridge_dev_context *dev_context = dev_ctxt; struct bridge_dev_context *dev_context = dev_ctxt;
struct pg_table_attrs *pt_attrs; struct pg_table_attrs *pt_attrs;
u32 dsp_pwr_state; u32 dsp_pwr_state;
struct dspbridge_platform_data *pdata = struct omap_dsp_platform_data *pdata =
omap_dspbridge_dev->dev.platform_data; omap_dspbridge_dev->dev.platform_data;
if (dev_context->dw_brd_state == BRD_STOPPED) if (dev_context->dw_brd_state == BRD_STOPPED)
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
/* ----------------------------------- Host OS */ /* ----------------------------------- Host OS */
#include <dspbridge/host_os.h> #include <dspbridge/host_os.h>
#include <plat/dsp.h>
/* ----------------------------------- DSP/BIOS Bridge */ /* ----------------------------------- DSP/BIOS Bridge */
#include <dspbridge/dbdefs.h> #include <dspbridge/dbdefs.h>
#include <dspbridge/drv.h> #include <dspbridge/drv.h>
...@@ -56,7 +58,7 @@ int handle_constraints_set(struct bridge_dev_context *dev_context, ...@@ -56,7 +58,7 @@ int handle_constraints_set(struct bridge_dev_context *dev_context,
{ {
#ifdef CONFIG_TIDSPBRIDGE_DVFS #ifdef CONFIG_TIDSPBRIDGE_DVFS
u32 *constraint_val; u32 *constraint_val;
struct dspbridge_platform_data *pdata = struct omap_dsp_platform_data *pdata =
omap_dspbridge_dev->dev.platform_data; omap_dspbridge_dev->dev.platform_data;
constraint_val = (u32 *) (pargs); constraint_val = (u32 *) (pargs);
...@@ -85,7 +87,7 @@ int handle_hibernation_from_dsp(struct bridge_dev_context *dev_context) ...@@ -85,7 +87,7 @@ int handle_hibernation_from_dsp(struct bridge_dev_context *dev_context)
u32 opplevel; u32 opplevel;
struct io_mgr *hio_mgr; struct io_mgr *hio_mgr;
#endif #endif
struct dspbridge_platform_data *pdata = struct omap_dsp_platform_data *pdata =
omap_dspbridge_dev->dev.platform_data; omap_dspbridge_dev->dev.platform_data;
pwr_state = (*pdata->dsp_prm_read)(OMAP3430_IVA2_MOD, OMAP2_PM_PWSTST) & pwr_state = (*pdata->dsp_prm_read)(OMAP3430_IVA2_MOD, OMAP2_PM_PWSTST) &
...@@ -154,7 +156,7 @@ int sleep_dsp(struct bridge_dev_context *dev_context, u32 dw_cmd, ...@@ -154,7 +156,7 @@ int sleep_dsp(struct bridge_dev_context *dev_context, u32 dw_cmd,
#endif /* CONFIG_TIDSPBRIDGE_NTFY_PWRERR */ #endif /* CONFIG_TIDSPBRIDGE_NTFY_PWRERR */
u16 timeout = PWRSTST_TIMEOUT / 10; u16 timeout = PWRSTST_TIMEOUT / 10;
u32 pwr_state, target_pwr_state; u32 pwr_state, target_pwr_state;
struct dspbridge_platform_data *pdata = struct omap_dsp_platform_data *pdata =
omap_dspbridge_dev->dev.platform_data; omap_dspbridge_dev->dev.platform_data;
/* Check if sleep code is valid */ /* Check if sleep code is valid */
......
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/ */
#include <plat/dsp.h>
/* ----------------------------------- DSP/BIOS Bridge */ /* ----------------------------------- DSP/BIOS Bridge */
#include <dspbridge/dbdefs.h> #include <dspbridge/dbdefs.h>
...@@ -387,7 +389,7 @@ int sm_interrupt_dsp(struct bridge_dev_context *dev_context, u16 mb_val) ...@@ -387,7 +389,7 @@ int sm_interrupt_dsp(struct bridge_dev_context *dev_context, u16 mb_val)
#ifdef CONFIG_TIDSPBRIDGE_DVFS #ifdef CONFIG_TIDSPBRIDGE_DVFS
u32 opplevel = 0; u32 opplevel = 0;
#endif #endif
struct dspbridge_platform_data *pdata = struct omap_dsp_platform_data *pdata =
omap_dspbridge_dev->dev.platform_data; omap_dspbridge_dev->dev.platform_data;
struct cfg_hostres *resources = dev_context->resources; struct cfg_hostres *resources = dev_context->resources;
int status = 0; int status = 0;
......
...@@ -52,25 +52,6 @@ ...@@ -52,25 +52,6 @@
/* TODO -- Remove, once BP defines them */ /* TODO -- Remove, once BP defines them */
#define INT_DSP_MMU_IRQ 28 #define INT_DSP_MMU_IRQ 28
struct dspbridge_platform_data {
void (*dsp_set_min_opp) (u8 opp_id);
u8(*dsp_get_opp) (void);
void (*cpu_set_freq) (unsigned long f);
unsigned long (*cpu_get_freq) (void);
unsigned long mpu_speed[6];
/* functions to write and read PRCM registers */
void (*dsp_prm_write)(u32, s16 , u16);
u32 (*dsp_prm_read)(s16 , u16);
u32 (*dsp_prm_rmw_bits)(u32, u32, s16, s16);
void (*dsp_cm_write)(u32, s16 , u16);
u32 (*dsp_cm_read)(s16 , u16);
u32 (*dsp_cm_rmw_bits)(u32, u32, s16, s16);
u32 phys_mempool_base;
u32 phys_mempool_size;
};
#define PRCM_VDD1 1 #define PRCM_VDD1 1
extern struct platform_device *omap_dspbridge_dev; extern struct platform_device *omap_dspbridge_dev;
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
/* ----------------------------------- Host OS */ /* ----------------------------------- Host OS */
#include <plat/dsp.h>
#include <dspbridge/host_os.h> #include <dspbridge/host_os.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
...@@ -169,7 +171,7 @@ const struct omap_opp vdd1_rate_table_bridge[] = { ...@@ -169,7 +171,7 @@ const struct omap_opp vdd1_rate_table_bridge[] = {
#endif #endif
#endif #endif
struct dspbridge_platform_data *omap_dspbridge_pdata; struct omap_dsp_platform_data *omap_dspbridge_pdata;
u32 vdd1_dsp_freq[6][4] = { u32 vdd1_dsp_freq[6][4] = {
{0, 0, 0, 0}, {0, 0, 0, 0},
...@@ -216,7 +218,7 @@ void bridge_recover_schedule(void) ...@@ -216,7 +218,7 @@ void bridge_recover_schedule(void)
static int dspbridge_scale_notification(struct notifier_block *op, static int dspbridge_scale_notification(struct notifier_block *op,
unsigned long val, void *ptr) unsigned long val, void *ptr)
{ {
struct dspbridge_platform_data *pdata = struct omap_dsp_platform_data *pdata =
omap_dspbridge_dev->dev.platform_data; omap_dspbridge_dev->dev.platform_data;
if (CPUFREQ_POSTCHANGE == val && pdata->dsp_get_opp) if (CPUFREQ_POSTCHANGE == val && pdata->dsp_get_opp)
...@@ -240,7 +242,7 @@ static struct notifier_block iva_clk_notifier = { ...@@ -240,7 +242,7 @@ static struct notifier_block iva_clk_notifier = {
*/ */
static int omap3_bridge_startup(struct platform_device *pdev) 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; struct drv_data *drv_datap = NULL;
u32 phys_membase, phys_memsize; u32 phys_membase, phys_memsize;
int err; int err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment