MIPS: eBPF: Fix icache flush end address
[linux/fpc-iii.git] / arch / mips / ralink / bootrom.c
blobe1fa5972a81db6158e54897e218e6949ece07ae8
1 /*
2 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU General Public License version 2 as published
4 * by the Free Software Foundation.
6 * Copyright (C) 2013 John Crispin <john@phrozen.org>
7 */
9 #include <linux/debugfs.h>
10 #include <linux/seq_file.h>
12 #define BOOTROM_OFFSET 0x10118000
13 #define BOOTROM_SIZE 0x8000
15 static void __iomem *membase = (void __iomem *) KSEG1ADDR(BOOTROM_OFFSET);
17 static int bootrom_show(struct seq_file *s, void *unused)
19 seq_write(s, membase, BOOTROM_SIZE);
21 return 0;
24 static int bootrom_open(struct inode *inode, struct file *file)
26 return single_open(file, bootrom_show, NULL);
29 static const struct file_operations bootrom_file_ops = {
30 .open = bootrom_open,
31 .read = seq_read,
32 .llseek = seq_lseek,
33 .release = single_release,
36 static int bootrom_setup(void)
38 if (!debugfs_create_file("bootrom", 0444,
39 NULL, NULL, &bootrom_file_ops)) {
40 pr_err("Failed to create bootrom debugfs file\n");
42 return -EINVAL;
45 return 0;
48 postcore_initcall(bootrom_setup);