From: Tony Lindgren Date: Thu, 7 May 2020 16:59:31 +0000 (-0700) Subject: bus: ti-sysc: Ignore timer12 on secure omap3 X-Git-Tag: rel_imx_5.10.35_2.0.0-somdevices.0~2029^2~13^2~10 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=4bba9bf08ff41d78b91581937d97664638bd6bb8;p=linux.git bus: ti-sysc: Ignore timer12 on secure omap3 Some early omap3 boards use timer12 for system timer, but for secure SoCs like on n900 it's not accessible. Likely we will be configuring unavailable devices for other SoCs too based on runtime SoC detection, so let's use a switch to start with. Cc: Grygorii Strashko Cc: Keerthy Cc: Lokesh Vutla Cc: Rob Herring Cc: Tero Kristo Signed-off-by: Tony Lindgren --- diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index e5f5f48d69d2..a81a9f10fde7 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -2744,6 +2744,17 @@ static int sysc_init_soc(struct sysc *ddata) if (match && match->data) sysc_soc->soc = (int)match->data; + /* Ignore devices that are not available on HS and EMU SoCs */ + if (!sysc_soc->general_purpose) { + switch (sysc_soc->soc) { + case SOC_3430 ... SOC_3630: + sysc_add_disabled(0x48304000); /* timer12 */ + break; + default: + break; + }; + } + match = soc_device_match(sysc_soc_feat_match); if (!match) return 0;