Searched refs:moxart_wdt (Results 1 - 2 of 2) sorted by relevance
/linux-4.1.27/drivers/watchdog/ |
H A D | moxart_wdt.c | 40 struct moxart_wdt_dev *moxart_wdt = container_of(this, moxart_restart_handle() local 43 writel(1, moxart_wdt->base + REG_COUNT); moxart_restart_handle() 44 writel(0x5ab9, moxart_wdt->base + REG_MODE); moxart_restart_handle() 45 writel(0x03, moxart_wdt->base + REG_ENABLE); moxart_restart_handle() 52 struct moxart_wdt_dev *moxart_wdt = watchdog_get_drvdata(wdt_dev); moxart_wdt_stop() local 54 writel(0, moxart_wdt->base + REG_ENABLE); moxart_wdt_stop() 61 struct moxart_wdt_dev *moxart_wdt = watchdog_get_drvdata(wdt_dev); moxart_wdt_start() local 63 writel(moxart_wdt->clock_frequency * wdt_dev->timeout, moxart_wdt_start() 64 moxart_wdt->base + REG_COUNT); moxart_wdt_start() 65 writel(0x5ab9, moxart_wdt->base + REG_MODE); moxart_wdt_start() 66 writel(0x03, moxart_wdt->base + REG_ENABLE); moxart_wdt_start() 94 struct moxart_wdt_dev *moxart_wdt; moxart_wdt_probe() local 103 moxart_wdt = devm_kzalloc(dev, sizeof(*moxart_wdt), GFP_KERNEL); moxart_wdt_probe() 104 if (!moxart_wdt) moxart_wdt_probe() 107 platform_set_drvdata(pdev, moxart_wdt); moxart_wdt_probe() 110 moxart_wdt->base = devm_ioremap_resource(dev, res); moxart_wdt_probe() 111 if (IS_ERR(moxart_wdt->base)) moxart_wdt_probe() 112 return PTR_ERR(moxart_wdt->base); moxart_wdt_probe() 120 moxart_wdt->clock_frequency = clk_get_rate(clk); moxart_wdt_probe() 121 if (moxart_wdt->clock_frequency == 0) { moxart_wdt_probe() 126 max_timeout = UINT_MAX / moxart_wdt->clock_frequency; moxart_wdt_probe() 128 moxart_wdt->dev.info = &moxart_wdt_info; moxart_wdt_probe() 129 moxart_wdt->dev.ops = &moxart_wdt_ops; moxart_wdt_probe() 130 moxart_wdt->dev.timeout = max_timeout; moxart_wdt_probe() 131 moxart_wdt->dev.min_timeout = 1; moxart_wdt_probe() 132 moxart_wdt->dev.max_timeout = max_timeout; moxart_wdt_probe() 133 moxart_wdt->dev.parent = dev; moxart_wdt_probe() 135 watchdog_init_timeout(&moxart_wdt->dev, heartbeat, dev); moxart_wdt_probe() 136 watchdog_set_nowayout(&moxart_wdt->dev, nowayout); moxart_wdt_probe() 138 watchdog_set_drvdata(&moxart_wdt->dev, moxart_wdt); moxart_wdt_probe() 140 err = watchdog_register_device(&moxart_wdt->dev); moxart_wdt_probe() 144 moxart_wdt->restart_handler.notifier_call = moxart_restart_handle; moxart_wdt_probe() 145 moxart_wdt->restart_handler.priority = 128; moxart_wdt_probe() 146 err = register_restart_handler(&moxart_wdt->restart_handler); moxart_wdt_probe() 152 moxart_wdt->dev.timeout, nowayout); moxart_wdt_probe() 159 struct moxart_wdt_dev *moxart_wdt = platform_get_drvdata(pdev); moxart_wdt_remove() local 161 unregister_restart_handler(&moxart_wdt->restart_handler); moxart_wdt_remove() 162 moxart_wdt_stop(&moxart_wdt->dev); moxart_wdt_remove()
|
H A D | Makefile | 60 obj-$(CONFIG_MOXART_WDT) += moxart_wdt.o
|
Completed in 116 milliseconds