From 7467599c896a57d5cd33aca8234442141c5e9f70 Mon Sep 17 00:00:00 2001 From: Tom Rix Date: Thu, 10 Sep 2009 15:27:57 -0400 Subject: OMAP3 Move cache routine to cache.S v7_flush_dcache_all, because it depends on omap ROM code is not generic. Rename the function to 'invalidate_dcache' and move it to the omap cpu directory. Collect the other omap cache routines l2_cache_enable and l2_cache_disable with invalide_dcache into cache.S. This means removing the old cache.c file that contained l2_cache_enable and l2_cache_disable. The conversion from cache.c to cache.S was done most through disassembling the uboot binary. The only significant change was to change the comparision for the return of get_cpu_rev from cmp r0, #0 beq earlier_than_label Which was lost information to cmp r0, #CPU_3XX_ES20 blt earlier_than_label The paths through the enable routine were verified by adding an infinite loop and seeing the hang. Then removing the infinite loop and seeing it continue. The disable routine is similar enough that it was not tested with this method. Run tested by cold booting from nand on beagle and zoom1. Compile tested on MAKEALL arm. Signed-off-by: Tom Rix --- include/asm-arm/arch-omap3/omap3.h | 2 ++ include/asm-arm/arch-omap3/sys_proto.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'include/asm-arm/arch-omap3') diff --git a/include/asm-arm/arch-omap3/omap3.h b/include/asm-arm/arch-omap3/omap3.h index 6459d99..12815f6 100644 --- a/include/asm-arm/arch-omap3/omap3.h +++ b/include/asm-arm/arch-omap3/omap3.h @@ -168,6 +168,8 @@ struct gpio { * ES1 = rev 0 * * ES2 onwards, the value maps to contents of IDCODE register [31:28]. + * + * Note : CPU_3XX_ES20 is used in cache.S. Please review before changing. */ #define CPU_3XX_ES10 0 #define CPU_3XX_ES20 1 diff --git a/include/asm-arm/arch-omap3/sys_proto.h b/include/asm-arm/arch-omap3/sys_proto.h index 7361d08..2246f80 100644 --- a/include/asm-arm/arch-omap3/sys_proto.h +++ b/include/asm-arm/arch-omap3/sys_proto.h @@ -55,7 +55,7 @@ void secureworld_exit(void); void setup_auxcr(void); void try_unlock_memory(void); u32 get_boot_type(void); -void v7_flush_dcache_all(u32); +void invalidate_dcache(u32); void sr32(void *, u32, u32, u32); u32 wait_on_value(u32, u32, void *, u32); void sdelay(unsigned long); -- cgit v1.1 From b3ff5667c7f9d01f1e4eb9bcb6a6c02e148bfcfe Mon Sep 17 00:00:00 2001 From: Dirk Behme Date: Mon, 28 Sep 2009 08:17:50 -0400 Subject: OMAP3 MMC: Fix warning dereferencing type-punned pointer Fix warning Dereferencing type-punned pointer will break strict-aliasing rules Signed-off-by: Dirk Behme CC: Steve Sakoman Acked-by: Tom Rix --- include/asm-arm/arch-omap3/mmc.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/asm-arm/arch-omap3') diff --git a/include/asm-arm/arch-omap3/mmc.h b/include/asm-arm/arch-omap3/mmc.h index 55584d9..196ffdc 100644 --- a/include/asm-arm/arch-omap3/mmc.h +++ b/include/asm-arm/arch-omap3/mmc.h @@ -223,6 +223,13 @@ typedef struct { unsigned short newpublishedrca; } mmc_resp_r6; +typedef union { + unsigned int resp[4]; + mmc_resp_r3 r3; + mmc_resp_r6 r6; + mmc_csd_reg_t Card_CSD; +} mmc_resp_t; + extern mmc_card_data mmc_dev; unsigned char mmc_lowlevel_init(void); -- cgit v1.1