summaryrefslogtreecommitdiffstats
path: root/cpu/at32ap/sm.h
diff options
context:
space:
mode:
authorHaavard Skinnemoen <hskinnemoen@atmel.com>2006-11-19 18:06:53 +0100
committerHaavard Skinnemoen <hskinnemoen@atmel.com>2007-04-14 15:20:27 +0200
commitdf548d3c3e2bbc40258713167859ffc2ce99a900 (patch)
tree63759a73724848ba192874aa552861e03faf1058 /cpu/at32ap/sm.h
parent03d1e1365796cd15d1726e8a51fd8b5be50b2fe9 (diff)
downloadblackbird-obmc-uboot-df548d3c3e2bbc40258713167859ffc2ce99a900.tar.gz
blackbird-obmc-uboot-df548d3c3e2bbc40258713167859ffc2ce99a900.zip
AVR32: Resource management rewrite
Rewrite the resource management code (i.e. I/O memory, clock gating, gpio) so it doesn't depend on any global state. This is necessary because this code is heavily used before relocation to RAM, so we can't write to any global variables. As an added bonus, this makes u-boot's memory footprint a bit smaller, although some functionality has been left out; all clocks are enabled all the time, and there's no checking for gpio line conflicts. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Diffstat (limited to 'cpu/at32ap/sm.h')
-rw-r--r--cpu/at32ap/sm.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/cpu/at32ap/sm.h b/cpu/at32ap/sm.h
index ce81ef0a46..6492c8e81d 100644
--- a/cpu/at32ap/sm.h
+++ b/cpu/at32ap/sm.h
@@ -196,9 +196,9 @@
| SM_BF(name,value))
/* Register access macros */
-#define sm_readl(port,reg) \
- readl((port)->regs + SM_##reg)
-#define sm_writel(port,reg,value) \
- writel((value), (port)->regs + SM_##reg)
+#define sm_readl(reg) \
+ readl((void *)SM_BASE + SM_##reg)
+#define sm_writel(reg,value) \
+ writel((value), (void *)SM_BASE + SM_##reg)
#endif /* __CPU_AT32AP_SM_H__ */
OpenPOWER on IntegriCloud