summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2003-11-20 00:01:13 +0000
committerBjörn Stenberg <bjorn@haxx.se>2003-11-20 00:01:13 +0000
commit577e571958ab43afb9ffd2526811053731e8d7c1 (patch)
treec1501bd57b03e4153e42f28b79dab3d4bd3c779e
parent091c5e37aefcc6cf1ab1f354a7aa0717293d9373 (diff)
downloadrockbox-577e571958ab43afb9ffd2526811053731e8d7c1.tar.gz
rockbox-577e571958ab43afb9ffd2526811053731e8d7c1.zip
Removed startup_io test code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4045 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/debug_menu.c25
-rw-r--r--apps/main.c32
-rw-r--r--firmware/rolo.c54
3 files changed, 0 insertions, 111 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index c56d4cc2c0..5f9c1a7bf9 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1357,30 +1357,6 @@ bool dbg_save_roms(void)
return false;
}
-
-/* test code, to be removed later */
-extern union /* defined in main.c */
-{
- unsigned char port8 [512];
- unsigned short port16[256];
- unsigned port32[128];
-} startup_io;
-
-bool dbg_save_io(void) /* dump the initial I/O space to disk */
-{
- int fd;
-
- fd = creat("/startup_io.bin", O_WRONLY);
- if(fd >= 0)
- {
- write(fd, (void *)&startup_io, sizeof(startup_io));
- close(fd);
- }
-
- return false;
-}
-/* end of test code */
-
bool debug_menu(void)
{
int m;
@@ -1388,7 +1364,6 @@ bool debug_menu(void)
struct menu_items items[] = {
{ "Dump ROM contents", dbg_save_roms },
- { "Dump startup I/O", dbg_save_io },
{ "View I/O ports", dbg_ports },
#ifdef HAVE_LCD_BITMAP
#ifdef HAVE_RTC
diff --git a/apps/main.c b/apps/main.c
index d180067c9e..1a1c6711b9 100644
--- a/apps/main.c
+++ b/apps/main.c
@@ -54,16 +54,6 @@
#include "screens.h"
#include "power.h"
-/* diagnostic, to be removed later: */
-/* snapshot of the I/O space on startup, to compare initialisations */
-union
-{
- unsigned char port8 [512];
- unsigned short port16[256];
- unsigned port32[128];
-} startup_io;
-
-
char appsversion[]=APPSVERSION;
void init(void);
@@ -235,28 +225,6 @@ void init(void)
int main(void)
{
- /* diagnostic, to be removed later: dump I/O space */
- int i;
- for (i = 0; i < 512; i++)
- { // most can be read with 8 bit access
- startup_io.port8[i] = *((volatile unsigned char*)0x5FFFE00 + i);
- }
- // some don't allow that, read with 32 bit if aligned
- startup_io.port32[0x140/4] = *((volatile unsigned char*)0x5FFFF40);
- startup_io.port32[0x144/4] = *((volatile unsigned char*)0x5FFFF44);
- startup_io.port32[0x150/4] = *((volatile unsigned char*)0x5FFFF50);
- startup_io.port32[0x154/4] = *((volatile unsigned char*)0x5FFFF54);
- startup_io.port32[0x160/4] = *((volatile unsigned char*)0x5FFFF60);
- startup_io.port32[0x170/4] = *((volatile unsigned char*)0x5FFFF70);
- startup_io.port32[0x174/4] = *((volatile unsigned char*)0x5FFFF74);
-
- // read the rest with 16 bit
- startup_io.port16[0x14A/2] = *((volatile unsigned short*)0x5FFFF4A);
- startup_io.port16[0x15A/2] = *((volatile unsigned short*)0x5FFFF5A);
- startup_io.port16[0x16A/2] = *((volatile unsigned short*)0x5FFFF6A);
- startup_io.port16[0x17A/2] = *((volatile unsigned short*)0x5FFFF7A);
- /* end of diagnostic */
-
app_main();
while(1) {
diff --git a/firmware/rolo.c b/firmware/rolo.c
index e205c288f7..c5cfc5d77b 100644
--- a/firmware/rolo.c
+++ b/firmware/rolo.c
@@ -30,54 +30,6 @@
#define IRQ0_EDGE_TRIGGER 0x80
-/* test code, to be removed later */
-extern union /* defined in main.c */
-{
- unsigned char port8 [512];
- unsigned short port16[256];
- unsigned port32[128];
-} startup_io;
-
-
-bool rolo_io_load(char* filename)
-{
- int fd;
- fd = open(filename, O_RDONLY);
- if(fd >= 0) /* no complaint if it doesn't exit */
- {
- read(fd, (void *)&startup_io, sizeof(startup_io));
- close(fd);
- return true; /* success */
- }
- return false; /* not found */
-}
-
-void rolo_io_restore(void)
-{
- int i;
- for (i = 0; i < 512; i++)
- { /* most can be written with 8 bit access */
- *((volatile unsigned char*)0x5FFFE00 + i) = startup_io.port8[i];
- }
- /* some don't allow that, write with 32 bit if aligned */
- *((volatile unsigned char*)0x5FFFF40) = startup_io.port32[0x140/4];
- *((volatile unsigned char*)0x5FFFF44) = startup_io.port32[0x144/4];
- *((volatile unsigned char*)0x5FFFF50) = startup_io.port32[0x150/4];
- *((volatile unsigned char*)0x5FFFF54) = startup_io.port32[0x154/4];
- *((volatile unsigned char*)0x5FFFF60) = startup_io.port32[0x160/4];
- *((volatile unsigned char*)0x5FFFF70) = startup_io.port32[0x170/4];
- *((volatile unsigned char*)0x5FFFF74) = startup_io.port32[0x174/4];
-
- /* write the rest with 16 bit */
- *((volatile unsigned short*)0x5FFFF4A) = startup_io.port16[0x14A/2];
- *((volatile unsigned short*)0x5FFFF5A) = startup_io.port16[0x15A/2];
- *((volatile unsigned short*)0x5FFFF6A) = startup_io.port16[0x16A/2];
- *((volatile unsigned short*)0x5FFFF7A) = startup_io.port16[0x17A/2];
-}
-/* end of test code */
-
-
-
static void rolo_error(char *text)
{
lcd_clear_display();
@@ -107,7 +59,6 @@ int rolo_load(char* filename)
unsigned long file_length;
unsigned short checksum,file_checksum;
unsigned char* ramstart = (void*)0x09000000;
- bool restore_io; /* debug value */
lcd_clear_display();
lcd_puts(0, 0, "ROLO...");
@@ -165,8 +116,6 @@ int rolo_load(char* filename)
return -1;
}
- restore_io = rolo_io_load("/startup_io.bin"); /* test code */
-
lcd_puts(0, 1, "Executing ");
lcd_update();
@@ -183,9 +132,6 @@ int rolo_load(char* filename)
PAIOR = 0x0FA0; /* needed when flashed, probably model-specific */
#endif
- if (restore_io) /* test code */
- rolo_io_restore(); /* restore the I/Os from the file content */
-
rolo_restart(mp3buf, ramstart, length);
return 0; /* this is never reached */