diff --git a/drivers/video/tcx.c b/drivers/video/tcx.c
index 95b9182..6990ab1 100644
--- a/drivers/video/tcx.c
+++ b/drivers/video/tcx.c
@@ -1,6 +1,6 @@
 /* tcx.c: TCX frame buffer driver
  *
- * Copyright (C) 2003 David S. Miller (davem@redhat.com)
+ * Copyright (C) 2003, 2006 David S. Miller (davem@davemloft.net)
  * Copyright (C) 1996,1998 Jakub Jelinek (jj@ultra.linux.cz)
  * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx)
  * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be)
@@ -19,8 +19,8 @@
 #include <linux/mm.h>
 
 #include <asm/io.h>
-#include <asm/sbus.h>
-#include <asm/oplib.h>
+#include <asm/prom.h>
+#include <asm/of_device.h>
 #include <asm/fbio.h>
 
 #include "sbuslib.h"
@@ -77,32 +77,32 @@
 
 /* The contents are unknown */
 struct tcx_tec {
-	volatile u32 tec_matrix;
-	volatile u32 tec_clip;
-	volatile u32 tec_vdc;
+	u32 tec_matrix;
+	u32 tec_clip;
+	u32 tec_vdc;
 };
 
 struct tcx_thc {
-	volatile u32 thc_rev;
+	u32 thc_rev;
         u32 thc_pad0[511];
-	volatile u32 thc_hs;		/* hsync timing */
-	volatile u32 thc_hsdvs;
-	volatile u32 thc_hd;
-	volatile u32 thc_vs;		/* vsync timing */
-	volatile u32 thc_vd;
-	volatile u32 thc_refresh;
-	volatile u32 thc_misc;
+	u32 thc_hs;		/* hsync timing */
+	u32 thc_hsdvs;
+	u32 thc_hd;
+	u32 thc_vs;		/* vsync timing */
+	u32 thc_vd;
+	u32 thc_refresh;
+	u32 thc_misc;
 	u32 thc_pad1[56];
-	volatile u32 thc_cursxy;	/* cursor x,y position (16 bits each) */
-	volatile u32 thc_cursmask[32];	/* cursor mask bits */
-	volatile u32 thc_cursbits[32];	/* what to show where mask enabled */
+	u32 thc_cursxy;	/* cursor x,y position (16 bits each) */
+	u32 thc_cursmask[32];	/* cursor mask bits */
+	u32 thc_cursbits[32];	/* what to show where mask enabled */
 };
 
 struct bt_regs {
-	volatile u32 addr;
-	volatile u32 color_map;
-	volatile u32 control;
-	volatile u32 cursor;
+	u32 addr;
+	u32 color_map;
+	u32 control;
+	u32 cursor;
 };
 
 #define TCX_MMAP_ENTRIES 14
@@ -112,24 +112,23 @@
 	struct bt_regs		__iomem *bt;
 	struct tcx_thc		__iomem *thc;
 	struct tcx_tec		__iomem *tec;
-	volatile u32		__iomem *cplane;
+	u32			__iomem *cplane;
 
 	u32			flags;
 #define TCX_FLAG_BLANKED	0x00000001
 
 	unsigned long		physbase;
+	unsigned long		which_io;
 	unsigned long		fbsize;
 
 	struct sbus_mmap_map	mmap_map[TCX_MMAP_ENTRIES];
 	int			lowdepth;
-
-	struct sbus_dev		*sdev;
 };
 
 /* Reset control plane so that WID is 8-bit plane. */
 static void __tcx_set_control_plane (struct tcx_par *par)
 {
-	volatile u32 __iomem *p, *pend;
+	u32 __iomem *p, *pend;
         
 	if (par->lowdepth)
 		return;
@@ -307,8 +306,7 @@
 
 	return sbusfb_mmap_helper(par->mmap_map,
 				  par->physbase, par->fbsize,
-				  par->sdev->reg_addrs[0].which_io,
-				  vma);
+				  par->which_io, vma);
 }
 
 static int tcx_ioctl(struct fb_info *info, unsigned int cmd,
@@ -350,48 +348,71 @@
 struct all_info {
 	struct fb_info info;
 	struct tcx_par par;
-	struct list_head list;
 };
-static LIST_HEAD(tcx_list);
 
-static void tcx_init_one(struct sbus_dev *sdev)
+static void tcx_unmap_regs(struct all_info *all)
 {
+	if (all->par.tec)
+		of_iounmap(all->par.tec, sizeof(struct tcx_tec));
+	if (all->par.thc)
+		of_iounmap(all->par.thc, sizeof(struct tcx_thc));
+	if (all->par.bt)
+		of_iounmap(all->par.bt, sizeof(struct bt_regs));
+	if (all->par.cplane)
+		of_iounmap(all->par.cplane, all->par.fbsize * sizeof(u32));
+	if (all->info.screen_base)
+		of_iounmap(all->info.screen_base, all->par.fbsize);
+}
+
+static int __devinit tcx_init_one(struct of_device *op)
+{
+	struct device_node *dp = op->node;
 	struct all_info *all;
-	int linebytes, i;
+	int linebytes, i, err;
 
-	all = kmalloc(sizeof(*all), GFP_KERNEL);
-	if (!all) {
-		printk(KERN_ERR "tcx: Cannot allocate memory.\n");
-		return;
-	}
-	memset(all, 0, sizeof(*all));
-
-	INIT_LIST_HEAD(&all->list);
+	all = kzalloc(sizeof(*all), GFP_KERNEL);
+	if (!all)
+		return -ENOMEM;
 
 	spin_lock_init(&all->par.lock);
-	all->par.sdev = sdev;
 
-	all->par.lowdepth = prom_getbool(sdev->prom_node, "tcx-8-bit");
+	all->par.lowdepth =
+		(of_find_property(dp, "tcx-8-bit", NULL) != NULL);
 
-	sbusfb_fill_var(&all->info.var, sdev->prom_node, 8);
+	sbusfb_fill_var(&all->info.var, dp->node, 8);
 	all->info.var.red.length = 8;
 	all->info.var.green.length = 8;
 	all->info.var.blue.length = 8;
 
-	linebytes = prom_getintdefault(sdev->prom_node, "linebytes",
-				       all->info.var.xres);
+	linebytes = of_getintprop_default(dp, "linebytes",
+					  all->info.var.xres);
 	all->par.fbsize = PAGE_ALIGN(linebytes * all->info.var.yres);
 
-	all->par.tec = sbus_ioremap(&sdev->resource[7], 0,
-			     sizeof(struct tcx_tec), "tcx tec");
-	all->par.thc = sbus_ioremap(&sdev->resource[9], 0,
-			     sizeof(struct tcx_thc), "tcx thc");
-	all->par.bt = sbus_ioremap(&sdev->resource[8], 0,
-			     sizeof(struct bt_regs), "tcx dac");
+	all->par.tec = of_ioremap(&op->resource[7], 0,
+				  sizeof(struct tcx_tec), "tcx tec");
+	all->par.thc = of_ioremap(&op->resource[9], 0,
+				  sizeof(struct tcx_thc), "tcx thc");
+	all->par.bt = of_ioremap(&op->resource[8], 0,
+				 sizeof(struct bt_regs), "tcx dac");
+	all->info.screen_base = of_ioremap(&op->resource[0], 0,
+					   all->par.fbsize, "tcx ram");
+	if (!all->par.tec || !all->par.thc ||
+	    !all->par.bt || !all->info.screen_base) {
+		tcx_unmap_regs(all);
+		kfree(all);
+		return -ENOMEM;
+	}
+
 	memcpy(&all->par.mmap_map, &__tcx_mmap_map, sizeof(all->par.mmap_map));
 	if (!all->par.lowdepth) {
-		all->par.cplane = sbus_ioremap(&sdev->resource[4], 0,
-				     all->par.fbsize * sizeof(u32), "tcx cplane");
+		all->par.cplane = of_ioremap(&op->resource[4], 0,
+					     all->par.fbsize * sizeof(u32),
+					     "tcx cplane");
+		if (!all->par.cplane) {
+			tcx_unmap_regs(all);
+			kfree(all);
+			return -ENOMEM;
+		}
 	} else {
 		all->par.mmap_map[1].size = SBUS_MMAP_EMPTY;
 		all->par.mmap_map[4].size = SBUS_MMAP_EMPTY;
@@ -400,6 +421,8 @@
 	}
 
 	all->par.physbase = 0;
+	all->par.which_io = op->resource[0].flags & IORESOURCE_BITS;
+
 	for (i = 0; i < TCX_MMAP_ENTRIES; i++) {
 		int j;
 
@@ -416,18 +439,11 @@
 			j = i;
 			break;
 		};
-		all->par.mmap_map[i].poff = sdev->reg_addrs[j].phys_addr;
+		all->par.mmap_map[i].poff = op->resource[j].start;
 	}
 
 	all->info.flags = FBINFO_DEFAULT;
 	all->info.fbops = &tcx_ops;
-#ifdef CONFIG_SPARC32
-	all->info.screen_base = (char __iomem *)
-		prom_getintdefault(sdev->prom_node, "address", 0);
-#endif
-	if (!all->info.screen_base)
-		all->info.screen_base = sbus_ioremap(&sdev->resource[0], 0,
-				     all->par.fbsize, "tcx ram");
 	all->info.par = &all->par;
 
 	/* Initialize brooktree DAC. */
@@ -445,72 +461,88 @@
 	tcx_blank(FB_BLANK_UNBLANK, &all->info);
 
 	if (fb_alloc_cmap(&all->info.cmap, 256, 0)) {
-		printk(KERN_ERR "tcx: Could not allocate color map.\n");
+		tcx_unmap_regs(all);
 		kfree(all);
-		return;
+		return -ENOMEM;
 	}
 
 	fb_set_cmap(&all->info.cmap, &all->info);
 	tcx_init_fix(&all->info, linebytes);
 
-	if (register_framebuffer(&all->info) < 0) {
-		printk(KERN_ERR "tcx: Could not register framebuffer.\n");
+	err = register_framebuffer(&all->info);
+	if (err < 0) {
 		fb_dealloc_cmap(&all->info.cmap);
+		tcx_unmap_regs(all);
 		kfree(all);
-		return;
+		return err;
 	}
 
-	list_add(&all->list, &tcx_list);
+	dev_set_drvdata(&op->dev, all);
 
-	printk("tcx: %s at %lx:%lx, %s\n",
-	       sdev->prom_name,
-	       (long) sdev->reg_addrs[0].which_io,
-	       (long) sdev->reg_addrs[0].phys_addr,
+	printk("%s: TCX at %lx:%lx, %s\n",
+	       dp->full_name,
+	       all->par.which_io,
+	       op->resource[0].start,
 	       all->par.lowdepth ? "8-bit only" : "24-bit depth");
+
+	return 0;
 }
 
+static int __devinit tcx_probe(struct of_device *dev, const struct of_device_id *match)
+{
+	struct of_device *op = to_of_device(&dev->dev);
+
+	return tcx_init_one(op);
+}
+
+static int __devexit tcx_remove(struct of_device *dev)
+{
+	struct all_info *all = dev_get_drvdata(&dev->dev);
+
+	unregister_framebuffer(&all->info);
+	fb_dealloc_cmap(&all->info.cmap);
+
+	tcx_unmap_regs(all);
+
+	kfree(all);
+
+	dev_set_drvdata(&dev->dev, NULL);
+
+	return 0;
+}
+
+static struct of_device_id tcx_match[] = {
+	{
+		.name = "SUNW,tcx",
+	},
+	{},
+};
+MODULE_DEVICE_TABLE(of, tcx_match);
+
+static struct of_platform_driver tcx_driver = {
+	.name		= "tcx",
+	.match_table	= tcx_match,
+	.probe		= tcx_probe,
+	.remove		= __devexit_p(tcx_remove),
+};
+
 int __init tcx_init(void)
 {
-	struct sbus_bus *sbus;
-	struct sbus_dev *sdev;
-
 	if (fb_get_options("tcxfb", NULL))
 		return -ENODEV;
 
-	for_all_sbusdev(sdev, sbus) {
-		if (!strcmp(sdev->prom_name, "SUNW,tcx"))
-			tcx_init_one(sdev);
-	}
-
-	return 0;
+	return of_register_driver(&tcx_driver, &of_bus_type);
 }
 
 void __exit tcx_exit(void)
 {
-	struct list_head *pos, *tmp;
-
-	list_for_each_safe(pos, tmp, &tcx_list) {
-		struct all_info *all = list_entry(pos, typeof(*all), list);
-
-		unregister_framebuffer(&all->info);
-		fb_dealloc_cmap(&all->info.cmap);
-		kfree(all);
-	}
-}
-
-int __init
-tcx_setup(char *arg)
-{
-	/* No cmdline options yet... */
-	return 0;
+	of_unregister_driver(&tcx_driver);
 }
 
 module_init(tcx_init);
-
-#ifdef MODULE
 module_exit(tcx_exit);
-#endif
 
 MODULE_DESCRIPTION("framebuffer driver for TCX chipsets");
-MODULE_AUTHOR("David S. Miller <davem@redhat.com>");
+MODULE_AUTHOR("David S. Miller <davem@davemloft.net>");
+MODULE_VERSION("2.0");
 MODULE_LICENSE("GPL");
