1
0
Fork 0
alistair23-linux/drivers/i2c/busses
Anson Huang d386bb9042 i2c: imx: correct the method of getting private data in notifier_call
The way of getting private imx_i2c_struct in i2c_imx_clk_notifier_call()
is incorrect, should use clk_change_nb element to get correct address
and avoid below kernel dump during POST_RATE_CHANGE notify by clk
framework:

Unable to handle kernel paging request at virtual address 03ef1488
pgd = (ptrval)
[03ef1488] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
Workqueue: events reduce_bus_freq_handler
PC is at i2c_imx_set_clk+0x10/0xb8
LR is at i2c_imx_clk_notifier_call+0x20/0x28
pc : [<806a893c>]    lr : [<806a8a04>]    psr: a0080013
sp : bf399dd8  ip : bf3432ac  fp : bf7c1dc0
r10: 00000002  r9 : 00000000  r8 : 00000000
r7 : 03ef1480  r6 : bf399e50  r5 : ffffffff  r4 : 00000000
r3 : bf025300  r2 : bf399e50  r1 : 00b71b00  r0 : bf399be8
Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
Control: 10c5387d  Table: 4e03004a  DAC: 00000051
Process kworker/2:1 (pid: 38, stack limit = 0x(ptrval))
Stack: (0xbf399dd8 to 0xbf39a000)
9dc0:                                                       806a89e4 00000000
9de0: ffffffff bf399e50 00000002 806a8a04 806a89e4 80142900 ffffffff 00000000
9e00: bf34ef18 bf34ef04 00000000 ffffffff bf399e50 80142d84 00000000 bf399e6c
9e20: bf34ef00 80f214c4 bf025300 00000002 80f08d08 bf017480 00000000 80142df0
9e40: 00000000 80166ed8 80c27638 8045de58 bf352340 03ef1480 00b71b00 0f82e242
9e60: bf025300 00000002 03ef1480 80f60e5c 00000001 8045edf0 00000002 8045eb08
9e80: bf025300 00000002 03ef1480 8045ee10 03ef1480 8045eb08 bf01be40 00000002
9ea0: 03ef1480 8045ee10 07de2900 8045eb08 bf01b780 00000002 07de2900 8045ee10
9ec0: 80c27898 bf399ee4 bf020a80 00000002 1f78a400 8045ee10 80f60e5c 80460514
9ee0: 80f60e5c bf01b600 bf01b480 80460460 0f82e242 bf383a80 bf383a00 80f60e5c
9f00: 00000000 bf7c1dc0 80f60e70 80460564 80f60df0 80f60d24 80f60df0 8011e72c
9f20: 00000000 80f60df0 80f60e6c bf7c4f00 00000000 8011e7ac bf274000 8013bd84
9f40: bf7c1dd8 80f03d00 bf274000 bf7c1dc0 bf274014 bf7c1dd8 80f03d00 bf398000
9f60: 00000008 8013bfb4 00000000 bf25d100 bf25d0c0 00000000 bf274000 8013bf88
9f80: bf25d11c bf0cfebc 00000000 8014140c bf25d0c0 801412ec 00000000 00000000
9fa0: 00000000 00000000 00000000 801010e8 00000000 00000000 00000000 00000000
9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
9fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[<806a893c>] (i2c_imx_set_clk) from [<806a8a04>] (i2c_imx_clk_notifier_call+0x20/0x28)
[<806a8a04>] (i2c_imx_clk_notifier_call) from [<80142900>] (notifier_call_chain+0x44/0x84)
[<80142900>] (notifier_call_chain) from [<80142d84>] (__srcu_notifier_call_chain+0x44/0x98)
[<80142d84>] (__srcu_notifier_call_chain) from [<80142df0>] (srcu_notifier_call_chain+0x18/0x20)
[<80142df0>] (srcu_notifier_call_chain) from [<8045de58>] (__clk_notify+0x78/0xa4)
[<8045de58>] (__clk_notify) from [<8045edf0>] (__clk_recalc_rates+0x60/0xb4)
[<8045edf0>] (__clk_recalc_rates) from [<8045ee10>] (__clk_recalc_rates+0x80/0xb4)
Code: e92d40f8 e5903298 e59072a0 e1530001 (e5975008)
---[ end trace fc7f5514b97b6cbb ]---

Fixes: 90ad2cbe88 ("i2c: imx: use clk notifier for rate changes")
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
2019-04-24 00:14:57 +02:00
..
Kconfig i2c: i801: Add support for Intel Comet Lake 2019-03-20 17:42:23 +01:00
Makefile i2c: add i2c bus driver for NVIDIA GPU 2018-11-09 17:46:43 +01:00
i2c-acorn.c i2c: acorn: remove outdated path from file header 2018-01-18 00:08:20 +01:00
i2c-ali15x3.c Annotate hardware config module parameters in drivers/i2c/ 2017-04-20 12:02:32 +01:00
i2c-ali1535.c i2c: remove FSF address 2014-11-07 18:35:33 +01:00
i2c-ali1563.c i2c: ali1563: fix checkpatch.pl issues 2014-05-22 10:09:21 +02:00
i2c-altera.c i2c: altera: Add Altera I2C Controller driver 2017-09-13 23:37:16 +02:00
i2c-amd756-s4882.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
i2c-amd756.c i2c: don't print error when adding adapter fails 2016-08-22 08:19:55 +02:00
i2c-amd8111.c i2c: amd8111: Mark expected switch fall-through 2018-08-08 22:28:46 +02:00
i2c-aspeed.c i2c: aspeed: Add multi-master use case support 2019-02-15 09:52:03 +01:00
i2c-at91.c i2c: at91: Read all available bytes at once 2018-04-30 10:39:28 +02:00
i2c-au1550.c i2c: au1550: Convert to devm_kzalloc and devm_ioremap_resource 2015-10-23 23:31:11 +02:00
i2c-axxia.c i2c: axxia: support sequence command mode 2018-12-17 23:28:50 +01:00
i2c-bcm-iproc.c i2c: use dev_get_drvdata() to get private data in suspend/resume hooks 2017-07-31 17:03:32 +02:00
i2c-bcm-kona.c Merge branch 'i2c/for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2016-10-07 14:12:21 -07:00
i2c-bcm2835.c i2c: bcm2835: Clear current buffer pointers and counts after a transfer 2019-02-15 09:45:05 +01:00
i2c-brcmstb.c i2c: brcmstb: use core helper to mark adapter suspended 2019-01-08 21:02:49 +01:00
i2c-cadence.c i2c: cadence: Fix the hold bit setting 2019-02-15 09:42:17 +01:00
i2c-cbus-gpio.c i2c: cbus-gpio: Switch to use GPIO descriptors 2019-02-08 22:18:51 +01:00
i2c-cht-wc.c i2c-cht-wc: Fix bq24190 supplier 2018-07-02 17:38:07 +02:00
i2c-cpm.c i2c: busses: make i2c_adapter_quirks const 2017-08-29 22:32:47 +02:00
i2c-cros-ec-tunnel.c i2c: i2c-cros-ec-tunnel: Switch to SPDX identifier. 2018-12-17 23:08:41 +01:00
i2c-davinci.c Merge branch 'i2c/for-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2018-08-21 17:40:46 -07:00
i2c-designware-baytrail.c More ACPI updates for 4.20-rc1 2018-10-30 09:15:31 -07:00
i2c-designware-common.c More ACPI updates for 4.20-rc1 2018-10-30 09:15:31 -07:00
i2c-designware-core.h i2c: designware: Do not allow i2c_dw_xfer() calls while suspended 2019-02-23 11:08:48 +01:00
i2c-designware-master.c i2c: designware: Do not allow i2c_dw_xfer() calls while suspended 2019-02-23 11:08:48 +01:00
i2c-designware-pcidrv.c i2c: designware: Do not allow i2c_dw_xfer() calls while suspended 2019-02-23 11:08:48 +01:00
i2c-designware-platdrv.c i2c: i2c-designware-platdrv: Always use a dynamic adapter number 2019-03-13 18:07:10 +01:00
i2c-designware-slave.c i2c: designware: Add SPDX license tag 2018-08-20 10:45:45 +02:00
i2c-digicolor.c i2c: digicolor: use clk_disable_unprepare instead of clk_unprepare 2016-11-18 01:48:01 +01:00
i2c-diolan-u2c.c i2c: busses: make use of i2c_8bit_addr_from_msg 2018-05-29 20:30:49 +02:00
i2c-dln2.c i2c: constify i2c_adapter_quirks structures 2016-11-18 02:05:03 +01:00
i2c-efm32.c i2c: busses: make use of i2c_8bit_addr_from_msg 2018-05-29 20:30:49 +02:00
i2c-eg20t.c PCI: Move Rohm Vendor ID to generic list 2019-02-01 17:24:52 -06:00
i2c-elektor.c Annotate hardware config module parameters in drivers/i2c/ 2017-04-20 12:02:32 +01:00
i2c-emev2.c i2c: use SPDX identifier for Renesas drivers 2018-08-24 14:49:36 +02:00
i2c-exynos5.c i2c: exynos5: use core helper to mark adapter suspended 2019-01-08 21:02:51 +01:00
i2c-fsi.c i2c: fsi: Add bus recovery 2018-07-21 00:07:09 +02:00
i2c-gpio.c i2c: gpio: fault-injector: add 'inject_panic' injector 2019-02-23 10:34:08 +01:00
i2c-highlander.c i2c: use SPDX identifier for Renesas drivers 2018-08-24 14:49:36 +02:00
i2c-hix5hd2.c i2c: busses: make use of i2c_8bit_addr_from_msg 2018-05-29 20:30:49 +02:00
i2c-hydra.c i2c: remove FSF address 2014-11-07 18:35:33 +01:00
i2c-i801.c i2c: i801: Add support for Intel Comet Lake 2019-03-20 17:42:23 +01:00
i2c-ibm_iic.c i2c: Remove caller signal_pending branch predictions 2018-11-27 12:59:16 +01:00
i2c-ibm_iic.h
…
i2c-img-scb.c i2c: img-scb: Add runtime PM 2017-10-28 14:03:45 +02:00
i2c-imx-lpi2c.c i2c: imx-lpi2c: Remove mx8dv compatible entry 2018-09-02 23:50:43 +02:00
i2c-imx.c i2c: imx: correct the method of getting private data in notifier_call 2019-04-24 00:14:57 +02:00
i2c-iop3xx.c i2c: iop3xx: Add device tree probing 2019-02-05 13:46:36 +01:00
i2c-iop3xx.h i2c: remove FSF address 2014-11-07 18:35:33 +01:00
i2c-isch.c i2c: i2c-isch: fix spelling mistake "unitialized" -> "uninitialized" 2018-09-25 00:14:04 +02:00
i2c-ismt.c i2c: ismt: Add support for Intel Cedar Fork 2019-01-03 20:02:32 +01:00
i2c-jz4780.c i2c: jz4780: Fix module autoload 2016-10-25 11:48:58 +02:00
i2c-kempld.c i2c: busses: make use of i2c_8bit_addr_from_msg 2018-05-29 20:30:49 +02:00
i2c-lpc2k.c i2c: use dev_get_drvdata() to get private data in suspend/resume hooks 2017-07-31 17:03:32 +02:00
i2c-meson.c i2c: meson: update doc description to fix build warnings 2018-01-26 18:33:44 +01:00
i2c-mlxcpld.c i2c: mlxcpld: Allow configurable adapter id for mlxcpld 2018-04-30 10:39:29 +02:00
i2c-mpc.c i2c: mpc: always determine I2C clock prescaler at runtime 2018-01-15 19:19:55 +01:00
i2c-mt65xx.c i2c: mediatek: modify threshold passed to i2c_get_dma_safe_msg_buf() 2019-03-12 14:09:15 +01:00
i2c-mv64xxx.c i2c: mv64xxx: Apply errata delay only in standard mode 2018-03-17 21:20:04 +01:00
i2c-mxs.c i2c: mxs: use core to detect 'no zero length' quirk 2018-08-04 23:25:06 +02:00
i2c-nforce2-s4985.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
i2c-nforce2.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
i2c-nomadik.c i2c: busses: remove superfluous ignoring of children for RPM 2018-05-08 23:19:02 +02:00
i2c-nvidia-gpu.c i2c: nvidia-gpu: mark resume function as __maybe_unused 2018-12-11 21:39:43 +01:00
i2c-ocores.c i2c: ocores: turn incomplete kdoc into a comment 2019-02-24 14:38:03 +01:00
i2c-octeon-core.c i2c: octeon: Prevent error message on bus error 2018-03-02 11:11:15 +01:00
i2c-octeon-core.h i2c: octeon: Prevent error message on bus error 2018-03-02 11:11:15 +01:00
i2c-octeon-platdrv.c i2c: busses: make i2c_adapter const 2017-08-29 22:26:08 +02:00
i2c-omap.c i2c: omap: Use noirq system sleep pm ops to idle device for suspend 2019-02-05 13:13:20 +01:00
i2c-opal.c i2c: opal: don't check number of messages in the driver 2018-05-24 22:06:17 +02:00
i2c-owl.c i2c: Add Actions Semiconductor Owl family S700 I2C support 2019-01-03 20:36:18 +01:00
i2c-parport-light.c i2c: i2c-smbus: Use threaded irq for smbalert 2017-10-28 23:42:26 +02:00
i2c-parport.c i2c: i2c-smbus: Use threaded irq for smbalert 2017-10-28 23:42:26 +02:00
i2c-parport.h i2c: parport: Add VCT-jig adapter 2015-08-10 08:37:34 +02:00
i2c-pasemi.c i2c: pasemi: remove hardcoded bus numbers on smbus 2018-08-20 11:01:13 +02:00
i2c-pca-isa.c Annotate hardware config module parameters in drivers/i2c/ 2017-04-20 12:02:32 +01:00
i2c-pca-platform.c i2c: pca-platform: move header to platform_data 2018-05-17 16:27:58 +02:00
i2c-piix4.c i2c: piix4: Use request_muxed_region 2018-03-02 11:17:23 +01:00
i2c-pmcmsp.c i2c: pmcmsp: use core to detect 'no zero length' quirk 2018-08-04 23:25:06 +02:00
i2c-pnx.c i2c: pnx: move header into the driver 2018-05-17 16:27:59 +02:00
i2c-powermac.c i2c: powermac: Use of_node_name_eq for node name comparisons 2018-12-11 21:16:28 +01:00
i2c-puv3.c i2c: busses: make i2c_algorithm const 2017-08-29 22:20:20 +02:00
i2c-pxa-pci.c ARM: pxa: move header file out of I2C realm 2017-11-28 22:49:30 +01:00
i2c-pxa.c ARM: pxa: move header file out of I2C realm 2017-11-28 22:49:30 +01:00
i2c-qcom-geni.c i2c: qcom-geni: Fix runtime PM mismatch with child devices 2018-11-09 17:25:48 +01:00
i2c-qup.c i2c: qup: use core to detect 'no zero length' quirk 2018-10-05 18:05:08 +02:00
i2c-rcar.c i2c: rcar: explain the lockless design 2019-03-12 14:09:33 +01:00
i2c-riic.c i2c: use SPDX identifier for Renesas drivers 2018-08-24 14:49:36 +02:00
i2c-rk3x.c i2c: rk3x: Don't print visible virtual mapping MMIO address 2018-05-24 22:09:05 +02:00
i2c-robotfuzz-osif.c i2c: robotfuzz-osif: drop pointless test 2018-05-24 22:13:04 +02:00
i2c-s3c2410.c i2c: s3c2410: use core helper to mark adapter suspended 2019-01-08 21:02:52 +01:00
i2c-scmi.c i2c: scmi: Fix probe error on devices with an empty SMB0001 ACPI device node 2018-12-06 23:14:59 +01:00
i2c-sh7760.c i2c: don't print error when adding adapter fails 2016-08-22 08:19:55 +02:00
i2c-sh_mobile.c i2c: sh_mobile: use new clock calculation formulas for Gen2 2019-02-08 22:24:50 +01:00
i2c-sibyte.c i2c: remove FSF address 2014-11-07 18:35:33 +01:00
i2c-simtec.c i2c: simtec: use release_mem_region instead of release_resource 2017-08-14 21:39:21 +02:00
i2c-sirf.c i2c: busses: i2c-sirf: Fix spelling: "formular" -> "formula". 2018-02-22 12:12:35 +01:00
i2c-sis96x.c i2c: remove FSF address 2014-11-07 18:35:33 +01:00
i2c-sis630.c i2c: sis630: correct format strings 2019-03-12 14:09:16 +01:00
i2c-sis5595.c Annotate hardware config module parameters in drivers/i2c/ 2017-04-20 12:02:32 +01:00
i2c-sprd.c i2c: sprd: use core helper to mark adapter suspended 2019-01-08 21:02:50 +01:00
i2c-st.c i2c: use dev_get_drvdata() to get private data in suspend/resume hooks 2017-07-31 17:03:32 +02:00
i2c-stm32.c i2c: i2c-stm32: Add generic DMA API 2018-04-30 10:39:27 +02:00
i2c-stm32.h i2c: i2c-stm32: Add generic DMA API 2018-04-30 10:39:27 +02:00
i2c-stm32f4.c i2c-stm32f4: remove redundant initialization of pointer reg 2018-02-27 13:51:05 +01:00
i2c-stm32f7.c i2c: i2c-stm32f7: Fix SDADEL minimum formula 2019-03-12 14:09:33 +01:00
i2c-stu300.c i2c: stu300: use core to detect 'no zero length' quirk 2018-08-04 23:25:07 +02:00
i2c-sun6i-p2wi.c i2c: sun6i-pw2i: explicitly request exclusive reset control 2017-08-14 21:40:21 +02:00
i2c-synquacer.c i2c: synquacer: remove unused is_suspended flag 2019-01-08 21:02:48 +01:00
i2c-taos-evm.c i2c: taos-evm: Remove duplicate NULL check 2017-11-02 00:01:21 +01:00
i2c-tegra-bpmp.c i2c: tegra: fix spelling mistake: "contoller" -> "controller" 2017-04-21 14:04:57 +02:00
i2c-tegra.c i2c: tegra: Only display error messages if DMA setup fails 2019-02-23 11:08:44 +01:00
i2c-thunderx-pcidrv.c i2c: thunderx: Remove duplicate NULL check 2017-11-02 00:01:31 +01:00
i2c-tiny-usb.c i2c: i2c-tiny-usb: fix buffer not being DMA capable 2017-05-22 10:33:42 +02:00
i2c-uniphier-f.c i2c: uniphier-f: fix violation of tLOW requirement for Fast-mode 2018-12-06 23:14:59 +01:00
i2c-uniphier.c i2c: uniphier: fix violation of tLOW requirement for Fast-mode 2018-12-06 23:14:59 +01:00
i2c-versatile.c i2c: versatile: Make i2c_algo_bit_data const 2017-08-29 22:34:12 +02:00
i2c-via.c i2c: remove FSF address 2014-11-07 18:35:33 +01:00
i2c-viapro.c Annotate hardware config module parameters in drivers/i2c/ 2017-04-20 12:02:32 +01:00
i2c-viperboard.c i2c: viperboard: return message count on master_xfer success 2018-05-15 09:31:26 +02:00
i2c-wmt.c i2c: don't print error when adding adapter fails 2016-08-22 08:19:55 +02:00
i2c-xgene-slimpro.c i2c: xgene-slimpro: Support v2 2017-11-01 23:54:53 +01:00
i2c-xiic.c i2c: xiic: Make the start and the byte count write atomic 2018-09-06 20:49:09 +02:00
i2c-xlp9xx.c i2c: xlp9xx: Fix case where SSIF read transaction completes early 2018-08-09 17:41:13 +02:00
i2c-xlr.c i2c: xlr: use core to detect 'no zero length' quirk 2018-08-04 23:25:08 +02:00
i2c-zx2967.c i2c: zx2967: use core helper to mark adapter suspended 2019-01-08 21:02:49 +01:00
scx200_acb.c Annotate hardware config module parameters in drivers/i2c/ 2017-04-20 12:02:32 +01:00