Seth Jennings | 0e16aaf | 2012-07-19 09:42:40 -0500 | [diff] [blame] | 1 | #ifndef __NX842_H__ |
| 2 | #define __NX842_H__ |
| 3 | |
Dan Streetman | 99182a42 | 2015-05-07 13:49:19 -0400 | [diff] [blame] | 4 | #define __NX842_PSERIES_MEM_COMPRESS (10240) |
| 5 | #define __NX842_POWERNV_MEM_COMPRESS (1024) |
Dan Streetman | 7011a12 | 2015-05-07 13:49:17 -0400 | [diff] [blame] | 6 | |
Dan Streetman | 99182a42 | 2015-05-07 13:49:19 -0400 | [diff] [blame] | 7 | #define NX842_MEM_COMPRESS (max_t(unsigned int, \ |
| 8 | __NX842_PSERIES_MEM_COMPRESS, __NX842_POWERNV_MEM_COMPRESS)) |
Dan Streetman | 7011a12 | 2015-05-07 13:49:17 -0400 | [diff] [blame] | 9 | |
Dan Streetman | 959e665 | 2015-05-07 13:49:18 -0400 | [diff] [blame] | 10 | struct nx842_constraints { |
| 11 | int alignment; |
| 12 | int multiple; |
| 13 | int minimum; |
| 14 | int maximum; |
| 15 | }; |
| 16 | |
| 17 | int nx842_constraints(struct nx842_constraints *constraints); |
| 18 | |
Seth Jennings | 0e16aaf | 2012-07-19 09:42:40 -0500 | [diff] [blame] | 19 | int nx842_compress(const unsigned char *in, unsigned int in_len, |
Dan Streetman | 7011a12 | 2015-05-07 13:49:17 -0400 | [diff] [blame] | 20 | unsigned char *out, unsigned int *out_len, void *wrkmem); |
Seth Jennings | 0e16aaf | 2012-07-19 09:42:40 -0500 | [diff] [blame] | 21 | int nx842_decompress(const unsigned char *in, unsigned int in_len, |
Dan Streetman | 7011a12 | 2015-05-07 13:49:17 -0400 | [diff] [blame] | 22 | unsigned char *out, unsigned int *out_len, void *wrkmem); |
Seth Jennings | 0e16aaf | 2012-07-19 09:42:40 -0500 | [diff] [blame] | 23 | |
| 24 | #endif |