2 * Copyright (C) 2011 Matrix Vision GmbH
3 * Andre Schwarz <andre.schwarz@matrix-vision.de>
5 * SPDX-License-Identifier: GPL-2.0+
14 #include "../common/mv_common.h"
17 static const SMI_REGS init_regs_800x480[] = {
18 /* set endianess to little endian */
19 {0x0005c, 0x00000000},
21 {0x00004, 0x42401001},
23 {0x0003c, 0x310a1818},
24 /* clocks for pm0... */
25 {0x00040, 0x0002184f},
26 {0x00044, 0x2a1a0a01},
28 {0x10008, 0x00000000},
29 {0x1000C, 0x00000000},
30 /* panel control regs */
31 {0x80000, 0x0f017106},
34 {0x8000C, 0x00000000},
35 {0x80010, 0x0c800c80},
37 {0x80014, 0x03200000},
39 {0x80018, 0x01E00000},
41 {0x80020, 0x01df031f},
42 {0x80024, 0x041f031f},
43 {0x80028, 0x00800347},
44 {0x8002C, 0x020c01df},
45 {0x80030, 0x000201e9},
46 {0x80200, 0x00000000},
48 {0x00008, 0x00ff0000},
50 {0x0000c, 0x3f000000},
55 * Returns SM107 register base address. First thing called in the driver.
57 unsigned int board_video_init(void)
62 devbusfn = pci_find_device(PCI_VENDOR_SM, PCI_DEVICE_SM501, 0);
64 pci_read_config_dword(devbusfn, PCI_BASE_ADDRESS_1,
66 return addr & 0xfffffffe;
73 * Called after initializing the SM501 and before clearing the screen.
75 void board_validate_screen(unsigned int base)
80 * Returns SM107 framebuffer address
82 unsigned int board_video_get_fb(void)
87 devbusfn = pci_find_device(PCI_VENDOR_SM, PCI_DEVICE_SM501, 0);
89 pci_read_config_dword(devbusfn, PCI_BASE_ADDRESS_0,
92 #ifdef CONFIG_VIDEO_SM501_FBMEM_OFFSET
93 addr += CONFIG_VIDEO_SM501_FBMEM_OFFSET;
98 printf("board_video_get_fb(): FAILED\n");
104 * Return a pointer to the initialization sequence.
106 const SMI_REGS *board_get_regs(void)
108 return init_regs_800x480;
111 int board_get_width(void)
116 int board_get_height(void)