blob: 4ddf68d9c0d433bed5e9ef8c71fbc7e238c6acea [file] [log] [blame]
Seth Jennings0e16aaf2012-07-19 09:42:40 -05001#ifndef __NX842_H__
2#define __NX842_H__
3
Dan Streetman99182a422015-05-07 13:49:19 -04004#define __NX842_PSERIES_MEM_COMPRESS (10240)
5#define __NX842_POWERNV_MEM_COMPRESS (1024)
Dan Streetman7011a122015-05-07 13:49:17 -04006
Dan Streetman99182a422015-05-07 13:49:19 -04007#define NX842_MEM_COMPRESS (max_t(unsigned int, \
8 __NX842_PSERIES_MEM_COMPRESS, __NX842_POWERNV_MEM_COMPRESS))
Dan Streetman7011a122015-05-07 13:49:17 -04009
Dan Streetman959e6652015-05-07 13:49:18 -040010struct nx842_constraints {
11 int alignment;
12 int multiple;
13 int minimum;
14 int maximum;
15};
16
17int nx842_constraints(struct nx842_constraints *constraints);
18
Seth Jennings0e16aaf2012-07-19 09:42:40 -050019int nx842_compress(const unsigned char *in, unsigned int in_len,
Dan Streetman7011a122015-05-07 13:49:17 -040020 unsigned char *out, unsigned int *out_len, void *wrkmem);
Seth Jennings0e16aaf2012-07-19 09:42:40 -050021int nx842_decompress(const unsigned char *in, unsigned int in_len,
Dan Streetman7011a122015-05-07 13:49:17 -040022 unsigned char *out, unsigned int *out_len, void *wrkmem);
Seth Jennings0e16aaf2012-07-19 09:42:40 -050023
24#endif