#include <linux/ioport.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/soc/ixp4xx/qmgr.h>
#include <linux/soc/ixp4xx/cpu.h>
static struct qmgr_regs __iomem *qmgr_regs;
static int qmgr_irq_1;
static int qmgr_irq_2;
static spinlock_t qmgr_lock;
static u32 used_sram_bitmap[4];
static void (*irq_handlers[QUEUES])(void *pdev);
static void *irq_pdevs[QUEUES];
#if DEBUG_QMGR
char qmgr_queue_descs[QUEUES][32];
#endif
void qmgr_put_entry(unsigned int queue, u32 val)
{ … }
u32 qmgr_get_entry(unsigned int queue)
{ … }
static int __qmgr_get_stat1(unsigned int queue)
{ … }
static int __qmgr_get_stat2(unsigned int queue)
{ … }
int qmgr_stat_empty(unsigned int queue)
{ … }
int qmgr_stat_below_low_watermark(unsigned int queue)
{ … }
int qmgr_stat_full(unsigned int queue)
{ … }
int qmgr_stat_overflow(unsigned int queue)
{ … }
void qmgr_set_irq(unsigned int queue, int src,
void (*handler)(void *pdev), void *pdev)
{ … }
static irqreturn_t qmgr_irq1_a0(int irq, void *pdev)
{ … }
static irqreturn_t qmgr_irq2_a0(int irq, void *pdev)
{ … }
static irqreturn_t qmgr_irq(int irq, void *pdev)
{ … }
void qmgr_enable_irq(unsigned int queue)
{ … }
void qmgr_disable_irq(unsigned int queue)
{ … }
static inline void shift_mask(u32 *mask)
{ … }
#if DEBUG_QMGR
int qmgr_request_queue(unsigned int queue, unsigned int len ,
unsigned int nearly_empty_watermark,
unsigned int nearly_full_watermark,
const char *desc_format, const char* name)
#else
int __qmgr_request_queue(unsigned int queue, unsigned int len ,
unsigned int nearly_empty_watermark,
unsigned int nearly_full_watermark)
#endif
{ … }
void qmgr_release_queue(unsigned int queue)
{ … }
static int ixp4xx_qmgr_probe(struct platform_device *pdev)
{ … }
static void ixp4xx_qmgr_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id ixp4xx_qmgr_of_match[] = …;
static struct platform_driver ixp4xx_qmgr_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
EXPORT_SYMBOL(…);
EXPORT_SYMBOL(…);
EXPORT_SYMBOL(…);
EXPORT_SYMBOL(…);
EXPORT_SYMBOL(…);
EXPORT_SYMBOL(…);
EXPORT_SYMBOL(…);
EXPORT_SYMBOL(…);
EXPORT_SYMBOL(…);
#if DEBUG_QMGR
EXPORT_SYMBOL(qmgr_queue_descs);
EXPORT_SYMBOL(qmgr_request_queue);
#else
EXPORT_SYMBOL(…);
#endif
EXPORT_SYMBOL(…);