From 355be5010af1e33c0f3b36af85033bd31f996491 Mon Sep 17 00:00:00 2001 From: Greg White Date: Sat, 13 Jan 2007 02:24:15 +0000 Subject: Setup LCD ourselves; move LCD buffer and TTB to free up 1.7MB of memory git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11994 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/gigabeat/meg-fx/ata-meg-fx.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'firmware/target/arm/gigabeat/meg-fx/ata-meg-fx.c') diff --git a/firmware/target/arm/gigabeat/meg-fx/ata-meg-fx.c b/firmware/target/arm/gigabeat/meg-fx/ata-meg-fx.c index 8e246045e6..00b5e09ed3 100644 --- a/firmware/target/arm/gigabeat/meg-fx/ata-meg-fx.c +++ b/firmware/target/arm/gigabeat/meg-fx/ata-meg-fx.c @@ -53,10 +53,11 @@ void ata_device_init(void) { } +#if !defined(BOOTLOADER) void copy_read_sectors(unsigned char* buf, int wordcount) { __buttonlight_trigger(); - + /* Unaligned transfer - slow copy */ if ( (unsigned long)buf & 1) { /* not 16-bit aligned, copy byte by byte */ @@ -94,7 +95,9 @@ void copy_read_sectors(unsigned char* buf, int wordcount) DISRC0 = (int) 0x18000000; DISRCC0 = 0x1; /* Dest mapped to physical address, on AHB bus, increment */ - DIDST0 = (int) (buf + 0x30000000); + DIDST0 = (int) buf; + if(DIDST0 < 0x30000000) + DIDST0 += 0x30000000; DIDSTC0 = 0; /* DACK/DREQ Sync to AHB, Int on Transfer complete, Whole service, No reload, 16-bit transfers */ @@ -112,10 +115,10 @@ void copy_read_sectors(unsigned char* buf, int wordcount) /* Wait for transfer to complete */ while((DSTAT0 & 0x000fffff)) - CLKCON |= (1 << 2); /* set IDLE bit */ + yield(); /* Dump cache for the buffer */ } - +#endif void dma0(void) { } -- cgit v1.2.3