summaryrefslogtreecommitdiff
path: root/openpicc/application/pll.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/pll.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/pll.c')
-rw-r--r--openpicc/application/pll.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/openpicc/application/pll.c b/openpicc/application/pll.c
index c40718a..aca95b1 100644
--- a/openpicc/application/pll.c
+++ b/openpicc/application/pll.c
@@ -20,6 +20,7 @@
#include <sys/types.h>
#include <lib_AT91SAM7.h>
+#include "pll.h"
#include "pio_irq.h"
#include "dbgu.h"
#include "led.h"
@@ -40,7 +41,7 @@ int pll_is_inhibited(void)
int pll_is_locked(void)
{
- return AT91F_PIO_IsInputSet(AT91C_BASE_PIOA, OPENPICC_PIO_PLL_LOCK);
+ return AT91F_PIO_IsInputSet(AT91C_BASE_PIOA, OPENPICC->PLL_LOCK);
}
static void pll_lock_change_cb(u_int32_t pio)
@@ -55,9 +56,9 @@ static void pll_lock_change_cb(u_int32_t pio)
void pll_init(void)
{
AT91F_PIO_CfgOutput(AT91C_BASE_PIOA, OPENPICC_PIO_PLL_INHIBIT);
- AT91F_PIO_CfgInput(AT91C_BASE_PIOA, OPENPICC_PIO_PLL_LOCK);
+ AT91F_PIO_CfgInput(AT91C_BASE_PIOA, OPENPICC->PLL_LOCK);
pll_inhibit(0);
- pio_irq_register(OPENPICC_PIO_PLL_LOCK, &pll_lock_change_cb);
- pio_irq_enable(OPENPICC_PIO_PLL_LOCK);
+ pio_irq_register(OPENPICC->PLL_LOCK, &pll_lock_change_cb);
+ pio_irq_enable(OPENPICC->PLL_LOCK);
}
personal git repositories of Harald Welte. Your mileage may vary