mm: fix XIP file writes
[wrt350n-kernel.git] / arch / sh64 / kernel / alphanum.c
blobd1619d95fbaaf564558844b6d00608bef7857aae
1 /*
2 * arch/sh64/kernel/alphanum.c
4 * Copyright (C) 2002 Stuart Menefy <stuart.menefy@st.com>
6 * May be copied or modified under the terms of the GNU General Public
7 * License. See linux/COPYING for more information.
9 * Machine-independent functions for handling 8-digit alphanumeric display
10 * (e.g. Agilent HDSP-253x)
12 #include <linux/stddef.h>
13 #include <linux/sched.h>
15 void mach_alphanum(int pos, unsigned char val);
17 void print_seg(char *file, int line)
19 int i;
20 unsigned int nibble;
22 for (i = 0; i < 5; i++) {
23 mach_alphanum(i, file[i]);
26 for (i = 0; i < 3; i++) {
27 nibble = ((line >> (i * 4)) & 0xf);
28 mach_alphanum(7 - i, nibble + ((nibble > 9) ? 55 : 48));
32 void print_seg_num(unsigned num)
34 int i;
35 unsigned int nibble;
37 for (i = 0; i < 8; i++) {
38 nibble = ((num >> (i * 4)) & 0xf);
40 mach_alphanum(7 - i, nibble + ((nibble > 9) ? 55 : 48));