ARM: at91: move SoC detection to its own driver
To simplify machine init and as the soc_device struct is not used as the parent for on-chip devices anymore, move SoC detection to its own driver. Change in dmesg: - before: DMA: preallocated 256 KiB pool for atomic coherent allocations AT91: Detected SoC family: sama5d2 AT91: Detected SoC: sama5d27, revision 0 No ATAGs? clocksource: tcb_clksrc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 184217874325 ns at_xdmac f0010000.dma-controller: 16 channels, mapped at 0xe085b000 SCSI subsystem initialized - after: DMA: preallocated 256 KiB pool for atomic coherent allocations No ATAGs? clocksource: tcb_clksrc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 184217874325 ns at_xdmac f0010000.dma-controller: 16 channels, mapped at 0xe0859000 AT91: Detected SoC family: sama5d2 AT91: Detected SoC: sama5d27, revision 0 SCSI subsystem initialized Suggested-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
This commit is contained in:
@@ -14,23 +14,10 @@
|
||||
#include <asm/mach/arch.h>
|
||||
|
||||
#include "generic.h"
|
||||
#include "soc.h"
|
||||
|
||||
static const struct at91_soc rm9200_socs[] = {
|
||||
AT91_SOC(AT91RM9200_CIDR_MATCH, 0, "at91rm9200 BGA", "at91rm9200"),
|
||||
{ /* sentinel */ },
|
||||
};
|
||||
|
||||
static void __init at91rm9200_dt_device_init(void)
|
||||
{
|
||||
struct soc_device *soc;
|
||||
struct device *soc_dev = NULL;
|
||||
|
||||
soc = at91_soc_init(rm9200_socs);
|
||||
if (soc != NULL)
|
||||
soc_dev = soc_device_to_device(soc);
|
||||
|
||||
of_platform_default_populate(NULL, NULL, soc_dev);
|
||||
of_platform_default_populate(NULL, NULL, NULL);
|
||||
|
||||
at91rm9200_pm_init();
|
||||
}
|
||||
|
Reference in New Issue
Block a user