Commit 6b1506c6 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'devicetree/merge' of git://git.secretlab.ca/git/linux-2.6

* 'devicetree/merge' of git://git.secretlab.ca/git/linux-2.6:
  dt: add empty of_machine_is_compatible
  ahci: add DT binding for Calxeda AHCI controller
  dt/platform: minor cleanup
  dt: add empty of_alias_get_id() for non-dt builds
parents 1a67a573 50e07f88
* Calxeda SATA Controller
SATA nodes are defined to describe on-chip Serial ATA controllers.
Each SATA controller should have its own node.
Required properties:
- compatible : compatible list, contains "calxeda,hb-ahci"
- interrupts : <interrupt mapping for SATA IRQ>
- reg : <registers mapping>
Example:
sata@ffe08000 {
compatible = "calxeda,hb-ahci";
reg = <0xffe08000 0x1000>;
interrupts = <115>;
};
......@@ -202,11 +202,18 @@ static int __devexit ahci_remove(struct platform_device *pdev)
return 0;
}
static const struct of_device_id ahci_of_match[] = {
{ .compatible = "calxeda,hb-ahci", },
{},
};
MODULE_DEVICE_TABLE(of, ahci_of_match);
static struct platform_driver ahci_driver = {
.remove = __devexit_p(ahci_remove),
.driver = {
.name = "ahci",
.owner = THIS_MODULE,
.of_match_table = ahci_of_match,
},
.id_table = ahci_devtype,
};
......
......@@ -310,7 +310,10 @@ static const struct of_dev_auxdata *of_dev_lookup(const struct of_dev_auxdata *l
struct device_node *np)
{
struct resource res;
if (lookup) {
if (!lookup)
return NULL;
for(; lookup->name != NULL; lookup++) {
if (!of_device_is_compatible(np, lookup->compatible))
continue;
......@@ -321,7 +324,7 @@ static const struct of_dev_auxdata *of_dev_lookup(const struct of_dev_auxdata *l
pr_debug("%s: devname=%s\n", np->full_name, lookup->name);
return lookup;
}
}
return NULL;
}
......@@ -329,8 +332,9 @@ static const struct of_dev_auxdata *of_dev_lookup(const struct of_dev_auxdata *l
* of_platform_bus_create() - Create a device for a node and its children.
* @bus: device node of the bus to instantiate
* @matches: match table for bus nodes
* disallow recursive creation of child buses
* @lookup: auxdata table for matching id and platform_data with device nodes
* @parent: parent for new device, or NULL for top level.
* @strict: require compatible property
*
* Creates a platform_device for the provided device_node, and optionally
* recursively create devices for all the child nodes.
......
......@@ -321,6 +321,16 @@ static inline struct device_node *of_parse_phandle(struct device_node *np,
return NULL;
}
static inline int of_alias_get_id(struct device_node *np, const char *stem)
{
return -ENOSYS;
}
static inline int of_machine_is_compatible(const char *compat)
{
return 0;
}
#define of_match_ptr(_ptr) NULL
#define of_match_node(_matches, _node) NULL
#endif /* CONFIG_OF */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment