mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-23 12:49:47 +07:00
ARM: at91: Probe the reset driver
Register the reset device in the right SoCs so that the reset driver is actually probed even in the old-style probing case. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
This commit is contained in:
parent
65f2ce96a9
commit
d8dfa2d4e9
@ -11,6 +11,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
#include <linux/platform_device.h>
|
||||||
#include <linux/clk/at91_pmc.h>
|
#include <linux/clk/at91_pmc.h>
|
||||||
|
|
||||||
#include <asm/proc-fns.h>
|
#include <asm/proc-fns.h>
|
||||||
@ -362,6 +363,30 @@ static void __init at91sam9260_initialize(void)
|
|||||||
at91_gpio_init(at91sam9260_gpio, 3);
|
at91_gpio_init(at91sam9260_gpio, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct resource rstc_resources[] = {
|
||||||
|
[0] = {
|
||||||
|
.start = AT91SAM9260_BASE_RSTC,
|
||||||
|
.end = AT91SAM9260_BASE_RSTC + SZ_16 - 1,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
},
|
||||||
|
[1] = {
|
||||||
|
.start = AT91SAM9260_BASE_SDRAMC,
|
||||||
|
.end = AT91SAM9260_BASE_SDRAMC + SZ_512 - 1,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct platform_device rstc_device = {
|
||||||
|
.name = "at91-sam9260-reset",
|
||||||
|
.resource = rstc_resources,
|
||||||
|
.num_resources = ARRAY_SIZE(rstc_resources),
|
||||||
|
};
|
||||||
|
|
||||||
|
static void __init at91sam9260_register_devices(void)
|
||||||
|
{
|
||||||
|
platform_device_register(&rstc_device);
|
||||||
|
}
|
||||||
|
|
||||||
/* --------------------------------------------------------------------
|
/* --------------------------------------------------------------------
|
||||||
* Interrupt initialization
|
* Interrupt initialization
|
||||||
* -------------------------------------------------------------------- */
|
* -------------------------------------------------------------------- */
|
||||||
@ -411,5 +436,6 @@ AT91_SOC_START(at91sam9260)
|
|||||||
| (1 << AT91SAM9260_ID_IRQ2),
|
| (1 << AT91SAM9260_ID_IRQ2),
|
||||||
.ioremap_registers = at91sam9260_ioremap_registers,
|
.ioremap_registers = at91sam9260_ioremap_registers,
|
||||||
.register_clocks = at91sam9260_register_clocks,
|
.register_clocks = at91sam9260_register_clocks,
|
||||||
|
.register_devices = at91sam9260_register_devices,
|
||||||
.init = at91sam9260_initialize,
|
.init = at91sam9260_initialize,
|
||||||
AT91_SOC_END
|
AT91_SOC_END
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
#include <linux/platform_device.h>
|
||||||
#include <linux/clk/at91_pmc.h>
|
#include <linux/clk/at91_pmc.h>
|
||||||
|
|
||||||
#include <asm/proc-fns.h>
|
#include <asm/proc-fns.h>
|
||||||
@ -321,6 +322,30 @@ static void __init at91sam9261_initialize(void)
|
|||||||
at91_gpio_init(at91sam9261_gpio, 3);
|
at91_gpio_init(at91sam9261_gpio, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct resource rstc_resources[] = {
|
||||||
|
[0] = {
|
||||||
|
.start = AT91SAM9261_BASE_RSTC,
|
||||||
|
.end = AT91SAM9261_BASE_RSTC + SZ_16 - 1,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
},
|
||||||
|
[1] = {
|
||||||
|
.start = AT91SAM9261_BASE_SDRAMC,
|
||||||
|
.end = AT91SAM9261_BASE_SDRAMC + SZ_512 - 1,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct platform_device rstc_device = {
|
||||||
|
.name = "at91-sam9260-reset",
|
||||||
|
.resource = rstc_resources,
|
||||||
|
.num_resources = ARRAY_SIZE(rstc_resources),
|
||||||
|
};
|
||||||
|
|
||||||
|
static void __init at91sam9261_register_devices(void)
|
||||||
|
{
|
||||||
|
platform_device_register(&rstc_device);
|
||||||
|
}
|
||||||
|
|
||||||
/* --------------------------------------------------------------------
|
/* --------------------------------------------------------------------
|
||||||
* Interrupt initialization
|
* Interrupt initialization
|
||||||
* -------------------------------------------------------------------- */
|
* -------------------------------------------------------------------- */
|
||||||
@ -370,5 +395,6 @@ AT91_SOC_START(at91sam9261)
|
|||||||
| (1 << AT91SAM9261_ID_IRQ2),
|
| (1 << AT91SAM9261_ID_IRQ2),
|
||||||
.ioremap_registers = at91sam9261_ioremap_registers,
|
.ioremap_registers = at91sam9261_ioremap_registers,
|
||||||
.register_clocks = at91sam9261_register_clocks,
|
.register_clocks = at91sam9261_register_clocks,
|
||||||
|
.register_devices = at91sam9261_register_devices,
|
||||||
.init = at91sam9261_initialize,
|
.init = at91sam9261_initialize,
|
||||||
AT91_SOC_END
|
AT91_SOC_END
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
#include <linux/platform_device.h>
|
||||||
#include <linux/clk/at91_pmc.h>
|
#include <linux/clk/at91_pmc.h>
|
||||||
|
|
||||||
#include <asm/proc-fns.h>
|
#include <asm/proc-fns.h>
|
||||||
@ -344,6 +345,30 @@ static void __init at91sam9263_initialize(void)
|
|||||||
at91_gpio_init(at91sam9263_gpio, 5);
|
at91_gpio_init(at91sam9263_gpio, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct resource rstc_resources[] = {
|
||||||
|
[0] = {
|
||||||
|
.start = AT91SAM9263_BASE_RSTC,
|
||||||
|
.end = AT91SAM9263_BASE_RSTC + SZ_16 - 1,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
},
|
||||||
|
[1] = {
|
||||||
|
.start = AT91SAM9263_BASE_SDRAMC0,
|
||||||
|
.end = AT91SAM9263_BASE_SDRAMC0 + SZ_512 - 1,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct platform_device rstc_device = {
|
||||||
|
.name = "at91-sam9260-reset",
|
||||||
|
.resource = rstc_resources,
|
||||||
|
.num_resources = ARRAY_SIZE(rstc_resources),
|
||||||
|
};
|
||||||
|
|
||||||
|
static void __init at91sam9263_register_devices(void)
|
||||||
|
{
|
||||||
|
platform_device_register(&rstc_device);
|
||||||
|
}
|
||||||
|
|
||||||
/* --------------------------------------------------------------------
|
/* --------------------------------------------------------------------
|
||||||
* Interrupt initialization
|
* Interrupt initialization
|
||||||
* -------------------------------------------------------------------- */
|
* -------------------------------------------------------------------- */
|
||||||
@ -392,5 +417,6 @@ AT91_SOC_START(at91sam9263)
|
|||||||
.extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1),
|
.extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1),
|
||||||
.ioremap_registers = at91sam9263_ioremap_registers,
|
.ioremap_registers = at91sam9263_ioremap_registers,
|
||||||
.register_clocks = at91sam9263_register_clocks,
|
.register_clocks = at91sam9263_register_clocks,
|
||||||
|
.register_devices = at91sam9263_register_devices,
|
||||||
.init = at91sam9263_initialize,
|
.init = at91sam9263_initialize,
|
||||||
AT91_SOC_END
|
AT91_SOC_END
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/dma-mapping.h>
|
#include <linux/dma-mapping.h>
|
||||||
#include <linux/clk/at91_pmc.h>
|
#include <linux/clk/at91_pmc.h>
|
||||||
|
#include <linux/platform_device.h>
|
||||||
|
|
||||||
#include <asm/irq.h>
|
#include <asm/irq.h>
|
||||||
#include <asm/mach/arch.h>
|
#include <asm/mach/arch.h>
|
||||||
@ -393,6 +394,35 @@ static void __init at91sam9g45_initialize(void)
|
|||||||
at91_gpio_init(at91sam9g45_gpio, 5);
|
at91_gpio_init(at91sam9g45_gpio, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct resource rstc_resources[] = {
|
||||||
|
[0] = {
|
||||||
|
.start = AT91SAM9G45_BASE_RSTC,
|
||||||
|
.end = AT91SAM9G45_BASE_RSTC + SZ_16 - 1,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
},
|
||||||
|
[1] = {
|
||||||
|
.start = AT91SAM9G45_BASE_DDRSDRC1,
|
||||||
|
.end = AT91SAM9G45_BASE_DDRSDRC1 + SZ_512 - 1,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
},
|
||||||
|
[2] = {
|
||||||
|
.start = AT91SAM9G45_BASE_DDRSDRC0,
|
||||||
|
.end = AT91SAM9G45_BASE_DDRSDRC0 + SZ_512 - 1,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct platform_device rstc_device = {
|
||||||
|
.name = "at91-sam9g45-reset",
|
||||||
|
.resource = rstc_resources,
|
||||||
|
.num_resources = ARRAY_SIZE(rstc_resources),
|
||||||
|
};
|
||||||
|
|
||||||
|
static void __init at91sam9g45_register_devices(void)
|
||||||
|
{
|
||||||
|
platform_device_register(&rstc_device);
|
||||||
|
}
|
||||||
|
|
||||||
/* --------------------------------------------------------------------
|
/* --------------------------------------------------------------------
|
||||||
* Interrupt initialization
|
* Interrupt initialization
|
||||||
* -------------------------------------------------------------------- */
|
* -------------------------------------------------------------------- */
|
||||||
@ -441,5 +471,6 @@ AT91_SOC_START(at91sam9g45)
|
|||||||
.extern_irq = (1 << AT91SAM9G45_ID_IRQ0),
|
.extern_irq = (1 << AT91SAM9G45_ID_IRQ0),
|
||||||
.ioremap_registers = at91sam9g45_ioremap_registers,
|
.ioremap_registers = at91sam9g45_ioremap_registers,
|
||||||
.register_clocks = at91sam9g45_register_clocks,
|
.register_clocks = at91sam9g45_register_clocks,
|
||||||
|
.register_devices = at91sam9g45_register_devices,
|
||||||
.init = at91sam9g45_initialize,
|
.init = at91sam9g45_initialize,
|
||||||
AT91_SOC_END
|
AT91_SOC_END
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
#include <linux/platform_device.h>
|
||||||
#include <linux/clk/at91_pmc.h>
|
#include <linux/clk/at91_pmc.h>
|
||||||
|
|
||||||
#include <asm/proc-fns.h>
|
#include <asm/proc-fns.h>
|
||||||
@ -332,6 +333,30 @@ static void __init at91sam9rl_initialize(void)
|
|||||||
at91_gpio_init(at91sam9rl_gpio, 4);
|
at91_gpio_init(at91sam9rl_gpio, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct resource rstc_resources[] = {
|
||||||
|
[0] = {
|
||||||
|
.start = AT91SAM9RL_BASE_RSTC,
|
||||||
|
.end = AT91SAM9RL_BASE_RSTC + SZ_16 - 1,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
},
|
||||||
|
[1] = {
|
||||||
|
.start = AT91SAM9RL_BASE_SDRAMC,
|
||||||
|
.end = AT91SAM9RL_BASE_SDRAMC + SZ_512 - 1,
|
||||||
|
.flags = IORESOURCE_MEM,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct platform_device rstc_device = {
|
||||||
|
.name = "at91-sam9260-reset",
|
||||||
|
.resource = rstc_resources,
|
||||||
|
.num_resources = ARRAY_SIZE(rstc_resources),
|
||||||
|
};
|
||||||
|
|
||||||
|
static void __init at91sam9rl_register_devices(void)
|
||||||
|
{
|
||||||
|
platform_device_register(&rstc_device);
|
||||||
|
}
|
||||||
|
|
||||||
/* --------------------------------------------------------------------
|
/* --------------------------------------------------------------------
|
||||||
* Interrupt initialization
|
* Interrupt initialization
|
||||||
* -------------------------------------------------------------------- */
|
* -------------------------------------------------------------------- */
|
||||||
@ -382,5 +407,6 @@ AT91_SOC_START(at91sam9rl)
|
|||||||
#if defined(CONFIG_OLD_CLK_AT91)
|
#if defined(CONFIG_OLD_CLK_AT91)
|
||||||
.register_clocks = at91sam9rl_register_clocks,
|
.register_clocks = at91sam9rl_register_clocks,
|
||||||
#endif
|
#endif
|
||||||
|
.register_devices = at91sam9rl_register_devices,
|
||||||
.init = at91sam9rl_initialize,
|
.init = at91sam9rl_initialize,
|
||||||
AT91_SOC_END
|
AT91_SOC_END
|
||||||
|
Loading…
Reference in New Issue
Block a user