diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-19 20:40:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-19 20:40:40 -0400 |
commit | 773d7a09e1a1349a5319ac8665e9c612c6aa27d8 (patch) | |
tree | 3b2272bb3cfcab04ba6459cba116e577278c9392 /drivers | |
parent | 17fad5209e6b55148dbd20156cdaf2c7e67faa40 (diff) | |
parent | b71a107c66ad952c9d35ec046a803efc89a80556 (diff) |
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (35 commits)
powerpc/5121: make clock debug output more readable
powerpc/5xxx: Add common mpc5xxx_get_bus_frequency() function
powerpc/5200: Update pcm030.dts to add i2c eeprom and delete cruft
powerpc/5200: convert mpc52xx_psc_spi to use cs_control callback
fbdev/xilinxfb: Fix improper casting and tighen up probe path
usb/ps3: Add missing annotations
powerpc: Add memory clobber to mtspr()
powerpc: Fix invalid construct in our CPU selection Kconfig
ps3rom: Use ps3_system_bus_[gs]et_drvdata() instead of direct access
powerpc: Add configurable -Werror for arch/powerpc
of_serial: Add UPF_FIXED_TYPE flag
drivers/hvc: Add missing __devexit_p()
net/ps3: gelic - Add missing annotations
powerpc: Introduce macro spin_event_timeout()
powerpc/warp: Fix ISA_DMA_THRESHOLD default
powerpc/bootwrapper: Custom build options for XPedite52xx targets
powerpc/85xx: Add defconfig for X-ES MPC85xx boards
powerpc/85xx: Add dts files for X-ES MPC85xx boards
powerpc/85xx: Add platform support for X-ES MPC85xx boards
83xx: add support for the kmeter1 board.
...
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ata/pata_mpc52xx.c | 2 | ||||
-rw-r--r-- | drivers/char/hvc_iseries.c | 2 | ||||
-rw-r--r-- | drivers/char/hvc_vio.c | 2 | ||||
-rw-r--r-- | drivers/char/hvcs.c | 2 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-mpc.c | 2 | ||||
-rw-r--r-- | drivers/net/fec_mpc52xx.c | 2 | ||||
-rw-r--r-- | drivers/net/fec_mpc52xx_phy.c | 2 | ||||
-rw-r--r-- | drivers/net/ps3_gelic_net.c | 22 | ||||
-rw-r--r-- | drivers/net/ps3_gelic_wireless.c | 6 | ||||
-rw-r--r-- | drivers/rapidio/rio-scan.c | 43 | ||||
-rw-r--r-- | drivers/rapidio/rio-sysfs.c | 6 | ||||
-rw-r--r-- | drivers/scsi/ps3rom.c | 10 | ||||
-rw-r--r-- | drivers/serial/mpc52xx_uart.c | 5 | ||||
-rw-r--r-- | drivers/serial/of_serial.c | 2 | ||||
-rw-r--r-- | drivers/serial/ucc_uart.c | 19 | ||||
-rw-r--r-- | drivers/usb/host/ehci-ps3.c | 4 | ||||
-rw-r--r-- | drivers/usb/host/ohci-ps3.c | 4 | ||||
-rw-r--r-- | drivers/video/xilinxfb.c | 59 | ||||
-rw-r--r-- | drivers/watchdog/mpc5200_wdt.c | 2 |
19 files changed, 102 insertions, 94 deletions
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/char/hvc_iseries.c b/drivers/char/hvc_iseries.c index 449727b6166d..936d05bf37fa 100644 --- a/drivers/char/hvc_iseries.c +++ b/drivers/char/hvc_iseries.c | |||
@@ -241,7 +241,7 @@ static int __devexit hvc_vio_remove(struct vio_dev *vdev) | |||
241 | static struct vio_driver hvc_vio_driver = { | 241 | static struct vio_driver hvc_vio_driver = { |
242 | .id_table = hvc_driver_table, | 242 | .id_table = hvc_driver_table, |
243 | .probe = hvc_vio_probe, | 243 | .probe = hvc_vio_probe, |
244 | .remove = hvc_vio_remove, | 244 | .remove = __devexit_p(hvc_vio_remove), |
245 | .driver = { | 245 | .driver = { |
246 | .name = hvc_driver_name, | 246 | .name = hvc_driver_name, |
247 | .owner = THIS_MODULE, | 247 | .owner = THIS_MODULE, |
diff --git a/drivers/char/hvc_vio.c b/drivers/char/hvc_vio.c index bd62dc86b47d..c72b994652ac 100644 --- a/drivers/char/hvc_vio.c +++ b/drivers/char/hvc_vio.c | |||
@@ -113,7 +113,7 @@ static int __devexit hvc_vio_remove(struct vio_dev *vdev) | |||
113 | static struct vio_driver hvc_vio_driver = { | 113 | static struct vio_driver hvc_vio_driver = { |
114 | .id_table = hvc_driver_table, | 114 | .id_table = hvc_driver_table, |
115 | .probe = hvc_vio_probe, | 115 | .probe = hvc_vio_probe, |
116 | .remove = hvc_vio_remove, | 116 | .remove = __devexit_p(hvc_vio_remove), |
117 | .driver = { | 117 | .driver = { |
118 | .name = hvc_driver_name, | 118 | .name = hvc_driver_name, |
119 | .owner = THIS_MODULE, | 119 | .owner = THIS_MODULE, |
diff --git a/drivers/char/hvcs.c b/drivers/char/hvcs.c index 7d64e4230e66..266b858b8f85 100644 --- a/drivers/char/hvcs.c +++ b/drivers/char/hvcs.c | |||
@@ -868,7 +868,7 @@ static int __devexit hvcs_remove(struct vio_dev *dev) | |||
868 | static struct vio_driver hvcs_vio_driver = { | 868 | static struct vio_driver hvcs_vio_driver = { |
869 | .id_table = hvcs_driver_table, | 869 | .id_table = hvcs_driver_table, |
870 | .probe = hvcs_probe, | 870 | .probe = hvcs_probe, |
871 | .remove = hvcs_remove, | 871 | .remove = __devexit_p(hvcs_remove), |
872 | .driver = { | 872 | .driver = { |
873 | .name = hvcs_driver_name, | 873 | .name = hvcs_driver_name, |
874 | .owner = THIS_MODULE, | 874 | .owner = THIS_MODULE, |
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/net/ps3_gelic_net.c b/drivers/net/ps3_gelic_net.c index 2b38f39924a6..d1a5fb4d6acb 100644 --- a/drivers/net/ps3_gelic_net.c +++ b/drivers/net/ps3_gelic_net.c | |||
@@ -214,9 +214,10 @@ static void gelic_card_free_chain(struct gelic_card *card, | |||
214 | * | 214 | * |
215 | * returns 0 on success, <0 on failure | 215 | * returns 0 on success, <0 on failure |
216 | */ | 216 | */ |
217 | static int gelic_card_init_chain(struct gelic_card *card, | 217 | static int __devinit gelic_card_init_chain(struct gelic_card *card, |
218 | struct gelic_descr_chain *chain, | 218 | struct gelic_descr_chain *chain, |
219 | struct gelic_descr *start_descr, int no) | 219 | struct gelic_descr *start_descr, |
220 | int no) | ||
220 | { | 221 | { |
221 | int i; | 222 | int i; |
222 | struct gelic_descr *descr; | 223 | struct gelic_descr *descr; |
@@ -407,7 +408,7 @@ rewind: | |||
407 | * | 408 | * |
408 | * returns 0 on success, < 0 on failure | 409 | * returns 0 on success, < 0 on failure |
409 | */ | 410 | */ |
410 | static int gelic_card_alloc_rx_skbs(struct gelic_card *card) | 411 | static int __devinit gelic_card_alloc_rx_skbs(struct gelic_card *card) |
411 | { | 412 | { |
412 | struct gelic_descr_chain *chain; | 413 | struct gelic_descr_chain *chain; |
413 | int ret; | 414 | int ret; |
@@ -1422,8 +1423,8 @@ static const struct net_device_ops gelic_netdevice_ops = { | |||
1422 | * | 1423 | * |
1423 | * fills out function pointers in the net_device structure | 1424 | * fills out function pointers in the net_device structure |
1424 | */ | 1425 | */ |
1425 | static void gelic_ether_setup_netdev_ops(struct net_device *netdev, | 1426 | static void __devinit gelic_ether_setup_netdev_ops(struct net_device *netdev, |
1426 | struct napi_struct *napi) | 1427 | struct napi_struct *napi) |
1427 | { | 1428 | { |
1428 | netdev->watchdog_timeo = GELIC_NET_WATCHDOG_TIMEOUT; | 1429 | netdev->watchdog_timeo = GELIC_NET_WATCHDOG_TIMEOUT; |
1429 | /* NAPI */ | 1430 | /* NAPI */ |
@@ -1443,7 +1444,8 @@ static void gelic_ether_setup_netdev_ops(struct net_device *netdev, | |||
1443 | * gelic_ether_setup_netdev initializes the net_device structure | 1444 | * gelic_ether_setup_netdev initializes the net_device structure |
1444 | * and register it. | 1445 | * and register it. |
1445 | **/ | 1446 | **/ |
1446 | int gelic_net_setup_netdev(struct net_device *netdev, struct gelic_card *card) | 1447 | int __devinit gelic_net_setup_netdev(struct net_device *netdev, |
1448 | struct gelic_card *card) | ||
1447 | { | 1449 | { |
1448 | int status; | 1450 | int status; |
1449 | u64 v1, v2; | 1451 | u64 v1, v2; |
@@ -1491,7 +1493,7 @@ int gelic_net_setup_netdev(struct net_device *netdev, struct gelic_card *card) | |||
1491 | * the card and net_device structures are linked to each other | 1493 | * the card and net_device structures are linked to each other |
1492 | */ | 1494 | */ |
1493 | #define GELIC_ALIGN (32) | 1495 | #define GELIC_ALIGN (32) |
1494 | static struct gelic_card *gelic_alloc_card_net(struct net_device **netdev) | 1496 | static struct gelic_card * __devinit gelic_alloc_card_net(struct net_device **netdev) |
1495 | { | 1497 | { |
1496 | struct gelic_card *card; | 1498 | struct gelic_card *card; |
1497 | struct gelic_port *port; | 1499 | struct gelic_port *port; |
@@ -1542,7 +1544,7 @@ static struct gelic_card *gelic_alloc_card_net(struct net_device **netdev) | |||
1542 | return card; | 1544 | return card; |
1543 | } | 1545 | } |
1544 | 1546 | ||
1545 | static void gelic_card_get_vlan_info(struct gelic_card *card) | 1547 | static void __devinit gelic_card_get_vlan_info(struct gelic_card *card) |
1546 | { | 1548 | { |
1547 | u64 v1, v2; | 1549 | u64 v1, v2; |
1548 | int status; | 1550 | int status; |
@@ -1616,7 +1618,7 @@ static void gelic_card_get_vlan_info(struct gelic_card *card) | |||
1616 | /** | 1618 | /** |
1617 | * ps3_gelic_driver_probe - add a device to the control of this driver | 1619 | * ps3_gelic_driver_probe - add a device to the control of this driver |
1618 | */ | 1620 | */ |
1619 | static int ps3_gelic_driver_probe(struct ps3_system_bus_device *dev) | 1621 | static int __devinit ps3_gelic_driver_probe(struct ps3_system_bus_device *dev) |
1620 | { | 1622 | { |
1621 | struct gelic_card *card; | 1623 | struct gelic_card *card; |
1622 | struct net_device *netdev; | 1624 | struct net_device *netdev; |
diff --git a/drivers/net/ps3_gelic_wireless.c b/drivers/net/ps3_gelic_wireless.c index 4f3ada622f9b..b6b3ca9bdb21 100644 --- a/drivers/net/ps3_gelic_wireless.c +++ b/drivers/net/ps3_gelic_wireless.c | |||
@@ -2442,7 +2442,7 @@ static const struct iw_handler_def gelic_wl_wext_handler_def = { | |||
2442 | #endif | 2442 | #endif |
2443 | }; | 2443 | }; |
2444 | 2444 | ||
2445 | static struct net_device *gelic_wl_alloc(struct gelic_card *card) | 2445 | static struct net_device * __devinit gelic_wl_alloc(struct gelic_card *card) |
2446 | { | 2446 | { |
2447 | struct net_device *netdev; | 2447 | struct net_device *netdev; |
2448 | struct gelic_port *port; | 2448 | struct gelic_port *port; |
@@ -2722,7 +2722,7 @@ static struct ethtool_ops gelic_wl_ethtool_ops = { | |||
2722 | .set_rx_csum = gelic_net_set_rx_csum, | 2722 | .set_rx_csum = gelic_net_set_rx_csum, |
2723 | }; | 2723 | }; |
2724 | 2724 | ||
2725 | static void gelic_wl_setup_netdev_ops(struct net_device *netdev) | 2725 | static void __devinit gelic_wl_setup_netdev_ops(struct net_device *netdev) |
2726 | { | 2726 | { |
2727 | struct gelic_wl_info *wl; | 2727 | struct gelic_wl_info *wl; |
2728 | wl = port_wl(netdev_priv(netdev)); | 2728 | wl = port_wl(netdev_priv(netdev)); |
@@ -2738,7 +2738,7 @@ static void gelic_wl_setup_netdev_ops(struct net_device *netdev) | |||
2738 | /* | 2738 | /* |
2739 | * driver probe/remove | 2739 | * driver probe/remove |
2740 | */ | 2740 | */ |
2741 | int gelic_wl_driver_probe(struct gelic_card *card) | 2741 | int __devinit gelic_wl_driver_probe(struct gelic_card *card) |
2742 | { | 2742 | { |
2743 | int ret; | 2743 | int ret; |
2744 | struct net_device *netdev; | 2744 | struct net_device *netdev; |
diff --git a/drivers/rapidio/rio-scan.c b/drivers/rapidio/rio-scan.c index 3b78540288c7..45415096c294 100644 --- a/drivers/rapidio/rio-scan.c +++ b/drivers/rapidio/rio-scan.c | |||
@@ -263,15 +263,21 @@ static void rio_route_set_ops(struct rio_dev *rdev) | |||
263 | * device to the RIO device list. Creates the generic sysfs nodes | 263 | * device to the RIO device list. Creates the generic sysfs nodes |
264 | * for an RIO device. | 264 | * for an RIO device. |
265 | */ | 265 | */ |
266 | static void __devinit rio_add_device(struct rio_dev *rdev) | 266 | static int __devinit rio_add_device(struct rio_dev *rdev) |
267 | { | 267 | { |
268 | device_add(&rdev->dev); | 268 | int err; |
269 | |||
270 | err = device_add(&rdev->dev); | ||
271 | if (err) | ||
272 | return err; | ||
269 | 273 | ||
270 | spin_lock(&rio_global_list_lock); | 274 | spin_lock(&rio_global_list_lock); |
271 | list_add_tail(&rdev->global_list, &rio_devices); | 275 | list_add_tail(&rdev->global_list, &rio_devices); |
272 | spin_unlock(&rio_global_list_lock); | 276 | spin_unlock(&rio_global_list_lock); |
273 | 277 | ||
274 | rio_create_sysfs_dev_files(rdev); | 278 | rio_create_sysfs_dev_files(rdev); |
279 | |||
280 | return 0; | ||
275 | } | 281 | } |
276 | 282 | ||
277 | /** | 283 | /** |
@@ -294,13 +300,14 @@ static struct rio_dev __devinit *rio_setup_device(struct rio_net *net, | |||
294 | struct rio_mport *port, u16 destid, | 300 | struct rio_mport *port, u16 destid, |
295 | u8 hopcount, int do_enum) | 301 | u8 hopcount, int do_enum) |
296 | { | 302 | { |
303 | int ret = 0; | ||
297 | struct rio_dev *rdev; | 304 | struct rio_dev *rdev; |
298 | struct rio_switch *rswitch; | 305 | struct rio_switch *rswitch = NULL; |
299 | int result, rdid; | 306 | int result, rdid; |
300 | 307 | ||
301 | rdev = kzalloc(sizeof(struct rio_dev), GFP_KERNEL); | 308 | rdev = kzalloc(sizeof(struct rio_dev), GFP_KERNEL); |
302 | if (!rdev) | 309 | if (!rdev) |
303 | goto out; | 310 | return NULL; |
304 | 311 | ||
305 | rdev->net = net; | 312 | rdev->net = net; |
306 | rio_mport_read_config_32(port, destid, hopcount, RIO_DEV_ID_CAR, | 313 | rio_mport_read_config_32(port, destid, hopcount, RIO_DEV_ID_CAR, |
@@ -343,23 +350,16 @@ static struct rio_dev __devinit *rio_setup_device(struct rio_net *net, | |||
343 | rio_mport_read_config_32(port, destid, hopcount, | 350 | rio_mport_read_config_32(port, destid, hopcount, |
344 | RIO_SWP_INFO_CAR, &rdev->swpinfo); | 351 | RIO_SWP_INFO_CAR, &rdev->swpinfo); |
345 | rswitch = kmalloc(sizeof(struct rio_switch), GFP_KERNEL); | 352 | rswitch = kmalloc(sizeof(struct rio_switch), GFP_KERNEL); |
346 | if (!rswitch) { | 353 | if (!rswitch) |
347 | kfree(rdev); | 354 | goto cleanup; |
348 | rdev = NULL; | ||
349 | goto out; | ||
350 | } | ||
351 | rswitch->switchid = next_switchid; | 355 | rswitch->switchid = next_switchid; |
352 | rswitch->hopcount = hopcount; | 356 | rswitch->hopcount = hopcount; |
353 | rswitch->destid = destid; | 357 | rswitch->destid = destid; |
354 | rswitch->route_table = kzalloc(sizeof(u8)* | 358 | rswitch->route_table = kzalloc(sizeof(u8)* |
355 | RIO_MAX_ROUTE_ENTRIES(port->sys_size), | 359 | RIO_MAX_ROUTE_ENTRIES(port->sys_size), |
356 | GFP_KERNEL); | 360 | GFP_KERNEL); |
357 | if (!rswitch->route_table) { | 361 | if (!rswitch->route_table) |
358 | kfree(rdev); | 362 | goto cleanup; |
359 | rdev = NULL; | ||
360 | kfree(rswitch); | ||
361 | goto out; | ||
362 | } | ||
363 | /* Initialize switch route table */ | 363 | /* Initialize switch route table */ |
364 | for (rdid = 0; rdid < RIO_MAX_ROUTE_ENTRIES(port->sys_size); | 364 | for (rdid = 0; rdid < RIO_MAX_ROUTE_ENTRIES(port->sys_size); |
365 | rdid++) | 365 | rdid++) |
@@ -390,10 +390,19 @@ static struct rio_dev __devinit *rio_setup_device(struct rio_net *net, | |||
390 | rio_init_dbell_res(&rdev->riores[RIO_DOORBELL_RESOURCE], | 390 | rio_init_dbell_res(&rdev->riores[RIO_DOORBELL_RESOURCE], |
391 | 0, 0xffff); | 391 | 0, 0xffff); |
392 | 392 | ||
393 | rio_add_device(rdev); | 393 | ret = rio_add_device(rdev); |
394 | if (ret) | ||
395 | goto cleanup; | ||
394 | 396 | ||
395 | out: | ||
396 | return rdev; | 397 | return rdev; |
398 | |||
399 | cleanup: | ||
400 | if (rswitch) { | ||
401 | kfree(rswitch->route_table); | ||
402 | kfree(rswitch); | ||
403 | } | ||
404 | kfree(rdev); | ||
405 | return NULL; | ||
397 | } | 406 | } |
398 | 407 | ||
399 | /** | 408 | /** |
diff --git a/drivers/rapidio/rio-sysfs.c b/drivers/rapidio/rio-sysfs.c index 97a147f050d6..ba742e82c57d 100644 --- a/drivers/rapidio/rio-sysfs.c +++ b/drivers/rapidio/rio-sysfs.c | |||
@@ -214,9 +214,11 @@ static struct bin_attribute rio_config_attr = { | |||
214 | */ | 214 | */ |
215 | int rio_create_sysfs_dev_files(struct rio_dev *rdev) | 215 | int rio_create_sysfs_dev_files(struct rio_dev *rdev) |
216 | { | 216 | { |
217 | sysfs_create_bin_file(&rdev->dev.kobj, &rio_config_attr); | 217 | int err = 0; |
218 | 218 | ||
219 | return 0; | 219 | err = sysfs_create_bin_file(&rdev->dev.kobj, &rio_config_attr); |
220 | |||
221 | return err; | ||
220 | } | 222 | } |
221 | 223 | ||
222 | /** | 224 | /** |
diff --git a/drivers/scsi/ps3rom.c b/drivers/scsi/ps3rom.c index ca0dd33497ec..db90caf43f42 100644 --- a/drivers/scsi/ps3rom.c +++ b/drivers/scsi/ps3rom.c | |||
@@ -299,7 +299,7 @@ static irqreturn_t ps3rom_interrupt(int irq, void *data) | |||
299 | return IRQ_HANDLED; | 299 | return IRQ_HANDLED; |
300 | } | 300 | } |
301 | 301 | ||
302 | host = dev->sbd.core.driver_data; | 302 | host = ps3_system_bus_get_drvdata(&dev->sbd); |
303 | priv = shost_priv(host); | 303 | priv = shost_priv(host); |
304 | cmd = priv->curr_cmd; | 304 | cmd = priv->curr_cmd; |
305 | 305 | ||
@@ -387,7 +387,7 @@ static int __devinit ps3rom_probe(struct ps3_system_bus_device *_dev) | |||
387 | } | 387 | } |
388 | 388 | ||
389 | priv = shost_priv(host); | 389 | priv = shost_priv(host); |
390 | dev->sbd.core.driver_data = host; | 390 | ps3_system_bus_set_drvdata(&dev->sbd, host); |
391 | priv->dev = dev; | 391 | priv->dev = dev; |
392 | 392 | ||
393 | /* One device/LUN per SCSI bus */ | 393 | /* One device/LUN per SCSI bus */ |
@@ -407,7 +407,7 @@ static int __devinit ps3rom_probe(struct ps3_system_bus_device *_dev) | |||
407 | 407 | ||
408 | fail_host_put: | 408 | fail_host_put: |
409 | scsi_host_put(host); | 409 | scsi_host_put(host); |
410 | dev->sbd.core.driver_data = NULL; | 410 | ps3_system_bus_set_drvdata(&dev->sbd, NULL); |
411 | fail_teardown: | 411 | fail_teardown: |
412 | ps3stor_teardown(dev); | 412 | ps3stor_teardown(dev); |
413 | fail_free_bounce: | 413 | fail_free_bounce: |
@@ -418,12 +418,12 @@ fail_free_bounce: | |||
418 | static int ps3rom_remove(struct ps3_system_bus_device *_dev) | 418 | static int ps3rom_remove(struct ps3_system_bus_device *_dev) |
419 | { | 419 | { |
420 | struct ps3_storage_device *dev = to_ps3_storage_device(&_dev->core); | 420 | struct ps3_storage_device *dev = to_ps3_storage_device(&_dev->core); |
421 | struct Scsi_Host *host = dev->sbd.core.driver_data; | 421 | struct Scsi_Host *host = ps3_system_bus_get_drvdata(&dev->sbd); |
422 | 422 | ||
423 | scsi_remove_host(host); | 423 | scsi_remove_host(host); |
424 | ps3stor_teardown(dev); | 424 | ps3stor_teardown(dev); |
425 | scsi_host_put(host); | 425 | scsi_host_put(host); |
426 | dev->sbd.core.driver_data = NULL; | 426 | ps3_system_bus_set_drvdata(&dev->sbd, NULL); |
427 | kfree(dev->bounce_buf); | 427 | kfree(dev->bounce_buf); |
428 | return 0; | 428 | return 0; |
429 | } | 429 | } |
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 | ||
260 | static struct psc_ops mpc52xx_psc_ops = { | 259 | static struct psc_ops mpc52xx_psc_ops = { |
@@ -391,7 +390,7 @@ static void mpc512x_psc_cw_restore_ints(struct uart_port *port) | |||
391 | 390 | ||
392 | static unsigned long mpc512x_getuartclk(void *p) | 391 | static 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 | ||
397 | static struct psc_ops mpc512x_psc_ops = { | 396 | static struct psc_ops mpc512x_psc_ops = { |
diff --git a/drivers/serial/of_serial.c b/drivers/serial/of_serial.c index 54483cd3529e..02406ba6da1c 100644 --- a/drivers/serial/of_serial.c +++ b/drivers/serial/of_serial.c | |||
@@ -67,7 +67,7 @@ static int __devinit of_platform_serial_setup(struct of_device *ofdev, | |||
67 | port->type = type; | 67 | port->type = type; |
68 | port->uartclk = *clk; | 68 | port->uartclk = *clk; |
69 | port->flags = UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF | UPF_IOREMAP | 69 | port->flags = UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF | UPF_IOREMAP |
70 | | UPF_FIXED_PORT; | 70 | | UPF_FIXED_PORT | UPF_FIXED_TYPE; |
71 | port->dev = &ofdev->dev; | 71 | port->dev = &ofdev->dev; |
72 | /* If current-speed was set, then try not to change it. */ | 72 | /* If current-speed was set, then try not to change it. */ |
73 | if (spd) | 73 | if (spd) |
diff --git a/drivers/serial/ucc_uart.c b/drivers/serial/ucc_uart.c index 7de66c06b05d..e945e780b5c9 100644 --- a/drivers/serial/ucc_uart.c +++ b/drivers/serial/ucc_uart.c | |||
@@ -681,22 +681,27 @@ static void qe_uart_init_ucc(struct uart_qe_port *qe_port) | |||
681 | out_be16(&uccup->rccm, 0xc0ff); | 681 | out_be16(&uccup->rccm, 0xc0ff); |
682 | 682 | ||
683 | /* Configure the GUMR registers for UART */ | 683 | /* Configure the GUMR registers for UART */ |
684 | if (soft_uart) | 684 | if (soft_uart) { |
685 | /* Soft-UART requires a 1X multiplier for TX */ | 685 | /* Soft-UART requires a 1X multiplier for TX */ |
686 | clrsetbits_be32(&uccp->gumr_l, | 686 | clrsetbits_be32(&uccp->gumr_l, |
687 | UCC_SLOW_GUMR_L_MODE_MASK | UCC_SLOW_GUMR_L_TDCR_MASK | | 687 | UCC_SLOW_GUMR_L_MODE_MASK | UCC_SLOW_GUMR_L_TDCR_MASK | |
688 | UCC_SLOW_GUMR_L_RDCR_MASK, | 688 | UCC_SLOW_GUMR_L_RDCR_MASK, |
689 | UCC_SLOW_GUMR_L_MODE_UART | UCC_SLOW_GUMR_L_TDCR_1 | | 689 | UCC_SLOW_GUMR_L_MODE_UART | UCC_SLOW_GUMR_L_TDCR_1 | |
690 | UCC_SLOW_GUMR_L_RDCR_16); | 690 | UCC_SLOW_GUMR_L_RDCR_16); |
691 | else | 691 | |
692 | clrsetbits_be32(&uccp->gumr_h, UCC_SLOW_GUMR_H_RFW, | ||
693 | UCC_SLOW_GUMR_H_TRX | UCC_SLOW_GUMR_H_TTX); | ||
694 | } else { | ||
692 | clrsetbits_be32(&uccp->gumr_l, | 695 | clrsetbits_be32(&uccp->gumr_l, |
693 | UCC_SLOW_GUMR_L_MODE_MASK | UCC_SLOW_GUMR_L_TDCR_MASK | | 696 | UCC_SLOW_GUMR_L_MODE_MASK | UCC_SLOW_GUMR_L_TDCR_MASK | |
694 | UCC_SLOW_GUMR_L_RDCR_MASK, | 697 | UCC_SLOW_GUMR_L_RDCR_MASK, |
695 | UCC_SLOW_GUMR_L_MODE_UART | UCC_SLOW_GUMR_L_TDCR_16 | | 698 | UCC_SLOW_GUMR_L_MODE_UART | UCC_SLOW_GUMR_L_TDCR_16 | |
696 | UCC_SLOW_GUMR_L_RDCR_16); | 699 | UCC_SLOW_GUMR_L_RDCR_16); |
697 | 700 | ||
698 | clrsetbits_be32(&uccp->gumr_h, UCC_SLOW_GUMR_H_RFW, | 701 | clrsetbits_be32(&uccp->gumr_h, |
699 | UCC_SLOW_GUMR_H_TRX | UCC_SLOW_GUMR_H_TTX); | 702 | UCC_SLOW_GUMR_H_TRX | UCC_SLOW_GUMR_H_TTX, |
703 | UCC_SLOW_GUMR_H_RFW); | ||
704 | } | ||
700 | 705 | ||
701 | #ifdef LOOPBACK | 706 | #ifdef LOOPBACK |
702 | clrsetbits_be32(&uccp->gumr_l, UCC_SLOW_GUMR_L_DIAG_MASK, | 707 | clrsetbits_be32(&uccp->gumr_l, UCC_SLOW_GUMR_L_DIAG_MASK, |
@@ -706,7 +711,7 @@ static void qe_uart_init_ucc(struct uart_qe_port *qe_port) | |||
706 | UCC_SLOW_GUMR_H_CDS); | 711 | UCC_SLOW_GUMR_H_CDS); |
707 | #endif | 712 | #endif |
708 | 713 | ||
709 | /* Enable rx interrupts and clear all pending events. */ | 714 | /* Disable rx interrupts and clear all pending events. */ |
710 | out_be16(&uccp->uccm, 0); | 715 | out_be16(&uccp->uccm, 0); |
711 | out_be16(&uccp->ucce, 0xffff); | 716 | out_be16(&uccp->ucce, 0xffff); |
712 | out_be16(&uccp->udsr, 0x7e7e); | 717 | out_be16(&uccp->udsr, 0x7e7e); |
@@ -765,6 +770,10 @@ static void qe_uart_init_ucc(struct uart_qe_port *qe_port) | |||
765 | cecr_subblock = ucc_slow_get_qe_cr_subblock(qe_port->ucc_num); | 770 | cecr_subblock = ucc_slow_get_qe_cr_subblock(qe_port->ucc_num); |
766 | qe_issue_cmd(QE_INIT_TX_RX, cecr_subblock, | 771 | qe_issue_cmd(QE_INIT_TX_RX, cecr_subblock, |
767 | QE_CR_PROTOCOL_UNSPECIFIED, 0); | 772 | QE_CR_PROTOCOL_UNSPECIFIED, 0); |
773 | } else { | ||
774 | cecr_subblock = ucc_slow_get_qe_cr_subblock(qe_port->ucc_num); | ||
775 | qe_issue_cmd(QE_INIT_TX_RX, cecr_subblock, | ||
776 | QE_CR_PROTOCOL_UART, 0); | ||
768 | } | 777 | } |
769 | } | 778 | } |
770 | 779 | ||
diff --git a/drivers/usb/host/ehci-ps3.c b/drivers/usb/host/ehci-ps3.c index eecd2a0680a2..93f7035d00a1 100644 --- a/drivers/usb/host/ehci-ps3.c +++ b/drivers/usb/host/ehci-ps3.c | |||
@@ -77,7 +77,7 @@ static const struct hc_driver ps3_ehci_hc_driver = { | |||
77 | .port_handed_over = ehci_port_handed_over, | 77 | .port_handed_over = ehci_port_handed_over, |
78 | }; | 78 | }; |
79 | 79 | ||
80 | static int ps3_ehci_probe(struct ps3_system_bus_device *dev) | 80 | static int __devinit ps3_ehci_probe(struct ps3_system_bus_device *dev) |
81 | { | 81 | { |
82 | int result; | 82 | int result; |
83 | struct usb_hcd *hcd; | 83 | struct usb_hcd *hcd; |
@@ -225,7 +225,7 @@ static int ps3_ehci_remove(struct ps3_system_bus_device *dev) | |||
225 | return 0; | 225 | return 0; |
226 | } | 226 | } |
227 | 227 | ||
228 | static int ps3_ehci_driver_register(struct ps3_system_bus_driver *drv) | 228 | static int __init ps3_ehci_driver_register(struct ps3_system_bus_driver *drv) |
229 | { | 229 | { |
230 | return firmware_has_feature(FW_FEATURE_PS3_LV1) | 230 | return firmware_has_feature(FW_FEATURE_PS3_LV1) |
231 | ? ps3_system_bus_driver_register(drv) | 231 | ? ps3_system_bus_driver_register(drv) |
diff --git a/drivers/usb/host/ohci-ps3.c b/drivers/usb/host/ohci-ps3.c index 1d56259c5db1..700950455f4d 100644 --- a/drivers/usb/host/ohci-ps3.c +++ b/drivers/usb/host/ohci-ps3.c | |||
@@ -75,7 +75,7 @@ static const struct hc_driver ps3_ohci_hc_driver = { | |||
75 | #endif | 75 | #endif |
76 | }; | 76 | }; |
77 | 77 | ||
78 | static int ps3_ohci_probe(struct ps3_system_bus_device *dev) | 78 | static int __devinit ps3_ohci_probe(struct ps3_system_bus_device *dev) |
79 | { | 79 | { |
80 | int result; | 80 | int result; |
81 | struct usb_hcd *hcd; | 81 | struct usb_hcd *hcd; |
@@ -224,7 +224,7 @@ static int ps3_ohci_remove(struct ps3_system_bus_device *dev) | |||
224 | return 0; | 224 | return 0; |
225 | } | 225 | } |
226 | 226 | ||
227 | static int ps3_ohci_driver_register(struct ps3_system_bus_driver *drv) | 227 | static int __init ps3_ohci_driver_register(struct ps3_system_bus_driver *drv) |
228 | { | 228 | { |
229 | return firmware_has_feature(FW_FEATURE_PS3_LV1) | 229 | return firmware_has_feature(FW_FEATURE_PS3_LV1) |
230 | ? ps3_system_bus_driver_register(drv) | 230 | ? ps3_system_bus_driver_register(drv) |
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 | ||
492 | static int __devexit xilinxfb_of_remove(struct of_device *op) | 479 | static 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) |