#include <linux/spi/spi.h>
#include <linux/spi/flash.h>
#include <linux/if_ether.h>
+#include <linux/pps-gpio.h>
#include <asm/setup.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
.end = CNS3XXX_TC11MP_TWD_BASE + SZ_4K - 1,
.flags = IORESOURCE_MEM,
},
- [1] = {
- .start = IRQ_LOCALWDOG,
- .end = IRQ_LOCALWDOG,
- .flags = IORESOURCE_IRQ,
- }
};
static struct platform_device laguna_watchdog = {
.resource = laguna_watchdog_resources,
};
+/*
+ * GPS PPS
+ */
+static struct pps_gpio_platform_data laguna_pps_data = {
+ .gpio_pin = 0,
+ .gpio_label = "GPS_PPS",
+ .assert_falling_edge = 0,
+ .capture_clear = 0,
+};
+
+static struct platform_device laguna_pps_device = {
+ .name = "pps-gpio",
+ .id = -1,
+ .dev.platform_data = &laguna_pps_data,
+};
+
/*
* GPIO
*/
*/
static void __init laguna_init(void)
{
- cns3xxx_l2x0_init();
-
platform_device_register(&laguna_watchdog);
platform_device_register(&laguna_i2c_controller);
u32 __iomem *mem;
u32 reg;
+ if (!machine_is_gw2388())
+ return 0;
+
printk("Running on Gateworks Laguna %s\n", laguna_info.model);
cns3xxx_gpio_init( 0, 32, CNS3XXX_GPIOA_BASE_VIRT, IRQ_CNS3XXX_GPIOA,
NR_IRQS_CNS3XXX);
(laguna_info.config_bitmap & SPI1_LOAD))
platform_device_register(&laguna_spi_controller);
+ if (laguna_info.config2_bitmap & GPS_LOAD)
+ platform_device_register(&laguna_pps_device);
+
/*
* Do any model specific setup not known by the bitmap by matching
* the first 6 characters of the model name