From 792efb84670c5b4c58669645cb6fd7e943376ee0 Mon Sep 17 00:00:00 2001 From: "Lad, Prabhakar" Date: Tue, 7 May 2013 11:34:11 +0530 Subject: of/base: fix typos the function of_property_read_u8/16/32_array() has a parameter out_values, but the description mentioned it as out_value. This patch fixes this typo. Signed-off-by: Lad, Prabhakar Signed-off-by: Grant Likely --- drivers/of/base.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers') diff --git a/drivers/of/base.c b/drivers/of/base.c index f53b992..c1cfc45 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -809,7 +809,7 @@ EXPORT_SYMBOL_GPL(of_property_read_u32_index); * * @np: device node from which the property value is to be read. * @propname: name of the property to be searched. - * @out_value: pointer to return value, modified only if return value is 0. + * @out_values: pointer to return value, modified only if return value is 0. * @sz: number of array elements to read * * Search for a property in a device node and read 8-bit value(s) from @@ -820,7 +820,7 @@ EXPORT_SYMBOL_GPL(of_property_read_u32_index); * dts entry of array should be like: * property = /bits/ 8 <0x50 0x60 0x70>; * - * The out_value is modified only if a valid u8 value can be decoded. + * The out_values is modified only if a valid u8 value can be decoded. */ int of_property_read_u8_array(const struct device_node *np, const char *propname, u8 *out_values, size_t sz) @@ -842,7 +842,7 @@ EXPORT_SYMBOL_GPL(of_property_read_u8_array); * * @np: device node from which the property value is to be read. * @propname: name of the property to be searched. - * @out_value: pointer to return value, modified only if return value is 0. + * @out_values: pointer to return value, modified only if return value is 0. * @sz: number of array elements to read * * Search for a property in a device node and read 16-bit value(s) from @@ -853,7 +853,7 @@ EXPORT_SYMBOL_GPL(of_property_read_u8_array); * dts entry of array should be like: * property = /bits/ 16 <0x5000 0x6000 0x7000>; * - * The out_value is modified only if a valid u16 value can be decoded. + * The out_values is modified only if a valid u16 value can be decoded. */ int of_property_read_u16_array(const struct device_node *np, const char *propname, u16 *out_values, size_t sz) @@ -876,7 +876,7 @@ EXPORT_SYMBOL_GPL(of_property_read_u16_array); * * @np: device node from which the property value is to be read. * @propname: name of the property to be searched. - * @out_value: pointer to return value, modified only if return value is 0. + * @out_values: pointer to return value, modified only if return value is 0. * @sz: number of array elements to read * * Search for a property in a device node and read 32-bit value(s) from @@ -884,7 +884,7 @@ EXPORT_SYMBOL_GPL(of_property_read_u16_array); * -ENODATA if property does not have a value, and -EOVERFLOW if the * property data isn't large enough. * - * The out_value is modified only if a valid u32 value can be decoded. + * The out_values is modified only if a valid u32 value can be decoded. */ int of_property_read_u32_array(const struct device_node *np, const char *propname, u32 *out_values, -- cgit v1.1 From 10dbc5e39a60944536f3ca59bc9a8a8896355714 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Sun, 21 Apr 2013 16:38:31 -0500 Subject: driver core: move to_platform_driver to platform_device.h In converting the last remaining of_platform_driver (ibmebus) to a regular platform driver, to_platform_driver is needed to replace to_of_platform_driver. Signed-off-by: Rob Herring Acked-by: Arnd Bergmann Tested-by: Benjamin Herrenschmidt Signed-off-by: Grant Likely --- drivers/base/platform.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers') diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 9eda842..1bcb2a7 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -29,9 +29,6 @@ /* For automatically allocated device IDs */ static DEFINE_IDA(platform_devid_ida); -#define to_platform_driver(drv) (container_of((drv), struct platform_driver, \ - driver)) - struct device platform_bus = { .init_name = "platform", }; -- cgit v1.1 From c45640e4a9f54f2f6f4bc51c2ba9644ffb3babde Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Sat, 20 Apr 2013 21:51:08 -0500 Subject: ibmebus: convert of_platform_driver to platform_driver ibmebus is the last remaining user of of_platform_driver and the conversion to a regular platform driver is trivial. Signed-off-by: Rob Herring Acked-by: Arnd Bergmann Tested-by: Benjamin Herrenschmidt Signed-off-by: Grant Likely --- drivers/infiniband/hw/ehca/ehca_main.c | 5 ++--- drivers/net/ethernet/ibm/ehea/ehea_main.c | 8 +++----- 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'drivers') diff --git a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c index f8a6291..982e3ef 100644 --- a/drivers/infiniband/hw/ehca/ehca_main.c +++ b/drivers/infiniband/hw/ehca/ehca_main.c @@ -713,8 +713,7 @@ static struct attribute_group ehca_dev_attr_grp = { .attrs = ehca_dev_attrs }; -static int ehca_probe(struct platform_device *dev, - const struct of_device_id *id) +static int ehca_probe(struct platform_device *dev) { struct ehca_shca *shca; const u64 *handle; @@ -937,7 +936,7 @@ static struct of_device_id ehca_device_table[] = }; MODULE_DEVICE_TABLE(of, ehca_device_table); -static struct of_platform_driver ehca_driver = { +static struct platform_driver ehca_driver = { .probe = ehca_probe, .remove = ehca_remove, .driver = { diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c index 90ea0b1..de2969c 100644 --- a/drivers/net/ethernet/ibm/ehea/ehea_main.c +++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c @@ -98,8 +98,7 @@ static struct ehea_fw_handle_array ehea_fw_handles; static struct ehea_bcmc_reg_array ehea_bcmc_regs; -static int ehea_probe_adapter(struct platform_device *dev, - const struct of_device_id *id); +static int ehea_probe_adapter(struct platform_device *dev); static int ehea_remove(struct platform_device *dev); @@ -112,7 +111,7 @@ static struct of_device_id ehea_device_table[] = { }; MODULE_DEVICE_TABLE(of, ehea_device_table); -static struct of_platform_driver ehea_driver = { +static struct platform_driver ehea_driver = { .driver = { .name = "ehea", .owner = THIS_MODULE, @@ -3251,8 +3250,7 @@ static void ehea_remove_device_sysfs(struct platform_device *dev) device_remove_file(&dev->dev, &dev_attr_remove_port); } -static int ehea_probe_adapter(struct platform_device *dev, - const struct of_device_id *id) +static int ehea_probe_adapter(struct platform_device *dev) { struct ehea_adapter *adapter; const u64 *adapter_handle; -- cgit v1.1 From 8973ba8b325f8c084815a3021c427c6fa3017a5d Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Fri, 19 Apr 2013 17:32:15 -0500 Subject: usb: chipidea: depend on CONFIG_OF instead of CONFIG_OF_DEVICE CONFIG_OF_DEVICE is going away, so use CONFIG_OF instead. It does not appear that CONFIG_OF_DEVICE was the correct dependency either. Signed-off-by: Rob Herring Acked-by: Arnd Bergmann Tested-by: Benjamin Herrenschmidt Signed-off-by: Grant Likely --- drivers/usb/chipidea/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/usb/chipidea/Makefile b/drivers/usb/chipidea/Makefile index 4ab83e9..4113feb 100644 --- a/drivers/usb/chipidea/Makefile +++ b/drivers/usb/chipidea/Makefile @@ -16,6 +16,6 @@ ifneq ($(CONFIG_PCI),) obj-$(CONFIG_USB_CHIPIDEA) += ci13xxx_pci.o endif -ifneq ($(CONFIG_OF_DEVICE),) +ifneq ($(CONFIG_OF),) obj-$(CONFIG_USB_CHIPIDEA) += ci13xxx_imx.o usbmisc_imx.o endif -- cgit v1.1 From ba166e900b502b74b9425881caa94f94891b0a1f Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Fri, 19 Apr 2013 17:32:52 -0500 Subject: of: remove CONFIG_OF_DEVICE CONFIG_OF_DEVICE is always selected when CONFIG_OF is enabled, so remove it and simplify of_platform.h and of_device.h headers. This also fixes !OF compiles using of_platform_populate. Signed-off-by: Rob Herring Acked-by: Arnd Bergmann Tested-by: Benjamin Herrenschmidt Signed-off-by: Grant Likely --- drivers/of/Kconfig | 3 --- drivers/of/Makefile | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) (limited to 'drivers') diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig index d37bfcf..80e5c13 100644 --- a/drivers/of/Kconfig +++ b/drivers/of/Kconfig @@ -48,9 +48,6 @@ config OF_IRQ def_bool y depends on !SPARC -config OF_DEVICE - def_bool y - config OF_I2C def_tristate I2C depends on I2C diff --git a/drivers/of/Makefile b/drivers/of/Makefile index e027f44..1f9c0c4 100644 --- a/drivers/of/Makefile +++ b/drivers/of/Makefile @@ -1,9 +1,8 @@ -obj-y = base.o +obj-y = base.o device.o platform.o obj-$(CONFIG_OF_FLATTREE) += fdt.o obj-$(CONFIG_OF_PROMTREE) += pdt.o obj-$(CONFIG_OF_ADDRESS) += address.o obj-$(CONFIG_OF_IRQ) += irq.o -obj-$(CONFIG_OF_DEVICE) += device.o platform.o obj-$(CONFIG_OF_I2C) += of_i2c.o obj-$(CONFIG_OF_NET) += of_net.o obj-$(CONFIG_OF_SELFTEST) += selftest.o -- cgit v1.1 From 6dd18e4684f3d188277bbbc27545248487472108 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Wed, 3 Jul 2013 16:01:10 +1000 Subject: of: Fix address decoding on Bimini and js2x machines Commit: e38c0a1fbc5803cbacdaac0557c70ac8ca5152e7 of/address: Handle #address-cells > 2 specially broke real time clock access on Bimini, js2x, and similar powerpc machines using the "maple" platform. That code was indirectly relying on the old (broken) behaviour of the translation for the hypertransport to ISA bridge. This fixes it by treating hypertransport as a PCI bus Signed-off-by: Benjamin Herrenschmidt Acked-by: Rob Herring Signed-off-by: Grant Likely --- drivers/of/address.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/of/address.c b/drivers/of/address.c index 04da786..7c8221d 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c @@ -106,8 +106,12 @@ static unsigned int of_bus_default_get_flags(const __be32 *addr) static int of_bus_pci_match(struct device_node *np) { - /* "vci" is for the /chaos bridge on 1st-gen PCI powermacs */ - return !strcmp(np->type, "pci") || !strcmp(np->type, "vci"); + /* + * "vci" is for the /chaos bridge on 1st-gen PCI powermacs + * "ht" is hypertransport + */ + return !strcmp(np->type, "pci") || !strcmp(np->type, "vci") || + !strcmp(np->type, "ht"); } static void of_bus_pci_count_cells(struct device_node *np, -- cgit v1.1