Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 303161
b: refs/heads/master
c: e3e5a92
h: refs/heads/master
i:
  303159: 02467cb
v: v3
  • Loading branch information
Benoit Cousson committed Mar 12, 2012
1 parent 604e1e1 commit 2bb70c9
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 93651b85bbd1479321af1de0d14ca95c231e538a
refs/heads/master: e3e5a92db430689fe918041e99cb04b8761f5a50
54 changes: 54 additions & 0 deletions trunk/arch/arm/boot/dts/omap4.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,60 @@
<0x48240100 0x0100>;
};

gpio1: gpio@4a310000 {
compatible = "ti,omap4-gpio";
ti,hwmods = "gpio1";
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <1>;
};

gpio2: gpio@48055000 {
compatible = "ti,omap4-gpio";
ti,hwmods = "gpio2";
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <1>;
};

gpio3: gpio@48057000 {
compatible = "ti,omap4-gpio";
ti,hwmods = "gpio3";
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <1>;
};

gpio4: gpio@48059000 {
compatible = "ti,omap4-gpio";
ti,hwmods = "gpio4";
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <1>;
};

gpio5: gpio@4805b000 {
compatible = "ti,omap4-gpio";
ti,hwmods = "gpio5";
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <1>;
};

gpio6: gpio@4805d000 {
compatible = "ti,omap4-gpio";
ti,hwmods = "gpio6";
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <1>;
};

uart1: serial@4806a000 {
compatible = "ti,omap4-uart";
ti,hwmods = "uart1";
Expand Down
8 changes: 6 additions & 2 deletions trunk/arch/arm/mach-omap2/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/of.h>

#include <plat/omap_hwmod.h>
#include <plat/omap_device.h>
Expand Down Expand Up @@ -122,7 +123,10 @@ static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused)
*/
static int __init omap2_gpio_init(void)
{
return omap_hwmod_for_each_by_class("gpio", omap2_gpio_dev_init,
NULL);
/* If dtb is there, the devices will be created dynamically */
if (of_have_populated_dt())
return -ENODEV;

return omap_hwmod_for_each_by_class("gpio", omap2_gpio_dev_init, NULL);
}
postcore_initcall(omap2_gpio_init);

0 comments on commit 2bb70c9

Please sign in to comment.