From c59b60fa0b3bc9527a38a37d6b04f821a2e1a9ec Mon Sep 17 00:00:00 2001 From: Gabor Juhos Date: Sun, 29 Apr 2012 15:55:28 +0000 Subject: [PATCH] mpc85xx: add support for 3.3 Based on a patch by Wojciech Dubowik SVN-Revision: 31529 --- target/linux/mpc85xx/config-3.3 | 247 ++++++++++++++++++ .../patches-3.3/100-fix_mpc8568e_mds.patch | 32 +++ .../patches-3.3/110-fix_mpc8548_cds.patch | 40 +++ .../120-mpc8548_cds_i8259_noirq_init.patch | 23 ++ .../130-mpc8548_cds_disable_i8259_irq.patch | 13 + 5 files changed, 355 insertions(+) create mode 100644 target/linux/mpc85xx/config-3.3 create mode 100644 target/linux/mpc85xx/patches-3.3/100-fix_mpc8568e_mds.patch create mode 100644 target/linux/mpc85xx/patches-3.3/110-fix_mpc8548_cds.patch create mode 100644 target/linux/mpc85xx/patches-3.3/120-mpc8548_cds_i8259_noirq_init.patch create mode 100644 target/linux/mpc85xx/patches-3.3/130-mpc8548_cds_disable_i8259_irq.patch diff --git a/target/linux/mpc85xx/config-3.3 b/target/linux/mpc85xx/config-3.3 new file mode 100644 index 0000000000..56aefb5c0f --- /dev/null +++ b/target/linux/mpc85xx/config-3.3 @@ -0,0 +1,247 @@ +# CONFIG_40x is not set +# CONFIG_44x is not set +# CONFIG_ADVANCED_OPTIONS is not set +# CONFIG_ARCH_DMA_ADDR_T_64BIT is not set +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y +CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y +CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y +CONFIG_ARCH_HAS_ILOG2_U32=y +CONFIG_ARCH_HAS_WALK_MEMORY=y +CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y +CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_ARCH_MAY_HAVE_PC_FDC=y +# CONFIG_ARCH_NO_VIRT_TO_BUS is not set +# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set +CONFIG_ARCH_REQUIRE_GPIOLIB=y +CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y +CONFIG_ARCH_SUPPORTS_MSI=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y +CONFIG_AUDIT_ARCH=y +CONFIG_BCMA_POSSIBLE=y +CONFIG_BOOKE=y +CONFIG_BOUNCE=y +CONFIG_CMDLINE="console=ttyS0,115200" +CONFIG_CMDLINE_BOOL=y +# CONFIG_CPM2 is not set +CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_DECOMPRESS_LZMA=y +CONFIG_DEFAULT_UIMAGE=y +CONFIG_DEVKMEM=y +CONFIG_DNOTIFY=y +CONFIG_DTC=y +# CONFIG_E200 is not set +CONFIG_E500=y +CONFIG_EARLY_PRINTK=y +CONFIG_ELF_CORE=y +CONFIG_ENABLE_MUST_CHECK=y +# CONFIG_EPAPR_BOOT is not set +CONFIG_FSL_BOOKE=y +CONFIG_FSL_EMB_PERFMON=y +CONFIG_FSL_LBC=y +CONFIG_FSL_PCI=y +CONFIG_FSL_PQ_MDIO=y +CONFIG_FSL_SOC=y +CONFIG_FSL_SOC_BOOKE=y +# CONFIG_FSL_ULI1575 is not set +CONFIG_GENERIC_ATOMIC64=y +CONFIG_GENERIC_BUG=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_GENERIC_CMOS_UPDATE=y +# CONFIG_GENERIC_CPU_DEVICES is not set +CONFIG_GENERIC_GPIO=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_GENERIC_IRQ_SHOW_LEVEL=y +CONFIG_GENERIC_ISA_DMA=y +CONFIG_GENERIC_NVRAM=y +CONFIG_GENERIC_PCI_IOMAP=y +# CONFIG_GENERIC_TBSYNC is not set +CONFIG_GENERIC_TIME_VSYSCALL=y +CONFIG_GEN_RTC=y +# CONFIG_GEN_RTC_X is not set +CONFIG_GIANFAR=y +CONFIG_GPIOLIB=y +CONFIG_GPIO_MPC8XXX=y +# CONFIG_HAMRADIO is not set +CONFIG_HAS_DMA=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_RAPIDIO=y +CONFIG_HAVE_ARCH_JUMP_LABEL=y +CONFIG_HAVE_ARCH_KGDB=y +CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_DMA_API_DEBUG=y +CONFIG_HAVE_DMA_ATTRS=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_FUNCTION_TRACER=y +# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set +CONFIG_HAVE_GENERIC_HARDIRQS=y +CONFIG_HAVE_IDE=y +CONFIG_HAVE_IOREMAP_PROT=y +CONFIG_HAVE_IRQ_WORK=y +CONFIG_HAVE_LATENCYTOP_SUPPORT=y +CONFIG_HAVE_MEMBLOCK=y +CONFIG_HAVE_MEMBLOCK_NODE_MAP=y +CONFIG_HAVE_OPROFILE=y +CONFIG_HAVE_PERF_EVENTS=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set +CONFIG_HAVE_SPARSE_IRQ=y +CONFIG_HAVE_SYSCALL_TRACEPOINTS=y +CONFIG_HZ=250 +# CONFIG_HZ_100 is not set +CONFIG_HZ_250=y +CONFIG_INET_DIAG=y +CONFIG_INET_TCP_DIAG=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_IOMMU_HELPER=y +# CONFIG_IPIC is not set +CONFIG_IRQ_FORCED_THREADING=y +CONFIG_ISA_DMA_API=y +CONFIG_KERNEL_START=0xc0000000 +# CONFIG_KSI8560 is not set +# CONFIG_LEDS_GPIO is not set +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 +CONFIG_LOWMEM_CAM_NUM=3 +CONFIG_LOWMEM_SIZE=0x30000000 +CONFIG_LXT_PHY=y +# CONFIG_MATH_EMULATION is not set +CONFIG_MAX_ACTIVE_REGIONS=32 +CONFIG_MDIO_BOARDINFO=y +CONFIG_MIGRATION=y +# CONFIG_MII is not set +# CONFIG_MLX4_CORE is not set +# CONFIG_MMIO_NVRAM is not set +# CONFIG_MPC8536_DS is not set +# CONFIG_MPC8540_ADS is not set +# CONFIG_MPC8560_ADS is not set +CONFIG_MPC85xx_CDS=y +# CONFIG_MPC85xx_DS is not set +CONFIG_MPC85xx_MDS=y +# CONFIG_MPC85xx_RDB is not set +CONFIG_MPIC=y +# CONFIG_MPIC_U3_HT_IRQS is not set +# CONFIG_MPIC_WEIRD is not set +# CONFIG_MTD is not set +# CONFIG_NEED_DMA_MAP_STATE is not set +# CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK is not set +CONFIG_NEED_PER_CPU_KM=y +CONFIG_NEED_SG_DMA_LENGTH=y +# CONFIG_NONSTATIC_KERNEL is not set +CONFIG_NR_IRQS=512 +CONFIG_OF=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_DEVICE=y +CONFIG_OF_DYNAMIC=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_FLATTREE=y +CONFIG_OF_GPIO=y +CONFIG_OF_IRQ=y +CONFIG_OF_MDIO=y +CONFIG_OF_NET=y +CONFIG_OF_PCI=y +CONFIG_OF_PCI_IRQ=y +# CONFIG_P1010_RDB is not set +# CONFIG_P1022_DS is not set +# CONFIG_P1023_RDS is not set +# CONFIG_P2041_RDB is not set +# CONFIG_P3041_DS is not set +# CONFIG_P3060_QDS is not set +# CONFIG_P4080_DS is not set +# CONFIG_P5020_DS is not set +CONFIG_PAGEFLAGS_EXTENDED=y +CONFIG_PAGE_OFFSET=0xc0000000 +CONFIG_PCI=y +CONFIG_PCIEAER=y +CONFIG_PCIEASPM=y +# CONFIG_PCIEASPM_DEBUG is not set +CONFIG_PCIEPORTBUS=y +CONFIG_PCI_DOMAINS=y +CONFIG_PHYLIB=y +CONFIG_PHYSICAL_ALIGN=0x04000000 +CONFIG_PHYSICAL_START=0x00000000 +# CONFIG_PHYS_64BIT is not set +CONFIG_PPC=y +CONFIG_PPC32=y +# CONFIG_PPC64 is not set +CONFIG_PPC_85xx=y +# CONFIG_PPC_8xx is not set +# CONFIG_PPC_970_NAP is not set +CONFIG_PPC_ADV_DEBUG_DACS=2 +CONFIG_PPC_ADV_DEBUG_DVCS=0 +CONFIG_PPC_ADV_DEBUG_IACS=2 +CONFIG_PPC_ADV_DEBUG_REGS=y +CONFIG_PPC_BOOK3E_MMU=y +# CONFIG_PPC_BOOK3S_32 is not set +# CONFIG_PPC_CELL is not set +# CONFIG_PPC_CELL_NATIVE is not set +# CONFIG_PPC_CLOCK is not set +# CONFIG_PPC_DCR_MMIO is not set +# CONFIG_PPC_DCR_NATIVE is not set +# CONFIG_PPC_E500MC is not set +# CONFIG_PPC_EARLY_DEBUG is not set +# CONFIG_PPC_EPAPR_HV_PIC is not set +CONFIG_PPC_FSL_BOOK3E=y +CONFIG_PPC_I8259=y +# CONFIG_PPC_ICP_HV is not set +# CONFIG_PPC_ICP_NATIVE is not set +# CONFIG_PPC_ICS_RTAS is not set +CONFIG_PPC_INDIRECT_PCI=y +CONFIG_PPC_LIB_RHEAP=y +CONFIG_PPC_MMU_NOHASH=y +# CONFIG_PPC_MM_SLICES is not set +# CONFIG_PPC_MPC106 is not set +CONFIG_PPC_OF=y +# CONFIG_PPC_P7_NAP is not set +CONFIG_PPC_PCI_CHOICE=y +# CONFIG_PPC_RTAS is not set +CONFIG_PPC_SMP_MUXED_IPI=y +CONFIG_PPC_UDBG_16550=y +CONFIG_PPC_WERROR=y +# CONFIG_PPC_WSP is not set +# CONFIG_PPC_XICS is not set +# CONFIG_PQ2ADS is not set +# CONFIG_PREEMPT_RCU is not set +CONFIG_PROC_DEVICETREE=y +CONFIG_PROC_PAGE_MONITOR=y +CONFIG_QE_GPIO=y +CONFIG_QUICC_ENGINE=y +# CONFIG_QUOTACTL is not set +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +# CONFIG_SBC8548 is not set +CONFIG_SBC8560=y +CONFIG_SCHED_HRTICK=y +# CONFIG_SCSI_DMA is not set +CONFIG_SERIAL_8250_FSL=y +CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_OF_PLATFORM=y +# CONFIG_SERIAL_QE is not set +CONFIG_SIMPLE_GPIO=y +# CONFIG_SLAB is not set +CONFIG_SLUB=y +# CONFIG_SOCRATES is not set +CONFIG_SPE=y +# CONFIG_SQUASHFS is not set +# CONFIG_STRIP_ASM_SYMS is not set +# CONFIG_STX_GP3 is not set +CONFIG_SWIOTLB=y +CONFIG_TASK_SIZE=0xc0000000 +# CONFIG_TQM8540 is not set +# CONFIG_TQM8541 is not set +# CONFIG_TQM8548 is not set +# CONFIG_TQM8555 is not set +# CONFIG_TQM8560 is not set +CONFIG_UCC=y +CONFIG_UCC_FAST=y +CONFIG_UCC_GETH=y +# CONFIG_UGETH_TX_ON_DEMAND is not set +CONFIG_USB_ARCH_HAS_XHCI=y +CONFIG_USB_SUPPORT=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_WORD_SIZE=32 +# CONFIG_XES_MPC85xx is not set diff --git a/target/linux/mpc85xx/patches-3.3/100-fix_mpc8568e_mds.patch b/target/linux/mpc85xx/patches-3.3/100-fix_mpc8568e_mds.patch new file mode 100644 index 0000000000..ba706f6a6b --- /dev/null +++ b/target/linux/mpc85xx/patches-3.3/100-fix_mpc8568e_mds.patch @@ -0,0 +1,32 @@ +--- a/arch/powerpc/boot/dts/mpc8568mds.dts ++++ b/arch/powerpc/boot/dts/mpc8568mds.dts +@@ -317,6 +317,9 @@ + gpios = <&bcsr5 3 0>; + }; + }; ++ chosen { ++ linux,stdout-path = "/soc8568@e0000000/serial@4500"; ++ }; + }; + + /include/ "fsl/mpc8568si-post.dtsi" +--- a/arch/powerpc/boot/dts/fsl/mpc8568si-post.dtsi ++++ b/arch/powerpc/boot/dts/fsl/mpc8568si-post.dtsi +@@ -134,17 +134,8 @@ + + }; + +- duart-sleep-nexus { +- #address-cells = <1>; +- #size-cells = <1>; +- compatible = "simple-bus"; +- sleep = <&pmc 0x00000002>; +- ranges; +- + /include/ "pq3-duart-0.dtsi" + +- }; +- + L2: l2-cache-controller@20000 { + compatible = "fsl,mpc8568-l2-cache-controller"; + reg = <0x20000 0x1000>; diff --git a/target/linux/mpc85xx/patches-3.3/110-fix_mpc8548_cds.patch b/target/linux/mpc85xx/patches-3.3/110-fix_mpc8548_cds.patch new file mode 100644 index 0000000000..291a843ed6 --- /dev/null +++ b/target/linux/mpc85xx/patches-3.3/110-fix_mpc8548_cds.patch @@ -0,0 +1,40 @@ +--- a/arch/powerpc/boot/dts/mpc8548cds.dts ++++ b/arch/powerpc/boot/dts/mpc8548cds.dts +@@ -301,6 +301,9 @@ + 0x0 0x100000>; + }; + }; ++ chosen { ++ linux,stdout-path = "/soc8548@e0000000/serial@4600"; ++ }; + }; + + /include/ "fsl/mpc8548si-post.dtsi" +--- a/arch/powerpc/boot/dts/fsl/mpc8548si-post.dtsi ++++ b/arch/powerpc/boot/dts/fsl/mpc8548si-post.dtsi +@@ -116,7 +116,24 @@ + + /include/ "pq3-i2c-0.dtsi" + /include/ "pq3-i2c-1.dtsi" +-/include/ "pq3-duart-0.dtsi" ++ ++ serial0: serial@4600 { ++ cell-index = <1>; ++ device_type = "serial"; ++ compatible = "fsl,ns16550", "ns16550"; ++ reg = <0x4600 0x100>; ++ clock-frequency = <0>; ++ interrupts = <42 2 0 0>; ++ }; ++ ++ serial1: serial@4500 { ++ cell-index = <0>; ++ device_type = "serial"; ++ compatible = "fsl,ns16550", "ns16550"; ++ reg = <0x4500 0x100>; ++ clock-frequency = <0>; ++ interrupts = <42 2 0 0>; ++ }; + + L2: l2-cache-controller@20000 { + compatible = "fsl,mpc8548-l2-cache-controller"; diff --git a/target/linux/mpc85xx/patches-3.3/120-mpc8548_cds_i8259_noirq_init.patch b/target/linux/mpc85xx/patches-3.3/120-mpc8548_cds_i8259_noirq_init.patch new file mode 100644 index 0000000000..79c0e18fe6 --- /dev/null +++ b/target/linux/mpc85xx/patches-3.3/120-mpc8548_cds_i8259_noirq_init.patch @@ -0,0 +1,23 @@ +--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c ++++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c +@@ -215,15 +215,16 @@ static int mpc85xx_cds_8259_attach(void) + return -ENODEV; + } + ++ i8259_init(cascade_node, 0); ++ of_node_put(cascade_node); ++ + cascade_irq = irq_of_parse_and_map(cascade_node, 0); + if (cascade_irq == NO_IRQ) { +- printk(KERN_ERR "Failed to map cascade interrupt\n"); ++ of_node_put(cascade_node); ++ printk(KERN_DEBUG "No interrupt for i8259 PIC\n"); + return -ENXIO; + } + +- i8259_init(cascade_node, 0); +- of_node_put(cascade_node); +- + /* + * Hook the interrupt to make sure desc->action is never NULL. + * This is required to ensure that the interrupt does not get diff --git a/target/linux/mpc85xx/patches-3.3/130-mpc8548_cds_disable_i8259_irq.patch b/target/linux/mpc85xx/patches-3.3/130-mpc8548_cds_disable_i8259_irq.patch new file mode 100644 index 0000000000..07ed66daae --- /dev/null +++ b/target/linux/mpc85xx/patches-3.3/130-mpc8548_cds_disable_i8259_irq.patch @@ -0,0 +1,13 @@ +--- a/arch/powerpc/boot/dts/mpc8548cds.dts ++++ b/arch/powerpc/boot/dts/mpc8548cds.dts +@@ -260,8 +260,10 @@ + #address-cells = <0>; + #interrupt-cells = <2>; + compatible = "chrp,iic"; ++/* + interrupts = <0 1 0 0>; + interrupt-parent = <&mpic>; ++*/ + }; + + rtc@70 { -- 2.30.2