summaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorJens Scharsig <js_at_ng@scharsoft.de>2010-02-03 22:46:58 +0100
committerTom Rix <Tom.Rix@windriver.com>2010-02-12 12:31:55 -0600
commit0cf0b93161beb3f3ed5e37e6112aedf15da17e8a (patch)
treeb620b5a93d12d5039bc541be298165a7f06f2212 /drivers/video
parent7f9e8633ac9c846e7e4f867507cbd5de1bd99e0c (diff)
downloadtalos-obmc-uboot-0cf0b93161beb3f3ed5e37e6112aedf15da17e8a.tar.gz
talos-obmc-uboot-0cf0b93161beb3f3ed5e37e6112aedf15da17e8a.zip
convert common files to new SoC access
* add's a warning to all files, which need update to new SoC access * convert common files in cpu/../at91 and a lot of drivers to use c stucture SoC access Signed-off-by: Jens Scharsig <js_at_ng@scharsoft.de>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/bus_vcxk.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/video/bus_vcxk.c b/drivers/video/bus_vcxk.c
index 7726bb3193..67a59a75d6 100644
--- a/drivers/video/bus_vcxk.c
+++ b/drivers/video/bus_vcxk.c
@@ -31,9 +31,29 @@ vu_long *vcxk_bws_long = ((vu_long *) (CONFIG_SYS_VCXK_BASE));
#ifdef CONFIG_AT91RM9200
#include <asm/arch/hardware.h>
+ #include <asm/arch/at91_pio.h>
+
#ifndef VCBITMASK
#define VCBITMASK(bitno) (0x0001 << (bitno % 16))
#endif
+#ifndef CONFIG_AT91_LEGACY
+at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE;
+#define VCXK_INIT_PIN(PORT, PIN, DDR, I0O1) \
+ do { \
+ writel(PIN, &pio->PORT.per); \
+ writel(PIN, &pio->PORT.DDR); \
+ writel(PIN, &pio->PORT.mddr); \
+ if (!I0O1) \
+ writel(PIN, &pio->PORT.puer); \
+ } while (0);
+
+#define VCXK_SET_PIN(PORT, PIN) writel(PIN, &pio->PORT.sodr);
+#define VCXK_CLR_PIN(PORT, PIN) writel(PIN, &pio->PORT.codr);
+
+#define VCXK_ACKNOWLEDGE \
+ (!(readl(&pio->CONFIG_SYS_VCXK_ACKNOWLEDGE_PORT.pdsr) & \
+ CONFIG_SYS_VCXK_ACKNOWLEDGE_PIN))
+#else
#define VCXK_INIT_PIN(PORT, PIN, DDR, I0O1) \
((AT91PS_PIO) PORT)->PIO_PER = PIN; \
((AT91PS_PIO) PORT)->DDR = PIN; \
@@ -46,7 +66,7 @@ vu_long *vcxk_bws_long = ((vu_long *) (CONFIG_SYS_VCXK_BASE));
#define VCXK_ACKNOWLEDGE \
(!(((AT91PS_PIO) CONFIG_SYS_VCXK_ACKNOWLEDGE_PORT)->\
PIO_PDSR & CONFIG_SYS_VCXK_ACKNOWLEDGE_PIN))
-
+#endif
#elif defined(CONFIG_MCF52x2)
#include <asm/m5282.h>
#ifndef VCBITMASK
OpenPOWER on IntegriCloud