mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-06 06:37:59 +00:00
hwrng: bcm63xx - drop bcm_{readl,writel} macros
bcm_{readl,writel} macros expand to __raw_{readl,writel}, use these directly such that we do not rely on the platform to provide these for us. As a result, we no longer use bcm63xx_io.h, so remove that inclusion too. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
df586cbb6b
commit
f7591faec6
1 changed files with 6 additions and 7 deletions
|
@ -13,7 +13,6 @@
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/hw_random.h>
|
#include <linux/hw_random.h>
|
||||||
|
|
||||||
#include <bcm63xx_io.h>
|
|
||||||
#include <bcm63xx_regs.h>
|
#include <bcm63xx_regs.h>
|
||||||
|
|
||||||
struct bcm63xx_rng_priv {
|
struct bcm63xx_rng_priv {
|
||||||
|
@ -28,9 +27,9 @@ static int bcm63xx_rng_init(struct hwrng *rng)
|
||||||
struct bcm63xx_rng_priv *priv = to_rng_priv(rng);
|
struct bcm63xx_rng_priv *priv = to_rng_priv(rng);
|
||||||
u32 val;
|
u32 val;
|
||||||
|
|
||||||
val = bcm_readl(priv->regs + RNG_CTRL);
|
val = __raw_readl(priv->regs + RNG_CTRL);
|
||||||
val |= RNG_EN;
|
val |= RNG_EN;
|
||||||
bcm_writel(val, priv->regs + RNG_CTRL);
|
__raw_writel(val, priv->regs + RNG_CTRL);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -40,23 +39,23 @@ static void bcm63xx_rng_cleanup(struct hwrng *rng)
|
||||||
struct bcm63xx_rng_priv *priv = to_rng_priv(rng);
|
struct bcm63xx_rng_priv *priv = to_rng_priv(rng);
|
||||||
u32 val;
|
u32 val;
|
||||||
|
|
||||||
val = bcm_readl(priv->regs + RNG_CTRL);
|
val = __raw_readl(priv->regs + RNG_CTRL);
|
||||||
val &= ~RNG_EN;
|
val &= ~RNG_EN;
|
||||||
bcm_writel(val, priv->regs + RNG_CTRL);
|
__raw_writel(val, priv->regs + RNG_CTRL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int bcm63xx_rng_data_present(struct hwrng *rng, int wait)
|
static int bcm63xx_rng_data_present(struct hwrng *rng, int wait)
|
||||||
{
|
{
|
||||||
struct bcm63xx_rng_priv *priv = to_rng_priv(rng);
|
struct bcm63xx_rng_priv *priv = to_rng_priv(rng);
|
||||||
|
|
||||||
return bcm_readl(priv->regs + RNG_STAT) & RNG_AVAIL_MASK;
|
return __raw_readl(priv->regs + RNG_STAT) & RNG_AVAIL_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int bcm63xx_rng_data_read(struct hwrng *rng, u32 *data)
|
static int bcm63xx_rng_data_read(struct hwrng *rng, u32 *data)
|
||||||
{
|
{
|
||||||
struct bcm63xx_rng_priv *priv = to_rng_priv(rng);
|
struct bcm63xx_rng_priv *priv = to_rng_priv(rng);
|
||||||
|
|
||||||
*data = bcm_readl(priv->regs + RNG_DATA);
|
*data = __raw_readl(priv->regs + RNG_DATA);
|
||||||
|
|
||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue