/* * Copyright (c) 2011 Peter Korsgaard <jacmet@sunsite.dk> * * This file is licensed under the terms of the GNU General Public * License version 2. This program is licensed "as is" without any * warranty of any kind, whether express or implied.
*/
ret = pm_runtime_get_sync(trng->dev); if (ret < 0) {
pm_runtime_put_sync(trng->dev); return ret;
}
ret = atmel_trng_wait_ready(trng, wait); if (!ret) goto out;
*data = readl(trng->base + TRNG_ODATA); /* * ensure data ready is only set again AFTER the next data word is ready * in case it got set between checking ISR and reading ODATA, so we * don't risk re-reading the same word
*/
readl(trng->base + TRNG_ISR);
ret = 4;
trng = devm_kzalloc(&pdev->dev, sizeof(*trng), GFP_KERNEL); if (!trng) return -ENOMEM;
trng->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(trng->base)) return PTR_ERR(trng->base);
trng->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(trng->clk)) return PTR_ERR(trng->clk);
data = of_device_get_match_data(&pdev->dev); if (!data) return -ENODEV;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.