RTEMS 6.3
Loading...
Searching...
No Matches
jffs2_qspi.c File Reference

MicroBlaze AXI QSPI JFFS2 flash driver implementation. More...

#include <assert.h>
#include <errno.h>
#include <string.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <bspopts.h>
#include <dev/spi/xilinx-axi-spi.h>
#include <linux/spi/spidev.h>
#include <rtems/jffs2.h>
#include <rtems/libio.h>
#include <bsp.h>
#include <bsp/jffs2_qspi.h>

Data Structures

struct  flash_control

Macros

#define BLOCK_SIZE   (64UL * 1024UL)
#define FLASH_SIZE   (32UL * BLOCK_SIZE)
#define FLASH_PAGE_SIZE   256
#define FLASH_NUM_CS   2
#define FLASH_DEVICE_ID   0xbb19
#define BUS_PATH   "/dev/spi-0"
#define FLASH_MOUNT_POINT   "/mnt"
#define READ_WRITE_EXTRA_BYTES   4
#define WRITE_ENABLE_BYTES   1
#define SECTOR_ERASE_BYTES   4
#define COMMAND_QUAD_WRITE   0x32
#define COMMAND_SECTOR_ERASE   0xD8
#define COMMAND_QUAD_READ   0x6B
#define COMMAND_STATUSREG_READ   0x05
#define COMMAND_WRITE_ENABLE   0x06
#define FLASH_SR_IS_READY_MASK   0x01

Functions

int microblaze_jffs2_initialize (const char *mount_dir)
 Mount jffs2 filesystem.

Detailed Description

MicroBlaze AXI QSPI JFFS2 flash driver implementation.

Function Documentation

◆ microblaze_jffs2_initialize()

int microblaze_jffs2_initialize ( const char * mount_dir)

Mount jffs2 filesystem.

Parameters
[in]mount_dirThe directory to mount the filesystem at.
Return values
0Successful operation. Negative number otherwise.