forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Otherwise tidspbridge cannot work. It looks like this was dropped in the conversion to staging. I took the liberty of doing some cleaning up. Signed-off-by: Felipe Contreras <[email protected]> Acked-by: Tony Lindgren <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
- Loading branch information
Showing
5 changed files
with
152 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
/* | ||
* TI's OMAP DSP platform device registration | ||
* | ||
* Copyright (C) 2005-2006 Texas Instruments, Inc. | ||
* Copyright (C) 2009 Nokia Corporation | ||
* | ||
* Written by Hiroshi DOYU <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
*/ | ||
|
||
#include <linux/platform_device.h> | ||
#include "prm.h" | ||
#include "cm.h" | ||
#ifdef CONFIG_BRIDGE_DVFS | ||
#include <plat/omap-pm.h> | ||
#endif | ||
|
||
#include <plat/dsp.h> | ||
|
||
extern phys_addr_t omap_dsp_get_mempool_base(void); | ||
|
||
static struct platform_device *omap_dsp_pdev; | ||
|
||
static struct omap_dsp_platform_data omap_dsp_pdata __initdata = { | ||
#ifdef CONFIG_BRIDGE_DVFS | ||
.dsp_set_min_opp = omap_pm_dsp_set_min_opp, | ||
.dsp_get_opp = omap_pm_dsp_get_opp, | ||
.cpu_set_freq = omap_pm_cpu_set_freq, | ||
.cpu_get_freq = omap_pm_cpu_get_freq, | ||
#endif | ||
.dsp_prm_read = prm_read_mod_reg, | ||
.dsp_prm_write = prm_write_mod_reg, | ||
.dsp_prm_rmw_bits = prm_rmw_mod_reg_bits, | ||
.dsp_cm_read = cm_read_mod_reg, | ||
.dsp_cm_write = cm_write_mod_reg, | ||
.dsp_cm_rmw_bits = cm_rmw_mod_reg_bits, | ||
}; | ||
|
||
static int __init omap_dsp_init(void) | ||
{ | ||
struct platform_device *pdev; | ||
int err = -ENOMEM; | ||
struct omap_dsp_platform_data *pdata = &omap_dsp_pdata; | ||
|
||
pdata->phys_mempool_base = omap_dsp_get_mempool_base(); | ||
|
||
if (pdata->phys_mempool_base) { | ||
pdata->phys_mempool_size = CONFIG_TIDSPBRIDGE_MEMPOOL_SIZE; | ||
pr_info("%s: %x bytes @ %x\n", __func__, | ||
pdata->phys_mempool_size, pdata->phys_mempool_base); | ||
} | ||
|
||
pdev = platform_device_alloc("omap-dsp", -1); | ||
if (!pdev) | ||
goto err_out; | ||
|
||
err = platform_device_add_data(pdev, pdata, sizeof(*pdata)); | ||
if (err) | ||
goto err_out; | ||
|
||
err = platform_device_add(pdev); | ||
if (err) | ||
goto err_out; | ||
|
||
omap_dsp_pdev = pdev; | ||
return 0; | ||
|
||
err_out: | ||
platform_device_put(pdev); | ||
return err; | ||
} | ||
module_init(omap_dsp_init); | ||
|
||
static void __exit omap_dsp_exit(void) | ||
{ | ||
platform_device_unregister(omap_dsp_pdev); | ||
} | ||
module_exit(omap_dsp_exit); | ||
|
||
MODULE_AUTHOR("Hiroshi DOYU"); | ||
MODULE_DESCRIPTION("TI's OMAP DSP platform device registration"); | ||
MODULE_LICENSE("GPL"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#ifndef __OMAP_DSP_H__ | ||
#define __OMAP_DSP_H__ | ||
|
||
#include <linux/types.h> | ||
|
||
struct omap_dsp_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); | ||
|
||
phys_addr_t phys_mempool_base; | ||
phys_addr_t phys_mempool_size; | ||
}; | ||
|
||
#if defined(CONFIG_TIDSPBRIDGE) || defined(CONFIG_TIDSPBRIDGE_MODULE) | ||
extern void omap_dsp_reserve_sdram_memblock(void); | ||
#else | ||
static inline void omap_dsp_reserve_sdram_memblock(void) { } | ||
#endif | ||
|
||
#endif |