android_kernel_motorola_sm6225/drivers/mfd
Russell King 6252547b8a ARM: omap: fix broken twl-core dependencies and ifdefs
In commit aeb5032b3f, a dependency on IRQ_DOMAIN was added, which causes
regressions on previously working setups: a previously working non-DT
kernel configuration now loses its PMIC support.  The lack of PMIC
support in turn causes the loss of other functionality the kernel had.

This dependency was added because the driver now registers its
interrupts with the IRQ domain code, presumably to prevent a build error.

The result is that OMAP3 oopses in the vp.c code (fixed by a previous
commit) due to the lack of PMIC support.

However, even with IRQ_DOMAIN enabled, the driver oopses:

Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 5 [#1] SMP
Modules linked in:
CPU: 1    Not tainted  (3.3.0-rc2+ #271)
PC is at irq_domain_add+0x1c/0x134
LR is at twl_probe+0xd0/0x370
pc : [<c007bad0>]    lr : [<c029baac>]    psr: 00000113
sp : df843c48  ip : df843c68  fp : df843c64
r10: c02b93e4  r9 : 00000000  r8 : c029b9dc
r7 : df9d8a00  r6 : c03bef90  r5 : 00000000  r4 : c03f5240
r3 : 00000000  r2 : c03f5240  r1 : 00000015  r0 : c03f5240
Flags: nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c5387d  Table: 8000404a  DAC: 00000015
Process swapper/0 (pid: 1, stack limit = 0xdf8422f0)
Stack: (0xdf843c48 to 0xdf844000)
3c40:                   00000014 00000170 00000014 c03bef90 df843c9c df843c68
3c60: c029baac c007bac0 00000000 df9d8a20 00000001 c03cd238 c02b93e4 df9d8a20
3c80: df9d8a04 df9d8a00 c029b9dc df8cae08 df843cc4 df843ca0 c01eee70 c029b9e8
...
Backtrace:
[<c007bab4>] (irq_domain_add+0x0/0x134) from [<c029baac>] (twl_probe+0xd0/0x370)
 r6:c03bef90 r5:00000014 r4:00000170
[<c029b9dc>] (twl_probe+0x0/0x370) from [<c01eee70>] (i2c_device_probe+0xb0/0xe4)
[<c01eedc0>] (i2c_device_probe+0x0/0xe4) from [<c01d1f34>] (really_probe+0xa0/0x178)
 r8:df8f0070 r7:c03cd238 r6:df9d8a20 r5:df9d8a20 r4:df9d8a20
[<c01d1e94>] (really_probe+0x0/0x178) from [<c01d205c>] (driver_probe_device+0x50/0x68)
 r7:df843d18 r6:df9d8a20 r5:c03cd238 r4:df9d8a20
[<c01d200c>] (driver_probe_device+0x0/0x68) from [<c01d2148>] (__device_attach+0x44/0x48)
 r5:df9d8a20 r4:c03cd238
[<c01d2104>] (__device_attach+0x0/0x48) from [<c01d0840>] (bus_for_each_drv+0x58/0x98)
 r5:c01d2104 r4:00000000
[<c01d07e8>] (bus_for_each_drv+0x0/0x98) from [<c01d21f8>] (device_attach+0x80/0xac)
 r7:df9d8a28 r6:df9d8a54 r5:c03cd978 r4:df9d8a20
[<c01d2178>] (device_attach+0x0/0xac) from [<c01d1430>] (bus_probe_device+0x34/0xa4)
 r6:df9d8a20 r5:c03cd978 r4:df9d8a20
[<c01d13fc>] (bus_probe_device+0x0/0xa4) from [<c01cffb0>] (device_add+0x2a0/0x420)
 r6:00000000 r5:df9d8a20 r4:df9d8a20
[<c01cfd10>] (device_add+0x0/0x420) from [<c01d0150>] (device_register+0x20/0x24)
 r8:df9d8a00 r7:df9d8a04 r6:df8f0048 r5:df9d8a00 r4:df9d8a20
[<c01d0130>] (device_register+0x0/0x24) from [<c01ef8d4>] (i2c_new_device+0x118/0x180)
 r4:df9d8a20
[<c01ef7bc>] (i2c_new_device+0x0/0x180) from [<c01efc88>] (i2c_register_adapter+0x140/0x204)
 r8:c03cd970 r7:00000000 r6:df8f0070 r5:df8a6300 r4:df8f0048
[<c01efb48>] (i2c_register_adapter+0x0/0x204) from [<c01efe9c>] (i2c_add_numbered_adapter+0xb4/0xcc)
 r8:df8a4c54 r7:df8cae00 r6:df843e2c r5:df8f0048 r4:00000000
[<c01efde8>] (i2c_add_numbered_adapter+0x0/0xcc) from [<c029ce1c>] (omap_i2c_probe+0x2f8/0x3b4)
 r6:00000000 r5:df8f0000 r4:df8f0070
[<c029cb24>] (omap_i2c_probe+0x0/0x3b4) from [<c01d3484>] (platform_drv_probe+0x20/0x24)
[<c01d3464>] (platform_drv_probe+0x0/0x24) from [<c01d1f34>] (really_probe+0xa0/0x178)
[<c01d1e94>] (really_probe+0x0/0x178) from [<c01d205c>] (driver_probe_device+0x50/0x68)
 r7:df843ef0 r6:c03cdb2c r5:c03cdb2c r4:df8cae08
[<c01d200c>] (driver_probe_device+0x0/0x68) from [<c01d20e0>] (__driver_attach+0x6c/0x90)
 r5:df8cae3c r4:df8cae08
[<c01d2074>] (__driver_attach+0x0/0x90) from [<c01d08d8>] (bus_for_each_dev+0x58/0x98)
 r6:c03cdb2c r5:c01d2074 r4:00000000
[<c01d0880>] (bus_for_each_dev+0x0/0x98) from [<c01d1d80>] (driver_attach+0x20/0x28)
 r7:df880b80 r6:c03cdb2c r5:c03cdb2c r4:c0394f28
[<c01d1d60>] (driver_attach+0x0/0x28) from [<c01d115c>] (bus_add_driver+0xb4/0x230)
[<c01d10a8>] (bus_add_driver+0x0/0x230) from [<c01d278c>] (driver_register+0xc8/0x154)
[<c01d26c4>] (driver_register+0x0/0x154) from [<c01d37e4>] (platform_driver_register+0x4c/0x60)
 r8:00000000 r7:00000013 r6:c00384c8 r5:c0395180 r4:c0394f28
[<c01d3798>] (platform_driver_register+0x0/0x60) from [<c038626c>] (omap_i2c_init_driver+0x14/0x1c)
[<c0386258>] (omap_i2c_init_driver+0x0/0x1c) from [<c00087b8>] (do_one_initcall+0x9c/0x164)
[<c000871c>] (do_one_initcall+0x0/0x164) from [<c036c2f4>] (kernel_init+0x90/0x138)
[<c036c264>] (kernel_init+0x0/0x138) from [<c00384c8>] (do_exit+0x0/0x2ec)
 r5:c036c264 r4:00000000
<0>Code: e24dd004 e5903014 e1a04000 e5905010 (e5933000)
<4>---[ end trace 1b75b31a2719ed1c ]---

This happens because we try to register an IRQ domain with a NULL ops
structure, and the first thing irq_domain_add() does is try to
dereference this ops structure.

So, fix the problem by getting rid of the incorrect OF_IRQ ifdef and
wrapping the IRQ domain bits of the driver with an IRQ_DOMAIN ifdef
instead.

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-02-09 17:56:53 +00:00
..
88pm860x-core.c mfd: Avoid to use constraint name in 88pm860x regulator driver 2011-05-26 19:45:38 +02:00
88pm860x-i2c.c mfd: Introduce missing kfree in 88pm860x probe routine 2012-01-09 00:37:47 +01:00
aat2870-core.c mfd: Convert aat2870 to dev_pm_ops 2012-01-09 00:37:48 +01:00
ab3100-core.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
ab3100-otp.c mfd: Fix memory leak in ab3100_otp_probe 2010-08-12 11:27:17 +02:00
ab5500-core.c mfd: Unify abx500 headers in mfd/abx500 2012-01-09 00:37:39 +01:00
ab5500-core.h mfd: Break out ab5500 debugfs code 2011-10-24 14:09:16 +02:00
ab5500-debugfs.c mfd: Unify abx500 headers in mfd/abx500 2012-01-09 00:37:39 +01:00
ab5500-debugfs.h mfd: Break out ab5500 debugfs code 2011-10-24 14:09:16 +02:00
ab8500-core.c mfd: Unify abx500 headers in mfd/abx500 2012-01-09 00:37:39 +01:00
ab8500-debugfs.c mfd: Unify abx500 headers in mfd/abx500 2012-01-09 00:37:39 +01:00
ab8500-gpadc.c mfd: Unify abx500 headers in mfd/abx500 2012-01-09 00:37:39 +01:00
ab8500-i2c.c mfd: Unify abx500 headers in mfd/abx500 2012-01-09 00:37:39 +01:00
ab8500-sysctrl.c mfd: Unify abx500 headers in mfd/abx500 2012-01-09 00:37:39 +01:00
abx500-core.c mfd: Add module.h to the implicit drivers/mfd users 2011-10-31 19:32:04 -04:00
adp5520.c mfd: Set adp5520 bits if new value is different from the old one 2011-12-20 18:50:55 +01:00
asic3.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
cs5535-mfd.c mfd: Convert to DEFINE_PCI_DEVICE_TABLE 2012-01-09 00:37:37 +01:00
da903x.c mfd: Set da903x bits if new value is different from the old one 2011-12-20 18:50:56 +01:00
da9052-core.c mfd: Clearing events requires event registers to be writable for da9052-core 2012-01-03 20:18:11 +00:00
da9052-i2c.c MFD: DA9052/53 MFD core module 2011-12-14 19:53:32 +08:00
da9052-spi.c MFD: DA9052/53 MFD core module add SPI support v2 2011-12-14 19:53:45 +08:00
davinci_voicecodec.c mfd: Use mfd cell platform_data for davinci cells platform bits 2011-05-26 19:45:13 +02:00
db5500-prcmu.c mfd: Fix db5500-prcmu defines 2011-10-24 14:09:19 +02:00
db8500-prcmu.c mfd/db8500-prcmu: remove support for early silicon revisions 2012-01-03 21:47:04 +00:00
dbx500-prcmu-regs.h mfd: Move to the new db500 PRCMU API 2011-10-24 14:09:18 +02:00
dm355evm_msp.c mfd: Use gpio_request_one from dm355evm_msp 2012-01-09 00:37:38 +01:00
ezx-pcap.c Fix common misspellings 2011-03-31 11:26:23 -03:00
htc-egpio.c mfd: Fold irq_set_chip/irq_set_handler 2011-03-27 00:09:52 +01:00
htc-i2cpld.c mfd: Fold irq_set_chip/irq_set_handler 2011-03-27 00:09:52 +01:00
htc-pasic3.c w1: ds1wm: add a reset recovery parameter 2011-07-08 21:14:44 -07:00
intel_msic.c mfd: Convert MFD drivers to use module_platform_driver 2012-01-09 00:37:31 +01:00
janz-cmodio.c module_param: check type correctness for module_param_array 2012-01-13 09:32:16 +10:30
jz4740-adc.c mfd: Don't declare jz4740_adc_cells const 2012-01-09 00:37:36 +01:00
Kconfig ARM: omap: fix broken twl-core dependencies and ifdefs 2012-02-09 17:56:53 +00:00
lpc_sch.c mfd: Convert to DEFINE_PCI_DEVICE_TABLE 2012-01-09 00:37:37 +01:00
Makefile Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 2012-01-13 20:43:32 -08:00
max8925-core.c max8925_power: Remove support for irq bits that do not exist 2011-11-25 23:24:45 +04:00
max8925-i2c.c mfd: Add pm ops to max8925 2012-01-09 01:03:34 +01:00
max8997-irq.c mfd: Remove dead code from max8997-irq 2011-07-31 23:28:25 +02:00
max8997.c mfd: Add platform data and devices for MAX8997 LED control 2012-01-09 00:37:41 +01:00
max8998-irq.c mfd: Cleanup irq namespace 2011-03-27 00:09:51 +01:00
max8998.c mfd: Use standard device wakeup for handling max8998 wakeup device 2012-01-09 00:37:36 +01:00
mc13xxx-core.c mfd: Add device tree probe support for mc13xxx 2012-01-09 00:37:35 +01:00
mcp-core.c MFD: mcp-core: fix complaints from the genirq layer 2012-01-20 17:57:35 +00:00
mcp-sa11x0.c Revert "ARM: sa11x0: Implement autoloading of codec and codec pdata for mcp bus." 2012-01-20 17:38:58 +00:00
menelaus.c Merge branch 'for-next' of git://git.infradead.org/users/sameo/mfd-2.6 2011-11-03 09:40:51 -07:00
mfd-core.c mfd: Add module.h to the implicit drivers/mfd users 2011-10-31 19:32:04 -04:00
omap-usb-host.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 2012-01-13 20:43:32 -08:00
pcf50633-adc.c mfd: Convert MFD drivers to use module_platform_driver 2012-01-09 00:37:31 +01:00
pcf50633-core.c mfd: Convert pcf50633 to use new register map API 2011-10-24 14:09:08 +02:00
pcf50633-gpio.c mfd/pcf50633-gpio.c: add MODULE_LICENSE 2009-06-17 19:41:30 +02:00
pcf50633-irq.c mfd: Add export.h for EXPORT_SYMBOL/THIS_MODULE as required 2011-10-31 19:32:05 -04:00
pm8xxx-irq.c mfd: Add pm8xxx irq support 2011-05-26 19:45:28 +02:00
pm8921-core.c mfd: Add pm8xxx irq support 2011-05-26 19:45:28 +02:00
rdc321x-southbridge.c mfd: Use mfd cell platform_data for rdc321x cells platform bits 2011-05-26 19:45:06 +02:00
s5m-core.c mfd: Add S5M core driver 2012-01-09 00:37:46 +01:00
s5m-irq.c mfd: Add s5m series irq driver 2012-01-09 00:37:46 +01:00
sm501.c mfd: Convert to DEFINE_PCI_DEVICE_TABLE 2012-01-09 00:37:37 +01:00
stmpe-i2c.c mfd: Add support for stmpe variant 801 2012-01-09 00:37:44 +01:00
stmpe-spi.c mfd: Add support for stmpe variant 801 2012-01-09 00:37:44 +01:00
stmpe.c mfd: Fix stmpe section mismatch 2012-01-09 00:37:45 +01:00
stmpe.h mfd: Add support for stmpe variant 801 2012-01-09 00:37:44 +01:00
t7l66xb.c mfd: Convert MFD drivers to use module_platform_driver 2012-01-09 00:37:31 +01:00
tc3589x.c mfd: Add missing #ifdef around tc3589x PM block 2011-10-24 14:09:09 +02:00
tc6387xb.c mfd: Convert MFD drivers to use module_platform_driver 2012-01-09 00:37:31 +01:00
tc6393xb.c mtd: Use platform_data to retrieve tmio_nand platform bits 2011-05-26 19:45:04 +02:00
ti-ssp.c mfd: Convert MFD drivers to use module_platform_driver 2012-01-09 00:37:31 +01:00
timberdale.c mfd: Convert to DEFINE_PCI_DEVICE_TABLE 2012-01-09 00:37:37 +01:00
timberdale.h [media] mfd: Add timberdale video-in driver to timberdale 2010-12-29 08:16:46 -02:00
tmio_core.c mfd: Add export.h for EXPORT_SYMBOL/THIS_MODULE as required 2011-10-31 19:32:05 -04:00
tps6105x.c mfd: Use mfd cell platform_data for tps6105x cells platform bits 2011-05-26 19:45:11 +02:00
tps6507x.c mfd: Fix off-by-one value range checking for tps6507x 2010-10-29 00:30:29 +02:00
tps6586x.c mfd: Set tps6586x bits if new value is different from the old one 2011-12-20 18:50:56 +01:00
tps65010.c mfd: Include <linux/gpio.h> instead of <asm/gpio.h> 2011-01-14 12:37:36 +01:00
tps65910-irq.c mfd: Make TPS65910 usable without interrupts 2012-01-09 00:37:40 +01:00
tps65910.c mfd: Make TPS65910 usable without interrupts 2012-01-09 00:37:40 +01:00
tps65911-comparator.c mfd: Remove comp{1,2}_threshold sysfs entries in tps65911_comparator_remove 2011-07-31 23:28:24 +02:00
tps65912-core.c mfd: Do not leak init_data in tps65912_device_init() 2011-10-24 14:09:15 +02:00
tps65912-i2c.c mfd: Fix off-by-one value range checking for tps65912_i2c_write 2011-07-31 23:28:25 +02:00
tps65912-irq.c tps65912: irq: add interrupt controller 2011-07-31 23:28:22 +02:00
tps65912-spi.c mfd: Remove redundant spi driver bus initialization 2012-01-09 00:37:31 +01:00
twl-core.c ARM: omap: fix broken twl-core dependencies and ifdefs 2012-02-09 17:56:53 +00:00
twl-core.h mfd: Fix twl-irq function declaration warnings 2010-10-29 00:30:16 +02:00
twl4030-audio.c mfd: Convert MFD drivers to use module_platform_driver 2012-01-09 00:37:31 +01:00
twl4030-irq.c mfd: Fix twl4030-irq typo 2012-01-09 00:37:33 +01:00
twl4030-madc.c mfd: Convert MFD drivers to use module_platform_driver 2012-01-09 00:37:31 +01:00
twl4030-power.c mfd: Add power off functionality to TWL 2012-01-09 00:37:40 +01:00
twl6030-irq.c freezer: don't unnecessarily set PF_NOFREEZE explicitly 2011-11-21 12:32:22 -08:00
twl6030-pwm.c mfd: twl6030-pwm.c needs MODULE_LICENSE 2011-07-31 23:28:27 +02:00
twl6040-core.c mfd: Avoid twl6040-codec PLL reconfiguration when not needed 2012-02-03 19:03:50 +01:00
twl6040-irq.c MFD: twl6040: Demand valid interrupt configuration 2011-07-07 14:23:25 +03:00
ucb1x00-assabet.c move drivers/mfd/*.h to include/linux/mfd 2009-11-27 21:07:18 +01:00
ucb1x00-core.c MFD: ucb1x00-core: fix gpiolib direction_output handling 2012-01-21 18:34:46 +00:00
ucb1x00-ts.c MFD: ucb1x00-ts: fix resume failure 2012-01-22 21:10:40 +00:00
ucb1400_core.c Fix common misspellings 2011-03-31 11:26:23 -03:00
vx855.c mfd: Convert to DEFINE_PCI_DEVICE_TABLE 2012-01-09 00:37:37 +01:00
wl1273-core.c mfd: Add module.h to the implicit drivers/mfd users 2011-10-31 19:32:04 -04:00
wm831x-auxadc.c mfd: Support multiple active WM831x AUXADC conversions 2011-07-31 23:28:20 +02:00
wm831x-core.c mfd: Return an error on failed wm831x register writes 2012-01-09 00:37:40 +01:00
wm831x-i2c.c mfd: Convert wm831x core driver to devm_kzalloc() 2012-01-09 00:37:28 +01:00
wm831x-irq.c mfd: Still check other interrupts if we get a wm831x touchscreen IRQ 2012-01-09 00:37:47 +01:00
wm831x-otp.c mfd: Add basic WM831x OTP support 2009-09-17 09:46:59 +02:00
wm831x-spi.c mfd: Remove redundant spi driver bus initialization 2012-01-09 00:37:31 +01:00
wm8350-core.c mfd: Store wm8350 struct in core device driver data 2012-01-09 00:37:31 +01:00
wm8350-gpio.c mfd: Rename wm8350 static gpio_set_debounce() 2011-09-06 16:37:58 +02:00
wm8350-i2c.c mfd: Convert WM8350 to devm_kzalloc() 2012-01-09 00:37:32 +01:00
wm8350-irq.c mfd: Allocate wm835x irq descs dynamically 2011-07-31 23:28:20 +02:00
wm8350-regmap.c mfd: Remove build time warning for WM835x register default tables 2009-12-13 19:21:53 +01:00
wm8400-core.c mfd: Convert WM8400 to devm_kzalloc() 2012-01-09 00:37:39 +01:00
wm8994-core.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound 2012-01-12 08:00:30 -08:00
wm8994-irq.c mfd: Convert wm8994 to use generic regmap irq_chip 2011-12-13 00:14:06 +08:00
wm8994-regmap.c mfd: Mark WM1811 GPIO6 register volatile for later revisions 2011-12-13 00:11:49 +08:00
wm8994.h mfd: Initialise WM8994 register cache after reading chip ID registers 2011-12-13 00:11:13 +08:00