diff options
author | Marcin Bukat <marcin.bukat@gmail.com> | 2012-12-17 09:32:40 +0100 |
---|---|---|
committer | Marcin Bukat <marcin.bukat@gmail.com> | 2013-01-10 20:23:41 +0100 |
commit | 15818bef5525b54dfd8d35255270f0d6ac0b33d4 (patch) | |
tree | b7612518fcb451abc303d64a2ebf6c15909ea8c8 | |
parent | 2b6dfdb34e8e750528b91276c504f1664dfdef4c (diff) |
rk27xx: substitute magic constants with meaningful names for peripherials reset
Change-Id: Ia411c9be65376d1c3fdf59b7e692b0590d58775e
-rw-r--r-- | firmware/export/rk27xx.h | 15 | ||||
-rw-r--r-- | firmware/target/arm/rk27xx/sd-rk27xx.c | 4 |
2 files changed, 17 insertions, 2 deletions
diff --git a/firmware/export/rk27xx.h b/firmware/export/rk27xx.h index 6fb69d46c1..6f5859f6f8 100644 --- a/firmware/export/rk27xx.h +++ b/firmware/export/rk27xx.h @@ -157,6 +157,21 @@ #define CLKCFG_WDT (1<<31) #define SCU_RSTCFG (*(volatile unsigned long *)(APB0_SCU + 0x1C)) +#define RSTCFG_UHC (1<<0) +#define RSTCFG_UDC (1<<1) +#define RSTCFG_LCDC (1<<2) +#define RSTCFG_VIP (1<<3) +#define RSTCFG_DSP_CORE (1<<4) +#define RSTCFG_DSP_PERI (1<<5) +#define RSTCFG_CODEC (1<<6) +#define RSTCFG_LSADC (1<<7) +#define RSTCFG_HSADC (1<<8) +#define RSTCFG_SD (1<<9) +#define RSTCFG_MAILBOX (1<<10) +#define RSTCFG_ECT (1<<11) +#define RSTCFG_ARM_CORE (1<<12) +/* 13 - 31 reserved */ + #define SCU_PWM (*(volatile unsigned long *)(APB0_SCU + 0x20)) #define SCU_CPUPD (*(volatile unsigned long *)(APB0_SCU + 0x24)) #define SCU_CHIPCFG (*(volatile unsigned long *)(APB0_SCU + 0x28)) diff --git a/firmware/target/arm/rk27xx/sd-rk27xx.c b/firmware/target/arm/rk27xx/sd-rk27xx.c index a6049e7154..cb5c02e0b6 100644 --- a/firmware/target/arm/rk27xx/sd-rk27xx.c +++ b/firmware/target/arm/rk27xx/sd-rk27xx.c @@ -393,9 +393,9 @@ static void sd_thread(void) static void init_controller(void) { /* reset SD module */ - SCU_RSTCFG |= (1<<9); + SCU_RSTCFG |= RSTCFG_SD; sleep(1); - SCU_RSTCFG &= ~(1<<9); + SCU_RSTCFG &= ~RSTCFG_SD; /* set pins functions as SD signals */ SCU_IOMUXA_CON |= IOMUX_SD; |