/* * Copyright 2011-2012, Meador Inge, Mentor Graphics Corporation. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 of the * License. * */ #ifndef _ASM_MPIC_MSGR_H #define _ASM_MPIC_MSGR_H #include <linux/types.h> #include <linux/spinlock.h> #include <asm/smp.h> #include <asm/io.h> struct mpic_msgr { u32 __iomem *base; u32 __iomem *mer; int irq; unsigned char in_use; raw_spinlock_t lock; int num; }; /* Get a message register * * @reg_num: the MPIC message register to get * * A pointer to the message register is returned. If * the message register asked for is already in use, then * EBUSY is returned. If the number given is not associated * with an actual message register, then ENODEV is returned. * Successfully getting the register marks it as in use. */ extern struct mpic_msgr *mpic_msgr_get(unsigned int reg_num); /* Relinquish a message register * * @msgr: the message register to return * * Disables the given message register and marks it as free. * After this call has completed successully the message * register is available to be acquired by a call to * mpic_msgr_get. */ extern void mpic_msgr_put(struct mpic_msgr *msgr); /* Enable a message register * * @msgr: the message register to enable * * The given message register is enabled for sending * messages. */ extern void mpic_msgr_enable(struct mpic_msgr *msgr); /* Disable a message register * * @msgr: the message register to disable * * The given message register is disabled for sending * messages. */ extern void mpic_msgr_disable(struct mpic_msgr *msgr); /* Write a message to a message register * * @msgr: the message register to write to * @message: the message to write * * The given 32-bit message is written to the given message * register. Writing to an enabled message registers fires * an interrupt. */
static inline void mpic_msgr_write(struct mpic_msgr *msgr, u32 message) { out_be32(msgr->base, message); }Contributors
Person | Tokens | Prop | Commits | CommitProp |
Jia Hongtao | 24 | 100.00% | 1 | 100.00% |
Total | 24 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Jia Hongtao | 20 | 100.00% | 1 | 100.00% |
Total | 20 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Jia Hongtao | 20 | 100.00% | 1 | 100.00% |
Total | 20 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Jia Hongtao | 29 | 100.00% | 1 | 100.00% |
Total | 29 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Jia Hongtao | 17 | 100.00% | 1 | 100.00% |
Total | 17 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Jia Hongtao | 202 | 96.65% | 1 | 25.00% |
Mingkai Hu | 3 | 1.44% | 1 | 25.00% |
Scott Wood | 3 | 1.44% | 1 | 25.00% |
Michael Ellerman | 1 | 0.48% | 1 | 25.00% |
Total | 209 | 100.00% | 4 | 100.00% |