[PATCH] ASoC: fsl_ssi: Fix mode setting when changing channel number

2018-04-07 Thread Nicolin Chen
This is a partial revert (in a cleaner way) of commit ebf08ae3bc90
("ASoC: fsl_ssi: Keep ssi->i2s_net updated") to fix a regression
at test cases when switching between mono and stereo audio.

The problem is that ssi->i2s_net is initialized in set_dai_fmt()
only, while this set_dai_fmt() is only called during the dai-link
probe(). The original patch assumed set_dai_fmt() would be called
during every playback instance, so it failed at the overriding use
cases.

This patch adds the local variable i2s_net back to let regular use
cases still follow the mode settings from the set_dai_fmt().

Meanwhile, the original commit of keeping ssi->i2s_net updated was
to make set_tdm_slot() clean by checking the ssi->i2s_net directly
instead of reading SCR register. However, the change itself is not
necessary (or even harmful) because the set_tdm_slot() might fail
to check the slot number for Normal-Mode-None-Net settings while
mono audio cases still need 2 slots. So this patch can also fix it.
And it adds an extra line of comments to declare ssi->i2s_net does
not reflect the register value but merely the initial setting from
the set_dai_fmt().

Reported-by: Mika Penttilä 
Signed-off-by: Nicolin Chen 
Cc: Mika Penttilä 
---
 sound/soc/fsl/fsl_ssi.c | 14 +++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 0823b08..89df2d9 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -217,6 +217,7 @@ struct fsl_ssi_soc_data {
  * @dai_fmt: DAI configuration this device is currently used with
  * @streams: Mask of current active streams: BIT(TX) and BIT(RX)
  * @i2s_net: I2S and Network mode configurations of SCR register
+ *   (this is the initial settings based on the DAI format)
  * @synchronous: Use synchronous mode - both of TX and RX use STCK and SFCK
  * @use_dma: DMA is used or FIQ with stream filter
  * @use_dual_fifo: DMA with support for dual FIFO mode
@@ -829,16 +830,23 @@ static int fsl_ssi_hw_params(struct snd_pcm_substream 
*substream,
}
 
if (!fsl_ssi_is_ac97(ssi)) {
+   /*
+* Keep the ssi->i2s_net intact while having a local variable
+* to override settings for special use cases. Otherwise, the
+* ssi->i2s_net will lose the settings for regular use cases.
+*/
+   u8 i2s_net = ssi->i2s_net;
+
/* Normal + Network mode to send 16-bit data in 32-bit frames */
if (fsl_ssi_is_i2s_cbm_cfs(ssi) && sample_size == 16)
-   ssi->i2s_net = SSI_SCR_I2S_MODE_NORMAL | SSI_SCR_NET;
+   i2s_net = SSI_SCR_I2S_MODE_NORMAL | SSI_SCR_NET;
 
/* Use Normal mode to send mono data at 1st slot of 2 slots */
if (channels == 1)
-   ssi->i2s_net = SSI_SCR_I2S_MODE_NORMAL;
+   i2s_net = SSI_SCR_I2S_MODE_NORMAL;
 
regmap_update_bits(regs, REG_SSI_SCR,
-  SSI_SCR_I2S_NET_MASK, ssi->i2s_net);
+  SSI_SCR_I2S_NET_MASK, i2s_net);
}
 
/* In synchronous mode, the SSI uses STCCR for capture */
-- 
2.7.4



Re: [PATCH 1/5] powerpc/embedded6xx: Remove C2K board support

2018-04-07 Thread kbuild test robot
Hi Mark,

I love your patch! Perhaps something to improve:

[auto build test WARNING on powerpc/next]
[cannot apply to v4.16 next-20180406]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Mark-Greer/powerpc-Remove-support-for-Marvell-mv64x60-hostbridges/20180406-204320
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-amigaone_defconfig (attached as .config)
compiler: powerpc-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=powerpc 

All warnings (new ones prefixed by >>):

warning: (AMIGAONE) selects NOT_COHERENT_CACHE which has unmet direct 
dependencies (4xx || PPC_8xx || E200 || PPC_MPC512x || GAMECUBE_COMMON)

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


[GIT PULL] Please pull powerpc/linux.git powerpc-4.17-1 tag

2018-04-07 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hi Linus,

Please pull powerpc updates for 4.17.

A bit late unfortunately, not due to anything terrible, but just a
trickle of small fixes through the week.

There's one minor merge conflict in the lib/raid6/test/Makefile, between
our changes and the removal of the tilegx implementation.

Other than that the only other out-of-area change is a minor change to
memblock.[ch], to export a function, which was OK'ed by Andrew.

cheers


The following changes since commit 661e50bc853209e41a5c14a290ca4decc43cbfd1:

  Linux 4.16-rc4 (2018-03-04 14:54:11 -0800)

are available in the git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git 
tags/powerpc-4.17-1

for you to fetch changes up to c1b25a17d24925b0961c319cfc3fd7e1dc778914:

  powerpc/64s/idle: Fix restore of AMOR on POWER9 after deep sleep (2018-04-05 
16:48:52 +1000)

- 
powerpc updates for 4.17

Notable changes:

 - Support for 4PB user address space on 64-bit, opt-in via mmap().

 - Removal of POWER4 support, which was accidentally broken in 2016 and no one
   noticed, and blocked use of some modern instructions.

 - Workarounds so that the hypervisor can enable Transactional Memory on Power9.

 - A series to disable the DAWR (Data Address Watchpoint Register) on Power9.

 - More information displayed in the meltdown/spectre_v1/v2 sysfs files.

 - A vpermxor (Power8 Altivec) implementation for the raid6 Q Syndrome.

 - A big series to make the allocation of our pacas (per cpu area), kernel page
   tables, and per-cpu stacks NUMA aware when using the Radix MMU on Power9.

And as usual many fixes, reworks and cleanups.

Thanks to:
  Aaro Koskinen, Alexandre Belloni, Alexey Kardashevskiy, Alistair Popple, Andy
  Shevchenko, Aneesh Kumar K.V, Anshuman Khandual, Balbir Singh, Benjamin
  Herrenschmidt, Christophe Leroy, Christophe Lombard, Cyril Bur, Daniel Axtens,
  Dave Young, Finn Thain, Frederic Barrat, Gustavo Romero, Horia Geantă,
  Jonathan Neuschäfer, Kees Cook, Larry Finger, Laurent Dufour, Laurent Vivier,
  Logan Gunthorpe, Madhavan Srinivasan, Mark Greer, Mark Hairgrove, Markus
  Elfring, Mathieu Malaterre, Matt Brown, Matt Evans, Mauricio Faria de
  Oliveira, Michael Neuling, Naveen N. Rao, Nicholas Piggin, Paul Mackerras,
  Philippe Bergheaud, Ram Pai, Rob Herring, Sam Bobroff, Segher Boessenkool,
  Simon Guo, Simon Horman, Stewart Smith, Sukadev Bhattiprolu, Suraj Jitindar
  Singh, Thiago Jung Bauermann, Vaibhav Jain, Vaidyanathan Srinivasan, Vasant
  Hegde, Wei Yongjun.

- 
Aaro Koskinen (1):
  drivers: macintosh: rack-meter: really fix bogus memsets

Alexandre Belloni (2):
  powerpc/time: stop validating rtc_time in .read_time
  powerpc/5200: dts: digsy_mtc.dts: fix rv3029 compatible

Alexey Kardashevskiy (4):
  powerpc/init: Do not advertise radix during client-architecture-support
  powerpc/lpar/debug: Initialize flags before printing debug message
  powerpc/mm: Fix typo in comments
  powerpc/powernv/npu: Do not try invalidating 32bit table when 64bit table 
is enabled

Alistair Popple (1):
  powerpc/powernv/npu: Fix deadlock in mmio_invalidate()

Aneesh Kumar K.V (12):
  powerpc/mm/keys: Move pte bits to correct headers
  powerpc/mm/slice: Consolidate return path in slice_get_unmapped_area()
  powerpc/mm: Add support for handling > 512TB address in SLB miss
  powerpc/mm/hash64: Increase the VA range
  powerpc/mm/hash: Don't memset pgd table if not needed
  powerpc/kvm: Fix guest boot failure on Power9 since DAWR changes
  powerpc: Fix oops due to bad access of lppaca on bare metal
  powerpc/mm/keys: Update documentation and remove unnecessary check
  powerpc/mm/radix: Update pte fragment count from 16 to 256 on radix
  powerpc/mm/hugetlb: initialize the pagetable cache correctly for hugetlb
  powerpc/mm/radix: Parse disable_radix commandline correctly.
  powerpc/mm/radix: Update command line parsing for disable_radix

Anshuman Khandual (1):
  powerpc/mm: Drop the function native_register_proc_table()

Balbir Singh (1):
  powerpc/powernv/mce: Don't silently restart the machine

Christophe Leroy (7):
  powerpc/mm/slice: Remove intermediate bitmap copy
  powerpc/mm/slice: create header files dedicated to slices
  powerpc/mm/slice: Enhance for supporting PPC32
  powerpc/mm/slice: Fix hugepage allocation at hint address on 8xx
  powerpc/mm/slice: Allow up to 64 low slices
  powerpc/8xx: Increase number of slices to 64
  powerpc/8xx: fix cpm_cascade() dual end of interrupt

Christophe Lombard (1):
  cxl: Fix timebase synchronization status on P9

Finn Thain (1):
  macintosh/adb: Use C99 initializers for struct adb_driver instances

Frederic Barrat (2):
  powerpc/xive: Fix wrong xmon output caused by typo
  cxl: F

Re: [PATCH v3 3/4] doc/devicetree: Persistent memory region bindings

2018-04-07 Thread Michael Ellerman
Oliver O'Halloran  writes:
> Add device-tree binding documentation for the nvdimm region driver.
>
> Cc: devicet...@vger.kernel.org
> Signed-off-by: Oliver O'Halloran 
> ---
> v2: Changed name from nvdimm-region to pmem-region.
> Cleaned up the example binding and fixed the overlapping regions.
> Added support for multiple regions in a single reg.
> v3: Removed platform bus boilerplate from the example.
> Changed description of the volatile and reg properties
> to make them more clear.

Thanks.

Acked-by: Michael Ellerman 

cheers


Re: [PATCH v3 1/4] libnvdimm: Add of_node to region and bus descriptors

2018-04-07 Thread Balbir Singh
On Sat, Apr 7, 2018 at 4:28 AM, Dan Williams  wrote:
> On Thu, Apr 5, 2018 at 10:21 PM, Oliver O'Halloran  wrote:
>> We want to be able to cross reference the region and bus devices
>> with the device tree node that they were spawned from. libNVDIMM
>> handles creating the actual devices for these internally, so we
>> need to pass in a pointer to the relevant node in the descriptor.
>>
>> Signed-off-by: Oliver O'Halloran 
>> Acked-by: Dan Williams 
>
> These look good to me. I'll get them applied today and let them soak
> over the weekend for a pull request on Monday.
>
> If anyone wants to add Acks or Reviews I can append them to the merge
> tag. If there are any NAKs please speak up now, but as far as I know
> there are no pending device-tree design concerns.

Hi, Dan

I can ack Oliver's work, will do so in each patch

Overall

Acked-by: Balbir Singh 

Balbir Singh