mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
Add driver for NX-842 hardware on the PowerNV platform. This allows the use of the 842 compression hardware coprocessor on the PowerNV platform. Signed-off-by: Dan Streetman <ddstreet@ieee.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
25 lines
667 B
C
25 lines
667 B
C
#ifndef __NX842_H__
|
|
#define __NX842_H__
|
|
|
|
#define __NX842_PSERIES_MEM_COMPRESS (10240)
|
|
#define __NX842_POWERNV_MEM_COMPRESS (1024)
|
|
|
|
#define NX842_MEM_COMPRESS (max_t(unsigned int, \
|
|
__NX842_PSERIES_MEM_COMPRESS, __NX842_POWERNV_MEM_COMPRESS))
|
|
|
|
struct nx842_constraints {
|
|
int alignment;
|
|
int multiple;
|
|
int minimum;
|
|
int maximum;
|
|
};
|
|
|
|
int nx842_constraints(struct nx842_constraints *constraints);
|
|
|
|
int nx842_compress(const unsigned char *in, unsigned int in_len,
|
|
unsigned char *out, unsigned int *out_len, void *wrkmem);
|
|
int nx842_decompress(const unsigned char *in, unsigned int in_len,
|
|
unsigned char *out, unsigned int *out_len, void *wrkmem);
|
|
|
|
#endif
|