blob: ff82e107b50c27c43331e9eb424815de41a54aaf [file] [log] [blame]
* Google LWIS SLC Device Driver
* Copyright (c) 2018 Google, LLC
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
#include "lwis_device.h"
#include <soc/google/pt.h>
#define MAX_NUM_PT 16
struct slc_partition {
int id;
size_t size_kb;
int fd;
ptid_t partition_id;
struct pt_handle *partition_handle;
* struct lwis_slc_device
* "Derived" lwis_device struct, with added slc related elements.
struct lwis_slc_device {
struct lwis_device base_dev;
int num_pt;
struct slc_partition pt[MAX_NUM_PT];
struct pt_handle *partition_handle;
int lwis_slc_device_deinit(void);
int lwis_slc_buffer_alloc(struct lwis_device *lwis_dev, struct lwis_alloc_buffer_info *alloc_info);
int lwis_slc_buffer_free(struct lwis_device *lwis_dev, int fd);
#endif /* LWIS_DEVICE_SLC_H_ */