diff options
Diffstat (limited to 'c/src/lib/libbsp/powerpc/shared/flash')
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/flash/flash.c | 28 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/flash/flashPgm.h | 22 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/flash/flashPgmPvt.h | 32 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/flash/intelFlash.c | 26 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/flash/spansionFlash.c | 24 |
5 files changed, 66 insertions, 66 deletions
diff --git a/c/src/lib/libbsp/powerpc/shared/flash/flash.c b/c/src/lib/libbsp/powerpc/shared/flash/flash.c index 02558dccb0..687c533489 100644 --- a/c/src/lib/libbsp/powerpc/shared/flash/flash.c +++ b/c/src/lib/libbsp/powerpc/shared/flash/flash.c @@ -28,19 +28,19 @@ * and other combinations are untested. */ -/* +/* * Authorship * ---------- * This software was created by * Till Straumann <strauman@slac.stanford.edu>, 2005-2007, * Stanford Linear Accelerator Center, Stanford University. - * + * * Acknowledgement of sponsorship * ------------------------------ * The software was produced by * the Stanford Linear Accelerator Center, Stanford University, * under Contract DE-AC03-76SFO0515 with the Department of Energy. - * + * * Government disclaimer of liability * ---------------------------------- * Neither the United States nor the United States Department of Energy, @@ -49,18 +49,18 @@ * completeness, or usefulness of any data, apparatus, product, or process * disclosed, or represents that its use would not infringe privately owned * rights. - * + * * Stanford disclaimer of liability * -------------------------------- * Stanford University makes no representations or warranties, express or * implied, nor assumes any liability for the use of this software. - * + * * Stanford disclaimer of copyright * -------------------------------- * Stanford University, owner of the copyright, hereby disclaims its * copyright and all other rights in this software. Hence, anyone may - * freely use it for any purpose without restriction. - * + * freely use it for any purpose without restriction. + * * Maintenance of notices * ---------------------- * In the interest of clarity regarding the origin and status of this @@ -69,9 +69,9 @@ * or distributed by the recipient and are to be affixed to any copy of * software made or distributed by the recipient that contains a copy or * derivative of this software. - * + * * ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03 - */ + */ #ifndef TESTING #include <rtems.h> #include <bsp/flashPgm.h> @@ -331,7 +331,7 @@ bail: * This is not really clean since (until we implement CFI) * we already need to know what kind of device it is to * be able to read its ID... - * + * * NOTES: - device switched back to array mode on exit. * - 'addr' must be 32-bit aligned. */ @@ -390,7 +390,7 @@ struct devdesc *dd; /* Scan address range for flash devices and compute total size * of bank. - * + * * RETURNS: size in bytes. */ STATIC uint32_t @@ -573,7 +573,7 @@ uint32_t a,e; if ( quiet < 2 ) { printf("ERASING "); fflush(stdout); } - + if ( (i = BSP_flashErase(bank, a, e-a, quiet ? quiet : 1)) ) return i; @@ -719,7 +719,7 @@ int f; if ( quiet < 2 ) { f = flip(f); } - + a += b->fblksz; size -= b->fblksz; } @@ -787,7 +787,7 @@ unsigned f = 0; perror("Opening file"); return -1; } - + if ( sz ) break; diff --git a/c/src/lib/libbsp/powerpc/shared/flash/flashPgm.h b/c/src/lib/libbsp/powerpc/shared/flash/flashPgm.h index 3b49ff172c..aae35966e5 100644 --- a/c/src/lib/libbsp/powerpc/shared/flash/flashPgm.h +++ b/c/src/lib/libbsp/powerpc/shared/flash/flashPgm.h @@ -92,11 +92,11 @@ BSP_flashErase(int bank, uint32_t offset, uint32_t size, int quiet); * not block-aligned then adjacent data are preserved provided that * the relevant chunks of the destination are blank (erased). * - * | <neighbour> fffffff | + * | <neighbour> fffffff | * ^--- destination ----- ^ * | : block boundary * f : blank/erased pieces - * + * * (If the start of the destination region up to the next block boundary * is blank then '<neighbour>'-data is preserved. The end of the * destination is treated the same way.) @@ -162,19 +162,19 @@ BSP_flashBlockSize(int bank); } #endif -/* +/* * Authorship * ---------- * This software was created by * Till Straumann <strauman@slac.stanford.edu>, 2005-2007, * Stanford Linear Accelerator Center, Stanford University. - * + * * Acknowledgement of sponsorship * ------------------------------ * The software was produced by * the Stanford Linear Accelerator Center, Stanford University, * under Contract DE-AC03-76SFO0515 with the Department of Energy. - * + * * Government disclaimer of liability * ---------------------------------- * Neither the United States nor the United States Department of Energy, @@ -183,18 +183,18 @@ BSP_flashBlockSize(int bank); * completeness, or usefulness of any data, apparatus, product, or process * disclosed, or represents that its use would not infringe privately owned * rights. - * + * * Stanford disclaimer of liability * -------------------------------- * Stanford University makes no representations or warranties, express or * implied, nor assumes any liability for the use of this software. - * + * * Stanford disclaimer of copyright * -------------------------------- * Stanford University, owner of the copyright, hereby disclaims its * copyright and all other rights in this software. Hence, anyone may - * freely use it for any purpose without restriction. - * + * freely use it for any purpose without restriction. + * * Maintenance of notices * ---------------------- * In the interest of clarity regarding the origin and status of this @@ -203,8 +203,8 @@ BSP_flashBlockSize(int bank); * or distributed by the recipient and are to be affixed to any copy of * software made or distributed by the recipient that contains a copy or * derivative of this software. - * + * * ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03 - */ + */ #endif diff --git a/c/src/lib/libbsp/powerpc/shared/flash/flashPgmPvt.h b/c/src/lib/libbsp/powerpc/shared/flash/flashPgmPvt.h index 55d0bf1333..c035a08ef2 100644 --- a/c/src/lib/libbsp/powerpc/shared/flash/flashPgmPvt.h +++ b/c/src/lib/libbsp/powerpc/shared/flash/flashPgmPvt.h @@ -10,10 +10,10 @@ /* DO NOT INCLUDE THIS HEADER FROM APPLICATION CODE */ /* - * Glue interface -- to be used only internally by BSP + * Glue interface -- to be used only internally by BSP * and chip drivers: * - BSP provides info about what chip drivers to use - * as well as 'wiring' info (how many devices are + * as well as 'wiring' info (how many devices are * operated in parallel etc). * - Chip drivers provide low-level 'methods' / 'ops' * for performing basic operations which are used @@ -40,19 +40,19 @@ * width to make it more generic. */ -/* +/* * Authorship * ---------- * This software was created by * Till Straumann <strauman@slac.stanford.edu>, 2005-2007, * Stanford Linear Accelerator Center, Stanford University. - * + * * Acknowledgement of sponsorship * ------------------------------ * The software was produced by * the Stanford Linear Accelerator Center, Stanford University, * under Contract DE-AC03-76SFO0515 with the Department of Energy. - * + * * Government disclaimer of liability * ---------------------------------- * Neither the United States nor the United States Department of Energy, @@ -61,18 +61,18 @@ * completeness, or usefulness of any data, apparatus, product, or process * disclosed, or represents that its use would not infringe privately owned * rights. - * + * * Stanford disclaimer of liability * -------------------------------- * Stanford University makes no representations or warranties, express or * implied, nor assumes any liability for the use of this software. - * + * * Stanford disclaimer of copyright * -------------------------------- * Stanford University, owner of the copyright, hereby disclaims its * copyright and all other rights in this software. Hence, anyone may - * freely use it for any purpose without restriction. - * + * freely use it for any purpose without restriction. + * * Maintenance of notices * ---------------------- * In the interest of clarity regarding the origin and status of this @@ -81,9 +81,9 @@ * or distributed by the recipient and are to be affixed to any copy of * software made or distributed by the recipient that contains a copy or * derivative of this software. - * + * * ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03 - */ + */ #include <stdint.h> @@ -185,7 +185,7 @@ struct vendesc { /* array of supported devices; * the 'ops' specified below * are used to access these devices - */ + */ struct devdesc *known_devs; /* access methods for talking to * devices associated with this @@ -202,14 +202,14 @@ struct flash_bank_ops { /* Read vendor/device ID; Return 0 on success, nonzero if unable to read id */ int (*get_id)(struct bankdesc *b, uint32_t addr, uint32_t *pVendorId, uint32_t *pDeviceId); /* Unlock block holding 'addr'ess - * + * * NOTES: - device switched back to array mode on exit. * - 'addr' must be 32-bit aligned. */ void (*unlock_block)(struct bankdesc *b, uint32_t addr); /* Lock block holding 'addr'ess - * + * * NOTES: - device switched back to array mode on exit. * - 'addr' must be 32-bit aligned. */ @@ -255,9 +255,9 @@ struct flash_bank_ops { struct flash_bsp_ops { /* Return descriptor for bank # 'bank' or NULL (invalid arg) */ struct bankdesc *(*bankcheck)(int bank, int quiet); -/* set (enbl:1), clear (enbl:0) or query (enbl:-1) +/* set (enbl:1), clear (enbl:0) or query (enbl:-1) * on-board write protection. - * + * * RETURNS 0 on success, nonzero on error. */ int (*flash_wp)(int bank, int enbl); diff --git a/c/src/lib/libbsp/powerpc/shared/flash/intelFlash.c b/c/src/lib/libbsp/powerpc/shared/flash/intelFlash.c index c0685b32f0..a2059a029a 100644 --- a/c/src/lib/libbsp/powerpc/shared/flash/intelFlash.c +++ b/c/src/lib/libbsp/powerpc/shared/flash/intelFlash.c @@ -10,19 +10,19 @@ * mode (width=2). */ -/* +/* * Authorship * ---------- * This software was created by * Till Straumann <strauman@slac.stanford.edu>, 2005-2007, * Stanford Linear Accelerator Center, Stanford University. - * + * * Acknowledgement of sponsorship * ------------------------------ * The software was produced by * the Stanford Linear Accelerator Center, Stanford University, * under Contract DE-AC03-76SFO0515 with the Department of Energy. - * + * * Government disclaimer of liability * ---------------------------------- * Neither the United States nor the United States Department of Energy, @@ -31,18 +31,18 @@ * completeness, or usefulness of any data, apparatus, product, or process * disclosed, or represents that its use would not infringe privately owned * rights. - * + * * Stanford disclaimer of liability * -------------------------------- * Stanford University makes no representations or warranties, express or * implied, nor assumes any liability for the use of this software. - * + * * Stanford disclaimer of copyright * -------------------------------- * Stanford University, owner of the copyright, hereby disclaims its * copyright and all other rights in this software. Hence, anyone may - * freely use it for any purpose without restriction. - * + * freely use it for any purpose without restriction. + * * Maintenance of notices * ---------------------- * In the interest of clarity regarding the origin and status of this @@ -51,9 +51,9 @@ * or distributed by the recipient and are to be affixed to any copy of * software made or distributed by the recipient that contains a copy or * derivative of this software. - * + * * ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03 - */ + */ #ifdef TESTING #define TIMEOUT_US 100000 @@ -176,7 +176,7 @@ struct vendesc BSP_flash_vendor_intel[] = /********* Helper Subroutines ******************/ -/* Basic low-level access routine for writing a command to the +/* Basic low-level access routine for writing a command to the * internal state machine. * * Flash is slow, so who cares if these access routines @@ -351,7 +351,7 @@ int i; } /* Unlock block holding 'addr'ess - * + * * NOTES: - device switched back to array mode on exit. * - 'addr' must be 32-bit aligned. */ @@ -368,7 +368,7 @@ flash_unlock_block_intel(struct bankdesc *b, uint32_t addr) } /* Lock block holding 'addr'ess - * + * * NOTES: - device switched back to array mode on exit. * - 'addr' must be 32-bit aligned. */ @@ -428,7 +428,7 @@ union { /* Query device for basic information verifying that we talk * to a 'known'/'supported' device. - * + * * NOTES: - device switched back to array mode on exit. * - 'addr' must be 32-bit aligned. */ diff --git a/c/src/lib/libbsp/powerpc/shared/flash/spansionFlash.c b/c/src/lib/libbsp/powerpc/shared/flash/spansionFlash.c index b538e666a8..332d35a191 100644 --- a/c/src/lib/libbsp/powerpc/shared/flash/spansionFlash.c +++ b/c/src/lib/libbsp/powerpc/shared/flash/spansionFlash.c @@ -10,19 +10,19 @@ * and in 16-bit mode (width=2). */ -/* +/* * Authorship * ---------- * This software was created by * Till Straumann <strauman@slac.stanford.edu>, 2005-2007, * Stanford Linear Accelerator Center, Stanford University. - * + * * Acknowledgement of sponsorship * ------------------------------ * The software was produced by * the Stanford Linear Accelerator Center, Stanford University, * under Contract DE-AC03-76SFO0515 with the Department of Energy. - * + * * Government disclaimer of liability * ---------------------------------- * Neither the United States nor the United States Department of Energy, @@ -31,18 +31,18 @@ * completeness, or usefulness of any data, apparatus, product, or process * disclosed, or represents that its use would not infringe privately owned * rights. - * + * * Stanford disclaimer of liability * -------------------------------- * Stanford University makes no representations or warranties, express or * implied, nor assumes any liability for the use of this software. - * + * * Stanford disclaimer of copyright * -------------------------------- * Stanford University, owner of the copyright, hereby disclaims its * copyright and all other rights in this software. Hence, anyone may - * freely use it for any purpose without restriction. - * + * freely use it for any purpose without restriction. + * * Maintenance of notices * ---------------------- * In the interest of clarity regarding the origin and status of this @@ -51,9 +51,9 @@ * or distributed by the recipient and are to be affixed to any copy of * software made or distributed by the recipient that contains a copy or * derivative of this software. - * + * * ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03 - */ + */ #include <rtems.h> #include <stdio.h> @@ -420,18 +420,18 @@ rtems_interval p,i; } return -1; } - + STATIC void flash_print_stat_s160(struct bankdesc *b, uint32_t sta, int verbose) { fprintf(stderr,"Flash Spansion 160 error %"PRIi32"\n", sta); } - + STATIC uint32_t flash_write_line_s160(struct bankdesc *b, uint32_t a, char *s, uint32_t N) { uint32_t sta, nxt, j, v; -union bconv buf; +union bconv buf; if ( 0 == N ) return -11; |