summaryrefslogtreecommitdiff
path: root/openpicc/application/main.c
diff options
context:
space:
mode:
authorhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2008-02-11 12:25:41 +0000
committerhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2008-02-11 12:25:41 +0000
commita72e0c20bb28d382fc7377f270b4d9944baeaf97 (patch)
treeccef735dde833330c87b44cbc02c9a5a4849174b /openpicc/application/main.c
parentf0c0bc64efe337d28955bf0f0cc05871606e9ea6 (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/application/main.c')
-rw-r--r--openpicc/application/main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/openpicc/application/main.c b/openpicc/application/main.c
index 1125153..e1749de 100644
--- a/openpicc/application/main.c
+++ b/openpicc/application/main.c
@@ -42,7 +42,6 @@
#include "adc.h"
#include "pll.h"
#include "pio_irq.h"
-#include "ssc_picc.h"
#include "tc_cdiv.h"
#include "tc_cdiv_sync.h"
#include "tc_fdt.h"
@@ -54,6 +53,13 @@
/**********************************************************************/
static inline void prvSetupHardware (void)
{
+ /* The very, very first thing we do is setup the global OPENPICC variable to point to
+ * the correct hardware information.
+ * FIXME: Detect dynamically in the future
+ */
+ OPENPICC = &OPENPICC_HARDWARE[OPENPICC_v0_4_p1];
+
+
/* When using the JTAG debugger the hardware is not always initialised to
the correct default state. This line just ensures that this does not
cause all interrupts to be masked at the start. */
personal git repositories of Harald Welte. Your mileage may vary