mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2024-12-19 05:14:58 +00:00
bmips: bcm6348-enet: register emac driver from iudma
Register the ethernet driver from iudma, which avoids the attempt to probe the emac driver before iudma and its consequent deferral. The ethernet driver can't work without iudma anyway. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This commit is contained in:
parent
5d8f14bfef
commit
a0f100c569
@ -128,6 +128,8 @@ struct bcm6348_iudma {
|
||||
unsigned int dma_channels;
|
||||
};
|
||||
|
||||
int bcm6348_iudma_drivers_register(struct platform_device *pdev);
|
||||
|
||||
static inline u32 dma_readl(struct bcm6348_iudma *iudma, u32 off)
|
||||
{
|
||||
u32 val;
|
||||
@ -269,7 +271,7 @@ static int bcm6348_iudma_probe(struct platform_device *pdev)
|
||||
|
||||
platform_set_drvdata(pdev, iudma);
|
||||
|
||||
return 0;
|
||||
return bcm6348_iudma_drivers_register(pdev);
|
||||
}
|
||||
|
||||
static const struct of_device_id bcm6348_iudma_of_match[] = {
|
||||
@ -1703,4 +1705,15 @@ static struct platform_driver bcm6348_emac_driver = {
|
||||
.probe = bcm6348_emac_probe,
|
||||
.remove = bcm6348_emac_remove,
|
||||
};
|
||||
module_platform_driver(bcm6348_emac_driver);
|
||||
|
||||
int bcm6348_iudma_drivers_register(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
int ret;
|
||||
|
||||
ret = platform_driver_register(&bcm6348_emac_driver);
|
||||
if (ret)
|
||||
dev_err(dev, "error registering emac driver!\n");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user