diff --git a/arch/powerpc/boot/dts/mpc8272ads.dts b/arch/powerpc/boot/dts/mpc8272ads.dts index 286638e8af6e1799839a43446241263312f60459..26b44f7513dcfe12cfc46f8f5574921f58a08d83 100644 --- a/arch/powerpc/boot/dts/mpc8272ads.dts +++ b/arch/powerpc/boot/dts/mpc8272ads.dts @@ -65,8 +65,8 @@ #size-cells = <1>; #interrupt-cells = <2>; device_type = "soc"; - ranges = < 0 0 2 00000000 f0000000 00053000>; - reg = ; + ranges = <00000000 f0000000 00053000>; + reg = ; mdio@0 { device_type = "mdio"; @@ -130,8 +130,8 @@ #interrupt-cells = <2>; device_type = "cpm"; model = "CPM2"; - ranges = <00000000 00000000 3ffff>; - reg = <10d80 3280>; + ranges = <00000000 00000000 20000>; + reg = <0 20000>; command-proc = <119c0>; brg-frequency = <17D7840>; cpm_clk = ; diff --git a/arch/powerpc/platforms/82xx/mpc82xx.c b/arch/powerpc/platforms/82xx/mpc82xx.c index 0f5b30dc60da92b097f3e875069ab29281ed22b2..74e7892cdfcf9b9526ba0453f8d2742436facb53 100644 --- a/arch/powerpc/platforms/82xx/mpc82xx.c +++ b/arch/powerpc/platforms/82xx/mpc82xx.c @@ -50,7 +50,7 @@ #include #include -#include "pq2ads_pd.h" +#include "pq2ads.h" static int __init get_freq(char *name, unsigned long *val) { diff --git a/arch/powerpc/platforms/82xx/mpc82xx_ads.c b/arch/powerpc/platforms/82xx/mpc82xx_ads.c index ea880f1f0dcd4e71d73cad97b5e90ae9c833cd50..7334c1a15b90d549a9896e105fe588932ee572e4 100644 --- a/arch/powerpc/platforms/82xx/mpc82xx_ads.c +++ b/arch/powerpc/platforms/82xx/mpc82xx_ads.c @@ -51,7 +51,7 @@ #include #include <../sysdev/cpm2_pic.h> -#include "pq2ads_pd.h" +#include "pq2ads.h" #ifdef CONFIG_PCI static uint pci_clk_frq; diff --git a/arch/powerpc/platforms/82xx/pq2ads.h b/arch/powerpc/platforms/82xx/pq2ads.h index fb2f92bcd7700d88e22e4c9ab9a5369c5663263c..5b5cca6c8c8804d6e847a8b2a0995a9bb1b68d4a 100644 --- a/arch/powerpc/platforms/82xx/pq2ads.h +++ b/arch/powerpc/platforms/82xx/pq2ads.h @@ -22,6 +22,7 @@ #ifndef __MACH_ADS8260_DEFS #define __MACH_ADS8260_DEFS +#include #include /* For our show_cpuinfo hooks. */ @@ -46,12 +47,12 @@ #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) diff --git a/arch/powerpc/platforms/Makefile b/arch/powerpc/platforms/Makefile index 7f03ea9ab366668fb5d28e8483927411df8f75e9..f164005c66b9fd91fb472e66a8b53f67e3f80030 100644 --- a/arch/powerpc/platforms/Makefile +++ b/arch/powerpc/platforms/Makefile @@ -9,6 +9,7 @@ obj-$(CONFIG_PPC_MPC52xx) += 52xx/ obj-$(CONFIG_PPC_CHRP) += chrp/ obj-$(CONFIG_4xx) += 4xx/ 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/ diff --git a/drivers/net/fs_enet/fs_enet.h b/drivers/net/fs_enet/fs_enet.h index 92590d8fc24b4ee39b9e7bf7175132d5fa5a9002..569be225cd056b0955c3310c36706abb040fc8a7 100644 --- a/drivers/net/fs_enet/fs_enet.h +++ b/drivers/net/fs_enet/fs_enet.h @@ -9,6 +9,7 @@ #include #include +#include #ifdef CONFIG_CPM1 #include diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm1.h b/drivers/serial/cpm_uart/cpm_uart_cpm1.h index 5eb49ea63bfe4b76b2ce8449422d065c7acce890..a99e45e2b6d8d114db340681805297b99f431292 100644 --- a/drivers/serial/cpm_uart/cpm_uart_cpm1.h +++ b/drivers/serial/cpm_uart/cpm_uart_cpm1.h @@ -20,9 +20,6 @@ #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); diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm2.h b/drivers/serial/cpm_uart/cpm_uart_cpm2.h index 4b779111eaf9cc43e776ff3aff1a229d04fb0606..1b3219f56c81513a07381d5fa54263930c112b26 100644 --- a/drivers/serial/cpm_uart/cpm_uart_cpm2.h +++ b/drivers/serial/cpm_uart/cpm_uart_cpm2.h @@ -20,9 +20,6 @@ #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); diff --git a/include/asm-powerpc/fs_pd.h b/include/asm-powerpc/fs_pd.h index 1e2962fc4fa8ac19afa74bfcc7d930d3bce3d8ab..c624915b757e0ee7d75c2bf8a3f58560b8289d53 100644 --- a/include/asm-powerpc/fs_pd.h +++ b/include/asm-powerpc/fs_pd.h @@ -17,6 +17,12 @@ #ifdef CONFIG_CPM2 #include +#if defined(CONFIG_8260) +#include +#elif defined(CONFIG_85xx) +#include +#endif + #define cpm2_map(member) \ ({ \ u32 offset = offsetof(cpm2_map_t, member); \ diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h index 1cd532379c30035fd64f01d5d973c7414ffb15dc..301c9bb308b18c858cd3129089ac541ee8084e02 100644 --- a/include/asm-powerpc/io.h +++ b/include/asm-powerpc/io.h @@ -732,6 +732,12 @@ static inline void * bus_to_virt(unsigned long address) #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__ */