1 | //============================================================================= |
---|
2 | // |
---|
3 | // cpuio.h |
---|
4 | // |
---|
5 | // CPU/Board Specific IO |
---|
6 | // |
---|
7 | // Author(s): Luis Torrico, Cogent Computer Systems, Inc. |
---|
8 | // Date: 05-16-2008 |
---|
9 | // Description: This file contains the IO functions required by Micro Monitor |
---|
10 | // that are unique to each CPU/Board combination |
---|
11 | // |
---|
12 | // |
---|
13 | // cpuio.h for the CSB740 OMAP3530 Cortex-A8 |
---|
14 | // |
---|
15 | //============================================================================= |
---|
16 | |
---|
17 | // board specific defines for micro monitor |
---|
18 | #define DEFAULT_BAUD_RATE 38400 |
---|
19 | #define MON_CPU_CLOCK 400000000 |
---|
20 | |
---|
21 | #define LOOPS_PER_USEC 5 |
---|
22 | |
---|
23 | #define BASE_OF_NAND 0x1000 |
---|
24 | #define SIZE_OF_NAND 0x100000 |
---|
25 | |
---|
26 | // SMSC LAN9211 Ethernet |
---|
27 | #define SMSC911X_BASE_ADDRESS 0x2C000000 // CS4 on OMAP3530 but we call it CS2 |
---|
28 | |
---|
29 | // LCD Defines |
---|
30 | // |
---|
31 | // The LCD frame buffer is fixed at 0x80200000, which is 2Mbyte from the |
---|
32 | // beginning of SDRAM space. Note that we access it 16-bits at a time. |
---|
33 | |
---|
34 | #define LCD_BUF_ADD 0x80200000 |
---|
35 | #define LCD_BUF(_x_) *(vushort *)(LCD_BUF_ADD + _x_) // Frame Buffer |
---|
36 | #define USE_FONT8X8 |
---|
37 | #define LCD_GET_PIXEL_ADD(_X_, _Y_) (((_Y_ * PIXELS_PER_ROW) + _X_)*2) |
---|
38 | |
---|
39 | // defines for the display geometry - OSD043TN24 480x272 TFT |
---|
40 | // (some of these defines are also used by uMon's frame buffer interface) |
---|
41 | #define PIXELS_PER_ROW 480 // |
---|
42 | #define PIXELS_PER_COL 272 // |
---|
43 | #define BITS_PER_PIXEL 16 // |
---|
44 | #define PIXFMT_IS_RGB565 1 |
---|
45 | #define FBDEV_SETSTART fbdev_setstart |
---|
46 | #define FRAME_BUFFER_BASE_ADDR LCD_BUF_ADD |
---|
47 | #define LCD_H_WIDTH 41 // pulse width in pixels |
---|
48 | #define LCD_H_FRONT 2 // front porch (sync to enable) |
---|
49 | #define LCD_H_BACK 2 // back porch (enable to sync) |
---|
50 | #define LCD_V_WIDTH 10 // pulse width in lines |
---|
51 | #define LCD_V_FRONT 2 // front porch (sync to enable) |
---|
52 | #define LCD_V_BACK 2 // back porch (enable to sync) |
---|
53 | //#define LCD_PCD 2 // LCD PERCLK3 = 32Mhz/PCD +1 = Pixel Clock ~ 4Mhz |
---|
54 | |
---|
55 | #define TOP 1 |
---|
56 | #define BOTTOM (PIXELS_PER_COL-1) |
---|
57 | #define LEFT 0 |
---|
58 | #define RIGHT (PIXELS_PER_ROW-1) |
---|
59 | #define CENTER_X (PIXELS_PER_ROW/2) |
---|
60 | #define CENTER_Y (PIXELS_PER_COL/2) |
---|
61 | |
---|
62 | #define ROWS_PER_SCREEN 17 |
---|
63 | #define COLS_PER_SCREEN 60 |
---|
64 | |
---|
65 | #define LCD_BG_DEF 9 |
---|
66 | #define LCD_FG_DEF 15 |
---|
67 | |
---|
68 | #define LCD_FB_SIZE(_depth_) (((PIXELS_PER_COL * PIXELS_PER_ROW) * _depth_) / 8) |
---|
69 | |
---|
70 | #define LCD_ROW_SIZE(_depth_) ((PIXELS_PER_ROW * _depth_) / 8) |
---|
71 | |
---|
72 | #define LCD_GET_ADD(_row_, _col_, _depth_) (((((_row_ * PIXELS_PER_ROW) * FONT_HEIGHT) \ |
---|
73 | + (_col_ * FONT_WIDTH)) \ |
---|
74 | * _depth_) / 8) |
---|
75 | |
---|
76 | |
---|