sunxi SRAM controller fixes for
- loading/unloading - claiming regions - debugfs info -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQSPRixG1tysKC2PKM10Ba7+DO8kkwUCYyeI1gAKCRB0Ba7+DO8k kww7AP9TfAADMTl0v+ggU+vpkwaI6ENDareh8nKiTWralJe3cgD/fjOrh+L9lquC zmCFvKIZNNaPI0/i0jJAP2M9aLGeEQ4= =MS0s -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmMtpowACgkQmmx57+YA GNmCow//Y9gFfgOnzmlGDQjSdh6ZbLwLE+rG0DBghZ6OIAPyo7m5dgvAlAarxFAu MP1EmMPgqo6J9pvlla0w4CZoaa4Ae5jvzCpjP3wmd5uANI2Tw6V6VY27mkdsUlXa 8sgBTkA8wvsBoW1x0XLU1ugPE8okaVvVfkH9ZqZDDNRFdGi6ed+WG+hi2Oyy79oz n7mF9wYnYr6DYCIAoDsWhTs6JRqYmTx1EJ7hY8em5eavL8yobBrRv91GSdcoEFZV xUFwe1C0SXEXcFSCbPDO0WuUZ//e/0DqP1DkAgqUtXYCDC/aBi7kMUoXIg70EyWQ k0gbM1b+JRig5zlesQ5ih0q5X2wNbc1bjDypcYQuSaB71ma0mcj6KED7uy2u/b5J 12ha2W/7Sf+2qTskKgtAUdSaX/GZfPjDYvde4Z2R7YuvIfGsQIqe7L5HLzkxgAqq nMk2QkUeGI8NH15zYOS0+oq7OgmYjX5KKsiGmrzo1IO0KKFtIQlGzPMgWwbv8/h6 WbNceSaBUkoR9EqDXFYZEICsS9aKBLOvmb06Kc3HUucnnyJCIFjCUUJqAYnrgPJc nPKYexDpukAFyjIRfpJoJ8En1xWMJNJRVinnXEuGgw8fCzr1fqGUqsn8PuAfubLs CFoecvLhppJz1mVXTNNi7I3SA0hbV+KF2PJ/0wse4HOgtDbM2RA= =Qp+A -----END PGP SIGNATURE----- Merge tag 'sunxi-drivers-fixes-for-6.0-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/fixes sunxi SRAM controller fixes for - loading/unloading - claiming regions - debugfs info * tag 'sunxi-drivers-fixes-for-6.0-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: soc: sunxi: sram: Fix debugfs info for A64 SRAM C soc: sunxi: sram: Fix probe function ordering issues soc: sunxi: sram: Prevent the driver from being unbound soc: sunxi: sram: Actually claim SRAM regions Link: https://lore.kernel.org/r/YyeN0m78+m9nNEah@kista.localdomain Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
7e1e2acb7b
@ -78,8 +78,8 @@ static struct sunxi_sram_desc sun4i_a10_sram_d = {
|
||||
|
||||
static struct sunxi_sram_desc sun50i_a64_sram_c = {
|
||||
.data = SUNXI_SRAM_DATA("C", 0x4, 24, 1,
|
||||
SUNXI_SRAM_MAP(0, 1, "cpu"),
|
||||
SUNXI_SRAM_MAP(1, 0, "de2")),
|
||||
SUNXI_SRAM_MAP(1, 0, "cpu"),
|
||||
SUNXI_SRAM_MAP(0, 1, "de2")),
|
||||
};
|
||||
|
||||
static const struct of_device_id sunxi_sram_dt_ids[] = {
|
||||
@ -254,6 +254,7 @@ int sunxi_sram_claim(struct device *dev)
|
||||
writel(val | ((device << sram_data->offset) & mask),
|
||||
base + sram_data->reg);
|
||||
|
||||
sram_desc->claimed = true;
|
||||
spin_unlock(&sram_lock);
|
||||
|
||||
return 0;
|
||||
@ -329,11 +330,11 @@ static struct regmap_config sunxi_sram_emac_clock_regmap = {
|
||||
.writeable_reg = sunxi_sram_regmap_accessible_reg,
|
||||
};
|
||||
|
||||
static int sunxi_sram_probe(struct platform_device *pdev)
|
||||
static int __init sunxi_sram_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct dentry *d;
|
||||
struct regmap *emac_clock;
|
||||
const struct sunxi_sramc_variant *variant;
|
||||
struct device *dev = &pdev->dev;
|
||||
|
||||
sram_dev = &pdev->dev;
|
||||
|
||||
@ -345,13 +346,6 @@ static int sunxi_sram_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(base))
|
||||
return PTR_ERR(base);
|
||||
|
||||
of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev);
|
||||
|
||||
d = debugfs_create_file("sram", S_IRUGO, NULL, NULL,
|
||||
&sunxi_sram_fops);
|
||||
if (!d)
|
||||
return -ENOMEM;
|
||||
|
||||
if (variant->num_emac_clocks > 0) {
|
||||
emac_clock = devm_regmap_init_mmio(&pdev->dev, base,
|
||||
&sunxi_sram_emac_clock_regmap);
|
||||
@ -360,6 +354,10 @@ static int sunxi_sram_probe(struct platform_device *pdev)
|
||||
return PTR_ERR(emac_clock);
|
||||
}
|
||||
|
||||
of_platform_populate(dev->of_node, NULL, NULL, dev);
|
||||
|
||||
debugfs_create_file("sram", 0444, NULL, NULL, &sunxi_sram_fops);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -409,9 +407,8 @@ static struct platform_driver sunxi_sram_driver = {
|
||||
.name = "sunxi-sram",
|
||||
.of_match_table = sunxi_sram_dt_match,
|
||||
},
|
||||
.probe = sunxi_sram_probe,
|
||||
};
|
||||
module_platform_driver(sunxi_sram_driver);
|
||||
builtin_platform_driver_probe(sunxi_sram_driver, sunxi_sram_probe);
|
||||
|
||||
MODULE_AUTHOR("Maxime Ripard <maxime.ripard@free-electrons.com>");
|
||||
MODULE_DESCRIPTION("Allwinner sunXi SRAM Controller Driver");
|
||||
|
Loading…
Reference in New Issue
Block a user