summaryrefslogtreecommitdiff
path: root/firmware/target
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2010-12-12 15:10:45 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2010-12-12 15:10:45 +0000
commit335df1d0403013879b3237b9997316d7ab8bbfbf (patch)
tree5b4e61ddfc7ec74fe4fa7f10cec252d224132ffb /firmware/target
parent26f2bfde03420edad4de1f22cb3d515dc063b20d (diff)
FS#11807 - Major speedup of iPod nano 2G. Part 2: Use 16 bit data width and simplify write commands. Gives another +27% for YUV.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28811 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target')
-rw-r--r--firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c b/firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c
index 5bda9e7387..5eabfdb463 100644
--- a/firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c
+++ b/firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c
@@ -219,14 +219,10 @@ unsigned short lcd_init_sequence_1[] = {
static inline void s5l_lcd_write_cmd_data(int cmd, int data)
{
while (LCD_STATUS & 0x10);
- LCD_WCMD = cmd >> 8;
- while (LCD_STATUS & 0x10);
- LCD_WCMD = cmd & 0xff;
+ LCD_WCMD = cmd;
while (LCD_STATUS & 0x10);
- LCD_WDATA = data >> 8;
- while (LCD_STATUS & 0x10);
- LCD_WDATA = data & 0xff;
+ LCD_WDATA = data;
}
static inline void s5l_lcd_write_cmd(unsigned short cmd)
@@ -238,23 +234,19 @@ static inline void s5l_lcd_write_cmd(unsigned short cmd)
static inline void s5l_lcd_write_wcmd(unsigned short cmd)
{
while (LCD_STATUS & 0x10);
- LCD_WCMD = cmd >> 8;
- while (LCD_STATUS & 0x10);
- LCD_WCMD = cmd & 0xff;
+ LCD_WCMD = cmd;
}
static inline void s5l_lcd_write_data(unsigned short data)
{
while (LCD_STATUS & 0x10);
- LCD_WDATA = data & 0xff;
+ LCD_WDATA = data;
}
static inline void s5l_lcd_write_wdata(unsigned short data)
{
while (LCD_STATUS & 0x10);
- LCD_WDATA = data >> 8;
- while (LCD_STATUS & 0x10);
- LCD_WDATA = data & 0xff;
+ LCD_WDATA = data;
}
/*** hardware configuration ***/
@@ -409,6 +401,8 @@ void lcd_init_device(void)
lcd_type = 0; /* Similar to ILI9320 - aka "type 2" */
else
lcd_type = 1; /* Similar to LDS176 - aka "type 7" */
+
+ LCD_CON |= 0x100; /* use 16 bit bus width, little endian */
lcd_ispowered = true;
}
@@ -417,8 +411,7 @@ void lcd_init_device(void)
static inline void lcd_write_pixel(fb_data pixel)
{
- LCD_WDATA = pixel >> 8;
- LCD_WDATA = pixel; /* no need to &0xff here, only lower 8 bit used */
+ LCD_WDATA = pixel;
}
/* Update the display.