diff mbox series

[v3,09/13] ASoC: Intel: Select catpt and deprecate haswell

Message ID 20200811160610.32735-10-cezary.rojewski@intel.com (mailing list archive)
State New, archived
Headers show
Series ASoC: Intel: Catpt - Lynx and Wildcat point | expand

Commit Message

Cezary Rojewski Aug. 11, 2020, 4:06 p.m. UTC
Prevent sound/soc/intel/haswell code compile and select catpt instead as
a recommended solution. Userspace-exposed members are compatible with
what is exposed by deprecated solution thus no harm is done. The only
visible difference is the newly added 'Loopback Mute' kcontrol.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
---
 sound/soc/intel/Kconfig        | 22 +++++++++++-----------
 sound/soc/intel/Makefile       |  2 +-
 sound/soc/intel/boards/Kconfig |  8 ++++----
 sound/soc/intel/catpt/Makefile |  6 ++++++
 4 files changed, 22 insertions(+), 16 deletions(-)
 create mode 100644 sound/soc/intel/catpt/Makefile

Comments

kernel test robot Aug. 11, 2020, 9:50 p.m. UTC | #1
Hi Cezary,

I love your patch! Yet something to improve:

[auto build test ERROR on asoc/for-next]
[also build test ERROR on sound/for-next v5.8 next-20200811]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Cezary-Rojewski/ASoC-Intel-Catpt-Lynx-and-Wildcat-point/20200812-002100
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from sound/soc/intel/catpt/core.h:14,
                    from sound/soc/intel/catpt/dsp.c:12:
   sound/soc/intel/catpt/dsp.c: In function 'catpt_dsp_stall':
>> sound/soc/intel/catpt/registers.h:168:32: error: 'CATPT_SHIM_REG_13' undeclared (first use in this function); did you mean 'CATPT_SHIM_REG_CS'?
     168 |  readl(catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
         |                                ^~~~~~~~~~~~~~~
   sound/soc/intel/catpt/registers.h:170:9: note: in definition of macro 'catpt_writel_shim'
     170 |  writel(val, catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
         |         ^~~
   sound/soc/intel/catpt/registers.h:173:5: note: in expansion of macro 'catpt_readl_shim'
     173 |    (catpt_readl_shim(cdev, reg) & ~(mask)) | val)
         |     ^~~~~~~~~~~~~~~~
   sound/soc/intel/catpt/dsp.c:229:2: note: in expansion of macro 'catpt_updatel_shim'
     229 |  catpt_updatel_shim(cdev, CS, CATPT_CS_STALL, val);
         |  ^~~~~~~~~~~~~~~~~~
   sound/soc/intel/catpt/registers.h:168:32: note: each undeclared identifier is reported only once for each function it appears in
     168 |  readl(catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
         |                                ^~~~~~~~~~~~~~~
   sound/soc/intel/catpt/registers.h:170:9: note: in definition of macro 'catpt_writel_shim'
     170 |  writel(val, catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
         |         ^~~
   sound/soc/intel/catpt/registers.h:173:5: note: in expansion of macro 'catpt_readl_shim'
     173 |    (catpt_readl_shim(cdev, reg) & ~(mask)) | val)
         |     ^~~~~~~~~~~~~~~~
   sound/soc/intel/catpt/dsp.c:229:2: note: in expansion of macro 'catpt_updatel_shim'
     229 |  catpt_updatel_shim(cdev, CS, CATPT_CS_STALL, val);
         |  ^~~~~~~~~~~~~~~~~~
   sound/soc/intel/catpt/dsp.c: In function 'catpt_dsp_reset':
>> sound/soc/intel/catpt/registers.h:168:32: error: 'CATPT_SHIM_REG_13' undeclared (first use in this function); did you mean 'CATPT_SHIM_REG_CS'?
     168 |  readl(catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
         |                                ^~~~~~~~~~~~~~~
   sound/soc/intel/catpt/registers.h:170:9: note: in definition of macro 'catpt_writel_shim'
     170 |  writel(val, catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
         |         ^~~
   sound/soc/intel/catpt/registers.h:173:5: note: in expansion of macro 'catpt_readl_shim'
     173 |    (catpt_readl_shim(cdev, reg) & ~(mask)) | val)
         |     ^~~~~~~~~~~~~~~~
   sound/soc/intel/catpt/dsp.c:241:2: note: in expansion of macro 'catpt_updatel_shim'
     241 |  catpt_updatel_shim(cdev, CS, CATPT_CS_RST, val);
         |  ^~~~~~~~~~~~~~~~~~
   sound/soc/intel/catpt/dsp.c: In function 'catpt_dsp_select_lpclock':
>> sound/soc/intel/catpt/registers.h:168:32: error: 'CATPT_SHIM_REG_13' undeclared (first use in this function); did you mean 'CATPT_SHIM_REG_CS'?
     168 |  readl(catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
         |                                ^~~~~~~~~~~~~~~
   sound/soc/intel/catpt/registers.h:170:9: note: in definition of macro 'catpt_writel_shim'
     170 |  writel(val, catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
         |         ^~~
   sound/soc/intel/catpt/registers.h:173:5: note: in expansion of macro 'catpt_readl_shim'
     173 |    (catpt_readl_shim(cdev, reg) & ~(mask)) | val)
         |     ^~~~~~~~~~~~~~~~
   sound/soc/intel/catpt/dsp.c:302:2: note: in expansion of macro 'catpt_updatel_shim'
     302 |  catpt_updatel_shim(cdev, CS, mask, val);
         |  ^~~~~~~~~~~~~~~~~~
   sound/soc/intel/catpt/dsp.c: In function 'lpt_dsp_power_down':
>> sound/soc/intel/catpt/registers.h:168:32: error: 'CATPT_SHIM_REG_13' undeclared (first use in this function); did you mean 'CATPT_SHIM_REG_CS'?
     168 |  readl(catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
         |                                ^~~~~~~~~~~~~~~
   sound/soc/intel/catpt/registers.h:170:9: note: in definition of macro 'catpt_writel_shim'
     170 |  writel(val, catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
         |         ^~~
   sound/soc/intel/catpt/registers.h:173:5: note: in expansion of macro 'catpt_readl_shim'
     173 |    (catpt_readl_shim(cdev, reg) & ~(mask)) | val)
         |     ^~~~~~~~~~~~~~~~
   sound/soc/intel/catpt/dsp.c:374:2: note: in expansion of macro 'catpt_updatel_shim'
     374 |  catpt_updatel_shim(cdev, CS, CATPT_CS_SBCS(0) | CATPT_CS_SBCS(1),
         |  ^~~~~~~~~~~~~~~~~~
   sound/soc/intel/catpt/dsp.c: In function 'lpt_dsp_power_up':
>> sound/soc/intel/catpt/registers.h:168:32: error: 'CATPT_SHIM_REG_13' undeclared (first use in this function); did you mean 'CATPT_SHIM_REG_CS'?
     168 |  readl(catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
         |                                ^~~~~~~~~~~~~~~
   sound/soc/intel/catpt/registers.h:170:9: note: in definition of macro 'catpt_writel_shim'
     170 |  writel(val, catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
         |         ^~~
   sound/soc/intel/catpt/registers.h:173:5: note: in expansion of macro 'catpt_readl_shim'
     173 |    (catpt_readl_shim(cdev, reg) & ~(mask)) | val)
         |     ^~~~~~~~~~~~~~~~
   sound/soc/intel/catpt/dsp.c:402:2: note: in expansion of macro 'catpt_updatel_shim'
     402 |  catpt_updatel_shim(cdev, CS,
         |  ^~~~~~~~~~~~~~~~~~
   sound/soc/intel/catpt/dsp.c: In function 'wpt_dsp_power_down':
>> sound/soc/intel/catpt/registers.h:168:32: error: 'CATPT_SHIM_REG_13' undeclared (first use in this function); did you mean 'CATPT_SHIM_REG_CS'?
     168 |  readl(catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
         |                                ^~~~~~~~~~~~~~~
   sound/soc/intel/catpt/registers.h:170:9: note: in definition of macro 'catpt_writel_shim'
     170 |  writel(val, catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
         |         ^~~
   sound/soc/intel/catpt/registers.h:173:5: note: in expansion of macro 'catpt_readl_shim'
     173 |    (catpt_readl_shim(cdev, reg) & ~(mask)) | val)
         |     ^~~~~~~~~~~~~~~~
   sound/soc/intel/catpt/dsp.c:423:2: note: in expansion of macro 'catpt_updatel_shim'
     423 |  catpt_updatel_shim(cdev, CS, CATPT_CS_SBCS(0) | CATPT_CS_SBCS(1),
         |  ^~~~~~~~~~~~~~~~~~
   sound/soc/intel/catpt/dsp.c: In function 'wpt_dsp_power_up':
>> sound/soc/intel/catpt/registers.h:168:32: error: 'CATPT_SHIM_REG_13' undeclared (first use in this function); did you mean 'CATPT_SHIM_REG_CS'?
     168 |  readl(catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
         |                                ^~~~~~~~~~~~~~~
   sound/soc/intel/catpt/registers.h:170:9: note: in definition of macro 'catpt_writel_shim'
     170 |  writel(val, catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
         |         ^~~
   sound/soc/intel/catpt/registers.h:173:5: note: in expansion of macro 'catpt_readl_shim'
     173 |    (catpt_readl_shim(cdev, reg) & ~(mask)) | val)
         |     ^~~~~~~~~~~~~~~~
   sound/soc/intel/catpt/dsp.c:486:2: note: in expansion of macro 'catpt_updatel_shim'
     486 |  catpt_updatel_shim(cdev, CS, CATPT_CS_SBCS(0) | CATPT_CS_SBCS(1),
         |  ^~~~~~~~~~~~~~~~~~

vim +168 sound/soc/intel/catpt/registers.h

91c02b85c1c0fa Cezary Rojewski 2020-08-11  152  
91c02b85c1c0fa Cezary Rojewski 2020-08-11  153  #define catpt_shim_addr(cdev) \
91c02b85c1c0fa Cezary Rojewski 2020-08-11  154  	((cdev)->lpe_ba + (cdev)->spec->host_shim_offset)
91c02b85c1c0fa Cezary Rojewski 2020-08-11  155  #define catpt_dma_addr(cdev, dma) \
91c02b85c1c0fa Cezary Rojewski 2020-08-11  156  	((cdev)->lpe_ba + (cdev)->spec->host_dma_offset[dma])
91c02b85c1c0fa Cezary Rojewski 2020-08-11  157  #define catpt_ssp_addr(cdev, ssp) \
91c02b85c1c0fa Cezary Rojewski 2020-08-11  158  	((cdev)->lpe_ba + (cdev)->spec->host_ssp_offset[ssp])
91c02b85c1c0fa Cezary Rojewski 2020-08-11  159  #define catpt_inbox_addr(cdev) \
91c02b85c1c0fa Cezary Rojewski 2020-08-11  160  	((cdev)->lpe_ba + (cdev)->ipc.config.inbox_offset)
91c02b85c1c0fa Cezary Rojewski 2020-08-11  161  #define catpt_outbox_addr(cdev) \
91c02b85c1c0fa Cezary Rojewski 2020-08-11  162  	((cdev)->lpe_ba + (cdev)->ipc.config.outbox_offset)
91c02b85c1c0fa Cezary Rojewski 2020-08-11  163  
91c02b85c1c0fa Cezary Rojewski 2020-08-11  164  #define catpt_writel_ssp(cdev, ssp, reg, val) \
91c02b85c1c0fa Cezary Rojewski 2020-08-11  165  	writel(val, catpt_ssp_addr(cdev, ssp) + CATPT_SSP_##reg)
91c02b85c1c0fa Cezary Rojewski 2020-08-11  166  
91c02b85c1c0fa Cezary Rojewski 2020-08-11  167  #define catpt_readl_shim(cdev, reg) \
91c02b85c1c0fa Cezary Rojewski 2020-08-11 @168  	readl(catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
91c02b85c1c0fa Cezary Rojewski 2020-08-11  169  #define catpt_writel_shim(cdev, reg, val) \
91c02b85c1c0fa Cezary Rojewski 2020-08-11  170  	writel(val, catpt_shim_addr(cdev) + CATPT_SHIM_REG_##reg)
91c02b85c1c0fa Cezary Rojewski 2020-08-11  171  #define catpt_updatel_shim(cdev, reg, mask, val) \
91c02b85c1c0fa Cezary Rojewski 2020-08-11  172  	catpt_writel_shim(cdev, reg, \
91c02b85c1c0fa Cezary Rojewski 2020-08-11  173  			(catpt_readl_shim(cdev, reg) & ~(mask)) | val)
91c02b85c1c0fa Cezary Rojewski 2020-08-11  174  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff mbox series

Patch

diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig
index 82805a8681e5..4a18e8f83eeb 100644
--- a/sound/soc/intel/Kconfig
+++ b/sound/soc/intel/Kconfig
@@ -47,21 +47,21 @@  config SND_SOC_INTEL_SST_FIRMWARE
 	# Haswell/Broadwell/Baytrail legacy and will be set
 	# when these platforms are enabled
 
-config SND_SOC_INTEL_HASWELL
-	tristate "Haswell/Broadwell Platforms"
+config SND_SOC_INTEL_CATPT
+	tristate "Haswell and Broadwell"
 	depends on SND_DMA_SGBUF
 	depends on DMADEVICES && ACPI
-	select SND_SOC_INTEL_SST
-	select SND_SOC_INTEL_SST_ACPI
-	select SND_SOC_INTEL_SST_FIRMWARE
+	select DW_DMAC_CORE
 	select SND_SOC_ACPI_INTEL_MATCH
 	help
-	  If you have a Intel Haswell or Broadwell platform connected to
-	  an I2S codec, then enable this option by saying Y or m. This is
-	  typically used for Chromebooks. This is a recommended option.
-	  This option is mutually exclusive with the SOF support on
-	  Broadwell. If you want to enable SOF on Broadwell, you need to
-	  deselect this option first.
+	  Enable support for Intel(R) Haswell and Broadwell platforms
+	  with I2S codec present. This is a recommended option.
+	  Say Y or m if you have such device.
+	  If unsure, say N.
+
+config SND_SOC_INTEL_HASWELL
+	tristate
+	select SND_SOC_INTEL_CATPT
 
 config SND_SOC_INTEL_BAYTRAIL
 	tristate "Baytrail (legacy) Platforms"
diff --git a/sound/soc/intel/Makefile b/sound/soc/intel/Makefile
index 04ee48204fc9..c88c615f85f7 100644
--- a/sound/soc/intel/Makefile
+++ b/sound/soc/intel/Makefile
@@ -3,9 +3,9 @@ 
 obj-$(CONFIG_SND_SOC) += common/
 
 # Platform Support
-obj-$(CONFIG_SND_SOC_INTEL_HASWELL) += haswell/
 obj-$(CONFIG_SND_SOC_INTEL_BAYTRAIL) += baytrail/
 obj-$(CONFIG_SND_SST_ATOM_HIFI2_PLATFORM) += atom/
+obj-$(CONFIG_SND_SOC_INTEL_CATPT) += catpt/
 obj-$(CONFIG_SND_SOC_INTEL_SKYLAKE) += skylake/
 obj-$(CONFIG_SND_SOC_INTEL_KEEMBAY) += keembay/
 
diff --git a/sound/soc/intel/boards/Kconfig b/sound/soc/intel/boards/Kconfig
index d96fc1313434..f4358c33059b 100644
--- a/sound/soc/intel/boards/Kconfig
+++ b/sound/soc/intel/boards/Kconfig
@@ -26,7 +26,7 @@  config SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES
 	  interface.
 	  If unsure select N.
 
-if SND_SOC_INTEL_HASWELL
+if SND_SOC_INTEL_CATPT
 
 config SND_SOC_INTEL_HASWELL_MACH
 	tristate "Haswell Lynxpoint"
@@ -40,9 +40,9 @@  config SND_SOC_INTEL_HASWELL_MACH
 	  Say Y or m if you have such a device.
 	  If unsure select "N".
 
-endif ## SND_SOC_INTEL_HASWELL
+endif ## SND_SOC_INTEL_CATPT
 
-if SND_SOC_INTEL_HASWELL || SND_SOC_SOF_BROADWELL
+if SND_SOC_INTEL_CATPT || SND_SOC_SOF_BROADWELL
 
 config SND_SOC_INTEL_BDW_RT5650_MACH
 	tristate "Broadwell with RT5650 codec"
@@ -83,7 +83,7 @@  config SND_SOC_INTEL_BROADWELL_MACH
 	  Ultrabook platforms.
 	  Say Y or m if you have such a device. This is a recommended option.
 	  If unsure select "N".
-endif ## SND_SOC_INTEL_HASWELL || SND_SOC_SOF_BROADWELL
+endif ## SND_SOC_INTEL_CATPT || SND_SOC_SOF_BROADWELL
 
 if SND_SOC_INTEL_BAYTRAIL
 
diff --git a/sound/soc/intel/catpt/Makefile b/sound/soc/intel/catpt/Makefile
new file mode 100644
index 000000000000..0717190106d9
--- /dev/null
+++ b/sound/soc/intel/catpt/Makefile
@@ -0,0 +1,6 @@ 
+snd-soc-catpt-objs := device.o dsp.o loader.o ipc.o messages.o pcm.o fs.o
+
+# tell define_trace.h where to find the trace header
+CFLAGS_device.o := -I$(src)
+
+obj-$(CONFIG_SND_SOC_INTEL_CATPT) += snd-soc-catpt.o