Changeset 34115


Ignore:
Timestamp:
2012-11-08T06:42:31+01:00 (5 years ago)
Author:
kaloz
Message:

cns3xxx: add PPS support for laguna

Many Laguna products have on-board GPS with Pulse-per-second (PPS)
support. This patch adds kernel support (statically) and adds
the platform data in laguna board support.

Signed-off-by: Tim Harvey <tharvey@…>

Location:
trunk/target/linux/cns3xxx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/cns3xxx/config-3.3

    r34102 r34115  
    132132CONFIG_NLS=y 
    133133CONFIG_NR_CPUS=2 
     134CONFIG_NTP_PPS=y 
    134135CONFIG_OUTER_CACHE=y 
    135136CONFIG_OUTER_CACHE_SYNC=y 
     
    144145CONFIG_PL310_ERRATA_727915=y 
    145146CONFIG_PL310_ERRATA_769419=y 
     147CONFIG_PPS=y 
     148CONFIG_PPS_CLIENT_GPIO=y 
     149# CONFIG_PPS_CLIENT_KTIMER is not set 
     150# CONFIG_PPS_CLIENT_LDISC is not set 
     151# CONFIG_PPS_DEBUG is not set 
    146152# CONFIG_PREEMPT_RCU is not set 
     153# CONFIG_PTP_1588_CLOCK is not set 
    147154CONFIG_RAID_ATTRS=y 
    148155CONFIG_RFS_ACCEL=y 
  • trunk/target/linux/cns3xxx/files/arch/arm/mach-cns3xxx/laguna.c

    r34101 r34115  
    3737#include <linux/spi/flash.h> 
    3838#include <linux/if_ether.h> 
     39#include <linux/pps-gpio.h> 
    3940#include <asm/setup.h> 
    4041#include <asm/mach-types.h> 
     
    582583 
    583584/* 
     585 * GPS PPS 
     586 */ 
     587static struct pps_gpio_platform_data laguna_pps_data = { 
     588        .gpio_pin = 0, 
     589        .gpio_label = "GPS_PPS", 
     590        .assert_falling_edge = 0, 
     591        .capture_clear = 0, 
     592}; 
     593 
     594static struct platform_device laguna_pps_device = { 
     595        .name = "pps-gpio", 
     596        .id = -1, 
     597        .dev.platform_data = &laguna_pps_data, 
     598}; 
     599 
     600/* 
    584601 * GPIO 
    585602 */ 
     
    869886                    (laguna_info.config_bitmap & SPI1_LOAD)) 
    870887                        platform_device_register(&laguna_spi_controller); 
     888 
     889                if (laguna_info.config2_bitmap & GPS_LOAD) 
     890                        platform_device_register(&laguna_pps_device); 
    871891 
    872892                /* 
Note: See TracChangeset for help on using the changeset viewer.