Lines Matching +full:com +full:- +full:seq

1 // SPDX-License-Identifier: GPL-2.0+
3 * CMOS/NV-RAM driver for Atari. Adapted from drivers/char/nvram.c.
4 * Copyright (C) 1997 Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
6 * Portions copyright (c) 2001,2002 Sun Microsystems (thockin@sun.com)
26 * purpose memory in the NVRAM - that is to say, they all add the
32 * rtc_lock held. Due to the index-port/data-port design of the RTC, we
105 return -EIO; in atari_nvram_read()
107 for (i = *ppos; count > 0 && i < NVRAM_BYTES; --count, ++i, ++p) in atari_nvram_read()
112 return p - buf; in atari_nvram_read()
123 return -EIO; in atari_nvram_write()
125 for (i = *ppos; count > 0 && i < NVRAM_BYTES; --count, ++i, ++p) in atari_nvram_write()
131 return p - buf; in atari_nvram_write()
178 static void atari_nvram_proc_read(unsigned char *nvram, struct seq_file *seq, in atari_nvram_proc_read() argument
189 seq_printf(seq, "Checksum status : %svalid\n", checksum ? "" : "not "); in atari_nvram_proc_read()
191 seq_puts(seq, "Boot preference : "); in atari_nvram_proc_read()
192 for (i = ARRAY_SIZE(boot_prefs) - 1; i >= 0; --i) in atari_nvram_proc_read()
194 seq_printf(seq, "%s\n", boot_prefs[i].name); in atari_nvram_proc_read()
198 seq_printf(seq, "0x%02x (undefined)\n", nvram[1]); in atari_nvram_proc_read()
200 seq_printf(seq, "SCSI arbitration : %s\n", in atari_nvram_proc_read()
202 seq_puts(seq, "SCSI host ID : "); in atari_nvram_proc_read()
204 seq_printf(seq, "%d\n", nvram[16] & 7); in atari_nvram_proc_read()
206 seq_puts(seq, "n/a\n"); in atari_nvram_proc_read()
211 seq_puts(seq, "OS language : "); in atari_nvram_proc_read()
213 seq_printf(seq, "%s\n", languages[nvram[6]]); in atari_nvram_proc_read()
215 seq_printf(seq, "%u (undefined)\n", nvram[6]); in atari_nvram_proc_read()
216 seq_puts(seq, "Keyboard language: "); in atari_nvram_proc_read()
218 seq_printf(seq, "%s\n", languages[nvram[7]]); in atari_nvram_proc_read()
220 seq_printf(seq, "%u (undefined)\n", nvram[7]); in atari_nvram_proc_read()
221 seq_puts(seq, "Date format : "); in atari_nvram_proc_read()
222 seq_printf(seq, dateformat[nvram[8] & 7], in atari_nvram_proc_read()
224 seq_printf(seq, ", %dh clock\n", nvram[8] & 16 ? 24 : 12); in atari_nvram_proc_read()
225 seq_puts(seq, "Boot delay : "); in atari_nvram_proc_read()
227 seq_puts(seq, "default\n"); in atari_nvram_proc_read()
229 seq_printf(seq, "%ds%s\n", nvram[10], in atari_nvram_proc_read()
233 seq_printf(seq, in atari_nvram_proc_read()
237 seq_printf(seq, in atari_nvram_proc_read()
244 static int nvram_proc_read(struct seq_file *seq, void *offset) in nvram_proc_read() argument
254 atari_nvram_proc_read(contents, seq, offset); in nvram_proc_read()
262 return -ENODEV; in atari_nvram_init()
266 return -ENOMEM; in atari_nvram_init()