Lines Matching +full:step +full:- +full:size
1 // SPDX-License-Identifier: GPL-2.0
3 * ip22-mc.c: Routines for manipulating SGI Memory Controller.
6 * Copyright (C) 1999 Andrew R. Baker (andrewb@uab.edu) - Indigo2 changes
7 * Copyright (C) 2003 Ladislav Michl (ladis@linux-mips.org)
8 * Copyright (C) 2004 Peter Fuerst (pf@net.alphadv.de) - IP28
30 …return (memconfig & SGIMC_MCONFIG_BASEADDR) << ((sgimc->systemid & SGIMC_SYSID_MASKREV) >= 5 ? 24 … in get_bank_addr()
35 …return ((memconfig & SGIMC_MCONFIG_RMASK) + 0x0100) << ((sgimc->systemid & SGIMC_SYSID_MASKREV) >=… in get_bank_size()
40 unsigned int res = bank > 1 ? sgimc->mconfig1 : sgimc->mconfig0; in get_bank_config()
55 unsigned long addr, size; in probe_memory() local
64 size = get_bank_size(tmp); in probe_memory()
67 i, size / 1024 / 1024, addr); in probe_memory()
70 memblock_add(addr, size); in probe_memory()
84 (int) sgimc->systemid & SGIMC_SYSID_MASKREV); in sgimc_init()
90 /* Step 0: Make sure we turn off the watchdog in case it's in sgimc_init()
94 tmp = sgimc->cpuctrl0; in sgimc_init()
96 sgimc->cpuctrl0 = tmp; in sgimc_init()
98 /* Step 1: The CPU/GIO error status registers will not latch in sgimc_init()
103 sgimc->cstat = sgimc->gstat = 0; in sgimc_init()
105 /* Step 2: Enable all parity checking in cpu control register in sgimc_init()
109 tmp = sgimc->cpuctrl0; in sgimc_init()
114 sgimc->cpuctrl0 = tmp; in sgimc_init()
116 /* Step 3: Setup the MC write buffer depth, this is controlled in sgimc_init()
119 tmp = sgimc->cpuctrl1; in sgimc_init()
122 sgimc->cpuctrl1 = tmp; in sgimc_init()
124 /* Step 4: Initialize the RPSS divider register to run as fast in sgimc_init()
128 * ---------------------------------------- in sgimc_init()
130 * ---------------------------------------- in sgimc_init()
138 sgimc->divider = 0x101; in sgimc_init()
140 /* Step 5: Initialize GIO64 arbitrator configuration register. in sgimc_init()
148 tmp = sgimc->giopar & SGIMC_GIOPAR_GFX64; /* keep gfx 64bit settings */ in sgimc_init()
154 if (SGIOC_SYSID_BOARDREV(sgioc->sysid) < 2) { in sgimc_init()
170 sgimc->giopar = tmp; /* poof */ in sgimc_init()
188 mconfig1 = sgimc->mconfig1; in prom_cleanup()
190 sgimc->mconfig1 = (mconfig1 & 0xffff0000) | 0x2060; in prom_cleanup()
196 sgimc->cmacc = (sgimc->cmacc & ~0xf) | 4; in prom_cleanup()
199 sgimc->mconfig1 = mconfig1; in prom_cleanup()