OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [orpsocv2/] [sw/] [tests/] [cfi_ctrl/] [board/] [cfi_ctrl-readid.c] - Blame information for rev 714

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 655 julius
#include "board.h"
2
#include "cpu-utils.h"
3
#include "cfi_ctrl.h"
4
#include "uart.h"
5
#include "printf.h"
6
 
7
#include "orpsoc-defines.h"
8
 
9
 
10
int main(void)
11
{
12
  uart_init(DEFAULT_UART);
13
 
14
  printf("\nReading some CFI ID\n");
15
  printf("manufacturer code: %04x\n",cfi_ctrl_read_identifier(0x00)&0xffff);
16
  printf("Device ID: %04x\n",cfi_ctrl_read_identifier(0x01)&0xffff);
17
  printf("RCR: %04x\n",cfi_ctrl_read_identifier(0x05)&0xffff);
18
 
19
  printf("query info: %04x\n",cfi_ctrl_query_info(0x10)&0xffff);
20
  printf("query info: %04x\n",cfi_ctrl_query_info(0x11)&0xffff);
21
  printf("query info: %04x\n",cfi_ctrl_query_info(0x12)&0xffff);
22
  printf("device timing & voltage info: %04x\n",
23
         cfi_ctrl_query_info(0x1b)&0xffff);
24
 
25
  report(0x8000000d);
26
  exit(0);
27
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.