Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[POWERPC] 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, as well as other inconsistencies
expressed, that do not permit targets from working properly:

- 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, missed during
initial commit,
- new solely-powerpc header file for 8260 family (was using one from
arch/ppc, this one cleaned up from the extra stuff), in fact for now
a placeholder to get the board-specific includes for stuff not yet
capable to live with devicetree peeks only
- Fixed couple of misprints in reference mpc8272 dts.

Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

authored by

Vitaly Bordug and committed by
Paul Mackerras
5427828e 73844ecb

+23 -14
+4 -4
arch/powerpc/boot/dts/mpc8272ads.dts
··· 65 65 #size-cells = <1>; 66 66 #interrupt-cells = <2>; 67 67 device_type = "soc"; 68 - ranges = < 0 0 2 00000000 f0000000 00053000>; 69 - reg = <f0000000 0>; 68 + ranges = <00000000 f0000000 00053000>; 69 + reg = <f0000000 10000>; 70 70 71 71 mdio@0 { 72 72 device_type = "mdio"; ··· 130 130 #interrupt-cells = <2>; 131 131 device_type = "cpm"; 132 132 model = "CPM2"; 133 - ranges = <00000000 00000000 3ffff>; 134 - reg = <10d80 3280>; 133 + ranges = <00000000 00000000 20000>; 134 + reg = <0 20000>; 135 135 command-proc = <119c0>; 136 136 brg-frequency = <17D7840>; 137 137 cpm_clk = <BEBC200>;
+1 -1
arch/powerpc/platforms/82xx/mpc82xx.c
··· 50 50 #include <sysdev/fsl_soc.h> 51 51 #include <sysdev/cpm2_pic.h> 52 52 53 - #include "pq2ads_pd.h" 53 + #include "pq2ads.h" 54 54 55 55 static int __init get_freq(char *name, unsigned long *val) 56 56 {
+1 -1
arch/powerpc/platforms/82xx/mpc82xx_ads.c
··· 51 51 #include <sysdev/fsl_soc.h> 52 52 #include <../sysdev/cpm2_pic.h> 53 53 54 - #include "pq2ads_pd.h" 54 + #include "pq2ads.h" 55 55 56 56 #ifdef CONFIG_PCI 57 57 static uint pci_clk_frq;
+3 -2
arch/powerpc/platforms/82xx/pq2ads.h
··· 22 22 #ifndef __MACH_ADS8260_DEFS 23 23 #define __MACH_ADS8260_DEFS 24 24 25 + #include <linux/seq_file.h> 25 26 #include <asm/ppcboot.h> 26 27 27 28 /* For our show_cpuinfo hooks. */ ··· 47 46 #define BCSR1_RS232_EN1 ((uint)0x02000000) /* 0 ==enable */ 48 47 #define BCSR1_RS232_EN2 ((uint)0x01000000) /* 0 ==enable */ 49 48 #define BCSR3_FETHIEN2 ((uint)0x10000000) /* 0 == enable*/ 50 - #define BCSR3_FETH2_RS ((uint)0x80000000) /* 0 == reset */ 49 + #define BCSR3_FETH2_RST ((uint)0x80000000) /* 0 == reset */ 51 50 52 51 /* cpm serial driver works with constants below */ 53 52 54 53 #define SIU_INT_SMC1 ((uint)0x04+CPM_IRQ_OFFSET) 55 - #define SIU_INT_SMC2i ((uint)0x05+CPM_IRQ_OFFSET) 54 + #define SIU_INT_SMC2 ((uint)0x05+CPM_IRQ_OFFSET) 56 55 #define SIU_INT_SCC1 ((uint)0x28+CPM_IRQ_OFFSET) 57 56 #define SIU_INT_SCC2 ((uint)0x29+CPM_IRQ_OFFSET) 58 57 #define SIU_INT_SCC3 ((uint)0x2a+CPM_IRQ_OFFSET)
+1
arch/powerpc/platforms/Makefile
··· 9 9 obj-$(CONFIG_PPC_CHRP) += chrp/ 10 10 obj-$(CONFIG_4xx) += 4xx/ 11 11 obj-$(CONFIG_PPC_8xx) += 8xx/ 12 + obj-$(CONFIG_PPC_82xx) += 82xx/ 12 13 obj-$(CONFIG_PPC_83xx) += 83xx/ 13 14 obj-$(CONFIG_PPC_85xx) += 85xx/ 14 15 obj-$(CONFIG_PPC_86xx) += 86xx/
+1
drivers/net/fs_enet/fs_enet.h
··· 9 9 #include <linux/dma-mapping.h> 10 10 11 11 #include <linux/fs_enet_pd.h> 12 + #include <asm/fs_pd.h> 12 13 13 14 #ifdef CONFIG_CPM1 14 15 #include <asm/commproc.h>
-3
drivers/serial/cpm_uart/cpm_uart_cpm1.h
··· 20 20 #define SCC3_IRQ (CPM_IRQ_OFFSET + CPMVEC_SCC3) 21 21 #define SCC4_IRQ (CPM_IRQ_OFFSET + CPMVEC_SCC4) 22 22 23 - /* the CPM address */ 24 - #define CPM_ADDR IMAP_ADDR 25 - 26 23 static inline void cpm_set_brg(int brg, int baud) 27 24 { 28 25 cpm_setbrg(brg, baud);
-3
drivers/serial/cpm_uart/cpm_uart_cpm2.h
··· 20 20 #define SCC3_IRQ SIU_INT_SCC3 21 21 #define SCC4_IRQ SIU_INT_SCC4 22 22 23 - /* the CPM address */ 24 - #define CPM_ADDR CPM_MAP_ADDR 25 - 26 23 static inline void cpm_set_brg(int brg, int baud) 27 24 { 28 25 cpm_setbrg(brg, baud);
+6
include/asm-powerpc/fs_pd.h
··· 17 17 #ifdef CONFIG_CPM2 18 18 #include <asm/cpm2.h> 19 19 20 + #if defined(CONFIG_8260) 21 + #include <asm/mpc8260.h> 22 + #elif defined(CONFIG_85xx) 23 + #include <asm/mpc85xx.h> 24 + #endif 25 + 20 26 #define cpm2_map(member) \ 21 27 ({ \ 22 28 u32 offset = offsetof(cpm2_map_t, member); \
+6
include/asm-powerpc/io.h
··· 732 732 733 733 #endif /* CONFIG_PPC32 */ 734 734 735 + /* access ports */ 736 + #define setbits32(_addr, _v) out_be32((_addr), in_be32(_addr) | (_v)) 737 + #define clrbits32(_addr, _v) out_be32((_addr), in_be32(_addr) & ~(_v)) 738 + 739 + #define setbits16(_addr, _v) out_be16((_addr), in_be16(_addr) | (_v)) 740 + #define clrbits16(_addr, _v) out_be16((_addr), in_be16(_addr) & ~(_v)) 735 741 736 742 #endif /* __KERNEL__ */ 737 743