ixp4xx_eth: make ptp support a platform driver
[sfrench/cifs-2.6.git] / arch / arm / mach-ixp4xx / common.c
index b5eadd70d9038c056739afe75e65592c2aa26b22..cdc720f54daa7993e68e9c55f617e8cc99701506 100644 (file)
@@ -268,9 +268,23 @@ static struct platform_device ixp46x_i2c_controller = {
        .resource       = ixp46x_i2c_resources
 };
 
+static struct resource ixp46x_ptp_resources[] = {
+       DEFINE_RES_MEM(IXP4XX_TIMESYNC_BASE_PHYS, SZ_4K),
+       DEFINE_RES_IRQ_NAMED(IRQ_IXP4XX_GPIO8, "master"),
+       DEFINE_RES_IRQ_NAMED(IRQ_IXP4XX_GPIO7, "slave"),
+};
+
+static struct platform_device ixp46x_ptp = {
+       .name           = "ptp-ixp46x",
+       .id             = -1,
+       .resource       = ixp46x_ptp_resources,
+       .num_resources  = ARRAY_SIZE(ixp46x_ptp_resources),
+};
+
 static struct platform_device *ixp46x_devices[] __initdata = {
        &ixp46x_hwrandom_device,
        &ixp46x_i2c_controller,
+       &ixp46x_ptp,
 };
 
 unsigned long ixp4xx_exp_bus_size;