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/pll.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'openpicc/application/pll.c') 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 #include +#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); } -- cgit v1.2.3