Re: [PATCH 2/2] soc: bcm: add PM driver for Broadcom's PMB

From: Florian Fainelli
Date: Fri Dec 11 2020 - 22:51:40 EST




On 12/11/2020 1:59 PM, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@xxxxxxxxxx>
>
> PMB can be found on BCM4908 and many other chipsets (e.g. BCM63138).
> It's needed to power on and off SoC blocks like PCIe, SATA, USB.
>
> Signed-off-by: Rafał Miłecki <rafal@xxxxxxxxxx>

This looks good to me, just a few nipicks below.

[snip]

> +static int bcm_pmb_probe(struct platform_device *pdev)
> +{
> + struct device *dev = &pdev->dev;
> + const struct bcm_pmb_pd_data *table;
> + const struct bcm_pmb_pd_data *e;
> + struct resource *res;
> + struct bcm_pmb *pmb;
> + int max_id;
> + int err;
> +
> + dev_info(dev, "START\n");

Stray debugging.

[snip]

> +
> +static const struct bcm_pmb_pd_data bcm_pmb_bcm4908_data[] = {
> + { .name = "pcie2", .id = BCM_PMB_PCIE2, .bus = 0, .device = 2, },
> + { .name = "pcie0", .id = BCM_PMB_PCIE0, .bus = 1, .device = 14, },
> + { .name = "pcie1", .id = BCM_PMB_PCIE1, .bus = 1, .device = 15, },
> + { .name = "usb", .id = BCM_PMB_HOST_USB, .bus = 1, .device = 17, },

Do you have to be more specific and spell out whether this is the host
controller (xhci) or device (bdc)? If not, then this looks good to me.
--
Florian