summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/lpc313x/lpc313x_clkexten.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/arm/src/lpc313x/lpc313x_clkexten.c')
-rwxr-xr-xnuttx/arch/arm/src/lpc313x/lpc313x_clkexten.c152
1 files changed, 0 insertions, 152 deletions
diff --git a/nuttx/arch/arm/src/lpc313x/lpc313x_clkexten.c b/nuttx/arch/arm/src/lpc313x/lpc313x_clkexten.c
deleted file mode 100755
index 20e42a83a..000000000
--- a/nuttx/arch/arm/src/lpc313x/lpc313x_clkexten.c
+++ /dev/null
@@ -1,152 +0,0 @@
-/****************************************************************************
- * arch/arm/src/lpc313x/lpc313x_exten.c
- *
- * Copyright (C) 2009 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include <nuttx/config.h>
-
-#include <stdint.h>
-
-#include <arch/board/board.h>
-
-#include "lpc313x_cgudrvr.h"
-
-/****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-/****************************************************************************
- * Public Data
- ****************************************************************************/
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: lpc313x_enableexten
- *
- * Description:
- * Enable external enabling for the the specified possible clocks.
- *
- ****************************************************************************/
-
-void lpc313x_enableexten(enum lpc313x_clockid_e clkid)
-{
- uint32_t regaddr;
- uint32_t regval;
-
- switch (clkid)
- {
- case CLKID_DMACLKGATED: /* 9 DMA_CLK_GATED */
- case CLKID_EVENTROUTERPCLK: /* 31 EVENT_ROUTER_PCLK */
- case CLKID_ADCPCLK: /* 32 ADC_PCLK */
- case CLKID_IOCONFPCLK: /* 35 IOCONF_PCLK */
- case CLKID_CGUPCLK: /* 36 CGU_PCLK */
- case CLKID_SYSCREGPCLK: /* 37 SYSCREG_PCLK */
- case CLKID_OTPPCLK: /* 38 OTP_PCLK (Reserved on LPC313X) */
- case CLKID_PWMPCLKREGS: /* 46 PWM_PCLK_REGS */
- case CLKID_PCMAPBPCLK: /* 52 PCM_APB_PCLK */
- case CLKID_SPIPCLKGATED: /* 57 SPI_PCLK_GATED */
- case CLKID_SPICLKGATED: /* 90 SPI_CLK_GATED */
- case CLKID_PCMCLKIP: /* 71 PCM_CLK_IP */
- regaddr = LPC313X_CGU_PCR(clkid);
- regval = getreg32(regaddr);
- regval |= CGU_PCR_EXTENEN;
- putreg32(regval, regaddr);
- break;
-
- /* Otherwise, force disable for the clocks. NOTE that a larger set will
- * be disabled than will be enabled.
- */
-
- default:
- lpc313x_disableexten(clkid);
- break;
- }
-}
-
-/****************************************************************************
- * Name: lpc313x_disableexten
- *
- * Description:
- * Disable external enabling for the the specified possible clocks.
- *
- ****************************************************************************/
-
-void lpc313x_disableexten(enum lpc313x_clockid_e clkid)
-{
- uint32_t regaddr;
- uint32_t regval;
-
- switch (clkid)
- {
- case CLKID_DMACLKGATED: /* 9 DMA_CLK_GATED */
- case CLKID_EVENTROUTERPCLK: /* 31 EVENT_ROUTER_PCLK */
- case CLKID_ADCPCLK: /* 32 ADC_PCLK */
- case CLKID_WDOGPCLK: /* 34 WDOG_PCLK */
- case CLKID_IOCONFPCLK: /* 35 IOCONF_PCLK */
- case CLKID_CGUPCLK: /* 36 CGU_PCLK */
- case CLKID_SYSCREGPCLK: /* 37 SYSCREG_PCLK */
- case CLKID_OTPPCLK: /* 38 OTP_PCLK (Reserved on LPC313X) */
- case CLKID_PWMPCLKREGS: /* 46 PWM_PCLK_REGS */
- case CLKID_I2C0PCLK: /* 48 I2C0_PCLK */
- case CLKID_I2C1PCLK: /* 49 I2C1_PCLK */
- case CLKID_PCMAPBPCLK: /* 52 PCM_APB_PCLK */
- case CLKID_UARTAPBCLK: /* 53 UART_APB_CLK */
- case CLKID_SPIPCLKGATED: /* 57 SPI_PCLK_GATED */
- case CLKID_SPICLKGATED: /* 90 SPI_CLK_GATED */
- case CLKID_PCMCLKIP: /* 71 PCM_CLK_IP */
- case CLKID_LCDPCLK: /* 54 LCD_PCLK */
- regaddr = LPC313X_CGU_PCR(clkid);
- regval = getreg32(regaddr);
- regval &= ~CGU_PCR_EXTENEN;
- putreg32(regval, regaddr);
- break;
-
- default:
- break;
- }
-}