/*
* Initialization of ARM Corelink CCI-500 Cache Coherency Interconnect
*
- * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2016 Socionext Inc.
+ * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
-#include <common.h>
-#include <mapmem.h>
#include <linux/bitops.h>
#include <linux/io.h>
#include <linux/sizes.h>
void __iomem *base;
u32 tmp;
- base = map_sysmem(slave_base, SZ_4K);
+ base = ioremap(slave_base, SZ_4K);
tmp = readl(base);
tmp |= CCI500_SNOOP_CTRL_EN_DVM | CCI500_SNOOP_CTRL_EN_SNOOP;
writel(tmp, base);
- unmap_sysmem(base);
+ iounmap(base);
slave_base += CCI500_SLAVE_OFFSET;
}
/*
- * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2016 Socionext Inc.
+ * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
-#include <common.h>
-#include <mapmem.h>
#include <linux/io.h>
#include <linux/sizes.h>
{
void __iomem *rom_boot_rsv0;
- rom_boot_rsv0 = map_sysmem(UNIPHIER_SMPCTRL_ROM_RSV0, SZ_8);
+ rom_boot_rsv0 = ioremap(UNIPHIER_SMPCTRL_ROM_RSV0, SZ_8);
writeq((u64)uniphier_secondary_startup, rom_boot_rsv0);
- unmap_sysmem(rom_boot_rsv0);
+ iounmap(rom_boot_rsv0);
uniphier_smp_setup();
/*
- * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2016 Socionext Inc.
+ * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
-#include <common.h>
-#include <mapmem.h>
#include <linux/bitops.h>
#include <linux/io.h>
#include <linux/sizes.h>
void __iomem *base;
u32 tmp;
- base = map_sysmem(CNT_CONTROL_BASE, SZ_4K);
+ base = ioremap(CNT_CONTROL_BASE, SZ_4K);
/*
* Note:
tmp |= CNTCR_EN;
writel(tmp, base + CNTCR);
- unmap_sysmem(base);
+ iounmap(base);
return 0;
}
/*
- * Copyright (C) 2014-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2014 Panasonic Corporation
+ * Copyright (C) 2015-2016 Socionext Inc.
+ * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
-#include <mapmem.h>
#include <linux/io.h>
#include <linux/sizes.h>
int p, dx;
for (p = 0; *base; base++, p++) {
- phy = map_sysmem(*base, SZ_4K);
+ phy = ioremap(*base, SZ_4K);
for (dx = 0; dx < NR_DATX8_PER_DDRPHY; dx++) {
printf("PHY%dDX%d:", p, dx);
printf("\n");
}
- unmap_sysmem(phy);
+ iounmap(phy);
}
}
printf("\n--- DDR PHY registers ---\n");
for (p = 0; *base; base++, p++) {
- phy = map_sysmem(*base, SZ_4K);
+ phy = ioremap(*base, SZ_4K);
printf("== PHY%d (base: %p) ==\n", p, phy);
printf(" No: Name : Address : Data\n");
REG_DUMP(dx[1].gcr);
REG_DUMP(dx[1].gtr);
- unmap_sysmem(phy);
+ iounmap(phy);
}
}
/*
- * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2016 Socionext Inc.
+ * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
-#include <mapmem.h>
#include <linux/bitops.h>
#include <linux/io.h>
#include <linux/sizes.h>
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
- priv->base = map_sysmem(addr, SZ_4K);
+ priv->base = devm_ioremap(dev, addr, SZ_4K);
if (!priv->base)
return -ENOMEM;
return 0;
}
-
-int uniphier_clk_remove(struct udevice *dev)
-{
- struct uniphier_clk_priv *priv = dev_get_priv(dev);
-
- unmap_sysmem(priv->base);
-
- return 0;
-}
/*
- * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2016 Socionext Inc.
+ * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
.id = UCLASS_CLK,
.of_match = uniphier_mio_clk_match,
.probe = uniphier_clk_probe,
- .remove = uniphier_clk_remove,
.priv_auto_alloc_size = sizeof(struct uniphier_clk_priv),
.ops = &uniphier_clk_ops,
};
/*
- * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2016 Socionext Inc.
+ * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
extern const struct clk_ops uniphier_clk_ops;
int uniphier_clk_probe(struct udevice *dev);
-int uniphier_clk_remove(struct udevice *dev);
#endif /* __CLK_UNIPHIER_H__ */
/*
- * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2016 Socionext Inc.
+ * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <dm/device.h>
-#include <mapmem.h>
#include <linux/bitops.h>
#include <linux/io.h>
#include <linux/sizes.h>
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
- priv->base = map_sysmem(addr, SZ_8);
+ priv->base = devm_ioremap(dev, addr, SZ_8);
if (!priv->base)
return -ENOMEM;
return 0;
}
-static int uniphier_gpio_remove(struct udevice *dev)
-{
- struct uniphier_gpio_priv *priv = dev_get_priv(dev);
-
- unmap_sysmem(priv->base);
-
- return 0;
-}
-
/* .data = the number of GPIO banks */
static const struct udevice_id uniphier_gpio_match[] = {
{ .compatible = "socionext,uniphier-gpio" },
.id = UCLASS_GPIO,
.of_match = uniphier_gpio_match,
.probe = uniphier_gpio_probe,
- .remove = uniphier_gpio_remove,
.priv_auto_alloc_size = sizeof(struct uniphier_gpio_priv),
.ops = &uniphier_gpio_ops,
};
/*
- * Copyright (C) 2014-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2014 Panasonic Corporation
+ * Copyright (C) 2015-2016 Socionext Inc.
+ * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <dm/root.h>
#include <i2c.h>
#include <fdtdec.h>
-#include <mapmem.h>
struct uniphier_fi2c_regs {
u32 cr; /* control register */
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
- priv->regs = map_sysmem(addr, SZ_128);
+ priv->regs = devm_ioremap(dev, addr, SZ_128);
if (!priv->regs)
return -ENOMEM;
return 0;
}
-static int uniphier_fi2c_remove(struct udevice *dev)
-{
- struct uniphier_fi2c_dev *priv = dev_get_priv(dev);
-
- unmap_sysmem(priv->regs);
-
- return 0;
-}
-
static int wait_for_irq(struct uniphier_fi2c_dev *dev, u32 flags,
bool *stop)
{
.id = UCLASS_I2C,
.of_match = uniphier_fi2c_of_match,
.probe = uniphier_fi2c_probe,
- .remove = uniphier_fi2c_remove,
.priv_auto_alloc_size = sizeof(struct uniphier_fi2c_dev),
.ops = &uniphier_fi2c_ops,
};
/*
- * Copyright (C) 2014-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2014 Panasonic Corporation
+ * Copyright (C) 2015-2016 Socionext Inc.
+ * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <dm/root.h>
#include <i2c.h>
#include <fdtdec.h>
-#include <mapmem.h>
struct uniphier_i2c_regs {
u32 dtrm; /* data transmission */
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
- priv->regs = map_sysmem(addr, SZ_64);
+ priv->regs = devm_ioremap(dev, addr, SZ_64);
if (!priv->regs)
return -ENOMEM;
return 0;
}
-static int uniphier_i2c_remove(struct udevice *dev)
-{
- struct uniphier_i2c_dev *priv = dev_get_priv(dev);
-
- unmap_sysmem(priv->regs);
-
- return 0;
-}
-
static int send_and_recv_byte(struct uniphier_i2c_dev *dev, u32 dtrm)
{
writel(dtrm, &dev->regs->dtrm);
.id = UCLASS_I2C,
.of_match = uniphier_i2c_of_match,
.probe = uniphier_i2c_probe,
- .remove = uniphier_i2c_remove,
.priv_auto_alloc_size = sizeof(struct uniphier_i2c_dev),
.ops = &uniphier_i2c_ops,
};
/*
- * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2016 Socionext Inc.
+ * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <clk.h>
#include <fdtdec.h>
-#include <mapmem.h>
#include <mmc.h>
#include <dm/device.h>
#include <linux/compat.h>
if (base == FDT_ADDR_T_NONE)
return -EINVAL;
- priv->regbase = map_sysmem(base, SZ_2K);
+ priv->regbase = devm_ioremap(dev, base, SZ_2K);
if (!priv->regbase)
return -ENOMEM;
{
struct uniphier_sd_priv *priv = dev_get_priv(dev);
- unmap_sysmem(priv->regbase);
mmc_destroy(priv->mmc);
return 0;
/*
- * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2015-2016 Socionext Inc.
+ * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
-#include <common.h>
-#include <mapmem.h>
#include <linux/io.h>
#include <linux/err.h>
#include <linux/sizes.h>
if (addr == FDT_ADDR_T_NONE)
return -EINVAL;
- priv->base = map_sysmem(addr, SZ_4K);
+ priv->base = devm_ioremap(dev, addr, SZ_4K);
if (!priv->base)
return -ENOMEM;
return 0;
}
-
-int uniphier_pinctrl_remove(struct udevice *dev)
-{
- struct uniphier_pinctrl_priv *priv = dev_get_priv(dev);
-
- unmap_sysmem(priv->base);
-
- return 0;
-}
.id = UCLASS_PINCTRL,
.of_match = of_match_ptr(uniphier_ld11_pinctrl_match),
.probe = uniphier_ld11_pinctrl_probe,
- .remove = uniphier_pinctrl_remove,
.priv_auto_alloc_size = sizeof(struct uniphier_pinctrl_priv),
.ops = &uniphier_pinctrl_ops,
};
.id = UCLASS_PINCTRL,
.of_match = of_match_ptr(uniphier_ld20_pinctrl_match),
.probe = uniphier_ld20_pinctrl_probe,
- .remove = uniphier_pinctrl_remove,
.priv_auto_alloc_size = sizeof(struct uniphier_pinctrl_priv),
.ops = &uniphier_pinctrl_ops,
};
/*
- * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2015-2016 Socionext Inc.
+ * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
.id = UCLASS_PINCTRL,
.of_match = of_match_ptr(uniphier_ld4_pinctrl_match),
.probe = uniphier_ld4_pinctrl_probe,
- .remove = uniphier_pinctrl_remove,
.priv_auto_alloc_size = sizeof(struct uniphier_pinctrl_priv),
.ops = &uniphier_pinctrl_ops,
};
/*
- * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2015-2016 Socionext Inc.
+ * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
.id = UCLASS_PINCTRL,
.of_match = of_match_ptr(uniphier_ld6b_pinctrl_match),
.probe = uniphier_ld6b_pinctrl_probe,
- .remove = uniphier_pinctrl_remove,
.priv_auto_alloc_size = sizeof(struct uniphier_pinctrl_priv),
.ops = &uniphier_pinctrl_ops,
};
/*
- * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2015-2016 Socionext Inc.
+ * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
.id = UCLASS_PINCTRL,
.of_match = of_match_ptr(uniphier_pro4_pinctrl_match),
.probe = uniphier_pro4_pinctrl_probe,
- .remove = uniphier_pinctrl_remove,
.priv_auto_alloc_size = sizeof(struct uniphier_pinctrl_priv),
.ops = &uniphier_pinctrl_ops,
.flags = DM_FLAG_PRE_RELOC,
/*
- * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2015-2016 Socionext Inc.
+ * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
.id = UCLASS_PINCTRL,
.of_match = of_match_ptr(uniphier_pro5_pinctrl_match),
.probe = uniphier_pro5_pinctrl_probe,
- .remove = uniphier_pinctrl_remove,
.priv_auto_alloc_size = sizeof(struct uniphier_pinctrl_priv),
.ops = &uniphier_pinctrl_ops,
.flags = DM_FLAG_PRE_RELOC,
/*
- * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2015-2016 Socionext Inc.
+ * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
.id = UCLASS_PINCTRL,
.of_match = of_match_ptr(uniphier_pxs2_pinctrl_match),
.probe = uniphier_pxs2_pinctrl_probe,
- .remove = uniphier_pinctrl_remove,
.priv_auto_alloc_size = sizeof(struct uniphier_pinctrl_priv),
.ops = &uniphier_pinctrl_ops,
};
/*
- * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2015-2016 Socionext Inc.
+ * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
.id = UCLASS_PINCTRL,
.of_match = of_match_ptr(uniphier_sld8_pinctrl_match),
.probe = uniphier_sld8_pinctrl_probe,
- .remove = uniphier_pinctrl_remove,
.priv_auto_alloc_size = sizeof(struct uniphier_pinctrl_priv),
.ops = &uniphier_pinctrl_ops,
};
/*
- * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2015-2016 Socionext Inc.
+ * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
int uniphier_pinctrl_probe(struct udevice *dev,
struct uniphier_pinctrl_socdata *socdata);
-int uniphier_pinctrl_remove(struct udevice *dev);
-
#endif /* __PINCTRL_UNIPHIER_H__ */
/*
- * Copyright (C) 2012-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2012-2015 Panasonic Corporation
+ * Copyright (C) 2015-2016 Socionext Inc.
+ * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <linux/sizes.h>
#include <asm/errno.h>
#include <dm/device.h>
-#include <mapmem.h>
#include <serial.h>
#include <fdtdec.h>
if (base == FDT_ADDR_T_NONE)
return -EINVAL;
- port = map_sysmem(base, SZ_64);
+ port = devm_ioremap(dev, base, SZ_64);
if (!port)
return -ENOMEM;
return 0;
}
-static int uniphier_serial_remove(struct udevice *dev)
-{
- unmap_sysmem(uniphier_serial_port(dev));
-
- return 0;
-}
-
static const struct udevice_id uniphier_uart_of_match[] = {
{ .compatible = "socionext,uniphier-uart" },
{ /* sentinel */ }
.id = UCLASS_SERIAL,
.of_match = uniphier_uart_of_match,
.probe = uniphier_serial_probe,
- .remove = uniphier_serial_remove,
.priv_auto_alloc_size = sizeof(struct uniphier_serial_private_data),
.ops = &uniphier_serial_ops,
};