Fix kernel build errors for mpc8272ads and mpc8560ads.
Subsystems (3)
PATCH 1/1 Fix kernel build errors for mpc8272ads and mpc8560ads.
Recent update of asm-powerpc/io.h caused cpm-related stuff to break in the current kernel. Current patch fixes it, and includes other overhaul and improvements (incomplete list is below). Required for proper functioning of the 8xx stuff as well.
- Updated dts with a chosen node with interrupt controller,
- fixed messed device IDs among CPM2 SoC devices,
- corrected odd header name and fixed type in defines,
- Added 82xx subdir to the powerpc/platforms Makefile, new solely-powerpc header for 8260 family (was using one from arch/ppc, this one cleaned up from the extra stuff).
---
arch/powerpc/boot/dts/mpc8272ads.dts | 15 ++++++++++---- arch/powerpc/platforms/82xx/mpc82xx.c | 2 +- arch/powerpc/platforms/82xx/mpc82xx_ads.c | 2 +- arch/powerpc/platforms/82xx/pq2ads.h | 5 +++-- arch/powerpc/platforms/Makefile | 1 + arch/powerpc/sysdev/cpm2_pic.c | 1 + drivers/net/fs_enet/fs_enet.h | 1 + drivers/serial/cpm_uart/cpm_uart_cpm1.h | 3 --- drivers/serial/cpm_uart/cpm_uart_cpm2.h | 3 --- include/asm-powerpc/fs_pd.h | 7 ++++++ include/asm-powerpc/io.h | 6 +++++ include/asm-powerpc/mpc8260.h | 32 +++++++++++++++++++++++++++++ 12 files changed, 64 insertions(+), 14 deletions(-)
arch/powerpc/boot/dts/mpc8272ads.dts +11 -4
@@ -53,6 +53,13 @@ reg = <00000000 4000000 f4500000 00000020>; }; + chosen { + name = "chosen"; + linux,platform = <0>; + interrupt-controller = <10c00>; + linux,phandle = <400>; + }; + soc8272@f0000000 { #address-cells = <1>; #size-cells = <1>;
@@ -90,7 +97,7 @@ #address-cells = <1>; #size-cells = <0>; device_type = "network"; - device-id = <2>; + device-id = <1>; compatible = "fs_enet"; model = "FCC"; reg = <11300 20 8400 100 11380 30>;
@@ -104,7 +111,7 @@ ethernet@25000 { device_type = "network"; - device-id = <3>; + device-id = <2>; compatible = "fs_enet"; model = "FCC"; reg = <11320 20 8500 100 113b0 30>;
@@ -133,7 +140,7 @@ device_type = "serial"; compatible = "cpm_uart"; model = "SCC"; - device-id = <2>; + device-id = <1>; reg = <11a00 20 8000 100>; current-speed = <1c200>; interrupts = <28 2>;
@@ -147,7 +154,7 @@ device_type = "serial"; compatible = "cpm_uart"; model = "SCC"; - device-id = <5>; + device-id = <4>; reg = <11a60 20 8300 100>; current-speed = <1c200>; interrupts = <2b 2>;
arch/powerpc/platforms/82xx/mpc82xx.c +1 -1
@@ -50,7 +50,7 @@ #include <linux/fs_enet_pd.h>#include <sysdev/fsl_soc.h> #include <sysdev/cpm2_pic.h> -#include "pq2ads_pd.h" +#include "pq2ads.h" static int __init get_freq (char *name,unsigned long *val) {
arch/powerpc/platforms/82xx/mpc82xx_ads.c +1 -1
@@ -51,7 +51,7 @@ #include <linux/fs_enet_pd.h>#include <sysdev/fsl_soc.h> #include <../sysdev/cpm2_pic.h> -#include "pq2ads_pd.h" +#include "pq2ads.h" #ifdef CONFIG_PCI static uint pci_clk_frq;
arch/powerpc/platforms/82xx/pq2ads.h +3 -2
@@ -22,6 +22,7 @@ #ifdef __KERNEL__#ifndef __MACH_ADS8260_DEFS#define __MACH_ADS8260_DEFS +#include <linux/seq_file.h> #include <asm/ppcboot.h> /* For our show_cpuinfo hooks. */
@@ -46,12 +47,12 @@ #define BCSR1_FETH_RST ((uint)0x0400000#define BCSR1_RS232_EN1 ((uint)0x02000000)/* 0 ==enable */ #define BCSR1_RS232_EN2 ((uint)0x01000000)/* 0 ==enable */ #define BCSR3_FETHIEN2 ((uint)0x10000000)/* 0 == enable*/ -#define BCSR3_FETH2_RS ((uint)0x80000000)/* 0 == reset */ +#define BCSR3_FETH2_RST ((uint)0x80000000)/* 0 == reset */ /* cpm serial driver works with constants below */ #define SIU_INT_SMC1 ((uint)0x04+CPM_IRQ_OFFSET) -#define SIU_INT_SMC2i ((uint)0x05+CPM_IRQ_OFFSET) +#define SIU_INT_SMC2 ((uint)0x05+CPM_IRQ_OFFSET)#define SIU_INT_SCC1 ((uint)0x28+CPM_IRQ_OFFSET)#define SIU_INT_SCC2 ((uint)0x29+CPM_IRQ_OFFSET)#define SIU_INT_SCC3 ((uint)0x2a+CPM_IRQ_OFFSET)
arch/powerpc/platforms/Makefile +1 -0
@@ -9,6 +9,7 @@ obj-$(CONFIG_PPC_CHRP) += chrp/ obj-$(CONFIG_4xx) += 4xx/ obj-$(CONFIG_PPC_MPC52xx) += 52xx/ obj-$(CONFIG_PPC_8xx) += 8xx/ +obj-$(CONFIG_PPC_82xx) += 82xx/ obj-$(CONFIG_PPC_83xx) += 83xx/ obj-$(CONFIG_PPC_85xx) += 85xx/ obj-$(CONFIG_PPC_86xx) += 86xx/
arch/powerpc/sysdev/cpm2_pic.c +1 -0
@@ -36,6 +36,7 @@ #include <asm/immap_cpm2.h>#include <asm/mpc8260.h> #include <asm/io.h> #include <asm/prom.h> +#include <asm/fs_pd.h> #include "cpm2_pic.h"
drivers/net/fs_enet/fs_enet.h +1 -0
@@ -9,6 +9,7 @@ #include <linux/phy.h>#include <linux/dma-mapping.h> #include <linux/fs_enet_pd.h> +#include <asm/fs_pd.h> #ifdef CONFIG_CPM1 #include <asm/commproc.h>
drivers/serial/cpm_uart/cpm_uart_cpm1.h +0 -3
@@ -20,9 +20,6 @@ #define SCC2_IRQ (CPM_IRQ_OFFSET + CPMVE#define SCC3_IRQ (CPM_IRQ_OFFSET + CPMVEC_SCC3)#define SCC4_IRQ (CPM_IRQ_OFFSET + CPMVEC_SCC4) -/* the CPM address */ -#define CPM_ADDR IMAP_ADDR -static inline void cpm_set_brg (int brg,int baud) {cpm_setbrg (brg, baud);
drivers/serial/cpm_uart/cpm_uart_cpm2.h +0 -3
@@ -20,9 +20,6 @@ #define SCC2_IRQ SIU_INT_SCC2#define SCC3_IRQ SIU_INT_SCC3#define SCC4_IRQ SIU_INT_SCC4 -/* the CPM address */ -#define CPM_ADDR CPM_MAP_ADDR -static inline void cpm_set_brg (int brg,int baud) {cpm_setbrg (brg, baud);
include/asm-powerpc/fs_pd.h +7 -0
@@ -17,6 +17,12 @@ #include <asm/time.h>#ifdef CONFIG_CPM2 #include <asm/cpm2.h> +#if defined(CONFIG_8260 ) +#include <asm/mpc8260.h> +#elif defined(CONFIG_85xx) +#include <asm/mpc85xx.h> +#endif +#define cpm2_map (member) \ ({ \ u32 offset = offsetof(cpm2_map_t, member); \
@@ -37,6 +43,7 @@ #endif#ifdef CONFIG_8xx#include <asm/8xx_immap.h> +#include <asm/mpc8xx.h> #define immr_map (member) \ ({ \
include/asm-powerpc/io.h +6 -0
@@ -732,6 +732,12 @@ #define page_to_bus(page) (page_to_phys(#endif /* CONFIG_PPC32 */ +/* access ports */ +#define setbits32 (_addr, _v) out_be32((_addr), in_be32(_addr) | (_v)) +#define clrbits32 (_addr, _v) out_be32((_addr), in_be32(_addr) & ~(_v)) + +#define setbits16 (_addr, _v) out_be16((_addr), in_be16(_addr) | (_v)) +#define clrbits16 (_addr, _v) out_be16((_addr), in_be16(_addr) & ~(_v))#endif /* __KERNEL__ */
include/asm-powerpc/mpc8260.h new file +32 -0
@@ -0,0 +1,32 @@ +/* +* Since there are many different boards and no standard configuration, +* we have a unique include file for each. Rather than change every +* file that has to include MPC8260 configuration, they all include +* this one and the configuration switching is done here. +*/ +#ifdef __KERNEL__ +#ifndef __ASM_PPC_MPC8260_H__ +#define __ASM_PPC_MPC8260_H__ + + +#ifdef CONFIG_8260 + +#if defined(CONFIG_PQ2ADS ) || defined (CONFIG_PQ2FADS ) +#include <platforms/82xx/pq2ads.h> +#endif + +#ifdef CONFIG_PCI_8260 +#include <platforms/82xx/m82xx_pci.h> +#endif + +#ifndef _ISA_MEM_BASE +#define _ISA_MEM_BASE 0 +#endif + +#ifndef PCI_DRAM_OFFSET +#define PCI_DRAM_OFFSET 0 +#endif + +#endif /* CONFIG_8260 */ +#endif /* !__ASM_PPC_MPC8260_H__ */ +#endif /* __KERNEL__ */
Quoted 6 lines · On Mon, 11 Dec 2006 21:12:26 +0300 Vitaly Bordug <[email protected]> wrote:
Recent update of
asm-powerpc/io.hcaused cpm-related stuff to break in the current kernel. Current patch fixes it, and includes other overhaul and improvements (incomplete list is below). Required for proper functioning of the 8xx stuff as well.
Quoted 7 lines
- Updated dts with a chosen node with interrupt controller,
- fixed messed device IDs among CPM2 SoC devices,
- corrected odd header name and fixed type in defines,
- Added 82xx subdir to the powerpc/platformsMakefile, new solely-powerpc header for 8260 family (was using one fromarch/ppc, this one cleaned up from the extra stuff).
---
Just noticed last 3 patches came out without Signed-off-by: for some reason. Hence, I'll resend, sorry about that.
Signature · 2 lines
Sincerely, Vitaly