···1010 * for more details.1111 */12121313-/*1414- * These are the bitfields for each1515- * display depth that we support.1616- */1717-struct sa1100fb_rgb {1818- struct fb_bitfield red;1919- struct fb_bitfield green;2020- struct fb_bitfield blue;2121- struct fb_bitfield transp;2222-};2323-2424-/*2525- * This structure describes the machine which we are running on.2626- */2727-struct sa1100fb_mach_info {2828- u_long pixclock;2929-3030- u_short xres;3131- u_short yres;3232-3333- u_char bpp;3434- u_char hsync_len;3535- u_char left_margin;3636- u_char right_margin;3737-3838- u_char vsync_len;3939- u_char upper_margin;4040- u_char lower_margin;4141- u_char sync;4242-4343- u_int cmap_greyscale:1,4444- cmap_inverse:1,4545- cmap_static:1,4646- unused:29;4747-4848- u_int lccr0;4949- u_int lccr3;5050-};1313+#define LCCR0 0x0000 /* LCD Control Reg. 0 */1414+#define LCSR 0x0004 /* LCD Status Reg. */1515+#define DBAR1 0x0010 /* LCD DMA Base Address Reg. channel 1 */1616+#define DCAR1 0x0014 /* LCD DMA Current Address Reg. channel 1 */1717+#define DBAR2 0x0018 /* LCD DMA Base Address Reg. channel 2 */1818+#define DCAR2 0x001C /* LCD DMA Current Address Reg. channel 2 */1919+#define LCCR1 0x0020 /* LCD Control Reg. 1 */2020+#define LCCR2 0x0024 /* LCD Control Reg. 2 */2121+#define LCCR3 0x0028 /* LCD Control Reg. 3 */51225223/* Shadows for LCD controller registers */5324struct sa1100fb_lcd_reg {···2857 unsigned long lccr3;2958};30593131-#define RGB_4 (0)3232-#define RGB_8 (1)3333-#define RGB_16 (2)3434-#define NR_RGB 33535-3660struct sa1100fb_info {3761 struct fb_info fb;3862 struct device *dev;3939- struct sa1100fb_rgb *rgb[NR_RGB];4040-4141- u_int max_bpp;4242- u_int max_xres;4343- u_int max_yres;6363+ const struct sa1100fb_rgb *rgb[NR_RGB];6464+ void __iomem *base;44654566 /*4667 * These are the addresses we mapped···5188 dma_addr_t dbar1;5289 dma_addr_t dbar2;53905454- u_int lccr0;5555- u_int lccr3;5656- u_int cmap_inverse:1,5757- cmap_static:1,5858- unused:30;5959-6091 u_int reg_lccr0;6192 u_int reg_lccr1;6293 u_int reg_lccr2;···66109 struct notifier_block freq_transition;67110 struct notifier_block freq_policy;68111#endif112112+113113+ const struct sa1100fb_mach_info *inf;69114};7011571116#define TO_INF(ptr,member) container_of(ptr,struct sa1100fb_info,member)···87128#define C_STARTUP (7)8812989130#define SA1100_NAME "SA1100"9090-9191-/*9292- * Debug macros 9393- */9494-#if DEBUG9595-# define DPRINTK(fmt, args...) printk("%s: " fmt, __func__ , ## args)9696-#else9797-# define DPRINTK(fmt, args...)9898-#endif99131100132/*101133 * Minimum X and Y resolutions
+63
include/video/sa1100fb.h
···11+/*22+ * StrongARM 1100 LCD Controller Frame Buffer Device33+ *44+ * Copyright (C) 1999 Eric A. Thomas55+ * Based on acornfb.c Copyright (C) Russell King.66+ * 77+ * This file is subject to the terms and conditions of the GNU General Public88+ * License. See the file COPYING in the main directory of this archive99+ * for more details.1010+ */1111+#ifndef _VIDEO_SA1100FB_H1212+#define _VIDEO_SA1100FB_H1313+1414+#include <linux/fb.h>1515+#include <linux/types.h>1616+1717+#define RGB_4 01818+#define RGB_8 11919+#define RGB_16 22020+#define NR_RGB 32121+2222+/* These are the bitfields for each display depth that we support. */2323+struct sa1100fb_rgb {2424+ struct fb_bitfield red;2525+ struct fb_bitfield green;2626+ struct fb_bitfield blue;2727+ struct fb_bitfield transp;2828+};2929+3030+/* This structure describes the machine which we are running on. */3131+struct sa1100fb_mach_info {3232+ u_long pixclock;3333+3434+ u_short xres;3535+ u_short yres;3636+3737+ u_char bpp;3838+ u_char hsync_len;3939+ u_char left_margin;4040+ u_char right_margin;4141+4242+ u_char vsync_len;4343+ u_char upper_margin;4444+ u_char lower_margin;4545+ u_char sync;4646+4747+ u_int cmap_greyscale:1,4848+ cmap_inverse:1,4949+ cmap_static:1,5050+ unused:29;5151+5252+ u_int lccr0;5353+ u_int lccr3;5454+5555+ /* Overrides for the default RGB maps */5656+ const struct sa1100fb_rgb *rgb[NR_RGB];5757+5858+ void (*backlight_power)(int);5959+ void (*lcd_power)(int);6060+ void (*set_visual)(u32);6161+};6262+6363+#endif