Few fixes for omaps to reduce bootup noise
Subsystems (4)
Tony Lindgren
maintainercover Few fixes for omaps to reduce bootup noise
Here are few fixes to reduce bootup errors and warnings when booting omaps in device tree mode. All these are non-critical, so these are intended for the v3.19 merge window unless somebody comes up with a real need for these earlier.
Regards,
Tony
Tony Lindgren (5):
ARM: OMAP3: Fix errors for omap_l3_smx when booted with device tree
ARM: dts: Fix NAND last partition size on LDP
ARM: dts: Add twl keypad map for LDP
ARM: dts: Add twl keypad map for LDP
ARM: OMAP4+: Remove unused omap_l3_noc platform init
arch/arm/boot/dts/omap3-evm-common.dtsi | 21 +++++++++++++++++++ arch/arm/boot/dts/omap3-ldp.dts | 23 ++++++++++++++++++++- arch/arm/boot/dts/omap3.dtsi | 2 +- arch/arm/mach-omap2/devices.c | 36 +-------------------------------- drivers/bus/omap_l3_smx.c | 26 +++++++++++++++++++----- 5 files changed, 66 insertions(+), 42 deletions(-)
Signature · 1 line
2.1.1
Tony Lindgren
maintainerPATCH 1/5 ARM: OMAP3: Fix errors for omap_l3_smx when booted with device tree
When booting omap3 in device tree mode, we're currently getting the following errors:
omap_l3_smx omap_l3_smx.0: couldn't request debug irqomap_l3_smx: probe of omap_l3_smx.0 failed with error -22
This is because we don't have handling in the driver for the compatible property and instead assume platform data being passed.
Note that this binding is already documented, and implemented for the related omap_l3_noc driver for omap4 and later. Looks like the binding somehow never got never implemented for this omap_l3_smx driver though.
Let's also remove __exit_p to allow binding and unbinding of the driver while at it.
--- arch/arm/boot/dts/omap3.dtsi | 2 +- arch/arm/mach-omap2/devices.c | 2 +- drivers/bus/omap_l3_smx.c | 26 +++++++++++++++++++++----- 3 files changed, 23 insertions(+), 7 deletions(-)
arch/arm/boot/dts/omap3.dtsi +1 -1
@@ -79,7 +79,7 @@ * hierarchy. */ ocp { - compatible = "simple-bus"; + compatible = "ti,omap3-l3-smx", "simple-bus"; reg = <0x68000000 0x10000>; interrupts = <9 10>; #address-cells = <1>;
arch/arm/mach-omap2/devices.c +1 -1
@@ -49,7 +49,7 @@ static int __init omap3_l3_init(void)* To avoid code running on other OMAPs in * multi-omap builds */ -if (!(cpu_is_omap34xx ())) +if (!(cpu_is_omap34xx ()) ||of_have_populated_dt ())return -ENODEV ;snprintf (oh_name,L3_MODULES_MAX_LEN ,"l3_main" );
drivers/bus/omap_l3_smx.c +21 -5
@@ -27,6 +27,10 @@#include <linux/platform_device.h> #include <linux/interrupt.h> #include <linux/io.h> +#include <linux/module.h> +#include <linux/of.h> +#include <linux/of_device.h> +#include "omap_l3_smx.h" static inline u64 omap3_l3_readll (void __iomem *base,u16 reg)
@@ -211,7 +215,17 @@ static irqreturn_t omap3_l3_app_irq(int irq, void *_l3)return ret; } -static int __init omap3_l3_probe (struct platform_device *pdev) +#if IS_BUILTIN (CONFIG_OF ) +static const struct of_device_id omap3_l3_match[] = { + { + .compatible ="ti,omap3-l3-smx" , + }, + { }, +}; +MODULE_DEVICE_TABLE (of, omap3_l3_match); +#endif + +static int omap3_l3_probe (struct platform_device *pdev) {struct omap3_l3 *l3;struct resource *res;
@@ -265,7 +279,7 @@ err0:return ret; } -static int __exit omap3_l3_remove(struct platform_device *pdev) +static int omap3_l3_remove (struct platform_device *pdev) {struct omap3_l3 *l3 =platform_get_drvdata (pdev);
@@ -278,15 +292,17 @@ static int __exit omap3_l3_remove(struct platform_device *pdev) }static struct platform_driver omap3_l3_driver = { - .remove =__exit_p (omap3_l3_remove), + .probe = omap3_l3_probe, + .remove = omap3_l3_remove, .driver = { - .name ="omap_l3_smx" , + .name ="omap_l3_smx" , + .of_match_table =of_match_ptr (omap3_l3_match), }, };static int __init omap3_l3_init (void ) { -return platform_driver_probe (&omap3_l3_driver, omap3_l3_probe); +return platform_driver_register (&omap3_l3_driver); }postcore_initcall_sync (omap3_l3_init);
Signature · 1 line
2.1.1
PATCH 1/5 ARM: OMAP3: Fix errors for omap_l3_smx when booted with device tree
Quoted 15 lines · Tony Lindgren
When booting omap3 in device tree mode, we're currently getting the following errors:
omap_l3_smxomap_l3_smx.0: couldn't request debug irqomap_l3_smx: probe of omap_l3_smx.0 failed with error -22This is because we don't have handling in the driver for the compatible property and instead assume platform data being passed.
Note that this binding is already documented, and implemented for the related
omap_l3_nocdriver for omap4 and later. Looks like the binding somehow never got never implemented for thisomap_l3_smxdriver though.
Quoted 8 lines
Let's also remove
__exit_pto allow binding and unbinding of the driver while at it.Reported-by Pavel Machek <[email protected]>Reported-by Russell King <[email protected]>Cc Santosh Shilimkar <[email protected]>Signed-off-by Tony Lindgren <[email protected]>---
PATCH 1/5 ARM: OMAP3: Fix errors for omap_l3_smx when booted with device tree
In reply to Tony LindgrenQuoted 15 lines · Tony Lindgren
When booting omap3 in device tree mode, we're currently getting the following errors:
omap_l3_smxomap_l3_smx.0: couldn't request debug irqomap_l3_smx: probe of omap_l3_smx.0 failed with error -22This is because we don't have handling in the driver for the compatible property and instead assume platform data being passed.
Note that this binding is already documented, and implemented for the related
omap_l3_nocdriver for omap4 and later. Looks like the binding somehow never got never implemented for thisomap_l3_smxdriver though.
Quoted 8 lines
Let's also remove
__exit_pto allow binding and unbinding of the driver while at it.Reported-by Pavel Machek <[email protected]>Reported-by Russell King <[email protected]>Cc Santosh Shilimkar <[email protected]>Signed-off-by Tony Lindgren <[email protected]>---
Tony Lindgren
maintainerPATCH 2/5 ARM: dts: Fix NAND last partition size on LDP
In reply to Tony LindgrenFix the following warning during the boot:
mtd: partition "Filesystem" extends beyond the end of device "omap2-nand.0" -- size truncated to 0x6000000
Looks like I got the last partition size wrong while setting up the .dts file. Note that this does not affect the partition as the size has been getting truncated to the right size.
--- arch/arm/boot/dts/omap3-ldp.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/omap3-ldp.dts +1 -1
@@ -141,7 +141,7 @@ }; partition at 2000000 { label = "Filesystem"; - reg = <0x2000000 0xe000000>; + reg = <0x2000000 0x6000000>; }; };
Signature · 1 line
2.1.1
Tony Lindgren
maintainerPATCH 3/5 ARM: dts: Add twl keypad map for LDP
In reply to Tony LindgrenLooks like we're still missing the keypad map for LDP. Let's add it since we have the binding now available for the twl4030_keypad as otherwise we get the following errors during the boot:
twl4030_keypad keypad.31: OF: linux,keymap property not defined in /ocp/i2c at 48070000/twl at 48/keypad twl4030_keypad keypad.31: Failed to build keymaptwl4030_keypad: probe of keypad.31 failed with error -2
--- arch/arm/boot/dts/omap3-ldp.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
arch/arm/boot/dts/omap3-ldp.dts +21 -0
@@ -7,6 +7,7 @@ */ /dts-v1/; +#include <dt-bindings/input/input.h> #include "omap34xx.dtsi" #include "omap-gpmc-smsc911x.dtsi"
@@ -263,6 +264,26 @@ }; }; +&twl_keypad { + linux,keymap = <MATRIX_KEY(0, 0, KEY_1) + MATRIX_KEY(0, 1, KEY_2) + MATRIX_KEY(0, 2, KEY_3) + MATRIX_KEY(1, 0, KEY_4) + MATRIX_KEY(1, 1, KEY_5) + MATRIX_KEY(1, 2, KEY_6) + MATRIX_KEY(1, 3, KEY_F5) + MATRIX_KEY(2, 0, KEY_7) + MATRIX_KEY(2, 1, KEY_8) + MATRIX_KEY(2, 2, KEY_9) + MATRIX_KEY(2, 3, KEY_F6) + MATRIX_KEY(3, 0, KEY_F7) + MATRIX_KEY(3, 1, KEY_0) + MATRIX_KEY(3, 2, KEY_F8) + MATRIX_KEY(5, 4, KEY_RESERVED) + MATRIX_KEY(4, 4, KEY_VOLUMEUP) + MATRIX_KEY(5, 5, KEY_VOLUMEDOWN)>; +}; + &uart3 { interrupts-extended = <&intc 74 &omap3_pmx_core OMAP3_UART3_RX>; };
Signature · 1 line
2.1.1
Tony Lindgren
maintainerPATCH 4/5 ARM: dts: Add twl keypad map for LDP
In reply to Tony LindgrenLooks like we're still missing the keypad map for LDP. Let's add it since we have the binding now available for the twl4030_keypad as otherwise we get the following errors during the boot:
twl4030_keypad keypad.31: OF: linux,keymap property not defined in /ocp/i2c at 48070000/twl at 48/keypad twl4030_keypad keypad.31: Failed to build keymaptwl4030_keypad: probe of keypad.31 failed with error -2
--- arch/arm/boot/dts/omap3-evm-common.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
arch/arm/boot/dts/omap3-evm-common.dtsi +21 -0
@@ -2,6 +2,7 @@ * Common support for omap3 EVM boards */ +#include <dt-bindings/input/input.h> #include "omap-gpmc-smsc911x.dtsi" / {
@@ -111,6 +112,26 @@ ti,use-leds; }; +&twl_keypad { + linux,keymap = < + MATRIX_KEY(2, 2, KEY_1) + MATRIX_KEY(1, 1, KEY_2) + MATRIX_KEY(0, 0, KEY_3) + MATRIX_KEY(3, 2, KEY_4) + MATRIX_KEY(2, 1, KEY_5) + MATRIX_KEY(1, 0, KEY_6) + MATRIX_KEY(1, 3, KEY_7) + MATRIX_KEY(3, 1, KEY_8) + MATRIX_KEY(2, 0, KEY_9) + MATRIX_KEY(2, 3, KEY_KPASTERISK) + MATRIX_KEY(0, 2, KEY_0) + MATRIX_KEY(3, 0, KEY_KPDOT) + /* s4 not wired */ + MATRIX_KEY(1, 2, KEY_BACKSPACE) + MATRIX_KEY(0, 1, KEY_ENTER) + >; +}; + &usb_otg_hs { interface-type = <0>; usb-phy = <&usb2_phy>;
Signature · 1 line
2.1.1
Tony Lindgren
maintainerPATCH 4/5 ARM: dts: Add twl keypad map for LDP
Quoted 9 lines · Tony Lindgren
Looks like we're still missing the keypad map for LDP. Let's add it since we have the binding now available for the
twl4030_keypadas otherwise we get the following errors during the boot:
twl4030_keypadkeypad.31: OF: linux,keymap property not defined in /ocp/i2c at 48070000/twl at 48/keypadtwl4030_keypadkeypad.31: Failed to build keymaptwl4030_keypad: probe of keypad.31 failed with error -2
Uhh, this should say EVM instead of LDP.. Copy paste description from the LDP patch.
Regards,
Tony
Quoted 51 lines
Signed-off-by Tony Lindgren <[email protected]>--- arch/arm/boot/dts/omap3-evm-common.dtsi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)arch/arm/boot/dts/omap3-evm-common.dtsi +21
-0@@ -2,6 +2,7 @@ * Common support for omap3 EVM boards */ +#include <dt-bindings/input/input.h> #include "omap-gpmc-smsc911x.dtsi" / {@@ -111,6 +112,26 @@ ti,use-leds; }; +&twl_keypad { + linux,keymap = < + MATRIX_KEY(2, 2, KEY_1) + MATRIX_KEY(1, 1, KEY_2) + MATRIX_KEY(0, 0, KEY_3) + MATRIX_KEY(3, 2, KEY_4) + MATRIX_KEY(2, 1, KEY_5) + MATRIX_KEY(1, 0, KEY_6) + MATRIX_KEY(1, 3, KEY_7) + MATRIX_KEY(3, 1, KEY_8) + MATRIX_KEY(2, 0, KEY_9) + MATRIX_KEY(2, 3, KEY_KPASTERISK) + MATRIX_KEY(0, 2, KEY_0) + MATRIX_KEY(3, 0, KEY_KPDOT) + /* s4 not wired */ + MATRIX_KEY(1, 2, KEY_BACKSPACE) + MATRIX_KEY(0, 1, KEY_ENTER) + >; +}; + &usb_otg_hs { interface-type = <0>; usb-phy = <&usb2_phy>;Signature · 6 lines
2.1.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Tony Lindgren
maintainerPATCH 5/5 ARM: OMAP4+: Remove unused omap_l3_noc platform init
In reply to Tony LindgrenOmap4 and later have been booting in device tree only mode for quite some time now. This initcall is no longer needed. Note that omap3 uses a different driver omap_l3_smx, and the initcall for that one is still needed until omap3 boots in device tree only mode.
--- arch/arm/mach-omap2/devices.c | 34 ---------------------------------- 1 file changed, 34 deletions(-)
arch/arm/mach-omap2/devices.c +0 -34
@@ -67,40 +67,6 @@ static int __init omap3_l3_init(void) }omap_postcore_initcall (omap3_l3_init); -static int __init omap4_l3_init (void ) -{ -int i; -struct omap_hwmod *oh[3 ]; -struct platform_device *pdev; -char oh_name[L3_MODULES_MAX_LEN ]; - -/* If dtb is there, the devices will be created dynamically */ -if (of_have_populated_dt ()) -return -ENODEV ; - -/* -* To avoid code running on other OMAPs in -* multi-omap builds -*/ -if (!cpu_is_omap44xx () && !soc_is_omap54xx ()) -return -ENODEV ; - -for (i =0 ; i <L3_MODULES ; i++) { -snprintf (oh_name,L3_MODULES_MAX_LEN ,"l3_main_%d" , i+1 ); - - oh[i] =omap_hwmod_lookup (oh_name); -if (!(oh[i])) -pr_err ("could not look up %s\n" , oh_name); - } - - pdev =omap_device_build_ss ("omap_l3_noc" ,0 , oh,3 ,NULL ,0 ); - -WARN (IS_ERR (pdev),"could not build omap_device for %s\n" , oh_name); - -return PTR_RET (pdev); -} -omap_postcore_initcall (omap4_l3_init); -#if defined(CONFIG_VIDEO_OMAP2 ) || defined(CONFIG_VIDEO_OMAP2_MODULE ) static struct resource omap2cam_resources[] = {
Signature · 1 line
2.1.1