/* * Broadcom BCM63xx VoIP DSP registration * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 2009 Florian Fainelli */ #include #include #include #include #include #include #include static struct resource voip_dsp_resources[] = { { .start = -1, /* filled at runtime */ .end = -1, /* filled at runtime */ .flags = IORESOURCE_MEM, }, { .start = -1, /* filled at runtime */ .flags = IORESOURCE_IRQ, }, }; static struct platform_device bcm63xx_voip_dsp_device = { .name = "bcm63xx-voip-dsp", .id = 0, .num_resources = ARRAY_SIZE(voip_dsp_resources), .resource = voip_dsp_resources, }; int __init bcm63xx_dsp_register(const struct bcm63xx_dsp_platform_data *pd) { struct bcm63xx_dsp_platform_data *dpd; u32 val; /* Get the memory window */ val = bcm_mpi_readl(MPI_CSBASE_REG(pd->cs - 1)); val &= MPI_CSBASE_BASE_MASK; voip_dsp_resources[0].start = val; voip_dsp_resources[0].end = val + 0xFFFFFFF; voip_dsp_resources[1].start = pd->ext_irq; /* copy given platform data */ dpd = bcm63xx_voip_dsp_device.dev.platform_data; memcpy(dpd, pd, sizeof (*pd)); return platform_device_register(&bcm63xx_voip_dsp_device); } '>refslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Cree <ecree@solarflare.com>2020-02-17 13:43:10 +0000
committerDavid S. Miller <davem@davemloft.net>2020-02-17 14:35:23 -0800
commitb7683155517c09c7e0f9d791eaab6dab3b4b2477 (patch)
treecea3ca29b8db6619ce2b9f90695c919f0f3d1fd1 /drivers/net/ethernet
parentbd706ff8ea2b6e2d3f21f0863b2fc42f860f8ba2 (diff)
sfc: only schedule asynchronous filter work if needed
Prevent excessive CPU time spent running a workitem with nothing to do. We avoid any races by keeping the same check in efx_filter_rfs_expire(). Suggested-by: Martin Habets <mhabets@solarflare.com> Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')