Lines Matching defs:ts78xx_fpga

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