2 * Copyright (C) 2011 Matrix Vision GmbH
3 * Andre Schwarz <andre.schwarz@matrix-vision.de>
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
20 #include "../common/mv_common.h"
23 static const SMI_REGS init_regs_800x480[] = {
24 /* set endianess to little endian */
25 {0x0005c, 0x00000000},
27 {0x00004, 0x42401001},
29 {0x0003c, 0x310a1818},
30 /* clocks for pm0... */
31 {0x00040, 0x0002184f},
32 {0x00044, 0x2a1a0a01},
34 {0x10008, 0x00000000},
35 {0x1000C, 0x00000000},
36 /* panel control regs */
37 {0x80000, 0x0f017106},
40 {0x8000C, 0x00000000},
41 {0x80010, 0x0c800c80},
43 {0x80014, 0x03200000},
45 {0x80018, 0x01E00000},
47 {0x80020, 0x01df031f},
48 {0x80024, 0x041f031f},
49 {0x80028, 0x00800347},
50 {0x8002C, 0x020c01df},
51 {0x80030, 0x000201e9},
52 {0x80200, 0x00000000},
54 {0x00008, 0x00ff0000},
56 {0x0000c, 0x3f000000},
61 * Returns SM107 register base address. First thing called in the driver.
63 unsigned int board_video_init(void)
68 devbusfn = pci_find_device(PCI_VENDOR_SM, PCI_DEVICE_SM501, 0);
70 pci_read_config_dword(devbusfn, PCI_BASE_ADDRESS_1,
72 return addr & 0xfffffffe;
79 * Called after initializing the SM501 and before clearing the screen.
81 void board_validate_screen(unsigned int base)
86 * Returns SM107 framebuffer address
88 unsigned int board_video_get_fb(void)
93 devbusfn = pci_find_device(PCI_VENDOR_SM, PCI_DEVICE_SM501, 0);
95 pci_read_config_dword(devbusfn, PCI_BASE_ADDRESS_0,
98 #ifdef CONFIG_VIDEO_SM501_FBMEM_OFFSET
99 addr += CONFIG_VIDEO_SM501_FBMEM_OFFSET;
104 printf("board_video_get_fb(): FAILED\n");
110 * Return a pointer to the initialization sequence.
112 const SMI_REGS *board_get_regs(void)
114 return init_regs_800x480;
117 int board_get_width(void)
122 int board_get_height(void)