From: Stephen Neuendorffer <stephen.neuendorffer@xilinx•com>
To: grant.likely@secretlab•ca, linuxppc-dev@ozlabs•org,
simekm2@fel•cvut.cz, jwilliams@itee•uq.edu.au
Subject: [PATCH 3/7] [POWERPC] Xilinx: Update compatible to use values generated by BSP generator.
Date: Tue, 8 Jan 2008 11:35:05 -0800 [thread overview]
Message-ID: <20080108193520.057BA680078@mail72-dub.bigfish.com> (raw)
In-Reply-To: <1199820909-32341-3-git-send-email-stephen.neuendorffer@xilinx.com>
Mainly, this involves two changes:
1) xilinx->xlnx (recognized standard is to use the stock ticker)
2) In order to have the device tree focus on describing what the
hardware is as exactly as possible, the compatible strings contain the
full IP name and IP version.
Signed-off-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx•com>
---
arch/powerpc/platforms/40x/virtex.c | 2 +-
drivers/block/xsysace.c | 4 ++-
drivers/serial/uartlite.c | 43 ++++++++++++++++++++++-------------
drivers/video/xilinxfb.c | 2 +-
4 files changed, 32 insertions(+), 19 deletions(-)
diff --git a/arch/powerpc/platforms/40x/virtex.c b/arch/powerpc/platforms/40x/virtex.c
index 14bbc32..859ba1d 100644
--- a/arch/powerpc/platforms/40x/virtex.c
+++ b/arch/powerpc/platforms/40x/virtex.c
@@ -30,7 +30,7 @@ static int __init virtex_probe(void)
{
unsigned long root = of_get_flat_dt_root();
- if (!of_flat_dt_is_compatible(root, "xilinx,virtex"))
+ if (!of_flat_dt_is_compatible(root, "xlnx,virtex"))
return 0;
return 1;
diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c
index 82effce..45bc51b 100644
--- a/drivers/block/xsysace.c
+++ b/drivers/block/xsysace.c
@@ -1208,7 +1208,9 @@ static int __devexit ace_of_remove(struct of_device *op)
/* Match table for of_platform binding */
static struct of_device_id __devinit ace_of_match[] = {
- { .compatible = "xilinx,xsysace", },
+ { .compatible = "xlnx,opb-sysace-1.00.b", },
+ { .compatible = "xlnx,opb-sysace-1.00.c", },
+ { .compatible = "xlnx,xps-sysace-1.00.a", },
{},
};
MODULE_DEVICE_TABLE(of, ace_of_match);
diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c
index 71e4c0a..02c2d89 100644
--- a/drivers/serial/uartlite.c
+++ b/drivers/serial/uartlite.c
@@ -19,10 +19,21 @@
#include <linux/tty.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
+#include <linux/init.h>
#include <asm/io.h>
#if defined(CONFIG_OF)
+#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/of_platform.h>
+
+/* Match table for of_platform binding */
+static struct of_device_id __devinitdata ulite_of_match[] = {
+ { .type = "serial", .compatible = "xlnx,opb-uartlite-1.00.b", },
+ { .type = "serial", .compatible = "xlnx,xps-uartlite-1.00.a", },
+ {},
+};
+MODULE_DEVICE_TABLE(of, ulite_of_match);
+
#endif
#define ULITE_NAME "ttyUL"
@@ -427,18 +438,25 @@ static inline u32 __init ulite_console_of_find_device(int id)
struct resource res;
const unsigned int *of_id;
int rc;
+ const struct of_device_id *matches = ulite_of_match;
+
+ while (matches->compatible[0]) {
+ for_each_compatible_node(np, NULL, matches->compatible) {
+ if (!of_match_node(matches, np))
+ continue;
- for_each_compatible_node(np, NULL, "xilinx,uartlite") {
- of_id = of_get_property(np, "port-number", NULL);
- if ((!of_id) || (*of_id != id))
- continue;
+ of_id = of_get_property(np, "port-number", NULL);
+ if ((!of_id) || (*of_id != id))
+ continue;
- rc = of_address_to_resource(np, 0, &res);
- if (rc)
- continue;
+ rc = of_address_to_resource(np, 0, &res);
+ if (rc)
+ continue;
- of_node_put(np);
- return res.start+3;
+ of_node_put(np);
+ return res.start+3;
+ }
+ matches++;
}
return 0;
@@ -654,13 +672,6 @@ static int __devexit ulite_of_remove(struct of_device *op)
return ulite_release(&op->dev);
}
-/* Match table for of_platform binding */
-static struct of_device_id __devinit ulite_of_match[] = {
- { .type = "serial", .compatible = "xilinx,uartlite", },
- {},
-};
-MODULE_DEVICE_TABLE(of, ulite_of_match);
-
static struct of_platform_driver ulite_of_driver = {
.owner = THIS_MODULE,
.name = "uartlite",
diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c
index e38d3b7..9b426d3 100644
--- a/drivers/video/xilinxfb.c
+++ b/drivers/video/xilinxfb.c
@@ -460,7 +460,7 @@ static int __devexit xilinxfb_of_remove(struct of_device *op)
/* Match table for of_platform binding */
static struct of_device_id __devinit xilinxfb_of_match[] = {
- { .compatible = "xilinx,ml300-fb", },
+ { .compatible = "xlnx,plb-tft-cntlr-ref-1.00.a", },
{},
};
MODULE_DEVICE_TABLE(of, xilinxfb_of_match);
--
1.5.3.4-dirty
next prev parent reply other threads:[~2008-01-08 19:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1199820909-32341-1-git-send-email-stephen.neuendorffer@xilinx.com>
2008-01-08 19:35 ` [PATCH 1/7] [POWERPC] Xilinx: Uartlite: Make console output actually work Stephen Neuendorffer
2008-01-09 11:20 ` Peter Korsgaard
[not found] ` <1199820909-32341-2-git-send-email-stephen.neuendorffer@xilinx.com>
2008-01-08 19:35 ` [PATCH 2/7] [POWERPC] Xilinx: update compatible list for interrupt controller Stephen Neuendorffer
[not found] ` <1199820909-32341-3-git-send-email-stephen.neuendorffer@xilinx.com>
2008-01-08 19:35 ` Stephen Neuendorffer [this message]
[not found] ` <1199820909-32341-4-git-send-email-stephen.neuendorffer@xilinx.com>
2008-01-08 19:35 ` [PATCH 4/7] [POWERPC] Xilinx: Add correct compatible list for device tree bus bindings Stephen Neuendorffer
2008-01-09 0:55 ` Stephen Rothwell
[not found] ` <1199820909-32341-5-git-send-email-stephen.neuendorffer@xilinx.com>
2008-01-08 19:35 ` [PATCH 5/7] [POWERPC] Xilinx: Update booting-without-of Stephen Neuendorffer
[not found] ` <1199820909-32341-6-git-send-email-stephen.neuendorffer@xilinx.com>
2008-01-08 19:35 ` [PATCH 6/7] [POWERPC] Xilinx: updated device tree compatibility to match uboot bsp generator Stephen Neuendorffer
[not found] ` <1199820909-32341-7-git-send-email-stephen.neuendorffer@xilinx.com>
2008-01-08 19:35 ` [PATCH 7/7] [POWERPC] Xilinx: Uartlite: Section type fixups Stephen Neuendorffer
2008-01-09 11:24 ` Peter Korsgaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080108193520.057BA680078@mail72-dub.bigfish.com \
--to=stephen.neuendorffer@xilinx$(echo .)com \
--cc=grant.likely@secretlab$(echo .)ca \
--cc=jwilliams@itee$(echo .)uq.edu.au \
--cc=linuxppc-dev@ozlabs$(echo .)org \
--cc=simekm2@fel$(echo .)cvut.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox