diff options
Diffstat (limited to 'drivers/ssb')
| -rw-r--r-- | drivers/ssb/Kconfig | 3 | ||||
| -rw-r--r-- | drivers/ssb/driver_gpio.c | 20 | ||||
| -rw-r--r-- | drivers/ssb/main.c | 16 |
3 files changed, 23 insertions, 16 deletions
diff --git a/drivers/ssb/Kconfig b/drivers/ssb/Kconfig index 34fa19d4b3f1..1cf1a98952fa 100644 --- a/drivers/ssb/Kconfig +++ b/drivers/ssb/Kconfig @@ -134,7 +134,8 @@ config SSB_SFLASH # Assumption: We are on embedded, if we compile the MIPS core. config SSB_EMBEDDED bool - depends on SSB_DRIVER_MIPS && SSB_PCICORE_HOSTMODE + depends on SSB_DRIVER_MIPS + depends on PCI=n || SSB_PCICORE_HOSTMODE default y config SSB_DRIVER_EXTIF diff --git a/drivers/ssb/driver_gpio.c b/drivers/ssb/driver_gpio.c index 897cb8db5084..905657c925bc 100644 --- a/drivers/ssb/driver_gpio.c +++ b/drivers/ssb/driver_gpio.c @@ -45,12 +45,14 @@ static int ssb_gpio_chipco_get_value(struct gpio_chip *chip, unsigned int gpio) return !!ssb_chipco_gpio_in(&bus->chipco, 1 << gpio); } -static void ssb_gpio_chipco_set_value(struct gpio_chip *chip, unsigned int gpio, - int value) +static int ssb_gpio_chipco_set_value(struct gpio_chip *chip, unsigned int gpio, + int value) { struct ssb_bus *bus = gpiochip_get_data(chip); ssb_chipco_gpio_out(&bus->chipco, 1 << gpio, value ? 1 << gpio : 0); + + return 0; } static int ssb_gpio_chipco_direction_input(struct gpio_chip *chip, @@ -148,8 +150,8 @@ static int ssb_gpio_irq_chipco_domain_init(struct ssb_bus *bus) if (bus->bustype != SSB_BUSTYPE_SSB) return 0; - bus->irq_domain = irq_domain_add_linear(NULL, chip->ngpio, - &irq_domain_simple_ops, chipco); + bus->irq_domain = irq_domain_create_linear(NULL, chip->ngpio, &irq_domain_simple_ops, + chipco); if (!bus->irq_domain) { err = -ENODEV; goto err_irq_domain; @@ -265,12 +267,14 @@ static int ssb_gpio_extif_get_value(struct gpio_chip *chip, unsigned int gpio) return !!ssb_extif_gpio_in(&bus->extif, 1 << gpio); } -static void ssb_gpio_extif_set_value(struct gpio_chip *chip, unsigned int gpio, - int value) +static int ssb_gpio_extif_set_value(struct gpio_chip *chip, unsigned int gpio, + int value) { struct ssb_bus *bus = gpiochip_get_data(chip); ssb_extif_gpio_out(&bus->extif, 1 << gpio, value ? 1 << gpio : 0); + + return 0; } static int ssb_gpio_extif_direction_input(struct gpio_chip *chip, @@ -347,8 +351,8 @@ static int ssb_gpio_irq_extif_domain_init(struct ssb_bus *bus) if (bus->bustype != SSB_BUSTYPE_SSB) return 0; - bus->irq_domain = irq_domain_add_linear(NULL, chip->ngpio, - &irq_domain_simple_ops, extif); + bus->irq_domain = irq_domain_create_linear(NULL, chip->ngpio, &irq_domain_simple_ops, + extif); if (!bus->irq_domain) { err = -ENODEV; goto err_irq_domain; diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c index 8a93c83cb6f8..aa6165e3db4a 100644 --- a/drivers/ssb/main.c +++ b/drivers/ssb/main.c @@ -323,10 +323,10 @@ static int ssb_match_devid(const struct ssb_device_id *tabid, return 1; } -static int ssb_bus_match(struct device *dev, struct device_driver *drv) +static int ssb_bus_match(struct device *dev, const struct device_driver *drv) { struct ssb_device *ssb_dev = dev_to_ssb_dev(dev); - struct ssb_driver *ssb_drv = drv_to_ssb_drv(drv); + const struct ssb_driver *ssb_drv = drv_to_ssb_drv(drv); const struct ssb_device_id *id; for (id = ssb_drv->id_table; @@ -339,13 +339,15 @@ static int ssb_bus_match(struct device *dev, struct device_driver *drv) return 0; } -static int ssb_device_uevent(struct device *dev, struct kobj_uevent_env *env) +static int ssb_device_uevent(const struct device *dev, struct kobj_uevent_env *env) { - struct ssb_device *ssb_dev = dev_to_ssb_dev(dev); + const struct ssb_device *ssb_dev; if (!dev) return -ENODEV; + ssb_dev = dev_to_ssb_dev(dev); + return add_uevent_var(env, "MODALIAS=ssb:v%04Xid%04Xrev%02X", ssb_dev->id.vendor, ssb_dev->id.coreid, @@ -384,7 +386,7 @@ static struct attribute *ssb_device_attrs[] = { }; ATTRIBUTE_GROUPS(ssb_device); -static struct bus_type ssb_bustype = { +static const struct bus_type ssb_bustype = { .name = "ssb", .match = ssb_bus_match, .probe = ssb_device_probe, @@ -837,7 +839,7 @@ static u32 clkfactor_f6_resolve(u32 v) case SSB_CHIPCO_CLK_F6_7: return 7; } - return 0; + return 1; } /* Calculate the speed the backplane would run at a given set of clockcontrol values */ @@ -1144,7 +1146,7 @@ u32 ssb_dma_translation(struct ssb_device *dev) return SSB_PCI_DMA; } default: - __ssb_dma_not_implemented(dev); + break; } return 0; } |
