From: David Gibson <hidden> Date: 2007-05-08 02:58:32
Here's my latest Ebony series. I believe we're now ready to merge:
- Patch 1-2 I'm working with akpm and rmk about
- Patch 3-6 I think can go into powerpc.git, then mainline as
of now
- Patch 7, BenH's device-tree aware rewrite of the emac driver
I'm less sure about. Up to you, Paul.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
From: David Gibson <hidden> Date: 2007-05-08 02:59:30
At present, various parts of the serial code use unsigned long to
define resource addresses. This is a problem, because some 32-bit
platforms have physical addresses larger than 32-bits, and have mmio
serial uarts located above the 4GB point.
This patch changes the type of mapbase in both struct uart_port and
struct plat_serial8250_port to resource_size_t, which can be
configured to be 64 bits on such platforms. The mapbase in
serial_struct can't safely be changed, because that structure is user
visible.
Signed-off-by: David Gibson <redacted>
---
drivers/serial/8250.c | 5 +++--
drivers/serial/8250_early.c | 16 +++++++++-------
drivers/serial/serial_core.c | 9 +++++----
include/linux/serial_8250.h | 2 +-
include/linux/serial_core.h | 2 +-
5 files changed, 19 insertions(+), 15 deletions(-)
Index: working-2.6/include/linux/serial_core.h
===================================================================
@@ -273,7 +273,7 @@ struct uart_port {conststructuart_ops*ops;unsignedintcustom_divisor;unsignedintline;/* port index */-unsignedlongmapbase;/* for ioremap */+resource_size_tmapbase;/* for ioremap */structdevice*dev;/* parent device */unsignedcharhub6;/* this should be in the 8250 driver */unsignedcharunused[3];
@@ -168,9 +169,10 @@ static int __init parse_options(struct edevice->baud);}-printk(KERN_INFO"Early serial console at %s 0x%lx (options '%s')\n",+printk(KERN_INFO"Early serial console at %s 0x%llx (options '%s')\n",mmio?"MMIO":"I/O port",-mmio?port->mapbase:(unsignedlong)port->iobase,+mmio?(unsignedlonglong)port->mapbase+:(unsignedlonglong)port->iobase,device->options);return0;}
@@ -236,10 +238,10 @@ static int __init early_uart_console_swimmio=(port->iotype==UPIO_MEM);line=serial8250_start_console(port,device->options);if(line<0)-printk("No ttyS device at %s 0x%lx for console\n",+printk("No ttyS device at %s 0x%llx for console\n",mmio?"MMIO":"I/O port",-mmio?port->mapbase:-(unsignedlong)port->iobase);+mmio?(unsignedlonglong)port->mapbase+:(unsignedlonglong)port->iobase);unregister_console(&early_uart_console);if(mmio)
@@ -2553,8 +2553,9 @@ static int __devinit serial8250_probe(stret=serial8250_register_port(&port);if(ret<0){dev_err(&dev->dev,"unable to register port at index %d "-"(IO%lx MEM%lx IRQ%d): %d\n",i,-p->iobase,p->mapbase,p->irq,ret);+"(IO%lx MEM%llx IRQ%d): %d\n",i,+p->iobase,(unsignedlonglong)p->mapbase,+p->irq,ret);}}return0;
From: David Gibson <hidden> Date: 2007-05-08 02:59:30
At present, the serial core always allows setserial in userspace to
change the port address, irq and base clock of any serial port. That
makes sense for legacy ISA ports, but not for PCI serial ports or
(say) embedded ns16550 compatible serial ports at peculiar addresses.
In these cases, the kernel code configuring the ports must know
exactly where they are, and their clocking arrangements (which can be
unusual on embedded boards). It doesn't make sense for userspace to
change these settings.
Therefore, this patch alters uart_set_info() to ignore attempts to
change a port's type, io address irq or base clock with setserial,
unless that port has a new UPF_SETSERIAL_MOVABLE flag set. That flag
is set only on the ports associated with the serial8250_isa_devs
platform_device defined within 8250.c itself.
Signed-off-by: David Gibson <redacted>
---
drivers/serial/8250.c | 3 ++-
drivers/serial/serial_core.c | 22 +++++++++++++---------
include/linux/serial_core.h | 1 +
3 files changed, 16 insertions(+), 10 deletions(-)
Index: working-2.6/drivers/serial/serial_core.c
===================================================================
From: David Gibson <hidden> Date: 2007-05-08 02:59:30
This patch prepares for Ebony/440 support by creating an
arch/powerpc/platforms/44x directory. It is populated with a single
misc_44x.S file, into which is moved the 44x specific reset code from
head_44x.S (on the grounds that we should really stop clogging up the
head_* files with random asm helper routines).
At the same time, we disable the (empty save Kconfig and Makefile)
arch/powerpc/platforms/4xx directory from the arch/powerpc/platforms
Makefile. Contrary to the comment in
arch/powerpc/platforms/4xx/Makefile, attempting to build such an empty
Makefile will fail, thus breaking compile for the 44x platforms we're
about to add. It can go back in once we start porting some of the 40x
platforms (and thus it becomes non-empty).
Signed-off-by: David Gibson <redacted>
---
arch/powerpc/kernel/head_44x.S | 10 ----------
arch/powerpc/platforms/44x/44x.h | 6 ++++++
arch/powerpc/platforms/44x/Makefile | 1 +
arch/powerpc/platforms/44x/misc_44x.S | 26 ++++++++++++++++++++++++++
arch/powerpc/platforms/Makefile | 3 ++-
5 files changed, 35 insertions(+), 11 deletions(-)
Index: working-2.6/arch/powerpc/platforms/44x/misc_44x.S
===================================================================
From: David Gibson <hidden> Date: 2007-05-08 02:59:30
Add a device tree for the Ebony evaluation board (440GP based). This
tree is not complete or finalized. This tree needs a version of dtc
recent enough to include reference-to-labels to process.
Signed-off-by: David Gibson <redacted>
---
arch/powerpc/boot/dts/ebony.dts | 307 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 307 insertions(+)
Index: working-2.6/arch/powerpc/boot/dts/ebony.dts
===================================================================
@@ -0,0 +1,307 @@+/*+*DeviceTreeSourceforIBMEbony+*+*Copyright(c)2006,2007IBMCorp.+*JoshBoyer<jwboyer@linux.vnet.ibm.com>,DavidGibson<dwg@au1.ibm.com>+*+*FIXME:Draftonly!+*+*ThisfileislicensedunderthetermsoftheGNUGeneralPublic+*Licenseversion2.Thisprogramislicensed"as is"without+*anywarrantyofanykind,whetherexpressorimplied.+*+*Tobuild:+*dtc-Idts-Oasm-oebony.S-b0ebony.dts+*dtc-Idts-Odtb-oebony.dtb-b0ebony.dts+*/++/{+#address-cells=<2>;+#size-cells=<1>;+model="Ebony";+compatible="Ebony";+dcr-parent=<&/cpus/PowerPC,440GP@0>;++cpus{+#address-cells=<1>;+#size-cells=<0>;++PowerPC,440GP@0{+device_type="cpu";+reg=<0>;+clock-frequency=<0>;// Filled in by zImage+timebase-frequency=<0>;// Filled in by zImage+i-cache-line-size=<32>;+d-cache-line-size=<32>;+i-cache-size=<0>;+d-cache-size=<0>;+dcr-controller;+dcr-access-method="native";+};+};++memory{+device_type="memory";+reg=<000>;// Filled in by zImage+};++UIC0:interrupt-controller0{+device_type="ibm,uic";+compatible="ibm,uic-440gp","ibm,uic";+interrupt-controller;+cell-index=<0>;+dcr-reg=<0c0009>;+#address-cells=<0>;+#size-cells=<0>;+#interrupt-cells=<2>;++};++UIC1:interrupt-controller1{+device_type="ibm,uic";+compatible="ibm,uic-440gp","ibm,uic";+interrupt-controller;+cell-index=<1>;+dcr-reg=<0d0009>;+#address-cells=<0>;+#size-cells=<0>;+#interrupt-cells=<2>;+interrupts=<1e41f4>;/* cascade */+interrupt-parent=<&UIC0>;+};++CPC0:cpc{+device_type="ibm,cpc";+compatible="ibm,cpc-440gp";+dcr-reg=<0b00030e0010>;+// FIXME: anything else?+};++plb{+device_type="ibm,plb";+compatible="ibm,plb-440gp","ibm,plb4";+#address-cells=<2>;+#size-cells=<1>;+ranges;+clock-frequency=<0>;// Filled in by zImage++SDRAM0:sdram{+device_type="memory-controller";+compatible="ibm,sdram-440gp","ibm,sdram";+dcr-reg=<0102>;+// FIXME: anything else?+};++DMA0:dma{+// FIXME: ???+device_type="ibm,dma-4xx";+compatible="ibm,dma-440gp","ibm,dma-4xx";+dcr-reg=<100027>;+};++MAL0:mcmal{+device_type="mcmal-dma";+compatible="ibm,mcmal-440gp","ibm,mcmal";+dcr-reg=<18062>;+num-tx-chans=<4>;+num-rx-chans=<4>;+interrupt-parent=<&MAL0>;+interrupts=<01234>;+#interrupt-cells=<1>;+#address-cells=<0>;+#size-cells=<0>;+interrupt-map=</*TXEOB*/0&UIC0a4+/*RXEOB*/1&UIC0b4+/*SERR*/2&UIC104+/*TXDE*/3&UIC114+/*RXDE*/4&UIC124>;+interrupt-map-mask=<ffffffff>;+};++POB0:opb{+device_type="ibm,opb";+compatible="ibm,opb-440gp","ibm,opb";+#address-cells=<1>;+#size-cells=<1>;+/* Wish there was a nicer way of specifying a full 32-bit+range*/+ranges=<0000000010000000080000000+8000000018000000080000000>;+dcr-reg=<09000b>;+interrupt-parent=<&UIC1>;+interrupts=<74>;+clock-frequency=<0>;// Filled in by zImage++EBC0:ebc{+device_type="ibm,ebc";+compatible="ibm,ebc-440gp";+dcr-reg=<0122>;+#address-cells=<2>;+#size-cells=<1>;+clock-frequency=<0>;// Filled in by zImage+ranges=<000000000fff00000100000+10000000048000000100000+200000000ff800000400000+30000000048200000100000+70000000048300000100000>;+interrupts=<54>;+interrupt-parent=<&UIC1>;++small-flash@0,0{+device_type="rom";+compatible="direct-mapped";+probe-type="JEDEC";+bank-width=<1>;+partitions=<080000>;+partition-names="OpenBIOS";+reg=<08000080000>;+};++ds1743@1,0{+/* NVRAM & RTC */+device_type="nvram";+compatible="ds1743";+reg=<102000>;+};++large-flash@2,0{+device_type="rom";+compatible="direct-mapped";+probe-type="JEDEC";+bank-width=<1>;+partitions=<0380000+28000080000>;+partition-names="fs","firmware";+reg=<20400000>;+};++ir@3,0{+reg=<3010>;+};++fpga@7,0{+compatible="Ebony-FPGA";+reg=<7010>;+};+};++UART0:serial@40000200{+device_type="serial";+compatible="ns16550";+reg=<400002008>;+virtual-reg=<e0000200>;+clock-frequency=<A8C000>;+current-speed=<2580>;+interrupt-parent=<&UIC0>;+interrupts=<04>;+};++UART1:serial@40000300{+device_type="serial";+compatible="ns16550";+reg=<400003008>;+virtual-reg=<e0000300>;+clock-frequency=<A8C000>;+current-speed=<2580>;+interrupt-parent=<&UIC0>;+interrupts=<14>;+};++IIC0:i2c@40000400{+/* FIXME */+device_type="i2c";+compatible="ibm,iic-440gp","ibm,iic";+reg=<4000040014>;+interrupt-parent=<&UIC0>;+interrupts=<24>;+};+IIC1:i2c@40000500{+/* FIXME */+device_type="i2c";+compatible="ibm,iic-440gp","ibm,iic";+reg=<4000050014>;+interrupt-parent=<&UIC0>;+interrupts=<34>;+};++GPIO0:gpio@40000700{+/* FIXME */+device_type="gpio";+compatible="ibm,gpio-440gp";+reg=<4000070020>;+};++ZMII0:emac-zmii@40000780{+device_type="emac-zmii";+compatible="ibm,zmii-440gp","ibm,zmii";+reg=<40000780c>;+};++EMAC0:ethernet@40000800{+linux,network-index=<0>;+device_type="network";+compatible="ibm,emac-440gp","ibm,emac";+interrupt-parent=<&UIC1>;+interrupts=<1c41d4>;+reg=<4000080070>;+local-mac-address=[000000000000];// Filled in by zImage+mal-device=<&MAL0>;+mal-tx-channel=<01>;+mal-rx-channel=<0>;+cell-index=<0>;+max-frame-size=<5dc>;+rx-fifo-size=<1000>;+tx-fifo-size=<800>;+phy-mode="rmii";+phy-map=<00000001>;+zmii-device=<&ZMII0>;+zmii-channel=<0>;+};+EMAC1:ethernet@40000900{+linux,network-index=<1>;+device_type="network";+compatible="ibm,emac-440gp","ibm,emac";+interrupt-parent=<&UIC1>;+interrupts=<1e41f4>;+reg=<4000090070>;+local-mac-address=[000000000000];// Filled in by zImage+mal-device=<&MAL0>;+mal-tx-channel=<23>;+mal-rx-channel=<1>;+cell-index=<1>;+max-frame-size=<5dc>;+rx-fifo-size=<1000>;+tx-fifo-size=<800>;+phy-mode="rmii";+phy-map=<00000001>;+zmii-device=<&ZMII0>;+zmii-channel=<1>;+};+++GPT0:gpt@40000a00{+/* FIXME */+reg=<40000a00d4>;+interrupt-parent=<&UIC0>;+interrupts=<124134144154164>;+};++};++PCIX0:pci@1234{+device_type="pci";+/* FIXME */+reg=<20ec000008+20ec80000f0+20ec80100fc>;+};+};++chosen{+linux,stdout-path="/plb/opb/serial@40000200";+// linux,initrd-start = <0>; /* FIXME */+// linux,initrd-end = <0>;+// bootargs = "";+};+};+
From: David Gibson <hidden> Date: 2007-05-08 02:59:31
This patch adds platform support code for the Ebony (440GP) evaluation
board. This includes both code in arch/powerpc/platforms/44x for
board initialization, and zImage wrapper code to correctly tweak the
flattened device tree based on information from the firmware. The
zImage supports both IBM OpenBIOS (aka "treeboot") and old versions of
uboot which don't support a flattened device tree.
Signed-off-by: David Gibson <redacted>
---
arch/powerpc/Kconfig | 8
arch/powerpc/boot/44x.c | 40 +
arch/powerpc/boot/44x.h | 16
arch/powerpc/boot/Makefile | 18
arch/powerpc/boot/cuboot-ebony.c | 42 +
arch/powerpc/boot/dcr.h | 87 +++
arch/powerpc/boot/ebony.c | 129 ++++
arch/powerpc/boot/mktree.c | 10
arch/powerpc/boot/treeboot-ebony.c | 34 +
arch/powerpc/boot/wrapper | 8
arch/powerpc/configs/ebony_defconfig | 905 +++++++++++++++++++++++++++++++++++
arch/powerpc/platforms/44x/Kconfig | 56 ++
arch/powerpc/platforms/44x/Makefile | 1
arch/powerpc/platforms/44x/ebony.c | 73 ++
arch/powerpc/platforms/Kconfig | 1
15 files changed, 1417 insertions(+), 11 deletions(-)
Index: working-2.6/arch/powerpc/configs/ebony_defconfig
===================================================================
@@ -0,0 +1,905 @@+#+# Automatically generated make config: don't edit+# Linux kernel version: 2.6.21+# Fri May 4 13:47:08 2007+#+# CONFIG_PPC64 is not set+CONFIG_PPC32=y+CONFIG_PPC_MERGE=y+CONFIG_MMU=y+CONFIG_GENERIC_HARDIRQS=y+CONFIG_IRQ_PER_CPU=y+CONFIG_RWSEM_XCHGADD_ALGORITHM=y+CONFIG_ARCH_HAS_ILOG2_U32=y+CONFIG_GENERIC_HWEIGHT=y+CONFIG_GENERIC_CALIBRATE_DELAY=y+CONFIG_GENERIC_FIND_NEXT_BIT=y+CONFIG_PPC=y+CONFIG_EARLY_PRINTK=y+CONFIG_GENERIC_NVRAM=y+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y+CONFIG_ARCH_MAY_HAVE_PC_FDC=y+CONFIG_PPC_OF=y+# CONFIG_PPC_UDBG_16550 is not set+# CONFIG_GENERIC_TBSYNC is not set+CONFIG_AUDIT_ARCH=y+CONFIG_GENERIC_BUG=y+# CONFIG_DEFAULT_UIMAGE is not set++#+# Processor support+#+# CONFIG_CLASSIC32 is not set+# CONFIG_PPC_82xx is not set+# CONFIG_PPC_83xx is not set+# CONFIG_PPC_85xx is not set+# CONFIG_PPC_86xx is not set+# CONFIG_PPC_8xx is not set+# CONFIG_40x is not set+CONFIG_44x=y+# CONFIG_E200 is not set+CONFIG_PPC_DCR_NATIVE=y+# CONFIG_PPC_DCR_MMIO is not set+CONFIG_PPC_DCR=y+CONFIG_4xx=y+CONFIG_BOOKE=y+CONFIG_PTE_64BIT=y+CONFIG_PHYS_64BIT=y+CONFIG_NOT_COHERENT_CACHE=y+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"++#+# Code maturity level options+#+CONFIG_EXPERIMENTAL=y+CONFIG_BROKEN_ON_SMP=y+CONFIG_INIT_ENV_ARG_LIMIT=32++#+# General setup+#+CONFIG_LOCALVERSION=""+CONFIG_LOCALVERSION_AUTO=y+CONFIG_SWAP=y+CONFIG_SYSVIPC=y+# CONFIG_IPC_NS is not set+CONFIG_SYSVIPC_SYSCTL=y+CONFIG_POSIX_MQUEUE=y+# CONFIG_BSD_PROCESS_ACCT is not set+# CONFIG_TASKSTATS is not set+# CONFIG_UTS_NS is not set+# CONFIG_AUDIT is not set+# CONFIG_IKCONFIG is not set+CONFIG_SYSFS_DEPRECATED=y+# CONFIG_RELAY is not set+CONFIG_BLK_DEV_INITRD=y+CONFIG_INITRAMFS_SOURCE=""+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set+CONFIG_SYSCTL=y+CONFIG_EMBEDDED=y+CONFIG_SYSCTL_SYSCALL=y+CONFIG_KALLSYMS=y+CONFIG_KALLSYMS_ALL=y+CONFIG_KALLSYMS_EXTRA_PASS=y+CONFIG_HOTPLUG=y+CONFIG_PRINTK=y+CONFIG_BUG=y+CONFIG_ELF_CORE=y+CONFIG_BASE_FULL=y+CONFIG_FUTEX=y+CONFIG_EPOLL=y+CONFIG_SHMEM=y+CONFIG_SLAB=y+CONFIG_VM_EVENT_COUNTERS=y+CONFIG_RT_MUTEXES=y+# CONFIG_TINY_SHMEM is not set+CONFIG_BASE_SMALL=0+# CONFIG_SLOB is not set++#+# Loadable module support+#+CONFIG_MODULES=y+CONFIG_MODULE_UNLOAD=y+# CONFIG_MODULE_FORCE_UNLOAD is not set+# CONFIG_MODVERSIONS is not set+# CONFIG_MODULE_SRCVERSION_ALL is not set+CONFIG_KMOD=y++#+# Block layer+#+CONFIG_BLOCK=y+CONFIG_LBD=y+# CONFIG_BLK_DEV_IO_TRACE is not set+# CONFIG_LSF is not set++#+# IO Schedulers+#+CONFIG_IOSCHED_NOOP=y+CONFIG_IOSCHED_AS=y+CONFIG_IOSCHED_DEADLINE=y+CONFIG_IOSCHED_CFQ=y+CONFIG_DEFAULT_AS=y+# CONFIG_DEFAULT_DEADLINE is not set+# CONFIG_DEFAULT_CFQ is not set+# CONFIG_DEFAULT_NOOP is not set+CONFIG_DEFAULT_IOSCHED="anticipatory"++#+# Platform support+#+# CONFIG_PPC_MPC52xx is not set+# CONFIG_PPC_MPC5200 is not set+# CONFIG_PPC_CELL is not set+# CONFIG_PPC_CELL_NATIVE is not set+# CONFIG_PQ2ADS is not set+CONFIG_EBONY=y+CONFIG_440GP=y+# CONFIG_MPIC is not set+# CONFIG_MPIC_WEIRD is not set+# CONFIG_PPC_I8259 is not set+# CONFIG_PPC_RTAS is not set+# CONFIG_MMIO_NVRAM is not set+# CONFIG_PPC_MPC106 is not set+# CONFIG_PPC_970_NAP is not set+# CONFIG_PPC_INDIRECT_IO is not set+# CONFIG_GENERIC_IOMAP is not set+# CONFIG_CPU_FREQ is not set+# CONFIG_CPM2 is not set++#+# Kernel options+#+# CONFIG_HIGHMEM is not set+# CONFIG_HZ_100 is not set+CONFIG_HZ_250=y+# CONFIG_HZ_300 is not set+# CONFIG_HZ_1000 is not set+CONFIG_HZ=250+CONFIG_PREEMPT_NONE=y+# CONFIG_PREEMPT_VOLUNTARY is not set+# CONFIG_PREEMPT is not set+CONFIG_BINFMT_ELF=y+# CONFIG_BINFMT_MISC is not set+CONFIG_MATH_EMULATION=y+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y+CONFIG_ARCH_FLATMEM_ENABLE=y+CONFIG_ARCH_POPULATES_NODE_MAP=y+CONFIG_SELECT_MEMORY_MODEL=y+CONFIG_FLATMEM_MANUAL=y+# CONFIG_DISCONTIGMEM_MANUAL is not set+# CONFIG_SPARSEMEM_MANUAL is not set+CONFIG_FLATMEM=y+CONFIG_FLAT_NODE_MEM_MAP=y+# CONFIG_SPARSEMEM_STATIC is not set+CONFIG_SPLIT_PTLOCK_CPUS=4+CONFIG_RESOURCES_64BIT=y+CONFIG_ZONE_DMA_FLAG=1+CONFIG_PROC_DEVICETREE=y+# CONFIG_CMDLINE_BOOL is not set+CONFIG_SECCOMP=y+CONFIG_WANT_DEVICE_TREE=y+CONFIG_DEVICE_TREE="ebony.dts"+CONFIG_ISA_DMA_API=y++#+# Bus options+#+CONFIG_ZONE_DMA=y+CONFIG_PPC_INDIRECT_PCI=y+# CONFIG_PPC_INDIRECT_PCI_BE is not set+CONFIG_PCI=y+CONFIG_PCI_DOMAINS=y+# CONFIG_PCIEPORTBUS is not set+# CONFIG_PCI_DEBUG is not set++#+# PCCARD (PCMCIA/CardBus) support+#+# CONFIG_PCCARD is not set++#+# PCI Hotplug Support+#+# CONFIG_HOTPLUG_PCI is not set++#+# Advanced setup+#+# CONFIG_ADVANCED_OPTIONS is not set++#+# Default settings for advanced configuration options are used+#+CONFIG_HIGHMEM_START=0xfe000000+CONFIG_LOWMEM_SIZE=0x30000000+CONFIG_KERNEL_START=0xc0000000+CONFIG_TASK_SIZE=0x80000000+CONFIG_CONSISTENT_START=0xff100000+CONFIG_CONSISTENT_SIZE=0x00200000+CONFIG_BOOT_LOAD=0x01000000++#+# Networking+#+CONFIG_NET=y++#+# Networking options+#+CONFIG_PACKET=y+# CONFIG_PACKET_MMAP is not set+CONFIG_UNIX=y+# CONFIG_NET_KEY is not set+CONFIG_INET=y+# CONFIG_IP_MULTICAST is not set+# CONFIG_IP_ADVANCED_ROUTER is not set+CONFIG_IP_FIB_HASH=y+CONFIG_IP_PNP=y+CONFIG_IP_PNP_DHCP=y+CONFIG_IP_PNP_BOOTP=y+# CONFIG_IP_PNP_RARP is not set+# CONFIG_NET_IPIP is not set+# CONFIG_NET_IPGRE is not set+# CONFIG_ARPD is not set+# CONFIG_SYN_COOKIES is not set+# CONFIG_INET_AH is not set+# CONFIG_INET_ESP is not set+# CONFIG_INET_IPCOMP is not set+# CONFIG_INET_XFRM_TUNNEL is not set+# CONFIG_INET_TUNNEL is not set+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set+# CONFIG_INET_XFRM_MODE_TUNNEL is not set+# CONFIG_INET_XFRM_MODE_BEET is not set+CONFIG_INET_DIAG=y+CONFIG_INET_TCP_DIAG=y+# CONFIG_TCP_CONG_ADVANCED is not set+CONFIG_TCP_CONG_CUBIC=y+CONFIG_DEFAULT_TCP_CONG="cubic"+# CONFIG_TCP_MD5SIG is not set+# CONFIG_IPV6 is not set+# CONFIG_INET6_XFRM_TUNNEL is not set+# CONFIG_INET6_TUNNEL is not set+# CONFIG_NETWORK_SECMARK is not set+# CONFIG_NETFILTER is not set++#+# DCCP Configuration (EXPERIMENTAL)+#+# CONFIG_IP_DCCP is not set++#+# SCTP Configuration (EXPERIMENTAL)+#+# CONFIG_IP_SCTP is not set++#+# TIPC Configuration (EXPERIMENTAL)+#+# CONFIG_TIPC is not set+# CONFIG_ATM is not set+# CONFIG_BRIDGE is not set+# CONFIG_VLAN_8021Q is not set+# CONFIG_DECNET is not set+# CONFIG_LLC2 is not set+# CONFIG_IPX is not set+# CONFIG_ATALK is not set+# CONFIG_X25 is not set+# CONFIG_LAPB is not set+# CONFIG_ECONET is not set+# CONFIG_WAN_ROUTER is not set++#+# QoS and/or fair queueing+#+# CONFIG_NET_SCHED is not set++#+# Network testing+#+# CONFIG_NET_PKTGEN is not set+# CONFIG_HAMRADIO is not set+# CONFIG_IRDA is not set+# CONFIG_BT is not set+# CONFIG_AF_RXRPC is not set++#+# Wireless+#+# CONFIG_CFG80211 is not set+# CONFIG_WIRELESS_EXT is not set+# CONFIG_IEEE80211 is not set++#+# Device Drivers+#++#+# Generic Driver Options+#+CONFIG_STANDALONE=y+CONFIG_PREVENT_FIRMWARE_BUILD=y+CONFIG_FW_LOADER=y+# CONFIG_DEBUG_DRIVER is not set+# CONFIG_DEBUG_DEVRES is not set+# CONFIG_SYS_HYPERVISOR is not set++#+# Connector - unified userspace <-> kernelspace linker+#+CONFIG_CONNECTOR=y+CONFIG_PROC_EVENTS=y+# CONFIG_MTD is not set++#+# Parallel port support+#+# CONFIG_PARPORT is not set++#+# Plug and Play support+#+# CONFIG_PNPACPI is not set++#+# Block devices+#+# CONFIG_BLK_DEV_FD is not set+# CONFIG_BLK_CPQ_DA is not set+# CONFIG_BLK_CPQ_CISS_DA is not set+# CONFIG_BLK_DEV_DAC960 is not set+# CONFIG_BLK_DEV_UMEM is not set+# CONFIG_BLK_DEV_COW_COMMON is not set+# CONFIG_BLK_DEV_LOOP is not set+# CONFIG_BLK_DEV_NBD is not set+# CONFIG_BLK_DEV_SX8 is not set+CONFIG_BLK_DEV_RAM=y+CONFIG_BLK_DEV_RAM_COUNT=16+CONFIG_BLK_DEV_RAM_SIZE=35000+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024+# CONFIG_CDROM_PKTCDVD is not set+# CONFIG_ATA_OVER_ETH is not set++#+# Misc devices+#+# CONFIG_SGI_IOC4 is not set+# CONFIG_TIFM_CORE is not set++#+# ATA/ATAPI/MFM/RLL support+#+# CONFIG_IDE is not set++#+# SCSI device support+#+# CONFIG_RAID_ATTRS is not set+# CONFIG_SCSI is not set+# CONFIG_SCSI_NETLINK is not set++#+# Serial ATA (prod) and Parallel ATA (experimental) drivers+#+# CONFIG_ATA is not set++#+# Multi-device support (RAID and LVM)+#+# CONFIG_MD is not set++#+# Fusion MPT device support+#+# CONFIG_FUSION is not set++#+# IEEE 1394 (FireWire) support+#+# CONFIG_IEEE1394 is not set++#+# I2O device support+#+# CONFIG_I2O is not set+# CONFIG_MACINTOSH_DRIVERS is not set++#+# Network device support+#+CONFIG_NETDEVICES=y+# CONFIG_DUMMY is not set+# CONFIG_BONDING is not set+# CONFIG_EQUALIZER is not set+# CONFIG_TUN is not set++#+# ARCnet devices+#+# CONFIG_ARCNET is not set++#+# PHY device support+#++#+# Ethernet (10 or 100Mbit)+#+# CONFIG_NET_ETHERNET is not set+CONFIG_IBM_NEW_EMAC=y+CONFIG_IBM_NEW_EMAC_RXB=128+CONFIG_IBM_NEW_EMAC_TXB=64+CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32+CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256+CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0+# CONFIG_IBM_NEW_EMAC_DEBUG is not set+CONFIG_IBM_NEW_EMAC_ZMII=y+# CONFIG_IBM_NEW_EMAC_RGMII is not set+# CONFIG_IBM_NEW_EMAC_TAH is not set+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set++#+# Ethernet (1000 Mbit)+#+# CONFIG_ACENIC is not set+# CONFIG_DL2K is not set+# CONFIG_E1000 is not set+# CONFIG_NS83820 is not set+# CONFIG_HAMACHI is not set+# CONFIG_YELLOWFIN is not set+# CONFIG_R8169 is not set+# CONFIG_SIS190 is not set+# CONFIG_SKGE is not set+# CONFIG_SKY2 is not set+# CONFIG_SK98LIN is not set+# CONFIG_TIGON3 is not set+# CONFIG_BNX2 is not set+# CONFIG_QLA3XXX is not set+# CONFIG_ATL1 is not set++#+# Ethernet (10000 Mbit)+#+# CONFIG_CHELSIO_T1 is not set+# CONFIG_CHELSIO_T3 is not set+# CONFIG_IXGB is not set+# CONFIG_S2IO is not set+# CONFIG_MYRI10GE is not set+# CONFIG_NETXEN_NIC is not set++#+# Token Ring devices+#+# CONFIG_TR is not set++#+# Wireless LAN+#+# CONFIG_WLAN_PRE80211 is not set+# CONFIG_WLAN_80211 is not set++#+# Wan interfaces+#+# CONFIG_WAN is not set+# CONFIG_FDDI is not set+# CONFIG_HIPPI is not set+# CONFIG_PPP is not set+# CONFIG_SLIP is not set+# CONFIG_SHAPER is not set+# CONFIG_NETCONSOLE is not set+# CONFIG_NETPOLL is not set+# CONFIG_NET_POLL_CONTROLLER is not set++#+# ISDN subsystem+#+# CONFIG_ISDN is not set++#+# Telephony Support+#+# CONFIG_PHONE is not set++#+# Input device support+#+# CONFIG_INPUT is not set++#+# Hardware I/O ports+#+# CONFIG_SERIO is not set+# CONFIG_GAMEPORT is not set++#+# Character devices+#+# CONFIG_VT is not set+# CONFIG_SERIAL_NONSTANDARD is not set++#+# Serial drivers+#+CONFIG_SERIAL_8250=y+CONFIG_SERIAL_8250_CONSOLE=y+# CONFIG_SERIAL_8250_PCI is not set+CONFIG_SERIAL_8250_NR_UARTS=4+CONFIG_SERIAL_8250_RUNTIME_UARTS=4+CONFIG_SERIAL_8250_EXTENDED=y+# CONFIG_SERIAL_8250_MANY_PORTS is not set+CONFIG_SERIAL_8250_SHARE_IRQ=y+# CONFIG_SERIAL_8250_DETECT_IRQ is not set+# CONFIG_SERIAL_8250_RSA is not set++#+# Non-8250 serial port support+#+# CONFIG_SERIAL_UARTLITE is not set+CONFIG_SERIAL_CORE=y+CONFIG_SERIAL_CORE_CONSOLE=y+# CONFIG_SERIAL_JSM is not set+CONFIG_SERIAL_OF_PLATFORM=y+CONFIG_UNIX98_PTYS=y+CONFIG_LEGACY_PTYS=y+CONFIG_LEGACY_PTY_COUNT=256++#+# IPMI+#+# CONFIG_IPMI_HANDLER is not set++#+# Watchdog Cards+#+# CONFIG_WATCHDOG is not set+# CONFIG_HW_RANDOM is not set+# CONFIG_NVRAM is not set+# CONFIG_GEN_RTC is not set+# CONFIG_DTLK is not set+# CONFIG_R3964 is not set+# CONFIG_APPLICOM is not set+# CONFIG_AGP is not set+# CONFIG_DRM is not set+# CONFIG_RAW_DRIVER is not set++#+# TPM devices+#+# CONFIG_TCG_TPM is not set++#+# I2C support+#+# CONFIG_I2C is not set++#+# SPI support+#+# CONFIG_SPI is not set+# CONFIG_SPI_MASTER is not set++#+# Dallas's 1-wire bus+#+# CONFIG_W1 is not set++#+# Hardware Monitoring support+#+# CONFIG_HWMON is not set+# CONFIG_HWMON_VID is not set++#+# Multifunction device drivers+#+# CONFIG_MFD_SM501 is not set++#+# Multimedia devices+#+# CONFIG_VIDEO_DEV is not set++#+# Digital Video Broadcasting Devices+#+# CONFIG_DVB is not set++#+# Graphics support+#+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set+# CONFIG_FB is not set+# CONFIG_FB_IBM_GXT4500 is not set++#+# Sound+#+# CONFIG_SOUND is not set++#+# USB support+#+CONFIG_USB_ARCH_HAS_HCD=y+CONFIG_USB_ARCH_HAS_OHCI=y+CONFIG_USB_ARCH_HAS_EHCI=y+# CONFIG_USB is not set++#+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'+#++#+# USB Gadget Support+#+# CONFIG_USB_GADGET is not set++#+# MMC/SD Card support+#+# CONFIG_MMC is not set++#+# LED devices+#+# CONFIG_NEW_LEDS is not set++#+# LED drivers+#++#+# LED Triggers+#++#+# InfiniBand support+#+# CONFIG_INFINIBAND is not set++#+# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)+#++#+# Real Time Clock+#+# CONFIG_RTC_CLASS is not set++#+# DMA Engine support+#+# CONFIG_DMA_ENGINE is not set++#+# DMA Clients+#++#+# DMA Devices+#++#+# Auxiliary Display support+#++#+# Virtualization+#++#+# File systems+#+CONFIG_EXT2_FS=y+# CONFIG_EXT2_FS_XATTR is not set+# CONFIG_EXT2_FS_XIP is not set+# CONFIG_EXT3_FS is not set+# CONFIG_EXT4DEV_FS is not set+# CONFIG_REISERFS_FS is not set+# CONFIG_JFS_FS is not set+# CONFIG_FS_POSIX_ACL is not set+# CONFIG_XFS_FS is not set+# CONFIG_GFS2_FS is not set+# CONFIG_OCFS2_FS is not set+# CONFIG_MINIX_FS is not set+# CONFIG_ROMFS_FS is not set+CONFIG_INOTIFY=y+CONFIG_INOTIFY_USER=y+# CONFIG_QUOTA is not set+CONFIG_DNOTIFY=y+# CONFIG_AUTOFS_FS is not set+# CONFIG_AUTOFS4_FS is not set+# CONFIG_FUSE_FS is not set++#+# CD-ROM/DVD Filesystems+#+# CONFIG_ISO9660_FS is not set+# CONFIG_UDF_FS is not set++#+# DOS/FAT/NT Filesystems+#+# CONFIG_MSDOS_FS is not set+# CONFIG_VFAT_FS is not set+# CONFIG_NTFS_FS is not set++#+# Pseudo filesystems+#+CONFIG_PROC_FS=y+CONFIG_PROC_KCORE=y+CONFIG_PROC_SYSCTL=y+CONFIG_SYSFS=y+CONFIG_TMPFS=y+# CONFIG_TMPFS_POSIX_ACL is not set+# CONFIG_HUGETLB_PAGE is not set+CONFIG_RAMFS=y+# CONFIG_CONFIGFS_FS is not set++#+# Miscellaneous filesystems+#+# CONFIG_ADFS_FS is not set+# CONFIG_AFFS_FS is not set+# CONFIG_HFS_FS is not set+# CONFIG_HFSPLUS_FS is not set+# CONFIG_BEFS_FS is not set+# CONFIG_BFS_FS is not set+# CONFIG_EFS_FS is not set+CONFIG_CRAMFS=y+# CONFIG_VXFS_FS is not set+# CONFIG_HPFS_FS is not set+# CONFIG_QNX4FS_FS is not set+# CONFIG_SYSV_FS is not set+# CONFIG_UFS_FS is not set++#+# Network File Systems+#+CONFIG_NFS_FS=y+CONFIG_NFS_V3=y+# CONFIG_NFS_V3_ACL is not set+# CONFIG_NFS_V4 is not set+# CONFIG_NFS_DIRECTIO is not set+# CONFIG_NFSD is not set+CONFIG_ROOT_NFS=y+CONFIG_LOCKD=y+CONFIG_LOCKD_V4=y+CONFIG_NFS_COMMON=y+CONFIG_SUNRPC=y+# CONFIG_RPCSEC_GSS_KRB5 is not set+# CONFIG_RPCSEC_GSS_SPKM3 is not set+# CONFIG_SMB_FS is not set+# CONFIG_CIFS is not set+# CONFIG_NCP_FS is not set+# CONFIG_CODA_FS is not set+# CONFIG_AFS_FS is not set+# CONFIG_9P_FS is not set++#+# Partition Types+#+# CONFIG_PARTITION_ADVANCED is not set+CONFIG_MSDOS_PARTITION=y++#+# Native Language Support+#+# CONFIG_NLS is not set++#+# Distributed Lock Manager+#+# CONFIG_DLM is not set+# CONFIG_UCC_SLOW is not set+# CONFIG_UCC_FAST is not set++#+# Library routines+#+CONFIG_BITREVERSE=y+# CONFIG_CRC_CCITT is not set+# CONFIG_CRC16 is not set+CONFIG_CRC32=y+# CONFIG_LIBCRC32C is not set+CONFIG_ZLIB_INFLATE=y+CONFIG_PLIST=y+CONFIG_HAS_IOMEM=y+CONFIG_HAS_IOPORT=y++#+# Instrumentation Support+#+# CONFIG_PROFILING is not set++#+# Kernel hacking+#+# CONFIG_PRINTK_TIME is not set+CONFIG_ENABLE_MUST_CHECK=y+CONFIG_MAGIC_SYSRQ=y+# CONFIG_UNUSED_SYMBOLS is not set+# CONFIG_DEBUG_FS is not set+# CONFIG_HEADERS_CHECK is not set+CONFIG_DEBUG_KERNEL=y+# CONFIG_DEBUG_SHIRQ is not set+CONFIG_LOG_BUF_SHIFT=14+CONFIG_DETECT_SOFTLOCKUP=y+# CONFIG_SCHEDSTATS is not set+# CONFIG_TIMER_STATS is not set+# CONFIG_DEBUG_SLAB is not set+# CONFIG_DEBUG_RT_MUTEXES is not set+# CONFIG_RT_MUTEX_TESTER is not set+# CONFIG_DEBUG_SPINLOCK is not set+# CONFIG_DEBUG_MUTEXES is not set+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set+# CONFIG_DEBUG_KOBJECT is not set+CONFIG_DEBUG_BUGVERBOSE=y+# CONFIG_DEBUG_INFO is not set+# CONFIG_DEBUG_VM is not set+# CONFIG_DEBUG_LIST is not set+CONFIG_FORCED_INLINING=y+# CONFIG_RCU_TORTURE_TEST is not set+# CONFIG_FAULT_INJECTION is not set+# CONFIG_DEBUG_STACKOVERFLOW is not set+# CONFIG_DEBUG_STACK_USAGE is not set+# CONFIG_DEBUG_PAGEALLOC is not set+# CONFIG_DEBUGGER is not set+# CONFIG_BDI_SWITCH is not set+# CONFIG_BOOTX_TEXT is not set+# CONFIG_SERIAL_TEXT_DEBUG is not set+# CONFIG_PPC_EARLY_DEBUG is not set++#+# Security options+#+# CONFIG_KEYS is not set+# CONFIG_SECURITY is not set++#+# Cryptographic options+#+CONFIG_CRYPTO=y+CONFIG_CRYPTO_ALGAPI=y+CONFIG_CRYPTO_BLKCIPHER=y+CONFIG_CRYPTO_MANAGER=y+# CONFIG_CRYPTO_HMAC is not set+# CONFIG_CRYPTO_XCBC is not set+# CONFIG_CRYPTO_NULL is not set+# CONFIG_CRYPTO_MD4 is not set+CONFIG_CRYPTO_MD5=y+# CONFIG_CRYPTO_SHA1 is not set+# CONFIG_CRYPTO_SHA256 is not set+# CONFIG_CRYPTO_SHA512 is not set+# CONFIG_CRYPTO_WP512 is not set+# CONFIG_CRYPTO_TGR192 is not set+# CONFIG_CRYPTO_GF128MUL is not set+CONFIG_CRYPTO_ECB=y+CONFIG_CRYPTO_CBC=y+CONFIG_CRYPTO_PCBC=y+# CONFIG_CRYPTO_LRW is not set+CONFIG_CRYPTO_DES=y+# CONFIG_CRYPTO_FCRYPT is not set+# CONFIG_CRYPTO_BLOWFISH is not set+# CONFIG_CRYPTO_TWOFISH is not set+# CONFIG_CRYPTO_SERPENT is not set+# CONFIG_CRYPTO_AES is not set+# CONFIG_CRYPTO_CAST5 is not set+# CONFIG_CRYPTO_CAST6 is not set+# CONFIG_CRYPTO_TEA is not set+# CONFIG_CRYPTO_ARC4 is not set+# CONFIG_CRYPTO_KHAZAD is not set+# CONFIG_CRYPTO_ANUBIS is not set+# CONFIG_CRYPTO_DEFLATE is not set+# CONFIG_CRYPTO_MICHAEL_MIC is not set+# CONFIG_CRYPTO_CRC32C is not set+# CONFIG_CRYPTO_CAMELLIA is not set+# CONFIG_CRYPTO_TEST is not set++#+# Hardware crypto devices+#
@@ -0,0 +1,56 @@+#config BAMBOO+# bool "Bamboo"+# depends on 44x+# default n+# select 440EP+# help+# This option enables support for the IBM PPC440EP evaluation board.++configEBONY+bool"Ebony"+depends on44x+defaulty+select440GP+help+ThisoptionenablessupportfortheIBMPPC440GPevaluationboard.++#config LUAN+# bool "Luan"+# depends on 44x+# default n+# select 440SP+# help+# This option enables support for the IBM PPC440SP evaluation board.++#config OCOTEA+# bool "Ocotea"+# depends on 44x+# default n+# select 440GX+# help+# This option enables support for the IBM PPC440GX evaluation board.++# 44x specific CPU modules, selected based on the board above.+config440EP+bool+selectPPC_FPU+selectIBM440EP_ERR42++config440GP+bool+selectIBM_NEW_EMAC_ZMII++config440GX+bool++config440SP+bool++config440A+bool+depends on440GX+defaulty++# 44x errata/workaround config symbols, selected by the CPU models above+configIBM440EP_ERR42+bool
@@ -0,0 +1,40 @@+/*+*Copyright2007DavidGibson,IBMCorporation.+*+*Basedonearliercode:+*MattPorter<mporter@kernel.crashing.org>+*Copyright2002-2005MontaVistaSoftwareInc.+*+*EugeneSurovegin<eugene.surovegin@zultys.com>or<ebs@ebshome.net>+*Copyright(c)2003,2004ZultysTechnologies+*+*Thisprogramisfreesoftware;youcanredistributeitand/or+*modifyitunderthetermsoftheGNUGeneralPublicLicense+*aspublishedbytheFreeSoftwareFoundation;eitherversion+*2oftheLicense,or(atyouroption)anylaterversion.+*/+#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. */+voidibm44x_fixup_memsize(void)+{+inti;+unsignedlongmemsize,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);+}
@@ -183,7 +192,8 @@ install: $(CONFIGURE) $(addprefix $(obj)sh-x$(srctree)/$(src)/install.sh"$(KERNELRELEASE)"vmlinuxSystem.map"$(INSTALL_PATH)"$<# anything not in $(targets)-clean-files+=$(image-)$(initrd-)zImagezImage.initrdcuImage.*+clean-files+=$(image-)$(initrd-)zImagezImage.initrdcuImage.*\+treeImage.*# clean up files cached by wrapperclean-kernel:=vmlinux.stripvmlinux.bin
@@ -0,0 +1,129 @@+/*+*Copyright2007DavidGibson,IBMCorporation.+*+*Basedonearliercode:+*Copyright(C)PaulMackerras1997.+*+*MattPorter<mporter@kernel.crashing.org>+*Copyright2002-2005MontaVistaSoftwareInc.+*+*EugeneSurovegin<eugene.surovegin@zultys.com>or<ebs@ebshome.net>+*Copyright(c)2003,2004ZultysTechnologies+*+*Thisprogramisfreesoftware;youcanredistributeitand/or+*modifyitunderthetermsoftheGNUGeneralPublicLicense+*aspublishedbytheFreeSoftwareFoundation;eitherversion+*2oftheLicense,or(atyouroption)anylaterversion.+*/+#include<stdarg.h>+#include<stddef.h>+#include"types.h"+#include"elf.h"+#include"string.h"+#include"stdio.h"+#include"page.h"+#include"ops.h"+#include"reg.h"+#include"dcr.h"+#include"44x.h"++externchar_dtb_start[];+externchar_dtb_end[];++staticu8*ebony_mac0,*ebony_mac1;++/* Calculate 440GP clocks */+voidibm440gp_fixup_clocks(unsignedintsysclk,unsignedintser_clk)+{+u32sys0=mfdcr(DCRN_CPC0_SYS0);+u32cr0=mfdcr(DCRN_CPC0_CR0);+u32cpu,plb,opb,ebc,tb,uart0,uart1,m;+u32opdv=CPC0_SYS0_OPDV(sys0);+u32epdv=CPC0_SYS0_EPDV(sys0);++if(sys0&CPC0_SYS0_BYPASS){+/* Bypass system PLL */+cpu=plb=sysclk;+}else{+if(sys0&CPC0_SYS0_EXTSL)+/* PerClk */+m=CPC0_SYS0_FWDVB(sys0)*opdv*epdv;+else+/* CPU clock */+m=CPC0_SYS0_FBDV(sys0)*CPC0_SYS0_FWDVA(sys0);+cpu=sysclk*m/CPC0_SYS0_FWDVA(sys0);+plb=sysclk*m/CPC0_SYS0_FWDVB(sys0);+}++opb=plb/opdv;+ebc=opb/epdv;++/* FIXME: Check if this is for all 440GP, or just Ebony */+if((mfpvr()&0xf0000fff)==0x40000440)+/* Rev. B 440GP, use external system clock */+tb=sysclk;+else+/* Rev. C 440GP, errata force us to use internal clock */+tb=cpu;++if(cr0&CPC0_CR0_U0EC)+/* External UART clock */+uart0=ser_clk;+else+/* Internal UART clock */+uart0=plb/CPC0_CR0_UDIV(cr0);++if(cr0&CPC0_CR0_U1EC)+/* External UART clock */+uart1=ser_clk;+else+/* Internal UART clock */+uart1=plb/CPC0_CR0_UDIV(cr0);++printf("PPC440GP: SysClk = %dMHz (%x)\n\r",+(sysclk+500000)/1000000,sysclk);++dt_fixup_cpu_clocks(cpu,tb,0);++dt_fixup_clock("/plb",plb);+dt_fixup_clock("/plb/opb",opb);+dt_fixup_clock("/plb/opb/ebc",ebc);+dt_fixup_clock("/plb/opb/serial@40000200",uart0);+dt_fixup_clock("/plb/opb/serial@40000300",uart1);+}++staticvoidebony_fixups(void)+{+// FIXME: sysclk should be derived by reading the FPGA registers+unsignedlongsysclk=33000000;++ibm440gp_fixup_clocks(sysclk,6*1843200);+ibm44x_fixup_memsize();+dt_fixup_mac_addresses(ebony_mac0,ebony_mac1);+}++#define SPRN_DBCR0 0x134+#define DBCR0_RST_SYSTEM 0x30000000++staticvoidebony_exit(void)+{+unsignedlongtmp;++asmvolatile(+"mfspr %0,%1\n"+"oris %0,%0,%2@h\n"+"mtspr %1,%0"+:"=&r"(tmp):"i"(SPRN_DBCR0),"i"(DBCR0_RST_SYSTEM)+);++}++voidebony_init(void*mac0,void*mac1)+{+platform_ops.fixups=ebony_fixups;+platform_ops.exit=ebony_exit;+ebony_mac0=mac0;+ebony_mac1=mac1;+ft_init(_dtb_start,_dtb_end-_dtb_start,32);+serial_console_init();+}
@@ -61,10 +61,8 @@ int main(int argc, char *argv[])bt.bb_magic=htonl(0x0052504F);/* If we have the optional entry point parameter, use it */-if(argc==4)-bt.bb_dest=bt.bb_entry_point=htonl(strtoul(argv[3],NULL,0));-else-bt.bb_dest=bt.bb_entry_point=htonl(0x500000);+bt.bb_dest=htonl(strtoul(argv[3],NULL,0));+bt.bb_entry_point=htonl(strtoul(argv[4],NULL,0));/* We know these from the linker command.*...andthenmoveitupintomemoryalittlemoresothe
From: David Gibson <hidden> Date: 2007-05-08 02:59:31
This patch adds support for early serial debugging via the built in
port on IBM/AMCC PowerPC 44x CPUs. It uses a bolted TLB entry in
address space 1 for the UART's mapping, allowing robust debugging both
before and after the initialization of the MMU.
Signed-off-by: David Gibson <redacted>
---
arch/powerpc/Kconfig.debug | 22 ++++++++++++++++++----
arch/powerpc/kernel/head_44x.S | 34 +++++++++++++---------------------
arch/powerpc/kernel/of_platform.c | 1 -
arch/powerpc/kernel/udbg.c | 3 +++
arch/powerpc/kernel/udbg_16550.c | 23 +++++++++++++++++++++++
arch/powerpc/platforms/44x/44x.h | 2 ++
arch/powerpc/platforms/44x/misc_44x.S | 31 +++++++++++++++++++++++++++++++
include/asm-powerpc/mmu-44x.h | 6 ++++++
include/asm-powerpc/udbg.h | 1 +
9 files changed, 97 insertions(+), 26 deletions(-)
Index: working-2.6/arch/powerpc/Kconfig.debug
===================================================================
@@ -139,10 +139,6 @@ config BOOTX_TEXTSayYheretoseeprogressmessagesfromthebootfirmwareintextmode.RequireseitherBootXorOpenFirmware.-configSERIAL_TEXT_DEBUG-bool"Support for early boot texts over serial port"-depends on4xx-configPPC_EARLY_DEBUGbool"Early debugging (dangerous)"
@@ -207,6 +203,24 @@ config PPC_EARLY_DEBUG_BEAThelpSelectthistoenableearlydebuggingforCellebwithBeat.+configPPC_EARLY_DEBUG_44x+bool"Early serial debugging for IBM/AMCC 44x CPUs"+depends on44x+selectPPC_UDBG_16550+help+SelectthistoenableearlydebuggingforIBM44xchipsviathe+inbuiltserialport.+endchoice+configPPC_EARLY_DEBUG_44x_PHYSLOW+hex"Low 32 bits of early debug UART physical address"+dependsPPC_EARLY_DEBUG_44x+default"0x40000200"++configPPC_EARLY_DEBUG_44x_PHYSHIGH+hex"EPRN of early debug UART physical address"+dependsPPC_EARLY_DEBUG_44x+default"0x1"+endmenu
From: Olof Johansson <hidden> Date: 2007-05-08 03:29:20
On Tue, May 08, 2007 at 12:59:30PM +1000, David Gibson wrote:
quoted hunk
Add a device tree for the Ebony evaluation board (440GP based). This
tree is not complete or finalized. This tree needs a version of dtc
recent enough to include reference-to-labels to process.
Signed-off-by: David Gibson <redacted>
---
arch/powerpc/boot/dts/ebony.dts | 307 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 307 insertions(+)
Index: working-2.6/arch/powerpc/boot/dts/ebony.dts
===================================================================
From: David Gibson <hidden> Date: 2007-05-08 04:09:18
On Mon, May 07, 2007 at 10:31:18PM -0500, Olof Johansson wrote:
On Tue, May 08, 2007 at 12:59:30PM +1000, David Gibson wrote:
quoted
Add a device tree for the Ebony evaluation board (440GP based). This
tree is not complete or finalized. This tree needs a version of dtc
recent enough to include reference-to-labels to process.
Signed-off-by: David Gibson <redacted>
---
arch/powerpc/boot/dts/ebony.dts | 307 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 307 insertions(+)
Index: working-2.6/arch/powerpc/boot/dts/ebony.dts
===================================================================
Yeah, fair enough. Revised patch below. Revised patch for the
support code to recognize the changed string coming.
Add device tree for Ebony
Add a device tree for the Ebony evaluation board (440GP based). This
tree is not complete or finalized. This tree needs a version of dtc
recent enough to include reference-to-labels to process.
Signed-off-by: David Gibson <redacted>
Index: working-2.6/arch/powerpc/boot/dts/ebony.dts
===================================================================
@@ -0,0 +1,307 @@+/*+*DeviceTreeSourceforIBMEbony+*+*Copyright(c)2006,2007IBMCorp.+*JoshBoyer<jwboyer@linux.vnet.ibm.com>,DavidGibson<dwg@au1.ibm.com>+*+*FIXME:Draftonly!+*+*ThisfileislicensedunderthetermsoftheGNUGeneralPublic+*Licenseversion2.Thisprogramislicensed"as is"without+*anywarrantyofanykind,whetherexpressorimplied.+*+*Tobuild:+*dtc-Idts-Oasm-oebony.S-b0ebony.dts+*dtc-Idts-Odtb-oebony.dtb-b0ebony.dts+*/++/{+#address-cells=<2>;+#size-cells=<1>;+model="ibm,ebony";+compatible="ibm,ebony";+dcr-parent=<&/cpus/PowerPC,440GP@0>;++cpus{+#address-cells=<1>;+#size-cells=<0>;++PowerPC,440GP@0{+device_type="cpu";+reg=<0>;+clock-frequency=<0>;// Filled in by zImage+timebase-frequency=<0>;// Filled in by zImage+i-cache-line-size=<32>;+d-cache-line-size=<32>;+i-cache-size=<0>;+d-cache-size=<0>;+dcr-controller;+dcr-access-method="native";+};+};++memory{+device_type="memory";+reg=<000>;// Filled in by zImage+};++UIC0:interrupt-controller0{+device_type="ibm,uic";+compatible="ibm,uic-440gp","ibm,uic";+interrupt-controller;+cell-index=<0>;+dcr-reg=<0c0009>;+#address-cells=<0>;+#size-cells=<0>;+#interrupt-cells=<2>;++};++UIC1:interrupt-controller1{+device_type="ibm,uic";+compatible="ibm,uic-440gp","ibm,uic";+interrupt-controller;+cell-index=<1>;+dcr-reg=<0d0009>;+#address-cells=<0>;+#size-cells=<0>;+#interrupt-cells=<2>;+interrupts=<1e41f4>;/* cascade */+interrupt-parent=<&UIC0>;+};++CPC0:cpc{+device_type="ibm,cpc";+compatible="ibm,cpc-440gp";+dcr-reg=<0b00030e0010>;+// FIXME: anything else?+};++plb{+device_type="ibm,plb";+compatible="ibm,plb-440gp","ibm,plb4";+#address-cells=<2>;+#size-cells=<1>;+ranges;+clock-frequency=<0>;// Filled in by zImage++SDRAM0:sdram{+device_type="memory-controller";+compatible="ibm,sdram-440gp","ibm,sdram";+dcr-reg=<0102>;+// FIXME: anything else?+};++DMA0:dma{+// FIXME: ???+device_type="ibm,dma-4xx";+compatible="ibm,dma-440gp","ibm,dma-4xx";+dcr-reg=<100027>;+};++MAL0:mcmal{+device_type="mcmal-dma";+compatible="ibm,mcmal-440gp","ibm,mcmal";+dcr-reg=<18062>;+num-tx-chans=<4>;+num-rx-chans=<4>;+interrupt-parent=<&MAL0>;+interrupts=<01234>;+#interrupt-cells=<1>;+#address-cells=<0>;+#size-cells=<0>;+interrupt-map=</*TXEOB*/0&UIC0a4+/*RXEOB*/1&UIC0b4+/*SERR*/2&UIC104+/*TXDE*/3&UIC114+/*RXDE*/4&UIC124>;+interrupt-map-mask=<ffffffff>;+};++POB0:opb{+device_type="ibm,opb";+compatible="ibm,opb-440gp","ibm,opb";+#address-cells=<1>;+#size-cells=<1>;+/* Wish there was a nicer way of specifying a full 32-bit+range*/+ranges=<0000000010000000080000000+8000000018000000080000000>;+dcr-reg=<09000b>;+interrupt-parent=<&UIC1>;+interrupts=<74>;+clock-frequency=<0>;// Filled in by zImage++EBC0:ebc{+device_type="ibm,ebc";+compatible="ibm,ebc-440gp";+dcr-reg=<0122>;+#address-cells=<2>;+#size-cells=<1>;+clock-frequency=<0>;// Filled in by zImage+ranges=<000000000fff00000100000+10000000048000000100000+200000000ff800000400000+30000000048200000100000+70000000048300000100000>;+interrupts=<54>;+interrupt-parent=<&UIC1>;++small-flash@0,0{+device_type="rom";+compatible="direct-mapped";+probe-type="JEDEC";+bank-width=<1>;+partitions=<080000>;+partition-names="OpenBIOS";+reg=<08000080000>;+};++ds1743@1,0{+/* NVRAM & RTC */+device_type="nvram";+compatible="ds1743";+reg=<102000>;+};++large-flash@2,0{+device_type="rom";+compatible="direct-mapped";+probe-type="JEDEC";+bank-width=<1>;+partitions=<0380000+28000080000>;+partition-names="fs","firmware";+reg=<20400000>;+};++ir@3,0{+reg=<3010>;+};++fpga@7,0{+compatible="Ebony-FPGA";+reg=<7010>;+};+};++UART0:serial@40000200{+device_type="serial";+compatible="ns16550";+reg=<400002008>;+virtual-reg=<e0000200>;+clock-frequency=<A8C000>;+current-speed=<2580>;+interrupt-parent=<&UIC0>;+interrupts=<04>;+};++UART1:serial@40000300{+device_type="serial";+compatible="ns16550";+reg=<400003008>;+virtual-reg=<e0000300>;+clock-frequency=<A8C000>;+current-speed=<2580>;+interrupt-parent=<&UIC0>;+interrupts=<14>;+};++IIC0:i2c@40000400{+/* FIXME */+device_type="i2c";+compatible="ibm,iic-440gp","ibm,iic";+reg=<4000040014>;+interrupt-parent=<&UIC0>;+interrupts=<24>;+};+IIC1:i2c@40000500{+/* FIXME */+device_type="i2c";+compatible="ibm,iic-440gp","ibm,iic";+reg=<4000050014>;+interrupt-parent=<&UIC0>;+interrupts=<34>;+};++GPIO0:gpio@40000700{+/* FIXME */+device_type="gpio";+compatible="ibm,gpio-440gp";+reg=<4000070020>;+};++ZMII0:emac-zmii@40000780{+device_type="emac-zmii";+compatible="ibm,zmii-440gp","ibm,zmii";+reg=<40000780c>;+};++EMAC0:ethernet@40000800{+linux,network-index=<0>;+device_type="network";+compatible="ibm,emac-440gp","ibm,emac";+interrupt-parent=<&UIC1>;+interrupts=<1c41d4>;+reg=<4000080070>;+local-mac-address=[000000000000];// Filled in by zImage+mal-device=<&MAL0>;+mal-tx-channel=<01>;+mal-rx-channel=<0>;+cell-index=<0>;+max-frame-size=<5dc>;+rx-fifo-size=<1000>;+tx-fifo-size=<800>;+phy-mode="rmii";+phy-map=<00000001>;+zmii-device=<&ZMII0>;+zmii-channel=<0>;+};+EMAC1:ethernet@40000900{+linux,network-index=<1>;+device_type="network";+compatible="ibm,emac-440gp","ibm,emac";+interrupt-parent=<&UIC1>;+interrupts=<1e41f4>;+reg=<4000090070>;+local-mac-address=[000000000000];// Filled in by zImage+mal-device=<&MAL0>;+mal-tx-channel=<23>;+mal-rx-channel=<1>;+cell-index=<1>;+max-frame-size=<5dc>;+rx-fifo-size=<1000>;+tx-fifo-size=<800>;+phy-mode="rmii";+phy-map=<00000001>;+zmii-device=<&ZMII0>;+zmii-channel=<1>;+};+++GPT0:gpt@40000a00{+/* FIXME */+reg=<40000a00d4>;+interrupt-parent=<&UIC0>;+interrupts=<124134144154164>;+};++};++PCIX0:pci@1234{+device_type="pci";+/* FIXME */+reg=<20ec000008+20ec80000f0+20ec80100fc>;+};+};++chosen{+linux,stdout-path="/plb/opb/serial@40000200";+// linux,initrd-start = <0>; /* FIXME */+// linux,initrd-end = <0>;+// bootargs = "";+};+};+
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
From: David Gibson <hidden> Date: 2007-05-08 04:10:01
Support for the Ebony 440GP reference board in arch/powerpc
This patch adds platform support code for the Ebony (440GP) evaluation
board. This includes both code in arch/powerpc/platforms/44x for
board initialization, and zImage wrapper code to correctly tweak the
flattened device tree based on information from the firmware. The
zImage supports both IBM OpenBIOS (aka "treeboot") and old versions of
uboot which don't support a flattened device tree.
Signed-off-by: David Gibson <redacted>
---
Revised for change from "Ebony" to "ibm,ebony" in the device tree root
compatible property.
Index: working-2.6/arch/powerpc/configs/ebony_defconfig
===================================================================
@@ -0,0 +1,905 @@+#+# Automatically generated make config: don't edit+# Linux kernel version: 2.6.21+# Fri May 4 13:47:08 2007+#+# CONFIG_PPC64 is not set+CONFIG_PPC32=y+CONFIG_PPC_MERGE=y+CONFIG_MMU=y+CONFIG_GENERIC_HARDIRQS=y+CONFIG_IRQ_PER_CPU=y+CONFIG_RWSEM_XCHGADD_ALGORITHM=y+CONFIG_ARCH_HAS_ILOG2_U32=y+CONFIG_GENERIC_HWEIGHT=y+CONFIG_GENERIC_CALIBRATE_DELAY=y+CONFIG_GENERIC_FIND_NEXT_BIT=y+CONFIG_PPC=y+CONFIG_EARLY_PRINTK=y+CONFIG_GENERIC_NVRAM=y+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y+CONFIG_ARCH_MAY_HAVE_PC_FDC=y+CONFIG_PPC_OF=y+# CONFIG_PPC_UDBG_16550 is not set+# CONFIG_GENERIC_TBSYNC is not set+CONFIG_AUDIT_ARCH=y+CONFIG_GENERIC_BUG=y+# CONFIG_DEFAULT_UIMAGE is not set++#+# Processor support+#+# CONFIG_CLASSIC32 is not set+# CONFIG_PPC_82xx is not set+# CONFIG_PPC_83xx is not set+# CONFIG_PPC_85xx is not set+# CONFIG_PPC_86xx is not set+# CONFIG_PPC_8xx is not set+# CONFIG_40x is not set+CONFIG_44x=y+# CONFIG_E200 is not set+CONFIG_PPC_DCR_NATIVE=y+# CONFIG_PPC_DCR_MMIO is not set+CONFIG_PPC_DCR=y+CONFIG_4xx=y+CONFIG_BOOKE=y+CONFIG_PTE_64BIT=y+CONFIG_PHYS_64BIT=y+CONFIG_NOT_COHERENT_CACHE=y+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"++#+# Code maturity level options+#+CONFIG_EXPERIMENTAL=y+CONFIG_BROKEN_ON_SMP=y+CONFIG_INIT_ENV_ARG_LIMIT=32++#+# General setup+#+CONFIG_LOCALVERSION=""+CONFIG_LOCALVERSION_AUTO=y+CONFIG_SWAP=y+CONFIG_SYSVIPC=y+# CONFIG_IPC_NS is not set+CONFIG_SYSVIPC_SYSCTL=y+CONFIG_POSIX_MQUEUE=y+# CONFIG_BSD_PROCESS_ACCT is not set+# CONFIG_TASKSTATS is not set+# CONFIG_UTS_NS is not set+# CONFIG_AUDIT is not set+# CONFIG_IKCONFIG is not set+CONFIG_SYSFS_DEPRECATED=y+# CONFIG_RELAY is not set+CONFIG_BLK_DEV_INITRD=y+CONFIG_INITRAMFS_SOURCE=""+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set+CONFIG_SYSCTL=y+CONFIG_EMBEDDED=y+CONFIG_SYSCTL_SYSCALL=y+CONFIG_KALLSYMS=y+CONFIG_KALLSYMS_ALL=y+CONFIG_KALLSYMS_EXTRA_PASS=y+CONFIG_HOTPLUG=y+CONFIG_PRINTK=y+CONFIG_BUG=y+CONFIG_ELF_CORE=y+CONFIG_BASE_FULL=y+CONFIG_FUTEX=y+CONFIG_EPOLL=y+CONFIG_SHMEM=y+CONFIG_SLAB=y+CONFIG_VM_EVENT_COUNTERS=y+CONFIG_RT_MUTEXES=y+# CONFIG_TINY_SHMEM is not set+CONFIG_BASE_SMALL=0+# CONFIG_SLOB is not set++#+# Loadable module support+#+CONFIG_MODULES=y+CONFIG_MODULE_UNLOAD=y+# CONFIG_MODULE_FORCE_UNLOAD is not set+# CONFIG_MODVERSIONS is not set+# CONFIG_MODULE_SRCVERSION_ALL is not set+CONFIG_KMOD=y++#+# Block layer+#+CONFIG_BLOCK=y+CONFIG_LBD=y+# CONFIG_BLK_DEV_IO_TRACE is not set+# CONFIG_LSF is not set++#+# IO Schedulers+#+CONFIG_IOSCHED_NOOP=y+CONFIG_IOSCHED_AS=y+CONFIG_IOSCHED_DEADLINE=y+CONFIG_IOSCHED_CFQ=y+CONFIG_DEFAULT_AS=y+# CONFIG_DEFAULT_DEADLINE is not set+# CONFIG_DEFAULT_CFQ is not set+# CONFIG_DEFAULT_NOOP is not set+CONFIG_DEFAULT_IOSCHED="anticipatory"++#+# Platform support+#+# CONFIG_PPC_MPC52xx is not set+# CONFIG_PPC_MPC5200 is not set+# CONFIG_PPC_CELL is not set+# CONFIG_PPC_CELL_NATIVE is not set+# CONFIG_PQ2ADS is not set+CONFIG_EBONY=y+CONFIG_440GP=y+# CONFIG_MPIC is not set+# CONFIG_MPIC_WEIRD is not set+# CONFIG_PPC_I8259 is not set+# CONFIG_PPC_RTAS is not set+# CONFIG_MMIO_NVRAM is not set+# CONFIG_PPC_MPC106 is not set+# CONFIG_PPC_970_NAP is not set+# CONFIG_PPC_INDIRECT_IO is not set+# CONFIG_GENERIC_IOMAP is not set+# CONFIG_CPU_FREQ is not set+# CONFIG_CPM2 is not set++#+# Kernel options+#+# CONFIG_HIGHMEM is not set+# CONFIG_HZ_100 is not set+CONFIG_HZ_250=y+# CONFIG_HZ_300 is not set+# CONFIG_HZ_1000 is not set+CONFIG_HZ=250+CONFIG_PREEMPT_NONE=y+# CONFIG_PREEMPT_VOLUNTARY is not set+# CONFIG_PREEMPT is not set+CONFIG_BINFMT_ELF=y+# CONFIG_BINFMT_MISC is not set+CONFIG_MATH_EMULATION=y+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y+CONFIG_ARCH_FLATMEM_ENABLE=y+CONFIG_ARCH_POPULATES_NODE_MAP=y+CONFIG_SELECT_MEMORY_MODEL=y+CONFIG_FLATMEM_MANUAL=y+# CONFIG_DISCONTIGMEM_MANUAL is not set+# CONFIG_SPARSEMEM_MANUAL is not set+CONFIG_FLATMEM=y+CONFIG_FLAT_NODE_MEM_MAP=y+# CONFIG_SPARSEMEM_STATIC is not set+CONFIG_SPLIT_PTLOCK_CPUS=4+CONFIG_RESOURCES_64BIT=y+CONFIG_ZONE_DMA_FLAG=1+CONFIG_PROC_DEVICETREE=y+# CONFIG_CMDLINE_BOOL is not set+CONFIG_SECCOMP=y+CONFIG_WANT_DEVICE_TREE=y+CONFIG_DEVICE_TREE="ebony.dts"+CONFIG_ISA_DMA_API=y++#+# Bus options+#+CONFIG_ZONE_DMA=y+CONFIG_PPC_INDIRECT_PCI=y+# CONFIG_PPC_INDIRECT_PCI_BE is not set+CONFIG_PCI=y+CONFIG_PCI_DOMAINS=y+# CONFIG_PCIEPORTBUS is not set+# CONFIG_PCI_DEBUG is not set++#+# PCCARD (PCMCIA/CardBus) support+#+# CONFIG_PCCARD is not set++#+# PCI Hotplug Support+#+# CONFIG_HOTPLUG_PCI is not set++#+# Advanced setup+#+# CONFIG_ADVANCED_OPTIONS is not set++#+# Default settings for advanced configuration options are used+#+CONFIG_HIGHMEM_START=0xfe000000+CONFIG_LOWMEM_SIZE=0x30000000+CONFIG_KERNEL_START=0xc0000000+CONFIG_TASK_SIZE=0x80000000+CONFIG_CONSISTENT_START=0xff100000+CONFIG_CONSISTENT_SIZE=0x00200000+CONFIG_BOOT_LOAD=0x01000000++#+# Networking+#+CONFIG_NET=y++#+# Networking options+#+CONFIG_PACKET=y+# CONFIG_PACKET_MMAP is not set+CONFIG_UNIX=y+# CONFIG_NET_KEY is not set+CONFIG_INET=y+# CONFIG_IP_MULTICAST is not set+# CONFIG_IP_ADVANCED_ROUTER is not set+CONFIG_IP_FIB_HASH=y+CONFIG_IP_PNP=y+CONFIG_IP_PNP_DHCP=y+CONFIG_IP_PNP_BOOTP=y+# CONFIG_IP_PNP_RARP is not set+# CONFIG_NET_IPIP is not set+# CONFIG_NET_IPGRE is not set+# CONFIG_ARPD is not set+# CONFIG_SYN_COOKIES is not set+# CONFIG_INET_AH is not set+# CONFIG_INET_ESP is not set+# CONFIG_INET_IPCOMP is not set+# CONFIG_INET_XFRM_TUNNEL is not set+# CONFIG_INET_TUNNEL is not set+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set+# CONFIG_INET_XFRM_MODE_TUNNEL is not set+# CONFIG_INET_XFRM_MODE_BEET is not set+CONFIG_INET_DIAG=y+CONFIG_INET_TCP_DIAG=y+# CONFIG_TCP_CONG_ADVANCED is not set+CONFIG_TCP_CONG_CUBIC=y+CONFIG_DEFAULT_TCP_CONG="cubic"+# CONFIG_TCP_MD5SIG is not set+# CONFIG_IPV6 is not set+# CONFIG_INET6_XFRM_TUNNEL is not set+# CONFIG_INET6_TUNNEL is not set+# CONFIG_NETWORK_SECMARK is not set+# CONFIG_NETFILTER is not set++#+# DCCP Configuration (EXPERIMENTAL)+#+# CONFIG_IP_DCCP is not set++#+# SCTP Configuration (EXPERIMENTAL)+#+# CONFIG_IP_SCTP is not set++#+# TIPC Configuration (EXPERIMENTAL)+#+# CONFIG_TIPC is not set+# CONFIG_ATM is not set+# CONFIG_BRIDGE is not set+# CONFIG_VLAN_8021Q is not set+# CONFIG_DECNET is not set+# CONFIG_LLC2 is not set+# CONFIG_IPX is not set+# CONFIG_ATALK is not set+# CONFIG_X25 is not set+# CONFIG_LAPB is not set+# CONFIG_ECONET is not set+# CONFIG_WAN_ROUTER is not set++#+# QoS and/or fair queueing+#+# CONFIG_NET_SCHED is not set++#+# Network testing+#+# CONFIG_NET_PKTGEN is not set+# CONFIG_HAMRADIO is not set+# CONFIG_IRDA is not set+# CONFIG_BT is not set+# CONFIG_AF_RXRPC is not set++#+# Wireless+#+# CONFIG_CFG80211 is not set+# CONFIG_WIRELESS_EXT is not set+# CONFIG_IEEE80211 is not set++#+# Device Drivers+#++#+# Generic Driver Options+#+CONFIG_STANDALONE=y+CONFIG_PREVENT_FIRMWARE_BUILD=y+CONFIG_FW_LOADER=y+# CONFIG_DEBUG_DRIVER is not set+# CONFIG_DEBUG_DEVRES is not set+# CONFIG_SYS_HYPERVISOR is not set++#+# Connector - unified userspace <-> kernelspace linker+#+CONFIG_CONNECTOR=y+CONFIG_PROC_EVENTS=y+# CONFIG_MTD is not set++#+# Parallel port support+#+# CONFIG_PARPORT is not set++#+# Plug and Play support+#+# CONFIG_PNPACPI is not set++#+# Block devices+#+# CONFIG_BLK_DEV_FD is not set+# CONFIG_BLK_CPQ_DA is not set+# CONFIG_BLK_CPQ_CISS_DA is not set+# CONFIG_BLK_DEV_DAC960 is not set+# CONFIG_BLK_DEV_UMEM is not set+# CONFIG_BLK_DEV_COW_COMMON is not set+# CONFIG_BLK_DEV_LOOP is not set+# CONFIG_BLK_DEV_NBD is not set+# CONFIG_BLK_DEV_SX8 is not set+CONFIG_BLK_DEV_RAM=y+CONFIG_BLK_DEV_RAM_COUNT=16+CONFIG_BLK_DEV_RAM_SIZE=35000+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024+# CONFIG_CDROM_PKTCDVD is not set+# CONFIG_ATA_OVER_ETH is not set++#+# Misc devices+#+# CONFIG_SGI_IOC4 is not set+# CONFIG_TIFM_CORE is not set++#+# ATA/ATAPI/MFM/RLL support+#+# CONFIG_IDE is not set++#+# SCSI device support+#+# CONFIG_RAID_ATTRS is not set+# CONFIG_SCSI is not set+# CONFIG_SCSI_NETLINK is not set++#+# Serial ATA (prod) and Parallel ATA (experimental) drivers+#+# CONFIG_ATA is not set++#+# Multi-device support (RAID and LVM)+#+# CONFIG_MD is not set++#+# Fusion MPT device support+#+# CONFIG_FUSION is not set++#+# IEEE 1394 (FireWire) support+#+# CONFIG_IEEE1394 is not set++#+# I2O device support+#+# CONFIG_I2O is not set+# CONFIG_MACINTOSH_DRIVERS is not set++#+# Network device support+#+CONFIG_NETDEVICES=y+# CONFIG_DUMMY is not set+# CONFIG_BONDING is not set+# CONFIG_EQUALIZER is not set+# CONFIG_TUN is not set++#+# ARCnet devices+#+# CONFIG_ARCNET is not set++#+# PHY device support+#++#+# Ethernet (10 or 100Mbit)+#+# CONFIG_NET_ETHERNET is not set+CONFIG_IBM_NEW_EMAC=y+CONFIG_IBM_NEW_EMAC_RXB=128+CONFIG_IBM_NEW_EMAC_TXB=64+CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32+CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256+CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0+# CONFIG_IBM_NEW_EMAC_DEBUG is not set+CONFIG_IBM_NEW_EMAC_ZMII=y+# CONFIG_IBM_NEW_EMAC_RGMII is not set+# CONFIG_IBM_NEW_EMAC_TAH is not set+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set++#+# Ethernet (1000 Mbit)+#+# CONFIG_ACENIC is not set+# CONFIG_DL2K is not set+# CONFIG_E1000 is not set+# CONFIG_NS83820 is not set+# CONFIG_HAMACHI is not set+# CONFIG_YELLOWFIN is not set+# CONFIG_R8169 is not set+# CONFIG_SIS190 is not set+# CONFIG_SKGE is not set+# CONFIG_SKY2 is not set+# CONFIG_SK98LIN is not set+# CONFIG_TIGON3 is not set+# CONFIG_BNX2 is not set+# CONFIG_QLA3XXX is not set+# CONFIG_ATL1 is not set++#+# Ethernet (10000 Mbit)+#+# CONFIG_CHELSIO_T1 is not set+# CONFIG_CHELSIO_T3 is not set+# CONFIG_IXGB is not set+# CONFIG_S2IO is not set+# CONFIG_MYRI10GE is not set+# CONFIG_NETXEN_NIC is not set++#+# Token Ring devices+#+# CONFIG_TR is not set++#+# Wireless LAN+#+# CONFIG_WLAN_PRE80211 is not set+# CONFIG_WLAN_80211 is not set++#+# Wan interfaces+#+# CONFIG_WAN is not set+# CONFIG_FDDI is not set+# CONFIG_HIPPI is not set+# CONFIG_PPP is not set+# CONFIG_SLIP is not set+# CONFIG_SHAPER is not set+# CONFIG_NETCONSOLE is not set+# CONFIG_NETPOLL is not set+# CONFIG_NET_POLL_CONTROLLER is not set++#+# ISDN subsystem+#+# CONFIG_ISDN is not set++#+# Telephony Support+#+# CONFIG_PHONE is not set++#+# Input device support+#+# CONFIG_INPUT is not set++#+# Hardware I/O ports+#+# CONFIG_SERIO is not set+# CONFIG_GAMEPORT is not set++#+# Character devices+#+# CONFIG_VT is not set+# CONFIG_SERIAL_NONSTANDARD is not set++#+# Serial drivers+#+CONFIG_SERIAL_8250=y+CONFIG_SERIAL_8250_CONSOLE=y+# CONFIG_SERIAL_8250_PCI is not set+CONFIG_SERIAL_8250_NR_UARTS=4+CONFIG_SERIAL_8250_RUNTIME_UARTS=4+CONFIG_SERIAL_8250_EXTENDED=y+# CONFIG_SERIAL_8250_MANY_PORTS is not set+CONFIG_SERIAL_8250_SHARE_IRQ=y+# CONFIG_SERIAL_8250_DETECT_IRQ is not set+# CONFIG_SERIAL_8250_RSA is not set++#+# Non-8250 serial port support+#+# CONFIG_SERIAL_UARTLITE is not set+CONFIG_SERIAL_CORE=y+CONFIG_SERIAL_CORE_CONSOLE=y+# CONFIG_SERIAL_JSM is not set+CONFIG_SERIAL_OF_PLATFORM=y+CONFIG_UNIX98_PTYS=y+CONFIG_LEGACY_PTYS=y+CONFIG_LEGACY_PTY_COUNT=256++#+# IPMI+#+# CONFIG_IPMI_HANDLER is not set++#+# Watchdog Cards+#+# CONFIG_WATCHDOG is not set+# CONFIG_HW_RANDOM is not set+# CONFIG_NVRAM is not set+# CONFIG_GEN_RTC is not set+# CONFIG_DTLK is not set+# CONFIG_R3964 is not set+# CONFIG_APPLICOM is not set+# CONFIG_AGP is not set+# CONFIG_DRM is not set+# CONFIG_RAW_DRIVER is not set++#+# TPM devices+#+# CONFIG_TCG_TPM is not set++#+# I2C support+#+# CONFIG_I2C is not set++#+# SPI support+#+# CONFIG_SPI is not set+# CONFIG_SPI_MASTER is not set++#+# Dallas's 1-wire bus+#+# CONFIG_W1 is not set++#+# Hardware Monitoring support+#+# CONFIG_HWMON is not set+# CONFIG_HWMON_VID is not set++#+# Multifunction device drivers+#+# CONFIG_MFD_SM501 is not set++#+# Multimedia devices+#+# CONFIG_VIDEO_DEV is not set++#+# Digital Video Broadcasting Devices+#+# CONFIG_DVB is not set++#+# Graphics support+#+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set+# CONFIG_FB is not set+# CONFIG_FB_IBM_GXT4500 is not set++#+# Sound+#+# CONFIG_SOUND is not set++#+# USB support+#+CONFIG_USB_ARCH_HAS_HCD=y+CONFIG_USB_ARCH_HAS_OHCI=y+CONFIG_USB_ARCH_HAS_EHCI=y+# CONFIG_USB is not set++#+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'+#++#+# USB Gadget Support+#+# CONFIG_USB_GADGET is not set++#+# MMC/SD Card support+#+# CONFIG_MMC is not set++#+# LED devices+#+# CONFIG_NEW_LEDS is not set++#+# LED drivers+#++#+# LED Triggers+#++#+# InfiniBand support+#+# CONFIG_INFINIBAND is not set++#+# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)+#++#+# Real Time Clock+#+# CONFIG_RTC_CLASS is not set++#+# DMA Engine support+#+# CONFIG_DMA_ENGINE is not set++#+# DMA Clients+#++#+# DMA Devices+#++#+# Auxiliary Display support+#++#+# Virtualization+#++#+# File systems+#+CONFIG_EXT2_FS=y+# CONFIG_EXT2_FS_XATTR is not set+# CONFIG_EXT2_FS_XIP is not set+# CONFIG_EXT3_FS is not set+# CONFIG_EXT4DEV_FS is not set+# CONFIG_REISERFS_FS is not set+# CONFIG_JFS_FS is not set+# CONFIG_FS_POSIX_ACL is not set+# CONFIG_XFS_FS is not set+# CONFIG_GFS2_FS is not set+# CONFIG_OCFS2_FS is not set+# CONFIG_MINIX_FS is not set+# CONFIG_ROMFS_FS is not set+CONFIG_INOTIFY=y+CONFIG_INOTIFY_USER=y+# CONFIG_QUOTA is not set+CONFIG_DNOTIFY=y+# CONFIG_AUTOFS_FS is not set+# CONFIG_AUTOFS4_FS is not set+# CONFIG_FUSE_FS is not set++#+# CD-ROM/DVD Filesystems+#+# CONFIG_ISO9660_FS is not set+# CONFIG_UDF_FS is not set++#+# DOS/FAT/NT Filesystems+#+# CONFIG_MSDOS_FS is not set+# CONFIG_VFAT_FS is not set+# CONFIG_NTFS_FS is not set++#+# Pseudo filesystems+#+CONFIG_PROC_FS=y+CONFIG_PROC_KCORE=y+CONFIG_PROC_SYSCTL=y+CONFIG_SYSFS=y+CONFIG_TMPFS=y+# CONFIG_TMPFS_POSIX_ACL is not set+# CONFIG_HUGETLB_PAGE is not set+CONFIG_RAMFS=y+# CONFIG_CONFIGFS_FS is not set++#+# Miscellaneous filesystems+#+# CONFIG_ADFS_FS is not set+# CONFIG_AFFS_FS is not set+# CONFIG_HFS_FS is not set+# CONFIG_HFSPLUS_FS is not set+# CONFIG_BEFS_FS is not set+# CONFIG_BFS_FS is not set+# CONFIG_EFS_FS is not set+CONFIG_CRAMFS=y+# CONFIG_VXFS_FS is not set+# CONFIG_HPFS_FS is not set+# CONFIG_QNX4FS_FS is not set+# CONFIG_SYSV_FS is not set+# CONFIG_UFS_FS is not set++#+# Network File Systems+#+CONFIG_NFS_FS=y+CONFIG_NFS_V3=y+# CONFIG_NFS_V3_ACL is not set+# CONFIG_NFS_V4 is not set+# CONFIG_NFS_DIRECTIO is not set+# CONFIG_NFSD is not set+CONFIG_ROOT_NFS=y+CONFIG_LOCKD=y+CONFIG_LOCKD_V4=y+CONFIG_NFS_COMMON=y+CONFIG_SUNRPC=y+# CONFIG_RPCSEC_GSS_KRB5 is not set+# CONFIG_RPCSEC_GSS_SPKM3 is not set+# CONFIG_SMB_FS is not set+# CONFIG_CIFS is not set+# CONFIG_NCP_FS is not set+# CONFIG_CODA_FS is not set+# CONFIG_AFS_FS is not set+# CONFIG_9P_FS is not set++#+# Partition Types+#+# CONFIG_PARTITION_ADVANCED is not set+CONFIG_MSDOS_PARTITION=y++#+# Native Language Support+#+# CONFIG_NLS is not set++#+# Distributed Lock Manager+#+# CONFIG_DLM is not set+# CONFIG_UCC_SLOW is not set+# CONFIG_UCC_FAST is not set++#+# Library routines+#+CONFIG_BITREVERSE=y+# CONFIG_CRC_CCITT is not set+# CONFIG_CRC16 is not set+CONFIG_CRC32=y+# CONFIG_LIBCRC32C is not set+CONFIG_ZLIB_INFLATE=y+CONFIG_PLIST=y+CONFIG_HAS_IOMEM=y+CONFIG_HAS_IOPORT=y++#+# Instrumentation Support+#+# CONFIG_PROFILING is not set++#+# Kernel hacking+#+# CONFIG_PRINTK_TIME is not set+CONFIG_ENABLE_MUST_CHECK=y+CONFIG_MAGIC_SYSRQ=y+# CONFIG_UNUSED_SYMBOLS is not set+# CONFIG_DEBUG_FS is not set+# CONFIG_HEADERS_CHECK is not set+CONFIG_DEBUG_KERNEL=y+# CONFIG_DEBUG_SHIRQ is not set+CONFIG_LOG_BUF_SHIFT=14+CONFIG_DETECT_SOFTLOCKUP=y+# CONFIG_SCHEDSTATS is not set+# CONFIG_TIMER_STATS is not set+# CONFIG_DEBUG_SLAB is not set+# CONFIG_DEBUG_RT_MUTEXES is not set+# CONFIG_RT_MUTEX_TESTER is not set+# CONFIG_DEBUG_SPINLOCK is not set+# CONFIG_DEBUG_MUTEXES is not set+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set+# CONFIG_DEBUG_KOBJECT is not set+CONFIG_DEBUG_BUGVERBOSE=y+# CONFIG_DEBUG_INFO is not set+# CONFIG_DEBUG_VM is not set+# CONFIG_DEBUG_LIST is not set+CONFIG_FORCED_INLINING=y+# CONFIG_RCU_TORTURE_TEST is not set+# CONFIG_FAULT_INJECTION is not set+# CONFIG_DEBUG_STACKOVERFLOW is not set+# CONFIG_DEBUG_STACK_USAGE is not set+# CONFIG_DEBUG_PAGEALLOC is not set+# CONFIG_DEBUGGER is not set+# CONFIG_BDI_SWITCH is not set+# CONFIG_BOOTX_TEXT is not set+# CONFIG_SERIAL_TEXT_DEBUG is not set+# CONFIG_PPC_EARLY_DEBUG is not set++#+# Security options+#+# CONFIG_KEYS is not set+# CONFIG_SECURITY is not set++#+# Cryptographic options+#+CONFIG_CRYPTO=y+CONFIG_CRYPTO_ALGAPI=y+CONFIG_CRYPTO_BLKCIPHER=y+CONFIG_CRYPTO_MANAGER=y+# CONFIG_CRYPTO_HMAC is not set+# CONFIG_CRYPTO_XCBC is not set+# CONFIG_CRYPTO_NULL is not set+# CONFIG_CRYPTO_MD4 is not set+CONFIG_CRYPTO_MD5=y+# CONFIG_CRYPTO_SHA1 is not set+# CONFIG_CRYPTO_SHA256 is not set+# CONFIG_CRYPTO_SHA512 is not set+# CONFIG_CRYPTO_WP512 is not set+# CONFIG_CRYPTO_TGR192 is not set+# CONFIG_CRYPTO_GF128MUL is not set+CONFIG_CRYPTO_ECB=y+CONFIG_CRYPTO_CBC=y+CONFIG_CRYPTO_PCBC=y+# CONFIG_CRYPTO_LRW is not set+CONFIG_CRYPTO_DES=y+# CONFIG_CRYPTO_FCRYPT is not set+# CONFIG_CRYPTO_BLOWFISH is not set+# CONFIG_CRYPTO_TWOFISH is not set+# CONFIG_CRYPTO_SERPENT is not set+# CONFIG_CRYPTO_AES is not set+# CONFIG_CRYPTO_CAST5 is not set+# CONFIG_CRYPTO_CAST6 is not set+# CONFIG_CRYPTO_TEA is not set+# CONFIG_CRYPTO_ARC4 is not set+# CONFIG_CRYPTO_KHAZAD is not set+# CONFIG_CRYPTO_ANUBIS is not set+# CONFIG_CRYPTO_DEFLATE is not set+# CONFIG_CRYPTO_MICHAEL_MIC is not set+# CONFIG_CRYPTO_CRC32C is not set+# CONFIG_CRYPTO_CAMELLIA is not set+# CONFIG_CRYPTO_TEST is not set++#+# Hardware crypto devices+#
@@ -0,0 +1,56 @@+#config BAMBOO+# bool "Bamboo"+# depends on 44x+# default n+# select 440EP+# help+# This option enables support for the IBM PPC440EP evaluation board.++configEBONY+bool"Ebony"+depends on44x+defaulty+select440GP+help+ThisoptionenablessupportfortheIBMPPC440GPevaluationboard.++#config LUAN+# bool "Luan"+# depends on 44x+# default n+# select 440SP+# help+# This option enables support for the IBM PPC440SP evaluation board.++#config OCOTEA+# bool "Ocotea"+# depends on 44x+# default n+# select 440GX+# help+# This option enables support for the IBM PPC440GX evaluation board.++# 44x specific CPU modules, selected based on the board above.+config440EP+bool+selectPPC_FPU+selectIBM440EP_ERR42++config440GP+bool+selectIBM_NEW_EMAC_ZMII++config440GX+bool++config440SP+bool++config440A+bool+depends on440GX+defaulty++# 44x errata/workaround config symbols, selected by the CPU models above+configIBM440EP_ERR42+bool
@@ -0,0 +1,40 @@+/*+*Copyright2007DavidGibson,IBMCorporation.+*+*Basedonearliercode:+*MattPorter<mporter@kernel.crashing.org>+*Copyright2002-2005MontaVistaSoftwareInc.+*+*EugeneSurovegin<eugene.surovegin@zultys.com>or<ebs@ebshome.net>+*Copyright(c)2003,2004ZultysTechnologies+*+*Thisprogramisfreesoftware;youcanredistributeitand/or+*modifyitunderthetermsoftheGNUGeneralPublicLicense+*aspublishedbytheFreeSoftwareFoundation;eitherversion+*2oftheLicense,or(atyouroption)anylaterversion.+*/+#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. */+voidibm44x_fixup_memsize(void)+{+inti;+unsignedlongmemsize,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);+}
@@ -183,7 +192,8 @@ install: $(CONFIGURE) $(addprefix $(obj)sh-x$(srctree)/$(src)/install.sh"$(KERNELRELEASE)"vmlinuxSystem.map"$(INSTALL_PATH)"$<# anything not in $(targets)-clean-files+=$(image-)$(initrd-)zImagezImage.initrdcuImage.*+clean-files+=$(image-)$(initrd-)zImagezImage.initrdcuImage.*\+treeImage.*# clean up files cached by wrapperclean-kernel:=vmlinux.stripvmlinux.bin
@@ -0,0 +1,129 @@+/*+*Copyright2007DavidGibson,IBMCorporation.+*+*Basedonearliercode:+*Copyright(C)PaulMackerras1997.+*+*MattPorter<mporter@kernel.crashing.org>+*Copyright2002-2005MontaVistaSoftwareInc.+*+*EugeneSurovegin<eugene.surovegin@zultys.com>or<ebs@ebshome.net>+*Copyright(c)2003,2004ZultysTechnologies+*+*Thisprogramisfreesoftware;youcanredistributeitand/or+*modifyitunderthetermsoftheGNUGeneralPublicLicense+*aspublishedbytheFreeSoftwareFoundation;eitherversion+*2oftheLicense,or(atyouroption)anylaterversion.+*/+#include<stdarg.h>+#include<stddef.h>+#include"types.h"+#include"elf.h"+#include"string.h"+#include"stdio.h"+#include"page.h"+#include"ops.h"+#include"reg.h"+#include"dcr.h"+#include"44x.h"++externchar_dtb_start[];+externchar_dtb_end[];++staticu8*ebony_mac0,*ebony_mac1;++/* Calculate 440GP clocks */+voidibm440gp_fixup_clocks(unsignedintsysclk,unsignedintser_clk)+{+u32sys0=mfdcr(DCRN_CPC0_SYS0);+u32cr0=mfdcr(DCRN_CPC0_CR0);+u32cpu,plb,opb,ebc,tb,uart0,uart1,m;+u32opdv=CPC0_SYS0_OPDV(sys0);+u32epdv=CPC0_SYS0_EPDV(sys0);++if(sys0&CPC0_SYS0_BYPASS){+/* Bypass system PLL */+cpu=plb=sysclk;+}else{+if(sys0&CPC0_SYS0_EXTSL)+/* PerClk */+m=CPC0_SYS0_FWDVB(sys0)*opdv*epdv;+else+/* CPU clock */+m=CPC0_SYS0_FBDV(sys0)*CPC0_SYS0_FWDVA(sys0);+cpu=sysclk*m/CPC0_SYS0_FWDVA(sys0);+plb=sysclk*m/CPC0_SYS0_FWDVB(sys0);+}++opb=plb/opdv;+ebc=opb/epdv;++/* FIXME: Check if this is for all 440GP, or just Ebony */+if((mfpvr()&0xf0000fff)==0x40000440)+/* Rev. B 440GP, use external system clock */+tb=sysclk;+else+/* Rev. C 440GP, errata force us to use internal clock */+tb=cpu;++if(cr0&CPC0_CR0_U0EC)+/* External UART clock */+uart0=ser_clk;+else+/* Internal UART clock */+uart0=plb/CPC0_CR0_UDIV(cr0);++if(cr0&CPC0_CR0_U1EC)+/* External UART clock */+uart1=ser_clk;+else+/* Internal UART clock */+uart1=plb/CPC0_CR0_UDIV(cr0);++printf("PPC440GP: SysClk = %dMHz (%x)\n\r",+(sysclk+500000)/1000000,sysclk);++dt_fixup_cpu_clocks(cpu,tb,0);++dt_fixup_clock("/plb",plb);+dt_fixup_clock("/plb/opb",opb);+dt_fixup_clock("/plb/opb/ebc",ebc);+dt_fixup_clock("/plb/opb/serial@40000200",uart0);+dt_fixup_clock("/plb/opb/serial@40000300",uart1);+}++staticvoidebony_fixups(void)+{+// FIXME: sysclk should be derived by reading the FPGA registers+unsignedlongsysclk=33000000;++ibm440gp_fixup_clocks(sysclk,6*1843200);+ibm44x_fixup_memsize();+dt_fixup_mac_addresses(ebony_mac0,ebony_mac1);+}++#define SPRN_DBCR0 0x134+#define DBCR0_RST_SYSTEM 0x30000000++staticvoidebony_exit(void)+{+unsignedlongtmp;++asmvolatile(+"mfspr %0,%1\n"+"oris %0,%0,%2@h\n"+"mtspr %1,%0"+:"=&r"(tmp):"i"(SPRN_DBCR0),"i"(DBCR0_RST_SYSTEM)+);++}++voidebony_init(void*mac0,void*mac1)+{+platform_ops.fixups=ebony_fixups;+platform_ops.exit=ebony_exit;+ebony_mac0=mac0;+ebony_mac1=mac1;+ft_init(_dtb_start,_dtb_end-_dtb_start,32);+serial_console_init();+}
@@ -61,10 +61,8 @@ int main(int argc, char *argv[])bt.bb_magic=htonl(0x0052504F);/* If we have the optional entry point parameter, use it */-if(argc==4)-bt.bb_dest=bt.bb_entry_point=htonl(strtoul(argv[3],NULL,0));-else-bt.bb_dest=bt.bb_entry_point=htonl(0x500000);+bt.bb_dest=htonl(strtoul(argv[3],NULL,0));+bt.bb_entry_point=htonl(strtoul(argv[4],NULL,0));/* We know these from the linker command.*...andthenmoveitupintomemoryalittlemoresothe
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson