# Re: \[PATCH v4 04/10\] PCI: apple: Add initial hardware bring-up

- From: Marc Zyngier \<maz@kernel.org\>
- Date: 2021-09-22 21:31:18 
- List: linux-devicetree
- Page: https://ratatoskr.run/linux-devicetree/2021/09/1518800
- Thread: https://ratatoskr.run/linux-devicetree/2021/09/1518722/t.md

```text
On Wed, 22 Sep 2021 22:14:49 +0100,
Rob Herring [ref] wrote:
> 
> On Wed, Sep 22, 2021 at 4:08 PM Sven Peter [ref] wrote:
> >
> > Hi,
> >
> >
> > On Wed, Sep 22, 2021, at 22:54, Marc Zyngier wrote:
> > > From: Alyssa Rosenzweig <redacted>
> > >
> > [...]
> > > +
> > > +     /* Use the first reg entry to work out the port index */
> > > +     port->idx = idx >> 11;
> > > +     port->pcie = pcie;
> > > +     port->np = np;
> > > +
> > > +     port->base = devm_platform_ioremap_resource(platform, port->idx + 2);
> > > +     if (IS_ERR(port->base))
> > > +             return -ENODEV;
> 
> Don't change error codes.

Yup, good point. There is another instance of that when setting up a
port.

> 
> > > +
> > > +     rmw_set(PORT_APPCLK_EN, port + PORT_APPCLK);
> >
> > I think this should be
> >
> >     rmw_set(PORT_APPCLK_EN, port->base + PORT_APPCLK);
> 
> Or just removed if this was tested and worked.

That's probably the point where I find out that it only worked because
I was corrupting memory in bizarre ways. Oh well.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.
```
