diff options
author | John Crispin <blogic@openwrt.org> | 2011-05-29 21:19:26 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2011-05-29 21:19:26 +0000 |
commit | 9af744afe836c76a099b67a7ea976724b1363923 (patch) | |
tree | b9da76295132f5efbc18c34b9de3db80de664403 /package/lqtapi/src/mps/mps.h | |
parent | c4509d34ea9afc5e373c353c48ccdf327f58217e (diff) | |
download | upstream-9af744afe836c76a099b67a7ea976724b1363923.tar.gz upstream-9af744afe836c76a099b67a7ea976724b1363923.tar.bz2 upstream-9af744afe836c76a099b67a7ea976724b1363923.zip |
[lantiq]
* backport 2.6.8 patches to .39 / .32.33
* remove lqtapi
* bump tapi/dsl to .39
* migrate to new ltq_ style api
* add amazon_se support
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27026 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/lqtapi/src/mps/mps.h')
-rw-r--r-- | package/lqtapi/src/mps/mps.h | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/package/lqtapi/src/mps/mps.h b/package/lqtapi/src/mps/mps.h deleted file mode 100644 index e759e5698c..0000000000 --- a/package/lqtapi/src/mps/mps.h +++ /dev/null @@ -1,85 +0,0 @@ -#ifndef __MPS_H__ -#define __MPS_H__ - -#include <linux/platform_device.h> -#include <linux/completion.h> - -struct mps_fifo_config -{ - size_t head_addr; - size_t tail_addr; - size_t base_addr; - size_t size_addr; - - size_t base; - size_t size; -}; - -struct mps_fifo { - void __iomem *base; - void __iomem *head_addr; - void __iomem *tail_addr; - uint32_t size; -}; - -struct mps_mailbox { - struct mps_fifo upstream; - struct mps_fifo downstream; -}; - -enum mps_boot_config -{ - MPS_BOOT_LEGACY = 1, - MPS_BOOT_ENCRYPTED = 2, -}; - -struct mps { - struct resource *res; - void __iomem *base; - - struct resource *mbox_res; - void __iomem *mbox_base; - - struct resource *cp1_res; - void __iomem *cp1_base; - - struct device *dev; - - int irq_ad0; - int irq_ad1; - int irq_base; -}; - -void mps_configure_fifo(struct mps *mps, struct mps_fifo *fifo, - const struct mps_fifo_config *config); - -void mps_configure_mailbox(struct mps *mps, struct mps_mailbox *mbox, - const struct mps_fifo_config *upstream_config, - const struct mps_fifo_config *downstream_config); - -void mps_load_firmware(struct mps *mps, const void *data, size_t size, - enum mps_boot_config config); - -static inline struct mps *device_to_mps(struct device *dev) -{ - return (struct mps *)dev_get_drvdata(dev); -} - -/* fifo */ -void mps_fifo_init(struct mps_fifo *fifo, void __iomem *data_addr, - void __iomem *head_addr, void __iomem *tail_addr, uint32_t size); -void mps_fifo_in(struct mps_fifo *fifo, const uint32_t *from, size_t len); -void mps_fifo_out(struct mps_fifo *fifo, uint32_t *to, size_t len); -uint32_t mps_fifo_peek(struct mps_fifo *fifo); -void mps_fifo_reset(struct mps_fifo *fifo); -size_t mps_fifo_len(struct mps_fifo *fifo); - -/* Mailbox */ -int mps_mailbox_init(struct mps_mailbox *mbox, const char *name, int irq); -int mps_mailbox_command_read(struct mps_mailbox *mbox, uint32_t cmd, - uint32_t *result); -int mps_mailbox_command_write(struct mps_mailbox *mbox, uint32_t cmd, - const uint32_t *data); - - -#endif |