Lines Matching defs:sga
84 struct sbgbus_attach_args *sga = aux;
86 if (sga->sga_chipsel != SBGBUS_CHIPSEL_NONE)
87 aprint_normal(" chipsel %u", sga->sga_chipsel);
88 if (sga->sga_offset != 0)
89 aprint_normal(" offset 0x%x", sga->sga_offset);
90 if (sga->sga_intr[0] != SBGBUS_INTR_NONE) {
91 aprint_normal(" intr %u", sga->sga_intr[0]);
92 if (sga->sga_intr[1] != SBGBUS_INTR_NONE) {
93 aprint_normal(",%u", sga->sga_intr[1]);
103 struct sbgbus_attach_args sga;
107 /* Fill in sga */
108 sga.sga_chipsel = cf->cf_loc[SBGBUSCF_CHIPSEL];
109 sga.sga_offset = cf->cf_loc[SBGBUSCF_OFFSET];
110 sga.sga_intr[0] = cf->cf_loc[SBGBUSCF_INTR];
111 sga.sga_intr[1] = cf->cf_loc[SBGBUSCF_INTR_1];
114 if (sga.sga_intr[0] == SBGBUS_INTR_NONE &&
115 sga.sga_intr[1] != SBGBUS_INTR_NONE) {
119 if (sga.sga_chipsel == SBGBUS_CHIPSEL_NONE &&
120 sga.sga_offset != 0) {
124 if (sga.sga_chipsel >= IO_EXT_CFG_COUNT) {
131 if (sga.sga_chipsel == SBGBUS_CHIPSEL_NONE) {
132 sga.sga_startphys = 0;
133 sga.sga_size = 0;
138 A_IO_EXT_CS_BASE(sga.sga_chipsel) +
140 sga.sga_startphys = (rv & M_IO_START_ADDR) << S_IO_ADDRBASE;
142 A_IO_EXT_CS_BASE(sga.sga_chipsel) +
144 sga.sga_size = (rv & M_IO_MULT_SIZE) << S_IO_REGSIZE;
147 if (sga.sga_size == 0 ||
148 sga.sga_startphys < A_PHYS_GENBUS ||
149 sga.sga_startphys >= A_PHYS_GENBUS_END)
153 if (sga.sga_startphys + sga.sga_size > A_PHYS_GENBUS_END)
154 sga.sga_size = A_PHYS_GENBUS_END - sga.sga_startphys;
158 if (config_probe(parent, cf, &sga)) {
159 config_attach(parent, cf, &sga, sbgbusprint, CFARGS_NONE);