Skip to contentSkip to conversation

mmc: omap_hsmmc: Enable SDIO IRQ.

PATCH Superseded Andreas Fenkart 4 participants 9 messages Nov 25, 2013 – Nov 27, 2013

Subsystems (3)

v3 of 14 Superseded Latest is v14 →

lore
Share & tools
lore
#0 lore raw

v3 cover mmc: omap_hsmmc: Enable SDIO IRQ.

v3:
- removed gpio_irq from platform_data

v2:
- incorparated changes as suggested by reviewers
- simplified workaround for am335x, gpio will now only wake the module from runtime suspend, not handle the sdio irq itself

Andreas Fenkart (3):
mmc: omap_hsmmc: Enable SDIO IRQ.
mmc: omap_hsmmc: Pin remux workaround to support SDIO interrupt on

    AM335x.

mmc: omap_hsmmc: Extend debugfs for SDIO IRQ, GPIO and pinmux.

 .../devicetree/bindings/mmc/ti-omap-hsmmc.txt      |   42 +++
 drivers/mmc/host/omap_hsmmc.c                      |  303 ++++++++++++++++++--
 include/linux/platform_data/mmc-omap.h             |    1 +
 3 files changed, 324 insertions(+), 22 deletions(-)
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH v3 1/3 mmc: omap_hsmmc: Enable SDIO IRQ.

For now, only support SDIO interrupt if we are booted with DT. This is because some platforms need special quirks. And we don't want to add new legacy mux platform init code callbacks any longer as we are moving to DT based booting anyways.

Broken hardware, missing the swakueup line, should fallback to polling, by setting 'ti,quirk-swakup-missing' in the device tree. Otherwise pending SDIO IRQ are not detected while in suspend. This affects am33xx processors.

For the DT-Binding portion:

---
 .../devicetree/bindings/mmc/ti-omap-hsmmc.txt      |   18 ++++
 drivers/mmc/host/omap_hsmmc.c                      |   86 ++++++++++++++++++--
 2 files changed, 95 insertions(+), 9 deletions(-)
Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt +18 -0
index ed271fc..1136e6b 100644
@@ -20,6 +20,24 @@ ti,dual-volt: boolean, supports dual voltage cards
 ti,non-removable: non-removable slot (like eMMC)
 ti,needs-special-reset: Requires a special softreset sequence
 ti,needs-special-hs-handling: HSMMC IP needs special setting for handling High Speed
+ti,quirk-swakup-missing: SOC missing the swakeup line, will not detect
+SDIO irq while in suspend. Fallback to polling. Affected chips are
+am335x,
+
+                            ------
+                            | PRCM |
+                             ------
+                              ^ |
+                      swakeup | | fclk
+                              | v
+      ------                -------               -----
+     | card | -- CIRQ -->  | hsmmc | -- IRQ -->  | CPU |
+      ------                -------               -----
+
+In suspend the fclk is off and the module is disfunctional. Even
+register reads will fail. A small logic in the host will request fclk
+restore, when an external event is detected. Once the clock is
+restored, the host detects the event normally.
 
 Example:
 	mmc1: mmc@0x4809c000 {
drivers/mmc/host/omap_hsmmc.c +77 -9

143 lines not on this page · raw message

Signature · 1 line
1.7.10.4
#2 lore raw

PATCH v3 2/3 mmc: omap_hsmmc: Pin remux workaround to support SDIO interrupt on AM335x.

In reply to Andreas Fenkart

The am335x can't detect pending cirq in PM runtime suspend. This patch reconfigures dat1 as a GPIO before going to suspend. SDIO interrupts are detected with the GPIO, the GPIO will only wake the module from suspend, SDIO irq detection will still happen through the IP block.

Idea of remuxing the pins by Tony Lindgren as well as the implementation of omap_hsmmc_pin_init.

---
 .../devicetree/bindings/mmc/ti-omap-hsmmc.txt      |   28 ++-
 drivers/mmc/host/omap_hsmmc.c                      |  202 ++++++++++++++++++--
 include/linux/platform_data/mmc-omap.h             |    1 +
 3 files changed, 215 insertions(+), 16 deletions(-)
Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt +26 -2
index 1136e6b..146f3ad 100644
@@ -21,8 +21,11 @@ ti,non-removable: non-removable slot (like eMMC)
 ti,needs-special-reset: Requires a special softreset sequence
 ti,needs-special-hs-handling: HSMMC IP needs special setting for handling High Speed
 ti,quirk-swakup-missing: SOC missing the swakeup line, will not detect
-SDIO irq while in suspend. Fallback to polling. Affected chips are
-am335x,
+SDIO irq while in suspend. The workaround is to reconfigure the dat1 line as a
+GPIO upon suspend. Beyond this option and the GPIO config, you also need to set
+named pinctrl states "default", "active" and "idle ", see example below.  The
+MMC driver will then then toggle between default and idle during the runtime
+Affected chips are am335x,
 
                             ------
                             | PRCM |
@@ -49,3 +52,24 @@ Example:
 		vmmc-supply = <&vmmc>; /* phandle to regulator node */
 		ti,non-removable;
 	};
+
+[am335x with with gpio for sdio irq]
+
+	mmc1_cirq_pin: pinmux_cirq_pin {
+		pinctrl-single,pins = <
+			0x0f8 0x3f	/* MMC0_DAT1 as GPIO2_28 */
+		>;
+	};
+
+	mmc1: mmc@48060000 {
+		ti,non-removable;
+		bus-width = <4>;
+		vmmc-supply = <&ldo2_reg>;
+		vmmc_aux-supply = <&vmmc>;
+	        ti,quirk-swakeup-missing;
+		pinctrl-names = "default", "active", "idle";
+		pinctrl-0 = <&mmc1_pins>;
+		pinctrl-1 = <&mmc1_pins>;
+		pinctrl-2 = <&mmc1_cirq_pin>;
+		ti,cirq-gpio = <&gpio3 28 0>;
+	};
drivers/mmc/host/omap_hsmmc.c +188 -14

327 lines not on this page · raw message

include/linux/platform_data/mmc-omap.h +1 -0
index 2bf1b30..dc8337f 100644
@@ -115,6 +115,7 @@ struct omap_mmc_platform_data {
 
 		int switch_pin;			/* gpio (card detect) */
 		int gpio_wp;			/* gpio (write protect) */
+		int gpio_cirq;			/* gpio (card irq) */
 
 		int (*set_bus_mode)(struct device *dev, int slot, int bus_mode);
 		int (*set_power)(struct device *dev, int slot,
Signature · 1 line
1.7.10.4
#3 lore raw

Re: [PATCH v3 2/3] mmc: omap_hsmmc: Pin remux workaround to support SDIO interrupt on AM335x.

Quoted 17 lines · Andreas Fenkart
drivers/mmc/host/omap_hsmmc.c +11 -0
@@ -452,10 +475,23 @@ static int omap_hsmmc_gpio_init(struct omap_mmc_platform_data *pdata)
 	} else
 		pdata->slots[0].gpio_wp = -EINVAL;
 
+	if (gpio_is_valid(pdata->slots[0].gpio_cirq)) {
+		ret = gpio_request_one(pdata->slots[0].gpio_cirq, GPIOF_DIR_IN,
+				       "sdio_cirq");
+		if (ret)
+			goto err_free_ro;
+
+	} else {
+		pdata->slots[0].gpio_cirq = -EINVAL;
+	}
+
+

drivers/mmc/host/omap_hsmmc.c static int omap_hsmmc_gpio_init(struct omap_mmc_platform_data *pdata) · line 497

Quoted 10 lines
drivers/mmc/host/omap_hsmmc.c +3 -1
 	return 0;
 
+err_free_ro:
+	if (gpio_is_valid(pdata->slots[0].gpio_wp))
 err_free_wp:
-	gpio_free(pdata->slots[0].gpio_wp);
+		gpio_free(pdata->slots[0].gpio_wp);
 err_free_cd:
 	if (gpio_is_valid(pdata->slots[0].switch_pin))
 err_free_sp:

This patch we can now make a bit more generic with the recent addition of interrupts-extended property that's now merged in mainline tree :)

We can optionally pass two interrupts to omap_hsmmc.c where the second interrupt is either the pinctrl-single wake-up interrupt, or the GPIO interrupt.

Both the iochain wake interrupt or the GPIO interrupt are available with request_irq as long as configured in the .dts file. And can both use the SDIO interrupt handler. The only difference is that the GPIO wake-up still needs to do the dynamic remuxing of pins.

So omap3 can use:

mmc: mmc@4800abcd {
	compatible = "ti,omap3-hsmmc";
	...
	interrupts-extended = <&intc 83 &omap3_pmx_core 0x11a>;
	...
};

And am33xx can use:

mmc: mmc@4810abcd {
	compatible = "ti,omap33xx-hsmmc";
	...
	interrupts-extended = <&intc 64 &gpio3 28>;
	...
};

Then the logic of enabling the dynamic remuxing can be done based on the ti,omap33xx-hsmmc compatible flag if there are two interrupts and the needed pin states are defined.

drivers/mmc/host/omap_hsmmc.c static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev) · line 1896

Quoted 8 lines
drivers/mmc/host/omap_hsmmc.c +1 -0
@@ -1791,6 +1890,7 @@ static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev)
 	pdata->nr_slots = 1;
 	pdata->slots[0].switch_pin = cd_gpio;
 	pdata->slots[0].gpio_wp = wp_gpio;
+	pdata->slots[0].gpio_cirq = of_get_named_gpio(np, "ti,cirq-gpio", 0);
 
 	if (of_find_property(np, "ti,non-removable", NULL)) {
 		pdata->slots[0].nonremovable = true;

We should just add the two interrupts to the host, not to the pdata.

Regards,

Tony

#4 lore raw

Re: [PATCH v3 2/3] mmc: omap_hsmmc: Pin remux workaround to support SDIO interrupt on AM335x.

Hi,

Quoted 32 lines · Tony Lindgren
Quoted 17 lines · Andreas Fenkart
drivers/mmc/host/omap_hsmmc.c +11 -0
@@ -452,10 +475,23 @@ static int omap_hsmmc_gpio_init(struct omap_mmc_platform_data *pdata)
 	} else
 		pdata->slots[0].gpio_wp = -EINVAL;
 
+	if (gpio_is_valid(pdata->slots[0].gpio_cirq)) {
+		ret = gpio_request_one(pdata->slots[0].gpio_cirq, GPIOF_DIR_IN,
+				       "sdio_cirq");
+		if (ret)
+			goto err_free_ro;
+
+	} else {
+		pdata->slots[0].gpio_cirq = -EINVAL;
+	}
+
+

drivers/mmc/host/omap_hsmmc.c static int omap_hsmmc_gpio_init(struct omap_mmc_platform_data *pdata) · line 497

Quoted 10 lines
drivers/mmc/host/omap_hsmmc.c +3 -1
 	return 0;
 
+err_free_ro:
+	if (gpio_is_valid(pdata->slots[0].gpio_wp))
 err_free_wp:
-	gpio_free(pdata->slots[0].gpio_wp);
+		gpio_free(pdata->slots[0].gpio_wp);
 err_free_cd:
 	if (gpio_is_valid(pdata->slots[0].switch_pin))
 err_free_sp:

This patch we can now make a bit more generic with the recent addition of interrupts-extended property that's now merged in mainline tree :)

Quoted 8 lines

We can optionally pass two interrupts to omap_hsmmc.c where the second interrupt is either the pinctrl-single wake-up interrupt, or the GPIO interrupt.

Both the iochain wake interrupt or the GPIO interrupt are available with request_irq as long as configured in the .dts file. And can both use the SDIO interrupt handler. The only difference is that the GPIO wake-up still needs to do the dynamic remuxing of pins.

could that be done automatically if DTS provides "suspend" pinctrl state ?

Would that be done before or after driver's ->{runtime_,}suspend() methods ?

Quoted 2 lines
mmc: mmc@4810abcd {
	compatible = "ti,omap33xx-hsmmc";

I would rather call it "ti,am33xx-hsmmc" just to make it match marketing name of the device.

Quoted 3 lines

Then the logic of enabling the dynamic remuxing can be done based on the ti,omap33xx-hsmmc compatible flag if there are two interrupts and the needed pin states are defined.

or maybe dynamic remuxing can be done by calling pinctrl_select_state() with appropriate arguments ?

Signature · 1 line
balbi
#5 lore raw

Re: [PATCH v3 2/3] mmc: omap_hsmmc: Pin remux workaround to support SDIO interrupt on AM335x.

Quoted 39 lines · Felipe Balbi

Hi,

Quoted 36 lines · Tony Lindgren
Quoted 17 lines · Andreas Fenkart
drivers/mmc/host/omap_hsmmc.c +11 -0
@@ -452,10 +475,23 @@ static int omap_hsmmc_gpio_init(struct omap_mmc_platform_data *pdata)
 	} else
 		pdata->slots[0].gpio_wp = -EINVAL;
 
+	if (gpio_is_valid(pdata->slots[0].gpio_cirq)) {
+		ret = gpio_request_one(pdata->slots[0].gpio_cirq, GPIOF_DIR_IN,
+				       "sdio_cirq");
+		if (ret)
+			goto err_free_ro;
+
+	} else {
+		pdata->slots[0].gpio_cirq = -EINVAL;
+	}
+
+

drivers/mmc/host/omap_hsmmc.c static int omap_hsmmc_gpio_init(struct omap_mmc_platform_data *pdata) · line 497

Quoted 10 lines
drivers/mmc/host/omap_hsmmc.c +3 -1
 	return 0;
 
+err_free_ro:
+	if (gpio_is_valid(pdata->slots[0].gpio_wp))
 err_free_wp:
-	gpio_free(pdata->slots[0].gpio_wp);
+		gpio_free(pdata->slots[0].gpio_wp);
 err_free_cd:
 	if (gpio_is_valid(pdata->slots[0].switch_pin))
 err_free_sp:

This patch we can now make a bit more generic with the recent addition of interrupts-extended property that's now merged in mainline tree :)

We can optionally pass two interrupts to omap_hsmmc.c where the second interrupt is either the pinctrl-single wake-up interrupt, or the GPIO interrupt.

Quoted 7 lines
Quoted 4 lines

Both the iochain wake interrupt or the GPIO interrupt are available with request_irq as long as configured in the .dts file. And can both use the SDIO interrupt handler. The only difference is that the GPIO wake-up still needs to do the dynamic remuxing of pins.

could that be done automatically if DTS provides "suspend" pinctrl state ?

Yes based on the compatible flag and the provided named pin states.

Quoted 2 lines

Would that be done before or after driver's ->{runtime_,}suspend() methods ?

Pins need to remuxed to GPIO input on 33xx in runtime suspend, and then back to SDIO dat1 in runtime resume. Possibly needs to be done also for 34xx, but that's yet to be seen.

Quoted 5 lines
Quoted 2 lines
mmc: mmc@4810abcd {
	compatible = "ti,omap33xx-hsmmc";

I would rather call it "ti,am33xx-hsmmc" just to make it match marketing name of the device.

Except you have both am33xx and dm33xx where the only difference is the DSP on dm33xx? Other than that, I'm fine with am33xx naming as long as it's clear to people and does not involve adding dm33xx stuff separately.

Quoted 6 lines
Quoted 3 lines

Then the logic of enabling the dynamic remuxing can be done based on the ti,omap33xx-hsmmc compatible flag if there are two interrupts and the needed pin states are defined.

or maybe dynamic remuxing can be done by calling pinctrl_select_state() with appropriate arguments ?

Yes the way to do the remuxing is to call pinctrl_select_state() on the named state desired.

Regards,

Tony

#6 lore raw

Re: [PATCH v3 2/3] mmc: omap_hsmmc: Pin remux workaround to support SDIO interrupt on AM335x.

In reply to Tony Lindgren
Quoted 50 lines · Tony Lindgren
Quoted 17 lines · Andreas Fenkart
drivers/mmc/host/omap_hsmmc.c +11 -0
@@ -452,10 +475,23 @@ static int omap_hsmmc_gpio_init(struct omap_mmc_platform_data *pdata)
  	} else
  		pdata->slots[0].gpio_wp = -EINVAL;
 
+	if (gpio_is_valid(pdata->slots[0].gpio_cirq)) {
+		ret = gpio_request_one(pdata->slots[0].gpio_cirq, GPIOF_DIR_IN,
+				       "sdio_cirq");
+		if (ret)
+			goto err_free_ro;
+
+	} else {
+		pdata->slots[0].gpio_cirq = -EINVAL;
+	}
+
+

drivers/mmc/host/omap_hsmmc.c static int omap_hsmmc_gpio_init(struct omap_mmc_platform_data *pdata) · line 497

Quoted 10 lines
drivers/mmc/host/omap_hsmmc.c +3 -1
  	return 0;
 
+err_free_ro:
+	if (gpio_is_valid(pdata->slots[0].gpio_wp))
  err_free_wp:
-	gpio_free(pdata->slots[0].gpio_wp);
+		gpio_free(pdata->slots[0].gpio_wp);
  err_free_cd:
  	if (gpio_is_valid(pdata->slots[0].switch_pin))
  err_free_sp:

This patch we can now make a bit more generic with the recent addition of interrupts-extended property that's now merged in mainline tree :)

We can optionally pass two interrupts to omap_hsmmc.c where the second interrupt is either the pinctrl-single wake-up interrupt, or the GPIO interrupt.

Both the iochain wake interrupt or the GPIO interrupt are available with request_irq as long as configured in the .dts file. And can both use the SDIO interrupt handler. The only difference is that the GPIO wake-up still needs to do the dynamic remuxing of pins.

So omap3 can use:

mmc: mmc@4800abcd {
	compatible = "ti,omap3-hsmmc";
	...
	interrupts-extended = <&intc 83 &omap3_pmx_core 0x11a>;
	...
};
Quoted 9 lines

And am33xx can use:

mmc: mmc@4810abcd {
	compatible = "ti,omap33xx-hsmmc";
	...
	interrupts-extended = <&intc 64 &gpio3 28>;
	...
};

Hi Tony,

I made similar changes for omap4 panda-es as below, but get WARNING for no irq domain [1] omap3 beagle seems to be OK.

mmc1: mmc@4809c000 {
compatible = "ti,omap4-hsmmc"; reg = <0x4809c000 0x400>;

+			interrupts-extended = <&gic GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH &omap4_pmx_core 0xa8>;
			ti,hwmods = "mmc1";
[    0.338745] OMAP GPIO hardware version 0.1
[    0.348266] omap-gpmc 50000000.gpmc: GPMC revision 6.0
[    0.354339] irq: no irq domain found for /ocp/pinmux@4a100040 !
[    0.354339] ------------[ cut here ]------------
[    0.354370] WARNING: CPU: 1 PID: 1 at /home/a0393241/git/lo/drivers/of/platform.c:171 of_device_alloc+0x158/0x16c()
[    0.354370] Modules linked in:
[    0.354400] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 3.13.0-rc1-00141-g8ae516a-dirty #36
[    0.354431] [<c001520c>] (unwind_backtrace+0x0/0xf0) from [<c0011ef4>] (show_stack+0x10/0x14)
[    0.354431] [<c0011ef4>] (show_stack+0x10/0x14) from [<c0521750>] (dump_stack+0x78/0x94)
[    0.354461] [<c0521750>] (dump_stack+0x78/0x94) from [<c003e678>] (warn_slowpath_common+0x6c/0x90)
[    0.354492] [<c003e678>] (warn_slowpath_common+0x6c/0x90) from [<c003e6b8>] (warn_slowpath_null+0x1c/0x24)
[    0.354492] [<c003e6b8>] (warn_slowpath_null+0x1c/0x24) from [<c04460e4>] (of_device_alloc+0x158/0x16c)
[    0.354522] [<c04460e4>] (of_device_alloc+0x158/0x16c) from [<c0446128>] (of_platform_device_create_pdata+0x30/0x94)
[    0.354522] [<c0446128>] (of_platform_device_create_pdata+0x30/0x94) from [<c044626c>] (of_platform_bus_create+0xe0/0x164)
[    0.354553] [<c044626c>] (of_platform_bus_create+0xe0/0x164) from [<c04462c8>] (of_platform_bus_create+0x13c/0x164)
[    0.354553] [<c04462c8>] (of_platform_bus_create+0x13c/0x164) from [<c044634c>] (of_platform_populate+0x5c/0x9c)
[    0.354583] [<c044634c>] (of_platform_populate+0x5c/0x9c) from [<c0785c38>] (pdata_quirks_init+0x28/0x70)
[    0.354614] [<c0785c38>] (pdata_quirks_init+0x28/0x70) from [<c0777458>] (customize_machine+0x1c/0x40)
[    0.354614] [<c0777458>] (customize_machine+0x1c/0x40) from [<c00088fc>] (do_one_initcall+0xec/0x150)
[    0.354644] [<c00088fc>] (do_one_initcall+0xec/0x150) from [<c0774bfc>] (kernel_init_freeable+0xfc/0x1cc)
[    0.354644] [<c0774bfc>] (kernel_init_freeable+0xfc/0x1cc) from [<c051c9ac>] (kernel_init+0x8/0x118)
[    0.354675] [<c051c9ac>] (kernel_init+0x8/0x118) from [<c000e5e8>] (ret_from_fork+0x14/0x2c)
[    0.354766] ---[ end trace 7067c7558a4cd015 ]---
[    0.366607] platform 4b501000.aes: Cannot lookup hwmod 'aes'
[    0.367034] platform 480a5000.des: Cannot lookup hwmod 'des'
[    0.374481] No ATAGs?
[    0.374511] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.374542] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.377502] OMAP DMA hardware revision 0.0
[    0.415100] bio: create slab <bio-0> at 0
[    0.417388] edma-dma-engine edma-dma-engine.0: Can't allocate PaRAM dummy slot
[    0.417419] edma-dma-engine: probe of edma-dma-engine.0 failed with error -5
[    0.460754] omap-dma-engine 4a056000.dma-controller: OMAP DMA engine driver
[    0.462249] hsusb1_vbus: 3300 mV
#7 lore raw

Re: [PATCH v3 2/3] mmc: omap_hsmmc: Pin remux workaround to support SDIO interrupt on AM335x.

Quoted 58 lines · Balaji T K
Quoted 22 lines · Tony Lindgren

This patch we can now make a bit more generic with the recent addition of interrupts-extended property that's now merged in mainline tree :)

We can optionally pass two interrupts to omap_hsmmc.c where the second interrupt is either the pinctrl-single wake-up interrupt, or the GPIO interrupt.

Both the iochain wake interrupt or the GPIO interrupt are available with request_irq as long as configured in the .dts file. And can both use the SDIO interrupt handler. The only difference is that the GPIO wake-up still needs to do the dynamic remuxing of pins.

So omap3 can use:

mmc: mmc@4800abcd {
	compatible = "ti,omap3-hsmmc";
	...
	interrupts-extended = <&intc 83 &omap3_pmx_core 0x11a>;
	...
};
Quoted 9 lines

And am33xx can use:

mmc: mmc@4810abcd {
	compatible = "ti,omap33xx-hsmmc";
	...
	interrupts-extended = <&intc 64 &gpio3 28>;
	...
};

Hi Tony,

I made similar changes for omap4 panda-es as below, but get WARNING for no irq domain [1] omap3 beagle seems to be OK.

(quoted diff) +1 -0
 		mmc1: mmc@4809c000 {
 			compatible = "ti,omap4-hsmmc";
 			reg = <0x4809c000 0x400>;
+			interrupts-extended = <&gic GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH &omap4_pmx_core 0xa8>;
			ti,hwmods = "mmc1";
[    0.338745] OMAP GPIO hardware version 0.1
[    0.348266] omap-gpmc 50000000.gpmc: GPMC revision 6.0
[    0.354339] irq: no irq domain found for /ocp/pinmux@4a100040 !
[    0.354339] ------------[ cut here ]------------
[    0.354370] WARNING: CPU: 1 PID: 1 at /home/a0393241/git/lo/drivers/of/platform.c:171 of_device_alloc+0x158/0x16c()
[    0.354370] Modules linked in:
[    0.354400] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 3.13.0-rc1-00141-g8ae516a-dirty #36
[    0.354431] [<c001520c>] (unwind_backtrace+0x0/0xf0) from [<c0011ef4>] (show_stack+0x10/0x14)
[    0.354431] [<c0011ef4>] (show_stack+0x10/0x14) from [<c0521750>] (dump_stack+0x78/0x94)
[    0.354461] [<c0521750>] (dump_stack+0x78/0x94) from [<c003e678>] (warn_slowpath_common+0x6c/0x90)
[    0.354492] [<c003e678>] (warn_slowpath_common+0x6c/0x90) from [<c003e6b8>] (warn_slowpath_null+0x1c/0x24)
[    0.354492] [<c003e6b8>] (warn_slowpath_null+0x1c/0x24) from [<c04460e4>] (of_device_alloc+0x158/0x16c)
[    0.354522] [<c04460e4>] (of_device_alloc+0x158/0x16c) from [<c0446128>] (of_platform_device_create_pdata+0x30/0x94)
[    0.354522] [<c0446128>] (of_platform_device_create_pdata+0x30/0x94) from [<c044626c>] (of_platform_bus_create+0xe0/0x164)
[    0.354553] [<c044626c>] (of_platform_bus_create+0xe0/0x164) from [<c04462c8>] (of_platform_bus_create+0x13c/0x164)
Quoted 8 lines
[    0.354553] [<c04462c8>] (of_platform_bus_create+0x13c/0x164) from [<c044634c>] (of_platform_populate+0x5c/0x9c)
[    0.354583] [<c044634c>] (of_platform_populate+0x5c/0x9c) from [<c0785c38>] (pdata_quirks_init+0x28/0x70)
[    0.354614] [<c0785c38>] (pdata_quirks_init+0x28/0x70) from [<c0777458>] (customize_machine+0x1c/0x40)
[    0.354614] [<c0777458>] (customize_machine+0x1c/0x40) from [<c00088fc>] (do_one_initcall+0xec/0x150)
[    0.354644] [<c00088fc>] (do_one_initcall+0xec/0x150) from [<c0774bfc>] (kernel_init_freeable+0xfc/0x1cc)
[    0.354644] [<c0774bfc>] (kernel_init_freeable+0xfc/0x1cc) from [<c051c9ac>] (kernel_init+0x8/0x118)
[    0.354675] [<c051c9ac>] (kernel_init+0x8/0x118) from [<c000e5e8>] (ret_from_fork+0x14/0x2c)
[    0.354766] ---[ end trace 7067c7558a4cd015 ]---

Yeah that's nasty looking but harmless, so you can ignore that for now :)

See the thread "[PATCH] of/platform: Fix no irq domain found errors when populating interrupts" on LAKML for attempted fix for that.

Regards,

Tony

#8 lore raw

PATCH v3 3/3 mmc: omap_hsmmc: Extend debugfs for SDIO IRQ, GPIO and pinmux.

In reply to Andreas Fenkart

Add SDIO IRQ entries to debugfs entry. Note that PSTATE shows current state of data lines, incl. SDIO IRQ pending

---
 drivers/mmc/host/omap_hsmmc.c |   19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)
drivers/mmc/host/omap_hsmmc.c +18 -1
index c8c54f5..f7ceca0 100644
@@ -81,6 +81,7 @@ static void apply_clk_hack(struct device *dev)
 #define OMAP_HSMMC_RSP54	0x0118
 #define OMAP_HSMMC_RSP76	0x011C
 #define OMAP_HSMMC_DATA		0x0120
+#define OMAP_HSMMC_PSTATE	0x0124
 #define OMAP_HSMMC_HCTL		0x0128
 #define OMAP_HSMMC_SYSCTL	0x012C
 #define OMAP_HSMMC_STAT		0x0130
@@ -1795,6 +1796,20 @@ static int omap_hsmmc_regs_show(struct seq_file *s, void *data)
 {
 	struct mmc_host *mmc = s->private;
 	struct omap_hsmmc_host *host = mmc_priv(mmc);
+	bool suspended;
+
+	seq_puts(s, "\n");
+	seq_printf(s, "sdio irq\t%s\n", ((host->flags & HSMMC_SDIO_IRQ_ENABLED)
+					 ? "enabled" : "disabled"));
+	suspended = host->dev->power.runtime_status != RPM_ACTIVE;
+	if (host->flags & HSMMC_SWAKEUP_QUIRK) {
+		seq_printf(s, "pinmux config\t%s\n", (suspended ?
+						      "gpio" : "sdio"));
+		if (suspended)
+			seq_printf(s, "sdio irq pin\t%s\n",
+				   gpio_get_value(mmc_slot(host).gpio_cirq) ?
+				   "high" : "low");
+	}
 
 	if (host->suspended) {
 		seq_printf(s, "host suspended, can't read registers\n");
@@ -1802,9 +1817,11 @@ static int omap_hsmmc_regs_show(struct seq_file *s, void *data)
 	}
 
 	pm_runtime_get_sync(host->dev);
-
+	seq_puts(s, "\nregs:\n");
 	seq_printf(s, "CON:\t\t0x%08x\n",
 			OMAP_HSMMC_READ(host->base, CON));
+	seq_printf(s, "PSTATE:\t\t0x%08x\n",
+		   OMAP_HSMMC_READ(host->base, PSTATE));
 	seq_printf(s, "HCTL:\t\t0x%08x\n",
 			OMAP_HSMMC_READ(host->base, HCTL));
 	seq_printf(s, "SYSCTL:\t\t0x%08x\n",
Signature · 1 line
1.7.10.4