From 8b061252c4359aa960ae31c0a4b2ba92f6771017 Mon Sep 17 00:00:00 2001 From: Barry Wardell Date: Sat, 3 Mar 2007 17:25:20 +0000 Subject: Replace some inl/outl with register #define's instead. Also tidy up pp5020.h so that it's in increasing address order. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12574 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/sandisk/sansa-e200/ata-e200.c | 6 +++--- firmware/target/arm/sandisk/sansa-e200/lcd-e200.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'firmware/target/arm/sandisk') diff --git a/firmware/target/arm/sandisk/sansa-e200/ata-e200.c b/firmware/target/arm/sandisk/sansa-e200/ata-e200.c index 56f351c001..cf05397a78 100644 --- a/firmware/target/arm/sandisk/sansa-e200/ata-e200.c +++ b/firmware/target/arm/sandisk/sansa-e200/ata-e200.c @@ -364,9 +364,9 @@ void sd_init_device(void) GPIOD_ENABLE |= (0x1f); GPIOD_OUTPUT_EN |= (0x1f); GPIOD_OUTPUT_VAL |= (0x1f); - outl(inl(0x6000600c) | (1 << 14), 0x6000600c); - outl(inl(0x60006004) | (1 << 14), 0x60006004); - outl(inl(0x60006004) & ~(1 << 14), 0x60006004); /* Reset Controller? */ + DEV_EN |= (1 << 14); /* Enable controller */ + DEV_RS |= (1 << 14); /* Reset controller */ + DEV_RS &=~(1 << 14); /* Clear Reset */ outl(0, 0x6000b000); outl(0, 0x6000a000); /* Init DMA controller? */ diff --git a/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c b/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c index 25bb6f04aa..e34ebd7c5a 100644 --- a/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c +++ b/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c @@ -110,7 +110,7 @@ static inline void cache_flush(void) { #ifndef BOOTLOADER outl(inl(0xf000f044) | 0x2, 0xf000f044); - while ((inl(0x6000c000) & 0x8000) != 0) + while ((CACHE_CTL & 0x8000) != 0) { } #endif @@ -141,12 +141,12 @@ inline void lcd_init_device(void) outl(((inl(0x70000010) & (0x03ffffff)) | (0x15 << 26)), 0x70000010); outl(((inl(0x70000014) & (0x0fffffff)) | (0x5 << 28)), 0x70000014); outl((inl(0x70000020) & ~(0x3 << 10)), 0x70000020); - outl((inl(0x6000600c) | (1 << 26)), 0x6000600c); /* Enable controller */ + DEV_EN |= (1 << 26); /* Enable controller */ outl(0x6, 0x600060d0); - outl((inl(0x60006004) | (1 << 26)), 0x60006004); /* Reset controller? */ + DEV_RS |= (1 << 26); /* Reset controller */ outl((inl(0x70000020) & ~(1 << 14)), 0x70000020); lcd_bus_idle(); - outl((inl(0x60006004) & ~(1 << 26)), 0x60006004); /* Clear reset? */ + DEV_RS &=~(1 << 26); /* Clear reset */ udelay(1000); LCD_REG_0 = (LCD_REG_0 & (0x00ffffff)) | (0x22 << 24); -- cgit v1.2.3