1. 04 Jan, 2012 7 commits
    • Alexander Potashev's avatar
      RT74765. twr-k60n512: Untie the `mcffec` driver from m68k · 8bd96b7b
      Alexander Potashev authored
      The `mcf*` targets were not checked for clean build.
    • Alexander Potashev's avatar
      RT74765. twr-k60n512: serial driver implementation · 7e83dab7
      Alexander Potashev authored
      Also in this commit:
      1. `kinetis_periph_enable()` for enabling clocks on various MCU modules.
      2. Minimal GPIO driver with the `kinetis_gpio_config()` function.
      FIFOs are not implemented in this driver (they can be enables via the
      PFIFO, TXWATER and RXWATER registers), because on K60 only UART0
      has a more than single-dataword FIFO, and UART0 is not used on the
      TWR-K60N512 board.
      We use the UART3 on the TWR-K60N512 board which is connected to the DB-9
      port on the TWR-SER board in the TWR-K60N512-KIT board set.
    • Alexander Potashev's avatar
      RT74765. twr-k60n512: setup clocks · 5c122449
      Alexander Potashev authored
      Core/system clock rate: 100 MHz
      Peripheral clock rate:   50 MHz
      FlexBus clock rate:      50 MHz
      Flash clock rate:        25 MHz
      The PLL takes the 50 MHz on-board external clock from the EXTAL pin and
      feeds the MCGOUTCLK with a 100 MHz clock.
      On the Kinetis MCU, we have to sequentally switch between 3 clocking
      modes until we can enter the desired PEE mode (PLL Engaged External
      The `KINETIS_MCG_C2_EREFS_MSK` and `KINETIS_MCG_C2_HGO_MSK` bits should
      be cleared, otherwise the Ethernet module of the MCU cannot send nor
      receive packets.
          `udelay(1000)` works correctly (tested by blinking the green LED.)
    • Alexander Potashev's avatar
      RT74765. twr-k60n512: disable the watchdog, it is enabled on reset · 5d52a173
      Alexander Potashev authored
      If we do not disable the watchdog timer in a few MCU clocks after reset,
      it will reset the MCU.
    • Alexander Potashev's avatar
    • Alexander Potashev's avatar
      RT75747. ea-lpc1788: USB clock configuration · 72e40b68
      Alexander Potashev authored
      * The USB clock configuration code is disabled by default
      * PLL1 will be configured only if the USB clock is enabled by defining
          the CONFIG_LPC178X_USB_DIV option in the board configuration file.
    • Alexander Potashev's avatar
      RT74765. twr-k60n512: the very basic port · b1277b2a
      Alexander Potashev authored
      Stubs for twr-k60n512 port.
      The `.kinetis_flash_conf` section is necessary to keep the MCU flash
      unprotected and allow future flash programming.
      This port does not work, because the Watchdog Timer is not unlocked and
      the MCU is reset by WDT shortly after start-up.
  2. 25 Dec, 2011 1 commit
  3. 14 Dec, 2011 1 commit
  4. 07 Dec, 2011 1 commit
    • Alexander Potashev's avatar
      RT73025. ea-lpc1788: fix hang-up in `udelay()` for all Cortex-M3 targets · a53bb5ce
      Alexander Potashev authored
      Hang-up scenario before this patch:
      At the time `udelay()` is called, the current value in
          the SYSTICK timer (`systick->val`) may be very close to, but greater
          than the number of clocks left to tick (`clc`).
      Since `systick->val` is greater than `clc`, we use the `while` loop from
          the `else` block. But this `while` loops only checks that `systick->val`
          is greater than `(tmp - clc)` which is a very small positive integer
          (because `tmp` is very close to `clc`.) The `while` loop will now
          terminate only if we manage to catch `systick->val` in a very thin
          range between 0 and `(tmp - clc)`. The comparison inside the `while`
          loop condition takes a considerable number of CPU clocks, that makes it
          hard to find `systick->val` between 0 and `(tmp - clc)`, we just step
          over this small range.
      This bug manifested when erasing NOR flash on EA-LPC1788-32: the
      `udelay(1)` call in `flash_status_check()` in `drivers/mtd/cfi_flash.c`
      was hanging.
  5. 06 Dec, 2011 3 commits
    • Sergei Poselenov's avatar
    • Sergei Poselenov's avatar
      RT #73025. ea-lpc1788: create u-boot.bin with checksum instead of · d6962b42
      Sergei Poselenov authored
      For EA-LPC1788, the U-Boot image suitable for programming is u-boot-lpc.bin.
      This is inconsistent with other supported targets, where the image is
      u-boot.bin. This patch fixes this.
    • Alexander Potashev's avatar
      RT73025. ea-lpc1788: fix hang-up in Ethernet driver after SYSRESET · 6c05ceb4
      Alexander Potashev authored
      To avoid hang-up of the Ethernet block after Cortex-M3 software reset
      (SYSRESET), we need to reset the Ethernet PHY immediately before
      performing the SYSRESET.
      All new code added in this patch should be in placed in `.ramcode`,
      because we might want to do a software reset after self-upgrade.
      Since we cannot use `printf()` in functions that may be called during
      self-upgrade (`printf()` is too big for `.ramcode`), the
      `lpc178x_phy_init()` function cannot be easily used in
      `lpc178x_phy_final_reset()`. Because of this, we use a pre-set PHY
      address (`CONFIG_LPC178X_ETH_PHY_ADDR`) instead of doing automatic
      PHY discovery that is usually done in `lpc178x_phy_init()`.
      If Ethernet is not enabled in the U-Boot configuration file, we do not
      perform the PHY reset.
      This leads to a minor bug: if you install U-Boot without Ethernet
      support into your board and do a self-upgrade to another build of
      U-Boot with Ethernet support, the Ethernet driver will hang in the
      latter U-Boot unless you have done a full reset (by pushing the SW1
      button) after self-upgrade.
  6. 02 Dec, 2011 4 commits
  7. 01 Dec, 2011 2 commits
  8. 30 Nov, 2011 1 commit
    • Alexander Potashev's avatar
      RT73025. lpc178x_eth: fix `lpc178x_eth_send()` · 253feef0
      Alexander Potashev authored
      1. Fixed the algorithm for checking if the transmit buffers are full.
      2. Removed unnecessary `udelay()` calls that were kept after copying the
      	code from the LPCware's U-Boot port.
      3. Increased the numbers of receive and transmit DMA buffers.
  9. 25 Nov, 2011 3 commits
  10. 24 Nov, 2011 4 commits
  11. 22 Nov, 2011 1 commit
  12. 18 Nov, 2011 7 commits
  13. 17 Nov, 2011 2 commits
  14. 14 Nov, 2011 3 commits