SAMA5 PCK: Need to configure the programmable clock output pin as well

This commit is contained in:
Gregory Nutt 2013-11-14 11:41:59 -06:00
parent 778a41de1b
commit b9d5acf6e4
2 changed files with 14 additions and 1 deletions

View File

@ -41,6 +41,7 @@
#include <debug.h>
#include "sam_memories.h"
#include "sam_pio.h"
#include "sam_pck.h"
#include "sam_isi.h"
@ -172,6 +173,11 @@ int sam_isi_initialize(void)
/* Configure color */
#warning Missing logic
/* Configure decimation */
#warning Missing logic
/* Configure DMA */
#warning Missing logic
}
#endif /* CONFIG_SAMA5_ISI && CONFIG_SAMA5_EMAC */

View File

@ -41,6 +41,8 @@
#include <debug.h>
#include "chip/sam_pinmap.h"
#include "sam_pio.h"
#include "sam_isi.h"
#ifdef CONFIG_SAMA5_ISI
@ -159,22 +161,27 @@ uint32_t sam_pck_configure(enum pckid_e pckid, uint32_t frequency)
return -ERANGE;
}
/* Disable the programmable clock then set the selected configuration */
/* Disable the programmable clock, configure the PCK output pin, then set
* the selected configuration.
*/
switch (pckid)
{
case PCK0:
putreg32(PMC_PCK0, SAM_PMC_SCDR);
(void)sam_configpio(PIO_PMC_PCK0);
putreg32(regval, SAM_PMC_PCK0);
break;
case PCK1:
putreg32(PMC_PCK1, SAM_PMC_SCDR);
(void)sam_configpio(PIO_PMC_PCK1);
putreg32(regval, SAM_PMC_PCK1);
break;
case PCK2:
putreg32(PMC_PCK2, SAM_PMC_SCDR);
(void)sam_configpio(PIO_PMC_PCK2);
putreg32(regval, SAM_PMC_PCK2);
break;