Lines Matching refs:ts78xx_fpga

37 static struct ts78xx_fpga_data ts78xx_fpga = {  variable
97 if (ts78xx_fpga.supports.ts_rtc.init == 0) { in ts78xx_ts_rtc_load()
100 ts78xx_fpga.supports.ts_rtc.init = 1; in ts78xx_ts_rtc_load()
265 if (ts78xx_fpga.supports.ts_nand.init == 0) { in ts78xx_ts_nand_load()
268 ts78xx_fpga.supports.ts_nand.init = 1; in ts78xx_ts_nand_load()
308 if (ts78xx_fpga.supports.ts_rng.init == 0) { in ts78xx_ts_rng_load()
311 ts78xx_fpga.supports.ts_rng.init = 1; in ts78xx_ts_rng_load()
330 ts78xx_fpga.supports.ts_rtc.init = 0; in ts78xx_fpga_devices_zero_init()
331 ts78xx_fpga.supports.ts_nand.init = 0; in ts78xx_fpga_devices_zero_init()
332 ts78xx_fpga.supports.ts_rng.init = 0; in ts78xx_fpga_devices_zero_init()
338 switch (ts78xx_fpga.id) { in ts78xx_fpga_supports()
348 ts78xx_fpga.supports.ts_rtc.present = 1; in ts78xx_fpga_supports()
349 ts78xx_fpga.supports.ts_nand.present = 1; in ts78xx_fpga_supports()
350 ts78xx_fpga.supports.ts_rng.present = 1; in ts78xx_fpga_supports()
354 switch ((ts78xx_fpga.id >> 8) & 0xffffff) { in ts78xx_fpga_supports()
357 ts78xx_fpga.id & 0xff); in ts78xx_fpga_supports()
358 ts78xx_fpga.supports.ts_rtc.present = 1; in ts78xx_fpga_supports()
359 ts78xx_fpga.supports.ts_nand.present = 1; in ts78xx_fpga_supports()
360 ts78xx_fpga.supports.ts_rng.present = 1; in ts78xx_fpga_supports()
363 ts78xx_fpga.supports.ts_rtc.present = 0; in ts78xx_fpga_supports()
364 ts78xx_fpga.supports.ts_nand.present = 0; in ts78xx_fpga_supports()
365 ts78xx_fpga.supports.ts_rng.present = 0; in ts78xx_fpga_supports()
374 if (ts78xx_fpga.supports.ts_rtc.present == 1) { in ts78xx_fpga_load_devices()
377 ts78xx_fpga.supports.ts_rtc.present = 0; in ts78xx_fpga_load_devices()
380 if (ts78xx_fpga.supports.ts_nand.present == 1) { in ts78xx_fpga_load_devices()
383 ts78xx_fpga.supports.ts_nand.present = 0; in ts78xx_fpga_load_devices()
386 if (ts78xx_fpga.supports.ts_rng.present == 1) { in ts78xx_fpga_load_devices()
389 ts78xx_fpga.supports.ts_rng.present = 0; in ts78xx_fpga_load_devices()
399 if (ts78xx_fpga.supports.ts_rtc.present == 1) in ts78xx_fpga_unload_devices()
401 if (ts78xx_fpga.supports.ts_nand.present == 1) in ts78xx_fpga_unload_devices()
403 if (ts78xx_fpga.supports.ts_rng.present == 1) in ts78xx_fpga_unload_devices()
411 ts78xx_fpga.id = readl(TS78XX_FPGA_REGS_VIRT_BASE); in ts78xx_fpga_load()
414 (ts78xx_fpga.id >> 8) & 0xffffff, in ts78xx_fpga_load()
415 ts78xx_fpga.id & 0xff); in ts78xx_fpga_load()
420 ts78xx_fpga.state = -1; in ts78xx_fpga_load()
440 if (ts78xx_fpga.id != fpga_id) { in ts78xx_fpga_unload()
443 (ts78xx_fpga.id >> 8) & 0xffffff, ts78xx_fpga.id & 0xff, in ts78xx_fpga_unload()
445 ts78xx_fpga.state = -1; in ts78xx_fpga_unload()
450 ts78xx_fpga.state = -1; in ts78xx_fpga_unload()
460 if (ts78xx_fpga.state < 0) in ts78xx_fpga_show()
463 return sprintf(buf, "%s\n", (ts78xx_fpga.state) ? "online" : "offline"); in ts78xx_fpga_show()
471 if (ts78xx_fpga.state < 0) { in ts78xx_fpga_store()
483 if (ts78xx_fpga.state == value) in ts78xx_fpga_store()
486 ret = (ts78xx_fpga.state == 0) in ts78xx_fpga_store()
491 ts78xx_fpga.state = value; in ts78xx_fpga_store()
497 __ATTR(ts78xx_fpga, 0644, ts78xx_fpga_show, ts78xx_fpga_store);