Skip to content

Commit

Permalink
ARM: 6829/1: amba: make hardcoded periphid override hardware
Browse files Browse the repository at this point in the history
This makes a hardcoded periphid from the platform override any
magic number found in the hardware. This shall henceforth be used
when the information found in the hardware is either missing,
i.e. not encoding the CID with the magic cookie 0xb105f00d, or
incorrect such that the revision number should have been bumped in
hardware, but the silicon designer has failed to do so.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Linus Walleij authored and Russell King committed May 26, 2011
1 parent e536fbe commit 97ceed1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/amba/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,10 @@ int amba_device_register(struct amba_device *dev, struct resource *parent)
if (ret)
goto err_out;

/* Hard-coded primecell ID instead of plug-n-play */
if (dev->periphid != 0)
goto skip_probe;

/*
* Dynamically calculate the size of the resource
* and use this for iomap
Expand Down Expand Up @@ -643,6 +647,7 @@ int amba_device_register(struct amba_device *dev, struct resource *parent)
if (ret)
goto err_release;

skip_probe:
ret = device_add(&dev->dev);
if (ret)
goto err_release;
Expand Down

0 comments on commit 97ceed1

Please sign in to comment.