You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'for-2.6.22' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'for-2.6.22' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (255 commits) [POWERPC] Remove dev_dbg redefinition in drivers/ps3/vuart.c [POWERPC] remove kernel module option for booke wdt [POWERPC] Avoid putting cpu node twice [POWERPC] Spinlock initializer cleanup [POWERPC] ppc4xx_sgdma needs dma-mapping.h [POWERPC] arch/powerpc/sysdev/timer.c build fix [POWERPC] get_property cleanups [POWERPC] Remove the unused HTDMSOUND driver [POWERPC] cell: cbe_cpufreq cleanup and crash fix [POWERPC] Declare enable_kernel_spe in a header [POWERPC] Add dt_xlate_addr() to bootwrapper [POWERPC] bootwrapper: CONFIG_ -> CONFIG_DEVICE_TREE [POWERPC] Don't define a custom bd_t for Xilixn Virtex based boards. [POWERPC] Add sane defaults for Xilinx EDK generated xparameters files [POWERPC] Add uartlite boot console driver for the zImage wrapper [POWERPC] Stop using ppc_sys for Xilinx Virtex boards [POWERPC] New registration for common Xilinx Virtex ppc405 platform devices [POWERPC] Merge common virtex header files [POWERPC] Rework Kconfig dependancies for Xilinx Virtex ppc405 platform [POWERPC] Clean up cpufreq Kconfig dependencies ...
This commit is contained in:
File diff suppressed because it is too large
Load Diff
+49
-423
File diff suppressed because it is too large
Load Diff
@@ -18,6 +18,15 @@ config DEBUG_STACK_USAGE
|
||||
|
||||
This option will slow down process creation somewhat.
|
||||
|
||||
config DEBUG_PAGEALLOC
|
||||
bool "Debug page memory allocations"
|
||||
depends on DEBUG_KERNEL && !SOFTWARE_SUSPEND
|
||||
help
|
||||
Unmap pages from the kernel linear mapping after free_pages().
|
||||
This results in a large slowdown, but helps to find certain types
|
||||
of memory corruptions.
|
||||
|
||||
|
||||
config HCALL_STATS
|
||||
bool "Hypervisor call instrumentation"
|
||||
depends on PPC_PSERIES && DEBUG_FS
|
||||
@@ -132,8 +141,7 @@ config BOOTX_TEXT
|
||||
|
||||
config SERIAL_TEXT_DEBUG
|
||||
bool "Support for early boot texts over serial port"
|
||||
depends on 4xx || LOPEC || MV64X60 || PPLUS || PRPMC800 || \
|
||||
PPC_GEN550 || PPC_MPC52xx
|
||||
depends on 4xx
|
||||
|
||||
config PPC_EARLY_DEBUG
|
||||
bool "Early debugging (dangerous)"
|
||||
|
||||
@@ -102,9 +102,9 @@ CFLAGS += $(call cc-option,-mno-altivec)
|
||||
# kernel considerably.
|
||||
CFLAGS += $(call cc-option,-funit-at-a-time)
|
||||
|
||||
ifndef CONFIG_FSL_BOOKE
|
||||
CFLAGS += -mstring
|
||||
endif
|
||||
# Never use string load/store instructions as they are
|
||||
# often slow when they are implemented at all
|
||||
CFLAGS += -mno-string
|
||||
|
||||
ifeq ($(CONFIG_6xx),y)
|
||||
CFLAGS += -mcpu=powerpc
|
||||
@@ -148,7 +148,7 @@ all: $(KBUILD_IMAGE)
|
||||
|
||||
CPPFLAGS_vmlinux.lds := -Upowerpc
|
||||
|
||||
BOOT_TARGETS = zImage zImage.initrd uImage
|
||||
BOOT_TARGETS = zImage zImage.initrd uImage cuImage
|
||||
|
||||
PHONY += $(BOOT_TARGETS)
|
||||
|
||||
@@ -166,6 +166,9 @@ define archhelp
|
||||
@echo ' *_defconfig - Select default config from arch/$(ARCH)/configs'
|
||||
endef
|
||||
|
||||
install:
|
||||
$(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install
|
||||
|
||||
archclean:
|
||||
$(Q)$(MAKE) $(clean)=$(boot)
|
||||
|
||||
|
||||
@@ -18,6 +18,9 @@ kernel-vmlinux.strip.c
|
||||
kernel-vmlinux.strip.gz
|
||||
mktree
|
||||
uImage
|
||||
cuImage
|
||||
cuImage.bin.gz
|
||||
cuImage.elf
|
||||
zImage
|
||||
zImage.chrp
|
||||
zImage.coff
|
||||
|
||||
+62
-60
@@ -40,10 +40,11 @@ zliblinuxheader := zlib.h zconf.h zutil.h
|
||||
$(addprefix $(obj)/,$(zlib) main.o): $(addprefix $(obj)/,$(zliblinuxheader)) \
|
||||
$(addprefix $(obj)/,$(zlibheader))
|
||||
|
||||
src-wlib := string.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \
|
||||
ns16550.c serial.c simple_alloc.c div64.S util.S $(zlib)
|
||||
src-plat := of.c
|
||||
src-boot := crt0.S $(src-wlib) $(src-plat) empty.c
|
||||
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
|
||||
src-boot := $(src-wlib) $(src-plat) empty.c
|
||||
|
||||
src-boot := $(addprefix $(obj)/, $(src-boot))
|
||||
obj-boot := $(addsuffix .o, $(basename $(src-boot)))
|
||||
@@ -75,7 +76,7 @@ $(obj)/zImage.lds $(obj)/zImage.coff.lds: $(obj)/%: $(srctree)/$(src)/%.S
|
||||
@cp $< $@
|
||||
|
||||
clean-files := $(zlib) $(zlibheader) $(zliblinuxheader) \
|
||||
empty.c zImage zImage.coff.lds zImage.lds zImage.sandpoint
|
||||
empty.c zImage.coff.lds zImage.lds
|
||||
|
||||
quiet_cmd_bootcc = BOOTCC $@
|
||||
cmd_bootcc = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $<
|
||||
@@ -84,23 +85,25 @@ quiet_cmd_bootas = BOOTAS $@
|
||||
cmd_bootas = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -c -o $@ $<
|
||||
|
||||
quiet_cmd_bootar = BOOTAR $@
|
||||
cmd_bootar = $(CROSS32AR) -cr $@.$$$$ $^; mv $@.$$$$ $@
|
||||
cmd_bootar = $(CROSS32AR) -cr $@.$$$$ $(filter-out FORCE,$^); mv $@.$$$$ $@
|
||||
|
||||
$(patsubst %.c,%.o, $(filter %.c, $(src-boot))): %.o: %.c
|
||||
$(patsubst %.c,%.o, $(filter %.c, $(src-boot))): %.o: %.c FORCE
|
||||
$(call if_changed_dep,bootcc)
|
||||
$(patsubst %.S,%.o, $(filter %.S, $(src-boot))): %.o: %.S
|
||||
$(patsubst %.S,%.o, $(filter %.S, $(src-boot))): %.o: %.S FORCE
|
||||
$(call if_changed_dep,bootas)
|
||||
|
||||
$(obj)/wrapper.a: $(obj-wlib)
|
||||
$(call cmd,bootar)
|
||||
$(obj)/wrapper.a: $(obj-wlib) FORCE
|
||||
$(call if_changed,bootar)
|
||||
|
||||
hostprogs-y := addnote addRamDisk hack-coff mktree
|
||||
|
||||
extra-y := $(obj)/crt0.o $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \
|
||||
targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a)
|
||||
extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \
|
||||
$(obj)/zImage.lds $(obj)/zImage.coff.lds
|
||||
|
||||
wrapper :=$(srctree)/$(src)/wrapper
|
||||
wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree)
|
||||
wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \
|
||||
$(wrapper) FORCE
|
||||
|
||||
#############
|
||||
# Bits for building various flavours of zImage
|
||||
@@ -113,50 +116,10 @@ CROSSWRAP := -C "$(CROSS_COMPILE)"
|
||||
endif
|
||||
endif
|
||||
|
||||
# args (to if_changed): 1 = (this rule), 2 = platform, 3 = dts 4=dtb 5=initrd
|
||||
quiet_cmd_wrap = WRAP $@
|
||||
cmd_wrap =$(CONFIG_SHELL) $(wrapper) -c -o $@ -p $2 $(CROSSWRAP) vmlinux
|
||||
quiet_cmd_wrap_initrd = WRAP $@
|
||||
cmd_wrap_initrd =$(CONFIG_SHELL) $(wrapper) -c -o $@ -p $2 $(CROSSWRAP) \
|
||||
-i $(obj)/ramdisk.image.gz vmlinux
|
||||
|
||||
$(obj)/zImage.chrp: vmlinux $(wrapperbits)
|
||||
$(call cmd,wrap,chrp)
|
||||
|
||||
$(obj)/zImage.initrd.chrp: vmlinux $(wrapperbits)
|
||||
$(call cmd,wrap_initrd,chrp)
|
||||
|
||||
$(obj)/zImage.pseries: vmlinux $(wrapperbits)
|
||||
$(call cmd,wrap,pseries)
|
||||
|
||||
$(obj)/zImage.initrd.pseries: vmlinux $(wrapperbits)
|
||||
$(call cmd,wrap_initrd,pseries)
|
||||
|
||||
$(obj)/zImage.pmac: vmlinux $(wrapperbits)
|
||||
$(call cmd,wrap,pmac)
|
||||
|
||||
$(obj)/zImage.initrd.pmac: vmlinux $(wrapperbits)
|
||||
$(call cmd,wrap_initrd,pmac)
|
||||
|
||||
$(obj)/zImage.coff: vmlinux $(wrapperbits)
|
||||
$(call cmd,wrap,pmaccoff)
|
||||
|
||||
$(obj)/zImage.initrd.coff: vmlinux $(wrapperbits)
|
||||
$(call cmd,wrap_initrd,pmaccoff)
|
||||
|
||||
$(obj)/zImage.miboot: vmlinux $(wrapperbits)
|
||||
$(call cmd,wrap,miboot)
|
||||
|
||||
$(obj)/zImage.initrd.miboot: vmlinux $(wrapperbits)
|
||||
$(call cmd,wrap_initrd,miboot)
|
||||
|
||||
$(obj)/zImage.ps3: vmlinux
|
||||
$(STRIP) -s -R .comment $< -o $@
|
||||
|
||||
$(obj)/zImage.initrd.ps3: vmlinux
|
||||
@echo " WARNING zImage.initrd.ps3 not supported (yet)"
|
||||
|
||||
$(obj)/uImage: vmlinux $(wrapperbits)
|
||||
$(call cmd,wrap,uboot)
|
||||
cmd_wrap =$(CONFIG_SHELL) $(wrapper) -c -o $@ -p $2 $(CROSSWRAP) \
|
||||
$(if $3, -s $3)$(if $4, -d $4)$(if $5, -i $5) vmlinux
|
||||
|
||||
image-$(CONFIG_PPC_PSERIES) += zImage.pseries
|
||||
image-$(CONFIG_PPC_MAPLE) += zImage.pseries
|
||||
@@ -166,7 +129,7 @@ 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
|
||||
image-$(CONFIG_DEFAULT_UIMAGE) += uImage cuImage
|
||||
|
||||
# For 32-bit powermacs, build the COFF and miboot images
|
||||
# as well as the ELF images.
|
||||
@@ -174,16 +137,55 @@ ifeq ($(CONFIG_PPC32),y)
|
||||
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 := $(filter-out $(image-y), $(initrd-y))
|
||||
targets += $(image-y) $(initrd-y)
|
||||
|
||||
$(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz
|
||||
|
||||
# Don't put the ramdisk on the pattern rule; when its missing make will try
|
||||
# the pattern rule with less dependencies that also matches (even with the
|
||||
# hard dependency listed).
|
||||
$(obj)/zImage.initrd.%: vmlinux $(wrapperbits)
|
||||
$(call if_changed,wrap,$*,,,$(obj)/ramdisk.image.gz)
|
||||
|
||||
$(obj)/zImage.%: vmlinux $(wrapperbits)
|
||||
$(call if_changed,wrap,$*)
|
||||
|
||||
$(obj)/zImage.ps3: vmlinux
|
||||
$(STRIP) -s -R .comment $< -o $@
|
||||
|
||||
$(obj)/zImage.initrd.ps3: vmlinux
|
||||
@echo " WARNING zImage.initrd.ps3 not supported (yet)"
|
||||
|
||||
$(obj)/uImage: vmlinux $(wrapperbits)
|
||||
$(call if_changed,wrap,uboot)
|
||||
|
||||
cuboot-plat-$(CONFIG_83xx) += 83xx
|
||||
cuboot-plat-$(CONFIG_85xx) += 85xx
|
||||
cuboot-plat-y += unknown-platform
|
||||
|
||||
dts = $(if $(shell echo $(CONFIG_DEVICE_TREE) | grep '^/'),\
|
||||
,$(srctree)/$(src)/dts/)$(CONFIG_DEVICE_TREE)
|
||||
|
||||
$(obj)/cuImage: vmlinux $(wrapperbits)
|
||||
$(call if_changed,wrap,cuboot-$(word 1,$(cuboot-plat-y)),$(dts))
|
||||
|
||||
$(obj)/zImage: $(addprefix $(obj)/, $(image-y))
|
||||
@rm -f $@; ln $< $@
|
||||
$(obj)/zImage.initrd: $(addprefix $(obj)/, $(initrd-y))
|
||||
@rm -f $@; ln $< $@
|
||||
|
||||
install: $(CONFIGURE) $(image-y)
|
||||
install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y))
|
||||
sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $<
|
||||
|
||||
clean-files += $(addprefix $(objtree)/, $(obj-boot) vmlinux.strip.gz)
|
||||
clean-files += $(addprefix $(objtree)/, $(obj-boot) vmlinux.bin.gz)
|
||||
clean-files += $(image-)
|
||||
# anything not in $(targets)
|
||||
clean-files += $(image-) $(initrd-) zImage zImage.initrd \
|
||||
cuImage.elf cuImage.bin.gz
|
||||
|
||||
# clean up files cached by wrapper
|
||||
clean-kernel := vmlinux.strip vmlinux.bin
|
||||
clean-kernel += $(addsuffix .gz,$(clean-kernel))
|
||||
# If not absolute clean-files are relative to $(obj).
|
||||
clean-files += $(addprefix $(objtree)/, $(clean-kernel))
|
||||
|
||||
@@ -16,8 +16,11 @@
|
||||
_zimage_start_opd:
|
||||
.long _zimage_start, 0, 0, 0
|
||||
|
||||
.weak _zimage_start
|
||||
.globl _zimage_start
|
||||
_zimage_start:
|
||||
.globl _zimage_start_lib
|
||||
_zimage_start_lib:
|
||||
/* Work out the offset between the address we were linked at
|
||||
and the address where we're running. */
|
||||
bl 1f
|
||||
@@ -44,7 +47,7 @@ _zimage_start:
|
||||
addi r9,r9,4
|
||||
bdnz 2b
|
||||
|
||||
/* Do a cache flush for our text, in case OF didn't */
|
||||
/* Do a cache flush for our text, in case the loader didn't */
|
||||
3: lis r9,_start@ha
|
||||
addi r9,r9,_start@l
|
||||
add r9,r0,r9
|
||||
@@ -59,6 +62,34 @@ _zimage_start:
|
||||
sync
|
||||
isync
|
||||
|
||||
mr r6,r1
|
||||
b start
|
||||
/* Clear the BSS */
|
||||
lis r9,__bss_start@ha
|
||||
addi r9,r9,__bss_start@l
|
||||
add r9,r0,r9
|
||||
lis r8,_end@ha
|
||||
addi r8,r8,_end@l
|
||||
add r8,r0,r8
|
||||
li r10,0
|
||||
5: stw r10,0(r9)
|
||||
addi r9,r9,4
|
||||
cmplw cr0,r9,r8
|
||||
blt 5b
|
||||
|
||||
/* Possibly set up a custom stack */
|
||||
.weak _platform_stack_top
|
||||
lis r8,_platform_stack_top@ha
|
||||
addi r8,r8,_platform_stack_top@l
|
||||
cmpwi r8,0
|
||||
beq 6f
|
||||
add r8,r0,r8
|
||||
lwz r1,0(r8)
|
||||
add r1,r0,r1
|
||||
li r0,0
|
||||
stwu r0,-16(r1) /* establish a stack frame */
|
||||
6:
|
||||
|
||||
/* Call platform_init() */
|
||||
bl platform_init
|
||||
|
||||
/* Call start */
|
||||
b start
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Old U-boot compatibility for 83xx
|
||||
*
|
||||
* Author: Scott Wood <scottwood@freescale.com>
|
||||
*
|
||||
* 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"
|
||||
|
||||
#define TARGET_83xx
|
||||
#include "ppcboot.h"
|
||||
|
||||
static bd_t bd;
|
||||
extern char _end[];
|
||||
extern char _dtb_start[], _dtb_end[];
|
||||
|
||||
static void platform_fixups(void)
|
||||
{
|
||||
void *soc;
|
||||
|
||||
dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
|
||||
dt_fixup_mac_addresses(bd.bi_enetaddr, bd.bi_enet1addr);
|
||||
dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 4, bd.bi_busfreq);
|
||||
|
||||
/* Unfortunately, the specific model number is encoded in the
|
||||
* soc node name in existing dts files -- once that is fixed,
|
||||
* this can do a simple path lookup.
|
||||
*/
|
||||
soc = find_node_by_devtype(NULL, "soc");
|
||||
if (soc) {
|
||||
void *serial = NULL;
|
||||
|
||||
setprop(soc, "bus-frequency", &bd.bi_busfreq,
|
||||
sizeof(bd.bi_busfreq));
|
||||
|
||||
while ((serial = find_node_by_devtype(serial, "serial"))) {
|
||||
if (get_parent(serial) != soc)
|
||||
continue;
|
||||
|
||||
setprop(serial, "clock-frequency", &bd.bi_busfreq,
|
||||
sizeof(bd.bi_busfreq));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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 - 1024*1024, 32, 64);
|
||||
ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
|
||||
serial_console_init();
|
||||
platform_ops.fixups = platform_fixups;
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Old U-boot compatibility for 85xx
|
||||
*
|
||||
* Author: Scott Wood <scottwood@freescale.com>
|
||||
*
|
||||
* 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"
|
||||
|
||||
#define TARGET_85xx
|
||||
#include "ppcboot.h"
|
||||
|
||||
static bd_t bd;
|
||||
extern char _end[];
|
||||
extern char _dtb_start[], _dtb_end[];
|
||||
|
||||
static void platform_fixups(void)
|
||||
{
|
||||
void *soc;
|
||||
|
||||
dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
|
||||
dt_fixup_mac_addresses(bd.bi_enetaddr, bd.bi_enet1addr,
|
||||
bd.bi_enet2addr);
|
||||
dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 8, bd.bi_busfreq);
|
||||
|
||||
/* Unfortunately, the specific model number is encoded in the
|
||||
* soc node name in existing dts files -- once that is fixed,
|
||||
* this can do a simple path lookup.
|
||||
*/
|
||||
soc = find_node_by_devtype(NULL, "soc");
|
||||
if (soc) {
|
||||
void *serial = NULL;
|
||||
|
||||
setprop(soc, "bus-frequency", &bd.bi_busfreq,
|
||||
sizeof(bd.bi_busfreq));
|
||||
|
||||
while ((serial = find_node_by_devtype(serial, "serial"))) {
|
||||
if (get_parent(serial) != soc)
|
||||
continue;
|
||||
|
||||
setprop(serial, "clock-frequency", &bd.bi_busfreq,
|
||||
sizeof(bd.bi_busfreq));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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 - 1024*1024, 32, 64);
|
||||
ft_init(_dtb_start, _dtb_end - _dtb_start, 32);
|
||||
serial_console_init();
|
||||
platform_ops.fixups = platform_fixups;
|
||||
}
|
||||
@@ -0,0 +1,307 @@
|
||||
/*
|
||||
* devtree.c - convenience functions for device tree manipulation
|
||||
* Copyright 2007 David Gibson, IBM Corporation.
|
||||
* Copyright (c) 2007 Freescale Semiconductor, Inc.
|
||||
*
|
||||
* Authors: David Gibson <david@gibson.dropbear.id.au>
|
||||
* Scott Wood <scottwood@freescale.com>
|
||||
*
|
||||
* 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 <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include "types.h"
|
||||
#include "string.h"
|
||||
#include "stdio.h"
|
||||
#include "ops.h"
|
||||
|
||||
void dt_fixup_memory(u64 start, u64 size)
|
||||
{
|
||||
void *root, *memory;
|
||||
int naddr, nsize, i;
|
||||
u32 memreg[4];
|
||||
|
||||
root = finddevice("/");
|
||||
if (getprop(root, "#address-cells", &naddr, sizeof(naddr)) < 0)
|
||||
naddr = 2;
|
||||
if (naddr < 1 || naddr > 2)
|
||||
fatal("Can't cope with #address-cells == %d in /\n\r", naddr);
|
||||
|
||||
if (getprop(root, "#size-cells", &nsize, sizeof(nsize)) < 0)
|
||||
nsize = 1;
|
||||
if (nsize < 1 || nsize > 2)
|
||||
fatal("Can't cope with #size-cells == %d in /\n\r", nsize);
|
||||
|
||||
i = 0;
|
||||
if (naddr == 2)
|
||||
memreg[i++] = start >> 32;
|
||||
memreg[i++] = start & 0xffffffff;
|
||||
if (nsize == 2)
|
||||
memreg[i++] = size >> 32;
|
||||
memreg[i++] = size & 0xffffffff;
|
||||
|
||||
memory = finddevice("/memory");
|
||||
if (! memory) {
|
||||
memory = create_node(NULL, "memory");
|
||||
setprop_str(memory, "device_type", "memory");
|
||||
}
|
||||
|
||||
printf("Memory <- <0x%x", memreg[0]);
|
||||
for (i = 1; i < (naddr + nsize); i++)
|
||||
printf(" 0x%x", memreg[i]);
|
||||
printf("> (%ldMB)\n\r", (unsigned long)(size >> 20));
|
||||
|
||||
setprop(memory, "reg", memreg, (naddr + nsize)*sizeof(u32));
|
||||
}
|
||||
|
||||
#define MHZ(x) ((x + 500000) / 1000000)
|
||||
|
||||
void dt_fixup_cpu_clocks(u32 cpu, u32 tb, u32 bus)
|
||||
{
|
||||
void *devp = NULL;
|
||||
|
||||
printf("CPU clock-frequency <- 0x%x (%dMHz)\n\r", cpu, MHZ(cpu));
|
||||
printf("CPU timebase-frequency <- 0x%x (%dMHz)\n\r", tb, MHZ(tb));
|
||||
if (bus > 0)
|
||||
printf("CPU bus-frequency <- 0x%x (%dMHz)\n\r", bus, MHZ(bus));
|
||||
|
||||
while ((devp = find_node_by_devtype(devp, "cpu"))) {
|
||||
setprop_val(devp, "clock-frequency", cpu);
|
||||
setprop_val(devp, "timebase-frequency", tb);
|
||||
if (bus > 0)
|
||||
setprop_val(devp, "bus-frequency", bus);
|
||||
}
|
||||
}
|
||||
|
||||
void dt_fixup_clock(const char *path, u32 freq)
|
||||
{
|
||||
void *devp = finddevice(path);
|
||||
|
||||
if (devp) {
|
||||
printf("%s: clock-frequency <- %x (%dMHz)\n\r", path, freq, MHZ(freq));
|
||||
setprop_val(devp, "clock-frequency", freq);
|
||||
}
|
||||
}
|
||||
|
||||
void __dt_fixup_mac_addresses(u32 startindex, ...)
|
||||
{
|
||||
va_list ap;
|
||||
u32 index = startindex;
|
||||
void *devp;
|
||||
const u8 *addr;
|
||||
|
||||
va_start(ap, startindex);
|
||||
while ((addr = va_arg(ap, const u8 *))) {
|
||||
devp = find_node_by_prop_value(NULL, "linux,network-index",
|
||||
(void*)&index, sizeof(index));
|
||||
|
||||
printf("ENET%d: local-mac-address <-"
|
||||
" %02x:%02x:%02x:%02x:%02x:%02x\n\r", index,
|
||||
addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
|
||||
|
||||
if (devp)
|
||||
setprop(devp, "local-mac-address", addr, 6);
|
||||
|
||||
index++;
|
||||
}
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
#define MAX_ADDR_CELLS 4
|
||||
#define MAX_RANGES 8
|
||||
|
||||
static void get_reg_format(void *node, u32 *naddr, u32 *nsize)
|
||||
{
|
||||
if (getprop(node, "#address-cells", naddr, 4) != 4)
|
||||
*naddr = 2;
|
||||
if (getprop(node, "#size-cells", nsize, 4) != 4)
|
||||
*nsize = 1;
|
||||
}
|
||||
|
||||
static void copy_val(u32 *dest, u32 *src, int naddr)
|
||||
{
|
||||
int pad = MAX_ADDR_CELLS - naddr;
|
||||
|
||||
memset(dest, 0, pad * 4);
|
||||
memcpy(dest + pad, src, naddr * 4);
|
||||
}
|
||||
|
||||
static int sub_reg(u32 *reg, u32 *sub)
|
||||
{
|
||||
int i, borrow = 0;
|
||||
|
||||
for (i = MAX_ADDR_CELLS - 1; i >= 0; i--) {
|
||||
int prev_borrow = borrow;
|
||||
borrow = reg[i] < sub[i] + prev_borrow;
|
||||
reg[i] -= sub[i] + prev_borrow;
|
||||
}
|
||||
|
||||
return !borrow;
|
||||
}
|
||||
|
||||
static int add_reg(u32 *reg, u32 *add, int naddr)
|
||||
{
|
||||
int i, carry = 0;
|
||||
|
||||
for (i = MAX_ADDR_CELLS - 1; i >= MAX_ADDR_CELLS - naddr; i--) {
|
||||
u64 tmp = (u64)reg[i] + add[i] + carry;
|
||||
carry = tmp >> 32;
|
||||
reg[i] = (u32)tmp;
|
||||
}
|
||||
|
||||
return !carry;
|
||||
}
|
||||
|
||||
/* It is assumed that if the first byte of reg fits in a
|
||||
* range, then the whole reg block fits.
|
||||
*/
|
||||
static int compare_reg(u32 *reg, u32 *range, u32 *rangesize)
|
||||
{
|
||||
int i;
|
||||
u32 end;
|
||||
|
||||
for (i = 0; i < MAX_ADDR_CELLS; i++) {
|
||||
if (reg[i] < range[i])
|
||||
return 0;
|
||||
if (reg[i] > range[i])
|
||||
break;
|
||||
}
|
||||
|
||||
for (i = 0; i < MAX_ADDR_CELLS; i++) {
|
||||
end = range[i] + rangesize[i];
|
||||
|
||||
if (reg[i] < end)
|
||||
break;
|
||||
if (reg[i] > end)
|
||||
return 0;
|
||||
}
|
||||
|
||||
return reg[i] != end;
|
||||
}
|
||||
|
||||
/* reg must be MAX_ADDR_CELLS */
|
||||
static int find_range(u32 *reg, u32 *ranges, int nregaddr,
|
||||
int naddr, int nsize, int buflen)
|
||||
{
|
||||
int nrange = nregaddr + naddr + nsize;
|
||||
int i;
|
||||
|
||||
for (i = 0; i + nrange <= buflen; i += nrange) {
|
||||
u32 range_addr[MAX_ADDR_CELLS];
|
||||
u32 range_size[MAX_ADDR_CELLS];
|
||||
|
||||
copy_val(range_addr, ranges + i, naddr);
|
||||
copy_val(range_size, ranges + i + nregaddr + naddr, nsize);
|
||||
|
||||
if (compare_reg(reg, range_addr, range_size))
|
||||
return i;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Currently only generic buses without special encodings are supported.
|
||||
* In particular, PCI is not supported. Also, only the beginning of the
|
||||
* reg block is tracked; size is ignored except in ranges.
|
||||
*/
|
||||
static u32 dt_xlate_buf[MAX_ADDR_CELLS * MAX_RANGES * 3];
|
||||
|
||||
static int dt_xlate(void *node, int res, int reglen, unsigned long *addr,
|
||||
unsigned long *size)
|
||||
{
|
||||
u32 last_addr[MAX_ADDR_CELLS];
|
||||
u32 this_addr[MAX_ADDR_CELLS];
|
||||
void *parent;
|
||||
u64 ret_addr, ret_size;
|
||||
u32 naddr, nsize, prev_naddr;
|
||||
int buflen, offset;
|
||||
|
||||
parent = get_parent(node);
|
||||
if (!parent)
|
||||
return 0;
|
||||
|
||||
get_reg_format(parent, &naddr, &nsize);
|
||||
|
||||
if (nsize > 2)
|
||||
return 0;
|
||||
|
||||
offset = (naddr + nsize) * res;
|
||||
|
||||
if (reglen < offset + naddr + nsize ||
|
||||
sizeof(dt_xlate_buf) < offset + naddr + nsize)
|
||||
return 0;
|
||||
|
||||
copy_val(last_addr, dt_xlate_buf + offset, naddr);
|
||||
|
||||
ret_size = dt_xlate_buf[offset + naddr];
|
||||
if (nsize == 2) {
|
||||
ret_size <<= 32;
|
||||
ret_size |= dt_xlate_buf[offset + naddr + 1];
|
||||
}
|
||||
|
||||
while ((node = get_parent(node))) {
|
||||
prev_naddr = naddr;
|
||||
|
||||
get_reg_format(node, &naddr, &nsize);
|
||||
|
||||
buflen = getprop(node, "ranges", dt_xlate_buf,
|
||||
sizeof(dt_xlate_buf));
|
||||
if (buflen < 0)
|
||||
continue;
|
||||
if (buflen > sizeof(dt_xlate_buf))
|
||||
return 0;
|
||||
|
||||
offset = find_range(last_addr, dt_xlate_buf, prev_naddr,
|
||||
naddr, nsize, buflen / 4);
|
||||
|
||||
if (offset < 0)
|
||||
return 0;
|
||||
|
||||
copy_val(this_addr, dt_xlate_buf + offset, prev_naddr);
|
||||
|
||||
if (!sub_reg(last_addr, this_addr))
|
||||
return 0;
|
||||
|
||||
copy_val(this_addr, dt_xlate_buf + offset + prev_naddr, naddr);
|
||||
|
||||
if (!add_reg(last_addr, this_addr, naddr))
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (naddr > 2)
|
||||
return 0;
|
||||
|
||||
ret_addr = ((u64)last_addr[2] << 32) | last_addr[3];
|
||||
|
||||
if (sizeof(void *) == 4 &&
|
||||
(ret_addr >= 0x100000000ULL || ret_size > 0x100000000ULL ||
|
||||
ret_addr + ret_size > 0x100000000ULL))
|
||||
return 0;
|
||||
|
||||
*addr = ret_addr;
|
||||
if (size)
|
||||
*size = ret_size;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int dt_xlate_reg(void *node, int res, unsigned long *addr, unsigned long *size)
|
||||
{
|
||||
int reglen;
|
||||
|
||||
reglen = getprop(node, "reg", dt_xlate_buf, sizeof(dt_xlate_buf)) / 4;
|
||||
return dt_xlate(node, res, reglen, addr, size);
|
||||
}
|
||||
|
||||
int dt_xlate_addr(void *node, u32 *buf, int buflen, unsigned long *xlated_addr)
|
||||
{
|
||||
|
||||
if (buflen > sizeof(dt_xlate_buf))
|
||||
return 0;
|
||||
|
||||
memcpy(dt_xlate_buf, buf, buflen);
|
||||
return dt_xlate(node, 0, buflen / 4, xlated_addr, NULL);
|
||||
}
|
||||
@@ -29,7 +29,6 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHD.dtb -V 16 kuroboxHD.dts"
|
||||
|
||||
cpus {
|
||||
linux,phandle = <2000>;
|
||||
#cpus = <1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
@@ -126,17 +125,17 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHD.dtb -V 16 kuroboxHD.dts"
|
||||
interrupt-parent = <4400>;
|
||||
interrupt-map-mask = <f800 0 0 7>;
|
||||
interrupt-map = <
|
||||
/* IDSEL 0x11 - IRQ0 ETH */
|
||||
/* IDSEL 11 - IRQ0 ETH */
|
||||
5800 0 0 1 4400 0 1
|
||||
5800 0 0 2 4400 1 1
|
||||
5800 0 0 3 4400 2 1
|
||||
5800 0 0 4 4400 3 1
|
||||
/* IDSEL 0x12 - IRQ1 IDE0 */
|
||||
/* IDSEL 12 - IRQ1 IDE0 */
|
||||
6000 0 0 1 4400 1 1
|
||||
6000 0 0 2 4400 2 1
|
||||
6000 0 0 3 4400 3 1
|
||||
6000 0 0 4 4400 0 1
|
||||
/* IDSEL 0x14 - IRQ3 USB2.0 */
|
||||
/* IDSEL 14 - IRQ3 USB2.0 */
|
||||
7000 0 0 1 4400 3 1
|
||||
7000 0 0 2 4400 3 1
|
||||
7000 0 0 3 4400 3 1
|
||||
|
||||
@@ -29,7 +29,6 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHG.dtb -V 16 kuroboxHG.dts"
|
||||
|
||||
cpus {
|
||||
linux,phandle = <2000>;
|
||||
#cpus = <1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
@@ -126,17 +125,17 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHG.dtb -V 16 kuroboxHG.dts"
|
||||
interrupt-parent = <4400>;
|
||||
interrupt-map-mask = <f800 0 0 7>;
|
||||
interrupt-map = <
|
||||
/* IDSEL 0x11 - IRQ0 ETH */
|
||||
/* IDSEL 11 - IRQ0 ETH */
|
||||
5800 0 0 1 4400 0 1
|
||||
5800 0 0 2 4400 1 1
|
||||
5800 0 0 3 4400 2 1
|
||||
5800 0 0 4 4400 3 1
|
||||
/* IDSEL 0x12 - IRQ1 IDE0 */
|
||||
/* IDSEL 12 - IRQ1 IDE0 */
|
||||
6000 0 0 1 4400 1 1
|
||||
6000 0 0 2 4400 2 1
|
||||
6000 0 0 3 4400 3 1
|
||||
6000 0 0 4 4400 0 1
|
||||
/* IDSEL 0x14 - IRQ3 USB2.0 */
|
||||
/* IDSEL 14 - IRQ3 USB2.0 */
|
||||
7000 0 0 1 4400 3 1
|
||||
7000 0 0 2 4400 3 1
|
||||
7000 0 0 3 4400 3 1
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#size-cells = <1>;
|
||||
|
||||
cpus {
|
||||
#cpus = <1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#size-cells = <1>;
|
||||
|
||||
cpus {
|
||||
#cpus = <1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
linux,phandle = <100>;
|
||||
|
||||
cpus {
|
||||
#cpus = <1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells =<0>;
|
||||
linux,phandle = <200>;
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
linux,phandle = <100>;
|
||||
|
||||
cpus {
|
||||
#cpus = <1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
linux,phandle = <200>;
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#size-cells = <1>;
|
||||
|
||||
cpus {
|
||||
#cpus = <1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#size-cells = <1>;
|
||||
|
||||
cpus {
|
||||
#cpus = <1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
|
||||
@@ -0,0 +1,291 @@
|
||||
/*
|
||||
* MPC832x RDB Device Tree Source
|
||||
*
|
||||
* Copyright 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 as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*/
|
||||
|
||||
/ {
|
||||
model = "MPC8323ERDB";
|
||||
compatible = "MPC8323ERDB", "MPC832xRDB", "MPC83xxRDB";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
cpus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
PowerPC,8323@0 {
|
||||
device_type = "cpu";
|
||||
reg = <0>;
|
||||
d-cache-line-size = <20>; // 32 bytes
|
||||
i-cache-line-size = <20>; // 32 bytes
|
||||
d-cache-size = <4000>; // L1, 16K
|
||||
i-cache-size = <4000>; // L1, 16K
|
||||
timebase-frequency = <0>;
|
||||
bus-frequency = <0>;
|
||||
clock-frequency = <0>;
|
||||
32-bit;
|
||||
};
|
||||
};
|
||||
|
||||
memory {
|
||||
device_type = "memory";
|
||||
reg = <00000000 04000000>;
|
||||
};
|
||||
|
||||
soc8323@e0000000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
#interrupt-cells = <2>;
|
||||
device_type = "soc";
|
||||
ranges = <0 e0000000 00100000>;
|
||||
reg = <e0000000 00000200>;
|
||||
bus-frequency = <0>;
|
||||
|
||||
wdt@200 {
|
||||
device_type = "watchdog";
|
||||
compatible = "mpc83xx_wdt";
|
||||
reg = <200 100>;
|
||||
};
|
||||
|
||||
i2c@3000 {
|
||||
device_type = "i2c";
|
||||
compatible = "fsl-i2c";
|
||||
reg = <3000 100>;
|
||||
interrupts = <e 8>;
|
||||
interrupt-parent = <&pic>;
|
||||
dfsrr;
|
||||
};
|
||||
|
||||
serial@4500 {
|
||||
device_type = "serial";
|
||||
compatible = "ns16550";
|
||||
reg = <4500 100>;
|
||||
clock-frequency = <0>;
|
||||
interrupts = <9 8>;
|
||||
interrupt-parent = <&pic>;
|
||||
};
|
||||
|
||||
serial@4600 {
|
||||
device_type = "serial";
|
||||
compatible = "ns16550";
|
||||
reg = <4600 100>;
|
||||
clock-frequency = <0>;
|
||||
interrupts = <a 8>;
|
||||
interrupt-parent = <&pic>;
|
||||
};
|
||||
|
||||
crypto@30000 {
|
||||
device_type = "crypto";
|
||||
model = "SEC2";
|
||||
compatible = "talitos";
|
||||
reg = <30000 7000>;
|
||||
interrupts = <b 8>;
|
||||
interrupt-parent = <&pic>;
|
||||
/* Rev. 2.2 */
|
||||
num-channels = <1>;
|
||||
channel-fifo-len = <18>;
|
||||
exec-units-mask = <0000004c>;
|
||||
descriptor-types-mask = <0122003f>;
|
||||
};
|
||||
|
||||
pci@8500 {
|
||||
interrupt-map-mask = <f800 0 0 7>;
|
||||
interrupt-map = <
|
||||
/* IDSEL 0x10 AD16 (USB) */
|
||||
8000 0 0 1 &pic 11 8
|
||||
|
||||
/* IDSEL 0x11 AD17 (Mini1)*/
|
||||
8800 0 0 1 &pic 12 8
|
||||
8800 0 0 2 &pic 13 8
|
||||
8800 0 0 3 &pic 14 8
|
||||
8800 0 0 4 &pic 30 8
|
||||
|
||||
/* IDSEL 0x12 AD18 (PCI/Mini2) */
|
||||
9000 0 0 1 &pic 13 8
|
||||
9000 0 0 2 &pic 14 8
|
||||
9000 0 0 3 &pic 30 8
|
||||
9000 0 0 4 &pic 11 8>;
|
||||
|
||||
interrupt-parent = <&pic>;
|
||||
interrupts = <42 8>;
|
||||
bus-range = <0 0>;
|
||||
ranges = <42000000 0 80000000 80000000 0 10000000
|
||||
02000000 0 90000000 90000000 0 10000000
|
||||
01000000 0 d0000000 d0000000 0 04000000>;
|
||||
clock-frequency = <0>;
|
||||
#interrupt-cells = <1>;
|
||||
#size-cells = <2>;
|
||||
#address-cells = <3>;
|
||||
reg = <8500 100>;
|
||||
compatible = "83xx";
|
||||
device_type = "pci";
|
||||
};
|
||||
|
||||
pic:pic@700 {
|
||||
interrupt-controller;
|
||||
#address-cells = <0>;
|
||||
#interrupt-cells = <2>;
|
||||
reg = <700 100>;
|
||||
built-in;
|
||||
device_type = "ipic";
|
||||
};
|
||||
|
||||
par_io@1400 {
|
||||
reg = <1400 100>;
|
||||
device_type = "par_io";
|
||||
num-ports = <7>;
|
||||
|
||||
ucc2pio:ucc_pin@02 {
|
||||
pio-map = <
|
||||
/* port pin dir open_drain assignment has_irq */
|
||||
3 4 3 0 2 0 /* MDIO */
|
||||
3 5 1 0 2 0 /* MDC */
|
||||
3 15 2 0 1 0 /* RX_CLK (CLK16) */
|
||||
3 17 2 0 1 0 /* TX_CLK (CLK3) */
|
||||
0 12 1 0 1 0 /* TxD0 */
|
||||
0 13 1 0 1 0 /* TxD1 */
|
||||
0 14 1 0 1 0 /* TxD2 */
|
||||
0 15 1 0 1 0 /* TxD3 */
|
||||
0 16 2 0 1 0 /* RxD0 */
|
||||
0 17 2 0 1 0 /* RxD1 */
|
||||
0 18 2 0 1 0 /* RxD2 */
|
||||
0 19 2 0 1 0 /* RxD3 */
|
||||
0 1a 2 0 1 0 /* RX_ER */
|
||||
0 1b 1 0 1 0 /* TX_ER */
|
||||
0 1c 2 0 1 0 /* RX_DV */
|
||||
0 1d 2 0 1 0 /* COL */
|
||||
0 1e 1 0 1 0 /* TX_EN */
|
||||
0 1f 2 0 1 0>; /* CRS */
|
||||
};
|
||||
ucc3pio:ucc_pin@03 {
|
||||
pio-map = <
|
||||
/* port pin dir open_drain assignment has_irq */
|
||||
0 d 2 0 1 0 /* RX_CLK (CLK9) */
|
||||
3 18 2 0 1 0 /* TX_CLK (CLK10) */
|
||||
1 0 1 0 1 0 /* TxD0 */
|
||||
1 1 1 0 1 0 /* TxD1 */
|
||||
1 2 1 0 1 0 /* TxD2 */
|
||||
1 3 1 0 1 0 /* TxD3 */
|
||||
1 4 2 0 1 0 /* RxD0 */
|
||||
1 5 2 0 1 0 /* RxD1 */
|
||||
1 6 2 0 1 0 /* RxD2 */
|
||||
1 7 2 0 1 0 /* RxD3 */
|
||||
1 8 2 0 1 0 /* RX_ER */
|
||||
1 9 1 0 1 0 /* TX_ER */
|
||||
1 a 2 0 1 0 /* RX_DV */
|
||||
1 b 2 0 1 0 /* COL */
|
||||
1 c 1 0 1 0 /* TX_EN */
|
||||
1 d 2 0 1 0>; /* CRS */
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
qe@e0100000 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
device_type = "qe";
|
||||
model = "QE";
|
||||
ranges = <0 e0100000 00100000>;
|
||||
reg = <e0100000 480>;
|
||||
brg-frequency = <0>;
|
||||
bus-frequency = <BCD3D80>;
|
||||
|
||||
muram@10000 {
|
||||
device_type = "muram";
|
||||
ranges = <0 00010000 00004000>;
|
||||
|
||||
data-only@0 {
|
||||
reg = <0 4000>;
|
||||
};
|
||||
};
|
||||
|
||||
spi@4c0 {
|
||||
device_type = "spi";
|
||||
compatible = "fsl_spi";
|
||||
reg = <4c0 40>;
|
||||
interrupts = <2>;
|
||||
interrupt-parent = <&qeic>;
|
||||
mode = "cpu";
|
||||
};
|
||||
|
||||
spi@500 {
|
||||
device_type = "spi";
|
||||
compatible = "fsl_spi";
|
||||
reg = <500 40>;
|
||||
interrupts = <1>;
|
||||
interrupt-parent = <&qeic>;
|
||||
mode = "cpu";
|
||||
};
|
||||
|
||||
ucc@3000 {
|
||||
device_type = "network";
|
||||
compatible = "ucc_geth";
|
||||
model = "UCC";
|
||||
device-id = <2>;
|
||||
reg = <3000 200>;
|
||||
interrupts = <21>;
|
||||
interrupt-parent = <&qeic>;
|
||||
mac-address = [ 00 04 9f ef 03 02 ];
|
||||
rx-clock = <20>;
|
||||
tx-clock = <13>;
|
||||
phy-handle = <&phy00>;
|
||||
pio-handle = <&ucc2pio>;
|
||||
};
|
||||
|
||||
ucc@2200 {
|
||||
device_type = "network";
|
||||
compatible = "ucc_geth";
|
||||
model = "UCC";
|
||||
device-id = <3>;
|
||||
reg = <2200 200>;
|
||||
interrupts = <22>;
|
||||
interrupt-parent = <&qeic>;
|
||||
mac-address = [ 00 04 9f ef 03 01 ];
|
||||
rx-clock = <19>;
|
||||
tx-clock = <1a>;
|
||||
phy-handle = <&phy04>;
|
||||
pio-handle = <&ucc3pio>;
|
||||
};
|
||||
|
||||
mdio@3120 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <3120 18>;
|
||||
device_type = "mdio";
|
||||
compatible = "ucc_geth_phy";
|
||||
|
||||
phy00:ethernet-phy@00 {
|
||||
interrupt-parent = <&pic>;
|
||||
interrupts = <0>;
|
||||
reg = <0>;
|
||||
device_type = "ethernet-phy";
|
||||
interface = <3>; //ENET_100_MII
|
||||
};
|
||||
phy04:ethernet-phy@04 {
|
||||
interrupt-parent = <&pic>;
|
||||
interrupts = <0>;
|
||||
reg = <4>;
|
||||
device_type = "ethernet-phy";
|
||||
interface = <3>;
|
||||
};
|
||||
};
|
||||
|
||||
qeic:qeic@80 {
|
||||
interrupt-controller;
|
||||
device_type = "qeic";
|
||||
#address-cells = <0>;
|
||||
#interrupt-cells = <1>;
|
||||
reg = <80 80>;
|
||||
built-in;
|
||||
big-endian;
|
||||
interrupts = <20 8 21 8>; //high:32 low:33
|
||||
interrupt-parent = <&pic>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -15,7 +15,6 @@
|
||||
#size-cells = <1>;
|
||||
|
||||
cpus {
|
||||
#cpus = <1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user