diff options
author | Minkyu Kang <mk7.kang@samsung.com> | 2010-05-10 15:20:50 +0900 |
---|---|---|
committer | Minkyu Kang <mk7.kang@samsung.com> | 2010-05-10 15:20:50 +0900 |
commit | 9d62f20d0861ef87460d073dc189c851715b46ae (patch) | |
tree | 43a05c86e947f01079879735ddf93218870df50b /arch/powerpc/include/asm/mc146818rtc.h | |
parent | 6596753387c3310b86f75bebe464684d70651052 (diff) | |
parent | e0531f975ce124f4ebdd9c7b7b107673c5628f68 (diff) | |
download | u-boot-imx-9d62f20d0861ef87460d073dc189c851715b46ae.zip u-boot-imx-9d62f20d0861ef87460d073dc189c851715b46ae.tar.gz u-boot-imx-9d62f20d0861ef87460d073dc189c851715b46ae.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-arm
Conflicts:
arch/arm/include/asm/mach-types.h
common/serial.c
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'arch/powerpc/include/asm/mc146818rtc.h')
-rw-r--r-- | arch/powerpc/include/asm/mc146818rtc.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/mc146818rtc.h b/arch/powerpc/include/asm/mc146818rtc.h new file mode 100644 index 0000000..5f806c4 --- /dev/null +++ b/arch/powerpc/include/asm/mc146818rtc.h @@ -0,0 +1,27 @@ +/* + * Machine dependent access functions for RTC registers. + */ +#ifndef __ASM_PPC_MC146818RTC_H +#define __ASM_PPC_MC146818RTC_H + +#include <asm/io.h> + +#ifndef RTC_PORT +#define RTC_PORT(x) (0x70 + (x)) +#define RTC_ALWAYS_BCD 1 /* RTC operates in binary mode */ +#endif + +/* + * The yet supported machines all access the RTC index register via + * an ISA port access but the way to access the date register differs ... + */ +#define CMOS_READ(addr) ({ \ +outb_p((addr),RTC_PORT(0)); \ +inb_p(RTC_PORT(1)); \ +}) +#define CMOS_WRITE(val, addr) ({ \ +outb_p((addr),RTC_PORT(0)); \ +outb_p((val),RTC_PORT(1)); \ +}) + +#endif /* __ASM_PPC_MC146818RTC_H */ |