Changeset 4a6cc2a in rtems for c/src/lib/libbsp/arm/lpc24xx/ssp


Ignore:
Timestamp:
Nov 8, 2011, 10:39:46 AM (9 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
3d1313e8
Parents:
4c622e5
Message:

2011-11-08 Sebastian Huber <sebastian.huber@…>

  • include/lpc17xx.h: New file.
  • Makefile.am, preinstall.am: Reflect change above. Update due to API changes.
  • configure.ac, console/console-config.c, include/bsp.h, include/io.h, include/irq.h, include/lcd.h, include/lpc-clock-config.h, include/lpc24xx.h, include/start-config.h, irq/irq-dispatch.c, irq/irq.c, misc/bspidle.c, misc/io.c, misc/lcd.c, misc/restart.c, misc/system-clocks.c, ssp/ssp.c, startup/bspreset.c, startup/bspstart.c, startup/bspstarthooks.c, startup/start-config-emc-dynamic.c, startup/start-config-emc-static.c, startup/start-config-pinsel.c: Basic support for LPC17XX. New memory configurations for W9825G2JB75I, IS42S32800B, and SST39VF3201.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/lpc24xx/ssp/ssp.c

    r4c622e5 r4a6cc2a  
    2626#include <bsp/system-clocks.h>
    2727#include <bsp/dma.h>
     28#include <bsp/io.h>
    2829
    2930#define RTEMS_STATUS_CHECKS_USE_PRINTK
     
    182183  unsigned pre =
    183184    ((pclk + LPC24XX_SSP_BAUD_RATE - 1) / LPC24XX_SSP_BAUD_RATE + 1) & ~1U;
     185  lpc24xx_module module = LPC24XX_MODULE_SSP_0;
    184186  rtems_vector_number vector = UINT32_MAX;
    185187
     
    214216  regs->cr1 = 0;
    215217
    216   /* Set clock select and get vector number */
    217218  switch ((uintptr_t) regs) {
    218219    case SSP0_BASE_ADDR:
    219       rtems_interrupt_disable(level);
    220       PCLKSEL1 = SET_PCLKSEL1_PCLK_SSP0(PCLKSEL1, 1);
    221       rtems_interrupt_enable(level);
    222 
     220      module = LPC24XX_MODULE_SSP_0;
    223221      vector = LPC24XX_IRQ_SPI_SSP_0;
    224222      break;
    225223    case SSP1_BASE_ADDR:
    226       rtems_interrupt_disable(level);
    227       PCLKSEL0 = SET_PCLKSEL0_PCLK_SSP1(PCLKSEL0, 1);
    228       rtems_interrupt_enable(level);
    229 
     224      module = LPC24XX_MODULE_SSP_1;
    230225      vector = LPC24XX_IRQ_SSP_1;
    231226      break;
     
    233228      return RTEMS_IO_ERROR;
    234229  }
     230
     231  /* Set clock select */
     232  sc = lpc24xx_module_enable(module, LPC24XX_MODULE_PCLK_DEFAULT);
     233  RTEMS_CHECK_SC(sc, "enable module clock");
    235234
    236235  /* Set serial clock rate to save value */
Note: See TracChangeset for help on using the changeset viewer.