#include "armv4_5.h"
-typedef struct orion_nand_controller_s
+struct orion_nand_controller
{
struct target_s *target;
uint32_t cmd;
uint32_t addr;
uint32_t data;
-} orion_nand_controller_t;
+};
#define CHECK_HALTED \
do { \
static int orion_nand_command(struct nand_device_s *nand, uint8_t command)
{
- orion_nand_controller_t *hw = nand->controller_priv;
+ struct orion_nand_controller *hw = nand->controller_priv;
target_t *target = hw->target;
CHECK_HALTED;
static int orion_nand_address(struct nand_device_s *nand, uint8_t address)
{
- orion_nand_controller_t *hw = nand->controller_priv;
+ struct orion_nand_controller *hw = nand->controller_priv;
target_t *target = hw->target;
CHECK_HALTED;
static int orion_nand_read(struct nand_device_s *nand, void *data)
{
- orion_nand_controller_t *hw = nand->controller_priv;
+ struct orion_nand_controller *hw = nand->controller_priv;
target_t *target = hw->target;
CHECK_HALTED;
static int orion_nand_write(struct nand_device_s *nand, uint16_t data)
{
- orion_nand_controller_t *hw = nand->controller_priv;
+ struct orion_nand_controller *hw = nand->controller_priv;
target_t *target = hw->target;
CHECK_HALTED;
static int orion_nand_fast_block_write(struct nand_device_s *nand, uint8_t *data, int size)
{
- orion_nand_controller_t *hw = nand->controller_priv;
+ struct orion_nand_controller *hw = nand->controller_priv;
int retval;
hw->io.chunk_size = nand->page_size;
NAND_DEVICE_COMMAND_HANDLER(orion_nand_device_command)
{
- orion_nand_controller_t *hw;
+ struct orion_nand_controller *hw;
uint32_t base;
uint8_t ale, cle;