Lines Matching defs:ts78xx_fpga

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