mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 08:02:27 +02:00
Memory controller drivers for v6.9
1. TI EMIF: Simplify handling CONFIG_DEBUG_FS, CONFIG_OF and
platform_driver_probe().
2. Narrow regex in Nvidia Tegra20 EMC binding.
-----BEGIN PGP SIGNATURE-----
iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmXSTJ0QHGtyemtAa2Vy
bmVsLm9yZwAKCRDBN2bmhouD1/GXD/4/0S/QS4PH8yZ8PcooNs8jFUDCz3cFgJyX
UBWaYSVo9FJDr0D9suK5xoHePUHWSpR4dlj54kPwW9/fPKapstNVWxDb75B624mw
NoF/JWSSyXu5gorbiK9+4tLPm0pgYs2QxfutxtWhUOD83FE45Sbk1ULmBu+hlQvL
TPSNH9f2vHHz96AVF3rEiNx3v1pHTHn7b9jToTB00tvdoRvi/7Ytohgq424NUhJq
y6RtXMy+9O4ZqnFRLJlqSlkO4qFSquai+yGuLAeH8zL7GzDsXZfVRLmvmXnwHssZ
t0AlI0sWDhua9SqNaNwiIXz+V9G8fQcw2/bNDb0TGaJ1eccK/k86Q4qaRuuB6n6O
3XAuwLNEqcI0/PqnOAlQsjs9XznGc/1richYLIlRX3xY6zg+XZCRq08R2maYwFT2
E8VfOlRItcXexF4uAkwtgqAudX34/79L3TkKOO+y8bVvwO8+yXXhG3idthJOyFrn
oiX/fX0YEMzx2/Y4hLvVmvyr9xKA5a1d+7Fz4kK4gvY0howN7ankv5kgU0aGnW7Y
N19pU6v4CySg/ktFCiTZVrpYl5rCoXIzbk6pOWjjR8waten8vbQl5U6/xbd1FIQu
LH8baWRVLVteS8a5U62N9PPfukgEliHVa5k03ESZHRz0vqii+rG6bdDug6oZh02N
ApkRSvRaiA==
=Kcmt
-----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmXVE8QACgkQYKtH/8kJ
UicddQ/+JMdhvirtENYnGnDhkb5fuR0EyncxCzCOTlszvhXuankuAUCFL5T59Kaq
s+vZHNZC34r7wxyOYsiiBbmLu6diK4NBzgf3stlVl1JgzfT5lCtb8wDR+ovi3w58
csGEwPsx+d6cYLauXdhjuVcs5btIyQBsx4uLKwcMwUhaLnAlg0oR5qaT5GxBINV0
ThrvCDoffb8noX9cmbR5pDrjgTxTKyJH7iLgi9nFXDziAIESO/LwDeY/t3zMsKSO
Q8wVqpMO0LSaD5Fxl7h1lQHEmv5XbVgaSvnyWM92b/K0B/LjX3q+Z84suP7GILP0
ZJgCxXBQHSPT70jviG3C+HjrirLdiT6Az3lpHaVy81ujAYxTPsExREqDD3gwM4r6
RQBZPM1nr3iG2W35CwmJigjTMsXxF6pcVBAo0R1QdAiw5avY9zPEmXETs6GFDxwV
8rR48eEaDy/7ANxNyz2jVJ1WeU3UMBwBgYlFnMvc/a+i9AellL4XMp0TfG5T1PkU
6WRusP0QPlMYTDBcSxq70sNIQZNPd0maIi87MZO0Kj+ram7IP7AvUMJA4DzwMTqL
jo+c5Lq+PxaxNF7SlKv3P2BIMdXG7OVn5o/N4PPeBXm3caOTNtadyMT7rj7gAXF3
E92xL0IPL0JPqYaLuyXo5oKvOzL2/NeNI09tY/A4Oxm2Psw6ans=
=xCE0
-----END PGP SIGNATURE-----
Merge tag 'memory-controller-drv-6.9' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into soc/drivers
Memory controller drivers for v6.9
1. TI EMIF: Simplify handling CONFIG_DEBUG_FS, CONFIG_OF and
platform_driver_probe().
2. Narrow regex in Nvidia Tegra20 EMC binding.
* tag 'memory-controller-drv-6.9' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl:
dt-bindings: memory-controllers: narrow regex for unit address to hex numbers
memory: emif: Drop usage of platform_driver_probe()
memory: emif: Simplify code handling CONFIG_OF
memory: emif: Simplify code handling CONFIG_DEBUG_FS
Link: https://lore.kernel.org/r/20240218183046.32721-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
d22ee157fb
|
|
@ -145,7 +145,7 @@ patternProperties:
|
|||
"^emc-table@[0-9]+$":
|
||||
$ref: "#/$defs/emc-table"
|
||||
|
||||
"^emc-tables@[a-z0-9-]+$":
|
||||
"^emc-tables@[a-f0-9-]+$":
|
||||
type: object
|
||||
properties:
|
||||
reg:
|
||||
|
|
|
|||
|
|
@ -72,7 +72,6 @@ static DEFINE_SPINLOCK(emif_lock);
|
|||
static unsigned long irq_state;
|
||||
static LIST_HEAD(device_list);
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
static void do_emif_regdump_show(struct seq_file *s, struct emif_data *emif,
|
||||
struct emif_regs *regs)
|
||||
{
|
||||
|
|
@ -140,31 +139,24 @@ static int emif_mr4_show(struct seq_file *s, void *unused)
|
|||
|
||||
DEFINE_SHOW_ATTRIBUTE(emif_mr4);
|
||||
|
||||
static int __init_or_module emif_debugfs_init(struct emif_data *emif)
|
||||
static void emif_debugfs_init(struct emif_data *emif)
|
||||
{
|
||||
emif->debugfs_root = debugfs_create_dir(dev_name(emif->dev), NULL);
|
||||
debugfs_create_file("regcache_dump", S_IRUGO, emif->debugfs_root, emif,
|
||||
&emif_regdump_fops);
|
||||
debugfs_create_file("mr4", S_IRUGO, emif->debugfs_root, emif,
|
||||
&emif_mr4_fops);
|
||||
return 0;
|
||||
if (IS_ENABLED(CONFIG_DEBUG_FS)) {
|
||||
emif->debugfs_root = debugfs_create_dir(dev_name(emif->dev), NULL);
|
||||
debugfs_create_file("regcache_dump", S_IRUGO, emif->debugfs_root, emif,
|
||||
&emif_regdump_fops);
|
||||
debugfs_create_file("mr4", S_IRUGO, emif->debugfs_root, emif,
|
||||
&emif_mr4_fops);
|
||||
}
|
||||
}
|
||||
|
||||
static void __exit emif_debugfs_exit(struct emif_data *emif)
|
||||
static void emif_debugfs_exit(struct emif_data *emif)
|
||||
{
|
||||
debugfs_remove_recursive(emif->debugfs_root);
|
||||
emif->debugfs_root = NULL;
|
||||
if (IS_ENABLED(CONFIG_DEBUG_FS)) {
|
||||
debugfs_remove_recursive(emif->debugfs_root);
|
||||
emif->debugfs_root = NULL;
|
||||
}
|
||||
}
|
||||
#else
|
||||
static inline int __init_or_module emif_debugfs_init(struct emif_data *emif)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void __exit emif_debugfs_exit(struct emif_data *emif)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Get bus width used by EMIF. Note that this may be different from the
|
||||
|
|
@ -679,7 +671,7 @@ static void disable_and_clear_all_interrupts(struct emif_data *emif)
|
|||
clear_all_interrupts(emif);
|
||||
}
|
||||
|
||||
static int __init_or_module setup_interrupts(struct emif_data *emif, u32 irq)
|
||||
static int setup_interrupts(struct emif_data *emif, u32 irq)
|
||||
{
|
||||
u32 interrupts, type;
|
||||
void __iomem *base = emif->base;
|
||||
|
|
@ -710,7 +702,7 @@ static int __init_or_module setup_interrupts(struct emif_data *emif, u32 irq)
|
|||
|
||||
}
|
||||
|
||||
static void __init_or_module emif_onetime_settings(struct emif_data *emif)
|
||||
static void emif_onetime_settings(struct emif_data *emif)
|
||||
{
|
||||
u32 pwr_mgmt_ctrl, zq, temp_alert_cfg;
|
||||
void __iomem *base = emif->base;
|
||||
|
|
@ -834,8 +826,7 @@ static int is_custom_config_valid(struct emif_custom_configs *cust_cfgs,
|
|||
return valid;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_OF)
|
||||
static void __init_or_module of_get_custom_configs(struct device_node *np_emif,
|
||||
static void of_get_custom_configs(struct device_node *np_emif,
|
||||
struct emif_data *emif)
|
||||
{
|
||||
struct emif_custom_configs *cust_cfgs = NULL;
|
||||
|
|
@ -884,7 +875,7 @@ static void __init_or_module of_get_custom_configs(struct device_node *np_emif,
|
|||
emif->plat_data->custom_configs = cust_cfgs;
|
||||
}
|
||||
|
||||
static void __init_or_module of_get_ddr_info(struct device_node *np_emif,
|
||||
static void of_get_ddr_info(struct device_node *np_emif,
|
||||
struct device_node *np_ddr,
|
||||
struct ddr_device_info *dev_info)
|
||||
{
|
||||
|
|
@ -918,7 +909,7 @@ static void __init_or_module of_get_ddr_info(struct device_node *np_emif,
|
|||
dev_info->io_width = __fls(io_width) - 1;
|
||||
}
|
||||
|
||||
static struct emif_data * __init_or_module of_get_memory_device_details(
|
||||
static struct emif_data *of_get_memory_device_details(
|
||||
struct device_node *np_emif, struct device *dev)
|
||||
{
|
||||
struct emif_data *emif = NULL;
|
||||
|
|
@ -991,16 +982,7 @@ static struct emif_data * __init_or_module of_get_memory_device_details(
|
|||
return emif;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static struct emif_data * __init_or_module of_get_memory_device_details(
|
||||
struct device_node *np_emif, struct device *dev)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct emif_data *__init_or_module get_device_details(
|
||||
static struct emif_data *get_device_details(
|
||||
struct platform_device *pdev)
|
||||
{
|
||||
u32 size;
|
||||
|
|
@ -1104,7 +1086,7 @@ static struct emif_data *__init_or_module get_device_details(
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static int __init_or_module emif_probe(struct platform_device *pdev)
|
||||
static int emif_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct emif_data *emif;
|
||||
int irq, ret;
|
||||
|
|
@ -1159,7 +1141,7 @@ static int __init_or_module emif_probe(struct platform_device *pdev)
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
static void __exit emif_remove(struct platform_device *pdev)
|
||||
static void emif_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct emif_data *emif = platform_get_drvdata(pdev);
|
||||
|
||||
|
|
@ -1183,7 +1165,8 @@ MODULE_DEVICE_TABLE(of, emif_of_match);
|
|||
#endif
|
||||
|
||||
static struct platform_driver emif_driver = {
|
||||
.remove_new = __exit_p(emif_remove),
|
||||
.probe = emif_probe,
|
||||
.remove_new = emif_remove,
|
||||
.shutdown = emif_shutdown,
|
||||
.driver = {
|
||||
.name = "emif",
|
||||
|
|
@ -1191,7 +1174,7 @@ static struct platform_driver emif_driver = {
|
|||
},
|
||||
};
|
||||
|
||||
module_platform_driver_probe(emif_driver, emif_probe);
|
||||
module_platform_driver(emif_driver);
|
||||
|
||||
MODULE_DESCRIPTION("TI EMIF SDRAM Controller Driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user