Skip to content

Commit

Permalink
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/paulus/powerpc

* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (77 commits)
  [POWERPC] Abolish powerpc_flash_init()
  [POWERPC] Early serial debug support for PPC44x
  [POWERPC] Support for the Ebony 440GP reference board in arch/powerpc
  [POWERPC] Add device tree for Ebony
  [POWERPC] Add powerpc/platforms/44x, disable platforms/4xx for now
  [POWERPC] MPIC U3/U4 MSI backend
  [POWERPC] MPIC MSI allocator
  [POWERPC] Enable MSI mappings for MPIC
  [POWERPC] Tell Phyp we support MSI
  [POWERPC] RTAS MSI implementation
  [POWERPC] PowerPC MSI infrastructure
  [POWERPC] Rip out the existing powerpc msi stubs
  [POWERPC] Remove use of 4level-fixup.h for ppc32
  [POWERPC] Add powerpc PCI-E reset API implementation
  [POWERPC] Holly bootwrapper
  [POWERPC] Holly DTS
  [POWERPC] Holly defconfig
  [POWERPC] Add support for 750CL Holly board
  [POWERPC] Generalize tsi108 PCI setup
  [POWERPC] Generalize tsi108 PHY types
  ...

Fixed conflict in include/asm-powerpc/kdebug.h manually

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Linus Torvalds committed May 8, 2007
2 parents 74add80 + 197686d commit df6d391
Show file tree
Hide file tree
Showing 217 changed files with 8,175 additions and 2,119 deletions.
4 changes: 4 additions & 0 deletions Documentation/powerpc/booting-without-of.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1560,6 +1560,9 @@ platforms are moved over to use the flattened-device-tree model.
network device. This is used by the bootwrapper to interpret
MAC addresses passed by the firmware when no information other
than indices is available to associate an address with a device.
- phy-connection-type : a string naming the controller/PHY interface type,
i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id", "tbi",
or "rtbi".

Example:
ucc@2000 {
Expand All @@ -1574,6 +1577,7 @@ platforms are moved over to use the flattened-device-tree model.
rx-clock = "none";
tx-clock = "clk9";
phy-handle = <212000>;
phy-connection-type = "gmii";
pio-handle = <140001>;
};

Expand Down
19 changes: 17 additions & 2 deletions arch/powerpc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ config GENERIC_BUG
default y
depends on BUG

config SYS_SUPPORTS_APM_EMULATION
bool

#
# Powerpc uses the slab allocator to manage its ptes and the
# page structs of ptes are used for splitting the page table
Expand All @@ -136,6 +139,11 @@ config DEFAULT_UIMAGE
Used to allow a board to specify it wants a uImage built by default
default n

config PPC64_SWSUSP
bool
depends on PPC64 && (BROKEN || (PPC_PMAC64 && EXPERIMENTAL))
default y

menu "Processor support"
choice
prompt "Processor Type"
Expand Down Expand Up @@ -206,6 +214,7 @@ config 40x
config 44x
bool "AMCC 44x"
select PPC_DCR_NATIVE
select WANT_DEVICE_TREE

config E200
bool "Freescale e200"
Expand Down Expand Up @@ -270,9 +279,14 @@ config PPC_OF_PLATFORM_PCI
depends on PPC64 # not supported on 32 bits yet
default n

config 4xx
bool
depends on 40x || 44x
default y

config BOOKE
bool
depends on E200 || E500
depends on E200 || E500 || 44x
default y

config FSL_BOOKE
Expand Down Expand Up @@ -669,11 +683,12 @@ config MCA
config PCI
bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_86xx \
|| PPC_MPC52xx || (EMBEDDED && (PPC_PSERIES || PPC_ISERIES)) \
|| MPC7448HPC2 || PPC_PS3
|| MPC7448HPC2 || PPC_PS3 || PPC_HOLLY
default y if !40x && !CPM2 && !8xx && !APUS && !PPC_83xx \
&& !PPC_85xx && !PPC_86xx
default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS
default PCI_QSPAN if !4xx && !CPM2 && 8xx
select ARCH_SUPPORTS_MSI
help
Find out whether your system includes a PCI bus. PCI is the name of
a bus system, i.e. the way the CPU talks to the other stuff inside
Expand Down
22 changes: 18 additions & 4 deletions arch/powerpc/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,6 @@ config BOOTX_TEXT
Say Y here to see progress messages from the boot firmware in text
mode. Requires either BootX or Open Firmware.

config SERIAL_TEXT_DEBUG
bool "Support for early boot texts over serial port"
depends on 4xx

config PPC_EARLY_DEBUG
bool "Early debugging (dangerous)"

Expand Down Expand Up @@ -207,6 +203,24 @@ config PPC_EARLY_DEBUG_BEAT
help
Select this to enable early debugging for Celleb with Beat.

config PPC_EARLY_DEBUG_44x
bool "Early serial debugging for IBM/AMCC 44x CPUs"
depends on 44x
select PPC_UDBG_16550
help
Select this to enable early debugging for IBM 44x chips via the
inbuilt serial port.

endchoice

config PPC_EARLY_DEBUG_44x_PHYSLOW
hex "Low 32 bits of early debug UART physical address"
depends PPC_EARLY_DEBUG_44x
default "0x40000200"

config PPC_EARLY_DEBUG_44x_PHYSHIGH
hex "EPRN of early debug UART physical address"
depends PPC_EARLY_DEBUG_44x
default "0x1"

endmenu
2 changes: 1 addition & 1 deletion arch/powerpc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ all: $(KBUILD_IMAGE)

CPPFLAGS_vmlinux.lds := -Upowerpc

BOOT_TARGETS = zImage zImage.initrd uImage cuImage
BOOT_TARGETS = zImage zImage.initrd uImage

PHONY += $(BOOT_TARGETS)

Expand Down
40 changes: 40 additions & 0 deletions arch/powerpc/boot/44x.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Copyright 2007 David Gibson, IBM Corporation.
*
* Based on earlier code:
* Matt Porter <mporter@kernel.crashing.org>
* Copyright 2002-2005 MontaVista Software Inc.
*
* Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
* Copyright (c) 2003, 2004 Zultys Technologies
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#include <stddef.h>
#include "types.h"
#include "string.h"
#include "stdio.h"
#include "ops.h"
#include "reg.h"
#include "dcr.h"

/* Read the 44x memory controller to get size of system memory. */
void ibm44x_fixup_memsize(void)
{
int i;
unsigned long memsize, bank_config;

memsize = 0;
for (i = 0; i < ARRAY_SIZE(sdram_bxcr); i++) {
mtdcr(DCRN_SDRAM0_CFGADDR, sdram_bxcr[i]);
bank_config = mfdcr(DCRN_SDRAM0_CFGDATA);

if (bank_config & SDRAM_CONFIG_BANK_ENABLE)
memsize += SDRAM_CONFIG_BANK_SIZE(bank_config);
}

dt_fixup_memory(0, memsize);
}
16 changes: 16 additions & 0 deletions arch/powerpc/boot/44x.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* PowerPC 44x related functions
*
* Copyright 2007 David Gibson, IBM Corporation.
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/
#ifndef _PPC_BOOT_44X_H_
#define _PPC_BOOT_44X_H_

void ibm44x_fixup_memsize(void);
void ebony_init(void *mac0, void *mac1);

#endif /* _PPC_BOOT_44X_H_ */
49 changes: 34 additions & 15 deletions arch/powerpc/boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,15 @@ zlib := inffast.c inflate.c inftrees.c
zlibheader := inffast.h inffixed.h inflate.h inftrees.h infutil.h
zliblinuxheader := zlib.h zconf.h zutil.h

$(addprefix $(obj)/,$(zlib) main.o): $(addprefix $(obj)/,$(zliblinuxheader)) \
$(addprefix $(obj)/,$(zlibheader))
$(addprefix $(obj)/,$(zlib) gunzip_util.o main.o): \
$(addprefix $(obj)/,$(zliblinuxheader)) $(addprefix $(obj)/,$(zlibheader))

src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \
ns16550.c serial.c simple_alloc.c div64.S util.S \
gunzip_util.c elf_util.c $(zlib) devtree.c
src-plat := of.c cuboot-83xx.c cuboot-85xx.c
gunzip_util.c elf_util.c $(zlib) devtree.c \
44x.c ebony.c
src-plat := of.c cuboot-83xx.c cuboot-85xx.c holly.c \
cuboot-ebony.c treeboot-ebony.c
src-boot := $(src-wlib) $(src-plat) empty.c

src-boot := $(addprefix $(obj)/, $(src-boot))
Expand Down Expand Up @@ -129,7 +131,14 @@ image-$(CONFIG_PPC_CELLEB) += zImage.pseries
image-$(CONFIG_PPC_CHRP) += zImage.chrp
image-$(CONFIG_PPC_EFIKA) += zImage.chrp
image-$(CONFIG_PPC_PMAC) += zImage.pmac
image-$(CONFIG_DEFAULT_UIMAGE) += uImage cuImage
image-$(CONFIG_PPC_HOLLY) += zImage.holly-elf
image-$(CONFIG_DEFAULT_UIMAGE) += uImage

ifneq ($(CONFIG_DEVICE_TREE),"")
image-$(CONFIG_PPC_83xx) += cuImage.83xx
image-$(CONFIG_PPC_85xx) += cuImage.85xx
image-$(CONFIG_EBONY) += treeImage.ebony cuImage.ebony
endif

# For 32-bit powermacs, build the COFF and miboot images
# as well as the ELF images.
Expand All @@ -138,7 +147,8 @@ image-$(CONFIG_PPC_PMAC) += zImage.coff zImage.miboot
endif

initrd- := $(patsubst zImage%, zImage.initrd%, $(image-n) $(image-))
initrd-y := $(patsubst zImage%, zImage.initrd%, $(image-y))
initrd-y := $(patsubst zImage%, zImage.initrd%, \
$(patsubst treeImage%, treeImage.initrd%, $(image-y)))
initrd-y := $(filter-out $(image-y), $(initrd-y))
targets += $(image-y) $(initrd-y)

Expand All @@ -159,18 +169,27 @@ $(obj)/zImage.ps3: vmlinux
$(obj)/zImage.initrd.ps3: vmlinux
@echo " WARNING zImage.initrd.ps3 not supported (yet)"

$(obj)/zImage.holly-elf: vmlinux $(wrapperbits)
$(call if_changed,wrap,holly,$(obj)/dts/holly.dts,,)

$(obj)/zImage.initrd.holly-elf: vmlinux $(wrapperbits) $(obj)/ramdisk.image.gz
$(call if_changed,wrap,holly,$(obj)/dts/holly.dts,,$(obj)/ramdisk.image.gz)

$(obj)/uImage: vmlinux $(wrapperbits)
$(call if_changed,wrap,uboot)

cuboot-plat-$(CONFIG_83xx) += 83xx
cuboot-plat-$(CONFIG_85xx) += 85xx
cuboot-plat-y += unknown-platform

# CONFIG_DEVICE_TREE will have "" around it, make sure to strip them
dts = $(if $(shell echo $(CONFIG_DEVICE_TREE) | grep '^/'),\
,$(srctree)/$(src)/dts/)$(CONFIG_DEVICE_TREE)
,$(srctree)/$(src)/dts/)$(CONFIG_DEVICE_TREE:"%"=%)

$(obj)/cuImage.%: vmlinux $(dts) $(wrapperbits)
$(call if_changed,wrap,cuboot-$*,$(dts))

$(obj)/treeImage.%: vmlinux $(dts) $(wrapperbits)
$(call if_changed,wrap,treeboot-$*,$(dts))

$(obj)/cuImage: vmlinux $(wrapperbits)
$(call if_changed,wrap,cuboot-$(word 1,$(cuboot-plat-y)),$(dts))
$(obj)/treeImage.initrd.%: vmlinux $(dts) $(wrapperbits)
$(call if_changed,wrap,treeboot-$*,$(dts),,$(obj)/ramdisk.image.gz)

$(obj)/zImage: $(addprefix $(obj)/, $(image-y))
@rm -f $@; ln $< $@
Expand All @@ -181,8 +200,8 @@ install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y))
sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $<

# anything not in $(targets)
clean-files += $(image-) $(initrd-) zImage zImage.initrd \
cuImage.elf cuImage.bin.gz
clean-files += $(image-) $(initrd-) zImage zImage.initrd cuImage.* \
treeImage.*

# clean up files cached by wrapper
clean-kernel := vmlinux.strip vmlinux.bin
Expand Down
42 changes: 42 additions & 0 deletions arch/powerpc/boot/cuboot-ebony.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Old U-boot compatibility for Ebony
*
* Author: David Gibson <david@gibson.dropbear.id.au>
*
* Copyright 2007 David Gibson, IBM Corporatio.
* Based on cuboot-83xx.c, which is:
* Copyright (c) 2007 Freescale Semiconductor, Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation.
*/

#include "ops.h"
#include "stdio.h"
#include "44x.h"

#define TARGET_44x
#include "ppcboot.h"

static bd_t bd;
extern char _end[];

BSS_STACK(4096);

void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7)
{
unsigned long end_of_ram = bd.bi_memstart + bd.bi_memsize;
unsigned long avail_ram = end_of_ram - (unsigned long)_end;

memcpy(&bd, (bd_t *)r3, sizeof(bd));
loader_info.initrd_addr = r4;
loader_info.initrd_size = r4 ? r5 : 0;
loader_info.cmdline = (char *)r6;
loader_info.cmdline_len = r7 - r6;

simple_alloc_init(_end, avail_ram, 32, 64);

ebony_init(&bd.bi_enetaddr, &bd.bi_enet1addr);
}
Loading

0 comments on commit df6d391

Please sign in to comment.