CPU freq support using 970FX powertune facility for iMac G5 and SMU
based single CPU desktop.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Currently there is no Kconfig symbol to indicate that we want nvram
support on 64-bit kernels; it's assumed we always want it, so make
the powermac setup code always initialize the pmac nvram code if
64-bit.
Signed-off-by: Paul Mackerras <paulus@samba.org>
We were getting powerbook sleep code included, and giving compile
errors, with CONFIG_PM=y on a 64-bit build. This excludes that code
so the kernel will compile. One day BenH will implement on sleep on
the G5...
Signed-off-by: Paul Mackerras <paulus@samba.org>
SMP still needs more work but UP gets as far as starting userspace
at least. This uses the 64-bit-style code for spinning up the cpus.
Signed-off-by: Paul Mackerras <paulus@samba.org>
If the machine's clock is set to a bogus value, this check resulted
in userland waiting effectively forever for the RTC value to change,
so remove the check.
Signed-off-by: Paul Mackerras <paulus@samba.org>
This is so that the 32-bit CHRP code can use it. The MPC106
initialization code is now in arch/powerpc/sysdev/grackle.c and
is controlled by CONFIG_PPC_MPC106.
Signed-off-by: Paul Mackerras <paulus@samba.org>
* Removed of_show_percpuinfo and just report CPU frequency in generic
show_cpuinfo code.
* Killed OCP and PPC_SYS related code which doesn't belong in the
merge tree
Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Old powermacs have a number of differences from current machines:
- there is no interrupt tree in the device tree, just interrupt
or AAPL,interrupt properties
- the chosen node in the device tree is called /chosen@0
- the OF claim method doesn't map the memory, so we have to do
an explicit map call as well
- there is no /chosen/cpu property on SMP machines
- the NVRAM isn't structured as a set of partitions.
This adapts the merged powermac support code to cope with these
issues.
Signed-off-by: Paul Mackerras <paulus@samba.org>
This brings in a lot of changes from arch/ppc64/kernel/pmac_*.c to
arch/powerpc/platforms/powermac/*.c and makes various minor tweaks
elsewhere. On the powermac we now initialize ppc_md by copying
the whole pmac_md structure into it, which required some changes in
the ordering of initializations of individual fields of it.
Signed-off-by: Paul Mackerras <paulus@samba.org>
I had the sense of the test for when to use the old 601-style RTC
registers inverted. pmac_calibrate_decr and via_calibrate_decr
weren't setting ppc_tb_freq, on which all the further calculations
depended. Lastly, update_gtod was losing the top 32 bits of
the new tb_to_xs value.
Signed-off-by: Paul Mackerras <paulus@samba.org>
I missed a few places where ppc code was still assuming that the
ppc_md.show_[per]cpuinfo functions returned int.
Signed-off-by: Paul Mackerras <paulus@samba.org>
We now use the merged time.c for both 32-bit and 64-bit compilation
with ARCH=powerpc, and for ARCH=ppc64, but not for ARCH=ppc32.
This removes setup_default_decr (folds its function into time_init)
and moves wakeup_decrementer into time.c. This also makes an
asm-powerpc/rtc.h.
Signed-off-by: Paul Mackerras <paulus@samba.org>
A few things change for consistency between ppc32 and ppc64:
idle functions return void; *_get_boot_time functions return
unsigned long (i.e. time_t) rather than filling in a struct rtc_time
(since that's useful to the callers and easier for pmac to
generate); *_get_rtc_time and *_set_rtc_time functions take
a struct rtc_time; irq_canonicalize is gone; nvram_sync returns
void.
Signed-off-by: Paul Mackerras <paulus@samba.org>
This makes platform code use the smp_ops variable directly instead
of ppc_md.smp_ops, removes the two unused `data' and `wait' arguments
from the *_message_pass() functions, and removes the call to the
never-implemented smp_ops->space_timers() function.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Recent commits upstream have changed files which are currently
duplicated in arch/powerpc and include/asm-powerpc. This updates
them with the corresponding changes.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Since the files are now in arch/powerpc/platforms/powermac, the
pmac_ prefix that they had is redundant.
Signed-off-by: Paul Mackerras <paulus@samba.org>
This brings in the ppc64 version of prom_init.c, prom.c and btext.c
and makes them work for ppc32. This also brings in the new calling
convention, where the first entry to the kernel (with r5 != 0) goes
to the prom_init code, which then restarts from the beginning (with
r5 == 0) after it has done its stuff.
For now this also brings in the ppc32 version of setup.c. It also
merges lmb.h.
Signed-off-by: Paul Mackerras <paulus@samba.org>
This updates the powermac SMP code to use the mpic driver instead of
the openpic driver and fixes the SMP-dependent context switch code.
We had a subtle bug where we were using interrupt numbers 256-259 for
IPIs, but ppc32 had NR_IRQS = 256. Moved the IPIs down to use interrupt
numbers 252-255 instead.
Signed-off-by: Paul Mackerras <paulus@samba.org>
This merges ppc_ksyms.c, puts back the actual do_execve call in
sys_execve, makes init_MMU call find_end_of_memory rather than
ppc_md.find_end_of_memory (every platform has a device tree
with a /memory node now, right?) and fixes some problems with the
mpic initialization on newworld powermacs.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Changed ppc32 so that cur_cpu_spec is just a single pointer for all CPUs.
Additionally, made call_setup_cpu check to see if the cpu_setup pointer
is NULL or not before calling the function. This lets remove the dummy
cpu_setup calls that just return.
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
This creates the directory structure under arch/powerpc and a bunch
of Kconfig files. It does a first-cut merge of arch/powerpc/mm,
arch/powerpc/lib and arch/powerpc/platforms/powermac. This is enough
to build a 32-bit powermac kernel with ARCH=powerpc.
For now we are getting some unmerged files from arch/ppc/kernel and
arch/ppc/syslib, or arch/ppc64/kernel. This makes some minor changes
to files in those directories and files outside arch/powerpc.
The boot directory is still not merged. That's going to be interesting.
Signed-off-by: Paul Mackerras <paulus@samba.org>