forked from len0rd/rockbox
Remove last few inw/outw uses in the M:Robe port
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15712 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6675e427d4
commit
95ef859fac
3 changed files with 79 additions and 81 deletions
|
|
@ -227,71 +227,71 @@
|
|||
#define IO_DSPC_HPIB_STATUS 0x0602
|
||||
|
||||
/* OSD Controller */
|
||||
#define IO_OSD_MODE 0x0680
|
||||
#define IO_OSD_VIDWINMD 0x0682
|
||||
#define IO_OSD_OSDWINMD0 0x0684
|
||||
#define IO_OSD_OSDWINMD1 0x0686
|
||||
#define IO_OSD_ATRMD 0x0688
|
||||
#define IO_OSD_RECTCUR 0x0688
|
||||
#define IO_OSD_RESERVED 0x068A
|
||||
#define IO_OSD_VIDWIN0OFST 0x068C
|
||||
#define IO_OSD_VIDWIN1OFST 0x068E
|
||||
#define IO_OSD_OSDWIN0OFST 0x0690
|
||||
#define IO_OSD_OSDWIN1OFST 0x0692
|
||||
#define IO_OSD_VIDWINADH 0x0694
|
||||
#define IO_OSD_VIDWIN0ADL 0x0696
|
||||
#define IO_OSD_VIDWIN1ADL 0x0698
|
||||
#define IO_OSD_OSDWINADH 0x069A
|
||||
#define IO_OSD_OSDWIN0ADL 0x069C
|
||||
#define IO_OSD_OSDWIN1ADL 0x069E
|
||||
#define IO_OSD_BASEPX 0x06A0
|
||||
#define IO_OSD_BASEPY 0x06A2
|
||||
#define IO_OSD_VIDWIN0XP 0x06A4
|
||||
#define IO_OSD_VIDWIN0YP 0x06A6
|
||||
#define IO_OSD_VIDWIN0XL 0x06A8
|
||||
#define IO_OSD_VIDWIN0YL 0x06AA
|
||||
#define IO_OSD_VIDWIN1XP 0x06AC
|
||||
#define IO_OSD_VIDWIN1YP 0x06AE
|
||||
#define IO_OSD_VIDWIN1XL 0x06B0
|
||||
#define IO_OSD_VIDWIN1YL 0x06B2
|
||||
#define IO_OSD_MODE DM320_REG(0x0680)
|
||||
#define IO_OSD_VIDWINMD DM320_REG(0x0682)
|
||||
#define IO_OSD_OSDWINMD0 DM320_REG(0x0684)
|
||||
#define IO_OSD_OSDWINMD1 DM320_REG(0x0686)
|
||||
#define IO_OSD_ATRMD DM320_REG(0x0688)
|
||||
#define IO_OSD_RECTCUR DM320_REG(0x0688)
|
||||
#define IO_OSD_RESERVED DM320_REG(0x068A)
|
||||
#define IO_OSD_VIDWIN0OFST DM320_REG(0x068C)
|
||||
#define IO_OSD_VIDWIN1OFST DM320_REG(0x068E)
|
||||
#define IO_OSD_OSDWIN0OFST DM320_REG(0x0690)
|
||||
#define IO_OSD_OSDWIN1OFST DM320_REG(0x0692)
|
||||
#define IO_OSD_VIDWINADH DM320_REG(0x0694)
|
||||
#define IO_OSD_VIDWIN0ADL DM320_REG(0x0696)
|
||||
#define IO_OSD_VIDWIN1ADL DM320_REG(0x0698)
|
||||
#define IO_OSD_OSDWINADH DM320_REG(0x069A)
|
||||
#define IO_OSD_OSDWIN0ADL DM320_REG(0x069C)
|
||||
#define IO_OSD_OSDWIN1ADL DM320_REG(0x069E)
|
||||
#define IO_OSD_BASEPX DM320_REG(0x06A0)
|
||||
#define IO_OSD_BASEPY DM320_REG(0x06A2)
|
||||
#define IO_OSD_VIDWIN0XP DM320_REG(0x06A4)
|
||||
#define IO_OSD_VIDWIN0YP DM320_REG(0x06A6)
|
||||
#define IO_OSD_VIDWIN0XL DM320_REG(0x06A8)
|
||||
#define IO_OSD_VIDWIN0YL DM320_REG(0x06AA)
|
||||
#define IO_OSD_VIDWIN1XP DM320_REG(0x06AC)
|
||||
#define IO_OSD_VIDWIN1YP DM320_REG(0x06AE)
|
||||
#define IO_OSD_VIDWIN1XL DM320_REG(0x06B0)
|
||||
#define IO_OSD_VIDWIN1YL DM320_REG(0x06B2)
|
||||
|
||||
#define IO_OSD_OSDWIN0XP 0x06B4
|
||||
#define IO_OSD_OSDWIN0YP 0x06B6
|
||||
#define IO_OSD_OSDWIN0XL 0x06B8
|
||||
#define IO_OSD_OSDWIN0YL 0x06BA
|
||||
#define IO_OSD_OSDWIN1XP 0x06BC
|
||||
#define IO_OSD_OSDWIN1YP 0x06BE
|
||||
#define IO_OSD_OSDWIN1XL 0x06C0
|
||||
#define IO_OSD_OSDWIN1YL 0x06C2
|
||||
#define IO_OSD_CURXP 0x06C4
|
||||
#define IO_OSD_CURYP 0x06C6
|
||||
#define IO_OSD_CURXL 0x06C8
|
||||
#define IO_OSD_CURYL 0x06CA
|
||||
#define IO_OSD_OSDWIN0XP DM320_REG(0x06B4)
|
||||
#define IO_OSD_OSDWIN0YP DM320_REG(0x06B6)
|
||||
#define IO_OSD_OSDWIN0XL DM320_REG(0x06B8)
|
||||
#define IO_OSD_OSDWIN0YL DM320_REG(0x06BA)
|
||||
#define IO_OSD_OSDWIN1XP DM320_REG(0x06BC)
|
||||
#define IO_OSD_OSDWIN1YP DM320_REG(0x06BE)
|
||||
#define IO_OSD_OSDWIN1XL DM320_REG(0x06C0)
|
||||
#define IO_OSD_OSDWIN1YL DM320_REG(0x06C2)
|
||||
#define IO_OSD_CURXP DM320_REG(0x06C4)
|
||||
#define IO_OSD_CURYP DM320_REG(0x06C6)
|
||||
#define IO_OSD_CURXL DM320_REG(0x06C8)
|
||||
#define IO_OSD_CURYL DM320_REG(0x06CA)
|
||||
|
||||
#define IO_OSD_W0BMP01 0x06D0
|
||||
#define IO_OSD_W0BMP23 0x06D2
|
||||
#define IO_OSD_W0BMP45 0x06D4
|
||||
#define IO_OSD_W0BMP67 0x06D6
|
||||
#define IO_OSD_W0BMP89 0x06D8
|
||||
#define IO_OSD_W0BMPAB 0x06DA
|
||||
#define IO_OSD_W0BMPCD 0x06DC
|
||||
#define IO_OSD_W0BMPEF 0x06DE
|
||||
#define IO_OSD_W0BMP01 DM320_REG(0x06D0)
|
||||
#define IO_OSD_W0BMP23 DM320_REG(0x06D2)
|
||||
#define IO_OSD_W0BMP45 DM320_REG(0x06D4)
|
||||
#define IO_OSD_W0BMP67 DM320_REG(0x06D6)
|
||||
#define IO_OSD_W0BMP89 DM320_REG(0x06D8)
|
||||
#define IO_OSD_W0BMPAB DM320_REG(0x06DA)
|
||||
#define IO_OSD_W0BMPCD DM320_REG(0x06DC)
|
||||
#define IO_OSD_W0BMPEF DM320_REG(0x06DE)
|
||||
|
||||
#define IO_OSD_W1BMP01 0x06E0
|
||||
#define IO_OSD_W1BMP23 0x06E2
|
||||
#define IO_OSD_W1BMP45 0x06E4
|
||||
#define IO_OSD_W1BMP67 0x06E6
|
||||
#define IO_OSD_W1BMP89 0x06E8
|
||||
#define IO_OSD_W1BMPAB 0x06EA
|
||||
#define IO_OSD_W1BMPCD 0x06EC
|
||||
#define IO_OSD_W1BMPEF 0x06EE
|
||||
#define IO_OSD_W1BMP01 DM320_REG(0x06E0)
|
||||
#define IO_OSD_W1BMP23 DM320_REG(0x06E2)
|
||||
#define IO_OSD_W1BMP45 DM320_REG(0x06E4)
|
||||
#define IO_OSD_W1BMP67 DM320_REG(0x06E6)
|
||||
#define IO_OSD_W1BMP89 DM320_REG(0x06E8)
|
||||
#define IO_OSD_W1BMPAB DM320_REG(0x06EA)
|
||||
#define IO_OSD_W1BMPCD DM320_REG(0x06EC)
|
||||
#define IO_OSD_W1BMPEF DM320_REG(0x06EE)
|
||||
|
||||
#define IO_OSD_MISCCTL 0x06F4
|
||||
#define IO_OSD_CLUTRAMYCB 0x06F6
|
||||
#define IO_OSD_CLUTRAMCR 0x06F8
|
||||
#define IO_OSD_MISCCTL DM320_REG(0x06F4)
|
||||
#define IO_OSD_CLUTRAMYCB DM320_REG(0x06F6)
|
||||
#define IO_OSD_CLUTRAMCR DM320_REG(0x06F8)
|
||||
|
||||
#define IO_OSD_PPWIN0ADH 0x06FC
|
||||
#define IO_OSD_PPWIN0ADL 0x06FE
|
||||
#define IO_OSD_PPWIN0ADH DM320_REG(0x06FC)
|
||||
#define IO_OSD_PPWIN0ADL DM320_REG(0x06FE)
|
||||
|
||||
|
||||
/* CCD Controller */
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
#include "kernel.h"
|
||||
#include "memory.h"
|
||||
#include "system-target.h"
|
||||
#include "lcd-target.h"
|
||||
|
||||
/* Copies a rectangle from one framebuffer to another. Can be used in
|
||||
single transfer mode with width = num pixels, and height = 1 which
|
||||
|
|
@ -57,25 +58,25 @@ void lcd_init_device(void)
|
|||
/* Clear the Frame */
|
||||
memset16(FRAME, 0x0000, LCD_WIDTH*LCD_HEIGHT);
|
||||
|
||||
outw(0x00ff, IO_OSD_MODE);
|
||||
outw(0x0002, IO_OSD_VIDWINMD);
|
||||
outw(0x2001, IO_OSD_OSDWINMD0);
|
||||
outw(0x0002, IO_OSD_OSDWINMD1);
|
||||
outw(0x0000, IO_OSD_ATRMD);
|
||||
outw(0x0000, IO_OSD_RECTCUR);
|
||||
IO_OSD_MODE=0x00ff;
|
||||
IO_OSD_VIDWINMD=0x0002;
|
||||
IO_OSD_OSDWINMD0=0x2001;
|
||||
IO_OSD_OSDWINMD1=0x0002;
|
||||
IO_OSD_ATRMD=0x0000;
|
||||
IO_OSD_RECTCUR=0x0000;
|
||||
|
||||
outw((480*2) / 32, IO_OSD_OSDWIN0OFST);
|
||||
IO_OSD_OSDWIN0OFST=(480*2) / 32;
|
||||
addr = ((int)FRAME-CONFIG_SDRAM_START) / 32;
|
||||
outw(addr >> 16, IO_OSD_OSDWINADH);
|
||||
outw(addr & 0xFFFF, IO_OSD_OSDWIN0ADL);
|
||||
IO_OSD_OSDWINADH=addr >> 16;
|
||||
IO_OSD_OSDWIN0ADL=addr & 0xFFFF;
|
||||
|
||||
outw(80, IO_OSD_BASEPX);
|
||||
outw(2, IO_OSD_BASEPY);
|
||||
IO_OSD_BASEPX=80;
|
||||
IO_OSD_BASEPY=2;
|
||||
|
||||
outw(0, IO_OSD_OSDWIN0XP);
|
||||
outw(0, IO_OSD_OSDWIN0YP);
|
||||
outw(480, IO_OSD_OSDWIN0XL);
|
||||
outw(640, IO_OSD_OSDWIN0YL);
|
||||
IO_OSD_OSDWIN0XP=0;
|
||||
IO_OSD_OSDWIN0YP=0;
|
||||
IO_OSD_OSDWIN0XL=480;
|
||||
IO_OSD_OSDWIN0YL=640;
|
||||
}
|
||||
|
||||
/* Update a fraction of the display. */
|
||||
|
|
@ -168,7 +169,7 @@ void lcd_yuv_blit(unsigned char * const src[3],
|
|||
{
|
||||
/* Caches for chroma data so it only need be recaculated every other
|
||||
line */
|
||||
/* unsigned char chroma_buf[LCD_HEIGHT/2*3];*/ /* 480 bytes */
|
||||
unsigned char chroma_buf[LCD_HEIGHT/2*3]; /* 480 bytes */
|
||||
unsigned char const * yuv_src[3];
|
||||
off_t z;
|
||||
|
||||
|
|
@ -188,9 +189,9 @@ void lcd_yuv_blit(unsigned char * const src[3],
|
|||
|
||||
do
|
||||
{
|
||||
/* lcd_write_yuv420_lines(dst, chroma_buf, yuv_src, width,
|
||||
lcd_write_yuv420_lines(dst, chroma_buf, yuv_src, width,
|
||||
stride);
|
||||
*/
|
||||
|
||||
yuv_src[0] += stride << 1; /* Skip down two luma lines */
|
||||
yuv_src[1] += stride >> 1; /* Skip down one chroma line */
|
||||
yuv_src[2] += stride >> 1;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,4 @@
|
|||
#define CPUFREQ_NORMAL 30000000
|
||||
#define CPUFREQ_MAX 80000000
|
||||
|
||||
#define inw(p) (*((volatile unsigned short*)((p) + PHY_IO_BASE)))
|
||||
#define outw(v,p) (*((volatile unsigned short*)((p) + PHY_IO_BASE)) = (v))
|
||||
|
||||
#endif /* SYSTEM_TARGET_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue