* Re: [linux-sunxi] [PATCH v5 15/15] ASoC: sun4i-i2s: Adjust regmap settings
From: Code Kipper @ 2019-08-14 9:02 UTC (permalink / raw)
To: Jernej Škrabec
Cc: Linux-ALSA, linux-kernel, Chen-Yu Tsai, Liam Girdwood,
Andrea Venturi (pers), linux-sunxi, Mark Brown, Maxime Ripard,
linux-arm-kernel
In-Reply-To: <3741744.8c7tOhJ1tT@jernej-laptop>
On Wed, 14 Aug 2019 at 10:38, Jernej Škrabec <jernej.skrabec@gmail.com> wrote:
>
> Hi!
>
> Dne sreda, 14. avgust 2019 ob 08:08:54 CEST je codekipper@gmail.com
> napisal(a):
> > From: Marcus Cooper <codekipper@gmail.com>
> >
> > Bypass the regmap cache when flushing the i2s FIFOs and modify the tables
> > to reflect this.
> >
> > Signed-off-by: Marcus Cooper <codekipper@gmail.com>
> > ---
> > sound/soc/sunxi/sun4i-i2s.c | 31 ++++++++++---------------------
> > 1 file changed, 10 insertions(+), 21 deletions(-)
> >
> > diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c
> > index d3c8789f70bb..ecfc1ed79379 100644
> > --- a/sound/soc/sunxi/sun4i-i2s.c
> > +++ b/sound/soc/sunxi/sun4i-i2s.c
> > @@ -876,9 +876,11 @@ static int sun4i_i2s_set_fmt(struct snd_soc_dai *dai,
> > unsigned int fmt) static void sun4i_i2s_start_capture(struct sun4i_i2s
> > *i2s)
> > {
> > /* Flush RX FIFO */
> > + regcache_cache_bypass(i2s->regmap, true);
> > regmap_update_bits(i2s->regmap, SUN4I_I2S_FIFO_CTRL_REG,
> > SUN4I_I2S_FIFO_CTRL_FLUSH_RX,
> > SUN4I_I2S_FIFO_CTRL_FLUSH_RX);
> > + regcache_cache_bypass(i2s->regmap, false);
>
> Did you try with regmap_write_bits() instead? This function will
> unconditionally write bits so it's nicer solution, because you don't have to
> use regcache_cache_bypass().
I didn't....with all the rework I've avoided messing with this change.
Now that the dust
has settled, I can go back to look at this.
Thanks,
CK
>
> >
> > /* Clear RX counter */
> > regmap_write(i2s->regmap, SUN4I_I2S_RX_CNT_REG, 0);
> > @@ -897,9 +899,11 @@ static void sun4i_i2s_start_capture(struct sun4i_i2s
> > *i2s) static void sun4i_i2s_start_playback(struct sun4i_i2s *i2s)
> > {
> > /* Flush TX FIFO */
> > + regcache_cache_bypass(i2s->regmap, true);
> > regmap_update_bits(i2s->regmap, SUN4I_I2S_FIFO_CTRL_REG,
> > SUN4I_I2S_FIFO_CTRL_FLUSH_TX,
> > SUN4I_I2S_FIFO_CTRL_FLUSH_TX);
> > + regcache_cache_bypass(i2s->regmap, false);
>
> Ditto.
>
> >
> > /* Clear TX counter */
> > regmap_write(i2s->regmap, SUN4I_I2S_TX_CNT_REG, 0);
> > @@ -1053,13 +1057,7 @@ static const struct snd_soc_component_driver
> > sun4i_i2s_component = {
> >
> > static bool sun4i_i2s_rd_reg(struct device *dev, unsigned int reg)
> > {
> > - switch (reg) {
> > - case SUN4I_I2S_FIFO_TX_REG:
> > - return false;
> > -
> > - default:
> > - return true;
> > - }
> > + return true;
>
> Why did you change this? Manual mentions that SUN4I_I2S_FIFO_TX_REG is write-
> only register. Even if it can be read, then it's better to remove whole
> function, which will automatically mean that all registers can be read.
>
>
> > }
> >
> > static bool sun4i_i2s_wr_reg(struct device *dev, unsigned int reg)
> > @@ -1078,6 +1076,8 @@ static bool sun4i_i2s_volatile_reg(struct device *dev,
> > unsigned int reg) {
> > switch (reg) {
> > case SUN4I_I2S_FIFO_RX_REG:
> > + case SUN4I_I2S_FIFO_TX_REG:
> > + case SUN4I_I2S_FIFO_STA_REG:
> > case SUN4I_I2S_INT_STA_REG:
> > case SUN4I_I2S_RX_CNT_REG:
> > case SUN4I_I2S_TX_CNT_REG:
>
> SUN4I_I2S_FIFO_CTRL_REG should be put here, because it has two bits which
> returns to 0 immediately after they are set to 1.
>
> Best regards,
> Jernej
>
> > @@ -1088,23 +1088,12 @@ static bool sun4i_i2s_volatile_reg(struct device
> > *dev, unsigned int reg) }
> > }
> >
> > -static bool sun8i_i2s_rd_reg(struct device *dev, unsigned int reg)
> > -{
> > - switch (reg) {
> > - case SUN8I_I2S_FIFO_TX_REG:
> > - return false;
> > -
> > - default:
> > - return true;
> > - }
> > -}
> > -
> > static bool sun8i_i2s_volatile_reg(struct device *dev, unsigned int reg)
> > {
> > if (reg == SUN8I_I2S_INT_STA_REG)
> > return true;
> > if (reg == SUN8I_I2S_FIFO_TX_REG)
> > - return false;
> > + return true;
> >
> > return sun4i_i2s_volatile_reg(dev, reg);
> > }
> > @@ -1175,7 +1164,7 @@ static const struct regmap_config
> > sun8i_i2s_regmap_config = { .reg_defaults = sun8i_i2s_reg_defaults,
> > .num_reg_defaults = ARRAY_SIZE(sun8i_i2s_reg_defaults),
> > .writeable_reg = sun4i_i2s_wr_reg,
> > - .readable_reg = sun8i_i2s_rd_reg,
> > + .readable_reg = sun4i_i2s_rd_reg,
> > .volatile_reg = sun8i_i2s_volatile_reg,
> > };
> >
> > @@ -1188,7 +1177,7 @@ static const struct regmap_config
> > sun50i_i2s_regmap_config = { .reg_defaults = sun50i_i2s_reg_defaults,
> > .num_reg_defaults = ARRAY_SIZE(sun50i_i2s_reg_defaults),
> > .writeable_reg = sun4i_i2s_wr_reg,
> > - .readable_reg = sun8i_i2s_rd_reg,
> > + .readable_reg = sun4i_i2s_rd_reg,
> > .volatile_reg = sun8i_i2s_volatile_reg,
> > };
>
>
>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH 1/2] dt-bindings: media: Add YAML schemas for the generic RC bindings
From: Sean Young @ 2019-08-14 9:03 UTC (permalink / raw)
To: Maxime Ripard
Cc: Mark Rutland, devicetree, Maxime Ripard, linux-kernel,
Chen-Yu Tsai, Rob Herring, mchehab, Frank Rowand,
linux-arm-kernel, linux-media
In-Reply-To: <20190813124513.31413-1-mripard@kernel.org>
On Tue, Aug 13, 2019 at 02:45:12PM +0200, Maxime Ripard wrote:
> From: Maxime Ripard <maxime.ripard@bootlin.com>
>
> The RC controllers have a bunch of generic properties that are needed in a
> device tree. Add a YAML schemas for those.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
> ---
> .../devicetree/bindings/media/rc.txt | 118 +--------------
> .../devicetree/bindings/media/rc.yaml | 135 ++++++++++++++++++
> 2 files changed, 136 insertions(+), 117 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/media/rc.yaml
>
> diff --git a/Documentation/devicetree/bindings/media/rc.txt b/Documentation/devicetree/bindings/media/rc.txt
> index d3e7a012bfda..be629f7fa77e 100644
> --- a/Documentation/devicetree/bindings/media/rc.txt
> +++ b/Documentation/devicetree/bindings/media/rc.txt
> @@ -1,117 +1 @@
> -The following properties are common to the infrared remote controllers:
> -
> -- linux,rc-map-name: string, specifies the scancode/key mapping table
> - defined in-kernel for the remote controller. Support values are:
> - * "rc-adstech-dvb-t-pci"
> - * "rc-alink-dtu-m"
> - * "rc-anysee"
> - * "rc-apac-viewcomp"
> - * "rc-asus-pc39"
> - * "rc-asus-ps3-100"
> - * "rc-ati-tv-wonder-hd-600"
> - * "rc-ati-x10"
> - * "rc-avermedia-a16d"
> - * "rc-avermedia-cardbus"
> - * "rc-avermedia-dvbt"
> - * "rc-avermedia-m135a"
> - * "rc-avermedia-m733a-rm-k6"
> - * "rc-avermedia-rm-ks"
> - * "rc-avermedia"
> - * "rc-avertv-303"
> - * "rc-azurewave-ad-tu700"
> - * "rc-behold-columbus"
> - * "rc-behold"
> - * "rc-budget-ci-old"
> - * "rc-cec"
> - * "rc-cinergy-1400"
> - * "rc-cinergy"
> - * "rc-delock-61959"
> - * "rc-dib0700-nec"
> - * "rc-dib0700-rc5"
> - * "rc-digitalnow-tinytwin"
> - * "rc-digittrade"
> - * "rc-dm1105-nec"
> - * "rc-dntv-live-dvbt-pro"
> - * "rc-dntv-live-dvb-t"
> - * "rc-dtt200u"
> - * "rc-dvbsky"
> - * "rc-empty"
> - * "rc-em-terratec"
> - * "rc-encore-enltv2"
> - * "rc-encore-enltv-fm53"
> - * "rc-encore-enltv"
> - * "rc-evga-indtube"
> - * "rc-eztv"
> - * "rc-flydvb"
> - * "rc-flyvideo"
> - * "rc-fusionhdtv-mce"
> - * "rc-gadmei-rm008z"
> - * "rc-geekbox"
> - * "rc-genius-tvgo-a11mce"
> - * "rc-gotview7135"
> - * "rc-hauppauge"
> - * "rc-imon-mce"
> - * "rc-imon-pad"
> - * "rc-iodata-bctv7e"
> - * "rc-it913x-v1"
> - * "rc-it913x-v2"
> - * "rc-kaiomy"
> - * "rc-kworld-315u"
> - * "rc-kworld-pc150u"
> - * "rc-kworld-plus-tv-analog"
> - * "rc-leadtek-y04g0051"
> - * "rc-lirc"
> - * "rc-lme2510"
> - * "rc-manli"
> - * "rc-medion-x10"
> - * "rc-medion-x10-digitainer"
> - * "rc-medion-x10-or2x"
> - * "rc-msi-digivox-ii"
> - * "rc-msi-digivox-iii"
> - * "rc-msi-tvanywhere-plus"
> - * "rc-msi-tvanywhere"
> - * "rc-nebula"
> - * "rc-nec-terratec-cinergy-xs"
> - * "rc-norwood"
> - * "rc-npgtech"
> - * "rc-pctv-sedna"
> - * "rc-pinnacle-color"
> - * "rc-pinnacle-grey"
> - * "rc-pinnacle-pctv-hd"
> - * "rc-pixelview-new"
> - * "rc-pixelview"
> - * "rc-pixelview-002t"
> - * "rc-pixelview-mk12"
> - * "rc-powercolor-real-angel"
> - * "rc-proteus-2309"
> - * "rc-purpletv"
> - * "rc-pv951"
> - * "rc-hauppauge"
> - * "rc-rc5-tv"
> - * "rc-rc6-mce"
> - * "rc-real-audio-220-32-keys"
> - * "rc-reddo"
> - * "rc-snapstream-firefly"
> - * "rc-streamzap"
> - * "rc-tbs-nec"
> - * "rc-technisat-ts35"
> - * "rc-technisat-usb2"
> - * "rc-terratec-cinergy-c-pci"
> - * "rc-terratec-cinergy-s2-hd"
> - * "rc-terratec-cinergy-xs"
> - * "rc-terratec-slim"
> - * "rc-terratec-slim-2"
> - * "rc-tevii-nec"
> - * "rc-tivo"
> - * "rc-total-media-in-hand"
> - * "rc-total-media-in-hand-02"
> - * "rc-trekstor"
> - * "rc-tt-1500"
> - * "rc-twinhan-dtv-cab-ci"
> - * "rc-twinhan1027"
> - * "rc-videomate-k100"
> - * "rc-videomate-s350"
> - * "rc-videomate-tv-pvr"
> - * "rc-winfast"
> - * "rc-winfast-usbii-deluxe"
> - * "rc-su3000"
> +This file has been moved to rc.yaml.
> diff --git a/Documentation/devicetree/bindings/media/rc.yaml b/Documentation/devicetree/bindings/media/rc.yaml
> new file mode 100644
> index 000000000000..19b28e7edf9c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/rc.yaml
> @@ -0,0 +1,135 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/media/rc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Generic Infrared Remote Controller Device Tree Bindings
> +
> +maintainers:
> + - Mauro Carvalho Chehab <mchehab@kernel.org>
> + - Sean Young <sean@mess.org>
> +
> +properties:
> + $nodename:
> + pattern: "^ir(@[a-f0-9]+)?$"
> +
> + linux,rc-map-name:
> + description:
> + Specifies the scancode/key mapping table defined in-kernel for
> + the remote controller.
> + allOf:
> + - $ref: '/schemas/types.yaml#/definitions/string'
> + - enum:
> + - rc-adstech-dvb-t-pci
> + - rc-alink-dtu-m
> + - rc-anysee
> + - rc-apac-viewcomp
> + - rc-asus-pc39
> + - rc-asus-ps3-100
> + - rc-ati-tv-wonder-hd-600
> + - rc-ati-x10
> + - rc-avermedia
> + - rc-avermedia-a16d
> + - rc-avermedia-cardbus
> + - rc-avermedia-dvbt
> + - rc-avermedia-m135a
> + - rc-avermedia-m733a-rm-k6
> + - rc-avermedia-rm-ks
> + - rc-avertv-303
> + - rc-azurewave-ad-tu700
> + - rc-behold
> + - rc-behold-columbus
> + - rc-budget-ci-old
> + - rc-cec
> + - rc-cinergy
> + - rc-cinergy-1400
> + - rc-delock-61959
> + - rc-dib0700-nec
> + - rc-dib0700-rc5
> + - rc-digitalnow-tinytwin
> + - rc-digittrade
> + - rc-dm1105-nec
> + - rc-dntv-live-dvb-t
> + - rc-dntv-live-dvbt-pro
> + - rc-dtt200u
> + - rc-dvbsky
> + - rc-em-terratec
> + - rc-empty
> + - rc-encore-enltv
> + - rc-encore-enltv-fm53
> + - rc-encore-enltv2
> + - rc-evga-indtube
> + - rc-eztv
> + - rc-flydvb
> + - rc-flyvideo
> + - rc-fusionhdtv-mce
> + - rc-gadmei-rm008z
> + - rc-geekbox
> + - rc-genius-tvgo-a11mce
> + - rc-gotview7135
> + - rc-hauppauge
> + - rc-imon-mce
> + - rc-imon-pad
> + - rc-iodata-bctv7e
> + - rc-it913x-v1
> + - rc-it913x-v2
> + - rc-kaiomy
> + - rc-kworld-315u
> + - rc-kworld-pc150u
> + - rc-kworld-plus-tv-analog
> + - rc-leadtek-y04g0051
> + - rc-lirc
> + - rc-lme2510
> + - rc-manli
> + - rc-medion-x10
> + - rc-medion-x10-digitainer
> + - rc-medion-x10-or2x
> + - rc-msi-digivox-ii
> + - rc-msi-digivox-iii
> + - rc-msi-tvanywhere
> + - rc-msi-tvanywhere-plus
> + - rc-nebula
> + - rc-nec-terratec-cinergy-xs
> + - rc-norwood
> + - rc-npgtech
> + - rc-pctv-sedna
> + - rc-pinnacle-color
> + - rc-pinnacle-grey
> + - rc-pinnacle-pctv-hd
> + - rc-pixelview
> + - rc-pixelview-002t
> + - rc-pixelview-mk12
> + - rc-pixelview-new
> + - rc-powercolor-real-angel
> + - rc-proteus-2309
> + - rc-purpletv
> + - rc-pv951
> + - rc-rc5-tv
> + - rc-rc6-mce
> + - rc-real-audio-220-32-keys
> + - rc-reddo
> + - rc-snapstream-firefly
> + - rc-streamzap
> + - rc-su3000
> + - rc-tbs-nec
> + - rc-technisat-ts35
> + - rc-technisat-usb2
> + - rc-terratec-cinergy-c-pci
> + - rc-terratec-cinergy-s2-hd
> + - rc-terratec-cinergy-xs
> + - rc-terratec-slim
> + - rc-terratec-slim-2
> + - rc-tevii-nec
> + - rc-tivo
> + - rc-total-media-in-hand
> + - rc-total-media-in-hand-02
> + - rc-trekstor
> + - rc-tt-1500
> + - rc-twinhan-dtv-cab-ci
> + - rc-twinhan1027
> + - rc-videomate-k100
> + - rc-videomate-s350
> + - rc-videomate-tv-pvr
> + - rc-winfast
> + - rc-winfast-usbii-deluxe
The list of keymaps is out of date. Might as well fix it up at now?
Thanks
Sean
# awk -F ' ' '/define RC_MAP_/ { gsub(/"/, "", $3); print " - " $3 }' < include/media/rc-map.h
- rc-adstech-dvb-t-pci
- rc-alink-dtu-m
- rc-anysee
- rc-apac-viewcomp
- rc-astrometa-t2hybrid
- rc-asus-pc39
- rc-asus-ps3-100
- rc-ati-tv-wonder-hd-600
- rc-ati-x10
- rc-avermedia-a16d
- rc-avermedia-cardbus
- rc-avermedia-dvbt
- rc-avermedia-m135a
- rc-avermedia-m733a-rm-k6
- rc-avermedia-rm-ks
- rc-avermedia
- rc-avertv-303
- rc-azurewave-ad-tu700
- rc-behold-columbus
- rc-behold
- rc-budget-ci-old
- rc-cec
- rc-cinergy-1400
- rc-cinergy
- rc-d680-dmb
- rc-delock-61959
- rc-dib0700-nec
- rc-dib0700-rc5
- rc-digitalnow-tinytwin
- rc-digittrade
- rc-dm1105-nec
- rc-dntv-live-dvbt-pro
- rc-dntv-live-dvb-t
- rc-dtt200u
- rc-dvbsky
- rc-dvico-mce
- rc-dvico-portable
- rc-empty
- rc-em-terratec
- rc-encore-enltv2
- rc-encore-enltv-fm53
- rc-encore-enltv
- rc-evga-indtube
- rc-eztv
- rc-flydvb
- rc-flyvideo
- rc-fusionhdtv-mce
- rc-gadmei-rm008z
- rc-geekbox
- rc-genius-tvgo-a11mce
- rc-gotview7135
- rc-hauppauge
- rc-hisi-poplar
- rc-hisi-tv-demo
- rc-imon-mce
- rc-imon-pad
- rc-imon-rsc
- rc-iodata-bctv7e
- rc-it913x-v1
- rc-it913x-v2
- rc-kaiomy
- rc-kworld-315u
- rc-kworld-pc150u
- rc-kworld-plus-tv-analog
- rc-leadtek-y04g0051
- rc-lme2510
- rc-manli
- rc-medion-x10
- rc-medion-x10-digitainer
- rc-medion-x10-or2x
- rc-msi-digivox-ii
- rc-msi-digivox-iii
- rc-msi-tvanywhere-plus
- rc-msi-tvanywhere
- rc-nebula
- rc-nec-terratec-cinergy-xs
- rc-norwood
- rc-npgtech
- rc-pctv-sedna
- rc-pinnacle-color
- rc-pinnacle-grey
- rc-pinnacle-pctv-hd
- rc-pixelview-new
- rc-pixelview
- rc-pixelview-002t
- rc-pixelview-mk12
- rc-powercolor-real-angel
- rc-proteus-2309
- rc-purpletv
- rc-pv951
- rc-hauppauge
- rc-rc5-tv
- rc-rc6-mce
- rc-real-audio-220-32-keys
- rc-reddo
- rc-snapstream-firefly
- rc-streamzap
- rc-tango
- rc-tbs-nec
- rc-technisat-ts35
- rc-technisat-usb2
- rc-terratec-cinergy-c-pci
- rc-terratec-cinergy-s2-hd
- rc-terratec-cinergy-xs
- rc-terratec-slim
- rc-terratec-slim-2
- rc-tevii-nec
- rc-tivo
- rc-total-media-in-hand
- rc-total-media-in-hand-02
- rc-trekstor
- rc-tt-1500
- rc-twinhan-dtv-cab-ci
- rc-twinhan1027
- rc-videomate-k100
- rc-videomate-s350
- rc-videomate-tv-pvr
- rc-winfast
- rc-winfast-usbii-deluxe
- rc-su3000
- rc-xbox-dvd
- rc-zx-irdec
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [linux-sunxi] [PATCH v5 14/15] ASoc: sun4i-i2s: Add 20, 24 and 32 bit support
From: Code Kipper @ 2019-08-14 9:03 UTC (permalink / raw)
To: Jernej Škrabec
Cc: Linux-ALSA, linux-kernel, Chen-Yu Tsai, Liam Girdwood,
Andrea Venturi (pers), linux-sunxi, Mark Brown, Maxime Ripard,
linux-arm-kernel
In-Reply-To: <4297791.2mJM636zur@jernej-laptop>
On Wed, 14 Aug 2019 at 10:28, Jernej Škrabec <jernej.skrabec@gmail.com> wrote:
>
> Hi!
>
> Dne sreda, 14. avgust 2019 ob 08:08:53 CEST je codekipper@gmail.com
> napisal(a):
> > From: Marcus Cooper <codekipper@gmail.com>
> >
> > Extend the functionality of the driver to include support of 20 and
> > 24 bits per sample for the earlier SoCs.
> >
> > Newer SoCs can also handle 32bit samples.
> >
> > Signed-off-by: Marcus Cooper <codekipper@gmail.com>
> > ---
> > sound/soc/sunxi/sun4i-i2s.c | 21 +++++++++++++++++++--
> > 1 file changed, 19 insertions(+), 2 deletions(-)
> >
> > diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c
> > index a71969167053..d3c8789f70bb 100644
> > --- a/sound/soc/sunxi/sun4i-i2s.c
> > +++ b/sound/soc/sunxi/sun4i-i2s.c
> > @@ -690,6 +690,11 @@ static int sun4i_i2s_hw_params(struct snd_pcm_substream
> > *substream, case 16:
> > width = DMA_SLAVE_BUSWIDTH_2_BYTES;
> > break;
> > + case 20:
> > + case 24:
> > + case 32:
>
> params_physical_width() returns 32 also for 20 and 24-bit formats, so drop 20
> and 24.
ACK
>
> Best regards,
> Jernej
>
> > + width = DMA_SLAVE_BUSWIDTH_4_BYTES;
> > + break;
> > default:
> > dev_err(dai->dev, "Unsupported physical sample width:
> %d\n",
> > params_physical_width(params));
> > @@ -1015,6 +1020,13 @@ static int sun4i_i2s_dai_probe(struct snd_soc_dai
> > *dai) return 0;
> > }
> >
> > +#define SUN4I_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \
> > + SNDRV_PCM_FMTBIT_S20_LE | \
> > + SNDRV_PCM_FMTBIT_S24_LE)
> > +
> > +#define SUN8I_FORMATS (SUN4I_FORMATS | \
> > + SNDRV_PCM_FMTBIT_S32_LE)
> > +
> > static struct snd_soc_dai_driver sun4i_i2s_dai = {
> > .probe = sun4i_i2s_dai_probe,
> > .capture = {
> > @@ -1022,14 +1034,14 @@ static struct snd_soc_dai_driver sun4i_i2s_dai = {
> > .channels_min = 2,
> > .channels_max = 2,
> > .rates = SNDRV_PCM_RATE_8000_192000,
> > - .formats = SNDRV_PCM_FMTBIT_S16_LE,
> > + .formats = SUN4I_FORMATS,
> > },
> > .playback = {
> > .stream_name = "Playback",
> > .channels_min = 2,
> > .channels_max = 2,
> > .rates = SNDRV_PCM_RATE_8000_192000,
> > - .formats = SNDRV_PCM_FMTBIT_S16_LE,
> > + .formats = SUN4I_FORMATS,
> > },
> > .ops = &sun4i_i2s_dai_ops,
> > .symmetric_rates = 1,
> > @@ -1505,6 +1517,11 @@ static int sun4i_i2s_probe(struct platform_device
> > *pdev) goto err_pm_disable;
> > }
> >
> > + if (i2s->variant->has_fmt_set_lrck_period) {
> > + soc_dai->playback.formats = SUN8I_FORMATS;
> > + soc_dai->capture.formats = SUN8I_FORMATS;
> > + }
> > +
> > if (!of_property_read_u32(pdev->dev.of_node,
> > "allwinner,playback-channels",
> &val)) {
> > if (val >= 2 && val <= 8)
>
>
>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH] gpio: pl061: Fix the issue failed to register the ACPI interruption
From: Linus Walleij @ 2019-08-14 9:04 UTC (permalink / raw)
To: Wei Xu
Cc: Salil Mehta, jinying, Tangkunshan, John Garry,
linux-kernel@vger.kernel.org, Shameerali Kolothum Thodi, Linuxarm,
open list:GPIO SUBSYSTEM, huangdaode, Jonathan Cameron,
Liguozhu (Kenneth), Zhangyi ac,
linux-arm-kernel@lists.infradead.org, Shiju Jose
In-Reply-To: <5D514D6F.4090904@hisilicon.com>
Hi Wei,
thanks for your patch!
This doesn't apply for my "devel" branch, can you rebase
on this:
https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git/log/?h=devel
We have moved some ACPI headers around recently.
On Mon, Aug 12, 2019 at 1:28 PM Wei Xu <xuwei5@hisilicon.com> wrote:
> Invoke acpi_gpiochip_request_interrupts after the acpi data has been
> attached to the pl061 acpi node to register interruption.
Makes sense.
> Fixes: 04ce935c6b2a ("gpio: pl061: Pass irqchip when adding gpiochip")
I doubt this is a regression since I haven't seen anyone use this
gpiochip with ACPI before.
Please rename the patch "gpio: pl061: Add ACPI support" unless
you can convince me it worked without changes before.
Please include some ACPI people on review of this. From
MAINTAINERS:
ACPI
M: "Rafael J. Wysocki" <rjw@rjwysocki.net>
M: Len Brown <lenb@kernel.org>
L: linux-acpi@vger.kernel.org
I would also include Andy Shevchenko and Mika Westerberg for
the GPIO aspects.
Thanks!
Linus Walleij
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: next/master boot: 265 boots: 17 failed, 184 passed with 64 offline (next-20190730)
From: Linus Walleij @ 2019-08-14 9:05 UTC (permalink / raw)
To: Jeffrey Hugo
Cc: Timur Tabi, Kernel Build Reports Mailman List, Lina Iyer,
Stephen Boyd, Mark Brown, Bjorn Andersson, Lee Jones, Linux ARM
In-Reply-To: <0afc2e55-5346-9925-8e4d-d4485f1d3898@codeaurora.org>
On Mon, Aug 12, 2019 at 4:08 PM Jeffrey Hugo <jhugo@codeaurora.org> wrote:
> On 8/3/2019 2:42 AM, Linus Walleij wrote:
> > Sboyd hacked up a patch to that effect and I applied it.
> >
> > I haven't heard if QDF2400 is working again but I'd love to know!
> >
>
> Sorry, was on vacation. Per kernelci[1], looks like things are working.
>
> [1] https://kernelci.org/boot/qcom-qdf2400/
Awesome, thanks!
Linus Walleij
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH 1/3] arm64: constify icache_policy_str[]
From: Dave Martin @ 2019-08-14 9:07 UTC (permalink / raw)
To: Mark Rutland; +Cc: catalin.marinas, will.deacon, linux-arm-kernel
In-Reply-To: <20190813141639.13476-2-mark.rutland@arm.com>
On Tue, Aug 13, 2019 at 03:16:37PM +0100, Mark Rutland wrote:
> The icache_policy_str[] array contains compile-time constant data, and
> is never intentionally modified, so let's mark it as const.
>
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> ---
> arch/arm64/kernel/cpuinfo.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
> index 876055e37352..05933c065732 100644
> --- a/arch/arm64/kernel/cpuinfo.c
> +++ b/arch/arm64/kernel/cpuinfo.c
> @@ -33,7 +33,7 @@
> DEFINE_PER_CPU(struct cpuinfo_arm64, cpu_data);
> static struct cpuinfo_arm64 boot_cpu_data;
>
> -static char *icache_policy_str[] = {
> +static const char *icache_policy_str[] = {
Can this be const char *const ?
The strings will be in .rodata and can't be modified anyway, but I
presume we don't modify the array elements either...
> [0 ... ICACHE_POLICY_PIPT] = "RESERVED/UNKNOWN",
> [ICACHE_POLICY_VIPT] = "VIPT",
> [ICACHE_POLICY_PIPT] = "PIPT",
[...]
Cheers
---Dave
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH] MAINTAINERS: Update path to tcb_clksrc.c
From: Alexandre Belloni @ 2019-08-14 9:08 UTC (permalink / raw)
To: Nicolas.Ferre
Cc: joe, Ludovic.Desroches, linux-kernel, efremov, linux-arm-kernel
In-Reply-To: <efb86032-7547-dbc1-19ac-11dc9aff1521@microchip.com>
On 13/08/2019 08:11:23+0000, Nicolas Ferre wrote:
> On 13/08/2019 at 08:10, Denis Efremov wrote:
> > Update MAINTAINERS record to reflect the filename change
> > from tcb_clksrc.c to timer-atmel-tcb.c
> >
> > Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
>
> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
> But, while you're at it, I would add another line: see below...
>
> > Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
> > Cc: linux-arm-kernel@lists.infradead.org
> > Fixes: a7aae768166e ("clocksource/drivers/tcb_clksrc: Rename the file for consistency")
> > Signed-off-by: Denis Efremov <efremov@linux.com>
> > ---
> > MAINTAINERS | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index c9ad38a9414f..3ec8154e4630 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -10637,7 +10637,7 @@ M: Nicolas Ferre <nicolas.ferre@microchip.com>
>
> +M: Alexandre Belloni <alexandre.belloni@bootlin.com>
>
> But Alexandre have to agree, of course.
>
> > L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
> > S: Supported
> > F: drivers/misc/atmel_tclib.c
> > -F: drivers/clocksource/tcb_clksrc.c
> > +F: drivers/clocksource/timer-atmel-tcb.c
> >
> > MICROCHIP USBA UDC DRIVER
> > M: Cristian Birsan <cristian.birsan@microchip.com>
>
> We could also remove this entry and mix it with:
> "ARM/Microchip (AT91) SoC support"
>
> But I prefer to keep it separated like this for various reasons.
>
I would simply remove this entry because all the files are already
matching the SoC entry (it has N: atmel) and atmel_tclib will go away (I
have a series to do that).
If you want to keep a separate entry, maybe we should then add the
system timer and pit drivers.
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH 2/3] arm64: constify aarch64_insn_encoding_class[]
From: Dave Martin @ 2019-08-14 9:10 UTC (permalink / raw)
To: Mark Rutland; +Cc: catalin.marinas, will.deacon, linux-arm-kernel
In-Reply-To: <20190813141639.13476-3-mark.rutland@arm.com>
On Tue, Aug 13, 2019 at 03:16:38PM +0100, Mark Rutland wrote:
> The aarch64_insn_encoding_class[] array contains compile-time constant
> data, and is never intentionally modified, so let's mark it as const.
>
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> ---
> arch/arm64/kernel/insn.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/kernel/insn.c b/arch/arm64/kernel/insn.c
> index 84b059ed04fc..d801a7094076 100644
> --- a/arch/arm64/kernel/insn.c
> +++ b/arch/arm64/kernel/insn.c
> @@ -26,7 +26,7 @@
> #define AARCH64_INSN_N_BIT BIT(22)
> #define AARCH64_INSN_LSL_12 BIT(22)
>
> -static int aarch64_insn_encoding_class[] = {
> +static const int aarch64_insn_encoding_class[] = {
> AARCH64_INSN_CLS_UNKNOWN,
> AARCH64_INSN_CLS_UNKNOWN,
> AARCH64_INSN_CLS_UNKNOWN,
This is an implementation detail of aarch64_get_insn_class(), so it
could be moved inside there, or rewritten as a switch. It works as-is
though.
Either way,
Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Cheers
---Dave
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH v4 5/6] coresight: etm4x: save/restore state across CPU low power states
From: Andrew Murray @ 2019-08-14 9:12 UTC (permalink / raw)
To: Suzuki K Poulose
Cc: Al.Grant, mathieu.poirier, alexander.shishkin, coresight, leo.yan,
Sudeep.Holla, linux-arm-kernel, mike.leach
In-Reply-To: <3bbc2a3c-03e3-7c8d-8f44-939f172bd1a0@arm.com>
On Fri, Aug 02, 2019 at 11:54:12AM +0100, Suzuki K Poulose wrote:
>
>
> On 30/07/2019 13:51, Andrew Murray wrote:
> > Some hardware will ignore bit TRCPDCR.PU which is used to signal
> > to hardware that power should not be removed from the trace unit.
> > Let's mitigate against this by conditionally saving and restoring
> > the trace unit state when the CPU enters low power states.
> >
> > This patchset introduces a firmware property named
> > 'arm,coresight-needs-save-restore' - when this is present the
> > hardware state will be conditionally saved and restored.
> >
> > A module parameter 'pm_save_enable' is also introduced which can
> > be configured to override the firmware property. This can be set
> > to never allow save/restore, to conditionally allow it, or to
> > do as the firmware indicates (default).
> >
> > We avoid saving the hardware state when coresight isn't in use
> > to reduce PM latency - we can't determine this by reading the
> > claim tags (TRCCLAIMCLR) as these are 'trace' registers which need
> > power and clocking, something we can't easily provide in the PM
> > context. Therefore we rely on the existing drvdata->mode internal
> > state that is set when self-hosted coresight is used (and powered).
> >
> > As we do not have a simple way of determining if an external agent
> > is using coresight, we don't save/restore for this use case.
> >
> > Signed-off-by: Andrew Murray <andrew.murray@arm.com>
> > ---
> > drivers/hwtracing/coresight/coresight-etm4x.c | 322 ++++++++++++++++++
> > drivers/hwtracing/coresight/coresight-etm4x.h | 64 ++++
> > 2 files changed, 386 insertions(+)
> >
> > diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c
> > index a128b5063f46..30f118792289 100644
> > --- a/drivers/hwtracing/coresight/coresight-etm4x.c
> > +++ b/drivers/hwtracing/coresight/coresight-etm4x.c
>
>
> > +static int etm4_cpu_pm_notify(struct notifier_block *nb, unsigned long cmd,
> > + void *v)
> > +{
> > + struct etmv4_drvdata *drvdata;
> > + unsigned int cpu = smp_processor_id();
> > +
> > + if (!etmdrvdata[cpu])
> > + return 0;
> > +
> > + drvdata = etmdrvdata[cpu];
> > +
> > + if (!drvdata->save_state)
> > + return NOTIFY_OK;
> > +
> > + if (WARN_ON_ONCE(drvdata->cpu != smp_processor_id()))
> > + return NOTIFY_BAD;
>
> minor nit: you may skip the second call to smp_processor_id() as this is called
> on from non-preemptible context.
>
> > +
> > + switch (cmd) {
> > + case CPU_PM_ENTER:
> > + /* save the state if self-hosted coresight is in use */
> > + if (local_read(&drvdata->mode))
> > + if (etm4_cpu_save(drvdata))
> > + return NOTIFY_BAD;
> > + break;
> > + case CPU_PM_EXIT:
> > + case CPU_PM_ENTER_FAILED:
> > + /* trcclaimset is set when there is state to restore */
> > + if (drvdata->state_needs_restore)
> > + etm4_cpu_restore(drvdata);
> > + break;
> > + default:
> > + return NOTIFY_DONE;
> > + }
> > +
> > + return NOTIFY_OK;
> > +}
> > +
>
>
> > +static void etm4_cpu_pm_unregister(void)
> > +{
> > + cpu_pm_unregister_notifier(&etm4_cpu_pm_nb);
> > +}
> > +#else
> > +static int etm4_cpu_pm_register(void) { return 0; }
> > +static void etm4_cpu_pm_unregister(void) { }
> > +#endif
> > +
> > +static inline bool etm4_needs_save_restore(struct device *dev)
> > +{
> > + return fwnode_property_present(dev->fwnode,
>
> nit: It may be safe to use dev_fwnode(dev), instead of dev->fwnode. But I
> see a lot of existing users of dev->fwnode. Not sure it does have an impact.
>
> Looks fine to me ,
>
> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Thanks - I'll make these changes.
Andrew Murray
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH 3/3] arm64: constify sys64_hook instances
From: Dave Martin @ 2019-08-14 9:12 UTC (permalink / raw)
To: Mark Rutland; +Cc: catalin.marinas, will.deacon, linux-arm-kernel
In-Reply-To: <20190813141639.13476-4-mark.rutland@arm.com>
On Tue, Aug 13, 2019 at 03:16:39PM +0100, Mark Rutland wrote:
> All instances of struct sys64_hook contain compile-time constant data,
> and are never inentionally modified, so let's make them all const.
>
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> ---
> arch/arm64/kernel/traps.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c
> index 42c8422cdf4a..a5d7ce4297b0 100644
> --- a/arch/arm64/kernel/traps.c
> +++ b/arch/arm64/kernel/traps.c
> @@ -511,7 +511,7 @@ struct sys64_hook {
> void (*handler)(unsigned int esr, struct pt_regs *regs);
> };
>
> -static struct sys64_hook sys64_hooks[] = {
> +static const struct sys64_hook sys64_hooks[] = {
> {
> .esr_mask = ESR_ELx_SYS64_ISS_EL0_CACHE_OP_MASK,
> .esr_val = ESR_ELx_SYS64_ISS_EL0_CACHE_OP_VAL,
> @@ -636,7 +636,7 @@ static void compat_cntfrq_read_handler(unsigned int esr, struct pt_regs *regs)
> arm64_compat_skip_faulting_instruction(regs, 4);
> }
>
> -static struct sys64_hook cp15_32_hooks[] = {
> +static const struct sys64_hook cp15_32_hooks[] = {
> {
> .esr_mask = ESR_ELx_CP15_32_ISS_SYS_MASK,
> .esr_val = ESR_ELx_CP15_32_ISS_SYS_CNTFRQ,
> @@ -656,7 +656,7 @@ static void compat_cntvct_read_handler(unsigned int esr, struct pt_regs *regs)
> arm64_compat_skip_faulting_instruction(regs, 4);
> }
>
> -static struct sys64_hook cp15_64_hooks[] = {
> +static const struct sys64_hook cp15_64_hooks[] = {
> {
> .esr_mask = ESR_ELx_CP15_64_ISS_SYS_MASK,
> .esr_val = ESR_ELx_CP15_64_ISS_SYS_CNTVCT,
> @@ -667,7 +667,7 @@ static struct sys64_hook cp15_64_hooks[] = {
>
> asmlinkage void __exception do_cp15instr(unsigned int esr, struct pt_regs *regs)
> {
> - struct sys64_hook *hook, *hook_base;
> + const struct sys64_hook *hook, *hook_base;
>
> if (!cp15_cond_valid(esr, regs)) {
> /*
> @@ -707,7 +707,7 @@ asmlinkage void __exception do_cp15instr(unsigned int esr, struct pt_regs *regs)
>
> asmlinkage void __exception do_sysinstr(unsigned int esr, struct pt_regs *regs)
> {
> - struct sys64_hook *hook;
> + const struct sys64_hook *hook;
>
> for (hook = sys64_hooks; hook->handler; hook++)
> if ((hook->esr_mask & esr) == hook->esr_val) {
Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Cheers
---Dave
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH 1/8] arm64: memory: Fix virt_addr_valid() using __is_lm_address()
From: Catalin Marinas @ 2019-08-14 9:19 UTC (permalink / raw)
To: Will Deacon
Cc: Mark Rutland, Steve Capper, Andrey Konovalov, Geert Uytterhoeven,
Qian Cai, linux-arm-kernel
In-Reply-To: <20190813170149.26037-2-will@kernel.org>
On Tue, Aug 13, 2019 at 06:01:42PM +0100, Will Deacon wrote:
> diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h
> index afaf512c0e1b..442ab861cab8 100644
> --- a/arch/arm64/include/asm/memory.h
> +++ b/arch/arm64/include/asm/memory.h
> @@ -244,9 +244,9 @@ static inline const void *__tag_set(const void *addr, u8 tag)
> /*
> * The linear kernel range starts in the middle of the virtual adddress
> * space. Testing the top bit for the start of the region is a
> - * sufficient check.
> + * sufficient check and avoids having to worry about the tag.
> */
> -#define __is_lm_address(addr) (!((addr) & BIT(vabits_actual - 1)))
> +#define __is_lm_address(addr) (!(((u64)addr) & BIT(vabits_actual - 1)))
>
> #define __lm_to_phys(addr) (((addr) + physvirt_offset))
> #define __kimg_to_phys(addr) ((addr) - kimage_voffset)
> @@ -326,13 +326,13 @@ static inline void *phys_to_virt(phys_addr_t x)
>
> #define virt_to_page(vaddr) ((struct page *)((__virt_to_pgoff(vaddr)) + VMEMMAP_START))
> #endif
> -#endif
>
> -#define _virt_addr_is_linear(kaddr) \
> - (__tag_reset((u64)(kaddr)) >= PAGE_OFFSET)
> +#define virt_addr_valid(addr) ({ \
> + __typeof__(addr) __addr = addr; \
> + __is_lm_address(__addr) && pfn_valid(virt_to_pfn(__addr)); \
> +})
There is a slight change of semantics here but I don't think it's an
issue currently. __is_lm_address() is true even for a user address, so
at least the first part of virt_addr_valid() now accepts such addresses.
The pfn would be wrong eventually because of the virt-to-phys offsetting
and pfn_valid() false but we rely on this rather than checking it's a
kernel address. Slight concern as this macro is called from drivers.
Should we keep the PAGE_OFFSET check as well?
--
Catalin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH 2/8] arm64: memory: Ensure address tag is masked in conversion macros
From: Catalin Marinas @ 2019-08-14 9:23 UTC (permalink / raw)
To: Will Deacon
Cc: Mark Rutland, Steve Capper, Andrey Konovalov, Geert Uytterhoeven,
Qian Cai, linux-arm-kernel
In-Reply-To: <20190813170149.26037-3-will@kernel.org>
On Tue, Aug 13, 2019 at 06:01:43PM +0100, Will Deacon wrote:
> When converting a linear virtual address to a physical address, pfn or
> struct page *, we must make sure that the tag bits are masked before the
> calculation otherwise we end up with corrupt pointers when running with
> CONFIG_KASAN_SW_TAGS=y:
>
> | Unable to handle kernel paging request at virtual address 0037fe0007580d08
> | [0037fe0007580d08] address between user and kernel address ranges
>
> Mask out the tag in __virt_to_phys_nodebug() and virt_to_page().
>
> Reported-by: Qian Cai <cai@lca.pw>
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Fixes: 9cb1c5ddd2c4 ("arm64: mm: Remove bit-masking optimisations for PAGE_OFFSET and VMEMMAP_START")
> Signed-off-by: Will Deacon <will@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [BUG] removing and reinserting imx-media causes kernel to explode
From: Russell King - ARM Linux admin @ 2019-08-14 9:25 UTC (permalink / raw)
To: Steve Longerbeam
Cc: open list:STAGING SUBSYSTEM, Philipp Zabel, Ezequiel Garcia,
Greg Kroah-Hartman, Sascha Hauer, open list, Sakari Ailus,
NXP Linux Team, Pengutronix Kernel Team, Shawn Guo,
Mauro Carvalho Chehab, Fabio Estevam,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
linux-media
I just did this:
rmmod imx-media
modprobe imx-media
and was greeted by the below kernel messages. I don't think this has
been the first issue I found with the iMX media stuff involving a module
unload/reload cycle - may I suggest that this is added to the testing
regime for this code? Thanks.
imx-media: Removing imx-media
ipu1_vdic: Removing
ipu1_ic_prp: Removing
ipu1_ic_prpenc: Removing
ipu1_ic_prpvf: Removing
ipu2_vdic: Removing
ipu2_ic_prp: Removing
ipu2_ic_prpenc: Removing
ipu2_ic_prpvf: Removing
imx_media: module is from the staging directory, the quality is unknown, you have been warned.
ipu2_ic_prpvf: Registered ipu2_ic_prpvf capture as /dev/video2
imx-media: subdev ipu2_ic_prpvf bound
ipu2_ic_prpenc: Registered ipu2_ic_prpenc capture as /dev/video3
imx-media: subdev ipu2_ic_prpenc bound
imx-media: subdev ipu2_ic_prp bound
imx-media: subdev ipu2_vdic bound
ipu1_ic_prpvf: Registered ipu1_ic_prpvf capture as /dev/video4
imx-media: subdev ipu1_ic_prpvf bound
ipu1_ic_prpenc: Registered ipu1_ic_prpenc capture as /dev/video5
imx-media: subdev ipu1_ic_prpenc bound
imx-media: subdev ipu1_ic_prp bound
imx-media: subdev ipu1_vdic bound
kobject (ddca68f0): tried to init an initialized object, something is seriously wrong.
CPU: 1 PID: 31521 Comm: modprobe Tainted: G C 5.2.0+ #325
Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[<c0019560>] (unwind_backtrace) from [<c0014734>] (show_stack+0x10/0x14)
[<c0014734>] (show_stack) from [<c084573c>] (dump_stack+0x9c/0xd4)
[<c084573c>] (dump_stack) from [<c084a878>] (kobject_init+0x74/0x94)
[<c084a878>] (kobject_init) from [<c04b2a70>] (device_initialize+0x1c/0xec)
[<c04b2a70>] (device_initialize) from [<c04b4ad0>] (device_register+0xc/0x18)
[<c04b4ad0>] (device_register) from [<c0599484>] (__video_register_device+0x9b4/0x1228)
[<c0599484>] (__video_register_device) from [<bf129fac>] (imx_media_capture_device_register+0x44/0x1f4 [imx_media_capture])
[<bf129fac>] (imx_media_capture_device_register [imx_media_capture]) from [<bf130bf8>] (csi_registered+0x154/0x19c [imx_media_csi])
[<bf130bf8>] (csi_registered [imx_media_csi]) from [<c05a062c>] (v4l2_device_register_subdev+0xd0/0x164)
[<c05a062c>] (v4l2_device_register_subdev) from [<c05abed0>] (v4l2_async_match_notify+0x1c/0x130)
[<c05abed0>] (v4l2_async_match_notify) from [<c05ac02c>] (v4l2_async_notifier_try_all_subdevs+0x48/0x94)
[<c05ac02c>] (v4l2_async_notifier_try_all_subdevs) from [<c05ac6f4>] (__v4l2_async_notifier_register+0xa8/0x110)
[<c05ac6f4>] (__v4l2_async_notifier_register) from [<c05ac7ec>] (v4l2_async_notifier_register+0x3c/0x54)
[<c05ac7ec>] (v4l2_async_notifier_register) from [<bf01ef64>] (imx_media_dev_notifier_register+0x2c/0x70 [imx_media])
[<bf01ef64>] (imx_media_dev_notifier_register [imx_media]) from [<bf01e090>] (imx_media_probe+0x3c/0x8c [imx_media])
[<bf01e090>] (imx_media_probe [imx_media]) from [<c04b9178>] (platform_drv_probe+0x48/0x98)
[<c04b9178>] (platform_drv_probe) from [<c04b7298>] (really_probe+0x1d8/0x2c0)
[<c04b7298>] (really_probe) from [<c04b7554>] (driver_probe_device+0x5c/0x174)
[<c04b7554>] (driver_probe_device) from [<c04b7814>] (device_driver_attach+0x58/0x60)
[<c04b7814>] (device_driver_attach) from [<c04b78a0>] (__driver_attach+0x84/0xc0)
[<c04b78a0>] (__driver_attach) from [<c04b5968>] (bus_for_each_dev+0x58/0x7c)
[<c04b5968>] (bus_for_each_dev) from [<c04b6768>] (bus_add_driver+0xd0/0x1cc)
[<c04b6768>] (bus_add_driver) from [<c04b848c>] (driver_register+0x7c/0x110)
[<c04b848c>] (driver_register) from [<c000b05c>] (do_one_initcall+0x74/0x308)
[<c000b05c>] (do_one_initcall) from [<c00d9b78>] (do_init_module+0x5c/0x1f4)
[<c00d9b78>] (do_init_module) from [<c00d8be4>] (load_module+0x19a4/0x2020)
[<c00d8be4>] (load_module) from [<c00d9438>] (sys_finit_module+0x8c/0x98)
[<c00d9438>] (sys_finit_module) from [<c0009000>] (ret_fast_syscall+0x0/0x28)
Exception stack(0xdb677fa8 to 0xdb677ff0)
7fa0: 00b04170 00000000 00000003 007bd84c 00000000 00b05cb8
7fc0: 00b04170 00000000 1ee84500 0000017b 00040000 00000000 00b04eb8 00000000
7fe0: be958178 be958168 007b54bb b6c28712
ipu1_csi0: Registered ipu1_csi0 capture as /dev/video6
imx-media: subdev ipu1_csi0 bound
kobject (dcd780f0): tried to init an initialized object, something is seriously wrong.
CPU: 1 PID: 31521 Comm: modprobe Tainted: G C 5.2.0+ #325
Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[<c0019560>] (unwind_backtrace) from [<c0014734>] (show_stack+0x10/0x14)
[<c0014734>] (show_stack) from [<c084573c>] (dump_stack+0x9c/0xd4)
[<c084573c>] (dump_stack) from [<c084a878>] (kobject_init+0x74/0x94)
[<c084a878>] (kobject_init) from [<c04b2a70>] (device_initialize+0x1c/0xec)
[<c04b2a70>] (device_initialize) from [<c04b4ad0>] (device_register+0xc/0x18)
[<c04b4ad0>] (device_register) from [<c0599484>] (__video_register_device+0x9b4/0x1228)
[<c0599484>] (__video_register_device) from [<bf129fac>] (imx_media_capture_device_register+0x44/0x1f4 [imx_media_capture])
[<bf129fac>] (imx_media_capture_device_register [imx_media_capture]) from [<bf130bf8>] (csi_registered+0x154/0x19c [imx_media_csi])
[<bf130bf8>] (csi_registered [imx_media_csi]) from [<c05a062c>] (v4l2_device_register_subdev+0xd0/0x164)
[<c05a062c>] (v4l2_device_register_subdev) from [<c05abed0>] (v4l2_async_match_notify+0x1c/0x130)
[<c05abed0>] (v4l2_async_match_notify) from [<c05ac02c>] (v4l2_async_notifier_try_all_subdevs+0x48/0x94)
[<c05ac02c>] (v4l2_async_notifier_try_all_subdevs) from [<c05ac6f4>] (__v4l2_async_notifier_register+0xa8/0x110)
[<c05ac6f4>] (__v4l2_async_notifier_register) from [<c05ac7ec>] (v4l2_async_notifier_register+0x3c/0x54)
[<c05ac7ec>] (v4l2_async_notifier_register) from [<bf01ef64>] (imx_media_dev_notifier_register+0x2c/0x70 [imx_media])
[<bf01ef64>] (imx_media_dev_notifier_register [imx_media]) from [<bf01e090>] (imx_media_probe+0x3c/0x8c [imx_media])
[<bf01e090>] (imx_media_probe [imx_media]) from [<c04b9178>] (platform_drv_probe+0x48/0x98)
[<c04b9178>] (platform_drv_probe) from [<c04b7298>] (really_probe+0x1d8/0x2c0)
[<c04b7298>] (really_probe) from [<c04b7554>] (driver_probe_device+0x5c/0x174)
[<c04b7554>] (driver_probe_device) from [<c04b7814>] (device_driver_attach+0x58/0x60)
[<c04b7814>] (device_driver_attach) from [<c04b78a0>] (__driver_attach+0x84/0xc0)
[<c04b78a0>] (__driver_attach) from [<c04b5968>] (bus_for_each_dev+0x58/0x7c)
[<c04b5968>] (bus_for_each_dev) from [<c04b6768>] (bus_add_driver+0xd0/0x1cc)
[<c04b6768>] (bus_add_driver) from [<c04b848c>] (driver_register+0x7c/0x110)
[<c04b848c>] (driver_register) from [<c000b05c>] (do_one_initcall+0x74/0x308)
[<c000b05c>] (do_one_initcall) from [<c00d9b78>] (do_init_module+0x5c/0x1f4)
[<c00d9b78>] (do_init_module) from [<c00d8be4>] (load_module+0x19a4/0x2020)
[<c00d8be4>] (load_module) from [<c00d9438>] (sys_finit_module+0x8c/0x98)
[<c00d9438>] (sys_finit_module) from [<c0009000>] (ret_fast_syscall+0x0/0x28)
Exception stack(0xdb677fa8 to 0xdb677ff0)
7fa0: 00b04170 00000000 00000003 007bd84c 00000000 00b05cb8
7fc0: 00b04170 00000000 1ee84500 0000017b 00040000 00000000 00b04eb8 00000000
7fe0: be958178 be958168 007b54bb b6c28712
8<--- cut here ---
Unable to handle kernel NULL pointer dereference at virtual address 00000064
pgd = db720000
[00000064] *pgd=00000000
Internal error: Oops: 5 [#1] SMP ARM
Modules linked in: imx_media(C+) caam_jr imx_media_vdic(C) imx_media_ic(C) snd_soc_imx_spdif imx_thermal imx_media_csi(C) imx_media_capture(C) snd_soc_imx_audmux imx219 snd_soc_sgtl5000 imx6_mipi_csi2(C) nvmem_imx_ocotp mux_mmio video_mux caam mux_core error imx_sdma virt_dma coda v4l2_mem2mem rc_cec snd_soc_fsl_spdif imx_vdoa videobuf2_dma_contig snd_soc_fsl_ssi imx_pcm_dma dw_hdmi_ahb_audio dw_hdmi_cec etnaviv gpu_sched v4l2_fwnode imx_media_common(C) imx6q_cpufreq rc_pinnacle_pctv_hd nfsd [last unloaded: imx_media]
CPU: 1 PID: 31521 Comm: modprobe Tainted: G C 5.2.0+ #325
Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
PC is at kobject_get+0x10/0x54
LR is at klist_node_init+0x40/0x58
pc : [<c084a61c>] lr : [<c084a304>] psr: 200d0013
sp : db677b20 ip : 600d0013 fp : dcd78000
r10: c08c9044 r9 : c0c97d20 r8 : 00000000
r7 : 00000000 r6 : deb34c10 r5 : deb049c0 r4 : 00000044
r3 : c04b23bc r2 : c0c17c94 r1 : dcc04930 r0 : 00000044
Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
Control: 10c5387d Table: 2b72004a DAC: 00000051
Process modprobe (pid: 31521, stack limit = 0xdb676218)
Stack: (0xdb677b20 to 0xdb678000)
7b20: 00000000 dcc9f300 dcc04930 c084a304 00000000 deb049c0 dcc04930 c084a3cc
7b40: 00000000 dcd780f0 00000000 c04b47b4 3a3138f0 c13c0037 00000001 c04b2af8
7b60: c13c6208 00000007 dcd780f0 000003ac c13c6608 c0599484 c0cb7f90 60060013
7b80: 00000000 00000001 00000001 c0ab9740 00000001 00000000 1bef8335 8c000030
7ba0: 7e000f99 00000080 00000000 00000000 00000000 ddca7040 dcd78000 ddca7858
7bc0: ddca784c 00000001 00000000 ddca71a0 00000000 bf129fac bf12ad00 ddd1c96c
7be0: da51f2c0 60060013 c05975cc c0089908 00000000 00000002 ddd1c938 ddca7970
7c00: db677c18 c139a374 00000003 00000000 ddca784c c0862d4c 00000001 db677c18
7c20: 00000003 ddca7970 ddd1c840 ddca784c 00000003 00000000 ddca784c 00000003
7c40: ddca7840 ddca7858 ddca78a0 00000001 ddca784c bf130bf8 00000001 ddca7a6c
7c60: c0cb8120 00002017 bf02089c ddca784c ddd1ca60 00000000 c0c97ebc ddd1ca60
7c80: 00000030 bf02089c 00000124 c05a062c d5a1c8c0 ddca784c d5a1c8c0 ddd1cbb8
7ca0: c0c97ebc c05abed0 d5a1c8c0 ddca784c ddd1cbb8 c0c97f08 c0c97ebc c05ac02c
7cc0: ddd1cbb4 ddd1cbb8 ddd1cbc8 ddd1cbd0 00000000 c05ac6f4 ddd1cbb8 00000000
7ce0: bf02089c c13c3b8c 00000000 c05ac7ec bf020518 ddd1c840 00000000 bf01ef64
7d00: fffffffe ddd1c840 00000000 bf01e090 bf01e054 deb34c10 00000000 c04b9178
7d20: c04b9130 deb34c10 c13c3a88 00000000 c13c3b8c c04b7298 deb34c10 00000000
7d40: bf02089c 00000000 c0c1e560 00000028 deb34c10 c04b7554 deb34c10 bf02089c
7d60: 00000000 deb34c10 00000000 bf02089c 00000000 c0c1e560 00000028 dce1ac00
7d80: 00000124 c04b7814 bf02089c deb34c10 00000000 c04b78a0 deb34c10 bf02089c
7da0: c04b781c c04b5968 df0812a4 deb04a10 bf02089c c403d700 c0c84cc0 c04b6768
7dc0: bf0206bc bf02089c bf023000 bf02089c bf023000 c0cb7c20 00000000 c04b848c
7de0: c04b8d04 c0cb6bc0 bf023000 c000b05c 00000001 c0c1eca4 c0cb6daf 00000cc0
7e00: 00000040 c00d9b3c 00000008 c00aa7e8 d5a1c700 c01b2110 dddcfb80 df001e00
7e20: 00000001 00000cc0 df001e00 000ecf78 c00d8b98 bf020900 c0c1e560 bf020900
7e40: d5a1c700 bf020900 c0cb8120 bf020948 dce1ac00 c00d9b78 c0cb8120 bf020948
7e60: c0cb6ca7 c0c1e560 bf020900 c00d8be4 bf02090c 00007fff bf020900 c00d688c
7e80: bf02469e c13abc64 f0a21000 bf020b20 000000c5 db677eb4 000051b8 c01cf3a0
7ea0: 00000001 00000000 c01cf4a8 00000006 00000000 00000000 00000000 bf01f0b8
7ec0: 00000003 00000000 00000000 00000000 00000000 00000000 00000000 00000000
7ee0: 00000000 00000000 00000000 00000000 00000003 7fffffff 00000000 00000000
7f00: 00000003 007bd84c db676000 0000017b 00000000 c00d9438 7fffffff 00000000
7f20: 00000003 b6ccb000 00000000 f0a21000 000051b8 00000000 00000002 f0a2371d
7f40: f0a23a80 f0a21000 000051b8 f0a25b50 f0a23d49 f0a24b58 00002b50 00003170
7f60: 00001624 000035c8 00000000 00000000 00000000 00001614 00000027 00000028
7f80: 00000020 00000000 00000017 00000000 00b04170 00000000 1ee84500 0000017b
7fa0: c00091c4 c0009000 00b04170 00000000 00000003 007bd84c 00000000 00b05cb8
7fc0: 00b04170 00000000 1ee84500 0000017b 00040000 00000000 00b04eb8 00000000
7fe0: be958178 be958168 007b54bb b6c28712 800e0030 00000003 00000000 00000000
[<c084a61c>] (kobject_get) from [<c084a304>] (klist_node_init+0x40/0x58)
[<c084a304>] (klist_node_init) from [<c084a3cc>] (klist_add_tail+0x18/0x44)
[<c084a3cc>] (klist_add_tail) from [<c04b47b4>] (device_add+0x3dc/0x59c)
[<c04b47b4>] (device_add) from [<c0599484>] (__video_register_device+0x9b4/0x1228)
[<c0599484>] (__video_register_device) from [<bf129fac>] (imx_media_capture_device_register+0x44/0x1f4 [imx_media_capture])
[<bf129fac>] (imx_media_capture_device_register [imx_media_capture]) from [<bf130bf8>] (csi_registered+0x154/0x19c [imx_media_csi])
[<bf130bf8>] (csi_registered [imx_media_csi]) from [<c05a062c>] (v4l2_device_register_subdev+0xd0/0x164)
[<c05a062c>] (v4l2_device_register_subdev) from [<c05abed0>] (v4l2_async_match_notify+0x1c/0x130)
[<c05abed0>] (v4l2_async_match_notify) from [<c05ac02c>] (v4l2_async_notifier_try_all_subdevs+0x48/0x94)
[<c05ac02c>] (v4l2_async_notifier_try_all_subdevs) from [<c05ac6f4>] (__v4l2_async_notifier_register+0xa8/0x110)
[<c05ac6f4>] (__v4l2_async_notifier_register) from [<c05ac7ec>] (v4l2_async_notifier_register+0x3c/0x54)
[<c05ac7ec>] (v4l2_async_notifier_register) from [<bf01ef64>] (imx_media_dev_notifier_register+0x2c/0x70 [imx_media])
[<bf01ef64>] (imx_media_dev_notifier_register [imx_media]) from [<bf01e090>] (imx_media_probe+0x3c/0x8c [imx_media])
[<bf01e090>] (imx_media_probe [imx_media]) from [<c04b9178>] (platform_drv_probe+0x48/0x98)
[<c04b9178>] (platform_drv_probe) from [<c04b7298>] (really_probe+0x1d8/0x2c0)
[<c04b7298>] (really_probe) from [<c04b7554>] (driver_probe_device+0x5c/0x174)
[<c04b7554>] (driver_probe_device) from [<c04b7814>] (device_driver_attach+0x58/0x60)
[<c04b7814>] (device_driver_attach) from [<c04b78a0>] (__driver_attach+0x84/0xc0)
[<c04b78a0>] (__driver_attach) from [<c04b5968>] (bus_for_each_dev+0x58/0x7c)
[<c04b5968>] (bus_for_each_dev) from [<c04b6768>] (bus_add_driver+0xd0/0x1cc)
[<c04b6768>] (bus_add_driver) from [<c04b848c>] (driver_register+0x7c/0x110)
[<c04b848c>] (driver_register) from [<c000b05c>] (do_one_initcall+0x74/0x308)
[<c000b05c>] (do_one_initcall) from [<c00d9b78>] (do_init_module+0x5c/0x1f4)
[<c00d9b78>] (do_init_module) from [<c00d8be4>] (load_module+0x19a4/0x2020)
[<c00d8be4>] (load_module) from [<c00d9438>] (sys_finit_module+0x8c/0x98)
[<c00d9438>] (sys_finit_module) from [<c0009000>] (ret_fast_syscall+0x0/0x28)
Exception stack(0xdb677fa8 to 0xdb677ff0)
7fa0: 00b04170 00000000 00000003 007bd84c 00000000 00b05cb8
7fc0: 00b04170 00000000 1ee84500 0000017b 00040000 00000000 00b04eb8 00000000
7fe0: be958178 be958168 007b54bb b6c28712
Code: e92d4010 e2504000 e24dd008 0a000004 (e5d43020)
---[ end trace c0709acc637cb5de ]---
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [PATCH 0/3] serial: Don't check for mctrl_gpio_to_gpiod() returning error
From: Geert Uytterhoeven @ 2019-08-14 9:27 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby
Cc: linux-serial, Geert Uytterhoeven, Richard Genoud, Shawn Guo,
Sascha Hauer, linux-renesas-soc, NXP Linux Team,
Pengutronix Kernel Team, Fabio Estevam, linux-arm-kernel
Hi Greg, Jiri,
Since commit 1d267ea6539f2663 ("serial: mctrl-gpio: simplify init
routine"), mctrl_gpio_init() returns failure if the assignment to any
member of the gpio array results in an error pointer.
Since commit c359522194593815 ("serial: mctrl_gpio: Avoid probe failures
in case of missing gpiolib"), mctrl_gpio_to_gpiod() returns NULL in the
!CONFIG_GPIOLIB case.
Hence there is no longer a need to check in serial drivers if
mctrl_gpio_to_gpiod() returns an error value. A simple NULL check is
sufficient.
This series follows the spirit of commit 445df7ff3fd1a0a9 ("serial:
mctrl-gpio: drop usages of IS_ERR_OR_NULL") in the mctrl-gpio core.
Thanks!
Geert Uytterhoeven (3):
serial: atmel: Don't check for mctrl_gpio_to_gpiod() returning error
serial: mxs-auart: Don't check for mctrl_gpio_to_gpiod() returning
error
serial: sh-sci: Don't check for mctrl_gpio_to_gpiod() returning error
drivers/tty/serial/atmel_serial.c | 12 ++++--------
drivers/tty/serial/mxs-auart.c | 6 ++----
drivers/tty/serial/sh-sci.c | 12 +++++-------
3 files changed, 11 insertions(+), 19 deletions(-)
--
2.17.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [PATCH 3/3] serial: sh-sci: Don't check for mctrl_gpio_to_gpiod() returning error
From: Geert Uytterhoeven @ 2019-08-14 9:27 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby
Cc: linux-serial, Geert Uytterhoeven, Richard Genoud, Shawn Guo,
Sascha Hauer, linux-renesas-soc, NXP Linux Team,
Pengutronix Kernel Team, Fabio Estevam, linux-arm-kernel
In-Reply-To: <20190814092757.13726-1-geert+renesas@glider.be>
Since commit 1d267ea6539f2663 ("serial: mctrl-gpio: simplify init
routine"), mctrl_gpio_init() returns failure if the assignment to any
member of the gpio array results in an error pointer.
Since commit c359522194593815 ("serial: mctrl_gpio: Avoid probe failures
in case of missing gpiolib"), mctrl_gpio_to_gpiod() returns NULL in the
!CONFIG_GPIOLIB case.
Hence there is no longer a need to check for mctrl_gpio_to_gpiod()
returning an error value. A simple NULL check is sufficient.
This follows the spirit of commit 445df7ff3fd1a0a9 ("serial: mctrl-gpio:
drop usages of IS_ERR_OR_NULL") in the mctrl-gpio core.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/tty/serial/sh-sci.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 7f565fcbf1ca4c5e..4e754a4850e6db63 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -2099,12 +2099,12 @@ static unsigned int sci_get_mctrl(struct uart_port *port)
if (s->autorts) {
if (sci_get_cts(port))
mctrl |= TIOCM_CTS;
- } else if (IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(gpios, UART_GPIO_CTS))) {
+ } else if (!mctrl_gpio_to_gpiod(gpios, UART_GPIO_CTS)) {
mctrl |= TIOCM_CTS;
}
- if (IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(gpios, UART_GPIO_DSR)))
+ if (!mctrl_gpio_to_gpiod(gpios, UART_GPIO_DSR))
mctrl |= TIOCM_DSR;
- if (IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(gpios, UART_GPIO_DCD)))
+ if (!mctrl_gpio_to_gpiod(gpios, UART_GPIO_DCD))
mctrl |= TIOCM_CAR;
return mctrl;
@@ -3285,10 +3285,8 @@ static int sci_probe_single(struct platform_device *dev,
return PTR_ERR(sciport->gpios);
if (sciport->has_rtscts) {
- if (!IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(sciport->gpios,
- UART_GPIO_CTS)) ||
- !IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(sciport->gpios,
- UART_GPIO_RTS))) {
+ if (mctrl_gpio_to_gpiod(sciport->gpios, UART_GPIO_CTS) ||
+ mctrl_gpio_to_gpiod(sciport->gpios, UART_GPIO_RTS)) {
dev_err(&dev->dev, "Conflicting RTS/CTS config\n");
return -EINVAL;
}
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH 2/3] serial: mxs-auart: Don't check for mctrl_gpio_to_gpiod() returning error
From: Geert Uytterhoeven @ 2019-08-14 9:27 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby
Cc: linux-serial, Geert Uytterhoeven, Richard Genoud, Shawn Guo,
Sascha Hauer, linux-renesas-soc, NXP Linux Team,
Pengutronix Kernel Team, Fabio Estevam, linux-arm-kernel
In-Reply-To: <20190814092757.13726-1-geert+renesas@glider.be>
Since commit 1d267ea6539f2663 ("serial: mctrl-gpio: simplify init
routine"), mctrl_gpio_init() returns failure if the assignment to any
member of the gpio array results in an error pointer.
Since commit c359522194593815 ("serial: mctrl_gpio: Avoid probe failures
in case of missing gpiolib"), mctrl_gpio_to_gpiod() returns NULL in the
!CONFIG_GPIOLIB case.
Hence there is no longer a need to check for mctrl_gpio_to_gpiod()
returning an error value. A simple NULL check is sufficient.
This follows the spirit of commit 445df7ff3fd1a0a9 ("serial: mctrl-gpio:
drop usages of IS_ERR_OR_NULL") in the mctrl-gpio core.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/tty/serial/mxs-auart.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
index 4c188f4079b3ea68..e3452597068292f9 100644
--- a/drivers/tty/serial/mxs-auart.c
+++ b/drivers/tty/serial/mxs-auart.c
@@ -969,10 +969,8 @@ static int mxs_auart_dma_init(struct mxs_auart_port *s)
}
-#define RTS_AT_AUART() IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(s->gpios, \
- UART_GPIO_RTS))
-#define CTS_AT_AUART() IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(s->gpios, \
- UART_GPIO_CTS))
+#define RTS_AT_AUART() !mctrl_gpio_to_gpiod(s->gpios, UART_GPIO_RTS)
+#define CTS_AT_AUART() !mctrl_gpio_to_gpiod(s->gpios, UART_GPIO_CTS)
static void mxs_auart_settermios(struct uart_port *u,
struct ktermios *termios,
struct ktermios *old)
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH 1/3] serial: atmel: Don't check for mctrl_gpio_to_gpiod() returning error
From: Geert Uytterhoeven @ 2019-08-14 9:27 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby
Cc: linux-serial, Geert Uytterhoeven, Richard Genoud, Shawn Guo,
Sascha Hauer, linux-renesas-soc, NXP Linux Team,
Pengutronix Kernel Team, Fabio Estevam, linux-arm-kernel
In-Reply-To: <20190814092757.13726-1-geert+renesas@glider.be>
Since commit 1d267ea6539f2663 ("serial: mctrl-gpio: simplify init
routine"), mctrl_gpio_init() returns failure if the assignment to any
member of the gpio array results in an error pointer.
Since commit c359522194593815 ("serial: mctrl_gpio: Avoid probe failures
in case of missing gpiolib"), mctrl_gpio_to_gpiod() returns NULL in the
!CONFIG_GPIOLIB case.
Hence there is no longer a need to check for mctrl_gpio_to_gpiod()
returning an error value. A simple NULL check is sufficient.
This follows the spirit of commit 445df7ff3fd1a0a9 ("serial: mctrl-gpio:
drop usages of IS_ERR_OR_NULL") in the mctrl-gpio core.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/tty/serial/atmel_serial.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 19a85d6fe3d20541..e9620a81166b7dc1 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -303,32 +303,28 @@ static unsigned int atmel_get_lines_status(struct uart_port *port)
mctrl_gpio_get(atmel_port->gpios, &ret);
- if (!IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(atmel_port->gpios,
- UART_GPIO_CTS))) {
+ if (mctrl_gpio_to_gpiod(atmel_port->gpios, UART_GPIO_CTS)) {
if (ret & TIOCM_CTS)
status &= ~ATMEL_US_CTS;
else
status |= ATMEL_US_CTS;
}
- if (!IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(atmel_port->gpios,
- UART_GPIO_DSR))) {
+ if (mctrl_gpio_to_gpiod(atmel_port->gpios, UART_GPIO_DSR)) {
if (ret & TIOCM_DSR)
status &= ~ATMEL_US_DSR;
else
status |= ATMEL_US_DSR;
}
- if (!IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(atmel_port->gpios,
- UART_GPIO_RI))) {
+ if (mctrl_gpio_to_gpiod(atmel_port->gpios, UART_GPIO_RI)) {
if (ret & TIOCM_RI)
status &= ~ATMEL_US_RI;
else
status |= ATMEL_US_RI;
}
- if (!IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(atmel_port->gpios,
- UART_GPIO_DCD))) {
+ if (mctrl_gpio_to_gpiod(atmel_port->gpios, UART_GPIO_DCD)) {
if (ret & TIOCM_CD)
status &= ~ATMEL_US_DCD;
else
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH 2/3] serial: mxs-auart: Don't check for mctrl_gpio_to_gpiod() returning error
From: Geert Uytterhoeven @ 2019-08-14 9:29 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby
Cc: linux-serial, Geert Uytterhoeven, Richard Genoud, Shawn Guo,
Sascha Hauer, Frieder Schrempf, linux-renesas-soc, NXP Linux Team,
Pengutronix Kernel Team, Uwe Kleine-König, Fabio Estevam,
linux-arm-kernel
In-Reply-To: <20190814092924.13857-1-geert+renesas@glider.be>
Since commit 1d267ea6539f2663 ("serial: mctrl-gpio: simplify init
routine"), mctrl_gpio_init() returns failure if the assignment to any
member of the gpio array results in an error pointer.
Since commit c359522194593815 ("serial: mctrl_gpio: Avoid probe failures
in case of missing gpiolib"), mctrl_gpio_to_gpiod() returns NULL in the
!CONFIG_GPIOLIB case.
Hence there is no longer a need to check for mctrl_gpio_to_gpiod()
returning an error value. A simple NULL check is sufficient.
This follows the spirit of commit 445df7ff3fd1a0a9 ("serial: mctrl-gpio:
drop usages of IS_ERR_OR_NULL") in the mctrl-gpio core.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/tty/serial/mxs-auart.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
index 4c188f4079b3ea68..e3452597068292f9 100644
--- a/drivers/tty/serial/mxs-auart.c
+++ b/drivers/tty/serial/mxs-auart.c
@@ -969,10 +969,8 @@ static int mxs_auart_dma_init(struct mxs_auart_port *s)
}
-#define RTS_AT_AUART() IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(s->gpios, \
- UART_GPIO_RTS))
-#define CTS_AT_AUART() IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(s->gpios, \
- UART_GPIO_CTS))
+#define RTS_AT_AUART() !mctrl_gpio_to_gpiod(s->gpios, UART_GPIO_RTS)
+#define CTS_AT_AUART() !mctrl_gpio_to_gpiod(s->gpios, UART_GPIO_CTS)
static void mxs_auart_settermios(struct uart_port *u,
struct ktermios *termios,
struct ktermios *old)
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH 0/3] serial: Don't check for mctrl_gpio_to_gpiod() returning error
From: Geert Uytterhoeven @ 2019-08-14 9:29 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby
Cc: linux-serial, Geert Uytterhoeven, Richard Genoud, Shawn Guo,
Sascha Hauer, Frieder Schrempf, linux-renesas-soc, NXP Linux Team,
Pengutronix Kernel Team, Uwe Kleine-König, Fabio Estevam,
linux-arm-kernel
In-Reply-To: <20190814092757.13726-1-geert+renesas@glider.be>
Hi Greg, Jiri,
Since commit 1d267ea6539f2663 ("serial: mctrl-gpio: simplify init
routine"), mctrl_gpio_init() returns failure if the assignment to any
member of the gpio array results in an error pointer.
Since commit c359522194593815 ("serial: mctrl_gpio: Avoid probe failures
in case of missing gpiolib"), mctrl_gpio_to_gpiod() returns NULL in the
!CONFIG_GPIOLIB case.
Hence there is no longer a need to check in serial drivers if
mctrl_gpio_to_gpiod() returns an error value. A simple NULL check is
sufficient.
This series follows the spirit of commit 445df7ff3fd1a0a9 ("serial:
mctrl-gpio: drop usages of IS_ERR_OR_NULL") in the mctrl-gpio core.
Thanks!
Geert Uytterhoeven (3):
serial: atmel: Don't check for mctrl_gpio_to_gpiod() returning error
serial: mxs-auart: Don't check for mctrl_gpio_to_gpiod() returning
error
serial: sh-sci: Don't check for mctrl_gpio_to_gpiod() returning error
drivers/tty/serial/atmel_serial.c | 12 ++++--------
drivers/tty/serial/mxs-auart.c | 6 ++----
drivers/tty/serial/sh-sci.c | 12 +++++-------
3 files changed, 11 insertions(+), 19 deletions(-)
--
2.17.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [PATCH 1/3] serial: atmel: Don't check for mctrl_gpio_to_gpiod() returning error
From: Geert Uytterhoeven @ 2019-08-14 9:29 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby
Cc: linux-serial, Geert Uytterhoeven, Richard Genoud, Shawn Guo,
Sascha Hauer, Frieder Schrempf, linux-renesas-soc, NXP Linux Team,
Pengutronix Kernel Team, Uwe Kleine-König, Fabio Estevam,
linux-arm-kernel
In-Reply-To: <20190814092924.13857-1-geert+renesas@glider.be>
Since commit 1d267ea6539f2663 ("serial: mctrl-gpio: simplify init
routine"), mctrl_gpio_init() returns failure if the assignment to any
member of the gpio array results in an error pointer.
Since commit c359522194593815 ("serial: mctrl_gpio: Avoid probe failures
in case of missing gpiolib"), mctrl_gpio_to_gpiod() returns NULL in the
!CONFIG_GPIOLIB case.
Hence there is no longer a need to check for mctrl_gpio_to_gpiod()
returning an error value. A simple NULL check is sufficient.
This follows the spirit of commit 445df7ff3fd1a0a9 ("serial: mctrl-gpio:
drop usages of IS_ERR_OR_NULL") in the mctrl-gpio core.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/tty/serial/atmel_serial.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 19a85d6fe3d20541..e9620a81166b7dc1 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -303,32 +303,28 @@ static unsigned int atmel_get_lines_status(struct uart_port *port)
mctrl_gpio_get(atmel_port->gpios, &ret);
- if (!IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(atmel_port->gpios,
- UART_GPIO_CTS))) {
+ if (mctrl_gpio_to_gpiod(atmel_port->gpios, UART_GPIO_CTS)) {
if (ret & TIOCM_CTS)
status &= ~ATMEL_US_CTS;
else
status |= ATMEL_US_CTS;
}
- if (!IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(atmel_port->gpios,
- UART_GPIO_DSR))) {
+ if (mctrl_gpio_to_gpiod(atmel_port->gpios, UART_GPIO_DSR)) {
if (ret & TIOCM_DSR)
status &= ~ATMEL_US_DSR;
else
status |= ATMEL_US_DSR;
}
- if (!IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(atmel_port->gpios,
- UART_GPIO_RI))) {
+ if (mctrl_gpio_to_gpiod(atmel_port->gpios, UART_GPIO_RI)) {
if (ret & TIOCM_RI)
status &= ~ATMEL_US_RI;
else
status |= ATMEL_US_RI;
}
- if (!IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(atmel_port->gpios,
- UART_GPIO_DCD))) {
+ if (mctrl_gpio_to_gpiod(atmel_port->gpios, UART_GPIO_DCD)) {
if (ret & TIOCM_CD)
status &= ~ATMEL_US_DCD;
else
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH 3/3] serial: sh-sci: Don't check for mctrl_gpio_to_gpiod() returning error
From: Geert Uytterhoeven @ 2019-08-14 9:29 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby
Cc: linux-serial, Geert Uytterhoeven, Richard Genoud, Shawn Guo,
Sascha Hauer, Frieder Schrempf, linux-renesas-soc, NXP Linux Team,
Pengutronix Kernel Team, Uwe Kleine-König, Fabio Estevam,
linux-arm-kernel
In-Reply-To: <20190814092924.13857-1-geert+renesas@glider.be>
Since commit 1d267ea6539f2663 ("serial: mctrl-gpio: simplify init
routine"), mctrl_gpio_init() returns failure if the assignment to any
member of the gpio array results in an error pointer.
Since commit c359522194593815 ("serial: mctrl_gpio: Avoid probe failures
in case of missing gpiolib"), mctrl_gpio_to_gpiod() returns NULL in the
!CONFIG_GPIOLIB case.
Hence there is no longer a need to check for mctrl_gpio_to_gpiod()
returning an error value. A simple NULL check is sufficient.
This follows the spirit of commit 445df7ff3fd1a0a9 ("serial: mctrl-gpio:
drop usages of IS_ERR_OR_NULL") in the mctrl-gpio core.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/tty/serial/sh-sci.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 7f565fcbf1ca4c5e..4e754a4850e6db63 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -2099,12 +2099,12 @@ static unsigned int sci_get_mctrl(struct uart_port *port)
if (s->autorts) {
if (sci_get_cts(port))
mctrl |= TIOCM_CTS;
- } else if (IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(gpios, UART_GPIO_CTS))) {
+ } else if (!mctrl_gpio_to_gpiod(gpios, UART_GPIO_CTS)) {
mctrl |= TIOCM_CTS;
}
- if (IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(gpios, UART_GPIO_DSR)))
+ if (!mctrl_gpio_to_gpiod(gpios, UART_GPIO_DSR))
mctrl |= TIOCM_DSR;
- if (IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(gpios, UART_GPIO_DCD)))
+ if (!mctrl_gpio_to_gpiod(gpios, UART_GPIO_DCD))
mctrl |= TIOCM_CAR;
return mctrl;
@@ -3285,10 +3285,8 @@ static int sci_probe_single(struct platform_device *dev,
return PTR_ERR(sciport->gpios);
if (sciport->has_rtscts) {
- if (!IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(sciport->gpios,
- UART_GPIO_CTS)) ||
- !IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(sciport->gpios,
- UART_GPIO_RTS))) {
+ if (mctrl_gpio_to_gpiod(sciport->gpios, UART_GPIO_CTS) ||
+ mctrl_gpio_to_gpiod(sciport->gpios, UART_GPIO_RTS)) {
dev_err(&dev->dev, "Conflicting RTS/CTS config\n");
return -EINVAL;
}
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* Re: [PATCHv6 1/2] PCI: layerscape: Add the bar_fixed_64bit property in EP driver.
From: Lorenzo Pieralisi @ 2019-08-14 9:29 UTC (permalink / raw)
To: Xiaowei Bao
Cc: roy.zang, linux-pci, linux-kernel, minghuan.Lian,
linux-arm-kernel, bhelgaas, linuxppc-dev, mingkai.hu
In-Reply-To: <20190814020330.12133-1-xiaowei.bao@nxp.com>
I asked you to remove the period at the end of the patch $SUBJECT and
you did not, either you do not read what I write or explain me what's
going on.
On Wed, Aug 14, 2019 at 10:03:29AM +0800, Xiaowei Bao wrote:
> The PCIe controller of layerscape just have 4 BARs, BAR0 and BAR1
> is 32bit, BAR2 and BAR4 is 64bit, this is determined by hardware,
> so set the bar_fixed_64bit with 0x14.
>
> Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Kishon ACK'ed this patch and you have not carried his tag.
I will make these changes but that's the last time I do that
for you.
Lorenzo
> ---
> v2:
> - Replace value 0x14 with a macro.
> v3:
> - No change.
> v4:
> - send the patch again with '--to'.
> v5:
> - fix the commit message.
> v6:
> - remove the [EXT] tag of the $SUBJECT in email.
>
> drivers/pci/controller/dwc/pci-layerscape-ep.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pci/controller/dwc/pci-layerscape-ep.c b/drivers/pci/controller/dwc/pci-layerscape-ep.c
> index be61d96..ca9aa45 100644
> --- a/drivers/pci/controller/dwc/pci-layerscape-ep.c
> +++ b/drivers/pci/controller/dwc/pci-layerscape-ep.c
> @@ -44,6 +44,7 @@ static const struct pci_epc_features ls_pcie_epc_features = {
> .linkup_notifier = false,
> .msi_capable = true,
> .msix_capable = false,
> + .bar_fixed_64bit = (1 << BAR_2) | (1 << BAR_4),
> };
>
> static const struct pci_epc_features*
> --
> 2.9.5
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH v5 02/15] ASoC: sun4i-i2s: Add set_tdm_slot functionality
From: Mark Brown @ 2019-08-14 9:30 UTC (permalink / raw)
To: codekipper
Cc: alsa-devel, linux-kernel, lgirdwood, be17068, linux-sunxi,
maxime.ripard, wens, linux-arm-kernel
In-Reply-To: <20190814060854.26345-3-codekipper@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1082 bytes --]
On Wed, Aug 14, 2019 at 08:08:41AM +0200, codekipper@gmail.com wrote:
> From: Marcus Cooper <codekipper@gmail.com>
>
> Codecs without a control connection such as i2s based HDMI audio and
> the Pine64 DAC require a different amount of bit clocks per frame than
This isn't a universal property of CODECs without a control, and it's
something that CODECs with control can require too.
> return sun4i_i2s_set_clk_rate(dai, params_rate(params),
> - params_width(params));
> + i2s->tdm_slots ?
> + i2s->slot_width : params_width(params));
Please write normal conditional statements unless there's a strong
reason to do otherwise, it makes things more legible.
> +static int sun4i_i2s_set_dai_tdm_slot(struct snd_soc_dai *dai,
> + unsigned int tx_mask,
> + unsigned int rx_mask,
> + int slots, int width)
> +{
> + struct sun4i_i2s *i2s = snd_soc_dai_get_drvdata(dai);
> +
> + i2s->tdm_slots = slots;
> +
> + i2s->slot_width = width;
> +
> + return 0;
> +}
No validation of the parameters here?
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH 3/8] arm64: memory: Rewrite default page_to_virt()/virt_to_page()
From: Catalin Marinas @ 2019-08-14 9:30 UTC (permalink / raw)
To: Will Deacon
Cc: Mark Rutland, Steve Capper, Andrey Konovalov, Geert Uytterhoeven,
Qian Cai, linux-arm-kernel
In-Reply-To: <20190813170149.26037-4-will@kernel.org>
On Tue, Aug 13, 2019 at 06:01:44PM +0100, Will Deacon wrote:
> diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h
> index 47b4dc73b8bf..77074b3a1025 100644
> --- a/arch/arm64/include/asm/memory.h
> +++ b/arch/arm64/include/asm/memory.h
> @@ -313,19 +313,18 @@ static inline void *phys_to_virt(phys_addr_t x)
> #if !defined(CONFIG_SPARSEMEM_VMEMMAP) || defined(CONFIG_DEBUG_VIRTUAL)
> #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
> #else
> -#define __virt_to_pgoff(kaddr) (((u64)(kaddr) - PAGE_OFFSET) / PAGE_SIZE * sizeof(struct page))
> -#define __page_to_voff(kaddr) (((u64)(kaddr) - VMEMMAP_START) * PAGE_SIZE / sizeof(struct page))
> -
> -#define page_to_virt(page) ({ \
> - unsigned long __addr = \
> - ((__page_to_voff(page)) + PAGE_OFFSET); \
> - const void *__addr_tag = \
> - __tag_set((void *)__addr, page_kasan_tag(page)); \
> - ((void *)__addr_tag); \
> +#define page_to_virt(x) ({ \
> + __typeof__(x) __page = x; \
Why not struct page * directly here?
Either way:
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH v5 03/15] ASoC: sun4i-i2s: Correct divider calculations
From: Mark Brown @ 2019-08-14 9:31 UTC (permalink / raw)
To: codekipper
Cc: alsa-devel, linux-kernel, lgirdwood, be17068, linux-sunxi,
maxime.ripard, wens, linux-arm-kernel
In-Reply-To: <20190814060854.26345-4-codekipper@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 554 bytes --]
On Wed, Aug 14, 2019 at 08:08:42AM +0200, codekipper@gmail.com wrote:
> + if (i2s->variant->has_fmt_set_lrck_period)
> + bclk_div = sun4i_i2s_get_bclk_div(i2s, clk_rate / rate,
> + word_size,
> + sun8i_i2s_clk_div,
> + ARRAY_SIZE(sun8i_i2s_clk_div));
> + else
> + bclk_div = sun4i_i2s_get_bclk_div(i2s, oversample_rate,
> + word_size,
> + sun4i_i2s_bclk_div,
> + ARRAY_SIZE(sun4i_i2s_bclk_div));
Are we sure there'll never be any new variants which would make a switch
statement for the variant work better?
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox