From 23386fe572028ca0f9249fb3c71ed31b54cf1665 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Fri, 18 Apr 2008 13:33:53 -0700 Subject: [POWERPC] macintosh/windfarm: Fix platform driver hotplug/coldplug Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is prefixed with "platform:". Add MODULE_ALIAS() to the hotpluggable "macintosh" platform drivers, to re-enable auto loading. [dbrownell@users.sourceforge.net: registration fixes] Signed-off-by: Kay Sievers Signed-off-by: David Brownell Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Paul Mackerras --- drivers/macintosh/windfarm_pm112.c | 3 ++- drivers/macintosh/windfarm_pm81.c | 4 ++-- drivers/macintosh/windfarm_pm91.c | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/macintosh/windfarm_pm112.c b/drivers/macintosh/windfarm_pm112.c index b3fbb45bc90..73d695dc9e5 100644 --- a/drivers/macintosh/windfarm_pm112.c +++ b/drivers/macintosh/windfarm_pm112.c @@ -668,7 +668,7 @@ static struct platform_driver wf_pm112_driver = { .remove = __devexit_p(wf_pm112_remove), .driver = { .name = "windfarm", - .bus = &platform_bus_type, + .owner = THIS_MODULE, }, }; @@ -711,3 +711,4 @@ module_exit(wf_pm112_exit); MODULE_AUTHOR("Paul Mackerras "); MODULE_DESCRIPTION("Thermal control for PowerMac11,2"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:windfarm"); diff --git a/drivers/macintosh/windfarm_pm81.c b/drivers/macintosh/windfarm_pm81.c index f24fa734046..abbe206474f 100644 --- a/drivers/macintosh/windfarm_pm81.c +++ b/drivers/macintosh/windfarm_pm81.c @@ -770,7 +770,7 @@ static struct platform_driver wf_smu_driver = { .remove = __devexit_p(wf_smu_remove), .driver = { .name = "windfarm", - .bus = &platform_bus_type, + .owner = THIS_MODULE, }, }; @@ -810,4 +810,4 @@ module_exit(wf_smu_exit); MODULE_AUTHOR("Benjamin Herrenschmidt "); MODULE_DESCRIPTION("Thermal control logic for iMac G5"); MODULE_LICENSE("GPL"); - +MODULE_ALIAS("platform:windfarm"); diff --git a/drivers/macintosh/windfarm_pm91.c b/drivers/macintosh/windfarm_pm91.c index 26eee69ebe6..764c525b211 100644 --- a/drivers/macintosh/windfarm_pm91.c +++ b/drivers/macintosh/windfarm_pm91.c @@ -702,7 +702,7 @@ static struct platform_driver wf_smu_driver = { .remove = __devexit_p(wf_smu_remove), .driver = { .name = "windfarm", - .bus = &platform_bus_type, + .owner = THIS_MODULE, }, }; @@ -742,3 +742,4 @@ MODULE_AUTHOR("Benjamin Herrenschmidt "); MODULE_DESCRIPTION("Thermal control logic for PowerMac9,1"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:windfarm"); -- cgit v1.2.3 From 1d32e21889b96e594e8b63b193bf7d2a51ab93ec Mon Sep 17 00:00:00 2001 From: Geoff Levand Date: Thu, 10 Apr 2008 07:01:53 +1000 Subject: [POWERPC] PS3: Fix gelic net module dependency The PS3 gelic network driver depends on the wake-on-lan support provided by the PS3 sys manager driver. Add that dependency to the GELIC_NET Kconfig option. Prevents these build errors: ps3_gelic_net.c:1277: undefined reference to `.ps3_sys_manager_get_wol' ps3_gelic_net.c:1337: undefined reference to `.ps3_sys_manager_set_wol' CC: Masakazu Mokuno CC: Jeff Garzik Signed-off-by: Geoff Levand Signed-off-by: Paul Mackerras --- drivers/net/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 2399a3796f6..d46d9498040 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -2278,6 +2278,7 @@ config TSI108_ETH config GELIC_NET tristate "PS3 Gigabit Ethernet driver" depends on PPC_PS3 + select PS3_SYS_MANAGER help This driver supports the network device on the PS3 game console. This driver has built-in support for Ethernet. -- cgit v1.2.3 From 138decf83f6a973951ce7faf39094d964de7853a Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Wed, 23 Apr 2008 19:51:34 +1000 Subject: [POWERPC] drivers/of/of_i2c.c: Add MODULE_LICENSE After commit 585468e5d5962660867c269e26f0a4b89a599473 ([POWERPC] i2c: Fix build breakage introduced by OF helpers) drivers/of/of_i2c.c needs a MODULE_LICENSE. Signed-off-by: Adrian Bunk Signed-off-by: Paul Mackerras --- drivers/of/of_i2c.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers') diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c index 63168917115..715a4447161 100644 --- a/drivers/of/of_i2c.c +++ b/drivers/of/of_i2c.c @@ -13,6 +13,7 @@ #include #include +#include struct i2c_driver_device { char *of_device; @@ -113,3 +114,5 @@ void of_register_i2c_devices(struct i2c_adapter *adap, } } EXPORT_SYMBOL(of_register_i2c_devices); + +MODULE_LICENSE("GPL"); -- cgit v1.2.3 From 2fd53e02be9a73cc49d69e0ff8860daa7b5bf8ab Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Wed, 23 Apr 2008 19:51:38 +1000 Subject: [POWERPC] char/xilinx_hwicap/ section fix This patch fixes the following build error: <-- snip --> ... CC [M] drivers/char/xilinx_hwicap/xilinx_hwicap.o ... /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/char/xilinx_hwicap/xilinx_hwicap.c:806: error: hwicap_of_match causes a section type conflict /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/char/xilinx_hwicap/xilinx_hwicap.c:806: error: hwicap_of_match causes a section type conflict make[4]: *** [drivers/char/xilinx_hwicap/xilinx_hwicap.o] Error 1 <-- snip --> Signed-off-by: Adrian Bunk Signed-off-by: Paul Mackerras --- drivers/char/xilinx_hwicap/xilinx_hwicap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/char/xilinx_hwicap/xilinx_hwicap.c b/drivers/char/xilinx_hwicap/xilinx_hwicap.c index 016f90567a5..dfe6907ae15 100644 --- a/drivers/char/xilinx_hwicap/xilinx_hwicap.c +++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.c @@ -803,7 +803,7 @@ static int __devexit hwicap_of_remove(struct of_device *op) } /* Match table for of_platform binding */ -static const struct of_device_id __devinit hwicap_of_match[] = { +static const struct of_device_id __devinitconst hwicap_of_match[] = { { .compatible = "xlnx,opb-hwicap-1.00.b", .data = &buffer_icap_config}, { .compatible = "xlnx,xps-hwicap-1.00.a", .data = &fifo_icap_config}, {}, -- cgit v1.2.3 From b912b5e2cfb35c02c9c79d3f6e31753f3be4dd83 Mon Sep 17 00:00:00 2001 From: John Linn Date: Thu, 3 Apr 2008 10:22:19 +1100 Subject: [POWERPC] Xilinx: of_serial support for Xilinx uart 16550. The Xilinx 16550 uart core is not a standard 16550 because it uses word-based addressing rather than byte-based addressing. With additional properties it is compatible with the open firmware 'ns16550' compatible binding. This code updates the of_serial driver to handle the reg-offset and reg-shift properties to enable this core to be used. Signed-off-by: John Linn Acked-by: Arnd Bergmann Signed-off-by: Josh Boyer --- drivers/serial/of_serial.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/serial/of_serial.c b/drivers/serial/of_serial.c index 8aacfb78dea..25029c7570b 100644 --- a/drivers/serial/of_serial.c +++ b/drivers/serial/of_serial.c @@ -31,7 +31,8 @@ static int __devinit of_platform_serial_setup(struct of_device *ofdev, struct resource resource; struct device_node *np = ofdev->node; const unsigned int *clk, *spd; - int ret; + const u32 *prop; + int ret, prop_size; memset(port, 0, sizeof *port); spd = of_get_property(np, "current-speed", NULL); @@ -49,6 +50,17 @@ static int __devinit of_platform_serial_setup(struct of_device *ofdev, spin_lock_init(&port->lock); port->mapbase = resource.start; + + /* Check for shifted address mapping */ + prop = of_get_property(np, "reg-offset", &prop_size); + if (prop && (prop_size == sizeof(u32))) + port->mapbase += *prop; + + /* Check for registers offset within the devices address range */ + prop = of_get_property(np, "reg-shift", &prop_size); + if (prop && (prop_size == sizeof(u32))) + port->regshift = *prop; + port->irq = irq_of_parse_and_map(np, 0); port->iotype = UPIO_MEM; port->type = type; -- cgit v1.2.3