Home
last modified time | relevance | path

Searched full:bcd (Results 1 – 25 of 161) sorted by relevance

1234567

/linux/arch/m68k/fpsp040/
H A Ddecbin.S4 | Description: Converts normalized packed bcd value pointed to by
7 | Input: Normalized packed bcd value in ETEMP(a6).
9 | Output: Exact floating-point representation of the packed bcd value.
20 | Expected is a normal bcd (i.e. non-exceptional; all inf, zero,
24 | A1. Convert the bcd exponent to binary by successive adds and muls.
30 | A2. Convert the bcd mantissa to binary by successive
37 | bcd string. If SE is positive, count the leading zeros;
41 | mantissa the equivalent of forcing in the bcd value:
124 | 1. Copy bcd value in memory for use as a working copy.
137 | ( ) d4: first word of bcd
[all …]
H A Dbinstr.S5 | Description: Converts a 64-bit binary integer to bcd.
8 | d0, and a pointer to start in memory for bcd characters
12 | Output: LEN bcd digits representing the 64-bit integer.
36 | into d2:d3. D1 will contain the bcd digit formed.
57 | a0: pointer into memory for packed bcd string formation
H A Dbindec.S8 | to bcd format.
55 | in the output before conversion to bcd. LAMBDA is the
92 | A14. Convert the mantissa to bcd.
94 | mantissa to bcd in memory. The input to binstr is
97 | The bcd digits are stored in the correct position in
100 | A15. Convert the exponent to bcd.
101 | As in A14 above, the exp is converted to bcd and the
331 | in the output before conversion to bcd. LAMBDA is the sign
626 | a0: pointer into memory for packed bcd string formation
716 | A14. Convert the mantissa to bcd.
[all …]
/linux/drivers/rtc/
H A Drtc-rx4581.c32 #include <linux/bcd.h>
34 #define RX4581_REG_SC 0x00 /* Second in BCD */
35 #define RX4581_REG_MN 0x01 /* Minute in BCD */
36 #define RX4581_REG_HR 0x02 /* Hour in BCD */
38 #define RX4581_REG_DM 0x04 /* Day of Month in BCD */
39 #define RX4581_REG_MO 0x05 /* Month in BCD */
40 #define RX4581_REG_YR 0x06 /* Year in BCD */
42 #define RX4581_REG_AMN 0x08 /* Alarm Min in BCD*/
43 #define RX4581_REG_AHR 0x09 /* Alarm Hour in BCD */
H A Drtc-rx8581.c14 #include <linux/bcd.h>
20 #define RX8581_REG_SC 0x00 /* Second in BCD */
21 #define RX8581_REG_MN 0x01 /* Minute in BCD */
22 #define RX8581_REG_HR 0x02 /* Hour in BCD */
24 #define RX8581_REG_DM 0x04 /* Day of Month in BCD */
25 #define RX8581_REG_MO 0x05 /* Month in BCD */
26 #define RX8581_REG_YR 0x06 /* Year in BCD */
28 #define RX8581_REG_AMN 0x08 /* Alarm Min in BCD*/
29 #define RX8581_REG_AHR 0x09 /* Alarm Hour in BCD */
H A Drtc-amlogic-a4.c77 u32 bcd = gray; in gray_to_binary() local
78 int size = sizeof(bcd) * 8; in gray_to_binary()
82 bcd ^= bcd >> (1 << i); in gray_to_binary()
84 return bcd; in gray_to_binary()
87 static inline u32 binary_to_gray(u32 bcd) in binary_to_gray() argument
89 return bcd ^ (bcd >> 1); in binary_to_gray()
H A Drtc-m48t86.c8 * This drivers only supports the clock running in BCD and 24H mode.
16 #include <linux/bcd.h>
82 /* bcd mode */ in m48t86_rtc_read_time()
122 /* bcd mode */ in m48t86_rtc_set_time()
146 (reg & M48T86_B_DM) ? "binary" : "bcd"); in m48t86_rtc_proc()
H A Drtc-ds1305.c9 #include <linux/bcd.h>
21 * otherwise you're reading it. All non-bitmask values are BCD.
105 static unsigned bcd2hour(u8 bcd) in bcd2hour() argument
107 if (bcd & DS1305_HR_12) { in bcd2hour()
110 bcd &= ~DS1305_HR_12; in bcd2hour()
111 if (bcd & DS1305_HR_PM) { in bcd2hour()
113 bcd &= ~DS1305_HR_PM; in bcd2hour()
115 hour += bcd2bin(bcd); in bcd2hour()
118 return bcd2bin(bcd); in bcd2hour()
H A Drtc-wilco-ec.c11 #include <linux/bcd.h>
46 * All values are presented in binary (not BCD).
73 * All values are presented in BCD.
H A Drtc-ds1685.c18 #include <linux/bcd.h>
99 * ds1685_rtc_bcd2bin - bcd2bin wrapper in case platform doesn't support BCD.
102 * @bcd_mask: u8 mask value if BCD mode is used.
105 * Returns the value, converted to BIN if originally in BCD and bcd_mode TRUE.
117 * ds1685_rtc_bin2bcd - bin2bcd wrapper in case platform doesn't support BCD.
121 * @bcd_mask: u8 mask value if BCD mode is used.
123 * Returns the value, converted to BCD if originally in BIN and bcd_mode TRUE.
449 /* Fetch the alarm info and convert to BCD. */ in ds1685_rtc_set_alarm()
808 ((ctrlb & RTC_CTRL_B_DM) ? "binary" : "BCD"), in ds1685_rtc_proc()
1169 * If the platform supports BCD mode, then set DM=0 in Control B. in ds1685_rtc_probe()
H A Drtc-s3c.c21 #include <linux/bcd.h>
129 /* Read time from RTC and convert it from BCD */
169 /* Convert time to BCD and write it to RTC */
H A Drtc-stm32.c7 #include <linux/bcd.h>
490 /* Convert rtc_time structure from bin to bcd format */
508 /* Convert rtc_time structure from bcd to bin format */
532 /* Time and Date in BCD format */ in stm32_rtc_read_time()
561 /* Time in BCD format */ in stm32_rtc_set_time()
566 /* Date in BCD format */ in stm32_rtc_set_time()
H A Drtc-ds1511.c14 #include <linux/bcd.h>
103 dow = rtc_tm->tm_wday & 0x7; /* automatic BCD */ in ds1511_rtc_set_time()
/linux/drivers/usb/storage/
H A Dusual-tables.c79 unsigned vid, pid, bcd; in usb_usual_ignore_device() local
85 bcd = le16_to_cpu(udev->descriptor.bcdDevice); in usb_usual_ignore_device()
89 p->bcdmin <= bcd && p->bcdmax >= bcd) in usb_usual_ignore_device()
/linux/Documentation/virt/kvm/x86/
H A Dtimekeeping.rst127 In addition to normal binary counting, the PIT supports BCD counting. The
135 Bit 0 : Binary (0) / BCD (1)
188 Bit 0 = Binary (0) / BCD mode (1)
219 00h byte Current second (BCD)
220 01h byte Seconds alarm (BCD)
221 02h byte Current minute (BCD)
222 03h byte Minutes alarm (BCD)
223 04h byte Current hour (BCD)
224 05h byte Hours alarm (BCD)
225 06h byte Current day of week (BCD)
[all …]
/linux/Documentation/ABI/testing/
H A Dconfigfs-usb-gadget28 bcdDevice bcd device release number
29 bcdUSB bcd USB specification version number
155 bcdVersion bcd WebUSB specification version number
/linux/scripts/mod/
H A Dfile2alias.c249 /* Handles increment/decrement of BCD formatted integers */
251 static unsigned int incbcd(unsigned int *bcd, in incbcd() argument
256 unsigned int init = *bcd, i, j; in incbcd()
259 /* If bcd is not in BCD format, just increment */ in incbcd()
261 *bcd += inc; in incbcd()
265 /* Convert BCD to Decimal */ in incbcd()
267 c = (*bcd >> (i << 2)) & 0xf; in incbcd()
268 c = c > 9 ? 9 : c; /* force to bcd just in case */ in incbcd()
276 *bcd in incbcd()
[all...]
/linux/lib/
H A Dbcd.c2 #include <linux/bcd.h>
/linux/include/linux/
H A Dmc146818rtc.h17 #include <linux/bcd.h>
101 # define RTC_DM_BINARY 0x04 /* all time/date values are BCD if clear */
/linux/drivers/comedi/drivers/
H A Dcomedi_8254.c52 * I8254_BCD BCD counting
59 * for binary counting and 10^4 for BCD counting.
63 * for binary counting or 9999 for BCD counting, and continues counting.
309 mode; /* mode and BCD|binary */ in comedi_8254_set_mode()
/linux/arch/x86/kvm/
H A Di8254.h25 u8 bcd; /* not supported */ member
/linux/arch/m68k/include/uapi/asm/
H A Dbootinfo-vme.h45 * Note, bytes 12 and 13 are board no in BCD (0162,0166,0167,0177,etc)
/linux/arch/sh/boards/mach-sdk7786/
H A Dfpga.c9 #include <linux/bcd.h>
/linux/drivers/mfd/
H A Dwm831x-otp.c13 #include <linux/bcd.h>
/linux/arch/powerpc/platforms/powernv/
H A Dopal-rtc.c11 #include <linux/bcd.h>

1234567