]> Pileus Git - ~andy/linux/commitdiff
Merge tag 'fbdev-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 5 Sep 2013 16:49:32 +0000 (09:49 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 5 Sep 2013 16:49:32 +0000 (09:49 -0700)
Pull fbdev changes from Tomi Valkeinen:
 - Improvements to da8xx-fb to make it support v2 of the LCDC IP, used
   eg in BeagleBone
 - Himax HX8369 controller support
 - Various small fixes and cleanups

* tag 'fbdev-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (42 commits)
  video: da8xx-fb: fix the polarities of the hsync/vsync pulse
  video: da8xx-fb: support lcdc v2 timing register expansion
  video: da8xx-fb: fixing timing off by one errors
  video: da8xx-fb fixing incorrect porch mappings
  video: xilinxfb: replace devm_request_and_ioremap by devm_ioremap_resource
  fbmem: move EXPORT_SYMBOL annotation next to symbol declarations
  drivers: video: fbcmap: remove the redundency and incorrect checkings
  video: mxsfb: simplify use of devm_ioremap_resource
  Release efifb's colormap in efifb_destroy()
  at91/avr32/atmel_lcdfb: prepare clk before calling enable
  video: exynos: Ensure definitions match prototypes
  OMAPDSS: fix WARN_ON in 'alpha_blending_enabled' sysfs file
  OMAPDSS: HDMI: Fix possible NULL reference
  video: da8xx-fb: adding am33xx as dependency
  video: da8xx-fb: let compiler decide what to inline
  video: da8xx-fb: make clock naming consistent
  video: da8xx-fb: set upstream clock rate (if reqd)
  video: da8xx-fb: reorganize panel detection
  video: da8xx-fb: ensure non-null cfg in pdata
  video: da8xx-fb: use devres
  ...

1  2 
drivers/video/Kconfig
drivers/video/efifb.c
drivers/video/mxsfb.c
drivers/video/omap2/dss/hdmi.c
drivers/video/xilinxfb.c
include/linux/platform_data/simplefb.h

diff --combined drivers/video/Kconfig
index 34c3d960634d173c900b81e81cafc98b748a4860,b49f5b55f70882f2343c2679ff2d0e0d585dea1c..84b685f7ab6e0a3389c534b56e8f8187619e1e84
@@@ -2100,13 -2100,6 +2100,6 @@@ config GPM1040A0_320X24
          bool "Giantplus Technology GPM1040A0 320x240 Color TFT LCD"
          depends on FB_NUC900
  
- config FB_NUC900_DEBUG
-         bool "NUC900 lcd debug messages"
-         depends on FB_NUC900
-         help
-           Turn on debugging messages. Note that you can set/unset at run time
-           through sysfs
  config FB_SM501
        tristate "Silicon Motion SM501 framebuffer support"
        depends on FB && MFD_SM501
@@@ -2228,15 -2221,17 +2221,17 @@@ config FB_SH776
          panels <= 320 pixel horizontal resolution.
  
  config FB_DA8XX
-       tristate "DA8xx/OMAP-L1xx Framebuffer support"
-       depends on FB && ARCH_DAVINCI_DA8XX
+       tristate "DA8xx/OMAP-L1xx/AM335x Framebuffer support"
+       depends on FB && (ARCH_DAVINCI_DA8XX || SOC_AM33XX)
        select FB_CFB_FILLRECT
        select FB_CFB_COPYAREA
        select FB_CFB_IMAGEBLIT
        select FB_CFB_REV_PIXELS_IN_BYTE
+       select FB_MODE_HELPERS
+       select VIDEOMODE_HELPERS
        ---help---
          This is the frame buffer device driver for the TI LCD controller
-         found on DA8xx/OMAP-L1xx SoCs.
+         found on DA8xx/OMAP-L1xx/AM335x SoCs.
          If unsure, say N.
  
  config FB_VIRTUAL
@@@ -2457,7 -2452,7 +2452,7 @@@ config FB_HYPER
  
  config FB_SIMPLE
        bool "Simple framebuffer support"
 -      depends on (FB = y) && OF
 +      depends on (FB = y)
        select FB_CFB_FILLRECT
        select FB_CFB_COPYAREA
        select FB_CFB_IMAGEBLIT
          pre-allocated frame buffer surface.
  
          Configuration re: surface address, size, and format must be provided
 -        through device tree, or potentially plain old platform data in the
 -        future.
 +        through device tree, or plain old platform data.
  
  source "drivers/video/omap/Kconfig"
  source "drivers/video/omap2/Kconfig"
diff --combined drivers/video/efifb.c
index 2a8286ef2645d69be1f66b743cd68c6361b71908,1c7dd5e69352d0b5ca489b1ef2642d6fc3d9bb0d..7f9ff75d0db22814dcef20c68a923c5fc5125fe1
@@@ -15,7 -15,6 +15,7 @@@
  #include <linux/dmi.h>
  #include <linux/pci.h>
  #include <video/vga.h>
 +#include <asm/sysfb.h>
  
  static bool request_mem_succeeded = false;
  
@@@ -39,6 -38,223 +39,6 @@@ static struct fb_fix_screeninfo efifb_f
        .visual                 = FB_VISUAL_TRUECOLOR,
  };
  
 -enum {
 -      M_I17,          /* 17-Inch iMac */
 -      M_I20,          /* 20-Inch iMac */
 -      M_I20_SR,       /* 20-Inch iMac (Santa Rosa) */
 -      M_I24,          /* 24-Inch iMac */
 -      M_I24_8_1,      /* 24-Inch iMac, 8,1th gen */
 -      M_I24_10_1,     /* 24-Inch iMac, 10,1th gen */
 -      M_I27_11_1,     /* 27-Inch iMac, 11,1th gen */
 -      M_MINI,         /* Mac Mini */
 -      M_MINI_3_1,     /* Mac Mini, 3,1th gen */
 -      M_MINI_4_1,     /* Mac Mini, 4,1th gen */
 -      M_MB,           /* MacBook */
 -      M_MB_2,         /* MacBook, 2nd rev. */
 -      M_MB_3,         /* MacBook, 3rd rev. */
 -      M_MB_5_1,       /* MacBook, 5th rev. */
 -      M_MB_6_1,       /* MacBook, 6th rev. */
 -      M_MB_7_1,       /* MacBook, 7th rev. */
 -      M_MB_SR,        /* MacBook, 2nd gen, (Santa Rosa) */
 -      M_MBA,          /* MacBook Air */
 -      M_MBA_3,        /* Macbook Air, 3rd rev */
 -      M_MBP,          /* MacBook Pro */
 -      M_MBP_2,        /* MacBook Pro 2nd gen */
 -      M_MBP_2_2,      /* MacBook Pro 2,2nd gen */
 -      M_MBP_SR,       /* MacBook Pro (Santa Rosa) */
 -      M_MBP_4,        /* MacBook Pro, 4th gen */
 -      M_MBP_5_1,    /* MacBook Pro, 5,1th gen */
 -      M_MBP_5_2,      /* MacBook Pro, 5,2th gen */
 -      M_MBP_5_3,      /* MacBook Pro, 5,3rd gen */
 -      M_MBP_6_1,      /* MacBook Pro, 6,1th gen */
 -      M_MBP_6_2,      /* MacBook Pro, 6,2th gen */
 -      M_MBP_7_1,      /* MacBook Pro, 7,1th gen */
 -      M_MBP_8_2,      /* MacBook Pro, 8,2nd gen */
 -      M_UNKNOWN       /* placeholder */
 -};
 -
 -#define OVERRIDE_NONE 0x0
 -#define OVERRIDE_BASE 0x1
 -#define OVERRIDE_STRIDE       0x2
 -#define OVERRIDE_HEIGHT       0x4
 -#define OVERRIDE_WIDTH        0x8
 -
 -static struct efifb_dmi_info {
 -      char *optname;
 -      unsigned long base;
 -      int stride;
 -      int width;
 -      int height;
 -      int flags;
 -} dmi_list[] __initdata = {
 -      [M_I17] = { "i17", 0x80010000, 1472 * 4, 1440, 900, OVERRIDE_NONE },
 -      [M_I20] = { "i20", 0x80010000, 1728 * 4, 1680, 1050, OVERRIDE_NONE }, /* guess */
 -      [M_I20_SR] = { "imac7", 0x40010000, 1728 * 4, 1680, 1050, OVERRIDE_NONE },
 -      [M_I24] = { "i24", 0x80010000, 2048 * 4, 1920, 1200, OVERRIDE_NONE }, /* guess */
 -      [M_I24_8_1] = { "imac8", 0xc0060000, 2048 * 4, 1920, 1200, OVERRIDE_NONE },
 -      [M_I24_10_1] = { "imac10", 0xc0010000, 2048 * 4, 1920, 1080, OVERRIDE_NONE },
 -      [M_I27_11_1] = { "imac11", 0xc0010000, 2560 * 4, 2560, 1440, OVERRIDE_NONE },
 -      [M_MINI]= { "mini", 0x80000000, 2048 * 4, 1024, 768, OVERRIDE_NONE },
 -      [M_MINI_3_1] = { "mini31", 0x40010000, 1024 * 4, 1024, 768, OVERRIDE_NONE },
 -      [M_MINI_4_1] = { "mini41", 0xc0010000, 2048 * 4, 1920, 1200, OVERRIDE_NONE },
 -      [M_MB] = { "macbook", 0x80000000, 2048 * 4, 1280, 800, OVERRIDE_NONE },
 -      [M_MB_5_1] = { "macbook51", 0x80010000, 2048 * 4, 1280, 800, OVERRIDE_NONE },
 -      [M_MB_6_1] = { "macbook61", 0x80010000, 2048 * 4, 1280, 800, OVERRIDE_NONE },
 -      [M_MB_7_1] = { "macbook71", 0x80010000, 2048 * 4, 1280, 800, OVERRIDE_NONE },
 -      [M_MBA] = { "mba", 0x80000000, 2048 * 4, 1280, 800, OVERRIDE_NONE },
 -      /* 11" Macbook Air 3,1 passes the wrong stride */
 -      [M_MBA_3] = { "mba3", 0, 2048 * 4, 0, 0, OVERRIDE_STRIDE },
 -      [M_MBP] = { "mbp", 0x80010000, 1472 * 4, 1440, 900, OVERRIDE_NONE },
 -      [M_MBP_2] = { "mbp2", 0, 0, 0, 0, OVERRIDE_NONE }, /* placeholder */
 -      [M_MBP_2_2] = { "mbp22", 0x80010000, 1472 * 4, 1440, 900, OVERRIDE_NONE },
 -      [M_MBP_SR] = { "mbp3", 0x80030000, 2048 * 4, 1440, 900, OVERRIDE_NONE },
 -      [M_MBP_4] = { "mbp4", 0xc0060000, 2048 * 4, 1920, 1200, OVERRIDE_NONE },
 -      [M_MBP_5_1] = { "mbp51", 0xc0010000, 2048 * 4, 1440, 900, OVERRIDE_NONE },
 -      [M_MBP_5_2] = { "mbp52", 0xc0010000, 2048 * 4, 1920, 1200, OVERRIDE_NONE },
 -      [M_MBP_5_3] = { "mbp53", 0xd0010000, 2048 * 4, 1440, 900, OVERRIDE_NONE },
 -      [M_MBP_6_1] = { "mbp61", 0x90030000, 2048 * 4, 1920, 1200, OVERRIDE_NONE },
 -      [M_MBP_6_2] = { "mbp62", 0x90030000, 2048 * 4, 1680, 1050, OVERRIDE_NONE },
 -      [M_MBP_7_1] = { "mbp71", 0xc0010000, 2048 * 4, 1280, 800, OVERRIDE_NONE },
 -      [M_MBP_8_2] = { "mbp82", 0x90010000, 1472 * 4, 1440, 900, OVERRIDE_NONE },
 -      [M_UNKNOWN] = { NULL, 0, 0, 0, 0, OVERRIDE_NONE }
 -};
 -
 -static int set_system(const struct dmi_system_id *id);
 -
 -#define EFIFB_DMI_SYSTEM_ID(vendor, name, enumid)             \
 -      { set_system, name, {                                   \
 -              DMI_MATCH(DMI_BIOS_VENDOR, vendor),             \
 -              DMI_MATCH(DMI_PRODUCT_NAME, name) },            \
 -        &dmi_list[enumid] }
 -
 -static const struct dmi_system_id dmi_system_table[] __initconst = {
 -      EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "iMac4,1", M_I17),
 -      /* At least one of these two will be right; maybe both? */
 -      EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "iMac5,1", M_I20),
 -      EFIFB_DMI_SYSTEM_ID("Apple Inc.", "iMac5,1", M_I20),
 -      /* At least one of these two will be right; maybe both? */
 -      EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "iMac6,1", M_I24),
 -      EFIFB_DMI_SYSTEM_ID("Apple Inc.", "iMac6,1", M_I24),
 -      EFIFB_DMI_SYSTEM_ID("Apple Inc.", "iMac7,1", M_I20_SR),
 -      EFIFB_DMI_SYSTEM_ID("Apple Inc.", "iMac8,1", M_I24_8_1),
 -      EFIFB_DMI_SYSTEM_ID("Apple Inc.", "iMac10,1", M_I24_10_1),
 -      EFIFB_DMI_SYSTEM_ID("Apple Inc.", "iMac11,1", M_I27_11_1),
 -      EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "Macmini1,1", M_MINI),
 -      EFIFB_DMI_SYSTEM_ID("Apple Inc.", "Macmini3,1", M_MINI_3_1),
 -      EFIFB_DMI_SYSTEM_ID("Apple Inc.", "Macmini4,1", M_MINI_4_1),
 -      EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBook1,1", M_MB),
 -      /* At least one of these two will be right; maybe both? */
 -      EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBook2,1", M_MB),
 -      EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook2,1", M_MB),
 -      /* At least one of these two will be right; maybe both? */
 -      EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBook3,1", M_MB),
 -      EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook3,1", M_MB),
 -      EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook4,1", M_MB),
 -      EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook5,1", M_MB_5_1),
 -      EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook6,1", M_MB_6_1),
 -      EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBook7,1", M_MB_7_1),
 -      EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookAir1,1", M_MBA),
 -      EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookAir3,1", M_MBA_3),
 -      EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBookPro1,1", M_MBP),
 -      EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBookPro2,1", M_MBP_2),
 -      EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBookPro2,2", M_MBP_2_2),
 -      EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro2,1", M_MBP_2),
 -      EFIFB_DMI_SYSTEM_ID("Apple Computer, Inc.", "MacBookPro3,1", M_MBP_SR),
 -      EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro3,1", M_MBP_SR),
 -      EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro4,1", M_MBP_4),
 -      EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro5,1", M_MBP_5_1),
 -      EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro5,2", M_MBP_5_2),
 -      EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro5,3", M_MBP_5_3),
 -      EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro6,1", M_MBP_6_1),
 -      EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro6,2", M_MBP_6_2),
 -      EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro7,1", M_MBP_7_1),
 -      EFIFB_DMI_SYSTEM_ID("Apple Inc.", "MacBookPro8,2", M_MBP_8_2),
 -      {},
 -};
 -
 -#define choose_value(dmivalue, fwvalue, field, flags) ({      \
 -              typeof(fwvalue) _ret_ = fwvalue;                \
 -              if ((flags) & (field))                          \
 -                      _ret_ = dmivalue;                       \
 -              else if ((fwvalue) == 0)                        \
 -                      _ret_ = dmivalue;                       \
 -              _ret_;                                          \
 -      })
 -
 -static int set_system(const struct dmi_system_id *id)
 -{
 -      struct efifb_dmi_info *info = id->driver_data;
 -
 -      if (info->base == 0 && info->height == 0 && info->width == 0
 -                      && info->stride == 0)
 -              return 0;
 -
 -      /* Trust the bootloader over the DMI tables */
 -      if (screen_info.lfb_base == 0) {
 -#if defined(CONFIG_PCI)
 -              struct pci_dev *dev = NULL;
 -              int found_bar = 0;
 -#endif
 -              if (info->base) {
 -                      screen_info.lfb_base = choose_value(info->base,
 -                              screen_info.lfb_base, OVERRIDE_BASE,
 -                              info->flags);
 -
 -#if defined(CONFIG_PCI)
 -                      /* make sure that the address in the table is actually
 -                       * on a VGA device's PCI BAR */
 -
 -                      for_each_pci_dev(dev) {
 -                              int i;
 -                              if ((dev->class >> 8) != PCI_CLASS_DISPLAY_VGA)
 -                                      continue;
 -                              for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
 -                                      resource_size_t start, end;
 -
 -                                      start = pci_resource_start(dev, i);
 -                                      if (start == 0)
 -                                              break;
 -                                      end = pci_resource_end(dev, i);
 -                                      if (screen_info.lfb_base >= start &&
 -                                          screen_info.lfb_base < end) {
 -                                              found_bar = 1;
 -                                      }
 -                              }
 -                      }
 -                      if (!found_bar)
 -                              screen_info.lfb_base = 0;
 -#endif
 -              }
 -      }
 -      if (screen_info.lfb_base) {
 -              screen_info.lfb_linelength = choose_value(info->stride,
 -                      screen_info.lfb_linelength, OVERRIDE_STRIDE,
 -                      info->flags);
 -              screen_info.lfb_width = choose_value(info->width,
 -                      screen_info.lfb_width, OVERRIDE_WIDTH,
 -                      info->flags);
 -              screen_info.lfb_height = choose_value(info->height,
 -                      screen_info.lfb_height, OVERRIDE_HEIGHT,
 -                      info->flags);
 -              if (screen_info.orig_video_isVGA == 0)
 -                      screen_info.orig_video_isVGA = VIDEO_TYPE_EFI;
 -      } else {
 -              screen_info.lfb_linelength = 0;
 -              screen_info.lfb_width = 0;
 -              screen_info.lfb_height = 0;
 -              screen_info.orig_video_isVGA = 0;
 -              return 0;
 -      }
 -
 -      printk(KERN_INFO "efifb: dmi detected %s - framebuffer at 0x%08x "
 -                       "(%dx%d, stride %d)\n", id->ident,
 -                       screen_info.lfb_base, screen_info.lfb_width,
 -                       screen_info.lfb_height, screen_info.lfb_linelength);
 -
 -
 -      return 1;
 -}
 -
  static int efifb_setcolreg(unsigned regno, unsigned red, unsigned green,
                           unsigned blue, unsigned transp,
                           struct fb_info *info)
@@@ -72,6 -288,7 +72,7 @@@ static void efifb_destroy(struct fb_inf
        if (request_mem_succeeded)
                release_mem_region(info->apertures->ranges[0].base,
                                   info->apertures->ranges[0].size);
+       fb_dealloc_cmap(&info->cmap);
        framebuffer_release(info);
  }
  
@@@ -96,7 -313,7 +97,7 @@@ void vga_set_default_device(struct pci_
        default_vga = pdev;
  }
  
 -static int __init efifb_setup(char *options)
 +static int efifb_setup(char *options)
  {
        char *this_opt;
        int i;
                        if (!*this_opt) continue;
  
                        for (i = 0; i < M_UNKNOWN; i++) {
 -                              if (!strcmp(this_opt, dmi_list[i].optname) &&
 -                                  dmi_list[i].base != 0) {
 -                                      screen_info.lfb_base = dmi_list[i].base;
 -                                      screen_info.lfb_linelength = dmi_list[i].stride;
 -                                      screen_info.lfb_width = dmi_list[i].width;
 -                                      screen_info.lfb_height = dmi_list[i].height;
 +                              if (!strcmp(this_opt, efifb_dmi_list[i].optname) &&
 +                                  efifb_dmi_list[i].base != 0) {
 +                                      screen_info.lfb_base = efifb_dmi_list[i].base;
 +                                      screen_info.lfb_linelength = efifb_dmi_list[i].stride;
 +                                      screen_info.lfb_width = efifb_dmi_list[i].width;
 +                                      screen_info.lfb_height = efifb_dmi_list[i].height;
                                }
                        }
                        if (!strncmp(this_opt, "base:", 5))
        return 0;
  }
  
 -static int __init efifb_probe(struct platform_device *dev)
 +static int efifb_probe(struct platform_device *dev)
  {
        struct fb_info *info;
        int err;
        unsigned int size_vmode;
        unsigned int size_remap;
        unsigned int size_total;
 +      char *option = NULL;
 +
 +      if (screen_info.orig_video_isVGA != VIDEO_TYPE_EFI)
 +              return -ENODEV;
 +
 +      if (fb_get_options("efifb", &option))
 +              return -ENODEV;
 +      efifb_setup(option);
 +
 +      /* We don't get linelength from UGA Draw Protocol, only from
 +       * EFI Graphics Protocol.  So if it's not in DMI, and it's not
 +       * passed in from the user, we really can't use the framebuffer.
 +       */
 +      if (!screen_info.lfb_linelength)
 +              return -ENODEV;
  
        if (!screen_info.lfb_depth)
                screen_info.lfb_depth = 32;
@@@ -338,12 -540,55 +339,12 @@@ err_release_mem
  }
  
  static struct platform_driver efifb_driver = {
 -      .driver = {
 -              .name   = "efifb",
 +      .driver = {
 +              .name = "efi-framebuffer",
 +              .owner = THIS_MODULE,
        },
 +      .probe = efifb_probe,
  };
  
 -static struct platform_device efifb_device = {
 -      .name   = "efifb",
 -};
 -
 -static int __init efifb_init(void)
 -{
 -      int ret;
 -      char *option = NULL;
 -
 -      if (screen_info.orig_video_isVGA != VIDEO_TYPE_EFI ||
 -          !(screen_info.capabilities & VIDEO_CAPABILITY_SKIP_QUIRKS))
 -              dmi_check_system(dmi_system_table);
 -
 -      if (screen_info.orig_video_isVGA != VIDEO_TYPE_EFI)
 -              return -ENODEV;
 -
 -      if (fb_get_options("efifb", &option))
 -              return -ENODEV;
 -      efifb_setup(option);
 -
 -      /* We don't get linelength from UGA Draw Protocol, only from
 -       * EFI Graphics Protocol.  So if it's not in DMI, and it's not
 -       * passed in from the user, we really can't use the framebuffer.
 -       */
 -      if (!screen_info.lfb_linelength)
 -              return -ENODEV;
 -
 -      ret = platform_device_register(&efifb_device);
 -      if (ret)
 -              return ret;
 -
 -      /*
 -       * This is not just an optimization.  We will interfere
 -       * with a real driver if we get reprobed, so don't allow
 -       * it.
 -       */
 -      ret = platform_driver_probe(&efifb_driver, efifb_probe);
 -      if (ret) {
 -              platform_device_unregister(&efifb_device);
 -              return ret;
 -      }
 -
 -      return ret;
 -}
 -module_init(efifb_init);
 -
 +module_platform_driver(efifb_driver);
  MODULE_LICENSE("GPL");
diff --combined drivers/video/mxsfb.c
index dc09ebe4aba53d078881b28e123bc072142f423c,91269f6eab8d9320c9be28fa777199b3eeb9cf63..d250ed0f806d3bf66d858e9f633852f3baa58f4d
@@@ -46,7 -46,6 +46,6 @@@
  #include <linux/clk.h>
  #include <linux/dma-mapping.h>
  #include <linux/io.h>
- #include <linux/pinctrl/consumer.h>
  #include <linux/fb.h>
  #include <linux/regulator/consumer.h>
  #include <video/of_display_timing.h>
@@@ -239,6 -238,24 +238,6 @@@ static const struct fb_bitfield def_rgb
        }
  };
  
 -static const struct fb_bitfield def_rgb666[] = {
 -      [RED] = {
 -              .offset = 16,
 -              .length = 6,
 -      },
 -      [GREEN] = {
 -              .offset = 8,
 -              .length = 6,
 -      },
 -      [BLUE] = {
 -              .offset = 0,
 -              .length = 6,
 -      },
 -      [TRANSP] = {    /* no support for transparency */
 -              .length = 0,
 -      }
 -};
 -
  static const struct fb_bitfield def_rgb888[] = {
        [RED] = {
                .offset = 16,
@@@ -291,6 -308,9 +290,6 @@@ static int mxsfb_check_var(struct fb_va
                        break;
                case STMLCDIF_16BIT:
                case STMLCDIF_18BIT:
 -                      /* 24 bit to 18 bit mapping */
 -                      rgb = def_rgb666;
 -                      break;
                case STMLCDIF_24BIT:
                        /* real 24 bit */
                        rgb = def_rgb888;
@@@ -432,6 -452,11 +431,6 @@@ static int mxsfb_set_par(struct fb_inf
                        return -EINVAL;
                case STMLCDIF_16BIT:
                case STMLCDIF_18BIT:
 -                      /* 24 bit to 18 bit mapping */
 -                      ctrl |= CTRL_DF24; /* ignore the upper 2 bits in
 -                                          *  each colour component
 -                                          */
 -                      break;
                case STMLCDIF_24BIT:
                        /* real 24 bit */
                        break;
@@@ -851,18 -876,11 +850,11 @@@ static int mxsfb_probe(struct platform_
        struct mxsfb_info *host;
        struct fb_info *fb_info;
        struct fb_modelist *modelist;
-       struct pinctrl *pinctrl;
        int ret;
  
        if (of_id)
                pdev->id_entry = of_id->data;
  
-       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (!res) {
-               dev_err(&pdev->dev, "Cannot get memory IO resource\n");
-               return -ENODEV;
-       }
        fb_info = framebuffer_alloc(sizeof(struct mxsfb_info), &pdev->dev);
        if (!fb_info) {
                dev_err(&pdev->dev, "Failed to allocate fbdev\n");
  
        host = to_imxfb_host(fb_info);
  
+       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        host->base = devm_ioremap_resource(&pdev->dev, res);
        if (IS_ERR(host->base)) {
                ret = PTR_ERR(host->base);
  
        host->devdata = &mxsfb_devdata[pdev->id_entry->driver_data];
  
-       pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
-       if (IS_ERR(pinctrl)) {
-               ret = PTR_ERR(pinctrl);
-               goto fb_release;
-       }
        host->clk = devm_clk_get(&host->pdev->dev, NULL);
        if (IS_ERR(host->clk)) {
                ret = PTR_ERR(host->clk);
index 75f3c740ef8cd129b5f2da04fcbc7b286a2f8958,ea97854308f995dd97f8806cdf029028ea10222f..82a964074993f9d9c6f489c07e9a6413f5e9e86a
@@@ -66,6 -66,10 +66,6 @@@ static struct 
        struct clk *sys_clk;
        struct regulator *vdda_hdmi_dac_reg;
  
 -      int ct_cp_hpd_gpio;
 -      int ls_oe_gpio;
 -      int hpd_gpio;
 -
        bool core_enabled;
  
        struct omap_dss_device output;
@@@ -349,6 -353,40 +349,6 @@@ static int hdmi_init_regulator(void
        return 0;
  }
  
 -static int hdmi_init_display(struct omap_dss_device *dssdev)
 -{
 -      int r;
 -
 -      struct gpio gpios[] = {
 -              { hdmi.ct_cp_hpd_gpio, GPIOF_OUT_INIT_LOW, "hdmi_ct_cp_hpd" },
 -              { hdmi.ls_oe_gpio, GPIOF_OUT_INIT_LOW, "hdmi_ls_oe" },
 -              { hdmi.hpd_gpio, GPIOF_DIR_IN, "hdmi_hpd" },
 -      };
 -
 -      DSSDBG("init_display\n");
 -
 -      dss_init_hdmi_ip_ops(&hdmi.ip_data, omapdss_get_version());
 -
 -      r = hdmi_init_regulator();
 -      if (r)
 -              return r;
 -
 -      r = gpio_request_array(gpios, ARRAY_SIZE(gpios));
 -      if (r)
 -              return r;
 -
 -      return 0;
 -}
 -
 -static void hdmi_uninit_display(struct omap_dss_device *dssdev)
 -{
 -      DSSDBG("uninit_display\n");
 -
 -      gpio_free(hdmi.ct_cp_hpd_gpio);
 -      gpio_free(hdmi.ls_oe_gpio);
 -      gpio_free(hdmi.hpd_gpio);
 -}
 -
  static const struct hdmi_config *hdmi_find_timing(
                                        const struct hdmi_config *timings_arr,
                                        int len)
@@@ -479,9 -517,17 +479,9 @@@ static int hdmi_power_on_core(struct om
  {
        int r;
  
 -      if (gpio_is_valid(hdmi.ct_cp_hpd_gpio))
 -              gpio_set_value(hdmi.ct_cp_hpd_gpio, 1);
 -      if (gpio_is_valid(hdmi.ls_oe_gpio))
 -              gpio_set_value(hdmi.ls_oe_gpio, 1);
 -
 -      /* wait 300us after CT_CP_HPD for the 5V power output to reach 90% */
 -      udelay(300);
 -
        r = regulator_enable(hdmi.vdda_hdmi_dac_reg);
        if (r)
 -              goto err_vdac_enable;
 +              return r;
  
        r = hdmi_runtime_get();
        if (r)
  
  err_runtime_get:
        regulator_disable(hdmi.vdda_hdmi_dac_reg);
 -err_vdac_enable:
 -      if (gpio_is_valid(hdmi.ct_cp_hpd_gpio))
 -              gpio_set_value(hdmi.ct_cp_hpd_gpio, 0);
 -      if (gpio_is_valid(hdmi.ls_oe_gpio))
 -              gpio_set_value(hdmi.ls_oe_gpio, 0);
 +
        return r;
  }
  
@@@ -506,6 -556,10 +506,6 @@@ static void hdmi_power_off_core(struct 
  
        hdmi_runtime_put();
        regulator_disable(hdmi.vdda_hdmi_dac_reg);
 -      if (gpio_is_valid(hdmi.ct_cp_hpd_gpio))
 -              gpio_set_value(hdmi.ct_cp_hpd_gpio, 0);
 -      if (gpio_is_valid(hdmi.ls_oe_gpio))
 -              gpio_set_value(hdmi.ls_oe_gpio, 0);
  }
  
  static int hdmi_power_on_full(struct omap_dss_device *dssdev)
@@@ -586,7 -640,7 +586,7 @@@ static void hdmi_power_off_full(struct 
        hdmi_power_off_core(dssdev);
  }
  
 -int omapdss_hdmi_display_check_timing(struct omap_dss_device *dssdev,
 +static int hdmi_display_check_timing(struct omap_dss_device *dssdev,
                                        struct omap_video_timings *timings)
  {
        struct hdmi_cm cm;
  
  }
  
 -void omapdss_hdmi_display_set_timing(struct omap_dss_device *dssdev,
 +static void hdmi_display_set_timing(struct omap_dss_device *dssdev,
                struct omap_video_timings *timings)
  {
        struct hdmi_cm cm;
        hdmi.ip_data.cfg.cm = cm;
  
        t = hdmi_get_timings();
-       if (t != NULL)
+       if (t != NULL) {
                hdmi.ip_data.cfg = *t;
  
-       dispc_set_tv_pclk(t->timings.pixel_clock * 1000);
+               dispc_set_tv_pclk(t->timings.pixel_clock * 1000);
+       }
  
        mutex_unlock(&hdmi.lock);
  }
  
 -static void omapdss_hdmi_display_get_timings(struct omap_dss_device *dssdev,
 +static void hdmi_display_get_timings(struct omap_dss_device *dssdev,
                struct omap_video_timings *timings)
  {
        const struct hdmi_config *cfg;
@@@ -650,7 -705,7 +651,7 @@@ static void hdmi_dump_regs(struct seq_f
        mutex_unlock(&hdmi.lock);
  }
  
 -int omapdss_hdmi_read_edid(u8 *buf, int len)
 +static int read_edid(u8 *buf, int len)
  {
        int r;
  
        return r;
  }
  
 -bool omapdss_hdmi_detect(void)
 -{
 -      int r;
 -
 -      mutex_lock(&hdmi.lock);
 -
 -      r = hdmi_runtime_get();
 -      BUG_ON(r);
 -
 -      r = gpio_get_value(hdmi.hpd_gpio);
 -
 -      hdmi_runtime_put();
 -      mutex_unlock(&hdmi.lock);
 -
 -      return r == 1;
 -}
 -
 -int omapdss_hdmi_display_enable(struct omap_dss_device *dssdev)
 +static int hdmi_display_enable(struct omap_dss_device *dssdev)
  {
        struct omap_dss_device *out = &hdmi.output;
        int r = 0;
@@@ -696,7 -768,7 +697,7 @@@ err0
        return r;
  }
  
 -void omapdss_hdmi_display_disable(struct omap_dss_device *dssdev)
 +static void hdmi_display_disable(struct omap_dss_device *dssdev)
  {
        DSSDBG("Enter hdmi_display_disable\n");
  
        mutex_unlock(&hdmi.lock);
  }
  
 -int omapdss_hdmi_core_enable(struct omap_dss_device *dssdev)
 +static int hdmi_core_enable(struct omap_dss_device *dssdev)
  {
        int r = 0;
  
@@@ -729,7 -801,7 +730,7 @@@ err0
        return r;
  }
  
 -void omapdss_hdmi_core_disable(struct omap_dss_device *dssdev)
 +static void hdmi_core_disable(struct omap_dss_device *dssdev)
  {
        DSSDBG("Enter omapdss_hdmi_core_disable\n");
  
@@@ -856,7 -928,35 +857,7 @@@ int hdmi_compute_acr(u32 sample_freq, u
        return 0;
  }
  
 -int hdmi_audio_enable(void)
 -{
 -      DSSDBG("audio_enable\n");
 -
 -      return hdmi.ip_data.ops->audio_enable(&hdmi.ip_data);
 -}
 -
 -void hdmi_audio_disable(void)
 -{
 -      DSSDBG("audio_disable\n");
 -
 -      hdmi.ip_data.ops->audio_disable(&hdmi.ip_data);
 -}
 -
 -int hdmi_audio_start(void)
 -{
 -      DSSDBG("audio_start\n");
 -
 -      return hdmi.ip_data.ops->audio_start(&hdmi.ip_data);
 -}
 -
 -void hdmi_audio_stop(void)
 -{
 -      DSSDBG("audio_stop\n");
 -
 -      hdmi.ip_data.ops->audio_stop(&hdmi.ip_data);
 -}
 -
 -bool hdmi_mode_has_audio(void)
 +static bool hdmi_mode_has_audio(void)
  {
        if (hdmi.ip_data.cfg.cm.mode == HDMI_HDMI)
                return true;
                return false;
  }
  
 -int hdmi_audio_config(struct omap_dss_audio *audio)
 -{
 -      return hdmi.ip_data.ops->audio_config(&hdmi.ip_data, audio);
 -}
 -
  #endif
  
 -static struct omap_dss_device *hdmi_find_dssdev(struct platform_device *pdev)
 -{
 -      struct omap_dss_board_info *pdata = pdev->dev.platform_data;
 -      const char *def_disp_name = omapdss_get_default_display_name();
 -      struct omap_dss_device *def_dssdev;
 -      int i;
 -
 -      def_dssdev = NULL;
 -
 -      for (i = 0; i < pdata->num_devices; ++i) {
 -              struct omap_dss_device *dssdev = pdata->devices[i];
 -
 -              if (dssdev->type != OMAP_DISPLAY_TYPE_HDMI)
 -                      continue;
 -
 -              if (def_dssdev == NULL)
 -                      def_dssdev = dssdev;
 -
 -              if (def_disp_name != NULL &&
 -                              strcmp(dssdev->name, def_disp_name) == 0) {
 -                      def_dssdev = dssdev;
 -                      break;
 -              }
 -      }
 -
 -      return def_dssdev;
 -}
 -
 -static int hdmi_probe_pdata(struct platform_device *pdev)
 -{
 -      struct omap_dss_device *plat_dssdev;
 -      struct omap_dss_device *dssdev;
 -      struct omap_dss_hdmi_data *priv;
 -      int r;
 -
 -      plat_dssdev = hdmi_find_dssdev(pdev);
 -
 -      if (!plat_dssdev)
 -              return 0;
 -
 -      dssdev = dss_alloc_and_init_device(&pdev->dev);
 -      if (!dssdev)
 -              return -ENOMEM;
 -
 -      dss_copy_device_pdata(dssdev, plat_dssdev);
 -
 -      priv = dssdev->data;
 -
 -      hdmi.ct_cp_hpd_gpio = priv->ct_cp_hpd_gpio;
 -      hdmi.ls_oe_gpio = priv->ls_oe_gpio;
 -      hdmi.hpd_gpio = priv->hpd_gpio;
 -
 -      r = hdmi_init_display(dssdev);
 -      if (r) {
 -              DSSERR("device %s init failed: %d\n", dssdev->name, r);
 -              dss_put_device(dssdev);
 -              return r;
 -      }
 -
 -      r = omapdss_output_set_device(&hdmi.output, dssdev);
 -      if (r) {
 -              DSSERR("failed to connect output to new device: %s\n",
 -                              dssdev->name);
 -              dss_put_device(dssdev);
 -              return r;
 -      }
 -
 -      r = dss_add_device(dssdev);
 -      if (r) {
 -              DSSERR("device %s register failed: %d\n", dssdev->name, r);
 -              omapdss_output_unset_device(&hdmi.output);
 -              hdmi_uninit_display(dssdev);
 -              dss_put_device(dssdev);
 -              return r;
 -      }
 -
 -      return 0;
 -}
 -
  static int hdmi_connect(struct omap_dss_device *dssdev,
                struct omap_dss_device *dst)
  {
  static void hdmi_disconnect(struct omap_dss_device *dssdev,
                struct omap_dss_device *dst)
  {
 -      WARN_ON(dst != dssdev->device);
 +      WARN_ON(dst != dssdev->dst);
  
 -      if (dst != dssdev->device)
 +      if (dst != dssdev->dst)
                return;
  
        omapdss_output_unset_device(dssdev);
@@@ -920,21 -1104,21 +921,21 @@@ static int hdmi_read_edid(struct omap_d
        need_enable = hdmi.core_enabled == false;
  
        if (need_enable) {
 -              r = omapdss_hdmi_core_enable(dssdev);
 +              r = hdmi_core_enable(dssdev);
                if (r)
                        return r;
        }
  
 -      r = omapdss_hdmi_read_edid(edid, len);
 +      r = read_edid(edid, len);
  
        if (need_enable)
 -              omapdss_hdmi_core_disable(dssdev);
 +              hdmi_core_disable(dssdev);
  
        return r;
  }
  
  #if defined(CONFIG_OMAP4_DSS_HDMI_AUDIO)
 -static int omapdss_hdmi_audio_enable(struct omap_dss_device *dssdev)
 +static int hdmi_audio_enable(struct omap_dss_device *dssdev)
  {
        int r;
  
                goto err;
        }
  
 -      r = hdmi_audio_enable();
 +
 +      r = hdmi.ip_data.ops->audio_enable(&hdmi.ip_data);
        if (r)
                goto err;
  
@@@ -958,22 -1141,22 +959,22 @@@ err
        return r;
  }
  
 -static void omapdss_hdmi_audio_disable(struct omap_dss_device *dssdev)
 +static void hdmi_audio_disable(struct omap_dss_device *dssdev)
  {
 -      hdmi_audio_disable();
 +      hdmi.ip_data.ops->audio_disable(&hdmi.ip_data);
  }
  
 -static int omapdss_hdmi_audio_start(struct omap_dss_device *dssdev)
 +static int hdmi_audio_start(struct omap_dss_device *dssdev)
  {
 -      return hdmi_audio_start();
 +      return hdmi.ip_data.ops->audio_start(&hdmi.ip_data);
  }
  
 -static void omapdss_hdmi_audio_stop(struct omap_dss_device *dssdev)
 +static void hdmi_audio_stop(struct omap_dss_device *dssdev)
  {
 -      hdmi_audio_stop();
 +      hdmi.ip_data.ops->audio_stop(&hdmi.ip_data);
  }
  
 -static bool omapdss_hdmi_audio_supported(struct omap_dss_device *dssdev)
 +static bool hdmi_audio_supported(struct omap_dss_device *dssdev)
  {
        bool r;
  
        return r;
  }
  
 -static int omapdss_hdmi_audio_config(struct omap_dss_device *dssdev,
 +static int hdmi_audio_config(struct omap_dss_device *dssdev,
                struct omap_dss_audio *audio)
  {
        int r;
                goto err;
        }
  
 -      r = hdmi_audio_config(audio);
 +      r = hdmi.ip_data.ops->audio_config(&hdmi.ip_data, audio);
        if (r)
                goto err;
  
        return r;
  }
  #else
 -static int omapdss_hdmi_audio_enable(struct omap_dss_device *dssdev)
 +static int hdmi_audio_enable(struct omap_dss_device *dssdev)
  {
        return -EPERM;
  }
  
 -static void omapdss_hdmi_audio_disable(struct omap_dss_device *dssdev)
 +static void hdmi_audio_disable(struct omap_dss_device *dssdev)
  {
  }
  
 -static int omapdss_hdmi_audio_start(struct omap_dss_device *dssdev)
 +static int hdmi_audio_start(struct omap_dss_device *dssdev)
  {
        return -EPERM;
  }
  
 -static void omapdss_hdmi_audio_stop(struct omap_dss_device *dssdev)
 +static void hdmi_audio_stop(struct omap_dss_device *dssdev)
  {
  }
  
 -static bool omapdss_hdmi_audio_supported(struct omap_dss_device *dssdev)
 +static bool hdmi_audio_supported(struct omap_dss_device *dssdev)
  {
        return false;
  }
  
 -static int omapdss_hdmi_audio_config(struct omap_dss_device *dssdev,
 +static int hdmi_audio_config(struct omap_dss_device *dssdev,
                struct omap_dss_audio *audio)
  {
        return -EPERM;
@@@ -1043,21 -1226,21 +1044,21 @@@ static const struct omapdss_hdmi_ops hd
        .connect                = hdmi_connect,
        .disconnect             = hdmi_disconnect,
  
 -      .enable                 = omapdss_hdmi_display_enable,
 -      .disable                = omapdss_hdmi_display_disable,
 +      .enable                 = hdmi_display_enable,
 +      .disable                = hdmi_display_disable,
  
 -      .check_timings          = omapdss_hdmi_display_check_timing,
 -      .set_timings            = omapdss_hdmi_display_set_timing,
 -      .get_timings            = omapdss_hdmi_display_get_timings,
 +      .check_timings          = hdmi_display_check_timing,
 +      .set_timings            = hdmi_display_set_timing,
 +      .get_timings            = hdmi_display_get_timings,
  
        .read_edid              = hdmi_read_edid,
  
 -      .audio_enable           = omapdss_hdmi_audio_enable,
 -      .audio_disable          = omapdss_hdmi_audio_disable,
 -      .audio_start            = omapdss_hdmi_audio_start,
 -      .audio_stop             = omapdss_hdmi_audio_stop,
 -      .audio_supported        = omapdss_hdmi_audio_supported,
 -      .audio_config           = omapdss_hdmi_audio_config,
 +      .audio_enable           = hdmi_audio_enable,
 +      .audio_disable          = hdmi_audio_disable,
 +      .audio_start            = hdmi_audio_start,
 +      .audio_stop             = hdmi_audio_stop,
 +      .audio_supported        = hdmi_audio_supported,
 +      .audio_config           = hdmi_audio_config,
  };
  
  static void hdmi_init_output(struct platform_device *pdev)
@@@ -1119,15 -1302,50 +1120,15 @@@ static int omapdss_hdmihw_probe(struct 
        hdmi.ip_data.pll_offset = HDMI_PLLCTRL;
        hdmi.ip_data.phy_offset = HDMI_PHY;
  
 -      hdmi.ct_cp_hpd_gpio = -1;
 -      hdmi.ls_oe_gpio = -1;
 -      hdmi.hpd_gpio = -1;
 -
        hdmi_init_output(pdev);
  
 -      r = hdmi_panel_init();
 -      if (r) {
 -              DSSERR("can't init panel\n");
 -              return r;
 -      }
 -
        dss_debugfs_create_file("hdmi", hdmi_dump_regs);
  
 -      if (pdev->dev.platform_data) {
 -              r = hdmi_probe_pdata(pdev);
 -              if (r)
 -                      goto err_probe;
 -      }
 -
 -      return 0;
 -
 -err_probe:
 -      hdmi_panel_exit();
 -      hdmi_uninit_output(pdev);
 -      pm_runtime_disable(&pdev->dev);
 -      return r;
 -}
 -
 -static int __exit hdmi_remove_child(struct device *dev, void *data)
 -{
 -      struct omap_dss_device *dssdev = to_dss_device(dev);
 -      hdmi_uninit_display(dssdev);
        return 0;
  }
  
  static int __exit omapdss_hdmihw_remove(struct platform_device *pdev)
  {
 -      device_for_each_child(&pdev->dev, NULL, hdmi_remove_child);
 -
 -      dss_unregister_child_devices(&pdev->dev);
 -
 -      hdmi_panel_exit();
 -
        hdmi_uninit_output(pdev);
  
        pm_runtime_disable(&pdev->dev);
diff --combined drivers/video/xilinxfb.c
index 6629b29a820221eedfe774a1cd4c62163bd29bb1,236fd42370dbb3dafeb61bde7ad57e30881c363d..84c664ea8eb9d014e101f3d22f614352cde306ef
@@@ -259,12 -259,12 +259,12 @@@ static int xilinxfb_assign(struct platf
                struct resource *res;
  
                res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-               drvdata->regs_phys = res->start;
-               drvdata->regs = devm_request_and_ioremap(&pdev->dev, res);
-               if (!drvdata->regs) {
-                       rc = -EADDRNOTAVAIL;
+               drvdata->regs = devm_ioremap_resource(&pdev->dev, res);
+               if (IS_ERR(drvdata->regs)) {
+                       rc = PTR_ERR(drvdata->regs);
                        goto err_region;
                }
+               drvdata->regs_phys = res->start;
        }
  
        /* Allocate the framebuffer memory */
  
        if (drvdata->flags & BUS_ACCESS_FLAG) {
                /* Put a banner in the log (for DEBUG) */
 -              dev_dbg(dev, "regs: phys=%x, virt=%p\n", drvdata->regs_phys,
 -                                      drvdata->regs);
 +              dev_dbg(dev, "regs: phys=%pa, virt=%p\n",
 +                      &drvdata->regs_phys, drvdata->regs);
        }
        /* Put a banner in the log (for DEBUG) */
        dev_dbg(dev, "fb: phys=%llx, virt=%p, size=%x\n",
index 53774b0cd8e9d50aaa15a13fd65298ba3e700d8a,0000000000000000000000000000000000000000..077303cedbf45b7ea8f311a56dc91eadf1526a0b
mode 100644,000000..100644
--- /dev/null
@@@ -1,63 -1,0 +1,64 @@@
 +/*
 + * simplefb.h - Simple Framebuffer Device
 + *
 + * Copyright (C) 2013 David Herrmann <dh.herrmann@gmail.com>
 + *
 + * This program is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
 + * the Free Software Foundation; either version 2 of the License, or
 + * (at your option) any later version.
 + */
 +
 +#ifndef __PLATFORM_DATA_SIMPLEFB_H__
 +#define __PLATFORM_DATA_SIMPLEFB_H__
 +
 +#include <drm/drm_fourcc.h>
 +#include <linux/fb.h>
 +#include <linux/kernel.h>
 +
 +/* format array, use it to initialize a "struct simplefb_format" array */
 +#define SIMPLEFB_FORMATS \
 +{ \
 +      { "r5g6b5", 16, {11, 5}, {5, 6}, {0, 5}, {0, 0}, DRM_FORMAT_RGB565 }, \
 +      { "x1r5g5b5", 16, {10, 5}, {5, 5}, {0, 5}, {0, 0}, DRM_FORMAT_XRGB1555 }, \
 +      { "a1r5g5b5", 16, {10, 5}, {5, 5}, {0, 5}, {15, 1}, DRM_FORMAT_ARGB1555 }, \
 +      { "r8g8b8", 24, {16, 8}, {8, 8}, {0, 8}, {0, 0}, DRM_FORMAT_RGB888 }, \
 +      { "x8r8g8b8", 32, {16, 8}, {8, 8}, {0, 8}, {0, 0}, DRM_FORMAT_XRGB8888 }, \
 +      { "a8r8g8b8", 32, {16, 8}, {8, 8}, {0, 8}, {24, 8}, DRM_FORMAT_ARGB8888 }, \
++      { "a8b8g8r8", 32, {0, 8}, {8, 8}, {16, 8}, {24, 8}, DRM_FORMAT_ABGR8888 }, \
 +      { "x2r10g10b10", 32, {20, 10}, {10, 10}, {0, 10}, {0, 0}, DRM_FORMAT_XRGB2101010 }, \
 +      { "a2r10g10b10", 32, {20, 10}, {10, 10}, {0, 10}, {30, 2}, DRM_FORMAT_ARGB2101010 }, \
 +}
 +
 +/*
 + * Data-Format for Simple-Framebuffers
 + * @name: unique 0-terminated name that can be used to identify the mode
 + * @red,green,blue: Offsets and sizes of the single RGB parts
 + * @transp: Offset and size of the alpha bits. length=0 means no alpha
 + * @fourcc: 32bit DRM four-CC code (see drm_fourcc.h)
 + */
 +struct simplefb_format {
 +      const char *name;
 +      u32 bits_per_pixel;
 +      struct fb_bitfield red;
 +      struct fb_bitfield green;
 +      struct fb_bitfield blue;
 +      struct fb_bitfield transp;
 +      u32 fourcc;
 +};
 +
 +/*
 + * Simple-Framebuffer description
 + * If the arch-boot code creates simple-framebuffers without DT support, it
 + * can pass the width, height, stride and format via this platform-data object.
 + * The framebuffer location must be given as IORESOURCE_MEM resource.
 + * @format must be a format as described in "struct simplefb_format" above.
 + */
 +struct simplefb_platform_data {
 +      u32 width;
 +      u32 height;
 +      u32 stride;
 +      const char *format;
 +};
 +
 +#endif /* __PLATFORM_DATA_SIMPLEFB_H__ */