+ info = framebuffer_alloc(sizeof(struct epson1355_par) + sizeof(u32) * 256, &dev->dev);
+ if (!info)
+ rc = -ENOMEM;
+ goto bail;
+
+ default_par = info->par;
+ default_par->reg_addr = (unsigned long) ioremap(EPSON1355FB_REGS_PHYS, EPSON1355FB_REGS_LEN);
+ if (!default_par->reg_addr) {
+ printk(KERN_ERR "epson1355fb: unable to map registers\n");
+ rc = -ENOMEM;
+ goto bail;
+ }
+ info->pseudo_palette = (void *)(default_par + 1);
+
+ info->screen_base = ioremap(EPSON1355FB_FB_PHYS, EPSON1355FB_FB_LEN);
+ if (!info->screen_base) {
+ printk(KERN_ERR "epson1355fb: unable to map framebuffer\n");
+ rc = -ENOMEM;
+ goto bail;
+ }
+
+ revision = epson1355_read_reg(default_par, REG_REVISION_CODE);
+ if ((revision >> 2) != 3) {
+ printk(KERN_INFO "epson1355fb: epson1355 not found\n");
+ rc = -ENODEV;
+ goto bail;
+ }
+
+ info->fix.mmio_start = EPSON1355FB_REGS_PHYS;
+ info->fix.mmio_len = EPSON1355FB_REGS_LEN;
+ info->fix.smem_start = EPSON1355FB_FB_PHYS;
+ info->fix.smem_len = get_fb_size(info);
+
+ printk(KERN_INFO "epson1355fb: regs mapped at 0x%lx, fb %d KiB mapped at 0x%p\n",
+ default_par->reg_addr, info->fix.smem_len / 1024, info->screen_base);
+
+ strcpy(info->fix.id, "S1D13505");
+ info->par = default_par;
+ info->fbops = &epson1355fb_fbops;
+ info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
+
+ /* we expect the boot loader to have initialized the chip
+ with appropriate parameters from which we can determinte
+ the flavor of lcd panel attached */
+ fetch_hw_state(info, default_par);
+
+ /* turn this puppy on ... */
+ clearfb16(info);
+ backlight_enable(1);
+ lcd_enable(default_par, 1);
+
+ if (register_framebuffer(info) < 0) {
+ rc = -EINVAL;
+ goto bail;
+ }