- if (!strcmp(dp->parent->name, "sbus") ||
- !strcmp(dp->parent->name, "sbi")) {
- all->par.physbase = op->resource[0].start;
- all->par.iospace = op->resource[0].flags & IORESOURCE_BITS;
+ all->par.sdev = sdev;
+ if (sdev) {
+ rphys = sdev->reg_addrs[0].phys_addr;
+ all->par.physbase = phys = sdev->reg_addrs[1].phys_addr;
+ all->par.iospace = sdev->reg_addrs[0].which_io;
+
+ all->par.regs = sbus_ioremap(&sdev->resource[0], 0,
+ sizeof(struct cg14_regs),
+ "cg14 regs");
+ all->par.clut = sbus_ioremap(&sdev->resource[0], CG14_CLUT1,
+ sizeof(struct cg14_clut),
+ "cg14 clut");
+ all->par.cursor = sbus_ioremap(&sdev->resource[0], CG14_CURSORREGS,
+ sizeof(struct cg14_cursor),
+ "cg14 cursor");
+ all->info.screen_base = sbus_ioremap(&sdev->resource[1], 0,
+ all->par.fbsize, "cg14 ram");