From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail15-dub-R.bigfish.com (mail-dub.bigfish.com [213.199.154.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.bigfish.com", Issuer "*.bigfish.com" (not verified)) by ozlabs.org (Postfix) with ESMTP id 4F538DE1C7 for ; Fri, 14 Dec 2007 10:43:46 +1100 (EST) From: Stephen Neuendorffer To: grant.likely@secretlab.ca, simekm2@fel.cvut.cz, jwilliams@itee.uq.edu.au, linuxppc-dev@ozlabs.org Subject: [PATCH 5/7] [POWERPC] Xilinx: Update compatible to use values generated by BSP generator. Date: Thu, 13 Dec 2007 15:43:31 -0800 In-Reply-To: <1197589413-5965-4-git-send-email-stephen.neuendorffer@xilinx.com> References: <1197589413-5965-1-git-send-email-stephen.neuendorffer@xilinx.com> <1197589413-5965-2-git-send-email-stephen.neuendorffer@xilinx.com> <1197589413-5965-3-git-send-email-stephen.neuendorffer@xilinx.com> <1197589413-5965-4-git-send-email-stephen.neuendorffer@xilinx.com> Message-Id: <20071213234339.8DDAADD807C@mail15-dub.bigfish.com> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 --- arch/powerpc/platforms/40x/virtex.c | 2 +- drivers/block/xsysace.c | 4 ++- drivers/serial/uartlite.c | 42 +++++++++++++++++++++------------- drivers/video/xilinxfb.c | 2 +- 4 files changed, 31 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 5ec42f3..6536cc7 100644 --- a/drivers/serial/uartlite.c +++ b/drivers/serial/uartlite.c @@ -21,8 +21,18 @@ #include #include #if defined(CONFIG_OF) +#include #include #include + +/* Match table for of_platform binding */ +static struct of_device_id __devinit 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 +437,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 +671,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