Release 4.7 arch/blackfin/mach-bf561/coreb.c
/* Load firmware into Core B on a BF561
*
* Copyright 2004-2009 Analog Devices Inc.
* Licensed under the GPL-2 or later.
*/
/* The Core B reset func requires code in the application that is loaded into
* Core B. In order to reset, the application needs to install an interrupt
* handler for Supplemental Interrupt 0, that sets RETI to 0xff600000 and
* writes bit 11 of SICB_SYSCR when bit 5 of SICA_SYSCR is 0. This causes Core
* B to stall when Supplemental Interrupt 0 is set, and will reset PC to
* 0xff600000 when COREB_SRAM_INIT is cleared.
*/
#include <linux/device.h>
#include <linux/fs.h>
#include <linux/kernel.h>
#include <linux/miscdevice.h>
#include <linux/module.h>
#define CMD_COREB_START _IO('b', 0)
#define CMD_COREB_STOP _IO('b', 1)
#define CMD_COREB_RESET _IO('b', 2)
static long
coreb_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
int ret = 0;
switch (cmd) {
case CMD_COREB_START:
bfin_write_SYSCR(bfin_read_SYSCR() & ~0x0020);
break;
case CMD_COREB_STOP:
bfin_write_SYSCR(bfin_read_SYSCR() | 0x0020);
bfin_write_SICB_SYSCR(bfin_read_SICB_SYSCR() | 0x0080);
break;
case CMD_COREB_RESET:
bfin_write_SICB_SYSCR(bfin_read_SICB_SYSCR() | 0x0080);
break;
default:
ret = -EINVAL;
break;
}
CSYNC();
return ret;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
| bryan wu | bryan wu | 52 | 59.09% | 1 | 25.00% |
| mike frysinger | mike frysinger | 36 | 40.91% | 3 | 75.00% |
| Total | 88 | 100.00% | 4 | 100.00% |
static const struct file_operations coreb_fops = {
.owner = THIS_MODULE,
.unlocked_ioctl = coreb_ioctl,
.llseek = noop_llseek,
};
static struct miscdevice coreb_dev = {
.minor = MISC_DYNAMIC_MINOR,
.name = "coreb",
.fops = &coreb_fops,
};
static int __init bf561_coreb_init(void)
{
return misc_register(&coreb_dev);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
| bryan wu | bryan wu | 13 | 81.25% | 1 | 50.00% |
| mike frysinger | mike frysinger | 3 | 18.75% | 1 | 50.00% |
| Total | 16 | 100.00% | 2 | 100.00% |
module_init(bf561_coreb_init);
static void __exit bf561_coreb_exit(void)
{
misc_deregister(&coreb_dev);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
| bryan wu | bryan wu | 14 | 93.33% | 1 | 50.00% |
| mike frysinger | mike frysinger | 1 | 6.67% | 1 | 50.00% |
| Total | 15 | 100.00% | 2 | 100.00% |
module_exit(bf561_coreb_exit);
MODULE_AUTHOR("Bas Vermeulen <bvermeul@blackstar.xs4all.nl>");
MODULE_DESCRIPTION("BF561 Core B Support");
MODULE_LICENSE("GPL");
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp |
| bryan wu | bryan wu | 140 | 63.93% | 1 | 11.11% |
| mike frysinger | mike frysinger | 69 | 31.51% | 5 | 55.56% |
| arnd bergmann | arnd bergmann | 5 | 2.28% | 1 | 11.11% |
| enrik berkhan | enrik berkhan | 4 | 1.83% | 1 | 11.11% |
| alexey dobriyan | alexey dobriyan | 1 | 0.46% | 1 | 11.11% |
| Total | 219 | 100.00% | 9 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.