Changeset 1459
- Timestamp:
- 11/04/11 22:35:26 (7 months ago)
- Location:
- trunk
- Files:
-
- 1 added
- 7 edited
-
Makefile (modified) (1 diff)
-
chipdrivers.h (modified) (1 diff)
-
flash.h (modified) (1 diff)
-
flashchips.c (modified) (1 diff)
-
flashchips.h (modified) (1 diff)
-
opaque.c (added)
-
print.c (modified) (2 diffs)
-
programmer.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Makefile
r1443 r1459 243 243 sst28sf040.o m29f400bt.o 82802ab.o pm49fl00x.o \ 244 244 sst49lfxxxc.o sst_fwhub.o flashchips.o spi.o spi25.o sharplhf00l04.o \ 245 a25.o at25.o 245 a25.o at25.o opaque.o 246 246 247 247 LIB_OBJS = layout.o -
trunk/chipdrivers.h
r1450 r1459 58 58 int spi_write_chunked(struct flashchip *flash, uint8_t *buf, int start, int len, int chunksize); 59 59 int spi_aai_write(struct flashchip *flash, uint8_t *buf, int start, int len); 60 61 /* opaque.c */ 62 int probe_opaque(struct flashchip *flash); 63 int read_opaque(struct flashchip *flash, uint8_t *buf, int start, int len); 64 int write_opaque(struct flashchip *flash, uint8_t *buf, int start, int len); 65 int erase_opaque(struct flashchip *flash, unsigned int blockaddr, unsigned int blocklen); 60 66 61 67 /* a25.c */ -
trunk/flash.h
r1450 r1459 63 63 BUS_FWH = 1 << 2, 64 64 BUS_SPI = 1 << 3, 65 BUS_PROG = 1 << 4, 65 66 BUS_NONSPI = BUS_PARALLEL | BUS_LPC | BUS_FWH, 66 BUS_UNKNOWN = BUS_PARALLEL | BUS_LPC | BUS_FWH | BUS_SPI,67 67 }; 68 68 -
trunk/flashchips.c
r1454 r1459 8875 8875 8876 8876 { 8877 .vendor = "Programmer", 8878 .name = "Opaque flash chip", 8879 .bustype = BUS_PROG, 8880 .manufacture_id = PROGMANUF_ID, 8881 .model_id = PROGDEV_ID, 8882 .total_size = 0, 8883 .page_size = 256, 8884 /* probe is assumed to work, rest will be filled in by probe */ 8885 .tested = TEST_OK_PROBE, 8886 .probe = probe_opaque, 8887 /* eraseblock sizes will be set by the probing function */ 8888 .block_erasers = 8889 { 8890 { 8891 .block_erase = erase_opaque, 8892 } 8893 }, 8894 .write = write_opaque, 8895 .read = read_opaque, 8896 }, 8897 8898 { 8877 8899 .vendor = "AMIC", 8878 8900 .name = "unknown AMIC SPI chip", -
trunk/flashchips.h
r1439 r1459 647 647 #define WINBOND_W49V002FA 0x32 648 648 649 #define PROGMANUF_ID 0xFFFE /* dummy ID for opaque chips behind a programmer */ 650 #define PROGDEV_ID 0x01 /* dummy ID for opaque chips behind a programmer */ 651 649 652 #endif /* !FLASHCHIPS_H */ -
trunk/print.c
r1458 r1459 33 33 { 34 34 char *ret = calloc(1, 1); 35 if (bustype == BUS_UNKNOWN) {36 ret = strcat_realloc(ret, "Unknown, ");37 35 /* 38 36 * FIXME: Once all chipsets and flash chips have been updated, NONSPI 39 37 * will cease to exist and should be eliminated here as well. 40 38 */ 41 } elseif (bustype == BUS_NONSPI) {39 if (bustype == BUS_NONSPI) { 42 40 ret = strcat_realloc(ret, "Non-SPI, "); 43 41 } else { … … 50 48 if (bustype & BUS_SPI) 51 49 ret = strcat_realloc(ret, "SPI, "); 50 if (bustype & BUS_PROG) 51 ret = strcat_realloc(ret, "Programmer-specific, "); 52 52 if (bustype == BUS_NONE) 53 53 ret = strcat_realloc(ret, "None, "); -
trunk/programmer.h
r1456 r1459 24 24 #ifndef __PROGRAMMER_H__ 25 25 #define __PROGRAMMER_H__ 1 26 27 #include "flash.h" /* for chipaddr and flashchip */ 26 28 27 29 enum programmer { … … 602 604 #endif 603 605 606 /* opaque.c */ 607 struct opaque_programmer { 608 int max_data_read; 609 int max_data_write; 610 /* Specific functions for this programmer */ 611 int (*probe) (struct flashchip *flash); 612 int (*read) (struct flashchip *flash, uint8_t *buf, int start, int len); 613 int (*write) (struct flashchip *flash, uint8_t *buf, int start, int len); 614 int (*erase) (struct flashchip *flash, unsigned int blockaddr, unsigned int blocklen); 615 }; 616 extern const struct opaque_programmer *opaque_programmer; 617 void register_opaque_programmer(const struct opaque_programmer *pgm); 618 604 619 /* serprog.c */ 605 620 #if CONFIG_SERPROG == 1
Note: See TracChangeset
for help on using the changeset viewer.
