From a72e0c20bb28d382fc7377f270b4d9944baeaf97 Mon Sep 17 00:00:00 2001 From: henryk Date: Mon, 11 Feb 2008 12:25:41 +0000 Subject: 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 --- openpicc/application/main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'openpicc/application/main.c') 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. */ -- cgit v1.2.3