Changeset cd64fbf in rtems


Ignore:
Timestamp:
Dec 16, 2011, 9:37:49 AM (8 years ago)
Author:
Daniel Hellstrom <daniel@…>
Branches:
4.11, master
Children:
045de35
Parents:
3db9e5b
git-author:
Daniel Hellstrom <daniel@…> (12/16/11 09:37:49)
git-committer:
Daniel Hellstrom <daniel@…> (04/16/15 23:10:16)
Message:

LEON: GPTIMER driver, Timer Library and System Clock for LEON3

With this patch the LEON family can access the GRLIB GPTIMER using
the Timer library (TLIB).

A System Clock driver instead of BSP/clock/ck_init.c is provided
using the TLIB. The classic clock driver is split in two parts,
clock driver and timer driver. The BSPs need only to fullfill the
timer interface instead of the clock interface. Currently only
LEON3 uses it. The LEON2 Timer is not ported to TLIB.

The GPTIMER driver is implemented using the Driver Manager, so the
System Clock Driver is at this point only suitable for LEON3 when
the driver manager is initialized during BSP startup. When the DrvMgr?
is not initialized during startup the standard BSP/clock dirver is
used.

LEON2 sometimes also needs to access GPTIMER when a off-chip GRLIB AMBA
systems is connected, for example AMBA-over-PCI.

Location:
c/src/lib/libbsp/sparc
Files:
4 added
8 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sparc/Makefile.am

    r3db9e5b rcd64fbf  
    2828EXTRA_DIST += shared/amba/ambapp_old.c
    2929EXTRA_DIST += shared/amba/ambapp_show.c
     30
     31# Clock Driver and Timer Library
     32EXTRA_DIST += shared/include/tlib.h
     33EXTRA_DIST += shared/timer/gptimer.c
     34EXTRA_DIST += shared/timer/tlib.c
     35EXTRA_DIST += shared/timer/tlib_ckinit.c
    3036
    3137# PCI bus
  • c/src/lib/libbsp/sparc/leon2/Makefile.am

    r3db9e5b rcd64fbf  
    103103libbsp_a_SOURCES += ../../sparc/shared/amba/ambapp_names.c
    104104libbsp_a_SOURCES += ../../sparc/shared/amba/ambapp_show.c
     105
     106# Clock Driver and Timer Library
     107include_HEADERS += ../../sparc/shared/include/tlib.h
     108libbsp_a_SOURCES += ../../sparc/shared/timer/gptimer.c
     109libbsp_a_SOURCES += ../../sparc/shared/timer/tlib.c
     110
    105111# PCI
    106112libbsp_a_SOURCES += pci/pci.c ../../sparc/shared/pci/pcifinddevice.c
  • c/src/lib/libbsp/sparc/leon2/include/bsp.h

    r3db9e5b rcd64fbf  
    227227 */
    228228#define AMBAPPBUS_INFO_AVAIL          /* AMBAPP Bus driver */
     229#define GPTIMER_INFO_AVAIL            /* GPTIMER Timer driver */
    229230
    230231#ifdef __cplusplus
  • c/src/lib/libbsp/sparc/leon2/preinstall.am

    r3db9e5b rcd64fbf  
    170170PREINSTALL_FILES += $(PROJECT_INCLUDE)/grlib.h
    171171
     172$(PROJECT_INCLUDE)/tlib.h: ../../sparc/shared/include/tlib.h $(PROJECT_INCLUDE)/$(dirstamp)
     173        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tlib.h
     174PREINSTALL_FILES += $(PROJECT_INCLUDE)/tlib.h
     175
    172176$(PROJECT_INCLUDE)/i2cmst.h: ../../sparc/shared/include/i2cmst.h $(PROJECT_INCLUDE)/$(dirstamp)
    173177        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/i2cmst.h
  • c/src/lib/libbsp/sparc/leon3/Makefile.am

    r3db9e5b rcd64fbf  
    6767libbsp_a_SOURCES += ../../sparc/shared/amba/ambapp_names.c
    6868libbsp_a_SOURCES += ../../sparc/shared/amba/ambapp_show.c
     69
     70# Clock Driver and Timer Library
     71include_HEADERS += ../../sparc/shared/include/tlib.h
     72libbsp_a_SOURCES += ../../sparc/shared/timer/gptimer.c
     73libbsp_a_SOURCES += ../../sparc/shared/timer/tlib.c
     74libbsp_a_SOURCES += ../../sparc/shared/timer/tlib_ckinit.c
     75# non-Driver Manager Clock Implementation
     76libbsp_a_SOURCES += clock/ckinit.c
     77libbsp_a_SOURCES += ../../shared/clockdrv_shell.h
     78
    6979# console
    7080libbsp_a_SOURCES += ../../shared/console-termios.c
     
    7282# debugio
    7383libbsp_a_SOURCES += console/printk_support.c
    74 # clock
    75 libbsp_a_SOURCES += clock/ckinit.c
    76 libbsp_a_SOURCES += ../../shared/clockdrv_shell.h
     84
    7785# IRQ
    7886include_bsp_HEADERS += \
  • c/src/lib/libbsp/sparc/leon3/include/bsp.h

    r3db9e5b rcd64fbf  
    256256 */
    257257#define AMBAPPBUS_INFO_AVAIL          /* AMBAPP Bus driver */
     258#define GPTIMER_INFO_AVAIL            /* GPTIMER Timer driver */
    258259
    259260#ifdef __cplusplus
  • c/src/lib/libbsp/sparc/leon3/preinstall.am

    r3db9e5b rcd64fbf  
    106106PREINSTALL_FILES += $(PROJECT_INCLUDE)/grlib.h
    107107
     108$(PROJECT_INCLUDE)/tlib.h: ../../sparc/shared/include/tlib.h $(PROJECT_INCLUDE)/$(dirstamp)
     109        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tlib.h
     110PREINSTALL_FILES += $(PROJECT_INCLUDE)/tlib.h
     111
    108112$(PROJECT_INCLUDE)/bsp/irq-generic.h: ../../shared/include/irq-generic.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
    109113        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-generic.h
  • c/src/lib/libbsp/sparc/shared/include/drvmgr/ambapp_bus.h

    r3db9e5b rcd64fbf  
    2727#define DRIVER_AMBAPP_ID(vendor, device) \
    2828        DRIVER_ID(DRVMGR_BUS_TYPE_AMBAPP, ((((vendor) & 0xff) << 16) | ((device) & 0xfff)))
     29
     30/*** Gaisler Hardware Device Driver IDs ***/
     31#define DRIVER_AMBAPP_GAISLER_GPTIMER_ID       DRIVER_AMBAPP_ID(VENDOR_GAISLER, GAISLER_GPTIMER)
    2932
    3033struct amba_dev_id {
Note: See TracChangeset for help on using the changeset viewer.