Skip to content

Commit

Permalink
include: add/adapt header files
Browse files Browse the repository at this point in the history
  • Loading branch information
esno committed Feb 14, 2021
1 parent 746e4fd commit 31a19e0
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 14 deletions.
6 changes: 6 additions & 0 deletions include/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,12 @@ void serial_puts (const char *);
int serial_getc (void);
int serial_tstc (void);

// ghcstop_pollux_add
void uart1_tx_byte(unsigned char ch);
void serial1_putc(const char c);
void serial1_puts(const char *s);


void _serial_setbrg (const int);
void _serial_putc (const char, const int);
void _serial_putc_raw(const char, const int);
Expand Down
2 changes: 2 additions & 0 deletions include/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/* Automatically generated - do not edit */
#include <configs/n35.h>
4 changes: 4 additions & 0 deletions include/config.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ARCH = arm
CPU = arm926ejs
BOARD = n35
SOC = pollux
36 changes: 22 additions & 14 deletions include/flash.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ typedef struct {
ulong start[CFG_MAX_FLASH_SECT]; /* physical sector start addresses */
uchar protect[CFG_MAX_FLASH_SECT]; /* sector protection status */
#ifdef CFG_FLASH_CFI
uchar portwidth; /* the width of the port */
uchar chipwidth; /* the width of the chip */
uchar portwidth; /* the width of the port */
uchar chipwidth; /* the width of the chip */
ushort buffer_size; /* # of bytes in write buffer */
ulong erase_blk_tout; /* maximum block erase timeout */
ulong write_tout; /* maximum write timeout */
ulong write_tout; /* maximum write timeout */
ulong buffer_write_tout; /* maximum buffer write timeout */
ushort vendor; /* the primary vendor id */
ushort cmd_reset; /* Vendor specific reset command */
ushort interface; /* used for x8/x16 adjustments */
ushort vendor; /* the primary vendor id */
ushort cmd_reset; /* Vendor specific reset command */
ushort interface; /* used for x8/x16 adjustments */
ushort legacy_unlock; /* support Intel legacy (un)locking */
#endif
} flash_info_t;
Expand Down Expand Up @@ -123,14 +123,15 @@ extern void flash_read_factory_serial(flash_info_t * info, void * buffer, int of
#define ATM_MANUFACT 0x001F001F /* ATMEL */
#define STM_MANUFACT 0x00200020 /* STM (Thomson) manuf. ID in D23.. -"- */
#define SST_MANUFACT 0x00BF00BF /* SST manuf. ID in D23..D16, D7..D0 */
#define MT_MANUFACT 0x00890089 /* MT manuf. ID in D23..D16, D7..D0 */
#define MT_MANUFACT 0x00890089 /* MT manuf. ID in D23..D16, D7..D0 */
#define INTEL_MANUFACT 0x00890089 /* INTEL manuf. ID in D23..D16, D7..D0 */
#define INTEL_ALT_MANU 0x00B000B0 /* alternate INTEL namufacturer ID */
#define MX_MANUFACT 0x00C200C2 /* MXIC manuf. ID in D23..D16, D7..D0 */
#define MX_MANUFACT 0x00C200C2 /* MXIC manuf. ID in D23..D16, D7..D0 */
#define TOSH_MANUFACT 0x00980098 /* TOSHIBA manuf. ID in D23..D16, D7..D0 */
#define MT2_MANUFACT 0x002C002C /* alternate MICRON manufacturer ID*/
#define EXCEL_MANUFACT 0x004A004A /* Excel Semiconductor */


/* Micron Technologies (INTEL compat.) */
#define MT_ID_28F400_T 0x44704470 /* 28F400B3 ID ( 4 M, top boot sector) */
#define MT_ID_28F400_B 0x44714471 /* 28F400B3 ID ( 4 M, bottom boot sect) */
Expand Down Expand Up @@ -299,6 +300,10 @@ extern void flash_read_factory_serial(flash_info_t * info, void * buffer, int of
#define TOSH_ID_FVT160 0xC2 /* TC58FVT160 ID (16 M, top ) */
#define TOSH_ID_FVB160 0x43 /* TC58FVT160 ID (16 M, bottom ) */

#define EXCEL_ID_LV320ET 0xF6 /* CORERIVER 32M = 2M x 16 */
#define EXCEL_ID_LV320EB 0xF9 /* CORERIVER 32M = 2M x 16 */


/*-----------------------------------------------------------------------
* Internal FLASH identification codes
*
Expand All @@ -323,7 +328,7 @@ extern void flash_read_factory_serial(flash_info_t * info, void * buffer, int of
#define FLASH_AM320T 0x0008 /* AMD AM29LV320 */
#define FLASH_AM320B 0x0009

#define FLASH_AM080 0x000A /* AMD Am29F080B */
#define FLASH_AM080 0x000A /* AMD Am29F080B */
/* 16 64K x 8 uniform sectors */

#define FLASH_AMDL322T 0x0010 /* AMD AM29DL322 */
Expand All @@ -345,8 +350,8 @@ extern void flash_read_factory_serial(flash_info_t * info, void * buffer, int of
#define FLASH_SST400A 0x0042 /* SST 39xF400A ID ( 4M = 256K x 16 ) */
#define FLASH_SST800A 0x0044 /* SST 39xF800A ID ( 8M = 512K x 16 ) */
#define FLASH_SST160A 0x0046 /* SST 39xF160A ID ( 16M = 1M x 16 ) */
#define FLASH_SST320 0x0048 /* SST 39xF160A ID ( 16M = 1M x 16 ) */
#define FLASH_SST640 0x004A /* SST 39xF160A ID ( 16M = 1M x 16 ) */
#define FLASH_SST320 0x0048 /* SST 39xF320 ID ( 16M = 1M x 16 ) */
#define FLASH_SST640 0x004A /* SST 39xF640A ID ( 16M = 1M x 16 ) */
#define FLASH_SST020 0x0024 /* SST 39xF020 ID (256KB = 2Mbit x 8 ) */
#define FLASH_SST040 0x000E /* SST 39xF040 ID (512KB = 4Mbit x 8 ) */

Expand Down Expand Up @@ -394,9 +399,9 @@ extern void flash_read_factory_serial(flash_info_t * info, void * buffer, int of
#define FLASH_28F640C3B 0x00A1 /* Intel 28F640C3B ( 64M = 4M x 16 ) */
#define FLASH_AMLV320U 0x00A2 /* AMD 29LV320M ( 32M = 2M x 16 ) */

#define FLASH_AM033 0x00A3 /* AMD AmL033C90V1 (32M = 4M x 8) */
#define FLASH_AM065 0x0093 /* AMD AmL065DU12RI (64M = 8M x 8) */
#define FLASH_AT040 0x00A5 /* Amtel AT49LV040 (4M = 512K x 8) */
#define FLASH_AM033 0x00A3 /* AMD AmL033C90V1 (32M = 4M x 8) */
#define FLASH_AM065 0x0093 /* AMD AmL065DU12RI (64M = 8M x 8) */
#define FLASH_AT040 0x00A5 /* Amtel AT49LV040 (4M = 512K x 8) */

#define FLASH_AMLV640U 0x00A4 /* AMD 29LV640M ( 64M = 4M x 16 ) */
#define FLASH_AMLV128U 0x00A6 /* AMD 29LV128M ( 128M = 8M x 16 ) */
Expand All @@ -422,6 +427,9 @@ extern void flash_read_factory_serial(flash_info_t * info, void * buffer, int of
#define FLASH_S29GL064M 0x00F0 /* Spansion S29GL064M-R6 */
#define FLASH_S29GL128N 0x00F1 /* Spansion S29GL128N */

#define FLASH_LV320ET 0x00E5 /* CORERIVER CR29LV320ET */
#define FLASH_LV320EB 0x00E6 /* CORERIVER CR29LV320EB */

#define FLASH_UNKNOWN 0xFFFF /* unknown flash type */


Expand Down
1 change: 1 addition & 0 deletions include/nand.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ struct nand_erase_options {
* (write appropriate cleanmarker blocks) */
int scrub; /* if true, really clean NAND by erasing
* bad blocks (UNSAFE) */
int format;
};

typedef struct nand_erase_options nand_erase_options_t;
Expand Down

0 comments on commit 31a19e0

Please sign in to comment.