2007-10-22 00:37:50 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* Copyright (C) 2007 by Andree Buschmann
|
|
|
|
*
|
2008-06-28 18:10:04 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2007-10-22 00:37:50 +00:00
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2010-06-11 04:41:36 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
2007-10-28 12:09:46 +00:00
|
|
|
.section .icode, "ax", %progbits
|
|
|
|
|
2007-11-26 23:48:23 +00:00
|
|
|
/****************************************************************************
|
|
|
|
* void lcd_write_data(const fb_data *addr,
|
|
|
|
* int pixelcount);
|
|
|
|
*
|
2010-05-10 19:12:03 +00:00
|
|
|
* Writes pixelcount pixels from src-pointer (lcd_framebuffer) to BCM dataport.
|
2010-05-10 20:35:57 +00:00
|
|
|
* Use the sequence 2:2:2:2 (2 = read/write 2 regs) for best performance.
|
2007-11-26 23:48:23 +00:00
|
|
|
*/
|
2007-10-28 12:09:46 +00:00
|
|
|
.align 2
|
|
|
|
.global lcd_write_data
|
|
|
|
.type lcd_write_data, %function
|
2007-11-02 00:07:45 +00:00
|
|
|
/* r0 = addr, must be aligned */
|
|
|
|
lcd_write_data: /* r1 = pixel count, must be even */
|
2009-07-11 23:43:44 +00:00
|
|
|
stmfd sp!, {r4, lr}
|
2008-03-27 07:46:04 +00:00
|
|
|
mov lr, #0x30000000 /* LCD data port */
|
2007-10-28 12:09:46 +00:00
|
|
|
|
|
|
|
subs r1, r1, #16
|
|
|
|
.loop16:
|
2010-05-10 19:12:03 +00:00
|
|
|
ldmgeia r0!, {r2-r3}
|
|
|
|
stmgeia lr, {r2-r3}
|
|
|
|
ldmgeia r0!, {r2-r3}
|
|
|
|
stmgeia lr, {r2-r3}
|
2010-05-10 20:35:57 +00:00
|
|
|
ldmgeia r0!, {r2-r3}
|
|
|
|
stmgeia lr, {r2-r3}
|
|
|
|
ldmgeia r0!, {r2-r3}
|
|
|
|
stmgeia lr, {r2-r3}
|
2007-10-28 12:09:46 +00:00
|
|
|
subges r1, r1, #16
|
|
|
|
bge .loop16
|
|
|
|
|
|
|
|
/* no need to correct the count, we're just checking bits from now */
|
|
|
|
tst r1, #8
|
2009-07-11 23:43:44 +00:00
|
|
|
ldmneia r0!, {r2-r4, r12}
|
2010-05-10 19:12:03 +00:00
|
|
|
stmneia lr, {r2-r4, r12}
|
2007-10-28 12:09:46 +00:00
|
|
|
tst r1, #4
|
2008-03-27 07:46:04 +00:00
|
|
|
ldmneia r0!, {r2-r3}
|
2010-05-10 19:12:03 +00:00
|
|
|
stmneia lr, {r2-r3}
|
2007-10-28 12:09:46 +00:00
|
|
|
tst r1, #2
|
|
|
|
ldrne r3, [r0], #4
|
2008-03-27 07:46:04 +00:00
|
|
|
strne r3, [lr]
|
2007-10-28 12:09:46 +00:00
|
|
|
|
2010-06-11 04:41:36 +00:00
|
|
|
ldmpc regs=r4
|