From 0e6d0edccea45c4dd8e3d7af25b3667330433699 Mon Sep 17 00:00:00 2001 From: Zheng Bao Date: Fri, 9 Nov 2012 19:55:04 +0800 Subject: mc146818rtc: Remove the hyphen to build on NetBSD and Darwin http://netbsd.gw.com/cgi-bin/man-cgi?date++NetBSD-current The NetBSD manual tells us the date in NetBSD doesn't take any flags to enable or disable padding in the format. By default, date pads numeric fields with zeroes. This will convert the number to octal one. So add "0x" to convert it to BCD directly. Change-Id: Icd44312acf01b8232f1da1fbaa70630d09007b40 Signed-off-by: Zheng Bao Signed-off-by: zbao Reviewed-on: http://review.coreboot.org/1804 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Anton Kochkov --- src/include/pc80/mc146818rtc.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/include/pc80') diff --git a/src/include/pc80/mc146818rtc.h b/src/include/pc80/mc146818rtc.h index f0d58d82d6..31322ea528 100644 --- a/src/include/pc80/mc146818rtc.h +++ b/src/include/pc80/mc146818rtc.h @@ -63,8 +63,6 @@ # define RTC_24H 0x02 /* 24 hour mode - else hours bit 7 means pm */ # define RTC_DST_EN 0x01 /* auto switch DST - works f. USA only */ -#define RTC_TO_BCD(value) (((value / 10) << 4) | (value % 10)) - /**********************************************************************/ #define RTC_INTR_FLAGS RTC_REG_C /* caution - cleared by read */ -- cgit v1.2.3