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/application/pll.c | |
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/application/pll.c')
-rw-r--r-- | openpicc/application/pll.c | 9 |
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); } |