1 1.7 tsutsui /* $NetBSD: sti_machdep.c,v 1.7 2025/05/31 03:05:25 tsutsui Exp $ */ 2 1.1 tsutsui /* $OpenBSD: sti_sgc.c,v 1.14 2007/05/26 00:36:03 krw Exp $ */ 3 1.1 tsutsui 4 1.1 tsutsui /* 5 1.1 tsutsui * Copyright (c) 2005, Miodrag Vallat 6 1.1 tsutsui * 7 1.1 tsutsui * Redistribution and use in source and binary forms, with or without 8 1.1 tsutsui * modification, are permitted provided that the following conditions 9 1.1 tsutsui * are met: 10 1.1 tsutsui * 1. Redistributions of source code must retain the above copyright 11 1.1 tsutsui * notice, this list of conditions and the following disclaimer. 12 1.1 tsutsui * 2. Redistributions in binary form must reproduce the above copyright 13 1.1 tsutsui * notice, this list of conditions and the following disclaimer in the 14 1.1 tsutsui * documentation and/or other materials provided with the distribution. 15 1.1 tsutsui * 16 1.1 tsutsui * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 1.1 tsutsui * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 1.1 tsutsui * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 1.1 tsutsui * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 20 1.1 tsutsui * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 1.1 tsutsui * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 1.1 tsutsui * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 1.1 tsutsui * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 24 1.1 tsutsui * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 25 1.1 tsutsui * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 1.1 tsutsui * POSSIBILITY OF SUCH DAMAGE. 27 1.1 tsutsui * 28 1.1 tsutsui */ 29 1.1 tsutsui /*- 30 1.1 tsutsui * Copyright (c) 2020, 2025 Izumi Tsutsui. All rights reserved. 31 1.1 tsutsui * 32 1.1 tsutsui * Redistribution and use in source and binary forms, with or without 33 1.1 tsutsui * modification, are permitted provided that the following conditions 34 1.1 tsutsui * are met: 35 1.1 tsutsui * 1. Redistributions of source code must retain the above copyright 36 1.1 tsutsui * notice, this list of conditions and the following disclaimer. 37 1.1 tsutsui * 2. Redistributions in binary form must reproduce the above copyright 38 1.1 tsutsui * notice, this list of conditions and the following disclaimer in the 39 1.1 tsutsui * documentation and/or other materials provided with the distribution. 40 1.1 tsutsui * 41 1.1 tsutsui * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 42 1.1 tsutsui * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 43 1.1 tsutsui * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 44 1.1 tsutsui * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 45 1.1 tsutsui * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 46 1.1 tsutsui * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 47 1.1 tsutsui * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 48 1.1 tsutsui * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 49 1.1 tsutsui * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 50 1.1 tsutsui * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 51 1.1 tsutsui */ 52 1.1 tsutsui 53 1.1 tsutsui #include <sys/cdefs.h> 54 1.7 tsutsui __KERNEL_RCSID(0, "$NetBSD: sti_machdep.c,v 1.7 2025/05/31 03:05:25 tsutsui Exp $"); 55 1.1 tsutsui 56 1.1 tsutsui #include <sys/param.h> 57 1.1 tsutsui #include <sys/device.h> 58 1.1 tsutsui #include <sys/bus.h> 59 1.1 tsutsui 60 1.1 tsutsui #include <dev/wscons/wsconsio.h> 61 1.1 tsutsui 62 1.1 tsutsui #include <hp300/dev/sti_machdep.h> 63 1.1 tsutsui 64 1.1 tsutsui /* 65 1.4 tsutsui * 425e and 362/382 EVRX specific hardware 66 1.1 tsutsui */ 67 1.1 tsutsui /* 68 1.4 tsutsui * RAMDAC (Bt458) on 425e EVRX is found at offset 0x00060000 from SGC bus PA. 69 1.4 tsutsui * RAMDAC (Bt474) on 362/382 EVRX is also found at offset 0x00060000 70 1.4 tsutsui * from DIO scode (132) + STI_DIO_SCODE_OFFSET PA (i.e. 0x01800000). 71 1.4 tsutsui * 72 1.4 tsutsui * Offset 0x040000 length 0x1c0000 is mapped in MI sti via ROM region 2 73 1.4 tsutsui * on both 425e and 362/382. 74 1.1 tsutsui */ 75 1.4 tsutsui #define STI_EVRX_REGNO2OFFSET 0x00020000 /* 0x00060000 - 0x00040000 */ 76 1.4 tsutsui 77 1.4 tsutsui /* bitmap memory can be accessed at offset +0x200000 */ 78 1.4 tsutsui #define STI_EVRX_FBOFFSET 0x00200000 79 1.1 tsutsui 80 1.1 tsutsui #define EVRX_BT458_ADDR (STI_EVRX_REGNO2OFFSET + 0x200 + 2) 81 1.1 tsutsui #define EVRX_BT458_CMAP (STI_EVRX_REGNO2OFFSET + 0x204 + 2) 82 1.1 tsutsui #define EVRX_BT458_CTRL (STI_EVRX_REGNO2OFFSET + 0x208 + 2) 83 1.1 tsutsui #define EVRX_BT458_OMAP (STI_EVRX_REGNO2OFFSET + 0x20C + 2) 84 1.1 tsutsui 85 1.4 tsutsui /* These registers are partially common between Bt474 and Bt458 */ 86 1.4 tsutsui #define EVRX_BT4xx_ADDR EVRX_BT458_ADDR 87 1.4 tsutsui #define EVRX_BT4xx_CMAP EVRX_BT458_CMAP 88 1.4 tsutsui #define EVRX_BT4xx_CTRL EVRX_BT458_CTRL 89 1.4 tsutsui 90 1.1 tsutsui /* from HP-UX /usr/lib/libddevrx.a */ 91 1.1 tsutsui #define EVRX_MAGIC00 (STI_EVRX_REGNO2OFFSET + 0x600) 92 1.1 tsutsui #define EVRX_MAGIC04 (STI_EVRX_REGNO2OFFSET + 0x604) 93 1.1 tsutsui #define EVRX_MAGIC08 (STI_EVRX_REGNO2OFFSET + 0x608) 94 1.1 tsutsui #define EVRX_MAGIC0C (STI_EVRX_REGNO2OFFSET + 0x60c) 95 1.1 tsutsui #define EVRX_MAGIC10 (STI_EVRX_REGNO2OFFSET + 0x610) 96 1.1 tsutsui #define EVRX_MAGIC10_BSY 0x00010000 97 1.1 tsutsui #define EVRX_MAGIC18 (STI_EVRX_REGNO2OFFSET + 0x618) 98 1.1 tsutsui #define EVRX_MAGIC1C (STI_EVRX_REGNO2OFFSET + 0x61c) 99 1.1 tsutsui 100 1.1 tsutsui /* 101 1.1 tsutsui * HP A1659A CRX specific hardware 102 1.1 tsutsui */ 103 1.4 tsutsui /* bitmap memory can be accessed at offset +0x1000000 */ 104 1.1 tsutsui #define STI_CRX_FBOFFSET 0x01000000 105 1.1 tsutsui 106 1.4 tsutsui /* hp300 EVRX and CRX specific access functions */ 107 1.1 tsutsui static int sti_evrx_putcmap(struct sti_screen *, u_int, u_int); 108 1.1 tsutsui static void sti_evrx_resetramdac(struct sti_screen *); 109 1.1 tsutsui static void sti_evrx_resetcmap(struct sti_screen *); 110 1.1 tsutsui static void sti_evrx_setupfb(struct sti_screen *); 111 1.1 tsutsui static paddr_t sti_m68k_mmap(void *, void *, off_t, int); 112 1.1 tsutsui 113 1.1 tsutsui static struct bus_space_tag sticn_tag; 114 1.1 tsutsui static struct sti_rom sticn_rom; 115 1.1 tsutsui static struct sti_screen sticn_scr; 116 1.1 tsutsui static bus_addr_t sticn_bases[STI_REGION_MAX]; 117 1.1 tsutsui 118 1.1 tsutsui static const struct wsdisplay_accessops sti_m68k_accessops = { 119 1.5 tsutsui .ioctl = sti_ioctl, 120 1.5 tsutsui .mmap = sti_m68k_mmap, 121 1.5 tsutsui .alloc_screen = sti_alloc_screen, 122 1.5 tsutsui .free_screen = sti_free_screen, 123 1.5 tsutsui .show_screen = sti_show_screen, 124 1.5 tsutsui .load_font = sti_load_font 125 1.1 tsutsui }; 126 1.1 tsutsui 127 1.1 tsutsui void 128 1.1 tsutsui sti_machdep_attach_console(struct sti_machdep_softc *sc) 129 1.1 tsutsui { 130 1.1 tsutsui struct sti_softc *ssc = &sc->sc_sti; 131 1.1 tsutsui 132 1.1 tsutsui ssc->sc_flags |= STI_CONSOLE | STI_ATTACHED; 133 1.1 tsutsui ssc->sc_rom = &sticn_rom; 134 1.1 tsutsui ssc->sc_rom->rom_softc = ssc; 135 1.1 tsutsui ssc->sc_scr = &sticn_scr; 136 1.1 tsutsui ssc->sc_scr->scr_rom = ssc->sc_rom; 137 1.1 tsutsui memcpy(ssc->bases, sticn_bases, sizeof(ssc->bases)); 138 1.1 tsutsui 139 1.1 tsutsui sti_describe(ssc); 140 1.1 tsutsui } 141 1.1 tsutsui 142 1.1 tsutsui void 143 1.1 tsutsui sti_machdep_attach(struct sti_machdep_softc *sc) 144 1.1 tsutsui { 145 1.1 tsutsui struct sti_softc *ssc = &sc->sc_sti; 146 1.1 tsutsui struct sti_screen *scr; 147 1.1 tsutsui paddr_t base = sc->sc_base; 148 1.1 tsutsui struct wsemuldisplaydev_attach_args waa; 149 1.1 tsutsui struct sti_dd *rom_dd; 150 1.1 tsutsui uint32_t grid0; 151 1.1 tsutsui 152 1.1 tsutsui /* Identify the board model by dd_grid */ 153 1.1 tsutsui rom_dd = &ssc->sc_rom->rom_dd; 154 1.1 tsutsui grid0 = rom_dd->dd_grid[0]; 155 1.1 tsutsui scr = ssc->sc_scr; 156 1.1 tsutsui 157 1.1 tsutsui switch (grid0) { 158 1.1 tsutsui case STI_DD_EVRX: 159 1.4 tsutsui case STI_DD_382C: 160 1.4 tsutsui case STI_DD_3X2V: 161 1.1 tsutsui /* 162 1.4 tsutsui * 425e and 362/382 on-board EVRX framebuffer. 163 1.1 tsutsui */ 164 1.1 tsutsui sc->sc_bitmap = base + STI_EVRX_FBOFFSET; 165 1.1 tsutsui 166 1.1 tsutsui /* 167 1.4 tsutsui * initialize Bt458/474 RAMDAC and preserve initial color map 168 1.1 tsutsui */ 169 1.1 tsutsui sti_evrx_resetramdac(scr); 170 1.1 tsutsui sti_evrx_resetcmap(scr); 171 1.1 tsutsui scr->setupfb = sti_evrx_setupfb; 172 1.1 tsutsui scr->putcmap = sti_evrx_putcmap; 173 1.1 tsutsui break; 174 1.1 tsutsui 175 1.1 tsutsui case STI_DD_CRX: 176 1.1 tsutsui /* 177 1.1 tsutsui * HP A1659A CRX on some 425t variants. 178 1.1 tsutsui */ 179 1.1 tsutsui sc->sc_bitmap = base + STI_CRX_FBOFFSET; 180 1.7 tsutsui break; 181 1.1 tsutsui 182 1.1 tsutsui default: 183 1.1 tsutsui /* 184 1.1 tsutsui * Unsupported variants. 185 1.1 tsutsui * Use default common sti(4) attachment (no bitmap support). 186 1.1 tsutsui */ 187 1.1 tsutsui sti_end_attach(ssc); 188 1.7 tsutsui return; 189 1.1 tsutsui } 190 1.7 tsutsui 191 1.7 tsutsui aprint_normal_dev(ssc->sc_dev, "Enable mmap support\n"); 192 1.7 tsutsui 193 1.7 tsutsui scr->scr_wsmode = WSDISPLAYIO_MODE_EMUL; 194 1.7 tsutsui waa.console = ssc->sc_flags & STI_CONSOLE ? 1 : 0; 195 1.7 tsutsui waa.scrdata = &scr->scr_screenlist; 196 1.7 tsutsui waa.accessops = &sti_m68k_accessops; 197 1.7 tsutsui waa.accesscookie = scr; 198 1.7 tsutsui 199 1.7 tsutsui config_found(ssc->sc_dev, &waa, wsemuldisplaydevprint, 200 1.7 tsutsui CFARGS_NONE); 201 1.1 tsutsui } 202 1.1 tsutsui 203 1.1 tsutsui static int 204 1.1 tsutsui sti_evrx_putcmap(struct sti_screen *scr, u_int index, u_int count) 205 1.1 tsutsui { 206 1.1 tsutsui struct sti_rom *rom = scr->scr_rom; 207 1.1 tsutsui bus_space_tag_t bst = rom->memt; 208 1.1 tsutsui bus_space_handle_t bsh = rom->regh[2]; 209 1.1 tsutsui int i; 210 1.1 tsutsui 211 1.1 tsutsui /* magic setup from HP-UX */ 212 1.1 tsutsui bus_space_write_4(bst, bsh, EVRX_MAGIC08, 0x00000001); 213 1.1 tsutsui bus_space_write_4(bst, bsh, EVRX_MAGIC00, 0x00000001); 214 1.1 tsutsui for (i = index; i < index + count; i++) { 215 1.1 tsutsui /* this is what HP-UX woodDownloadCmap() does */ 216 1.1 tsutsui while ((bus_space_read_4(bst, bsh, EVRX_MAGIC10) & 217 1.1 tsutsui EVRX_MAGIC10_BSY) != 0) 218 1.1 tsutsui continue; 219 1.4 tsutsui bus_space_write_1(bst, bsh, EVRX_BT4xx_ADDR, i); 220 1.4 tsutsui bus_space_write_1(bst, bsh, EVRX_BT4xx_CMAP, scr->scr_rcmap[i]); 221 1.4 tsutsui bus_space_write_1(bst, bsh, EVRX_BT4xx_CMAP, scr->scr_gcmap[i]); 222 1.4 tsutsui bus_space_write_4(bst, bsh, EVRX_MAGIC10, scr->scr_bcmap[i]); 223 1.1 tsutsui } 224 1.1 tsutsui return 0; 225 1.1 tsutsui } 226 1.1 tsutsui 227 1.1 tsutsui static void 228 1.1 tsutsui sti_evrx_resetramdac(struct sti_screen *scr) 229 1.1 tsutsui { 230 1.1 tsutsui struct sti_rom *rom = scr->scr_rom; 231 1.1 tsutsui bus_space_tag_t bst = rom->memt; 232 1.1 tsutsui bus_space_handle_t bsh = rom->regh[2]; 233 1.1 tsutsui #if 0 234 1.1 tsutsui int i; 235 1.1 tsutsui #endif 236 1.1 tsutsui 237 1.1 tsutsui /* 238 1.1 tsutsui * Initialize the Bt458. When we write to control registers, 239 1.1 tsutsui * the address is not incremented automatically. So we specify 240 1.1 tsutsui * it ourselves for each control register. 241 1.1 tsutsui */ 242 1.1 tsutsui 243 1.1 tsutsui /* all planes will be read */ 244 1.4 tsutsui bus_space_write_1(bst, bsh, EVRX_BT4xx_ADDR, 0x04); 245 1.4 tsutsui bus_space_write_1(bst, bsh, EVRX_BT4xx_CTRL, 0xff); 246 1.1 tsutsui 247 1.4 tsutsui #if 0 248 1.4 tsutsui /* 249 1.4 tsutsui * HP-UX woodInitializeHardware() doesn't touch these 250 1.4 tsutsui * Bt458 specific registers. Maybe initialized by STI ROM? 251 1.4 tsutsui */ 252 1.1 tsutsui /* all planes have non-blink */ 253 1.1 tsutsui bus_space_write_1(bst, bsh, EVRX_BT458_ADDR, 0x05); 254 1.1 tsutsui bus_space_write_1(bst, bsh, EVRX_BT458_CTRL, 0x00); 255 1.1 tsutsui 256 1.1 tsutsui /* palette enabled, ovly plane disabled */ 257 1.1 tsutsui bus_space_write_1(bst, bsh, EVRX_BT458_ADDR, 0x06); 258 1.1 tsutsui bus_space_write_1(bst, bsh, EVRX_BT458_CTRL, 0x40); 259 1.1 tsutsui 260 1.1 tsutsui /* no test mode */ 261 1.1 tsutsui bus_space_write_1(bst, bsh, EVRX_BT458_ADDR, 0x07); 262 1.1 tsutsui bus_space_write_1(bst, bsh, EVRX_BT458_CTRL, 0x00); 263 1.4 tsutsui #endif 264 1.1 tsutsui 265 1.1 tsutsui /* magic initialization from HP-UX woodInitializeHardware() */ 266 1.1 tsutsui bus_space_write_4(bst, bsh, EVRX_MAGIC00, 0x00000001); 267 1.1 tsutsui bus_space_write_4(bst, bsh, EVRX_MAGIC04, 0x00000001); 268 1.1 tsutsui bus_space_write_4(bst, bsh, EVRX_MAGIC08, 0x00000001); 269 1.1 tsutsui bus_space_write_4(bst, bsh, EVRX_MAGIC0C, 0x00000001); 270 1.1 tsutsui bus_space_write_4(bst, bsh, EVRX_MAGIC18, 0xFFFFFFFF); 271 1.1 tsutsui bus_space_write_4(bst, bsh, EVRX_MAGIC1C, 0x00000000); 272 1.1 tsutsui 273 1.1 tsutsui #if 0 274 1.1 tsutsui bus_space_write_1(bst, bsh, EVRX_BT458_ADDR, 0x00); 275 1.1 tsutsui for (i = 0; i < 4; i++) { 276 1.1 tsutsui bus_space_write_1(bst, bsh, EVRX_BT458_OMAP, 0x00); 277 1.1 tsutsui bus_space_write_1(bst, bsh, EVRX_BT458_OMAP, 0x00); 278 1.1 tsutsui bus_space_write_1(bst, bsh, EVRX_BT458_OMAP, 0x00); 279 1.1 tsutsui } 280 1.1 tsutsui #endif 281 1.1 tsutsui } 282 1.1 tsutsui 283 1.1 tsutsui static void 284 1.1 tsutsui sti_evrx_resetcmap(struct sti_screen *scr) 285 1.1 tsutsui { 286 1.1 tsutsui struct sti_rom *rom = scr->scr_rom; 287 1.1 tsutsui bus_space_tag_t bst = rom->memt; 288 1.1 tsutsui bus_space_handle_t bsh = rom->regh[2]; 289 1.1 tsutsui int i; 290 1.1 tsutsui 291 1.1 tsutsui /* magic setup from HP-UX */ 292 1.1 tsutsui bus_space_write_4(bst, bsh, EVRX_MAGIC08, 0x00000001); 293 1.1 tsutsui bus_space_write_4(bst, bsh, EVRX_MAGIC00, 0x00000001); 294 1.1 tsutsui 295 1.1 tsutsui /* preserve palette values initialized by STI firmware */ 296 1.1 tsutsui for (i = 0; i < STI_NCMAP; i++) { 297 1.1 tsutsui /* this is what HP-UX woodUploadCmap() does */ 298 1.1 tsutsui while ((bus_space_read_4(bst, bsh, EVRX_MAGIC10) & 299 1.1 tsutsui EVRX_MAGIC10_BSY) != 0) 300 1.1 tsutsui continue; 301 1.1 tsutsui bus_space_write_1(bst, bsh, EVRX_BT458_ADDR, i); 302 1.4 tsutsui scr->scr_rcmap[i] = bus_space_read_1(bst, bsh, EVRX_BT4xx_CMAP); 303 1.4 tsutsui scr->scr_gcmap[i] = bus_space_read_1(bst, bsh, EVRX_BT4xx_CMAP); 304 1.4 tsutsui scr->scr_bcmap[i] = bus_space_read_1(bst, bsh, EVRX_BT4xx_CMAP); 305 1.1 tsutsui } 306 1.1 tsutsui } 307 1.1 tsutsui 308 1.1 tsutsui static void 309 1.1 tsutsui sti_evrx_setupfb(struct sti_screen *scr) 310 1.1 tsutsui { 311 1.1 tsutsui 312 1.1 tsutsui sti_init(scr, 0); 313 1.1 tsutsui sti_evrx_resetramdac(scr); 314 1.1 tsutsui } 315 1.1 tsutsui 316 1.1 tsutsui static paddr_t 317 1.1 tsutsui sti_m68k_mmap(void *v, void *vs, off_t offset, int prot) 318 1.1 tsutsui { 319 1.1 tsutsui struct sti_screen *scr = (struct sti_screen *)v; 320 1.1 tsutsui struct sti_rom *rom = scr->scr_rom; 321 1.1 tsutsui struct sti_softc *ssc = rom->rom_softc; 322 1.1 tsutsui struct sti_machdep_softc *sc = device_private(ssc->sc_dev); 323 1.1 tsutsui paddr_t cookie = -1; 324 1.1 tsutsui 325 1.1 tsutsui if ((offset & PAGE_MASK) != 0) 326 1.1 tsutsui return -1; 327 1.1 tsutsui 328 1.1 tsutsui switch (scr->scr_wsmode) { 329 1.1 tsutsui case WSDISPLAYIO_MODE_MAPPED: 330 1.1 tsutsui /* not implemented yet; what should be shown? */ 331 1.1 tsutsui break; 332 1.1 tsutsui case WSDISPLAYIO_MODE_DUMBFB: 333 1.1 tsutsui if (offset >= 0 && offset < (scr->fbwidth * scr->fbheight)) 334 1.1 tsutsui cookie = m68k_btop(sc->sc_bitmap + offset); 335 1.1 tsutsui break; 336 1.1 tsutsui default: 337 1.1 tsutsui break; 338 1.1 tsutsui } 339 1.1 tsutsui 340 1.1 tsutsui return cookie; 341 1.1 tsutsui } 342 1.1 tsutsui 343 1.1 tsutsui void 344 1.1 tsutsui sti_machdep_cnattach(bus_space_tag_t bst, paddr_t base) 345 1.1 tsutsui { 346 1.1 tsutsui int i; 347 1.1 tsutsui 348 1.1 tsutsui sticn_tag = *bst; 349 1.1 tsutsui 350 1.1 tsutsui /* sticn_bases[0] will be fixed in sti_cnattach() */ 351 1.1 tsutsui for (i = 0; i < STI_REGION_MAX; i++) 352 1.1 tsutsui sticn_bases[i] = (bus_addr_t)base; 353 1.1 tsutsui 354 1.1 tsutsui sti_cnattach(&sticn_rom, &sticn_scr, &sticn_tag, sticn_bases, 355 1.6 tsutsui STI_CODEBASE_M68K); 356 1.1 tsutsui } 357