Changeset e4bda046 in rtems


Ignore:
Timestamp:
Jun 11, 2012, 12:48:42 PM (8 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
3e600b2
Parents:
f7deb58
git-author:
Sebastian Huber <sebastian.huber@…> (06/11/12 12:48:42)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/15/12 13:59:33)
Message:

bsp/lpc24xx: Simplify EMCDLYCTL handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/lpc24xx/startup/start-config-emc-dynamic.c

    rf7deb58 re4bda046  
    2424#include <bsp/lpc24xx.h>
    2525
     26/*
     27 * FIXME: The NXP example code uses different values for the follwing two
     28 * defines.  In the NXP example code they depend on the EMCCLK.  It is unclear
     29 * how these values are determined.  The values from the NXP example code do
     30 * not work.
     31 */
     32
     33/* Use command delayed strategy */
     34#define LPC24XX_EMC_DYNAMIC_READCONFIG_DEFAULT 0x1
     35
     36#define LPC24XX_EMCDLYCTL_DEFAULT 0x1112
     37
    2638BSP_START_DATA_SECTION const lpc24xx_emc_dynamic_config
    2739  lpc24xx_start_config_emc_dynamic [] = {
     
    3244    .refresh = LPC24XX_PS_TO_EMCCLK(15600000, 0) / 16,
    3345
    34     /* Use command delayed strategy */
    35     .readconfig = 1,
     46    .readconfig = LPC24XX_EMC_DYNAMIC_READCONFIG_DEFAULT,
    3647
    3748    /* Precharge command period 20 ns */
     
    7485    .refresh = LPC24XX_PS_TO_EMCCLK(15600000, 0) / 16,
    7586
    76     /* Use command delayed strategy */
    77     .readconfig = 1,
     87    .readconfig = LPC24XX_EMC_DYNAMIC_READCONFIG_DEFAULT,
    7888
    7989    /* 20ns */
     
    108118
    109119    /* 14ns */
    110     .tmrd = LPC24XX_PS_TO_EMCCLK(14000, 1)
     120    .tmrd = LPC24XX_PS_TO_EMCCLK(14000, 1),
     121
     122    .emcdlyctl = LPC24XX_EMCDLYCTL_DEFAULT
    111123  }
    112124#elif defined(LPC24XX_EMC_W9825G2JB75I)
     
    116128    .refresh = LPC24XX_PS_TO_EMCCLK(15600000, 0) / 16,
    117129
    118     /* Use command delayed strategy */
    119     .readconfig = 1,
     130    .readconfig = LPC24XX_EMC_DYNAMIC_READCONFIG_DEFAULT,
    120131
    121132    /* 20ns */
     
    150161
    151162    /* (n + 1) clock cycles == 2 * tCK (tRSC)*/
    152     .tmrd = 1
     163    .tmrd = 1,
     164
     165    .emcdlyctl = LPC24XX_EMCDLYCTL_DEFAULT
    153166  }
    154167#elif defined(LPC24XX_EMC_K4S561632E)
    155168  {
    156169    .refresh = 35,
    157     .readconfig = 1,
     170    .readconfig = LPC24XX_EMC_DYNAMIC_READCONFIG_DEFAULT,
    158171    .trp = 2,
    159172    .tras = 4,
     
    173186    .refresh = LPC24XX_PS_TO_EMCCLK(15600000, 0) / 16,
    174187
    175     /* Use command delayed strategy */
    176     .readconfig = 1,
     188    .readconfig = LPC24XX_EMC_DYNAMIC_READCONFIG_DEFAULT,
    177189
    178190    /* 20ns */
     
    209221    .tmrd = 1,
    210222
    211     /* FIXME */
    212     .emcdlyctl = 0x1112
     223    .emcdlyctl = LPC24XX_EMCDLYCTL_DEFAULT
    213224  }
    214225#endif
Note: See TracChangeset for help on using the changeset viewer.