diff options
author | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2008-02-11 12:25:41 +0000 |
---|---|---|
committer | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2008-02-11 12:25:41 +0000 |
commit | a72e0c20bb28d382fc7377f270b4d9944baeaf97 (patch) | |
tree | ccef735dde833330c87b44cbc02c9a5a4849174b /openpicc/config/board.h | |
parent | f0c0bc64efe337d28955bf0f0cc05871606e9ea6 (diff) |
Framework to support run-time hardware selection. Future hardware releases should be changed to be boot-time detectable (e.g. using the yet unused AD inputs) so that one image can be used for all
releases
git-svn-id: https://svn.openpcd.org:2342/trunk@411 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpicc/config/board.h')
-rw-r--r-- | openpicc/config/board.h | 41 |
1 files changed, 25 insertions, 16 deletions
diff --git a/openpicc/config/board.h b/openpicc/config/board.h index 0cfc9a5..428acd4 100644 --- a/openpicc/config/board.h +++ b/openpicc/config/board.h @@ -52,13 +52,30 @@ /*-----------------*/ /* Board version */ /*-----------------*/ -/* Modified board, routing PLL_LOCK to PA5 and a copy of FRAME to PA4, enabling the use of the T/C BURST feature. */ -#define OPENPICC_MODIFIED_BOARD - -#ifdef OPENPICC_MODIFIED_BOARD -#define OPENPICC_USE_SSC_DATA_GATING -#define OPENPICC_USE_CLOCK_GATING -#endif +enum openpicc_release { + OPENPICC_v0_4, /* Schematics v0.4, as sold in the shop */ + + OPENPICC_v0_4_p1, /* based on schematics v0.4; Modifications: + * + PLL_LOCK relocated from PA4 to PA5 + * + Copy of FRAME routed to PA4 + * + Connection between R18 and 3V3 removed, instead R18 is now connected to PA31*/ +}; +struct openpicc_hardware { + enum openpicc_release release; + char *release_name; + struct { + int data_gating:1; + int clock_gating:1; + } features; + + int PLL_LOCK; + + int CLOCK_GATE; + int DATA_GATE; +}; + +extern const struct openpicc_hardware OPENPICC_HARDWARE[]; +extern const struct openpicc_hardware *OPENPICC; /*-----------------*/ /* Pins */ @@ -70,11 +87,6 @@ #define OPENPICC_PIO_SS2_DT_THRESH AT91C_PIO_PA8 #define OPENPICC_PIO_PLL_INHIBIT AT91C_PIO_PA24 -#ifdef OPENPICC_MODIFIED_BOARD -#define OPENPICC_PIO_PLL_LOCK AT91C_PIO_PA5 -#else -#define OPENPICC_PIO_PLL_LOCK AT91C_PIO_PA4 -#endif #define OPENPICC_MOD_PWM AT91C_PA23_PWM0 #define OPENPICC_MOD_SSC AT91C_PA17_TD @@ -83,10 +95,7 @@ #define OPENPICC_SSC_TF AT91C_PIO_PA15 #define OPENPICC_PIO_FRAME AT91C_PIO_PA20 -#ifdef OPENPICC_MODIFIED_BOARD -#define OPENPICC_PIO_FRAME_BURST AT91C_PIO_PA4 -#define OPENPICC_PIO_SSC_DATA_GATE AT91C_PIO_PA31 -#endif + #define OPENPICC_PIO_SSC_DATA_CONTROL AT91C_PIO_PA21 #define OPENPICC_PIO_AB_DETECT AT91C_PIO_PA22 #define OPENPICC_PIO_PLL_INHIBIT AT91C_PIO_PA24 |