Skip to content
Snippets Groups Projects
Commit b9d5acf6 authored by Gregory Nutt's avatar Gregory Nutt
Browse files

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

parent 778a41de
No related branches found
No related tags found
No related merge requests found
......@@ -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 */
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment