Lines Matching refs:ts78xx_fpga
40 static struct ts78xx_fpga_data ts78xx_fpga = { variable
100 if (ts78xx_fpga.supports.ts_rtc.init == 0) { in ts78xx_ts_rtc_load()
103 ts78xx_fpga.supports.ts_rtc.init = 1; in ts78xx_ts_rtc_load()
268 if (ts78xx_fpga.supports.ts_nand.init == 0) { in ts78xx_ts_nand_load()
271 ts78xx_fpga.supports.ts_nand.init = 1; in ts78xx_ts_nand_load()
311 if (ts78xx_fpga.supports.ts_rng.init == 0) { in ts78xx_ts_rng_load()
314 ts78xx_fpga.supports.ts_rng.init = 1; in ts78xx_ts_rng_load()
333 ts78xx_fpga.supports.ts_rtc.init = 0; in ts78xx_fpga_devices_zero_init()
334 ts78xx_fpga.supports.ts_nand.init = 0; in ts78xx_fpga_devices_zero_init()
335 ts78xx_fpga.supports.ts_rng.init = 0; in ts78xx_fpga_devices_zero_init()
341 switch (ts78xx_fpga.id) { in ts78xx_fpga_supports()
351 ts78xx_fpga.supports.ts_rtc.present = 1; in ts78xx_fpga_supports()
352 ts78xx_fpga.supports.ts_nand.present = 1; in ts78xx_fpga_supports()
353 ts78xx_fpga.supports.ts_rng.present = 1; in ts78xx_fpga_supports()
357 switch ((ts78xx_fpga.id >> 8) & 0xffffff) { in ts78xx_fpga_supports()
360 ts78xx_fpga.id & 0xff); in ts78xx_fpga_supports()
361 ts78xx_fpga.supports.ts_rtc.present = 1; in ts78xx_fpga_supports()
362 ts78xx_fpga.supports.ts_nand.present = 1; in ts78xx_fpga_supports()
363 ts78xx_fpga.supports.ts_rng.present = 1; in ts78xx_fpga_supports()
366 ts78xx_fpga.supports.ts_rtc.present = 0; in ts78xx_fpga_supports()
367 ts78xx_fpga.supports.ts_nand.present = 0; in ts78xx_fpga_supports()
368 ts78xx_fpga.supports.ts_rng.present = 0; in ts78xx_fpga_supports()
377 if (ts78xx_fpga.supports.ts_rtc.present == 1) { in ts78xx_fpga_load_devices()
380 ts78xx_fpga.supports.ts_rtc.present = 0; in ts78xx_fpga_load_devices()
383 if (ts78xx_fpga.supports.ts_nand.present == 1) { in ts78xx_fpga_load_devices()
386 ts78xx_fpga.supports.ts_nand.present = 0; in ts78xx_fpga_load_devices()
389 if (ts78xx_fpga.supports.ts_rng.present == 1) { in ts78xx_fpga_load_devices()
392 ts78xx_fpga.supports.ts_rng.present = 0; in ts78xx_fpga_load_devices()
402 if (ts78xx_fpga.supports.ts_rtc.present == 1) in ts78xx_fpga_unload_devices()
404 if (ts78xx_fpga.supports.ts_nand.present == 1) in ts78xx_fpga_unload_devices()
406 if (ts78xx_fpga.supports.ts_rng.present == 1) in ts78xx_fpga_unload_devices()
414 ts78xx_fpga.id = readl(TS78XX_FPGA_REGS_VIRT_BASE); in ts78xx_fpga_load()
417 (ts78xx_fpga.id >> 8) & 0xffffff, in ts78xx_fpga_load()
418 ts78xx_fpga.id & 0xff); in ts78xx_fpga_load()
423 ts78xx_fpga.state = -1; in ts78xx_fpga_load()
443 if (ts78xx_fpga.id != fpga_id) { in ts78xx_fpga_unload()
446 (ts78xx_fpga.id >> 8) & 0xffffff, ts78xx_fpga.id & 0xff, in ts78xx_fpga_unload()
448 ts78xx_fpga.state = -1; in ts78xx_fpga_unload()
453 ts78xx_fpga.state = -1; in ts78xx_fpga_unload()
463 if (ts78xx_fpga.state < 0) in ts78xx_fpga_show()
466 return sprintf(buf, "%s\n", (ts78xx_fpga.state) ? "online" : "offline"); in ts78xx_fpga_show()
474 if (ts78xx_fpga.state < 0) { in ts78xx_fpga_store()
486 if (ts78xx_fpga.state == value) in ts78xx_fpga_store()
489 ret = (ts78xx_fpga.state == 0) in ts78xx_fpga_store()
494 ts78xx_fpga.state = value; in ts78xx_fpga_store()
500 __ATTR(ts78xx_fpga, 0644, ts78xx_fpga_show, ts78xx_fpga_store);