mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 05:16:53 +07:00
[ARM] 4908/1: [AT91] RTT platform_device fix
The RTT-as-RTC driver will search for the user-specified RTT peripheral via ID number (0 .. 1). Therefore if the processor only contains a single RTT peripheral, we need to set its platform_device.id to "0" instead of "-1". Also add the missing platform_device resource for the CAP9 processor. Bug reported by Sedji Gaouaou. Signed-off-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
565ac44593
commit
4fd9212cb9
@ -540,10 +540,19 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
|
||||
* RTT
|
||||
* -------------------------------------------------------------------- */
|
||||
|
||||
static struct resource rtt_resources[] = {
|
||||
{
|
||||
.start = AT91_BASE_SYS + AT91_RTT,
|
||||
.end = AT91_BASE_SYS + AT91_RTT + SZ_16 - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
}
|
||||
};
|
||||
|
||||
static struct platform_device at91cap9_rtt_device = {
|
||||
.name = "at91_rtt",
|
||||
.id = -1,
|
||||
.num_resources = 0,
|
||||
.id = 0,
|
||||
.resource = rtt_resources,
|
||||
.num_resources = ARRAY_SIZE(rtt_resources),
|
||||
};
|
||||
|
||||
static void __init at91_add_device_rtt(void)
|
||||
|
@ -558,7 +558,7 @@ static struct resource rtt_resources[] = {
|
||||
|
||||
static struct platform_device at91sam9260_rtt_device = {
|
||||
.name = "at91_rtt",
|
||||
.id = -1,
|
||||
.id = 0,
|
||||
.resource = rtt_resources,
|
||||
.num_resources = ARRAY_SIZE(rtt_resources),
|
||||
};
|
||||
|
@ -561,7 +561,7 @@ static struct resource rtt_resources[] = {
|
||||
|
||||
static struct platform_device at91sam9261_rtt_device = {
|
||||
.name = "at91_rtt",
|
||||
.id = -1,
|
||||
.id = 0,
|
||||
.resource = rtt_resources,
|
||||
.num_resources = ARRAY_SIZE(rtt_resources),
|
||||
};
|
||||
|
@ -423,7 +423,7 @@ static struct resource rtt_resources[] = {
|
||||
|
||||
static struct platform_device at91sam9rl_rtt_device = {
|
||||
.name = "at91_rtt",
|
||||
.id = -1,
|
||||
.id = 0,
|
||||
.resource = rtt_resources,
|
||||
.num_resources = ARRAY_SIZE(rtt_resources),
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user