[v2,3/6] ASoC: Intel: Reorganize the common dsp structure
diff mbox

Message ID 1435919647-14049-4-git-send-email-vinod.koul@intel.com
State New
Headers show

Commit Message

Vinod Koul July 3, 2015, 10:34 a.m. UTC
From: "Subhransu S. Prusty" <subhransu.s.prusty@intel.com>

We will add SKL platform data. So organizing common and platform
specific data helps.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 sound/soc/intel/common/sst-dsp-priv.h | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

Comments

Mark Brown July 8, 2015, 6:38 p.m. UTC | #1
On Fri, Jul 03, 2015 at 04:04:04PM +0530, Vinod Koul wrote:
> From: "Subhransu S. Prusty" <subhransu.s.prusty@intel.com>
> 
> We will add SKL platform data. So organizing common and platform
> specific data helps.

>  struct sst_dsp {
>  
> +	/* Shared for all platforms */
> +
>  	/* runtime */
>  	struct sst_dsp_device *sst_dev;
>  	spinlock_t spinlock;	/* IPC locking */
> @@ -268,10 +270,6 @@ struct sst_dsp {
>  	int irq;
>  	u32 id;
>  
> -	/* list of free and used ADSP memory blocks */
> -	struct list_head used_block_list;
> -	struct list_head free_block_list;
> -

Perhaps a union might start to make sense at some point?
Vinod Koul July 9, 2015, 4:32 a.m. UTC | #2
On Wed, Jul 08, 2015 at 07:38:33PM +0100, Mark Brown wrote:
> On Fri, Jul 03, 2015 at 04:04:04PM +0530, Vinod Koul wrote:
> > From: "Subhransu S. Prusty" <subhransu.s.prusty@intel.com>
> > 
> > We will add SKL platform data. So organizing common and platform
> > specific data helps.
> 
> >  struct sst_dsp {
> >  
> > +	/* Shared for all platforms */
> > +
> >  	/* runtime */
> >  	struct sst_dsp_device *sst_dev;
> >  	spinlock_t spinlock;	/* IPC locking */
> > @@ -268,10 +270,6 @@ struct sst_dsp {
> >  	int irq;
> >  	u32 id;
> >  
> > -	/* list of free and used ADSP memory blocks */
> > -	struct list_head used_block_list;
> > -	struct list_head free_block_list;
> > -
> 
> Perhaps a union might start to make sense at some point?
Initially we did start with a union but Liam didn't like another indirection.
Anyway since not a bunch a members are getting added here, this should be
okay

Liam you want to add here...

Patch
diff mbox

diff --git a/sound/soc/intel/common/sst-dsp-priv.h b/sound/soc/intel/common/sst-dsp-priv.h
index 396d54510350..50af167b7bc7 100644
--- a/sound/soc/intel/common/sst-dsp-priv.h
+++ b/sound/soc/intel/common/sst-dsp-priv.h
@@ -258,6 +258,8 @@  struct sst_mem_block {
  */
 struct sst_dsp {
 
+	/* Shared for all platforms */
+
 	/* runtime */
 	struct sst_dsp_device *sst_dev;
 	spinlock_t spinlock;	/* IPC locking */
@@ -268,10 +270,6 @@  struct sst_dsp {
 	int irq;
 	u32 id;
 
-	/* list of free and used ADSP memory blocks */
-	struct list_head used_block_list;
-	struct list_head free_block_list;
-
 	/* operations */
 	struct sst_ops *ops;
 
@@ -284,6 +282,12 @@  struct sst_dsp {
 	/* mailbox */
 	struct sst_mailbox mailbox;
 
+	/* HSW/Byt data */
+
+	/* list of free and used ADSP memory blocks */
+	struct list_head used_block_list;
+	struct list_head free_block_list;
+
 	/* SST FW files loaded and their modules */
 	struct list_head module_list;
 	struct list_head fw_list;