aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/boot/dts/pcm030.dts26
-rw-r--r--arch/powerpc/include/asm/mpc52xx.h2
-rw-r--r--arch/powerpc/include/asm/mpc5xxx.h (renamed from arch/powerpc/include/asm/mpc512x.h)10
-rw-r--r--arch/powerpc/platforms/512x/clock.c10
-rw-r--r--arch/powerpc/platforms/512x/mpc512x.h1
-rw-r--r--arch/powerpc/platforms/512x/mpc512x_shared.c23
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_common.c32
-rw-r--r--arch/powerpc/sysdev/Makefile3
-rw-r--r--arch/powerpc/sysdev/mpc5xxx_clocks.c33
-rw-r--r--drivers/ata/pata_mpc52xx.c2
-rw-r--r--drivers/i2c/busses/i2c-mpc.c2
-rw-r--r--drivers/net/fec_mpc52xx.c2
-rw-r--r--drivers/net/fec_mpc52xx_phy.c2
-rw-r--r--drivers/serial/mpc52xx_uart.c5
-rw-r--r--drivers/spi/mpc52xx_psc_spi.c22
-rw-r--r--drivers/video/xilinxfb.c59
-rw-r--r--drivers/watchdog/mpc5200_wdt.c2
-rw-r--r--include/linux/fsl_devices.h4
18 files changed, 91 insertions, 149 deletions
diff --git a/arch/powerpc/boot/dts/pcm030.dts b/arch/powerpc/boot/dts/pcm030.dts
index 895834713894..30bfdc04c6df 100644
--- a/arch/powerpc/boot/dts/pcm030.dts
+++ b/arch/powerpc/boot/dts/pcm030.dts
@@ -258,34 +258,16 @@
258 compatible = "nxp,pcf8563"; 258 compatible = "nxp,pcf8563";
259 reg = <0x51>; 259 reg = <0x51>;
260 }; 260 };
261 /* FIXME: EEPROM */ 261 eeprom@52 {
262 compatible = "catalyst,24c32";
263 reg = <0x52>;
264 };
262 }; 265 };
263 266
264 sram@8000 { 267 sram@8000 {
265 compatible = "fsl,mpc5200b-sram","fsl,mpc5200-sram"; 268 compatible = "fsl,mpc5200b-sram","fsl,mpc5200-sram";
266 reg = <0x8000 0x4000>; 269 reg = <0x8000 0x4000>;
267 }; 270 };
268
269 /* This is only an example device to show the usage of gpios. It maps all available
270 * gpios to the "gpio-provider" device.
271 */
272 gpio {
273 compatible = "gpio-provider";
274
275 /* mpc52xx exp.con patchfield */
276 gpios = <&gpio_wkup 0 0 /* GPIO_WKUP_7 11d jp13-3 */
277 &gpio_wkup 1 0 /* GPIO_WKUP_6 14c */
278 &gpio_wkup 6 0 /* PSC2_4 43c x5-11 */
279 &gpio_simple 2 0 /* IRDA_1 24c x7-6 set GPS_PORT_CONFIG[IRDA] = 0 */
280 &gpio_simple 3 0 /* IRDA_0 x8-5 set GPS_PORT_CONFIG[IRDA] = 0 */
281 &gpt2 0 0 /* timer2 12d x4-4 */
282 &gpt3 0 0 /* timer3 13d x6-4 */
283 &gpt4 0 0 /* timer4 61c x2-16 */
284 &gpt5 0 0 /* timer5 44c x7-11 */
285 &gpt6 0 0 /* timer6 60c x8-15 */
286 &gpt7 0 0 /* timer7 36a x17-9 */
287 >;
288 };
289 }; 271 };
290 272
291 pci@f0000d00 { 273 pci@f0000d00 {
diff --git a/arch/powerpc/include/asm/mpc52xx.h b/arch/powerpc/include/asm/mpc52xx.h
index 52e049cd9e68..1b4f697abbdd 100644
--- a/arch/powerpc/include/asm/mpc52xx.h
+++ b/arch/powerpc/include/asm/mpc52xx.h
@@ -16,6 +16,7 @@
16#ifndef __ASSEMBLY__ 16#ifndef __ASSEMBLY__
17#include <asm/types.h> 17#include <asm/types.h>
18#include <asm/prom.h> 18#include <asm/prom.h>
19#include <asm/mpc5xxx.h>
19#endif /* __ASSEMBLY__ */ 20#endif /* __ASSEMBLY__ */
20 21
21#include <linux/suspend.h> 22#include <linux/suspend.h>
@@ -268,7 +269,6 @@ struct mpc52xx_intr {
268#ifndef __ASSEMBLY__ 269#ifndef __ASSEMBLY__
269 270
270/* mpc52xx_common.c */ 271/* mpc52xx_common.c */
271extern unsigned int mpc52xx_find_ipb_freq(struct device_node *node);
272extern void mpc5200_setup_xlb_arbiter(void); 272extern void mpc5200_setup_xlb_arbiter(void);
273extern void mpc52xx_declare_of_platform_devices(void); 273extern void mpc52xx_declare_of_platform_devices(void);
274extern void mpc52xx_map_common_devices(void); 274extern void mpc52xx_map_common_devices(void);
diff --git a/arch/powerpc/include/asm/mpc512x.h b/arch/powerpc/include/asm/mpc5xxx.h
index c48a1658eeac..5ce9c5fa434a 100644
--- a/arch/powerpc/include/asm/mpc512x.h
+++ b/arch/powerpc/include/asm/mpc5xxx.h
@@ -4,7 +4,7 @@
4 * Author: John Rigby, <jrigby@freescale.com>, Friday Apr 13 2007 4 * Author: John Rigby, <jrigby@freescale.com>, Friday Apr 13 2007
5 * 5 *
6 * Description: 6 * Description:
7 * MPC5121 Prototypes and definitions 7 * MPC5xxx Prototypes and definitions
8 * 8 *
9 * This is free software; you can redistribute it and/or modify it 9 * This is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by 10 * under the terms of the GNU General Public License as published by
@@ -13,10 +13,10 @@
13 * 13 *
14 */ 14 */
15 15
16#ifndef __ASM_POWERPC_MPC512x_H__ 16#ifndef __ASM_POWERPC_MPC5xxx_H__
17#define __ASM_POWERPC_MPC512x_H__ 17#define __ASM_POWERPC_MPC5xxx_H__
18 18
19extern unsigned long mpc512x_find_ips_freq(struct device_node *node); 19extern unsigned long mpc5xxx_get_bus_frequency(struct device_node *node);
20 20
21#endif /* __ASM_POWERPC_MPC512x_H__ */ 21#endif /* __ASM_POWERPC_MPC5xxx_H__ */
22 22
diff --git a/arch/powerpc/platforms/512x/clock.c b/arch/powerpc/platforms/512x/clock.c
index 1bcff94eb924..84544d072043 100644
--- a/arch/powerpc/platforms/512x/clock.c
+++ b/arch/powerpc/platforms/512x/clock.c
@@ -24,7 +24,7 @@
24#include <linux/io.h> 24#include <linux/io.h>
25 25
26#include <linux/of_platform.h> 26#include <linux/of_platform.h>
27#include <asm/mpc512x.h> 27#include <asm/mpc5xxx.h>
28#include <asm/clk_interface.h> 28#include <asm/clk_interface.h>
29 29
30#undef CLK_DEBUG 30#undef CLK_DEBUG
@@ -83,13 +83,13 @@ static void dump_clocks(void)
83 mutex_lock(&clocks_mutex); 83 mutex_lock(&clocks_mutex);
84 printk(KERN_INFO "CLOCKS:\n"); 84 printk(KERN_INFO "CLOCKS:\n");
85 list_for_each_entry(p, &clocks, node) { 85 list_for_each_entry(p, &clocks, node) {
86 printk(KERN_INFO " %s %ld", p->name, p->rate); 86 pr_info(" %s=%ld", p->name, p->rate);
87 if (p->parent) 87 if (p->parent)
88 printk(KERN_INFO " %s %ld", p->parent->name, 88 pr_cont(" %s=%ld", p->parent->name,
89 p->parent->rate); 89 p->parent->rate);
90 if (p->flags & CLK_HAS_CTRL) 90 if (p->flags & CLK_HAS_CTRL)
91 printk(KERN_INFO " reg/bit %d/%d", p->reg, p->bit); 91 pr_cont(" reg/bit=%d/%d", p->reg, p->bit);
92 printk("\n"); 92 pr_cont("\n");
93 } 93 }
94 mutex_unlock(&clocks_mutex); 94 mutex_unlock(&clocks_mutex);
95} 95}
diff --git a/arch/powerpc/platforms/512x/mpc512x.h b/arch/powerpc/platforms/512x/mpc512x.h
index 9c03693cb009..22a5352407e0 100644
--- a/arch/powerpc/platforms/512x/mpc512x.h
+++ b/arch/powerpc/platforms/512x/mpc512x.h
@@ -11,7 +11,6 @@
11 11
12#ifndef __MPC512X_H__ 12#ifndef __MPC512X_H__
13#define __MPC512X_H__ 13#define __MPC512X_H__
14extern unsigned long mpc512x_find_ips_freq(struct device_node *node);
15extern void __init mpc512x_init_IRQ(void); 14extern void __init mpc512x_init_IRQ(void);
16void __init mpc512x_declare_of_platform_devices(void); 15void __init mpc512x_declare_of_platform_devices(void);
17#endif /* __MPC512X_H__ */ 16#endif /* __MPC512X_H__ */
diff --git a/arch/powerpc/platforms/512x/mpc512x_shared.c b/arch/powerpc/platforms/512x/mpc512x_shared.c
index d8cd579f3191..434d683df5a0 100644
--- a/arch/powerpc/platforms/512x/mpc512x_shared.c
+++ b/arch/powerpc/platforms/512x/mpc512x_shared.c
@@ -24,29 +24,6 @@
24 24
25#include "mpc512x.h" 25#include "mpc512x.h"
26 26
27unsigned long
28mpc512x_find_ips_freq(struct device_node *node)
29{
30 struct device_node *np;
31 const unsigned int *p_ips_freq = NULL;
32
33 of_node_get(node);
34 while (node) {
35 p_ips_freq = of_get_property(node, "bus-frequency", NULL);
36 if (p_ips_freq)
37 break;
38
39 np = of_get_parent(node);
40 of_node_put(node);
41 node = np;
42 }
43 if (node)
44 of_node_put(node);
45
46 return p_ips_freq ? *p_ips_freq : 0;
47}
48EXPORT_SYMBOL(mpc512x_find_ips_freq);
49
50void __init mpc512x_init_IRQ(void) 27void __init mpc512x_init_IRQ(void)
51{ 28{
52 struct device_node *np; 29 struct device_node *np;
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_common.c b/arch/powerpc/platforms/52xx/mpc52xx_common.c
index 8e3dd5a0f228..a46bad0c2339 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_common.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_common.c
@@ -47,36 +47,6 @@ static DEFINE_SPINLOCK(mpc52xx_lock);
47static struct mpc52xx_gpt __iomem *mpc52xx_wdt; 47static struct mpc52xx_gpt __iomem *mpc52xx_wdt;
48static struct mpc52xx_cdm __iomem *mpc52xx_cdm; 48static struct mpc52xx_cdm __iomem *mpc52xx_cdm;
49 49
50/**
51 * mpc52xx_find_ipb_freq - Find the IPB bus frequency for a device
52 * @node: device node
53 *
54 * Returns IPB bus frequency, or 0 if the bus frequency cannot be found.
55 */
56unsigned int
57mpc52xx_find_ipb_freq(struct device_node *node)
58{
59 struct device_node *np;
60 const unsigned int *p_ipb_freq = NULL;
61
62 of_node_get(node);
63 while (node) {
64 p_ipb_freq = of_get_property(node, "bus-frequency", NULL);
65 if (p_ipb_freq)
66 break;
67
68 np = of_get_parent(node);
69 of_node_put(node);
70 node = np;
71 }
72 if (node)
73 of_node_put(node);
74
75 return p_ipb_freq ? *p_ipb_freq : 0;
76}
77EXPORT_SYMBOL(mpc52xx_find_ipb_freq);
78
79
80/* 50/*
81 * Configure the XLB arbiter settings to match what Linux expects. 51 * Configure the XLB arbiter settings to match what Linux expects.
82 */ 52 */
@@ -221,7 +191,7 @@ unsigned int mpc52xx_get_xtal_freq(struct device_node *node)
221 if (!mpc52xx_cdm) 191 if (!mpc52xx_cdm)
222 return 0; 192 return 0;
223 193
224 freq = mpc52xx_find_ipb_freq(node); 194 freq = mpc5xxx_get_bus_frequency(node);
225 if (!freq) 195 if (!freq)
226 return 0; 196 return 0;
227 197
diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile
index d073bfdd222a..9d4b17462f13 100644
--- a/arch/powerpc/sysdev/Makefile
+++ b/arch/powerpc/sysdev/Makefile
@@ -50,6 +50,9 @@ obj-$(CONFIG_PPC_DCR) += dcr.o
50obj-$(CONFIG_8xx) += mpc8xx_pic.o cpm1.o 50obj-$(CONFIG_8xx) += mpc8xx_pic.o cpm1.o
51obj-$(CONFIG_UCODE_PATCH) += micropatch.o 51obj-$(CONFIG_UCODE_PATCH) += micropatch.o
52 52
53obj-$(CONFIG_PPC_MPC512x) += mpc5xxx_clocks.o
54obj-$(CONFIG_PPC_MPC52xx) += mpc5xxx_clocks.o
55
53ifeq ($(CONFIG_SUSPEND),y) 56ifeq ($(CONFIG_SUSPEND),y)
54obj-$(CONFIG_6xx) += 6xx-suspend.o 57obj-$(CONFIG_6xx) += 6xx-suspend.o
55endif 58endif
diff --git a/arch/powerpc/sysdev/mpc5xxx_clocks.c b/arch/powerpc/sysdev/mpc5xxx_clocks.c
new file mode 100644
index 000000000000..34e12f9995fe
--- /dev/null
+++ b/arch/powerpc/sysdev/mpc5xxx_clocks.c
@@ -0,0 +1,33 @@
1/**
2 * mpc5xxx_get_bus_frequency - Find the bus frequency for a device
3 * @node: device node
4 *
5 * Returns bus frequency (IPS on MPC512x, IPB on MPC52xx),
6 * or 0 if the bus frequency cannot be found.
7 */
8
9#include <linux/kernel.h>
10#include <linux/of_platform.h>
11
12unsigned int
13mpc5xxx_get_bus_frequency(struct device_node *node)
14{
15 struct device_node *np;
16 const unsigned int *p_bus_freq = NULL;
17
18 of_node_get(node);
19 while (node) {
20 p_bus_freq = of_get_property(node, "bus-frequency", NULL);
21 if (p_bus_freq)
22 break;
23
24 np = of_get_parent(node);
25 of_node_put(node);
26 node = np;
27 }
28 if (node)
29 of_node_put(node);
30
31 return p_bus_freq ? *p_bus_freq : 0;
32}
33EXPORT_SYMBOL(mpc5xxx_get_bus_frequency);
diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c
index 68d27bc70d06..2bc2dbe30e8f 100644
--- a/drivers/ata/pata_mpc52xx.c
+++ b/drivers/ata/pata_mpc52xx.c
@@ -694,7 +694,7 @@ mpc52xx_ata_probe(struct of_device *op, const struct of_device_id *match)
694 struct bcom_task *dmatsk = NULL; 694 struct bcom_task *dmatsk = NULL;
695 695
696 /* Get ipb frequency */ 696 /* Get ipb frequency */
697 ipb_freq = mpc52xx_find_ipb_freq(op->node); 697 ipb_freq = mpc5xxx_get_bus_frequency(op->node);
698 if (!ipb_freq) { 698 if (!ipb_freq) {
699 dev_err(&op->dev, "could not determine IPB bus frequency\n"); 699 dev_err(&op->dev, "could not determine IPB bus frequency\n");
700 return -ENODEV; 700 return -ENODEV;
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
index dd778d7ae047..d325e86e3103 100644
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
@@ -197,7 +197,7 @@ int mpc_i2c_get_fdr_52xx(struct device_node *node, u32 clock, int prescaler)
197 return -EINVAL; 197 return -EINVAL;
198 198
199 /* Determine divider value */ 199 /* Determine divider value */
200 divider = mpc52xx_find_ipb_freq(node) / clock; 200 divider = mpc5xxx_get_bus_frequency(node) / clock;
201 201
202 /* 202 /*
203 * We want to choose an FDR/DFSR that generates an I2C bus speed that 203 * We want to choose an FDR/DFSR that generates an I2C bus speed that
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c
index 7d443405bbe2..cc786333d95c 100644
--- a/drivers/net/fec_mpc52xx.c
+++ b/drivers/net/fec_mpc52xx.c
@@ -948,7 +948,7 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match)
948 /* Start with safe defaults for link connection */ 948 /* Start with safe defaults for link connection */
949 priv->speed = 100; 949 priv->speed = 100;
950 priv->duplex = DUPLEX_HALF; 950 priv->duplex = DUPLEX_HALF;
951 priv->mdio_speed = ((mpc52xx_find_ipb_freq(op->node) >> 20) / 5) << 1; 951 priv->mdio_speed = ((mpc5xxx_get_bus_frequency(op->node) >> 20) / 5) << 1;
952 952
953 /* The current speed preconfigures the speed of the MII link */ 953 /* The current speed preconfigures the speed of the MII link */
954 prop = of_get_property(op->node, "current-speed", &prop_size); 954 prop = of_get_property(op->node, "current-speed", &prop_size);
diff --git a/drivers/net/fec_mpc52xx_phy.c b/drivers/net/fec_mpc52xx_phy.c
index fec9f245116b..31e6d62b785d 100644
--- a/drivers/net/fec_mpc52xx_phy.c
+++ b/drivers/net/fec_mpc52xx_phy.c
@@ -106,7 +106,7 @@ static int mpc52xx_fec_mdio_probe(struct of_device *of,
106 106
107 /* set MII speed */ 107 /* set MII speed */
108 out_be32(&priv->regs->mii_speed, 108 out_be32(&priv->regs->mii_speed,
109 ((mpc52xx_find_ipb_freq(of->node) >> 20) / 5) << 1); 109 ((mpc5xxx_get_bus_frequency(of->node) >> 20) / 5) << 1);
110 110
111 err = of_mdiobus_register(bus, np); 111 err = of_mdiobus_register(bus, np);
112 if (err) 112 if (err)
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
index b3feb6198d57..abbd146c50d9 100644
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -76,7 +76,6 @@
76#include <linux/of_platform.h> 76#include <linux/of_platform.h>
77 77
78#include <asm/mpc52xx.h> 78#include <asm/mpc52xx.h>
79#include <asm/mpc512x.h>
80#include <asm/mpc52xx_psc.h> 79#include <asm/mpc52xx_psc.h>
81 80
82#if defined(CONFIG_SERIAL_MPC52xx_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) 81#if defined(CONFIG_SERIAL_MPC52xx_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
@@ -254,7 +253,7 @@ static unsigned long mpc52xx_getuartclk(void *p)
254 * but the generic serial code assumes 16 253 * but the generic serial code assumes 16
255 * so return ipb freq / 2 254 * so return ipb freq / 2
256 */ 255 */
257 return mpc52xx_find_ipb_freq(p) / 2; 256 return mpc5xxx_get_bus_frequency(p) / 2;
258} 257}
259 258
260static struct psc_ops mpc52xx_psc_ops = { 259static struct psc_ops mpc52xx_psc_ops = {
@@ -391,7 +390,7 @@ static void mpc512x_psc_cw_restore_ints(struct uart_port *port)
391 390
392static unsigned long mpc512x_getuartclk(void *p) 391static unsigned long mpc512x_getuartclk(void *p)
393{ 392{
394 return mpc512x_find_ips_freq(p); 393 return mpc5xxx_get_bus_frequency(p);
395} 394}
396 395
397static struct psc_ops mpc512x_psc_ops = { 396static struct psc_ops mpc512x_psc_ops = {
diff --git a/drivers/spi/mpc52xx_psc_spi.c b/drivers/spi/mpc52xx_psc_spi.c
index 68c77a911595..e1901fdce774 100644
--- a/drivers/spi/mpc52xx_psc_spi.c
+++ b/drivers/spi/mpc52xx_psc_spi.c
@@ -13,6 +13,7 @@
13 13
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/types.h>
16#include <linux/errno.h> 17#include <linux/errno.h>
17#include <linux/interrupt.h> 18#include <linux/interrupt.h>
18#include <linux/of_platform.h> 19#include <linux/of_platform.h>
@@ -30,8 +31,7 @@
30 31
31struct mpc52xx_psc_spi { 32struct mpc52xx_psc_spi {
32 /* fsl_spi_platform data */ 33 /* fsl_spi_platform data */
33 void (*activate_cs)(u8, u8); 34 void (*cs_control)(struct spi_device *spi, bool on);
34 void (*deactivate_cs)(u8, u8);
35 u32 sysclk; 35 u32 sysclk;
36 36
37 /* driver internal data */ 37 /* driver internal data */
@@ -111,18 +111,16 @@ static void mpc52xx_psc_spi_activate_cs(struct spi_device *spi)
111 out_be16((u16 __iomem *)&psc->ccr, ccr); 111 out_be16((u16 __iomem *)&psc->ccr, ccr);
112 mps->bits_per_word = cs->bits_per_word; 112 mps->bits_per_word = cs->bits_per_word;
113 113
114 if (mps->activate_cs) 114 if (mps->cs_control)
115 mps->activate_cs(spi->chip_select, 115 mps->cs_control(spi, (spi->mode & SPI_CS_HIGH) ? 1 : 0);
116 (spi->mode & SPI_CS_HIGH) ? 1 : 0);
117} 116}
118 117
119static void mpc52xx_psc_spi_deactivate_cs(struct spi_device *spi) 118static void mpc52xx_psc_spi_deactivate_cs(struct spi_device *spi)
120{ 119{
121 struct mpc52xx_psc_spi *mps = spi_master_get_devdata(spi->master); 120 struct mpc52xx_psc_spi *mps = spi_master_get_devdata(spi->master);
122 121
123 if (mps->deactivate_cs) 122 if (mps->cs_control)
124 mps->deactivate_cs(spi->chip_select, 123 mps->cs_control(spi, (spi->mode & SPI_CS_HIGH) ? 0 : 1);
125 (spi->mode & SPI_CS_HIGH) ? 1 : 0);
126} 124}
127 125
128#define MPC52xx_PSC_BUFSIZE (MPC52xx_PSC_RFNUM_MASK + 1) 126#define MPC52xx_PSC_BUFSIZE (MPC52xx_PSC_RFNUM_MASK + 1)
@@ -388,15 +386,13 @@ static int __init mpc52xx_psc_spi_do_probe(struct device *dev, u32 regaddr,
388 mps->irq = irq; 386 mps->irq = irq;
389 if (pdata == NULL) { 387 if (pdata == NULL) {
390 dev_warn(dev, "probe called without platform data, no " 388 dev_warn(dev, "probe called without platform data, no "
391 "(de)activate_cs function will be called\n"); 389 "cs_control function will be called\n");
392 mps->activate_cs = NULL; 390 mps->cs_control = NULL;
393 mps->deactivate_cs = NULL;
394 mps->sysclk = 0; 391 mps->sysclk = 0;
395 master->bus_num = bus_num; 392 master->bus_num = bus_num;
396 master->num_chipselect = 255; 393 master->num_chipselect = 255;
397 } else { 394 } else {
398 mps->activate_cs = pdata->activate_cs; 395 mps->cs_control = pdata->cs_control;
399 mps->deactivate_cs = pdata->deactivate_cs;
400 mps->sysclk = pdata->sysclk; 396 mps->sysclk = pdata->sysclk;
401 master->bus_num = pdata->bus_num; 397 master->bus_num = pdata->bus_num;
402 master->num_chipselect = pdata->max_chipselect; 398 master->num_chipselect = pdata->max_chipselect;
diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c
index 7a868bd16e0e..ed7c8d0ddccb 100644
--- a/drivers/video/xilinxfb.c
+++ b/drivers/video/xilinxfb.c
@@ -124,7 +124,6 @@ struct xilinxfb_drvdata {
124 registers */ 124 registers */
125 125
126 dcr_host_t dcr_host; 126 dcr_host_t dcr_host;
127 unsigned int dcr_start;
128 unsigned int dcr_len; 127 unsigned int dcr_len;
129 128
130 void *fb_virt; /* virt. address of the frame buffer */ 129 void *fb_virt; /* virt. address of the frame buffer */
@@ -325,8 +324,8 @@ static int xilinxfb_assign(struct device *dev,
325 drvdata->regs); 324 drvdata->regs);
326 } 325 }
327 /* Put a banner in the log (for DEBUG) */ 326 /* Put a banner in the log (for DEBUG) */
328 dev_dbg(dev, "fb: phys=%p, virt=%p, size=%x\n", 327 dev_dbg(dev, "fb: phys=%llx, virt=%p, size=%x\n",
329 (void *)drvdata->fb_phys, drvdata->fb_virt, fbsize); 328 (unsigned long long)drvdata->fb_phys, drvdata->fb_virt, fbsize);
330 329
331 return 0; /* success */ 330 return 0; /* success */
332 331
@@ -404,9 +403,7 @@ xilinxfb_of_probe(struct of_device *op, const struct of_device_id *match)
404 u32 tft_access; 403 u32 tft_access;
405 struct xilinxfb_platform_data pdata; 404 struct xilinxfb_platform_data pdata;
406 struct resource res; 405 struct resource res;
407 int size, rc; 406 int size, rc, start;
408 int start = 0, len = 0;
409 dcr_host_t dcr_host;
410 struct xilinxfb_drvdata *drvdata; 407 struct xilinxfb_drvdata *drvdata;
411 408
412 /* Copy with the default pdata (not a ptr reference!) */ 409 /* Copy with the default pdata (not a ptr reference!) */
@@ -414,35 +411,39 @@ xilinxfb_of_probe(struct of_device *op, const struct of_device_id *match)
414 411
415 dev_dbg(&op->dev, "xilinxfb_of_probe(%p, %p)\n", op, match); 412 dev_dbg(&op->dev, "xilinxfb_of_probe(%p, %p)\n", op, match);
416 413
414 /* Allocate the driver data region */
415 drvdata = kzalloc(sizeof(*drvdata), GFP_KERNEL);
416 if (!drvdata) {
417 dev_err(&op->dev, "Couldn't allocate device private record\n");
418 return -ENOMEM;
419 }
420
417 /* 421 /*
418 * To check whether the core is connected directly to DCR or PLB 422 * To check whether the core is connected directly to DCR or PLB
419 * interface and initialize the tft_access accordingly. 423 * interface and initialize the tft_access accordingly.
420 */ 424 */
421 p = (u32 *)of_get_property(op->node, "xlnx,dcr-splb-slave-if", NULL); 425 p = (u32 *)of_get_property(op->node, "xlnx,dcr-splb-slave-if", NULL);
422 426 tft_access = p ? *p : 0;
423 if (p)
424 tft_access = *p;
425 else
426 tft_access = 0; /* For backward compatibility */
427 427
428 /* 428 /*
429 * Fill the resource structure if its direct PLB interface 429 * Fill the resource structure if its direct PLB interface
430 * otherwise fill the dcr_host structure. 430 * otherwise fill the dcr_host structure.
431 */ 431 */
432 if (tft_access) { 432 if (tft_access) {
433 drvdata->flags |= PLB_ACCESS_FLAG;
433 rc = of_address_to_resource(op->node, 0, &res); 434 rc = of_address_to_resource(op->node, 0, &res);
434 if (rc) { 435 if (rc) {
435 dev_err(&op->dev, "invalid address\n"); 436 dev_err(&op->dev, "invalid address\n");
436 return -ENODEV; 437 goto err;
437 } 438 }
438
439 } else { 439 } else {
440 res.start = 0;
440 start = dcr_resource_start(op->node, 0); 441 start = dcr_resource_start(op->node, 0);
441 len = dcr_resource_len(op->node, 0); 442 drvdata->dcr_len = dcr_resource_len(op->node, 0);
442 dcr_host = dcr_map(op->node, start, len); 443 drvdata->dcr_host = dcr_map(op->node, start, drvdata->dcr_len);
443 if (!DCR_MAP_OK(dcr_host)) { 444 if (!DCR_MAP_OK(drvdata->dcr_host)) {
444 dev_err(&op->dev, "invalid address\n"); 445 dev_err(&op->dev, "invalid DCR address\n");
445 return -ENODEV; 446 goto err;
446 } 447 }
447 } 448 }
448 449
@@ -467,26 +468,12 @@ xilinxfb_of_probe(struct of_device *op, const struct of_device_id *match)
467 if (of_find_property(op->node, "rotate-display", NULL)) 468 if (of_find_property(op->node, "rotate-display", NULL))
468 pdata.rotate_screen = 1; 469 pdata.rotate_screen = 1;
469 470
470 /* Allocate the driver data region */
471 drvdata = kzalloc(sizeof(*drvdata), GFP_KERNEL);
472 if (!drvdata) {
473 dev_err(&op->dev, "Couldn't allocate device private record\n");
474 return -ENOMEM;
475 }
476 dev_set_drvdata(&op->dev, drvdata); 471 dev_set_drvdata(&op->dev, drvdata);
472 return xilinxfb_assign(&op->dev, drvdata, res.start, &pdata);
477 473
478 if (tft_access) 474 err:
479 drvdata->flags |= PLB_ACCESS_FLAG; 475 kfree(drvdata);
480 476 return -ENODEV;
481 /* Arguments are passed based on the interface */
482 if (drvdata->flags & PLB_ACCESS_FLAG) {
483 return xilinxfb_assign(&op->dev, drvdata, res.start, &pdata);
484 } else {
485 drvdata->dcr_start = start;
486 drvdata->dcr_len = len;
487 drvdata->dcr_host = dcr_host;
488 return xilinxfb_assign(&op->dev, drvdata, 0, &pdata);
489 }
490} 477}
491 478
492static int __devexit xilinxfb_of_remove(struct of_device *op) 479static int __devexit xilinxfb_of_remove(struct of_device *op)
diff --git a/drivers/watchdog/mpc5200_wdt.c b/drivers/watchdog/mpc5200_wdt.c
index 465fe36adad4..fa9c47ce0ae7 100644
--- a/drivers/watchdog/mpc5200_wdt.c
+++ b/drivers/watchdog/mpc5200_wdt.c
@@ -188,7 +188,7 @@ static int mpc5200_wdt_probe(struct of_device *op,
188 if (!wdt) 188 if (!wdt)
189 return -ENOMEM; 189 return -ENOMEM;
190 190
191 wdt->ipb_freq = mpc52xx_find_ipb_freq(op->node); 191 wdt->ipb_freq = mpc5xxx_get_bus_frequency(op->node);
192 192
193 err = of_address_to_resource(op->node, 0, &wdt->mem); 193 err = of_address_to_resource(op->node, 0, &wdt->mem);
194 if (err) 194 if (err)
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h
index 244677cc082b..43fc95d822d5 100644
--- a/include/linux/fsl_devices.h
+++ b/include/linux/fsl_devices.h
@@ -79,10 +79,6 @@ struct fsl_spi_platform_data {
79 u16 max_chipselect; 79 u16 max_chipselect;
80 void (*cs_control)(struct spi_device *spi, bool on); 80 void (*cs_control)(struct spi_device *spi, bool on);
81 u32 sysclk; 81 u32 sysclk;
82
83 /* Legacy hooks, used by mpc52xx_psc_spi driver. */
84 void (*activate_cs)(u8 cs, u8 polarity);
85 void (*deactivate_cs)(u8 cs, u8 polarity);
86}; 82};
87 83
88struct mpc8xx_pcmcia_ops { 84struct mpc8xx_pcmcia_ops {